/* ════════════════════════════════════════════════════════════
   EliteGrid — Shared Styles
   Loaded by all sidebar pages via <link rel="stylesheet" href="gd-shared.css">
   ════════════════════════════════════════════════════════════ */

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

:root {
  --purple: #667eea; --purple-dark: #764ba2; --pink: #fa709a; --gold: #fee140;
  --green: #43e97b; --teal: #38f9d7; --blue: #4facfe; --cyan: #00f2fe;
  --red: #ff5a65;
  --bg: #0d0d1a; --card: #16162a; --card2: #1e1e35; --card3: #23234a;
  --text: #f0f0ff; --muted: #8888aa; --border: rgba(255,255,255,0.07);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex;
  visibility: hidden;
}

/* ── LIGHT MODE ───────────────────────────────────────────── */
body.light {
  --bg:#f2f2fa; --card:#ffffff; --card2:#f0f0f8; --card3:#e8e8f4;
  --text:#1a1a2e; --muted:#5a5a7a; --border:rgba(0,0,0,0.08);
}
body.light .nav-item:hover { background: rgba(102,126,234,0.06); color: var(--text); }
body.light .nav-item.active { background: linear-gradient(135deg,rgba(102,126,234,0.15),rgba(118,75,162,0.15)); border-color: rgba(102,126,234,0.35); }
body.light .form-input { background: var(--card2); border-color: rgba(0,0,0,0.12); color: var(--text); }
body.light .toggle-track { background: rgba(0,0,0,0.1); }

/* ── THEME TOGGLE ─────────────────────────────────────────── */
.theme-toggle-wrap { padding: 10px 12px 8px; border-top: 1px solid var(--border); }
.theme-toggle-inner { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--card2); border: 1px solid var(--border); cursor: pointer; }
.toggle-lbl { font-size: 11px; font-weight: 700; color: var(--muted); flex: 1; transition: color .2s; }
.toggle-track { width: 38px; height: 20px; border-radius: 10px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); position: relative; transition: all .3s; flex-shrink: 0; cursor: pointer; }
.toggle-track.is-dark { background: linear-gradient(135deg,var(--purple),var(--purple-dark)); border-color: transparent; }
.toggle-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: transform .3s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.toggle-track.is-dark .toggle-thumb { transform: translateX(18px); }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar { width: 240px; min-height: 100vh; background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); }
body.light .sidebar-logo {
  background: linear-gradient(135deg, #d7ecff, #cfe6ff) !important;
  border-bottom-color: rgba(102,126,234,0.35);
}
.sidebar-section { padding: 16px 12px 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 10px; margin: 2px 8px; cursor: pointer; transition: all .2s; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)); color: var(--purple); border-color: rgba(102,126,234,0.2); }
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-user { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.user-av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--purple-dark)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }

/* ── MAIN LAYOUT ──────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { padding: 20px 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--card); }
.topbar-left h1 { font-size: 22px; font-weight: 700; }
.topbar-left p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.badge-notif { width: 36px; height: 36px; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; position: relative; transition: all .2s; }
.badge-notif:hover { background: var(--card3); }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--pink); border-radius: 50%; }
.notif-dots { position: absolute; top: 4px; right: 4px; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.notif-dots span { width: 8px; height: 8px; border-radius: 50%; display: block; }
.notif-dropdown { display: none !important; }
.notif-dropdown.show { display: block; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px; border-radius: 8px; margin-bottom: 4px; cursor: pointer; }
.notif-item:hover { background: var(--card3); }
.notif-item:last-child { margin-bottom: 0; }
.notif-item .ni-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.notif-item .ni-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item .ni-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 12px; }
.btn-new { padding: 9px 18px; background: linear-gradient(135deg, var(--purple), var(--purple-dark)); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s; }
.btn-new:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102,126,234,0.4); }
.date-chip { padding: 8px 14px; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--muted); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.form-input { width: 100%; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; color: var(--text); font-size: 14px; outline: none; transition: border-color .2s; }
.form-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(102,126,234,0.15); }
.form-input::placeholder { color: var(--muted); }

/* ── STATUS BADGES ────────────────────────────────────────── */
.status-badge { padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.sb-done { background: rgba(67,233,123,0.2); color: var(--green); }
.sb-prog { background: rgba(79,172,254,0.2); color: var(--blue); }
.sb-pend { background: rgba(250,112,154,0.2); color: var(--pink); }
.sb-conf { background: rgba(102,126,234,0.2); color: var(--purple); }

/* ── TOAST ────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 30px; right: 30px; background: var(--card2); border: 1px solid rgba(67,233,123,0.4); border-radius: 12px; padding: 14px 20px; font-size: 14px; font-weight: 600; color: var(--green); transform: translateY(80px); opacity: 0; transition: all .35s; z-index: 1000; display: flex; align-items: center; gap: 10px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: rgba(255,90,101,0.4); color: var(--red); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .sidebar { display: none; }
}
