/* SMC Sample App — shared design system.
   Direction: deep maroon accent + warm neutral surface, monospace for
   data/figures, clean sans for everything else — a deliberate financial-
   tool register (structured, precise) rather than a generic blue-button
   web-app look. */

:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --border: #e6e1d8;
  --text: #211d1a;
  --text-muted: #8b8478;
  --text-faint: #b3aca0;

  --accent: #7a1f2b;
  --accent-hover: #611821;
  --accent-soft: #f4e8e9;

  --positive: #3f7a54;
  --positive-soft: #e7f2ea;
  --negative: #a8362a;
  --negative-soft: #fbeae7;
  --warning: #96650f;
  --warning-soft: #fbf1de;

  --radius: 8px;
  --radius-sm: 5px;

  --font-sans: -apple-system, "Segoe UI", Inter, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- App shell (sidebar + content) ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.brand {
  margin-bottom: 28px;
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 4px 0 8px;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-chip {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  flex: 1;
  padding: 36px 44px;
  max-width: 1000px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.mono { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge.positive { background: var(--positive-soft); color: var(--positive); }
.badge.negative { background: var(--negative-soft); color: var(--negative); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.neutral { background: var(--bg); color: var(--text-muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: inline-flex;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.danger:hover { background: var(--negative-soft); color: var(--negative); }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------- Forms (used both in the app shell and standalone auth cards) ---------- */

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 4px;
  color: var(--text);
}

input, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, button:focus, a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Standalone auth-card pages (login, register, 2FA, etc.) ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px 30px;
  width: 340px;
}

.auth-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.auth-card p.lead {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-card .btn { width: 100%; justify-content: center; margin-top: 18px; }

.auth-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin: 20px 0;
}

.auth-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 16px;
}
.alert.error { background: var(--negative-soft); color: var(--negative); }
.alert.success { background: var(--positive-soft); color: var(--positive); }

.code-input {
  font-family: var(--font-mono);
  font-size: 22px;
  text-align: center;
  letter-spacing: 6px;
}

.link-box {
  font-family: var(--font-mono);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  font-size: 12px;
  margin: 10px 0;
}
