/* =============================================
   KAMI BOT CRM - Professional Design System cac2
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #08080f;
  --bg-surface: #111122;
  --bg-card: #151528;
  --bg-hover: #1a1a35;
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --primary: #a855f7;
  --primary-dark: #7c3aed;
  --primary-glow: rgba(168, 85, 247, 0.3);
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.3);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 140px;
  --header-h: 64px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
code {
  background: rgba(255,255,255,0.06); padding: 2px 8px;
  border-radius: 4px; font-size: 0.85em; font-family: 'Consolas', monospace;
  color: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ======= LAYOUT ======= */
.app-container { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); min-height: 100vh; position: fixed; top: 0; left: 0; bottom: 0;
  background: rgba(12, 12, 30, 0.95); backdrop-filter: blur(20px);
  border-right: 1px solid var(--border); z-index: 100;
  display: flex; flex-direction: column; padding: 20px 0;
}
.main-wrapper { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.main-wrapper.full { margin-left: 0; }

/* ======= SIDEBAR ======= */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 0 20px 20px;
  border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.sidebar-logo {
  width: 40px; height: 40px; border-radius: 10px; overflow: hidden;
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-title { font-weight: 700; font-size: 1.05em; letter-spacing: -0.3px; }
.sidebar-title span { color: var(--accent); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 12px; }
.nav-section { margin-bottom: 20px; }
.nav-section-label {
  font-size: 0.65em; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1px; padding: 6px 8px 4px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  transition: var(--transition); font-weight: 500; font-size: 0.82em;
  position: relative; margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--bg-hover); color: var(--text); text-decoration: none;
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(6,182,212,0.08));
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--primary);
}
.nav-item.active::before {
  content: ''; position: absolute; top: 50%; left: -2px; transform: translateY(-50%);
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}
.nav-icon { font-size: 1.15em; width: 22px; text-align: center; }

.sidebar-footer { padding: 12px 20px; border-top: 1px solid var(--border); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-weight: 600; font-size: 0.85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.7em; color: var(--text-muted); }
.logout-link { display: block; padding: 6px 4px; color: var(--text-muted); border-radius: var(--radius-sm); font-size: 0.7em; margin-top: 6px; transition: var(--transition); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.logout-link:hover { color: var(--danger); background: rgba(239,68,68,0.08); text-decoration: none; }

/* ======= HEADER ======= */
.header {
  height: var(--header-h); display: flex; align-items: center; padding: 0 28px;
  background: rgba(12, 12, 30, 0.8); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.header-title { font-size: 1.15em; font-weight: 600; }
.header-title span { color: var(--primary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ======= PAGE CONTENT ======= */
.page-content { padding: 28px; flex: 1; }

/* ======= LANDING PAGE ======= */
.landing-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(168,85,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(6,182,212,0.08) 0%, transparent 60%),
    var(--bg-deep);
  position: relative; overflow: hidden;
}
.landing-page::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5; pointer-events: none;
}
.landing-content { position: relative; text-align: center; padding: 40px; max-width: 520px; }
.landing-badge {
  display: inline-block; padding: 6px 16px; border-radius: 50px;
  background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.2);
  color: var(--primary); font-size: 0.8em; font-weight: 600;
  letter-spacing: 1px; margin-bottom: 24px;
}
.landing-logo {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border-radius: 20px; overflow: hidden;
}
.landing-title {
  font-size: 2.6em; font-weight: 900; letter-spacing: 6px; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.landing-subtitle { color: var(--text-secondary); font-size: 1.05em; margin-bottom: 12px; }
.landing-desc { color: var(--text-muted); font-size: 0.9em; line-height: 1.7; margin-bottom: 32px; }

.btn-discord {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 36px;
  background: #5865F2; color: white; border-radius: 50px; font-size: 1.05em;
  font-weight: 600; transition: var(--transition); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(88,101,242,0.3);
}
.btn-discord:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(88,101,242,0.4);
  text-decoration: none; color: white;
}

.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.landing-feat { padding: 14px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.03); text-align: center; }
.landing-feat-icon { font-size: 1.5em; margin-bottom: 6px; }
.landing-feat-label { font-size: 0.8em; color: var(--text-secondary); font-weight: 500; }

/* ======= CARDS ======= */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 0.95em; font-weight: 600; }
.card-body { padding: 20px; }

/* ======= PROFILE HEADER ======= */
.profile-header {
  display: flex; align-items: center; gap: 16px; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 24px;
}
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--primary); object-fit: cover; }
.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 2px solid rgba(1,118,211,0.20);
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(11,31,53,0.10);
}
.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0176d3, #00a1e0);
  color: #fff;
  font-size: 2em;
}
.profile-info { flex: 1; }
.profile-info h2 { font-size: 1.3em; font-weight: 700; }
.profile-info p { color: var(--text-muted); font-size: 0.85em; margin-top: 2px; }
.rank-big {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.9em; gap: 2px;
}
.dashboard-profile {
  display: flex;
  align-items: center;
  gap: 18px;
}
.dashboard-profile-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dashboard-hero {
  align-items: center;
}
.dashboard-profile .hero-title {
  margin-bottom: 6px;
}
.dashboard-profile .hero-meta {
  margin-top: 8px;
}

