:root {
  /* ── BACKGROUNDS ── */
  --bg:       #07090f;
  --surface:  #0c1120;
  --card:     #111826;
  --card2:    #172030;
  --card3:    #1d2a3e;

  /* ── BORDERS ── */
  --border:   #1f2e44;
  --border2:  #2b3e58;

  /* ── GOLD ── */
  --gold:      #c9a84c;
  --gold2:     #dbbf6a;
  --gold3:     #edd48a;
  --gold-dim:  rgba(201,168,76,.10);
  --gold-glow: rgba(201,168,76,.22);

  /* ── ACCENT (cyan-blue highlight) ── */
  --accent:     #38bdf8;
  --accent-dim: rgba(56,189,248,.10);

  /* ── SEMANTIC ── */
  --red:        #e06060;
  --red-dim:    rgba(224,96,96,.10);
  --blue:       #60a5fa;
  --blue-dim:   rgba(96,165,250,.10);
  --green:      #4ade80;
  --green-dim:  rgba(74,222,128,.10);
  --purple:     #a78bfa;
  --purple-dim: rgba(167,139,250,.10);
  --teal:       #2dd4bf;
  --teal-dim:   rgba(45,212,191,.10);
  --orange:     #fb923c;
  --orange-dim: rgba(251,146,60,.10);

  /* ── TEXT ── */
  --text:  #c8d5e8;
  --text2: #5880a8;
  --text3: #2c4262;

  /* ── FONTS ── */
  --ff-display: 'Times New Roman', Times, serif;
  --ff-mono:    'Times New Roman', Times, serif;
  --ff-body:    'Times New Roman', Times, serif;

  /* ── CLIP SHAPES (kept for special elements) ── */
  --radius-clip:    polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  --radius-clip-sm: polygon(0 0, calc(100% - 8px)  0, 100% 8px,  100% 100%, 8px  100%, 0 calc(100% - 8px));

  /* ── SHADOWS ── */
  --shadow-card:  0 2px 16px rgba(0,0,0,.5),  0 0 0 1px rgba(15,24,44,.9);
  --shadow-hover: 0 12px 40px rgba(0,0,0,.65), 0 0 0 1px rgba(201,168,76,.14);
  --shadow-gold:  0 6px 24px rgba(201,168,76,.28);

  /* ── RADIUS ── */
  --r: 3px;
  --r-lg: 6px;
}

/* ══════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: transparent;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.25;
}

#mil-bg {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none;
  filter: blur(5px) brightness(0.5);
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ══════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════ */
@keyframes fadeUp  { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes pulse   { 0%,100% { opacity:1; } 50% { opacity:.3; } }
@keyframes shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }

.anim-fade-up   { animation: fadeUp .5s cubic-bezier(.16,1,.3,1) both; }
.anim-fade-up-2 { animation: fadeUp .5s .08s  cubic-bezier(.16,1,.3,1) both; }
.anim-fade-up-3 { animation: fadeUp .5s .16s  cubic-bezier(.16,1,.3,1) both; }
.anim-fade-up-4 { animation: fadeUp .5s .24s  cubic-bezier(.16,1,.3,1) both; }

