/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080810;
  --surface: #0f0f1a;
  --surface2: #161624;
  --surface3: #1e1e30;
  --border: rgba(255, 255, 255, 0.06);
  --border2: rgba(255, 255, 255, 0.10);
  --gold: #e8b84b;
  --gold-dim: rgba(232, 184, 75, 0.12);
  --gold-glow: rgba(232, 184, 75, 0.25);
  --green: #3fd68c;
  --green-dim: rgba(63, 214, 140, 0.12);
  --red: #f06060;
  --red-dim: rgba(240, 96, 96, 0.12);
  --blue: #5b9cf6;
  --blue-dim: rgba(91, 156, 246, 0.12);
  --purple: #9b7cf8;
  --text: #ddddf0;
  --text-dim: #7e7e99;
  --text-faint: #3d3d55;
  --sans: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(63, 214, 140, 0.4); }
  70% { transform: scale(1.1); opacity: 0; box-shadow: 0 0 0 10px rgba(63, 214, 140, 0); }
  100% { transform: scale(0.95); opacity: 0; box-shadow: 0 0 0 0 rgba(63, 214, 140, 0); }
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 80px;
}

/* ── BACKGROUND ── */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(232, 184, 75, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 85% 85%, rgba(91, 156, 246, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 50% 50%, rgba(155, 124, 248, 0.03) 0%, transparent 60%);
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 62px;
  background: rgba(8, 8, 16, 0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 639px) {
  .navbar {
    padding: 0 16px;
    height: 56px;
  }
}

.nav-brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 3px;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 12px;
  }
}

/* ── PROFESSIONAL ICONS ── */
.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  stroke-width: 2.5;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.icon-sm { width: 0.9em; height: 0.9em; stroke-width: 2; }
.icon-lg { width: 1.5em; height: 1.5em; }

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--text-faint);
  stroke-width: 1.5;
}

.nav-brand span {
  color: var(--gold);
}

.nav-profile-desktop {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 768px) {
  .nav-profile-desktop {
    display: none;
  }
}

.btn-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
}

.btn-menu svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .btn-menu {
    display: flex;
  }
}

@media (max-width: 639px) {
  .nav-profile { gap: 8px; }
  .nav-profile .btn {
    padding: 6px 10px;
    font-size: 11px;
  }
}

.nav-email {
  font-size: 13px;
  color: var(--text-dim);
  display: none;
}

@media (min-width: 640px) {
  .nav-email {
    display: block;
  }
}

/* ── BADGE ── */
.badge {
  padding: 3px 9px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
  border: 1px solid var(--border2);
}

.badge.superadmin {
  background: rgba(155, 124, 248, 0.15);
  color: var(--purple);
  border-color: rgba(155, 124, 248, 0.3);
}

.badge.admin {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(91, 156, 246, 0.3);
}

.badge.user {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(63, 214, 140, 0.3);
}

/* ── LAYOUT ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 639px) {
  .container {
    padding: 24px 16px 0;
    gap: 16px;
  }
}

.view {
  animation: fadeUp 0.35s ease both;
}

.view-active {
  display: block;
}

/* ── GLASS CARD ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
}

@media (max-width: 639px) {
  .glass-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
}

/* ── AUTH CARD ── */
.auth-card {
  max-width: 420px;
  margin: 60px auto 0;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  padding: 11px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--gold-dim);
  color: var(--gold);
}

.auth-tab:not(.active):hover {
  background: var(--surface3);
  color: var(--text);
}

.card-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-header p {
  color: var(--text-dim);
  font-size: 13px;
}

/* ── PENDING ── */
.pending-icon {
  font-size: 48px;
}

/* ── ADMIN TABS ── */
.tabs {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--surface);
}

.tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.tab.active {
  background: var(--gold-dim);
  color: var(--gold);
}

.tab:not(.active):hover {
  background: var(--surface3);
  color: var(--text);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  margin-left: 6px;
  vertical-align: middle;
}

/* ── PANELS ── */
.admin-panel {
  display: none;
}

.admin-panel.active-panel {
  display: block;
}

/* ── PANEL HEADER ── */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 20px;
  font-weight: 700;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.filter-select {
  flex: 1;
  min-width: 140px;
  padding: 9px 36px 9px 12px;
  background: var(--surface2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8b84b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition);
}

.filter-input {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition);
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--gold-glow);
}

/* Specific styling for Date inputs in filter bar */
.filter-bar input[type="date"] {
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8b84b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.filter-bar input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  color: transparent;
  background: transparent;
}

.filter-select option {
  background: var(--surface2);
}

/* ── FORM ── */
.form-group {
  margin-top: 16px;
}

.form-group label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--text-faint);
  display: block;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.required {
  color: var(--red);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 7px;
}

