/* ========================================
   Rhythm Capital — Advisor Portal Theme
   Shared styles for /advisor-* pages
   ======================================== */

:root {
  --rc-bg: #0a0a0f;
  --rc-bg-elev: #14141d;
  --rc-bg-card: rgba(255, 255, 255, 0.03);
  --rc-bg-card-hover: rgba(255, 255, 255, 0.05);
  --rc-border: rgba(212, 175, 55, 0.18);
  --rc-border-active: rgba(212, 175, 55, 0.5);
  --rc-gold: #d4af37;
  --rc-gold-bright: #e9c97a;
  --rc-gold-muted: rgba(212, 175, 55, 0.6);
  --rc-text: #f5e9c6;
  --rc-text-muted: rgba(245, 233, 198, 0.65);
  --rc-text-dim: rgba(245, 233, 198, 0.4);
  --rc-green: #5fbf8c;
  --rc-red: #d97070;
  --rc-orange: #e0a268;
  --rc-blue: #7aa3e5;
  --rc-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--rc-bg);
  color: var(--rc-text);
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.02) 0%, transparent 50%),
    var(--rc-bg);
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Fraunces', Georgia, serif;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.3; }

a { color: var(--rc-gold-bright); text-decoration: none; }
a:hover { color: var(--rc-gold); }

/* ============== Layout ============== */
.advisor-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.advisor-sidebar {
  background: var(--rc-bg-elev);
  border-right: 1px solid var(--rc-border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.advisor-brand {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--rc-text);
  margin-bottom: 28px;
  padding: 0 8px;
}
.advisor-brand em { font-style: italic; color: var(--rc-gold); }

.advisor-nav-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-text-dim);
  padding: 16px 8px 6px;
  font-weight: 500;
}

.advisor-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--rc-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13.5px;
  text-decoration: none;
}
.advisor-nav-item:hover {
  background: var(--rc-bg-card-hover);
  color: var(--rc-text);
}
.advisor-nav-item.active {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.08));
  color: var(--rc-gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.25);
}
.advisor-nav-item svg, .advisor-nav-item .icon {
  width: 16px; height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}

.advisor-main {
  padding: 32px 40px;
  max-width: 1400px;
  width: 100%;
}

.advisor-header {
  margin-bottom: 28px;
}
.advisor-header .eyebrow {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rc-gold);
  margin-bottom: 8px;
  font-weight: 500;
}
.advisor-header h1 em {
  font-style: italic;
  color: var(--rc-gold);
}
.advisor-header .subtitle {
  margin-top: 8px;
  color: var(--rc-text-muted);
  font-size: 14px;
}

/* ============== KPI cards ============== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--rc-bg-card);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 18px 20px;
  backdrop-filter: blur(8px);
}
.kpi-card .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-text-dim);
  margin-bottom: 8px;
  font-weight: 500;
}
.kpi-card .value {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--rc-text);
  line-height: 1;
}
.kpi-card .value.gold { color: var(--rc-gold); }
.kpi-card .value.green { color: var(--rc-green); }
.kpi-card .delta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--rc-text-muted);
}

/* ============== Tables ============== */
.advisor-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--rc-bg-card);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  overflow: hidden;
}
.advisor-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--rc-border);
  background: rgba(255, 255, 255, 0.02);
}
.advisor-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13.5px;
  color: var(--rc-text);
}
.advisor-table tr:last-child td { border-bottom: none; }
.advisor-table tr:hover { background: var(--rc-bg-card-hover); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--rc-border);
  background: var(--rc-bg-card);
  color: var(--rc-text);
}
.btn:hover { background: var(--rc-bg-card-hover); border-color: var(--rc-border-active); }
.btn.primary {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.12));
  border-color: var(--rc-gold);
  color: var(--rc-gold-bright);
}
.btn.primary:hover {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.18));
}

/* ============== Forms ============== */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--rc-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--rc-text);
  font-family: inherit;
  font-size: 14px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--rc-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}
.field-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--rc-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ============== Status pills ============== */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.pill.green { background: rgba(95, 191, 140, 0.15); color: var(--rc-green); }
.pill.gold  { background: rgba(212, 175, 55, 0.18); color: var(--rc-gold-bright); }
.pill.orange { background: rgba(224, 162, 104, 0.15); color: var(--rc-orange); }
.pill.red   { background: rgba(217, 112, 112, 0.15); color: var(--rc-red); }
.pill.blue  { background: rgba(122, 163, 229, 0.15); color: var(--rc-blue); }

/* ============== Login page (centered) ============== */
.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--rc-bg-card);
  border: 1px solid var(--rc-border);
  border-radius: 16px;
  padding: 40px 36px;
  backdrop-filter: blur(12px);
  box-shadow: var(--rc-shadow);
}
.login-card .brand {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin-bottom: 6px;
}
.login-card .brand em { font-style: italic; color: var(--rc-gold); }
.login-card .tagline {
  text-align: center;
  color: var(--rc-text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ============== Utility ============== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-dim { color: var(--rc-text-dim); }
.text-muted { color: var(--rc-text-muted); }
.text-gold { color: var(--rc-gold); }
.mono { font-family: 'JetBrains Mono', 'SF Mono', monospace; font-size: 12.5px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--rc-text-muted);
  font-size: 14px;
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert.error { background: rgba(217, 112, 112, 0.1); border: 1px solid rgba(217, 112, 112, 0.3); color: var(--rc-red); }
.alert.success { background: rgba(95, 191, 140, 0.1); border: 1px solid rgba(95, 191, 140, 0.3); color: var(--rc-green); }
.alert.info { background: rgba(122, 163, 229, 0.1); border: 1px solid rgba(122, 163, 229, 0.3); color: var(--rc-blue); }

/* ============== Mobile ============== */
@media (max-width: 768px) {
  .advisor-shell { grid-template-columns: 1fr; }
  .advisor-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }
  .advisor-nav-label { display: none; }
  .advisor-main { padding: 20px; }
  h1 { font-size: 26px; }
}
