:root {
  --bg-deep: #0b051c;
  --bg-primary: #11092b;
  --bg-surface: #1b0f3f;
  --bg-card: #22134e;
  --bg-card-hover: #2c1963;
  --border-subtle: rgba(245, 166, 35, 0.22);
  --border-purple: rgba(167, 139, 250, 0.24);
  --gold: #f5a623;
  --gold-bright: #ffb834;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #b4a7d6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top right, #26115a 0%, var(--bg-primary) 52%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

.hidden { display: none !important; }
.mono { font-family: var(--mono); }

/* Auth Gate */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #1d0e44 0%, #140933 100%);
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 30px 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid var(--gold);
}
.brand-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
}
.brand-lockup h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
}
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-purple);
  background: rgba(11, 5, 28, 0.85);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
}
.auth-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 12.5px;
}
.auth-footer-links a { color: var(--gold-bright); text-decoration: none; font-weight: 600; }
.muted-note { color: var(--text-muted); font-size: 12px; }

.unauthorized-box {
  text-align: center;
  padding: 16px 8px;
}
.lock-icon { font-size: 40px; margin-bottom: 8px; }
.unauthorized-box h2 { margin: 0 0 8px; font-size: 20px; }
.unauthorized-box p { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }

/* Banners */
.banner {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.banner.error { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.5); color: #fecaca; }
.banner.success { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.5); color: #bbf7d0; }
.banner.info { background: rgba(245, 166, 35, 0.14); border-color: rgba(245, 166, 35, 0.55); color: #fde68a; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.btn-gold { background: linear-gradient(135deg, var(--gold) 0%, #e08d0c 100%); color: #11092b; }
.btn-green { background: linear-gradient(135deg, var(--green) 0%, #15803d 100%); color: #fff; }
.btn-danger { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.55); color: #fecaca; }
.btn-outline { background: rgba(255, 255, 255, 0.06); border-color: var(--border-purple); color: var(--text-main); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Shell */
.admin-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: rgba(17, 9, 43, 0.96);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 30;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-purple);
}
.brand-mini { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mini img { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--gold); }
.brand-mini .title { font-weight: 800; font-size: 15px; color: #fff; }
.brand-mini .sub { font-size: 11px; color: var(--gold); font-weight: 700; }
.sidebar-search { padding: 12px 14px 8px; }
.sidebar-search input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-purple);
  background: var(--bg-deep);
  color: #fff;
  font-size: 13px;
}
.sidebar-search input:focus { outline: none; border-color: var(--gold); }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 16px;
}
.nav-group-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--gold);
  padding: 12px 10px 6px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 3px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-item.active {
  background: rgba(245, 166, 35, 0.15);
  border-color: rgba(245, 166, 35, 0.5);
  color: var(--gold-bright);
}
.nav-num {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-purple);
  display: flex;
  gap: 8px;
}
.sidebar-footer .btn { flex: 1; }