.form-label-row label {
  margin-bottom: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group select {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8b84b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(232, 184, 75, 0.5);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-group select option {
  background: var(--surface2);
}

/* ── PASSWORD TOGGLE ── */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 44px !important;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-dim);
  opacity: 0.5;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-password:hover {
  opacity: 1;
  color: var(--gold);
}

.btn-toggle-password svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

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

.input-lg {
  font-size: 18px !important;
  text-align: center;
  letter-spacing: 3px;
  padding: 16px !important;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 20px;
}

.error-msg {
  min-height: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  margin-top: 10px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.8px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-weight: 600;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.w-100 {
  width: 100%;
}

.mt-4 {
  margin-top: 20px;
}

.mt-3 {
  margin-top: 14px;
}

.mt-2 {
  margin-top: 8px;
}

.btn-primary {
  background: var(--gold);
  color: #080810;
}

.btn-primary:hover {
  background: #f0c45c;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-outline {
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border2);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.btn-outline-primary {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(232, 184, 75, 0.3);
}

.btn-outline-primary:hover {
  background: rgba(232, 184, 75, 0.2);
}

.btn-outline-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240, 96, 96, 0.3);
}

.btn-outline-danger:hover {
  background: rgba(240, 96, 96, 0.2);
}

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(63, 214, 140, 0.3);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 11px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 10px;
}

/* ── TABLES ── */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--sans);
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border2);
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-dim);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--surface2);
  color: var(--text);
}

.data-table .actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── BROADCAST ── */
.broadcast-card {
  max-width: 560px;
  margin: 0 auto;
}

.broadcast-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.broadcast-card .text-muted {
  margin-top: 6px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.progress-bar-container {
  height: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f5cb72);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-logs {
  margin-top: 16px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.progress-logs .log-entry {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  gap: 8px;
}

.progress-logs .log-entry:last-child {
  border-bottom: none;
}

/* ── MODALS ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--surface3);
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── PERMISSIONS GRID ── */
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.perm-toggle,
label.perm-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
}

.perm-toggle:hover {
  border-color: var(--gold-glow);
}

.perm-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.perm-toggle span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  line-height: normal;
}

.perm-toggle:has(input:checked) {
  background: var(--gold-dim);
  border-color: rgba(232, 184, 75, 0.4);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 11px 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-bottom: 2px solid var(--green);
}

.toast.error {
  border-bottom: 2px solid var(--red);
}

/* ── MISC ── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}

.spinner-black {
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  border-top-color: #000000 !important;
}

.spinner-white {
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  border-top-color: #ffffff !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--mono);
}

.link-sm {
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}

.link-sm:hover {
  color: var(--gold);
}

hr {
  border: none;
  height: 1px;
  background: var(--border2);
  margin: 22px 0;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(232, 184, 75, 0.2);
  letter-spacing: 1px;
}

.tag.success {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(63, 214, 140, 0.2);
}

.tag.error {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(240, 96, 96, 0.2);
}

.text-success {
  color: var(--green);
}

.text-danger {
  color: var(--red);
}

.text-warning {
  color: var(--gold);
}

.text-muted {
  color: var(--text-dim);
}

.text-center {
  text-align: center;
}

/* ── EMPTY STATE ── */
.empty-state {
  padding: 40px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── PAGINATION ── */
.pagination-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.btn-page {
  padding: 9px 18px;
  background: var(--gold-dim);
  border: 1px solid rgba(232, 184, 75, 0.2);
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-page:not(:disabled):hover {
  background: rgba(232, 184, 75, 0.25);
  border-color: rgba(232, 184, 75, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 184, 75, 0.15);
}

.btn-page:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text-faint);
}

.page-info {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-weight: 500;
}

/* ── DRAWER ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.35s ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: 280px;
  z-index: 1001;
  background: rgba(10, 10, 18, 0.8);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-left: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
}

.drawer.hidden {
  transform: translateX(100%);
  display: flex !important;
  pointer-events: none;
}

.drawer-header {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.drawer-user-info {
  padding: 24px 20px;
  background: rgba(255, 255, 255, 0.03);
}

.drawer-email {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  word-break: break-all;
}

.drawer-links {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.drawer-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.drawer-link.logout {
  color: var(--red);
}

.drawer-link span {
  font-size: 16px;
}

.empty-state {
  padding: 40px !important;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 13px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .nav-profile-desktop {
    display: none;
  }
  
  .btn-menu {
    display: flex;
  }

  .pagination-footer {
    gap: 12px;
    padding: 18px 12px;
  }

  .btn-page {
    min-width: 80px;
    padding: 7px 12px;
    font-size: 10px;
  }

  .filter-bar {
    flex-direction: column;
    gap: 10px;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: unset;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .permissions-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 20px 16px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .broadcast-card {
    max-width: 100%;
  }

  .data-table .actions-cell {
    flex-direction: column;
  }

  .btn-sm {
    width: 100%;
  }
}
/* ── BRANDING LOGOS ── */
.nav-logo {
  height: 24px;
  width: auto;
  margin-right: 10px;
  border-radius: 4px;
}

.auth-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.auth-logo {
  height: 100px;
  width: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px var(--gold-glow);
  border: 1px solid var(--border2);
}

.status-logo {
  height: 72px;
  width: auto;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
}

/* ── INITIATOR BADGE ── */
.initiator-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  gap: 10px;
}

.initiator-badge .info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  flex-wrap: wrap;
}

.initiator-badge .name {
  font-weight: 600;
  color: var(--gold);
}

.initiator-badge .email {
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--mono);
}

.initiator-badge .time {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.initiator-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@media (max-width: 580px) {
  .initiator-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .initiator-badge .time {
    padding-top: 4px;
    border-top: 1px solid var(--border);
    width: 100%;
    justify-content: space-between;
  }
}
