/* ============================================================
   SALARY TRACKER FY 2026-27 - MAIN STYLESHEET
   Theme: Dark Professional with Gold Accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #111827;
  --bg-card:       #161d2e;
  --bg-card-hover: #1c2540;
  --bg-input:      #1a2135;
  --border:        #243050;
  --border-light:  #2e3e60;

  --text-primary:  #e8edf8;
  --text-secondary:#8a9bc4;
  --text-muted:    #4a5a80;

  --gold:          #f0c060;
  --gold-light:    #f7d98a;
  --gold-dark:     #c89a30;
  --gold-glow:     rgba(240,192,96,0.15);

  --green:         #34d399;
  --green-bg:      rgba(52,211,153,0.1);
  --red:           #f87171;
  --red-bg:        rgba(248,113,113,0.1);
  --blue:          #60a5fa;
  --blue-bg:       rgba(96,165,250,0.1);
  --purple:        #a78bfa;
  --purple-bg:     rgba(167,139,250,0.1);

  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold:   0 0 30px rgba(240,192,96,0.2);
  --transition:    0.25s ease;

  --font-display:  'Sora', sans-serif;
  --font-body:     'DM Sans', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ── LINKS ── */
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(240,192,96,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(96,165,250,0.06) 0%, transparent 60%),
    var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease forwards;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-gold);
}
.auth-logo h1 { font-size: 1.6rem; color: var(--text-primary); }
.auth-logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-card); }

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ── SECTION DIVIDER ── */
.form-section-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none; border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600; font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #111;
  box-shadow: 0 4px 16px rgba(240,192,96,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(240,192,96,0.45);
  color: #111;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: var(--red-bg);
  border: 1px solid var(--red);
  color: var(--red);
}
.btn-danger:hover { background: var(--red); color: white; }

.btn-success {
  background: var(--green-bg);
  border: 1px solid var(--green);
  color: var(--green);
}
.btn-success:hover { background: var(--green); color: #111; }

.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
.alert-danger  { background: var(--red-bg);   border: 1px solid var(--red);   color: var(--red); }
.alert-warning { background: rgba(251,191,36,0.1); border: 1px solid #fbbf24; color: #fbbf24; }
.alert-info    { background: var(--blue-bg);  border: 1px solid var(--blue);  color: var(--blue); }

/* ============================================================
   LAYOUT / SIDEBAR
   ============================================================ */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 8px;
}
.sidebar-brand h2 { font-size: 1.05rem; color: var(--text-primary); }
.sidebar-brand span { font-size: 0.75rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-label {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500;
  margin-bottom: 2px;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-item.active { background: var(--gold-glow); color: var(--gold); border: 1px solid rgba(240,192,96,0.2); }
.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.user-pill .avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #111;
  flex-shrink: 0;
}
.user-pill .user-info { overflow: hidden; }
.user-pill .user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill .user-role { font-size: 0.72rem; color: var(--text-muted); text-transform: capitalize; }

/* Main content */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 32px;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.gold::before   { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--green), #6ee7b7); }
.stat-card.blue::before   { background: linear-gradient(90deg, var(--blue), #93c5fd); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #c4b5fd); }

.stat-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.stat-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text-primary); }
.stat-value.gold   { color: var(--gold); }
.stat-value.green  { color: var(--green); }
.stat-value.blue   { color: var(--blue); }
.stat-value.purple { color: var(--purple); }
.stat-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; }
.stat-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; opacity: 0.12; }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ── PROGRESS BAR ── */
.progress-wrap { margin: 12px 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 6px; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.green  { background: linear-gradient(90deg, var(--green), #6ee7b7); }
.progress-fill.blue   { background: linear-gradient(90deg, var(--blue), #93c5fd); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #c4b5fd); }
.progress-fill.red    { background: linear-gradient(90deg, var(--red), #fca5a5); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  padding: 12px 16px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
tbody tr:hover { background: var(--bg-card-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.72rem; font-weight: 600;
  text-transform: capitalize;
}
.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-red    { background: var(--red-bg);    color: var(--red); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue); }
.badge-gold   { background: var(--gold-glow); color: var(--gold); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-grey   { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

/* ── 3X GROWTH BOX ── */
.growth-box {
  background: linear-gradient(135deg, rgba(240,192,96,0.1), rgba(240,192,96,0.03));
  border: 1px solid rgba(240,192,96,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.growth-box::after {
  content: '3×';
  position: absolute;
  right: -10px; bottom: -20px;
  font-size: 9rem; font-weight: 900;
  color: rgba(240,192,96,0.05);
  font-family: var(--font-display);
  line-height: 1;
}
.growth-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 700; }
.growth-value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: var(--gold-light); margin: 8px 0; }
.growth-sub   { font-size: 0.85rem; color: var(--text-secondary); }

/* ── GOAL ITEM ── */
.goal-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.goal-item:hover { border-color: var(--border-light); }
.goal-title { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.goal-meta  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }

/* ── MOBILE HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; }

/* ── OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding: 20px 16px; }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .growth-value { font-size: 2rem; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.fade-up { animation: fadeUp 0.4s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* Chart container */
.chart-container { position: relative; height: 260px; }

/* Salary breakdown grid */
.breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.breakdown-item { background: var(--bg-input); border-radius: var(--radius-sm); padding: 12px 14px; }
.breakdown-item .bi-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.breakdown-item .bi-value { font-weight: 700; color: var(--text-primary); }
@media (max-width: 480px) { .breakdown-grid { grid-template-columns: 1fr; } }

/* Steps indicator */
.steps { display: flex; margin-bottom: 32px; }
.step { flex: 1; text-align: center; position: relative; }
.step + .step::before {
  content: '';
  position: absolute; top: 16px; left: -50%;
  width: 100%; height: 2px;
  background: var(--border);
}
.step.done + .step::before { background: var(--gold); }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  position: relative; z-index: 1;
  background: var(--bg-card);
}
.step.active .step-num { border-color: var(--gold); color: var(--gold); }
.step.done   .step-num { border-color: var(--gold); background: var(--gold); color: #111; }
.step-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }
.step.active .step-label { color: var(--gold); }

/* Notification bell badge */
.notif-badge {
  position: relative;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
}
.notif-badge .dot {
  position: absolute; top: 0; right: 0;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}
