/* TraZoom design system, aligned with the trading app */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #f0f9ff;
  --primary-hover: #e0f2fe;
  --primary-ring: rgba(14, 165, 233, 0.18);
  --bs-primary: #0ea5e9;
  --bs-primary-rgb: 14, 165, 233;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --info: #0ea5e9;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --logo-aspect-ratio: 148 / 42;
  --logo-width-sidebar: 148px;
  --logo-height-sidebar: 42px;
  --logo-width-mobile: 148px;
  --logo-height-mobile: 42px;
  --logo-width-auth: 200px;
  --sidebar-width: 252px;
  --sidebar-link-font-size: 14px;
  --sidebar-section-font-size: 12px;
  --sidebar-icon-size: 16px;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-caption: #94a3b8;
  --text-inverse: #ffffff;
  --text-placeholder: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-strong: #cbd5e1;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.03);
  --shadow-auth-card: 0 12px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-auth-input: 0 1px 2px rgba(15, 23, 42, 0.03);
  --brand-teal: #0f9ea8;
  --brand-green: #12a331;
  --brand-teal-soft: rgba(15, 158, 168, 0.1);
  --brand-green-soft: rgba(18, 163, 49, 0.08);
  --table-header-bg: #f1f5f9;
  --table-stripe: #fafbfc;
  --table-hover: #f8fafc;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-base: 14px;
  --font-sm: 13px;
  --font-xs: 12px;
  --font-lg: 15px;
  --line-height: 1.5;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --control-height: 36px;
  --control-height-sm: 32px;
  --control-font-size: 13px;
  --control-padding-x: 12px;
  --label-font-size: 12px;
  --hint-font-size: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: var(--font-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background: var(--bg-main);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 0.92em;
  word-break: break-all;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-main);
  min-width: 0;
}

.app-main-inner {
  padding: var(--space-6) var(--space-8) var(--space-8);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4) var(--space-5);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  flex-shrink: 0;
}

.trazoom-logo {
  display: block;
  flex-shrink: 0;
  width: var(--logo-width-sidebar);
  height: var(--logo-height-sidebar);
  aspect-ratio: var(--logo-aspect-ratio);
  object-fit: contain;
  margin: 0 auto;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-2) var(--space-3);
}

.sidebar-nav .sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-4);
  color: var(--text-secondary);
  font-size: var(--sidebar-link-font-size);
  font-weight: 500;
  border-radius: var(--radius-md);
  margin: 2px 0;
  text-decoration: none;
  line-height: 1.45;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav .sidebar-link i.nav-icon {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--sidebar-icon-size);
  flex-shrink: 0;
}

.sidebar-nav .sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav .sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.sidebar-nav .sidebar-link.active i.nav-icon,
.sidebar-nav .sidebar-link:hover i.nav-icon { color: var(--primary); }

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-4) var(--space-2);
}

.sidebar-section-label {
  padding: var(--space-3) var(--space-4) var(--space-2);
  font-size: var(--sidebar-section-font-size);
  font-weight: 500;
  color: var(--text-caption);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 12px 16px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-account {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.sidebar-account-id {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 2px 2px 10px;
}

.sidebar-account-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.sidebar-logout:hover {
  color: var(--primary-dark);
  border-color: #bae6fd;
  background: var(--primary-light);
}

.sidebar-mark {
  color: var(--text-caption);
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 0 4px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  gap: var(--space-4);
  flex-wrap: nowrap;
}

.page-header-left {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 0;
}

.page-header-text { min-width: 0; }

.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: var(--hint-font-size);
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.6;
}

.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-left: auto;
  flex: none;
  min-width: 0;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}

.account-hero-text { min-width: 0; flex: 1; }

.account-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.account-email {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--font-sm);
  word-break: break-all;
}

.account-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: none;
}

.account-facts {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.setting-row .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: none;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
  margin-bottom: var(--space-4);
}

.card-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
}

.card-header h6,
.page-section-title {
  margin: 0;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.card-body { padding: var(--space-5); }

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 var(--space-4);
}

.home-hub {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.home-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.home-action-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.home-action-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: inherit;
}

.home-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: var(--space-3);
  font-size: var(--font-sm);
}

.home-action-icon--admin {
  background: #fef3c7;
  color: #b45309;
}

.home-action-title {
  font-size: var(--font-lg);
  font-weight: 650;
  margin: 0 0 var(--space-1);
}

