/* =====================================================
   Portfolio Dashboard — Professional Asset Management
   Institutional-grade design system
   ===================================================== */

/* ---------- CSS Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Light theme ---------- */
:root, [data-theme="light"] {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --bg-body: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fafbfc;
  --bg-inset: #f1f3f5;
  --bg-elevated: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  --accent: #3b82f6;
  --accent-soft: rgba(59,130,246,0.08);
  --accent-hover: #2563eb;

  --green: #10b981;
  --green-soft: rgba(16,185,129,0.08);
  --green-medium: rgba(16,185,129,0.15);
  --red: #ef4444;
  --red-soft: rgba(239,68,68,0.08);
  --red-medium: rgba(239,68,68,0.15);

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --divider: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);

  --chart-bg: #ffffff;
  --chart-line: #3b82f6;
  --chart-area-top: rgba(59,130,246,0.15);
  --chart-area-bottom: rgba(59,130,246,0.01);
  --chart-grid: #f1f5f9;
  --chart-text: #94a3b8;

  --skeleton-base: #e2e8f0;
  --skeleton-shine: #f1f5f9;

  --header-bg: rgba(255,255,255,0.82);
  --header-border: #e2e8f0;

  --login-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --login-card-bg: #ffffff;

  --badge-bg: #f1f5f9;
  --badge-text: #64748b;

  --range-bg: #f1f5f9;
  --range-active-bg: #ffffff;
  --range-active-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-hover: #1a2235;
  --bg-inset: #0d1117;
  --bg-elevated: #1e293b;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --accent: #60a5fa;
  --accent-soft: rgba(96,165,250,0.1);
  --accent-hover: #93bbfd;

  --green: #34d399;
  --green-soft: rgba(52,211,153,0.1);
  --green-medium: rgba(52,211,153,0.18);
  --red: #f87171;
  --red-soft: rgba(248,113,113,0.1);
  --red-medium: rgba(248,113,113,0.18);

  --border: #1e293b;
  --border-light: #1e293b;
  --divider: #1e293b;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.03);

  --chart-bg: #111827;
  --chart-line: #60a5fa;
  --chart-area-top: rgba(96,165,250,0.2);
  --chart-area-bottom: rgba(96,165,250,0.01);
  --chart-grid: #1e293b;
  --chart-text: #64748b;

  --skeleton-base: #1e293b;
  --skeleton-shine: #334155;

  --header-bg: rgba(11,15,25,0.85);
  --header-border: #1e293b;

  --login-bg: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  --login-card-bg: #111827;

  --badge-bg: #1e293b;
  --badge-text: #94a3b8;

  --range-bg: #1e293b;
  --range-active-bg: #334155;
  --range-active-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ---------- Base ---------- */
html {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* theme transition */
.theme-t, .theme-t *, .theme-t *::before, .theme-t *::after {
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, fill 0.3s !important;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--header-border);
  height: 56px;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}
.header-brand .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
[data-theme="dark"] .header-brand .brand-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
}
.header-brand .brand-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-user {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 4px;
}
.header-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.15s;
}
.header-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

