:root {
  font-family: system-ui,-apple-system,BlinkMacSystemFont,
               "Segoe UI",sans-serif;
  color: #f3f4f6;
  background: #0b1020;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(
    circle at top,
    #202b48 0%,
    #0b1020 65%
  );
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  background: #151c2e;
  border: 1px solid #303a51;
  border-radius: 20px;
  box-shadow: 0 24px 70px #0005;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: #ee4d2d;
  border-radius: 14px;
  color: white;
  font-size: 28px;
  font-weight: 800;
}

h1 { font-size: 25px; margin: 22px 0 5px; }

.subtitle { color: #9ca3af; margin-bottom: 28px; }

label {
  display: block;
  margin: 16px 0 8px;
  font-size: 14px;
  color: #d1d5db;
}

input {
  width: 100%;
  padding: 13px 14px;
  background: #0b1020;
  border: 1px solid #374151;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  outline: none;
}

input:focus { border-color: #ee4d2d; }

button {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: #ee4d2d;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled { opacity: .6; cursor: wait; }

.message { min-height: 20px; color: #fca5a5; }

.message.success { color: #86efac; }

.footer {
  margin-top: 26px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.hidden { display: none; }

@media (max-width: 480px) {
  .login-card { padding: 26px; }
  h1 { font-size: 22px; }
}

/* Merchant Management */

#dashboardView {
  max-width: 680px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.stat-box {
  background: #0b1020;
  border: 1px solid #303a51;
  border-radius: 12px;
  padding: 18px;
}

.stat-box span {
  display: block;
  font-size: 13px;
  color: #9ca3af;
}

.stat-box strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin: 26px 0 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
}

.small-button {
  width: auto;
  margin: 0;
  padding: 9px 14px;
  font-size: 13px;
}

.merchant-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.merchant-item {
  padding: 16px;
  border: 1px solid #303a51;
  border-radius: 12px;
  background: #0b1020;
}

.merchant-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.merchant-item p {
  margin: 8px 0;
  font-size: 13px;
  color: #9ca3af;
}

.merchant-item button {
  margin-top: 12px;
}

.muted {
  color: #9ca3af;
  font-size: 14px;
}

textarea {
  width: 100%;
  padding: 13px;
  background: #0b1020;
  border: 1px solid #374151;
  border-radius: 10px;
  color: white;
  font: inherit;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #ee4d2d;
}

.credential-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #374151;
  border-radius: 14px;
}

.secondary-button {
  background: #303a51;
}

@media (max-width: 480px) {
  .stats { gap: 8px; }
  .stat-box { padding: 12px; }
  .stat-box strong { font-size: 24px; }
}