/* ======= TABS ======= */
.tab-nav {
  display: flex; gap: 4px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px; margin-bottom: 20px;
}
.tab-btn {
  flex: 1; padding: 10px 16px; border: none; background: transparent;
  color: var(--text-secondary); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 0.88em; font-weight: 500; transition: var(--transition);
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(6,182,212,0.1));
  color: var(--text); font-weight: 600;
  box-shadow: 0 0 12px rgba(168,85,247,0.1);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeUp 0.35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ======= HERO CARDS SLIDER ======= */
.cards-slider { margin-bottom: 20px; overflow: hidden; border-radius: var(--radius); }
.cards-track { display: flex; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.hero-card {
  min-width: 100%; padding: 36px 28px; border-radius: var(--radius);
  text-align: center; color: white;
}
.hero-card-icon { font-size: 2.8em; margin-bottom: 10px; }
.hero-card-title { font-size: 1.6em; font-weight: 800; margin-bottom: 6px; }
.hero-card-sub { font-size: 0.9em; opacity: 0.85; }
.cards-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.15); cursor: pointer; transition: var(--transition);
}
.dot.active { background: var(--primary); width: 24px; border-radius: 4px; box-shadow: 0 0 8px var(--primary-glow); }

/* ======= PRIVILEGES ======= */
.privilege-section { margin-bottom: 20px; }
.privilege-section h3 { font-size: 0.95em; margin-bottom: 12px; }
.privilege-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.priv-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: var(--transition);
}
.priv-card:hover { border-color: var(--primary); box-shadow: 0 0 16px rgba(168,85,247,0.08); }
.priv-icon { font-size: 2em; margin-bottom: 10px; }
.priv-title { font-weight: 600; margin-bottom: 6px; }
.priv-desc { color: var(--text-muted); font-size: 0.83em; }

/* ======= QUICK STATS ======= */
.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.qstat {
  text-align: center; padding: 18px 10px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); transition: var(--transition);
}
.qstat:hover { border-color: var(--border-light); transform: translateY(-1px); }
.qstat-value { font-size: 1.4em; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.qstat-label { color: var(--text-muted); font-size: 0.72em; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* ======= KEY CARDS ======= */
.key-list { display: flex; flex-direction: column; gap: 8px; }
.key-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; transition: var(--transition);
}
.key-card.active { border-left: 3px solid var(--success); }
.key-card.expired { border-left: 3px solid var(--text-muted); opacity: 0.6; }
.key-status { font-size: 0.8em; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-active { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.dot-expired { background: var(--text-muted); }
.key-card.active .key-status { color: var(--success); }
.key-card.expired .key-status { color: var(--text-muted); }
.key-code { font-size: 0.95em; font-weight: 600; margin-bottom: 0; color: var(--text); }
.key-dates { display: flex; gap: 8px; color: var(--text-secondary); font-size: 0.8em; margin-bottom: 0; align-items: center; }
.key-meta { display: flex; justify-content: space-between; font-size: 0.85em; color: var(--text-muted); }
.key-bonus { color: var(--warning); font-weight: 500; }
.key-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.key-status-inline { font-size: 0.78em; font-weight: 500; }
.status-active { color: var(--success); }
.status-expired { color: var(--text-muted); }
.key-days { color: var(--text-muted); font-size: 0.82em; }
.key-activated { color: var(--text-muted); font-size: 0.75em; margin-top: 2px; }

/* ======= YEAR TABS ======= */
.year-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.year-tab {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-size: 0.85em; font-family: inherit; transition: var(--transition);
}
.year-tab:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.year-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ======= EMPTY STATE ======= */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3.5em; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 1.1em; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

/* ======= FORMS ======= */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; color: var(--text-secondary); margin-bottom: 6px;
  font-size: 0.85em; font-weight: 500;
}
.form-group small { display: block; color: var(--text-muted); margin-top: 6px; font-size: 0.8em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.92em; font-family: inherit;
  transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.form-group input::placeholder { color: var(--text-muted); }

/* ======= BUTTONS ======= */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
  border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; border: none;
  font-size: 0.9em; font-family: inherit; transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.btn-warning:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35); }
.btn-sm { padding: 6px 12px; font-size: 0.82em; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; font-weight: 500; }
.btn-edit { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.btn-edit:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ======= SEARCH ======= */
.search-box {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px;
}
.search-box input, .search-box select {
  padding: 10px 14px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.9em; font-family: inherit; outline: none;
  transition: var(--transition);
}
.search-box input { flex: 1; min-width: 220px; }
.search-box input:focus, .search-box select:focus { border-color: var(--primary); }
.search-box select { min-width: 140px; }

/* ======= DATA TABLES ======= */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88em; }
.data-table thead th {
  text-align: left; padding: 12px 16px; background: rgba(255,255,255,0.02);
  color: var(--text-muted); font-weight: 600; font-size: 0.75em;
  text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr:hover td { color: var(--text); }
.table-responsive { overflow-x: auto; border-radius: var(--radius); }

/* ======= STAT CARDS (ADMIN) ======= */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; transition: var(--transition);
  display: flex; align-items: center; gap: 14px;
}
.stat-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 1.3em;
}
.stat-icon.purple { background: rgba(168,85,247,0.15); }
.stat-icon.cyan { background: rgba(6,182,212,0.15); }
.stat-icon.green { background: rgba(34,197,94,0.15); }
.stat-icon.amber { background: rgba(245,158,11,0.15); }
.stat-content { flex: 1; }
.stat-label { font-size: 0.72em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 1.5em; font-weight: 700; }
.stat-sub { font-size: 0.8em; color: var(--text-secondary); margin-top: 4px; }

