:root {
  --bg: #0d0d0d;
  --bg-panel: #111111;
  --bg-card: #161616;
  --bg-elevated: #1c1c1c;
  --border: #2a2a2a;
  --border-soft: #232323;
  --lime: #c8ff3e;
  --lime-soft: rgba(200,255,62,0.12);
  --blue: #4dd0e1;
  --mint: #3effa0;
  --red: #ff4e4e;
  --text-dim: #cfcfcf;
  --text-faint: #8a8a8a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(200,255,62,0.07), transparent 40%),
    radial-gradient(circle at 92% 8%, rgba(77,208,225,0.07), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(62,255,160,0.06), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  color: #f2f2f2;
}

.font-head {
  font-family: 'Arial Black', Impact, sans-serif;
  font-weight: 900;
}

.gradient-title {
  background: linear-gradient(90deg, #ffffff, var(--lime) 55%, var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.icon-circle {
  width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft, var(--lime-soft)), transparent 70%), var(--bg-elevated);
  border: 1px solid var(--accent, var(--lime));
}
.icon-circle.accent-lime { --accent: var(--lime); --accent-soft: rgba(200,255,62,0.28); }
.icon-circle.accent-blue { --accent: var(--blue); --accent-soft: rgba(77,208,225,0.28); }
.icon-circle.accent-mint { --accent: var(--mint); --accent-soft: rgba(62,255,160,0.28); }

.lift-card { transition: transform 0.15s ease, border-color 0.15s ease; }
.lift-card:hover { transform: translateY(-4px); }

a { color: inherit; }

.btn-primary {
  display: inline-block;
  background: var(--lime);
  color: #0d0d0d;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: #f2f2f2;
  font-size: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* ===== App shell (dashboard pages) ===== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar .brand {
  padding: 26px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .brand img {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
}
.sidebar .brand-name { font-size: 20px; line-height: 1; }
.sidebar .brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: 0.08em; }

.sidebar nav { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text-dim); border-left: 3px solid transparent;
}
.sidebar nav a.active {
  color: var(--lime); background: var(--lime-soft); border-left: 3px solid var(--lime);
}

.app-main { flex: 1; min-width: 0; }
.app-content { padding: 28px; }

.app-header {
  height: 72px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  background: rgba(13,13,13,0.9);
  z-index: 20;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { padding: 22px; }
.stat-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.stat-value { font-size: 34px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 14px 20px; font-size: 11px; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 600; text-transform: uppercase; border-bottom: 1px solid var(--border-soft); }
td { padding: 14px 20px; border-bottom: 1px solid var(--border-soft); }

.notice-error {
  background: rgba(255,78,78,0.1); border: 1px solid rgba(255,78,78,0.3);
  color: var(--red); font-size: 13px; padding: 10px 14px; border-radius: 10px;
}
.notice-success {
  background: rgba(62,255,160,0.1); border: 1px solid rgba(62,255,160,0.3);
  color: var(--mint); font-size: 13px; padding: 10px 14px; border-radius: 10px;
}

.public-nav a { font-size: 13.5px; text-decoration: none; font-weight: 600; }
@media (max-width: 640px) { .public-nav { display: none !important; } }

@media (max-width: 900px) {
  .app-content { padding: 16px; }
  .mobile-menu-btn, #mobileMenuBtn { display: flex !important; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
}
