/* ═══════════════════════════════════════════════════════
   TicketDist — Dark Premium Theme
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:        #0a0a12;
  --bg-2:      #111119;
  --bg-card:   #16161f;
  --bg-card-h: #1c1c2a;
  --sidebar:   #0e0e18;
  --accent:    #c9a84c;
  --accent-l:  #e8c86a;
  --accent-d:  #a8893c;
  --text:      #f0f0f8;
  --text-2:    #8888a4;
  --text-3:    #55556a;
  --success:   #2ecc71;
  --warning:   #f39c12;
  --danger:    #e74c3c;
  --info:      #3498db;
  --border:    rgba(255,255,255,0.07);
  --shadow:    0 8px 32px rgba(0,0,0,0.45);
  --r:         12px;
  --r-sm:      8px;
  --t:         0.18s ease;
}

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

html { scroll-behavior:smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-l); }

img { max-width: 100%; }

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   PUBLIC PAGES
   ═══════════════════════════════════════════════════════ */
.public-body { background: var(--bg); }

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #12122a 0%, #1a1240 50%, #0a0a18 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content:'';
  position:absolute; inset:0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 30px,
    rgba(201,168,76,.03) 30px, rgba(201,168,76,.03) 31px
  );
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,18,0.95) 0%, rgba(10,10,18,0.5) 50%, rgba(10,10,18,0.2) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 48px;
}
.event-badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #c9a84c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
}
.meta-item {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 14px;
}
.meta-item svg { opacity: .7; flex-shrink: 0; }

/* Legal notice */
.legal-notice {
  background: rgba(201,168,76,0.06);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.1);
  padding: 10px 0;
}
.legal-notice .container {
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.legal-notice svg { flex-shrink:0; opacity:.6; margin-top:2px; color:var(--accent); }

/* Container */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* Sections */
.sections-section { padding: 52px 0 80px; }
.section-heading { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.section-sub { color: var(--text-2); font-size: 14px; margin-bottom: 36px; }

/* Section cards grid */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.section-card:hover:not(.soldout) {
  transform: translateY(-3px);
  border-color: rgba(201,168,76,0.35);
  box-shadow: var(--shadow), 0 0 0 1px rgba(201,168,76,0.15);
}
.section-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.25), var(--shadow);
}
.section-card.soldout { opacity: .55; cursor: default; }

.card-header-row { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.card-name { font-size: 1rem; font-weight: 700; }
.card-price { font-size: 1.7rem; font-weight: 900; color: var(--accent); letter-spacing: -0.5px; }
.card-avail { font-size: 12.5px; color: var(--text-2); }

/* Stock badges */
.stock-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.stock-available { background: rgba(46,204,113,0.15); color: #2ecc71; }
.stock-limited   { background: rgba(243,156,18,0.15);  color: #f39c12; }
.stock-soldout   { background: rgba(231,76,60,0.12);   color: #e74c3c; }

/* Select button */
.btn-select {
  margin-top: auto;
  background: var(--accent);
  color: #0a0a12;
  border: none;
  border-radius: var(--r-sm);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
}
.btn-select:hover:not(.disabled) { background: var(--accent-l); transform: translateY(-1px); }
.btn-select.disabled { background: var(--bg-card-h); color: var(--text-3); cursor: not-allowed; }

/* Form Panel */
.form-panel {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.form-panel.open, .form-panel.visible {
  max-height: 800px;
  padding: 40px 0 52px;
}
.form-panel-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
}
.form-panel-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:24px; }
.form-panel-title { font-size:1.15rem; font-weight:700; }
.form-panel-sub { color:var(--text-2); font-size:13px; margin-top:4px; }
.form-panel-close { background:none; border:none; color:var(--text-2); font-size:18px; cursor:pointer; padding:4px 8px; border-radius:6px; }
.form-panel-close:hover { color:var(--text); background:var(--border); }

/* Qty control */
.qty-control {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  overflow: hidden;
}
.qty-btn {
  background: none; border: none; color: var(--accent);
  width: 40px; height: 40px; font-size: 20px; font-weight: 700;
  cursor: pointer; transition: background var(--t);
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--bg-card-h); }
.qty-value {
  min-width: 40px; text-align: center;
  font-size: 1.1rem; font-weight: 700;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 0 8px; line-height: 40px;
}
.price-preview {
  font-size: 1.8rem; font-weight: 900; color: var(--accent);
  letter-spacing: -0.5px; line-height: 40px;
}

/* Success overlay */
.success-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,18,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.success-overlay.visible { opacity:1; pointer-events:all; }
.success-card {
  background: var(--bg-card);
  border: 1px solid rgba(46,204,113,0.3);
  border-radius: var(--r);
  padding: 52px 40px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow), 0 0 60px rgba(46,204,113,0.1);
}
.success-icon {
  width: 72px; height: 72px;
  background: rgba(46,204,113,0.15);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 20px;
  color: var(--success);
  animation: popIn .4s ease;
}
@keyframes popIn { from{transform:scale(0.6);opacity:0} to{transform:scale(1);opacity:1} }
.success-title { font-size:1.4rem; font-weight:800; margin-bottom:12px; }
.success-msg { color:var(--text-2); font-size:14.5px; line-height:1.6; margin-bottom:28px; }
.btn-success-close {
  background: var(--accent); color: #0a0a12;
  border: none; border-radius: var(--r-sm);
  padding: 12px 28px; font-size:14px; font-weight:700; cursor:pointer;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-2); font-size: 15px;
}

