/* ROHIT UNIVERSE — design tokens
   Signature: a "constellation" gold hairline that traces through card headers,
   echoing the BDS navy/gold brand system, but reworked for a data dashboard. */

:root {
  --navy-950: #0B1220;
  --navy-900: #101A30;
  --navy-800: #16233F;
  --navy-700: #1F2E4D;
  --gold-500: #C9A94F;
  --gold-400: #DCC078;
  --gold-100: #F5EFDD;
  --ink: #E9ECF3;
  --ink-dim: #9AA5BD;
  --line: rgba(255,255,255,0.08);
  --danger: #E1665C;
  --success: #6FBF8B;
  --radius: 14px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --navy-950: #F7F5EF;
  --navy-900: #FFFFFF;
  --navy-800: #FFFFFF;
  --navy-700: #F0EDE3;
  --ink: #1B2333;
  --ink-dim: #6B7280;
  --line: rgba(20,20,30,0.08);
  --shadow: 0 8px 24px rgba(20,20,40,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy-950);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, .font-display { font-family: var(--font-display); }

a { color: inherit; }

/* ===== Layout shell ===== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--navy-900);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 34px;
  padding-left: 6px;
}
.sidebar-brand span { display: block; color: var(--gold-500); font-size: 12px; letter-spacing: 4px; font-weight: 500; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav a .nav-ic { color: var(--gold-500); font-size: 13px; width: 16px; text-align: center; }
.sidebar-nav a:hover { background: var(--navy-700); color: var(--ink); }
.sidebar-nav a.active { background: linear-gradient(90deg, rgba(201,169,79,0.16), transparent); color: var(--ink); box-shadow: inset 3px 0 0 var(--gold-500); }

.sidebar-footer { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.theme-toggle {
  background: var(--navy-700); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 12px; border-radius: 10px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.logout-link { font-size: 13px; color: var(--ink-dim); text-decoration: none; padding-left: 12px; }
.logout-link:hover { color: var(--danger); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--navy-950); z-index: 5;
}
.topbar h1 { font-size: 22px; margin: 0; flex: 1; font-weight: 600; }
.topbar-date { color: var(--ink-dim); font-size: 13px; }
.hamburger { display: none; background: none; border: none; color: var(--ink); font-size: 20px; cursor: pointer; }

.content { padding: 28px 30px 60px; max-width: 1180px; }

/* ===== Cards & grid ===== */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.card-header::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 46px; height: 2px; background: var(--gold-500);
}
.card-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-header .meta { font-size: 12px; color: var(--ink-dim); }

/* ===== Goal progress meters ===== */
.goal-row { margin-bottom: 18px; }
.goal-row:last-child { margin-bottom: 0; }
.goal-row .goal-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.goal-row .goal-title { font-weight: 600; }
.goal-row .goal-pct { color: var(--gold-500); font-weight: 700; }
.meter { height: 8px; border-radius: 6px; background: var(--navy-700); overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); border-radius: 6px; transition: width 0.4s ease; }
.goal-sub { font-size: 12px; color: var(--ink-dim); margin-top: 5px; }

/* ===== Company cards ===== */
.company-card { border-left: 4px solid var(--gold-500); }
.company-card .slot { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--navy-700); color: var(--ink-dim); margin-top: 4px; }
.task-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: var(--navy-800); font-size: 13.5px; }
.task-item.done { opacity: 0.5; text-decoration: line-through; }
.task-item input[type="checkbox"] { accent-color: var(--gold-500); width: 16px; height: 16px; }
.task-item .badge { margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.badge.high { background: rgba(225,102,92,0.15); color: var(--danger); }
.badge.medium { background: rgba(201,169,79,0.15); color: var(--gold-500); }
.badge.low { background: rgba(111,191,139,0.15); color: var(--success); }

/* ===== Forms ===== */
label { display: block; font-size: 12.5px; color: var(--ink-dim); margin: 14px 0 6px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--navy-800); color: var(--ink);
  font-size: 14px; font-family: var(--font-body);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-500); outline-offset: 1px; }

.btn-primary {
  margin-top: 20px; width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: #1B1508; font-weight: 700; font-size: 14.5px; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy-700); color: var(--ink); font-size: 13.5px; cursor: pointer;
}
.btn-small { padding: 6px 12px; font-size: 12.5px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { flex: 1; min-width: 140px; }
.inline-form label { margin-top: 0; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; color: var(--ink-dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 10px; border-bottom: 1px solid var(--line); }
table.data-table tr:last-child td { border-bottom: none; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.pill.income { background: rgba(111,191,139,0.15); color: var(--success); }
.pill.expense { background: rgba(225,102,92,0.15); color: var(--danger); }

.stat-num { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.stat-label { font-size: 12.5px; color: var(--ink-dim); margin-top: 3px; }

.alert-error { background: rgba(225,102,92,0.12); color: var(--danger); padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: rgba(111,191,139,0.12); color: var(--success); padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }

/* ===== Auth pages ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy-950); }
.auth-card { width: 100%; max-width: 380px; background: var(--navy-900); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow); }
.auth-brand { font-family: var(--font-display); font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-brand span { color: var(--gold-500); display: block; font-size: 11px; letter-spacing: 4px; margin-top: 2px; }
.auth-sub { text-align: center; color: var(--ink-dim); font-size: 13px; margin: 10px 0 6px; }
.auth-tabs { display: flex; gap: 8px; margin: 18px 0 4px; }
.tab-btn { flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--navy-700); color: var(--ink-dim); cursor: pointer; font-size: 13px; }
.tab-btn.active { background: var(--gold-500); color: #1B1508; font-weight: 700; border-color: var(--gold-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.auth-link { display: block; text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-dim); text-decoration: none; }
.auth-link:hover { color: var(--gold-500); }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .sidebar {
    position: fixed; left: -260px; top: 0; z-index: 40; transition: left 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { left: 0; }
  .hamburger { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 16px 16px; }
  .topbar h1 { font-size: 18px; }
  .topbar-date { display: none; }
}