/* ══════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 260px; z-index: 200;
  background: rgba(7,9,18,.97);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
  backdrop-filter: blur(20px);
}

.sidebar-top {
  padding: 0 20px;
  height: 64px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; position: relative;
}
.sidebar-top::after {
  content: '';
  position: absolute; bottom: -1px; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(201,168,76,.1), transparent);
  opacity: .5;
}

.sidebar-brand {
  font-family: var(--ff-display);
  font-size: 1.5rem; letter-spacing: 4px; color: var(--gold);
  text-decoration: none; display: flex; flex-direction: column;
  transition: color .2s;
}
.sidebar-brand small {
  display: block; font-family: var(--ff-mono); font-size: .38rem;
  letter-spacing: 5px; color: var(--text3); text-transform: uppercase; margin-top: 1px;
}
.sidebar-brand:hover { color: var(--gold2); }

.sidebar-user-wrap {
  padding: 15px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.05));
  border: 1px solid rgba(201,168,76,.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: .7rem; color: var(--gold);
  font-weight: 700; flex-shrink: 0; letter-spacing: 1px;
}
.sidebar-user-name {
  font-family: var(--ff-mono); font-size: .7rem; color: var(--text);
  font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-family: var(--ff-mono); font-size: .48rem; color: var(--accent);
  margin-top: 3px; letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1; padding: 8px 0 4px; overflow-y: auto; overflow-x: hidden;
}

.sidebar-section-label {
  font-family: var(--ff-mono); font-size: .42rem;
  letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--text3); padding: 14px 20px 5px;
  opacity: .6;
}

.sidebar-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 20px;
  font-family: var(--ff-mono); font-size: .57rem;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--text3); text-decoration: none;
  transition: color .12s, background .12s, border-left-color .12s;
  border-left: 2px solid transparent;
  white-space: nowrap;
}
.sidebar-link svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .55; transition: opacity .12s; }
.sidebar-link:hover {
  color: var(--text2); background: rgba(255,255,255,.025);
  border-left-color: rgba(201,168,76,.25);
}
.sidebar-link:hover svg { opacity: .8; }
.sidebar-link.active {
  color: var(--gold); background: var(--gold-dim);
  border-left-color: var(--gold);
}
.sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logout {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 14px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); font-family: var(--ff-mono); font-size: .57rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: all .15s; border-radius: var(--r);
}
.sidebar-logout:hover { color: var(--red); border-color: rgba(224,96,96,.3); background: var(--red-dim); }
.sidebar-logout svg { width: 13px; height: 13px; }

/* ══════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 260px; right: 0; height: 64px;
  z-index: 150;
  background: rgba(7,9,18,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.4);
  display: flex; align-items: center; gap: 14px; padding: 0 32px 0 28px;
}
.topbar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 25%, var(--gold2) 55%, var(--gold) 80%, transparent 100%);
  opacity: .35;
}
.topbar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; border-radius: var(--r);
  transition: all .15s;
}
.topbar-toggle:hover { color: var(--gold); border-color: rgba(201,168,76,.35); background: var(--gold-dim); }
.topbar-toggle svg { width: 17px; height: 17px; }
.topbar-breadcrumb {
  font-family: var(--ff-mono); font-size: .57rem; color: var(--text3);
  display: flex; align-items: center; gap: 10px; flex: 1;
  text-transform: uppercase; letter-spacing: 1px;
}
.topbar-breadcrumb a { color: var(--text3); text-decoration: none; transition: color .12s; }
.topbar-breadcrumb a:hover { color: var(--gold); }
.topbar-sep { opacity: .3; }
.topbar-page { color: var(--text2); font-weight: 600; }
.topbar-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.topbar-user-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border); border-radius: var(--r);
}
.topbar-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.05));
  border: 1px solid rgba(201,168,76,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: .5rem; color: var(--gold);
  font-weight: 700; flex-shrink: 0; letter-spacing: .5px;
}
.topbar-name {
  font-family: var(--ff-mono); font-size: .57rem; color: var(--text2);
  white-space: nowrap;
}

/* VOLUME CONTROL */
.vol-ctrl {
  position: relative;
}
.vol-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); cursor: pointer; border-radius: var(--r);
  transition: color .15s, border-color .15s, background .15s;
  padding: 0;
}
.vol-btn:hover { color: var(--gold); border-color: rgba(201,168,76,.4); background: var(--gold-dim); }
.vol-btn svg { width: 15px; height: 15px; }
.vol-panel {
  display: none; flex-direction: column; gap: 8px;
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 180px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border2);
  border-top: 2px solid var(--gold);
  border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.65);
  z-index: 500;
}
.vol-panel.open { display: flex; animation: fadeUp .12s ease; }
.vol-label {
  font-family: var(--ff-mono); font-size: .42rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3);
}
.vol-pct {
  font-family: var(--ff-mono); font-size: .5rem; color: var(--gold);
  text-align: right;
}
.vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border2); outline: none; cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); cursor: pointer;
  box-shadow: 0 0 6px rgba(201,168,76,.45);
}
.vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); cursor: pointer; border: none;
}

/* SIDEBAR BACKDROP (mobile) */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
}
.sidebar-backdrop.open { display: block; animation: fadeIn .15s ease; }