/* ======= BADGES ======= */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78em; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-info { background: rgba(6,182,212,0.12); color: var(--accent); }

.rank-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: 0.83em; font-weight: 600;
}
.rank-silver { background: rgba(148,163,184,0.1); color: var(--text-secondary); }
.rank-gold { background: rgba(245,158,11,0.12); color: var(--warning); }
.rank-diamond { background: rgba(6,182,212,0.12); color: var(--accent); }

/* ======= ALERTS ======= */
.alert {
  padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-weight: 500; font-size: 0.9em; display: flex; align-items: center; gap: 8px;
}
.alert-success {
  background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2);
  color: var(--success);
}
.alert-error {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
}

/* ======= MODAL ======= */
.modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.75); justify-content: center; align-items: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; max-width: 380px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-close { float: right; font-size: 1.5em; cursor: pointer; color: var(--text-muted); background: none; border: none; }
.modal-close:hover { color: var(--text); }
.modal h3 { margin-bottom: 14px; font-size: 1em; }
.modal .form-group { margin-bottom: 12px; }
.modal .btn { padding: 8px 16px; font-size: 0.85em; }

/* ======= PAGE HEADER ======= */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 1.4em; font-weight: 700; }
.page-header h2 span { color: var(--primary); }

/* ======= API LIST ======= */
.api-list { display: flex; flex-direction: column; gap: 6px; }
.api-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); font-size: 0.88em; }

/* ======= ADMIN LIST ======= */
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); font-size: 0.88em; border: 1px solid rgba(255,255,255,0.06); }
.admin-row code { background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 4px; }
.api-method {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 0.7em; font-weight: 700; min-width: 44px; text-align: center;
  font-family: 'Consolas', monospace;
}
.api-method.get { background: rgba(6,182,212,0.15); color: var(--accent); }
.api-method.post { background: rgba(34,197,94,0.15); color: var(--success); }
.api-desc { color: var(--text-muted); font-size: 0.85em; margin-left: auto; }

/* ======= ERROR PAGE ======= */
.error-page { text-align: center; padding: 80px 20px; }
.error-code {
  font-size: 7em; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.error-page h2 { margin: 16px 0; font-size: 1.4em; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }

/* ======= SETTINGS ======= */
.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-size: 1em; font-weight: 600; margin-bottom: 12px; color: var(--text); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid.full { grid-template-columns: 1fr; }

/* ======= RESPONSIVE - MOBILE FIRST ======= */

/* ---- Tablet (≤1120px) ---- */
@media (max-width: 1120px) {
  .landing-card,
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-panel { min-width: 0; }
}

.mobile-only { display: none; }

/* ---- Small Tablet (≤960px) ---- */
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%); transition: transform 0.25s ease;
    z-index: 300; box-shadow: 0 18px 42px rgba(11,31,53,0.16);
  }
  .sidebar.is-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .mobile-only { display: inline-flex; }
  .header { padding: 0 18px; box-shadow: 0 8px 20px rgba(11,31,53,0.06); }
  .page-content { padding: 18px; }
  .profile-header,
  .page-header,
  .page-hero { flex-direction: column; align-items: flex-start; }
  .landing-copy { padding: 28px 22px; }
  .landing-side { padding: 22px; }
}