/* Footer */
.public-footer {
  text-align:center; padding:24px;
  color:var(--text-3); font-size:12px;
  border-top:1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════
   FORMS (shared)
   ═══════════════════════════════════════════════════════ */
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-label { font-size:13px; font-weight:600; color:var(--text-2); letter-spacing:.3px; text-transform:uppercase; }
.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14.5px;
  transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.form-input::placeholder { color: var(--text-3); }
.form-input-sm { width: auto; padding: 7px 12px; font-size:13px; }
select.form-input { cursor: pointer; }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-hint { font-size:12px; color:var(--text-3); }
.form-hint-inline { font-size:11px; color:var(--text-3); font-weight:400; }
.required { color:var(--accent); }
.optional { color:var(--text-3); font-weight:400; }

.form-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  display: none;
  margin-top: 8px;
}
.form-error.visible,
.form-error:not(:empty) { display: block; }

.input-error { border-color: #e74c3c !important; }
.field-error-msg {
  display: block;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
}

/* Submit button */
.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #0a0a12;
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t), transform var(--t), opacity var(--t);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 8px;
}
.btn-submit:hover { background: var(--accent-l); transform: translateY(-1px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.loader {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: #0a0a12;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════ */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 60% 30%, rgba(201,168,76,0.08) 0%, transparent 60%), var(--bg);
}
.login-wrap { width: 100%; max-width: 400px; padding: 24px; }
.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 40px;
  box-shadow: var(--shadow);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.2rem; font-weight: 800;
  color: var(--text); margin-bottom: 24px;
}
.login-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.login-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: 28px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-error {
  background: rgba(231,76,60,0.1);
  border: 1px solid rgba(231,76,60,0.3);
  color: #e74c3c; border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 13.5px; margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════ */
.admin-body { background: var(--bg); }
.admin-wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  transition: transform 0.25s ease;
  z-index: 100;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 20px 20px;
  font-size: 1.05rem; font-weight: 800;
  border-bottom: 1px solid var(--border);
}
.logo-text { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); padding: 12px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: background var(--t), color var(--t);
}
.nav-item:hover { background: var(--bg-card); color: var(--text); }
.nav-item.active { background: rgba(201,168,76,0.1); color: var(--accent); font-weight: 600; }
.nav-link-box { padding: 10px 12px; background: var(--bg-card); border-radius: var(--r-sm); margin: 4px 0; }
.link-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.link-url { font-size: 13px; color: var(--accent); word-break: break-all; }

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.user-badge { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(201,168,76,0.2);
  color: var(--accent); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-role { font-size: 11px; color: var(--text-3); }
.logout-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); padding: 7px 10px;
  border-radius: var(--r-sm); transition: background var(--t), color var(--t);
}
.logout-btn:hover { background: rgba(231,76,60,0.1); color: #e74c3c; }

/* Admin main */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 14px;
}
.page-title { font-size: 1.1rem; font-weight: 700; }
.sidebar-toggle {
  display: none; background: none; border: none;
  color: var(--text-2); cursor: pointer; padding: 6px;
  border-radius: 6px; align-items: center; justify-content: center;
}
.admin-content { padding: 28px; flex: 1; }