/* Main Column */
.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(17, 9, 43, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.breadcrumb { font-size: 11.5px; color: var(--gold); font-weight: 700; }
.page-title { margin: 2px 0 0; font-size: 19px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.role-badge {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  border: 1px solid var(--gold);
  background: rgba(245, 166, 35, 0.16);
  color: var(--gold-bright);
}
.role-badge.super { border-color: var(--green); background: rgba(34, 197, 94, 0.18); color: #86efac; }
.admin-identity { text-align: right; }
.id-email { font-size: 13px; font-weight: 700; }
.id-meta { font-size: 11px; color: var(--text-muted); }

.workspace { padding: 22px 24px 48px; display: flex; flex-direction: column; gap: 20px; }

/* Cards & Grids */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; color: #fff; }
.kpi-card .kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.kpi-card .kpi-value { font-size: 26px; font-weight: 800; margin: 6px 0 4px; font-family: var(--mono); color: var(--gold-bright); }
.kpi-card .kpi-sub { font-size: 11.5px; color: var(--text-muted); }

.module-group-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 6px 0 10px;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 12px;
}
.module-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-purple);
  border-radius: 13px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.module-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.module-tile-top { display: flex; justify-content: space-between; align-items: center; }
.module-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.16);
  color: var(--gold-bright);
  font-weight: 700;
}
.module-tile-title { font-weight: 800; font-size: 14px; }
.module-tile-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Tables & Forms */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}
table.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gold);
}
.status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}
.status-pill.ok { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.status-pill.warn { background: rgba(245, 166, 35, 0.2); color: #fde68a; }
.status-pill.bad { background: rgba(239, 68, 68, 0.2); color: #fecaca; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row .field { flex: 1; min-width: 170px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.perm-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(11, 5, 28, 0.75);
  border: 1px solid var(--border-purple);
  font-size: 12px;
  cursor: pointer;
}

.toast {
  margin: 12px 24px 0;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.toast.ok { background: rgba(34, 197, 94, 0.18); border: 1px solid var(--green); color: #bbf7d0; }
.toast.err { background: rgba(239, 68, 68, 0.18); border: 1px solid var(--red); color: #fecaca; }

.hamburger, .icon-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-purple);
  color: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
}
.hidden-desktop { display: none; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .hidden-desktop { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    left: -310px;
    top: 0;
    width: 290px;
    transition: left 0.2s ease;
  }
  .sidebar.open { left: 0; }
  .workspace { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

.module-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(27, 15, 63, 0.9);
  border: 1px solid var(--border-purple);
}
.module-subbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.tab-pill {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-purple);
  background: rgba(11, 5, 28, 0.72);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tab-pill:hover { color: #fff; border-color: var(--gold); }
.tab-pill.active {
  background: rgba(245, 166, 35, 0.2);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.kyc-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.kyc-media-card {
  background: rgba(11, 5, 28, 0.75);
  border: 1px solid var(--border-purple);
  border-radius: 12px;
  padding: 10px;
}
.kyc-media-card .label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.kyc-media-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
}
.kyc-media-placeholder {
  height: 150px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Dedicated Live Banners & Core Team Announcements Modules */
.admin-hub-spotlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.spotlight-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(245, 166, 35, 0.45);
  background: linear-gradient(145deg, rgba(44, 25, 99, 0.92), rgba(22, 9, 54, 0.96));
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.spotlight-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-bright);
}
.spotlight-card .spotlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.spotlight-card .spotlight-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.spotlight-card .spotlight-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mode-tab {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-purple);
  background: rgba(11, 5, 28, 0.8);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.mode-tab.active {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.24), rgba(106, 49, 153, 0.4));
  border-color: var(--gold);
  color: #fff;
}

.upload-dropzone {
  border: 1.5px dashed rgba(245, 166, 35, 0.55);
  border-radius: 12px;
  padding: 16px;
  background: rgba(11, 5, 28, 0.65);
  text-align: center;
  cursor: pointer;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--gold-bright);
  background: rgba(245, 166, 35, 0.08);
}

.preview-frame-shell {
  border-radius: 14px;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: #160936;
  padding: 12px;
  overflow: hidden;
}
.preview-sandbox-iframe {
  width: 100%;
  min-height: 200px;
  border: none;
  border-radius: 10px;
  background: #160936;
  display: block;
}

.banner-list-item {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 12px;
  background: rgba(11, 5, 28, 0.72);
  border: 1px solid var(--border-purple);
  margin-bottom: 10px;
}
.banner-thumb {
  width: 104px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #160936;
  flex-shrink: 0;
}

.ann-preview-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(35, 16, 82, 0.92), rgba(20, 9, 48, 0.96));
  padding: 16px;
}
.verified-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
}
.pin-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.22);
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 800;
}

/* Top Admin Management Quick Tabs */
.admin-quick-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  background: rgba(14, 7, 36, 0.88);
  border-bottom: 1px solid var(--border-purple);
}
.admin-quick-tab {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-purple);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.admin-quick-tab:hover {
  color: #fff;
  border-color: var(--gold);
}
.admin-quick-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, #e08d0c 100%);
  border-color: var(--gold);
  color: #11092b;
  font-weight: 800;
}

.field-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.char-counter {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Mobile Lock-Screen Preview */
.lockscreen-phone-frame {
  border-radius: 26px;
  border: 2px solid rgba(167, 139, 250, 0.32);
  background: radial-gradient(circle at top, #2c1464 0%, #12092e 60%, #090418 100%);
  padding: 18px 14px 22px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}
.lockscreen-clock-bar {
  text-align: center;
  margin-bottom: 14px;
}
.lockscreen-time {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1.05;
}
.lockscreen-date {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.lockscreen-notif-card {
  background: rgba(23, 14, 52, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 166, 35, 0.48);
  border-radius: 16px;
  padding: 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.lockscreen-preview-img {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Confirmation Modal */
.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 2, 16, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-modal {
  width: 100%;
  max-width: 470px;
  background: linear-gradient(180deg, #21104c 0%, #140933 100%);
  border: 1.5px solid var(--gold);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.confirm-modal h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.confirm-modal-meta {
  background: rgba(11, 5, 28, 0.7);
  border: 1px solid var(--border-purple);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #e2e8f0;
}

@media print {
  .sidebar, .topbar, .admin-quick-tabs, .module-subbar, .btn, button, form { display: none !important; }
  .admin-shell { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { background: #fff !important; color: #000 !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .kpi-value { color: #000 !important; }
}