/* ---- Phone (≤720px) ---- */
@media (max-width: 720px) {
  .landing-features,
  .hero-panel-grid,
  .stats-grid,
  .metric-grid,
  .quick-stats,
  .privilege-cards,
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .landing-card { border-radius: 20px; }
  .landing-actions,
  .search-box,
  .hero-meta { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box input,
  .search-box select { min-width: 0; width: 100%; }
  .api-item { grid-template-columns: 1fr; }
  .page-content { padding: 14px; }
  .page-shell { gap: 14px; }
}

/* ---- Small Phone (≤480px) ---- */
@media (max-width: 480px) {
  :root { --sidebar-w: 100vw; --radius-lg: 12px; --radius: 10px; }

  body { font-size: 14px; }

  /* Sidebar full-screen overlay on mobile */
  .sidebar {
    width: 85vw;
    padding: 14px 10px 12px;
    z-index: 350;
  }

  .main-wrapper { margin-left: 0; }
  .page-content { padding: 10px; }
  .header { padding: 0 10px; height: 48px; }

  /* Hero → stack vertically */
  .page-hero { flex-direction: column; gap: 12px; padding: 14px; }
  .dashboard-profile { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dashboard-profile img,
  .profile-avatar-lg { width: 48px; height: 48px; }
  .hero-title { font-size: 1.2em; }
  .hero-meta { flex-wrap: wrap; gap: 6px; }
  .hero-meta .pill { font-size: 0.72em; padding: 4px 10px; }

  /* Panels */
  .hero-panel { padding: 14px; }
  .hero-panel-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-panel-card { padding: 14px 12px; }
  .hero-panel-value { font-size: 1.4em; }
  .hero-panel-label { font-size: 0.68em; }

  /* All grids → 1 column */
  .dashboard-grid,
  .stats-grid,
  .metric-grid,
  .quick-stats,
  .privilege-cards,
  .settings-grid,
  .landing-features { grid-template-columns: 1fr; }

  /* Tables → horizontal scroll */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; font-size: 0.78em; }
  .data-table th,
  .data-table td { padding: 8px 6px; }

  /* Section cards */
  .section { border-radius: var(--radius); }
  .section-head { padding: 12px 14px; flex-direction: column; gap: 6px; }
  .section-body { padding: 12px 14px; }
  .section-kicker { font-size: 0.68em; }
  .section h3 { font-size: 0.95em; }

  /* Key cards */
  .key-card { padding: 10px 12px; }
  .key-row { flex-wrap: wrap; gap: 6px; }
  .key-code { font-size: 0.85em; }
  .key-dates { font-size: 0.72em; flex-wrap: wrap; }
  .key-status-inline { font-size: 0.7em; }

  /* Forms */
  .form-group input,
  .form-group select,
  .form-group textarea { padding: 10px 12px; font-size: 0.9em; }
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-discord,
  .btn-warning,
  .btn-danger { padding: 10px 18px; font-size: 0.88em; width: 100%; }

  /* Landing page */
  .landing-page { padding: 16px; }
  .landing-card-compact { padding: 28px 18px; }
  .landing-logo { width: 64px; height: 64px; }
  .landing-logo-large { width: 72px; height: 72px; }
  .btn-discord-compact { padding: 14px 16px; font-size: 0.85em; }

  /* Modal */
  .modal-content { width: 92%; padding: 16px; border-radius: 16px; }

  /* Admin detail page */
  .page-header { flex-direction: column; gap: 8px; }
  .page-header h2 { font-size: 1.1em; }

  /* Info rows */
  .info-row { font-size: 0.85em; }

  /* Year tabs */
  .year-tabs { gap: 4px; }
  .year-tab { padding: 5px 10px; font-size: 0.75em; }

  /* Badge row */
  .badge-row { flex-wrap: wrap; gap: 4px; }
  .badge { font-size: 0.72em; padding: 4px 8px; }

  /* Rank badge */
  .rank-badge { font-size: 0.75em; padding: 3px 8px; }

  /* Empty state */
  .empty-state { padding: 24px 14px; }
  .empty-icon { font-size: 2em; }
  .empty-title { font-size: 0.95em; }

  /* Footer sidebar */
  .sidebar-footer { padding: 8px; }
  .logout-link { font-size: 0.68em; padding: 6px 8px; }

  /* Nav */
  .nav-item { padding: 8px 10px; font-size: 0.78em; gap: 6px; }
  .nav-section-label { font-size: 0.6em; padding: 4px 6px; }

  /* Alert */
  .alert { padding: 10px 14px; font-size: 0.85em; }

  /* Admin list */
  .admin-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-row code { font-size: 0.72em; }
}

/* ---- Very Small (≤360px) ---- */
@media (max-width: 360px) {
  .hero-panel-grid { grid-template-columns: 1fr; }
  .data-table { min-width: 480px; font-size: 0.72em; }
  .key-code { font-size: 0.78em; word-break: break-all; }
  .landing-card-compact { padding: 22px 12px; }
  .landing-logo { width: 56px; height: 56px; }
  .btn-discord-compact { padding: 12px 16px; font-size: 0.82em; }
}

/* ======= NEW UI LAYER ======= */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Manrope', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 138, 61, 0.16), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(85, 207, 230, 0.12), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #08111d 42%, #050b14 100%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.45), transparent 85%);
  opacity: 0.7;
}
.sidebar {
  width: 140px;
  padding: 14px 8px 12px;
  background: linear-gradient(180deg, rgba(8, 15, 28, 0.96), rgba(9, 16, 31, 0.88));
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.08);
}
.sidebar.is-open { transform: translateX(0); }
.sidebar-brand { margin-bottom: 14px; padding: 10px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.03); display: flex; justify-content: flex-start; }
.sidebar-logo { border-radius: 12px; }
.sidebar-title { font-weight: 800; }
.sidebar-subtitle { color: #7f8da9; font-size: 0.8em; margin-top: 2px; }
.nav-section-label { letter-spacing: 0.18em; }
.nav-item { border-radius: 16px; font-weight: 600; }
.nav-item.active { background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), rgba(85, 207, 230, 0.1)); }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-avatar { border: 2px solid rgba(255, 138, 61, 0.55); }
.sidebar-note { margin-top: 12px; padding: 12px 14px; border-radius: 18px; color: #b8c3d9; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); }
.logout-link { border-radius: 16px; }
.header {
  height: 76px;
  gap: 16px;
  padding: 0 28px;
  background: rgba(8, 15, 28, 0.78);
  backdrop-filter: blur(22px);
}
.header-copy { display: flex; flex-direction: column; gap: 2px; }
.header-eyebrow { color: #7f8da9; font-size: 0.72em; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }
.header-title { font-size: 1.15em; font-weight: 800; letter-spacing: -0.02em; }
.header-title span { color: #55cfe6; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: #b8c3d9; }
.user-chip-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.icon-button { width: 42px; height: 42px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.04); color: #eef4ff; }
.page-content { padding: 28px; }
.page-shell { display: grid; gap: 22px; }
.page-header,
.page-hero,
.section,
.landing-card,
.modal-content {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(16, 28, 48, 0.92);
  box-shadow: 0 14px 40px rgba(0,0,0,0.24);
}
.landing-card {
  background: linear-gradient(180deg, rgba(22, 40, 68, 0.96), rgba(16, 28, 48, 0.94));
  border: 1px solid rgba(255,255,255,0.12);
}
.page-header,
.page-hero { display: flex; align-items: center; gap: 24px; padding: 22px; }
.page-header h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 800; }
.page-header span { color: #55cfe6; }
.page-lead { color: #b8c3d9; }
.pill,
.landing-tag,
.badge,
.rank-badge { border-radius: 999px; padding: 7px 12px; font-weight: 700; }
.pill,
.landing-tag { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); color: #b8c3d9; }
.hero-copy { flex: 0 0 auto; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3.3rem); line-height: 0.96; margin-bottom: 12px; font-weight: 900; }
.hero-title span { color: #55cfe6; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-panel { padding: 16px 18px; border-radius: 22px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); flex: 1 1 0; min-width: 0; }
.hero-panel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hero-panel-card { padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(1,118,211,0.12), rgba(0,161,224,0.08)); border: 1px solid rgba(1,118,211,0.12); }
.hero-panel-value { font-size: 1.5em; font-weight: 900; margin-bottom: 4px; background: linear-gradient(135deg, #60a5fa, #38bdf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-panel-label { color: #93c5fd; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.section-head,
.card-header { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.section-body,
.card-body { padding: 20px; }
.section-kicker { color: #7f8da9; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72em; font-weight: 800; }
.metric-grid,
.stats-grid,
.privilege-cards,
.quick-stats,
.settings-grid { display: grid; gap: 16px; }
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.metric-card,
.stat-card,
.summary-card,
.qstat,
.priv-card,
.key-card,
.api-item { border-radius: 22px; border: 1px solid rgba(255,255,255,0.08); background: rgba(16, 28, 48, 0.92); }
.metric-card { padding: 18px; }
.metric-label,
.stat-label,
.qstat-label,
.api-method { color: #7f8da9; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72em; font-weight: 800; }
.metric-value,
.stat-value,
.qstat-value { font-weight: 900; letter-spacing: -0.03em; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 20px; }
.stat-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,0.04); }
.profile-header { display: flex; justify-content: space-between; gap: 18px; padding: 22px; border-radius: 28px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.profile-avatar { width: 64px; height: 64px; border-radius: 22px; border: 2px solid rgba(255,138,61,0.45); }
.profile-info h2 { font-size: 1.5em; font-weight: 900; }
.profile-info p { color: #7f8da9; }
.rank-big { display: inline-flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 22px; font-weight: 800; color: #fff; }
.rank-badge.rank-silver { background: rgba(160, 169, 189, 0.12); color: #d7deec; }
.rank-badge.rank-gold { background: rgba(255, 176, 32, 0.14); color: #ffe0a6; }
.rank-badge.rank-diamond { background: rgba(85, 207, 230, 0.14); color: #c9f4ff; }
.landing-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; position: relative; overflow: hidden; }
.landing-page::before,
.landing-page::after { content: ''; position: absolute; border-radius: 999px; filter: blur(24px); pointer-events: none; }
.landing-page::before { inset: 10% auto auto 8%; width: 220px; height: 220px; background: rgba(255, 138, 61, 0.14); }
.landing-page::after { inset: auto 8% 8% auto; width: 260px; height: 260px; background: rgba(85, 207, 230, 0.14); }
.landing-card { width: min(1100px, 100%); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.34); }
.landing-card:not(.landing-card-compact) {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.landing-copy { padding: 0; width: 100%; box-sizing: border-box; }
.landing-card-compact {
  width: min(520px, calc(100% - 32px));
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

.landing-copy-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 40px 24px;
  width: 100%;
  box-sizing: border-box;
}

.landing-logo-large {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  font-size: 2.2em;
}

.landing-logo-image {
  padding: 0;
  background: transparent;
}

.landing-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.btn-discord-compact {
  padding: 16px 20px;
  border-radius: 16px;
  min-width: 0;
  max-width: 100%;
  justify-content: center;
  font-size: 1em;
}
.landing-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; margin-bottom: 18px; border-radius: 999px; color: #ffd9c0; background: rgba(255, 138, 61, 0.12); border: 1px solid rgba(255, 138, 61, 0.18); font-size: 0.75em; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 800; }
.landing-logo { width: 76px; height: 76px; border-radius: 24px; margin-bottom: 18px; overflow: hidden; }
.landing-title { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 0.95; margin-bottom: 14px; font-weight: 900; }
.landing-subtitle { font-size: 1.1em; font-weight: 600; margin-bottom: 12px; color: #b8c3d9; }
.landing-desc { max-width: 56ch; margin-bottom: 28px; color: #b8c3d9; }
.landing-tags,
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.landing-tags { margin-bottom: 28px; }
.btn,
.btn-discord,
.btn-sm,
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; font-family: inherit; transition: var(--transition); }
.btn { padding: 12px 18px; border-radius: 16px; font-weight: 700; font-size: 0.92em; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #ff8a3d, #f97316); box-shadow: 0 14px 26px rgba(255, 138, 61, 0.18); }
.btn-secondary { color: #eef4ff; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.btn-discord { padding: 14px 22px; border-radius: 16px; font-size: 0.98em; font-weight: 800; color: #fff; background: #5865F2; box-shadow: 0 18px 34px rgba(88, 101, 242, 0.28); }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-feat { padding: 16px; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); }
.landing-feat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,0.05); margin-bottom: 10px; }
.landing-feat-label { font-size: 0.88em; font-weight: 700; }
.landing-side { padding: 28px; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015)); display: grid; gap: 14px; }
.landing-side-card { border-radius: 22px; padding: 18px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); }
.landing-side-title { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.18em; color: #7f8da9; margin-bottom: 10px; font-weight: 800; }
.landing-side-value { font-size: 1.65em; font-weight: 900; margin-bottom: 6px; }
.landing-side-copy { color: #b8c3d9; font-size: 0.9em; }
.badge { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); color: #b8c3d9; }
.badge-success { background: rgba(48, 209, 88, 0.12); color: #b9f8c7; border-color: rgba(48, 209, 88, 0.16); }
.badge-warning { background: rgba(255, 176, 32, 0.12); color: #ffd596; border-color: rgba(255, 176, 32, 0.18); }
.badge-info { background: rgba(85, 207, 230, 0.12); color: #c7f4ff; border-color: rgba(85, 207, 230, 0.18); }
.alert { padding: 14px 16px; border-radius: 18px; margin-bottom: 18px; }
.alert-success { background: rgba(48, 209, 88, 0.12); color: #aef6bd; border-color: rgba(48, 209, 88, 0.2); }
.alert-error { background: rgba(255, 107, 107, 0.12); color: #ffd0d0; border-color: rgba(255, 107, 107, 0.22); }
.form-group label { color: #b8c3d9; font-weight: 700; }
.form-group input,
.form-group select,
.form-group textarea,
.search-box input,
.search-box select { border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: #eef4ff; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-box input:focus,
.search-box select:focus { border-color: rgba(255, 138, 61, 0.5); box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.12); }
.search-box { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search-box input { flex: 1; min-width: 240px; }
.search-box select { min-width: 160px; }
.data-table thead th { color: #7f8da9; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
.data-table tbody td { color: #b8c3d9; border-bottom: 1px solid rgba(255,255,255,0.06); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.quick-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.qstat { text-align: center; padding: 18px; }
.key-card { padding: 18px; }
.key-card.active { border-left: 4px solid #30d158; }
.key-card.expired { border-left: 4px solid #7f8da9; opacity: 0.82; }
.key-status { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.82em; font-weight: 800; }
.key-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-active { background: #30d158; box-shadow: 0 0 10px rgba(48,209,88,0.34); }
.dot-expired { background: #7f8da9; }
.key-code { font-size: 1.02em; font-weight: 800; margin-bottom: 8px; }
.key-dates { display: flex; flex-wrap: wrap; gap: 10px; color: #b8c3d9; font-size: 0.88em; margin-bottom: 12px; }
.key-meta { justify-content: space-between; align-items: center; color: #7f8da9; }
.key-bonus { color: #ffd08a; font-weight: 800; }
.privilege-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.priv-card { padding: 18px; }
.priv-icon,
.empty-icon,
.hero-card-icon { font-size: 1.8em; margin-bottom: 10px; }
.priv-title,
.empty-title,
.hero-card-title { font-size: 1.02em; font-weight: 800; margin-bottom: 6px; }
.priv-desc { color: #7f8da9; font-size: 0.9em; }
.empty-state { text-align: center; padding: 54px 18px; color: #7f8da9; }
.empty-icon { opacity: 0.45; font-size: 3.2em; }
.api-item { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; padding: 16px 18px; }
.api-method { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.05); color: #eef4ff; }
.api-desc { color: #b8c3d9; font-size: 0.92em; }
.modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; padding: 20px; background: rgba(4, 9, 18, 0.72); backdrop-filter: blur(8px); }
.modal-content { width: min(380px, 90%); border-radius: 20px; padding: 20px; }
.modal-close { position: absolute; right: 18px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,0.04); color: #eef4ff; font-size: 1.35em; cursor: pointer; }
.modal-close:hover { background: rgba(255,255,255,0.08); }
.icon-button { width: 42px; height: 42px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.04); color: #eef4ff; }
/* ======= PREMIUM POLISH OVERRIDES ======= */
.page-shell {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.page-header,
.page-hero,
.section,
.card,
.landing-card,
.modal-content {
  position: relative;
  overflow: hidden;
}

.page-header::before,
.page-hero::before,
.section::before,
.card::before,
.landing-card::before,
.modal-content::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%, rgba(255,255,255,0.02));
}

.page-header,
.page-hero {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.hero-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
}

.hero-panel-card,
.metric-card,
.stat-card,
.qstat,
.priv-card,
.key-card,
.api-item,
.landing-side-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-panel-card:hover,
.metric-card:hover,
.stat-card:hover,
.qstat:hover,
.priv-card:hover,
.key-card:hover,
.api-item:hover,
.landing-side-card:hover {
  transform: translateY(-2px);
  border-color: rgba(85, 207, 230, 0.18);
  box-shadow: 0 18px 44px rgba(0,0,0,0.32);
}

.landing-card {
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 28px 70px rgba(0,0,0,0.38);
}

.btn-primary,
.btn-secondary,
.btn-discord {
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.btn-secondary {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 12px 30px rgba(0,0,0,0.12);
}

.alert {
  backdrop-filter: blur(10px);
}

.header {
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.sidebar-brand,
.sidebar-user,
.sidebar-note,
.landing-feat,
.landing-side-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

@media (max-width: 960px) {
  .page-shell { max-width: none; }
}

/* ======= FINAL INTERACTION POLISH ======= */
.section,
.card,
.page-header,
.page-hero,
.landing-card,
.modal-content {
  border-color: rgba(255,255,255,0.1);
}

.section {
  box-shadow: 0 16px 42px rgba(0,0,0,0.22);
}

.section-head,
.card-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}

.section:hover,
.card:hover,
.page-header:hover,
.page-hero:hover {
  border-color: rgba(85, 207, 230, 0.18);
}

.nav-item {
  border: 1px solid transparent;
}

.nav-item:hover {
  border-color: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.nav-item.active {
  border-color: rgba(85, 207, 230, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.14);
}

.btn,
.btn-discord,
.icon-button,
.logout-link {
  position: relative;
  overflow: hidden;
}

.btn::after,
.btn-discord::after,
.icon-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.btn:hover::after,
.btn-discord:hover::after,
.icon-button:hover::after {
  transform: translateX(120%);
}

.btn:hover,
.btn-discord:hover,
.icon-button:hover,
.logout-link:hover {
  transform: translateY(-2px);
}

.btn-primary {
  border: 1px solid rgba(255,138,61,0.32);
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-discord {
  border: 1px solid rgba(88,101,242,0.38);
}

.logout-link {
  border: 1px solid rgba(255,255,255,0.06);
}

.pill,
.landing-tag,
.badge,
.rank-badge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.rank-badge {
  border: 1px solid rgba(255,255,255,0.06);
}

.landing-badge,
.section-kicker,
.stat-label,
.metric-label,
.qstat-label,
.api-method,
.landing-side-title,
.hero-panel-label {
  letter-spacing: 0.14em;
}

.hero-panel-card,
.stat-icon,
.landing-feat-icon {
  box-shadow: 0 18px 32px rgba(0,0,0,0.18);
}

.form-group input,
.form-group select,
.form-group textarea,
.search-box input,
.search-box select {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.form-group input::placeholder,
.search-box input::placeholder {
  color: #7f8da9;
}

/* ======= SALESFORCE-INSPIRED LIGHT THEME ======= */
:root {
  --bg-deep: #eef4fb;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #eef5ff;
  --border: rgba(11, 31, 53, 0.08);
  --border-light: rgba(11, 31, 53, 0.12);
  --primary: #0176d3;
  --primary-dark: #005fb2;
  --primary-glow: rgba(1, 118, 211, 0.18);
  --accent: #00a1e0;
  --accent-glow: rgba(0, 161, 224, 0.18);
  --success: #1b9a59;
  --warning: #d98a00;
  --danger: #c23934;
  --text: #0b1f35;
  --text-secondary: #425466;
  --text-muted: #6b7a90;
  --shadow-sm: 0 1px 2px rgba(11,31,53,0.06);
  --shadow-md: 0 8px 24px rgba(11,31,53,0.10);
  --shadow-lg: 0 18px 48px rgba(11,31,53,0.14);
  --shadow-glow: 0 0 20px rgba(1,118,211,0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(1, 118, 211, 0.10), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(0, 161, 224, 0.08), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #edf3fb 100%);
  color: var(--text);
}

body::before {
  background-image: linear-gradient(rgba(11,31,53,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(11,31,53,0.03) 1px, transparent 1px);
  opacity: 0.8;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.app-container { background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.15)); }

.sidebar {
  background: linear-gradient(180deg, #0b1f35 0%, #12345a 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 18px 0 38px rgba(11,31,53,0.08);
}

.sidebar-brand,
.sidebar-user,
.sidebar-note,
.landing-feat,
.landing-side-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-title,
.sidebar-user-name,
.nav-item,
.sidebar-subtitle,
.sidebar-user-role,
.sidebar-note,
.logout-link {
  color: #ffffff;
}

.sidebar-subtitle,
.sidebar-user-role,
.sidebar-note,
.logout-link { color: rgba(255,255,255,0.75); }

.stat-icon,
.landing-feat-icon,
.hero-panel-card,
.user-chip-avatar {
  background: linear-gradient(135deg, #0176d3, #00a1e0) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(1,118,211,0.22);
}

.nav-item {
  color: rgba(255,255,255,0.84);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.10);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.14);
  box-shadow: inset 3px 0 0 #7ad3ff, 0 10px 24px rgba(0,0,0,0.12);
}

.header {
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(11,31,53,0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(11,31,53,0.05);
}

.header-title,
.header-eyebrow,
.header-actions,
.user-chip,
.page-header h2,
.page-hero h1,
.section-head h3,
.card-header h3,
.profile-info h2,
.hero-panel-label,
.metric-label,
.stat-label,
.qstat-label,
.api-method,
.section-kicker,
.landing-side-title,
.landing-side-value,
.landing-subtitle,
.landing-desc,
.page-lead,
.hero-copy p,
.landing-feat-label,
.priv-desc,
.empty-state,
.empty-state p,
.api-desc,
.info-row,
.rank-badge {
  color: var(--text);
}

.header-eyebrow,
.metric-label,
.stat-label,
.qstat-label,
.api-method,
.section-kicker,
.landing-side-title,
.landing-feat-label,
.priv-desc,
.empty-state p,
.api-desc,
.page-lead,
.hero-copy p,
.landing-subtitle,
.landing-desc,
.sidebar-user-role,
.sidebar-note,
.logout-link {
  color: var(--text-muted);
}

.page-content { padding: 30px; }

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  gap: 20px;
}

.page-header,
.page-hero,
.section,
.card,
.landing-card,
.modal-content {
  background: #fff;
  border: 1px solid rgba(11,31,53,0.08);
  box-shadow: 0 14px 36px rgba(11,31,53,0.08);
}

.page-header::before,
.page-hero::before,
.section::before,
.card::before,
.landing-card::before,
.modal-content::before {
  background: linear-gradient(135deg, rgba(1,118,211,0.05), transparent 45%, rgba(0,161,224,0.03));
}

.page-header,
.page-hero { border-radius: 26px; }

.page-header h2,
.hero-title,
.landing-title,
.profile-info h2 { letter-spacing: -0.04em; }

.hero-title span,
.page-header span,
.header-title span,
.sidebar-title span { color: var(--primary); }

.pill,
.landing-tag,
.badge,
.rank-badge {
  background: #f4f8fd;
  color: var(--text-secondary);
  border: 1px solid rgba(11,31,53,0.08);
  box-shadow: none;
}

.landing-badge {
  background: rgba(1,118,211,0.10);
  color: var(--primary);
  border: 1px solid rgba(1,118,211,0.16);
}

.landing-card {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 24px 56px rgba(11,31,53,0.10);
}

.hero-panel {
  background: linear-gradient(180deg, #f9fbff, #edf4fd);
  border: 1px solid rgba(11,31,53,0.08);
}

.hero-panel-card,
.metric-card,
.stat-card,
.qstat,
.priv-card,
.key-card,
.api-item,
.landing-side-card {
  background: #fff;
  border: 1px solid rgba(11,31,53,0.08);
  box-shadow: 0 1px 2px rgba(11,31,53,0.04);
}

.page-header,
.page-hero,
.section,
.card,
.profile-header {
  border-radius: 26px;
}

.section-head,
.card-header {
  background: linear-gradient(180deg, rgba(1,118,211,0.03), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(11,31,53,0.07);
}

.section,
.card {
  box-shadow: 0 10px 30px rgba(11,31,53,0.06);
}

.section:hover,
.card:hover,
.page-header:hover,
.page-hero:hover,
.hero-panel-card:hover,
.metric-card:hover,
.stat-card:hover,
.qstat:hover,
.priv-card:hover,
.key-card:hover,
.api-item:hover,
.landing-side-card:hover {
  transform: translateY(-3px);
  border-color: rgba(1,118,211,0.18);
  box-shadow: 0 16px 38px rgba(11,31,53,0.10);
}

.header-copy,
.header-actions,
.user-chip {
  color: var(--text);
}

.user-chip {
  background: #f7fbff;
  border: 1px solid rgba(11,31,53,0.08);
}

.sidebar-brand,
.sidebar-user,
.sidebar-note,
.landing-feat,
.landing-side-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.btn,
.btn-discord,
.btn-secondary,
.btn-primary,
.icon-button,
.logout-link {
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(11,31,53,0.10);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: rgba(1,118,211,0.24);
}

.btn-secondary {
  background: #f3f7fc;
  color: var(--text);
  border-color: rgba(11,31,53,0.08);
}

.btn-secondary:hover,
.btn-primary:hover,
.btn-discord:hover,
.logout-link:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(11,31,53,0.14);
}

.btn-discord {
  background: #5865F2;
  border-color: rgba(88,101,242,0.38);
  color: #fff;
}

.logout-link {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

.form-group input,
.form-group select,
.form-group textarea,
.search-box input,
.search-box select {
  background: #fff;
  border: 1px solid rgba(11,31,53,0.10);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(11,31,53,0.04);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-box input:focus,
.search-box select:focus {
  border-color: rgba(1,118,211,0.42);
  box-shadow: 0 0 0 4px rgba(1,118,211,0.12);
  background: #fff;
}

.data-table thead th {
  background: #f7fbff;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(11,31,53,0.08);
}

.data-table tbody td {
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(11,31,53,0.06);
}

.data-table tbody tr:hover {
  background: #f7fbff;
}

.alert-success {
  background: rgba(27, 154, 89, 0.10);
  color: #17643e;
  border-color: rgba(27, 154, 89, 0.18);
}

.alert-error {
  background: rgba(194, 57, 52, 0.10);
  color: #8b2d2a;
  border-color: rgba(194, 57, 52, 0.18);
}

.sidebar-avatar,
.profile-avatar {
  border-color: rgba(1,118,211,0.30) !important;
}

.rank-badge.rank-silver { background: #f4f7fb; color: #56657a; }
.rank-badge.rank-gold { background: #fff6e9; color: #9c6500; }
.rank-badge.rank-diamond { background: #e8f8ff; color: #006a9a; }

.hero-panel-card { border-radius: 18px; }

.metric-label,
.stat-label,
.qstat-label,
.api-method,
.section-kicker,
.landing-side-title,
.hero-panel-label {
  letter-spacing: 0.14em;
}

.landing-page::before { background: radial-gradient(circle, rgba(1,118,211,0.12) 0%, transparent 65%); }
.landing-page::after { background: radial-gradient(circle, rgba(0,161,224,0.10) 0%, transparent 65%); }

.landing-title,
.hero-title,
.profile-info h2 {
  color: var(--text);
}

.tab-nav {
  background: #fff;
  border: 1px solid rgba(11,31,53,0.08);
  box-shadow: 0 8px 24px rgba(11,31,53,0.06);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(1,118,211,0.12), rgba(0,161,224,0.10));
  color: var(--primary);
}

.dot.active { background: var(--primary); }

.cards-slider,
.key-card.active,
.key-card.expired,
.priv-card,
.qstat,
.metric-card,
.stat-card,
.api-item,
.section,
.card { border-radius: 22px; }

.empty-state { color: var(--text-muted); }

@media (max-width: 960px) {
  .sidebar { box-shadow: 0 18px 42px rgba(11,31,53,0.16); }
  .header { box-shadow: 0 8px 20px rgba(11,31,53,0.06); }
}