/* ---------- Container & Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.page {
  padding: 28px 0 48px;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-body { padding: 20px 24px; }
.card-hover {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card-hover:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .container { padding: 0 16px; } }

/* ---------- Section ---------- */
.section { margin-bottom: 24px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

/* ---------- Typography ---------- */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.t-headline { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.t-big { font-size: 28px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.1; }
.t-kpi { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.t-metric { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.t-label { font-size: 12px; font-weight: 500; color: var(--text-tertiary); letter-spacing: 0.02em; }
.t-caption { font-size: 12px; color: var(--text-secondary); }
.t-sub { font-size: 13px; color: var(--text-secondary); }

/* ---------- Colors ---------- */
.c-green { color: var(--green); }
.c-red { color: var(--red); }
.c-secondary { color: var(--text-secondary); }
.bg-green-soft { background: var(--green-soft); }
.bg-red-soft { background: var(--red-soft); }

/* ---------- Metric cell ---------- */
.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric .metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.metric .metric-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.metric .metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- KPI strip (horizontal metrics in a card) ---------- */
.kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.kpi-strip .kpi-cell {
  flex: 1;
  min-width: 140px;
  padding: 20px 24px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kpi-strip .kpi-cell:last-child { border-right: none; }
@media (max-width: 768px) {
  .kpi-strip { flex-direction: column; }
  .kpi-strip .kpi-cell { border-right: none; border-bottom: 1px solid var(--border-light); padding: 16px 20px; }
  .kpi-strip .kpi-cell:last-child { border-bottom: none; }
}

/* ---------- APR card ---------- */
.apr-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.apr-card .apr-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.apr-card .apr-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.apr-card .apr-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Account card ---------- */
.account-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.account-card .account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.account-card .account-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.account-card .account-name .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.account-card .account-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
}
.account-card .account-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.account-card .account-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}
.account-card .account-aprs {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
}
.account-card .account-aprs strong {
  font-family: var(--font-mono);
  font-weight: 600;
}
.account-card .account-arrow {
  color: var(--text-tertiary);
  font-size: 16px;
  transition: transform 0.2s;
}
.card-hover:hover .account-arrow { transform: translateX(2px); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: var(--bg-inset);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-surface-hover); }

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  padding: 0 8px;
}
.btn-ghost:hover { color: var(--text-primary); }

/* ---------- Range selector ---------- */
.range-group {
  display: inline-flex;
  gap: 2px;
  background: var(--range-bg);
  border-radius: 8px;
  padding: 3px;
}
.range-btn {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.range-btn:hover { color: var(--text-primary); }
.range-btn.active {
  background: var(--range-active-bg);
  color: var(--text-primary);
  box-shadow: var(--range-active-shadow);
}

/* ---------- Input ---------- */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--bg-inset);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
}
.login-left {
  flex: 1;
  background: var(--login-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 70%);
}
.login-hero {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 400px;
}
.login-hero h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.login-hero p {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.8;
}
.login-right {
  width: 480px;
  min-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--login-card-bg);
}
@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; min-width: unset; }
}
.login-form-wrap {
  width: 100%;
  max-width: 360px;
}
.login-form-wrap .logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 28px;
}
.login-form-wrap h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.login-form-wrap .login-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

/* ---------- Chart ---------- */
.chart-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: var(--chart-bg);
  border: 1px solid var(--border);
}

/* ---------- Skeleton ---------- */
.sk {
  background: var(--skeleton-base);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.sk-text { height: 14px; width: 60%; margin-bottom: 8px; }
.sk-number { height: 28px; width: 35%; }
.sk-chart { height: 320px; width: 100%; border-radius: 12px; }
.sk-card { height: 140px; border-radius: 12px; }

/* ---------- Back button ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ---------- Animation ---------- */
.fade-in { animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- State ---------- */
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.state-error {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
}
.state-error .err-msg { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

/* ---------- Funding ---------- */
.funding-strip {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border-light); margin: 16px 0; }
.hidden { display: none !important; }

/* ---------- Strategy badge & tag ---------- */
.strategy-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.strategy-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-inset);
  border-radius: 10px;
  white-space: nowrap;
}

/* ---------- Positions table ---------- */
.positions-table-wrap {
  overflow-x: auto;
  padding: 0;
}
.positions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.positions-table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.positions-table th.num,
.positions-table td.num {
  text-align: right;
}
.positions-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.positions-table tbody tr:last-child td {
  border-bottom: none;
}
.positions-table .summary-row td {
  border-top: 1px solid var(--border);
  background: var(--bg-inset);
}

/* ---------- JLP Info Bar ---------- */
.jlp-info-bar {
  display: flex;
  gap: 24px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--bg-inset);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.jlp-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jlp-info-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.jlp-info-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ========================================================================== */
/* ADMIN DASHBOARD STYLES                                                      */
/* ========================================================================== */

/* ---------- Admin Brand ---------- */
.brand-icon.brand-admin {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}
[data-theme="dark"] .brand-icon.brand-admin {
  background: linear-gradient(135deg, #fbbf24 0%, #f87171 100%);
}

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.6;
}

/* ---------- Admin Client Card ---------- */
.admin-client-card {
  padding: 20px 24px;
}
.admin-client-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.admin-client-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-client-username {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 8px;
  font-weight: 400;
}
.admin-client-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-client-notes {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.admin-client-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.admin-client-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Admin Notes Editor ---------- */
.admin-notes-wrap {
  margin-bottom: 20px;
}
.admin-notes-wrap label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.admin-notes-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  resize: vertical;
  transition: border-color 0.15s;
}
.admin-notes-input:focus {
  outline: none;
  border-color: var(--accent);
}
.admin-notes-status {
  display: inline-block;
  margin-left: 12px;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.3s;
}
.admin-notes-saved {
  color: var(--green);
}
.admin-notes-failed {
  color: var(--red);
}

/* ---------- Small Button ---------- */
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ---------- Admin Responsive ---------- */
@media (max-width: 768px) {
  .admin-client-card {
    padding: 16px;
  }
  .admin-client-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .admin-client-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-notes-input {
    min-height: 60px;
  }
  /* Admin pages: force client list to single column */
  .grid.g2 {
    grid-template-columns: 1fr;
  }
}