/* Flash */
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; font-size: 14px; font-weight: 500;
  border-radius: 0;
  border-bottom: 1px solid transparent;
}
.flash-success { background: rgba(46,204,113,0.12); border-color: rgba(46,204,113,0.25); color: #2ecc71; }
.flash-error   { background: rgba(231,76,60,0.12);  border-color: rgba(231,76,60,0.25);  color: #e74c3c; }
.flash-close { background:none; border:none; cursor:pointer; font-size:14px; color:inherit; padding:2px 6px; border-radius:4px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 20px;
  display: flex; align-items: center; gap: 16px;
}
.stat-icon { font-size: 1.5rem; }
.stat-value { font-size: 1.8rem; font-weight: 900; letter-spacing: -1px; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* Link share box */
.link-share-box {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--r);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.link-share-label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.link-share-url { font-size: 14.5px; font-weight: 700; color: var(--accent); word-break: break-all; }
.btn-copy {
  background: rgba(201,168,76,0.15); color: var(--accent);
  border: 1px solid rgba(201,168,76,0.3); border-radius: var(--r-sm);
  padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: background var(--t);
}
.btn-copy:hover { background: rgba(201,168,76,0.25); }

/* Table card */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.table-card-title { font-size: 1rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.data-table th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .td-muted { color: var(--text-2); }
.data-table .td-mono { font-family: monospace; font-size: 13px; }
.data-table .td-date { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.data-table .actions { white-space: nowrap; }
.empty-table { text-align: center; padding: 40px; color: var(--text-3); font-size: 14px; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: capitalize;
}
.status-pending   { background: rgba(243,156,18,0.15);  color: #f39c12; }
.status-contacted { background: rgba(52,152,219,0.15);  color: #3498db; }
.status-sold      { background: rgba(46,204,113,0.15);  color: #2ecc71; }
.status-cancelled { background: rgba(231,76,60,0.12);   color: #e74c3c; }
.status-expired   { background: rgba(100,100,100,0.15); color: #888; }

/* Row tint */
.row-sold td      { opacity: .75; }
.row-cancelled td { opacity: .55; }
.row-expired td   { opacity: .45; }

/* Filter tabs */
.filter-tabs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r) var(--r) 0 0;
  padding: 12px 16px;
  border-bottom: none;
  margin-top: 0;
}
.filter-tab {
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; color: var(--text-2); transition: background var(--t), color var(--t);
}
.filter-tab:hover { background: var(--bg-card-h); color: var(--text); }
.filter-tab.active { background: rgba(201,168,76,0.15); color: var(--accent); font-weight: 600; }
.tab-count { font-size: 11px; opacity: .7; }

/* Inline status select */
.inline-status-form { margin: 0; }
.status-select {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  padding: 5px 10px; font-size: 12.5px; cursor: pointer;
  width: auto;
}

/* Buttons */
.btn-primary {
  background: var(--accent); color: #0a0a12;
  border: none; border-radius: var(--r-sm);
  padding: 9px 20px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: background var(--t), transform var(--t);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-l); transform: translateY(-1px); }

.btn-sm {
  display: inline-block;
  padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-card-h); color: var(--text-2);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.btn-sm:hover { background: var(--border); color: var(--text); }
.btn-danger { background: rgba(231,76,60,0.1); color: #e74c3c; border-color: rgba(231,76,60,0.2); }
.btn-danger:hover { background: rgba(231,76,60,0.2); color: #e74c3c; }
.btn-warning { background: rgba(243,156,18,0.1); color: #f39c12; border-color: rgba(243,156,18,0.2); }

/* Page actions */
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.filter-row { display: flex; align-items: center; gap: 12px; width: 100%; justify-content: space-between; }
.filter-form { display: flex; }

/* WA link */
.wa-link { color: #25d366; font-size: 13px; }
.wa-link:hover { color: #1aaa52; }

/* Modals */
.modal-bg {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,10,18,0.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}
.modal-bg.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 20px;
  transform: translateY(12px); transition: transform 0.2s ease;
}
.modal-bg.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-header button, .modal-close {
  background: none; border: none; color: var(--text-2); font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.modal-header button:hover, .modal-close:hover { background: var(--border); color: var(--text); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .sidebar-toggle { display: flex; }
  .admin-content { padding: 16px; }
  .admin-topbar { padding: 12px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .filter-tabs { flex-wrap: wrap; }
  .hero-content { padding: 40px 16px 36px; }
  .form-panel-inner { padding: 20px 16px; }
  .table-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .login-box { padding: 28px 20px; }
}
