@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #0b0908;
  --bg-card:   #161520;
  --bg-input:  #1e1d2b;
  --gold:      #c9a84c;
  --gold-dim:  #8a6f2e;
  --white:     #f5f3ef;
  --muted:     #7a7888;
  --border:    #2a2838;
  --red:       #c0392b;
}

html, body { height: 100%; background: var(--bg); color: var(--white); font-family: 'Inter', sans-serif; }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 28px;
  height: 28px;
}

.logo-mark span {
  background: var(--gold);
  border-radius: 2px;
}

.logo-mark span:last-child {
  grid-column: 1 / -1;
  height: 8px;
}

.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.btn-portal {
  background: var(--gold);
  color: #0b0908;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-portal:hover { background: #e0bc62; }

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 60px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 50% at 30% 50%, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 620px; }

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1.0;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.hero-headline em {
  font-style: italic;
  font-weight: 400;
  color: rgba(245,243,239,0.35);
}

.hero-sub {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 300px;
  margin-bottom: 48px;
  margin-top: 28px;
}

.hero-actions { display: flex; gap: 16px; align-items: center; }

.btn-primary {
  background: var(--gold);
  color: #0b0908;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.btn-primary:hover { background: #e0bc62; }

.btn-outline {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 100px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
  display: inline-block;
}

.btn-outline:hover { border-color: var(--muted); color: var(--white); }

/* ── LOGIN PAGE ──────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201,168,76,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}

.tier-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 2px;
}

.tier-tab {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  border: none;
  background: transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.tier-tab.active {
  background: var(--bg-card);
  color: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.tier-tab svg { width: 13px; height: 13px; opacity: 0.7; }

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--white);
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}

.form-input::placeholder { color: var(--muted); }
.form-input:focus { border-color: var(--gold-dim); }

.login-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn-cancel {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-cancel:hover { border-color: var(--muted); color: var(--white); }

.btn-signin {
  flex: 2;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  color: #0b0908;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-signin:hover { background: #e0bc62; }

/* ── DASHBOARD ───────────────────────────────────────────────────────────── */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 28px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 32px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-nav { padding: 20px 12px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 2px;
  cursor: pointer;
}

.nav-item:hover, .nav-item.active {
  background: rgba(201,168,76,0.08);
  color: var(--white);
}

.nav-item.active { color: var(--gold); }

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 20px 24px 0;
  border-top: 1px solid var(--border);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role { font-size: 11px; color: var(--muted); }

.main-content {
  flex: 1;
  padding: 40px 48px;
  overflow-y: auto;
}

.page-header { margin-bottom: 36px; }

.page-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; }

.page-sub { font-size: 13px; color: var(--muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.stat-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }

.stat-value { font-size: 32px; font-weight: 700; color: var(--white); }

.stat-value.gold { color: var(--gold); }

.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.placeholder-rows { display: flex; flex-direction: column; gap: 12px; }

.placeholder-row {
  height: 44px;
  background: var(--bg-input);
  border-radius: 8px;
  opacity: 0.5;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.tier-badge.admin    { background: rgba(201,168,76,0.15); color: var(--gold); }
.tier-badge.manager  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.tier-badge.rep      { background: rgba(34,197,94,0.15);  color: #4ade80; }
.tier-badge.office   { background: rgba(168,85,247,0.15); color: #c084fc; }

.progress-bar-wrap { background: var(--bg-input); border-radius: 100px; height: 8px; overflow: hidden; margin-top: 8px; }
.progress-bar-fill { height: 100%; border-radius: 100px; background: var(--gold); transition: width 0.4s; }

/* ── HAMBURGER ───────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--white); }
.mobile-menu .btn-portal { font-size: 14px; margin-top: 8px; }

/* ── BOTTOM NAV (mobile dashboards) ─────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 16px;
  cursor: pointer;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item.active { color: var(--gold); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  nav { padding: 24px 32px; }
  .hero { padding: 100px 32px 60px; }
  .main-content { padding: 32px 28px; }
  .sidebar { width: 200px; }
}

/* Mobile */
@media (max-width: 768px) {
  /* Nav */
  nav { padding: 20px 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero { padding: 100px 24px 60px; }
  .hero-headline { font-size: clamp(42px, 11vw, 64px); }
  .hero-sub { max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-primary, .btn-outline { width: 100%; text-align: center; }

  /* Login */
  .login-page { align-items: flex-end; padding: 0; }
  .login-card {
    border-radius: 20px 20px 0 0;
    padding: 36px 24px 40px;
    max-width: 100%;
    border-bottom: none;
  }
  .tier-tab svg { display: none; }
  .tier-tab { font-size: 11px; padding: 8px 4px; }

  /* Dashboard */
  .sidebar { display: none; }
  .bottom-nav { display: block; }
  .main-content {
    padding: 24px 16px 100px;
    width: 100%;
  }
  .page-title { font-size: 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 26px; }
  .section-card { padding: 20px; }
}

/* Small mobile */
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 40px; }
}