/* ══════════════════════════════════════════
   PAGE WRAPPER
   ══════════════════════════════════════════ */
.page-wrapper {
  margin-left: 260px;
  padding: 80px 36px 96px;
}

/* ══════════════════════════════════════════
   SECTION HEADER
   ══════════════════════════════════════════ */
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border); position: relative;
}
.section-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 110px; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(201,168,76,.2) 70%, transparent 100%);
}
.section-title {
  font-family: var(--ff-display); font-size: 2.8rem;
  letter-spacing: 6px; color: var(--text); line-height: 1;
}
.section-title span { color: var(--gold); }
.section-sub {
  font-family: var(--ff-mono); font-size: .5rem;
  letter-spacing: 4px; color: var(--text3);
  text-transform: uppercase; margin-top: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-sub::before {
  content: ''; display: inline-block; width: 14px; height: 1px;
  background: var(--gold); opacity: .3;
}

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow .25s, border-color .25s, transform .25s;
  border-radius: var(--r);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(201,168,76,.16);
  transform: translateY(-2px);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(201,168,76,.15), transparent);
}
.card-corner { clip-path: var(--radius-clip); border-radius: 0; }
.card-title {
  font-family: var(--ff-mono); font-size: .5rem;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 18px; opacity: .7;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ''; display: inline-block; width: 12px; height: 1px; background: var(--gold);
}

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; font-family: var(--ff-mono); font-size: .64rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
  transition: all .18s ease; border: none; outline: none; text-decoration: none;
  position: relative; overflow: hidden; border-radius: var(--r);
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.09) 0%, transparent 55%);
  pointer-events: none;
}
.btn svg { width: 12px; height: 12px; flex-shrink: 0; }

