/*
  Design notes:
  - This is the customer-facing counterpart to the admin back office (see admin-web's stylesheet
    for the full rationale). Same underlying palette and monospace-for-identifiers convention,
    kept consistent across the platform, but softer: no terminal-prompt branding here (that
    signature was for internal ops staff), a plain wordmark instead, and slightly more generous
    spacing since this is read by customers, not scanned all day by staff.
  - Sidebar becomes a lighter top-nav on this surface — a full dark sidebar reads as "admin tool",
    which isn't the right register for a customer portal.
*/

:root {
  --bg: #FBFAF7;
  --panel: #FFFFFF;
  --border: #E4E1D8;
  --text: #1B1D22;
  --text-muted: #6B7078;
  --accent: #3454D1;
  --accent-hover: #2A44AD;
  --warning: #C77B12;
  --danger: #B3432B;
  --success: #2F7D5C;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.topbar-brand { font-weight: 700; font-size: 15px; }
.topbar nav { display: flex; gap: 24px; align-items: center; }
.topbar nav a { color: var(--text-muted); font-size: 13.5px; font-weight: 550; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-muted); }
.lang-switch a { font-size: 12.5px; padding: 2px 6px; border-radius: 4px; }
.lang-switch a.active { background: #EEECE3; color: var(--text); font-weight: 700; }

.main { max-width: 960px; margin: 0 auto; padding: 32px 24px 60px; }

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
.page-header .subtitle { color: var(--text-muted); font-size: 13.5px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-block { width: 100%; text-align: center; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
th { background: #F4F2EC; font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
.mono { font-family: var(--mono); font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
}

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 13.5px; }
.alert-error { background: #FBEAE6; color: var(--danger); border: 1px solid #EFC9BE; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-active { background: #E9F5EF; color: var(--success); }
.badge-disabled { background: #F1EFE8; color: var(--text-muted); }
.badge-pending { background: #FBF1E1; color: var(--warning); }
.badge-failed { background: #FBEAE6; color: var(--danger); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }

.account-list { list-style: none; padding: 0; margin: 0; }
.account-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.account-list button {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-size: 14px; font-family: inherit; color: var(--text); padding: 0;
}
.account-list .account-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--panel); border: 1px solid var(--border); padding: 40px; border-radius: var(--radius); width: 360px; }
.login-card .topbar-brand { margin-bottom: 24px; }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 20px; gap: 10px; }
  .main { padding: 20px; }
}