.home-action-desc {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.profile-label {
  display: block;
  font-size: var(--hint-font-size);
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-value {
  margin: 0;
  font-weight: 600;
  word-break: break-all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-height);
  padding: 0 14px;
  font-size: var(--control-font-size);
  font-weight: 500;
  border-radius: var(--radius-md);
  line-height: 1.2;
}

.btn:focus, .btn:active, .btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.btn-sm {
  min-height: var(--control-height-sm);
  padding: 0 10px;
  font-size: var(--label-font-size);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: #fff;
}

.btn-outline-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.btn-outline-danger:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.form-label {
  display: block;
  font-size: var(--label-font-size);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control, .form-select {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--control-padding-x);
  font-size: var(--control-font-size);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

textarea.form-control {
  min-height: 96px;
  padding: 8px var(--control-padding-x);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-text, .text-muted { color: var(--text-muted); }
.form-text { font-size: var(--hint-font-size); margin-top: 6px; }

.form-narrow { max-width: 560px; }

.card:has(.form-narrow) {
  max-width: 760px;
}

.card:has(.form-narrow) .form-narrow { max-width: none; }

.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.form-check { margin-top: var(--space-3); }
.form-check-label { font-size: var(--control-font-size); }

.table { margin-bottom: 0; font-size: var(--font-sm); }

.table thead th {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 14px;
  white-space: nowrap;
  background: var(--bg-subtle);
}

.table tbody td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

.table-hover tbody tr:hover { background: var(--bg-hover); }

.data-table-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.data-table-panel .table thead th {
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border-strong);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 11px 14px;
}

.data-table-panel .table tbody tr:nth-child(even) { background: var(--table-stripe); }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.row-actions form { margin: 0; }

.empty-state {
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.badge-soft.admin { background: #fef3c7; color: #b45309; }
.badge-soft.ok { background: var(--success-bg); color: #166534; }
.badge-soft.warn { background: var(--warning-bg); color: #b45309; }
.badge-soft.off { background: var(--danger-bg); color: #991b1b; }

.qr {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 8px;
}

.secret-box {
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.6;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.alert { font-size: var(--font-sm); border-radius: var(--radius-md); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.4;
}

.lang-switch a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.auth-lang {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 70% 55% at 8% 15%, var(--brand-teal-soft) 0%, transparent 50%),
    radial-gradient(ellipse 65% 45% at 92% 85%, var(--brand-green-soft) 0%, transparent 48%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.auth-container { width: 100%; max-width: 440px; }
.auth-container--split { max-width: 900px; }

.auth-card {
  background: var(--bg-card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow-auth-card);
  padding: 36px 36px 32px;
}

.auth-card--split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.auth-panel-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  background:
    linear-gradient(155deg, rgba(15, 158, 168, 0.05) 0%, transparent 45%),
    linear-gradient(340deg, rgba(18, 163, 49, 0.04) 0%, transparent 40%),
    linear-gradient(180deg, #f9fffe 0%, #f8fafc 100%);
  border-right: 1px solid var(--border-light);
  overflow: hidden;
}

.auth-panel-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(15, 158, 168, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.auth-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 36px 28px;
}

.auth-intro-inner {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

.auth-logo-wrap {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 0 auto 16px;
}

.auth-logo-mark {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 260 / 80;
  object-fit: contain;
}

.auth-intro-lead {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.auth-form-head { margin-bottom: 20px; }

.auth-form-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 6px;
}

.auth-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.auth-form .form-group { margin-bottom: 16px; }
.auth-card .form-group:last-of-type { margin-bottom: 12px; }

.auth-form .form-label {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.auth-form .auth-field-input {
  min-height: 40px;
  font-size: 14px;
  line-height: 1.4;
}

.auth-form .form-text {
  font-size: 12px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.auth-input-wrap { position: relative; }
.auth-input-wrap .pwd-reveal { padding-right: 36px; }

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-caption);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

.auth-field-input {
  min-height: var(--control-height);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-auth-input);
}

.auth-field-input--icon { padding-left: 36px; padding-right: 36px; }

.auth-field-input:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(15, 158, 168, 0.15);
}

.auth-toggle-pwd {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-caption);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.auth-code-row { display: flex; align-items: stretch; gap: 8px; }
.auth-code-row .auth-field-input { flex: 1; min-width: 0; }

.auth-send-code {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: var(--control-height);
  padding: 0 12px;
  font-size: 13px;
  white-space: nowrap;
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.auth-forgot {
  font-size: 12px;
  line-height: 1.4;
  color: var(--brand-teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot:hover { color: var(--brand-green); text-decoration: underline; }

.auth-card .btn-login {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  margin-top: 4px;
  border-radius: 10px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
}

.auth-card .btn-login--brand {
  background: linear-gradient(135deg, var(--brand-teal) 0%, #0d8f98 45%, var(--brand-green) 100%);
}

.auth-card .btn-login--brand:hover:not(:disabled) {
  background: linear-gradient(135deg, #0e8f99 0%, #0c828b 45%, #10962c 100%);
  color: #fff;
}

.auth-btn-arrow { font-size: 12px; transition: transform 0.15s ease; }
.auth-card .btn-login:hover:not(:disabled) .auth-btn-arrow { transform: translateX(2px); }

.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--brand-teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { color: var(--brand-green); text-decoration: underline; }

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1rem;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1050;
}

.mobile-nav.show { display: block; }

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: min(280px, 85vw);
  height: 100%;
  height: 100dvh;
  background: var(--bg-card);
  transition: left 0.25s ease;
  z-index: 1051;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.mobile-nav.show .mobile-nav-drawer { left: 0; }

.mobile-nav-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mobile-nav-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg-subtle);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-nav-body { padding: var(--space-2) 0; flex: 1; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-5);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--sidebar-link-font-size);
  font-weight: 500;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.mobile-nav-footer {
  padding: 12px 12px 16px;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 1199.98px) {
  .app-main-inner { padding: var(--space-5) var(--space-6); }
  .home-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; width: 100%; }
  .app-main-inner { padding: var(--space-4); }
  .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .page-title { font-size: 1.125rem; white-space: nowrap; }
  .page-header { flex-wrap: wrap; align-items: flex-start; }
  .page-header-left { flex: 1 1 auto; }
  .page-header-actions { flex: 1 1 auto; }
  .account-hero { flex-wrap: wrap; }
  .account-hero-actions { width: 100%; }
  .account-facts, .home-hub-grid, .profile-grid { grid-template-columns: 1fr; }
  .auth-page { align-items: flex-start; padding-top: 32px; }
  .auth-card--split { grid-template-columns: 1fr; }
  .auth-panel-intro {
    padding: 28px 20px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .auth-panel-form { padding: 24px 20px 20px; }
  .auth-form-title { font-size: 20px; }
  .auth-logo-wrap { width: 196px; }
}