.btn-gold       { background: linear-gradient(150deg, #c9a84c 0%, #7a6020 100%); color: #07090f; }
.btn-gold:hover { background: linear-gradient(150deg, #dbbf6a 0%, #c9a84c 100%); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

.btn-outline       { background: transparent; color: var(--gold); border: 1px solid rgba(201,168,76,.35); }
.btn-outline:hover { background: var(--gold-dim); border-color: rgba(201,168,76,.6); }

.btn-blue       { background: linear-gradient(150deg, #5b9ed6 0%, #2e5a80 100%); color: #fff; }
.btn-blue:hover { background: linear-gradient(150deg, #72b0e4 0%, #5b9ed6 100%); transform: translateY(-1px); }

.btn-red        { background: linear-gradient(150deg, #e06060 0%, #7a1f1f 100%); color: #fff; }
.btn-red:hover  { background: linear-gradient(150deg, #f07878 0%, #e06060 100%); box-shadow: 0 4px 16px rgba(224,96,96,.28); }

.btn-sm   { padding: 7px 13px; font-size: .56rem; letter-spacing: 1.5px; }
.btn-w100 { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════
   FORM
   ══════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-family: var(--ff-mono); font-size: .5rem;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 8px; opacity: .75;
}

.form-control {
  width: 100%; padding: 11px 14px;
  background: rgba(2,10,3,.8);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text); font-family: var(--ff-body); font-size: .9rem;
  outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.form-control:focus {
  border-color: rgba(201,168,76,.45);
  box-shadow: 0 0 0 3px rgba(201,168,76,.07);
}
.form-control::placeholder { color: var(--text3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
input[type="file"].form-control { padding: 9px 14px; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full  { grid-column: 1 / -1; }

/* ══════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(2,10,3,.8); border: 1px solid var(--border);
  padding: 0 14px; transition: border-color .15s, box-shadow .15s; flex: 1;
  border-radius: var(--r);
}
.search-bar:focus-within {
  border-color: rgba(201,168,76,.4);
  box-shadow: 0 0 0 3px rgba(201,168,76,.06);
}
.search-bar svg { color: var(--text3); width: 13px; height: 13px; flex-shrink: 0; }
.search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 11px 0; font-family: var(--ff-body); font-size: .9rem; color: var(--text);
}
.search-bar input::placeholder { color: var(--text3); }
.search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
}
.data-table { width: 100%; border-collapse: collapse; font-family: var(--ff-body); }
.data-table thead tr {
  background: linear-gradient(to right, var(--card2), var(--card));
}
.data-table thead th {
  padding: 14px 18px; text-align: left; font-family: var(--ff-mono); font-size: .5rem;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold);
  font-weight: 600; white-space: nowrap; opacity: .8;
  border-bottom: 1px solid rgba(201,168,76,.12);
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.data-table tbody tr:hover {
  background: linear-gradient(to right, rgba(201,168,76,.045), transparent);
}
.data-table tbody tr:hover td:first-child {
  border-left: 2px solid rgba(201,168,76,.4);
  padding-left: 16px;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody td { padding: 13px 18px; font-size: .84rem; color: var(--text2); }
.data-table tbody td:first-child { color: var(--text); transition: border-left .12s, padding-left .12s; }

/* ══════════════════════════════════════════
   BADGES & STATUS
   ══════════════════════════════════════════ */
.rank-badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: var(--r); font-family: var(--ff-mono); font-size: .57rem;
  letter-spacing: 1px; font-weight: 500;
}
.rank-1 { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(91,158,214,.25); }
.rank-2 { background: var(--gold-dim);   color: var(--gold);   border: 1px solid rgba(201,168,76,.25); }
.rank-3 { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(224,96,96,.25); }
.rank-4 { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(78,184,126,.25); }
.rank-5 { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(147,112,200,.25); }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; font-family: var(--ff-mono); font-size: .57rem; letter-spacing: 1px; border-radius: var(--r); }
.tag-active   { background: var(--green-dim); color: var(--green); border: 1px solid rgba(78,184,126,.25); }
.tag-pending  { background: var(--gold-dim);  color: var(--gold);  border: 1px solid rgba(201,168,76,.25); }
.tag-inactive { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(224,96,96,.25); }

.status-dot      { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; }
.status-active   { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-inactive { background: var(--text3); }
.status-pending  { background: var(--gold); animation: pulse 2s infinite; }

.admin-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  background: var(--gold-dim); border: 1px solid rgba(201,168,76,.25);
  font-family: var(--ff-mono); font-size: .52rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  border-radius: var(--r);
}

.admin-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,.15);
  border-left: 2px solid var(--gold);
  padding: 12px 18px; margin-bottom: 22px;
  font-family: var(--ff-mono); font-size: .66rem; color: var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
}

/* ══════════════════════════════════════════
   ALERT
   ══════════════════════════════════════════ */
.alert {
  padding: 11px 16px; font-family: var(--ff-mono); font-size: .68rem;
  margin-bottom: 16px; border-radius: var(--r); display: none;
}
.alert.show { display: block; animation: fadeUp .25s ease; }
.alert-success { background: var(--green-dim); border: 1px solid rgba(78,184,126,.25); color: var(--green); }
.alert-error   { background: var(--red-dim);   border: 1px solid rgba(224,96,96,.25);  color: var(--red); }

/* ══════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(1,8,2,.9); backdrop-filter: blur(12px);
  z-index: 500; display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; animation: fadeIn .18s ease; }

.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-top: 2px solid var(--gold);
  width: 580px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 64px rgba(0,0,0,.85);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  animation: fadeUp .22s cubic-bezier(.16,1,.3,1);
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to right, rgba(201,168,76,.055), transparent);
  position: sticky; top: 0; backdrop-filter: blur(10px); z-index: 1;
}
.modal-title { font-family: var(--ff-display); font-size: 1.7rem; letter-spacing: 3px; color: var(--text); }
.modal-close {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); color: var(--text3);
  cursor: pointer; font-size: .9rem; transition: all .15s; flex-shrink: 0;
  border-radius: var(--r);
}
.modal-close:hover { color: var(--red); border-color: rgba(224,96,96,.3); background: var(--red-dim); }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.modal-section {
  font-family: var(--ff-mono); font-size: .47rem; letter-spacing: 3.5px;
  text-transform: uppercase; color: var(--gold); opacity: .6;
  margin: 22px 0 12px; padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.modal-section::before {
  content: ''; display: inline-block; width: 10px; height: 1px; background: var(--gold);
}
.modal-section:first-child { margin-top: 0; }

/* ══════════════════════════════════════════
   ADMIN TABS
   ══════════════════════════════════════════ */
.admin-tabs { margin-bottom: 32px; }
.admin-tab-bar {
  display: flex; gap: 1px;
  border-bottom: 1px solid var(--border);
}
.admin-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 13px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  font-family: var(--ff-mono); font-size: .49rem; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text3); cursor: pointer; transition: color .15s, background .15s;
  margin-bottom: -1px; white-space: nowrap;
}
.admin-tab svg { width: 13px; height: 13px; flex-shrink: 0; }
.admin-tab:hover { color: var(--text2); }
.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: linear-gradient(to bottom, rgba(201,168,76,.06), transparent);
}
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; animation: fadeUp .22s ease; }
.admin-tab-panel {
  background: var(--card);
  border: 1px solid var(--border); border-top: none;
  padding: 28px;
  border-radius: 0 0 var(--r) var(--r);
}

/* ══════════════════════════════════════════
   ACCORDION
   ══════════════════════════════════════════ */
.acc-panel {
  border: 1px solid var(--border);
  margin-bottom: 6px; overflow: hidden;
  border-radius: var(--r);
}
.acc-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 18px;
  background: var(--card2);
  border: none; cursor: pointer;
  color: var(--text2); font-family: var(--ff-mono); font-size: .6rem;
  font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  transition: color .15s, background .15s; text-align: left;
}
.acc-header:hover { color: var(--gold); background: linear-gradient(to right, rgba(201,168,76,.06), var(--card2)); }
.acc-panel.open > .acc-header {
  color: var(--gold);
  background: linear-gradient(to right, rgba(201,168,76,.08), var(--card));
  border-bottom: 1px solid rgba(201,168,76,.08);
}
.acc-header-left { display: flex; align-items: center; gap: 10px; }
.acc-header-left svg { width: 13px; height: 13px; flex-shrink: 0; }
.acc-chev { width: 13px; height: 13px; flex-shrink: 0; transition: transform .22s ease; }
.acc-panel.open > .acc-header .acc-chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 24px; background: var(--card); }
.acc-panel.open > .acc-body { display: block; animation: fadeUp .18s ease; }

/* ══════════════════════════════════════════
   ACTIVITY LOG BADGES
   ══════════════════════════════════════════ */
.log-action {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: .53rem; letter-spacing: 1px;
  font-family: var(--ff-mono); border-radius: var(--r); white-space: nowrap;
}
.log-penalty { background: var(--red-dim);     color: var(--red);    border: 1px solid rgba(224,96,96,.18); }
.log-del     { background: rgba(200,100,40,.1); color: #d08040;       border: 1px solid rgba(200,100,40,.18); }
.log-news    { background: var(--blue-dim);     color: var(--blue);   border: 1px solid rgba(91,158,214,.18); }
.log-login   { background: var(--green-dim);    color: var(--green);  border: 1px solid rgba(78,184,126,.18); }
.log-user    { background: var(--gold-dim);     color: var(--gold);   border: 1px solid rgba(201,168,76,.18); }
.log-name    { background: var(--purple-dim);   color: var(--purple); border: 1px solid rgba(147,112,200,.18); }

/* ══════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 56px 24px; font-family: var(--ff-mono);
  font-size: .64rem; color: var(--text3); letter-spacing: 2px; text-transform: uppercase;
}
.empty-state span { display: block; font-size: 2rem; margin-bottom: 12px; opacity: .1; }

/* ══════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════ */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 16px; }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text3); }
.font-mono    { font-family: var(--ff-mono); font-size: .78rem; }
.font-display { font-family: var(--ff-display); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar           { transform: translateX(-260px); }
  .sidebar.sidebar-open { transform: translateX(0); }
  .topbar            { left: 0; }
  .topbar-toggle     { display: flex; }
  .topbar-breadcrumb { display: none; }
  .page-wrapper      { margin-left: 0; padding: 76px 16px 64px; }
  .form-grid         { grid-template-columns: 1fr; }
  .section-title     { font-size: 2rem; }
  .modal             { width: 100%; }
  .admin-tab-bar     { overflow-x: auto; scrollbar-width: none; }
  .admin-tab-bar::-webkit-scrollbar { display: none; }
  .admin-tab         { white-space: nowrap; }
  .admin-tab-panel   { padding: 16px; }
}
