/* MDLBEAST Government Affairs Portal - Theme-aware design system */

/* ---------- Theme: Dark Beast (default) ---------- */
:root,
body[data-theme="dark"] {
  --bg-primary: #07090d;
  --bg-dark: #05070a;
  --bg-card: #0d1117;
  --bg-elevated: #151d2b;
  --header-bg: rgba(7, 9, 13, 0.92);
  --header-border: #243041;
  --text-primary: #f3f4f6;
  --text-secondary: #b8c0cc;
  --text-muted: #a7b0bf;
  --text-heading: #ffffff;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-glow-soft: rgba(59, 130, 246, 0.1);
  --accent-muted: rgba(59, 130, 246, 0.18);
  --nav-hover: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(13, 17, 23, 0.95);
  --glass-border: #243041;
  --border-soft: #243041;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.25s ease;
  --shadow-deep: 0 20px 36px rgba(0, 0, 0, 0.42);
  --shadow-glow: 0 0 20px var(--accent-glow-soft);
  --input-bg: #111827;
  --input-border: #243041;
  --table-header-bg: #151d2b;
  --row-hover-bg: rgba(255, 255, 255, 0.05);
  --success-tone: #34c38f;
  --warning-tone: #f59e0b;
  --danger-tone: #ef4444;
}

/* ---------- Theme: Rose ---------- */
body[data-theme="rose"] {
  --bg-primary: #110b10;
  --bg-dark: #0d080c;
  --bg-card: #181018;
  --bg-elevated: #2a1a26;
  --header-bg: rgba(17, 11, 16, 0.92);
  --header-border: #4a2b3b;
  --text-primary: #f8f1f5;
  --text-secondary: #d4c4cf;
  --text-muted: #c7aebb;
  --text-heading: #fff7fb;
  --accent: #d16b9a;
  --accent-hover: #e48ab1;
  --accent-glow: rgba(209, 107, 154, 0.25);
  --accent-glow-soft: rgba(209, 107, 154, 0.12);
  --accent-muted: rgba(209, 107, 154, 0.2);
  --nav-hover: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(24, 16, 24, 0.95);
  --glass-border: #4a2b3b;
  --border-soft: #4a2b3b;
  --shadow-deep: 0 20px 36px rgba(0, 0, 0, 0.5);
  --input-bg: #21151f;
  --input-border: #4a2b3b;
  --table-header-bg: #2a1a26;
  --row-hover-bg: rgba(255, 255, 255, 0.04);
  --success-tone: #34c38f;
  --warning-tone: #e48ab1;
  --danger-tone: #e11d48;
}

/* ---------- Theme: Emerald ---------- */
body[data-theme="emerald"] {
  --bg-primary: #08110d;
  --bg-dark: #050c08;
  --bg-card: #0e1713;
  --bg-elevated: #193026;
  --header-bg: rgba(8, 17, 13, 0.92);
  --header-border: #29463a;
  --text-primary: #eef7f1;
  --text-secondary: #c5d9cc;
  --text-muted: #aac2b5;
  --text-heading: #ffffff;
  --accent: #34c38f;
  --accent-hover: #56d9a5;
  --accent-glow: rgba(52, 195, 143, 0.25);
  --accent-glow-soft: rgba(52, 195, 143, 0.12);
  --accent-muted: rgba(52, 195, 143, 0.2);
  --nav-hover: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(14, 23, 19, 0.95);
  --glass-border: #29463a;
  --border-soft: #29463a;
  --shadow-deep: 0 20px 36px rgba(0, 0, 0, 0.45);
  --input-bg: #13211b;
  --input-border: #29463a;
  --table-header-bg: #193026;
  --row-hover-bg: rgba(255, 255, 255, 0.04);
  --success-tone: #34c38f;
  --warning-tone: #56d9a5;
  --danger-tone: #ef4444;
}

/* ---------- Theme: Light Inverted ---------- */
body[data-theme="light"] {
  --bg-primary: #f4f6f8;
  --bg-dark: #eef2f5;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --header-bg: rgba(244, 246, 248, 0.95);
  --header-border: #d6dde5;
  --text-primary: #17212b;
  --text-secondary: #4a5568;
  --text-muted: #5f6b76;
  --text-heading: #0f1720;
  --accent: #1f6feb;
  --accent-hover: #1558c0;
  --accent-glow: rgba(31, 111, 235, 0.2);
  --accent-glow-soft: rgba(31, 111, 235, 0.08);
  --accent-muted: rgba(31, 111, 235, 0.12);
  --nav-hover: rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: #d6dde5;
  --border-soft: #d6dde5;
  --shadow-deep: 0 20px 36px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(31, 111, 235, 0.08);
  --input-bg: #ffffff;
  --input-border: #d6dde5;
  --table-header-bg: #eef2f5;
  --row-hover-bg: rgba(0, 0, 0, 0.03);
  --success-tone: #059669;
  --warning-tone: #d97706;
  --danger-tone: #dc2626;
}

/* Light theme: ensure utility classes stay readable */
body[data-theme="light"] .text-white {
  color: var(--text-heading) !important;
}
body[data-theme="light"] .btn-outline-light {
  border-color: var(--border-soft);
  color: var(--text-primary);
}
body[data-theme="light"] .btn-outline-light:hover {
  background: var(--row-hover-bg);
  border-color: var(--text-muted);
  color: var(--text-heading);
}

/* ========== 1) GLOBAL DESIGN SYSTEM ========== */

.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0) 100%), var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--accent-glow-soft) inset;
}

.contact-card-emergency {
  border-color: var(--accent);
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--accent-glow-soft) inset;
}

.premium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep);
  transition: var(--transition);
}

.premium-card:hover {
  box-shadow: var(--shadow-deep), 0 0 30px rgba(0, 214, 143, 0.1);
}

.neon-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0.5;
  margin: 1rem 0;
}

.soft-border {
  border: 1px solid var(--border-soft);
}

.futuristic-heading {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.subtle-grid-background {
  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: 40px 40px;
}

.glow-hover:hover {
  box-shadow: 0 0 24px var(--accent-glow);
}

.premium-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
  color: #ffffff !important;
  font-weight: 600;
  border: none !important;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  transition: var(--transition);
}

.premium-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--accent-glow);
}

.premium-input {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-sm);
  color: var(--text-primary) !important;
  transition: var(--transition);
}

.premium-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
  outline: none !important;
}

/* ========== 10) MICRO ANIMATIONS ========== */

.glass-card,
.premium-card,
.stat-card {
  transition: var(--transition);
}

.glass-card:hover,
.premium-card:hover {
  transform: translateY(-1px);
}

/* ========== 2) BACKGROUND DESIGN ========== */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
}

body:not([data-theme="light"]) {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.04), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.03), transparent 36%),
    var(--bg-primary);
}

h1 {
  font-weight: 700;
  letter-spacing: -0.018em;
}

h2,
h3 {
  font-weight: 600;
  letter-spacing: 0.012em;
}

p {
  font-weight: 400;
  line-height: 1.68;
  letter-spacing: 0.004em;
}

button,
input,
select,
textarea,
.btn,
.navbar,
.card,
.table,
.form-control,
.form-select {
  font-family: inherit;
}

body:not([data-theme="light"])::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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: 72px 72px;
  pointer-events: none;
  z-index: 0;
}

body[data-theme="light"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
}

main .container {
  max-width: 1260px;
}

main {
  flex: 1;
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

/* ========== 3) NAVBAR REDESIGN ========== */

.portal-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 0;
  min-height: 62px;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}

.portal-header .container {
  max-width: 1260px;
  min-height: 62px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: var(--transition);
}

.portal-brand:hover {
  color: var(--text-primary) !important;
  opacity: 0.94;
}

.portal-brand-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

@media (max-width: 576px) {
  .portal-brand-logo {
    height: 36px;
  }
}

.portal-brand-text {
  white-space: nowrap;
}

.portal-brand-short {
  display: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.portal-nav .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 11px 12px !important;
  border-radius: 6px;
  transition: var(--transition);
}

.portal-nav .nav-link:hover {
  color: var(--text-heading) !important;
  background: var(--nav-hover);
  box-shadow: none;
}

.portal-nav .nav-link.active {
  color: var(--accent) !important;
  background: var(--accent-muted);
}

.portal-cta {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--accent) !important;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px !important;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.36) !important;
  transition: var(--transition);
}

.portal-cta:hover {
  transform: none;
  box-shadow: none;
  background: var(--accent-muted) !important;
  color: var(--text-heading) !important;
}

@media (max-width: 991.98px) {
  .portal-brand-text .full-name { display: none; }
  .portal-brand-short { display: inline; }
  .portal-nav { padding: 1rem 0; }
  .portal-cta { margin-top: 0.5rem; width: 100%; text-align: center; }
}

/* Alerts - dark theme */
.alert {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #eef2f7;
}

/* Bootstrap warning overrides to remove yellow usage */
.text-warning {
  color: var(--accent) !important;
}

.bg-warning {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #eef2f7 !important;
}

.border-warning {
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert .btn-close {
  filter: invert(1);
}

/* ========== 6) BUTTONS ========== */

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
  border: 1px solid var(--accent-hover) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px var(--accent-glow-soft);
  color: #ffffff !important;
}

.btn-outline-primary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent !important;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--accent-muted) !important;
  border-color: var(--accent);
  color: var(--accent-hover);
  box-shadow: none;
}

.btn-outline-secondary {
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  background: transparent !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.services-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.services-filter-tabs .btn {
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.service-card-item .glass-card,
#servicesCatalogFull .glass-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.service-card-item .glass-card:hover,
#servicesCatalogFull .glass-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--accent-glow-soft) inset;
}

.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
}

.service-drone-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* ========== 7) FORM DESIGN ========== */

.form-control,
.form-select {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-sm);
  color: var(--text-primary) !important;
  padding: 11px 14px;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow-soft) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}

/* ========== 5) REQUEST TABLE ========== */

.table {
  color: var(--text-primary);
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.table th {
  border-bottom-width: 1px;
  border-color: var(--border-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.table td {
  border-color: var(--border-soft);
}

.table thead th {
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 18px 20px;
}

.table tbody td {
  border-bottom: 1px solid var(--border-soft);
  padding: 18px 20px;
  vertical-align: middle;
  transition: var(--transition);
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--row-hover-bg);
}

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

/* Reference ID as gold tag */
.table code,
.admin-dashboard-table code {
  background: rgba(255, 255, 255, 0.13) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--accent) !important;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.85rem;
  font-weight: 500;
}

/* My Requests page */
.my-requests-card {
  margin-top: 1.5rem;
}

.my-requests-ref {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--accent);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.btn-premium-view {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: var(--accent) !important;
}

.btn-premium-view:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: var(--accent) !important;
  color: var(--accent-hover) !important;
}

.my-requests-empty {
  margin-top: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.my-requests-empty-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 1rem;
}

.my-requests-empty-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ========== 8) TIMELINE DESIGN (Mission progress bar) ========== */

.request-timeline {
  margin: 1.5rem 0;
  padding: 1.5rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-deep);
  transition: var(--transition);
}

.request-timeline-track {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .request-timeline-track {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0 0.5rem;
  }
}

.request-timeline-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .request-timeline-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }
}

.request-timeline-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.request-timeline-step-completed .request-timeline-node {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 14px var(--accent-glow);
}

.request-timeline-icon {
  font-size: 0.9rem;
  font-weight: 700;
}

.request-timeline-step-current .request-timeline-node {
  background: transparent;
  border: 2px solid var(--accent);
  box-shadow: 0 0 16px rgba(0, 214, 143, 0.5);
}

.request-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: timeline-pulse 2s ease-in-out infinite;
}

@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 16px var(--accent-glow); }
  50% { box-shadow: 0 0 24px var(--accent-glow), 0 0 32px rgba(0, 214, 143, 0.22); }
}

.request-timeline-dot-future {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  animation: none;
}

.request-timeline-step-future .request-timeline-node {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.request-timeline-step-current.request-timeline-step-rejected .request-timeline-node {
  border-color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.request-timeline-step-current.request-timeline-step-rejected .request-timeline-dot {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.request-timeline-step-current.request-timeline-step-rejected .request-timeline-label {
  color: #fca5a5;
}

.request-timeline-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.request-timeline-step-completed .request-timeline-label {
  color: var(--accent);
  opacity: 0.9;
}

.request-timeline-step-current .request-timeline-label {
  color: var(--text-primary);
  font-weight: 600;
}

.request-timeline-connector {
  display: none;
}

@media (min-width: 992px) {
  .request-timeline-connector {
    display: block;
    width: 20px;
    min-width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    align-self: center;
    margin: 0 2px;
  }

  .request-timeline-connector-filled {
    background: var(--accent);
    opacity: 0.6;
  }

  .request-timeline-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Compact timeline for My Requests table */
.request-timeline-compact {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.request-timeline-compact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.request-timeline-compact-dot-completed {
  background: var(--accent);
  opacity: 0.8;
}

.request-timeline-compact-dot-current {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0, 214, 143, 0.6);
}

.request-timeline-compact-dot-future {
  background: rgba(255, 255, 255, 0.15);
}

.request-timeline-compact-dot-rejected {
  background: #ef4444 !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5) !important;
}

/* Compact horizontal layout for many stages - hide connector on mobile, show as list */
@media (max-width: 991px) {
  .request-timeline-step {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .request-timeline-step:last-child {
    border-bottom: none;
  }
}

/* Status badges */
.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.status-badge.bg-success { background: rgba(34, 197, 94, 0.2) !important; color: #86efac !important; }
.status-badge.bg-danger { background: rgba(239, 68, 68, 0.2) !important; color: #fca5a5 !important; }
.status-badge.bg-primary {
  background: rgba(0, 214, 143, 0.2) !important;
  color: #8df5cc !important;
  border: 1px solid rgba(0, 214, 143, 0.35);
}
.status-badge.bg-warning { background: rgba(255, 255, 255, 0.18) !important; color: #eef2f7 !important; }

/* Operational status badges */
.status-badge.status-submitted { background: var(--accent-muted) !important; color: var(--accent) !important; }
.status-badge.status-draft { background: rgba(148, 163, 184, 0.2) !important; color: #cbd5e1 !important; }
.status-badge.status-review { background: rgba(59, 130, 246, 0.2) !important; color: #93c5fd !important; }
.status-badge.status-documents { background: rgba(249, 115, 22, 0.2) !important; color: #fdba74 !important; }
.status-badge.status-payment { background: rgba(255, 255, 255, 0.18) !important; color: #eef2f7 !important; }
.status-badge.status-approved { background: rgba(34, 197, 94, 0.2) !important; color: #86efac !important; }
.status-badge.status-rejected { background: rgba(239, 68, 68, 0.2) !important; color: #fca5a5 !important; }
.status-badge.status-completed { background: rgba(168, 85, 247, 0.2) !important; color: #c4b5fd !important; }
.status-badge.status-documents-uploaded { background: rgba(34, 197, 94, 0.2) !important; color: #86efac !important; }
.status-badge.status-internal-approved { background: rgba(20, 184, 166, 0.2) !important; color: #99f6e4 !important; }
.status-badge.status-authority-sent { background: rgba(147, 51, 234, 0.2) !important; color: #d8b4fe !important; }
.status-badge.status-authority-received { background: rgba(139, 92, 246, 0.2) !important; color: #ddd6fe !important; }
.status-badge.status-authority-review { background: rgba(245, 158, 11, 0.2) !important; color: #fcd34d !important; }
.status-badge.status-permit-issued { background: rgba(21, 128, 61, 0.28) !important; color: #86efac !important; border: 1px solid rgba(34, 197, 94, 0.36); }
.status-badge.status-pending { background: rgba(255, 255, 255, 0.18) !important; color: #eef2f7 !important; }

/* ========== 4) DASHBOARD METRICS CARDS ========== */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: var(--transition);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.46);
  transform: translateY(-1px);
}

.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card.stat-total .stat-value { color: var(--text-primary); }
.stat-card.stat-submitted .stat-value { color: var(--accent); }
.stat-card.stat-documents-uploaded .stat-value { color: #86efac; }
.stat-card.stat-review .stat-value { color: #93c5fd; }
.stat-card.stat-documents .stat-value { color: #fdba74; }
.stat-card.stat-payment .stat-value { color: #8df5cc; }
.stat-card.stat-approved .stat-value { color: #86efac; }
.stat-card.stat-rejected .stat-value { color: #fca5a5; }
.stat-card.stat-completed .stat-value { color: #c4b5fd; }

/* Filter bar */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-deep);
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--accent);
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

/* Footer */
.portal-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--header-border);
  color: var(--text-muted);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
  margin-top: 3rem;
}

.portal-footer-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.portal-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.portal-footer-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.portal-footer-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 0.03em;
}

.portal-footer-note {
  margin: 0;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.portal-footer-col-title {
  display: block;
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.45rem;
}

.portal-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-footer-links li + li {
  margin-top: 0.3rem;
}

.portal-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.portal-footer-links a:hover {
  color: var(--text-primary);
}

.portal-footer-bottom {
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--header-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Hero */
.hero-section {
  padding: 4.8rem 0 3.4rem;
  text-align: center;
  position: relative;
}

.home-section {
  margin-bottom: 4rem !important;
}

.home-hero-strip {
  border-radius: 999px;
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

.home-quick-action {
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  min-width: 140px;
}
.home-quick-action:hover {
  color: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.home-dashboard-card {
  border-radius: var(--radius-sm);
}
.home-dashboard-card .card-body {
  padding: 0.6rem 0.75rem !important;
}

.home-tile-card .card-body,
.home-info-card,
.home-benefit-card {
  padding: 1.55rem !important;
}

.home-tile-card .card-title,
.home-benefit-card .card-title {
  letter-spacing: -0.01em;
}

.home-calendar-card {
  overflow: hidden;
}

.calendar-nav-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.calendar-current-month {
  min-width: 138px;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.calendar-grid-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-weekday {
  padding: 0.72rem 0.5rem;
  text-align: center;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.56);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-weekday:last-child {
  border-right: 0;
}

.calendar-grid-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day-cell {
  min-height: 112px;
  padding: 0.45rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.01);
}

.calendar-day-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-day-cell.is-empty {
  background: rgba(255, 255, 255, 0.006);
}

.calendar-day-cell.has-events {
  background: rgba(255, 255, 255, 0.02);
}

.calendar-day-cell.is-today .calendar-day-number {
  color: #06130f;
  background: #00d68f;
}

.calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  font-size: 0.74rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.3rem;
}

.calendar-event-list {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
}

.calendar-event-item {
  font-size: 0.66rem;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
  border-radius: 5px;
  padding: 0.2rem 0.36rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event-item.dot-event {
  background: rgba(0, 214, 143, 0.2);
  border: 1px solid rgba(0, 214, 143, 0.34);
}

.calendar-event-item.dot-deadline {
  background: rgba(223, 227, 234, 0.18);
  border: 1px solid rgba(223, 227, 234, 0.3);
}

.calendar-event-item.dot-permit-window {
  background: rgba(149, 181, 255, 0.16);
  border: 1px solid rgba(149, 181, 255, 0.28);
}

.calendar-event-item.dot-site {
  background: rgba(167, 139, 250, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.calendar-event-item.dot-meeting {
  background: rgba(115, 231, 191, 0.16);
  border: 1px solid rgba(115, 231, 191, 0.3);
}

.calendar-event-more {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.08rem 0.12rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.3rem;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.calendar-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  display: inline-block;
}

.calendar-dot.dot-event {
  background: #00d68f;
}

.calendar-dot.dot-deadline {
  background: #dfe3ea;
}

.calendar-dot.dot-permit-window {
  background: #95b5ff;
}

.calendar-dot.dot-site {
  background: #a78bfa;
}

.calendar-dot.dot-meeting {
  background: #73e7bf;
}

.calendar-type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.88);
}

.calendar-type-badge.type-event {
  background: rgba(0, 214, 143, 0.2);
  border-color: rgba(0, 214, 143, 0.34);
}

.calendar-type-badge.type-deadline {
  background: rgba(223, 227, 234, 0.18);
  border-color: rgba(223, 227, 234, 0.3);
}

.calendar-type-badge.type-permit_window {
  background: rgba(149, 181, 255, 0.16);
  border-color: rgba(149, 181, 255, 0.28);
}

.calendar-type-badge.type-site_visit {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.28);
}

.calendar-type-badge.type-meeting {
  background: rgba(115, 231, 191, 0.16);
  border-color: rgba(115, 231, 191, 0.3);
}

@media (max-width: 991.98px) {
  .calendar-day-cell {
    min-height: 96px;
  }

  .calendar-event-item {
    font-size: 0.61rem;
  }

  .calendar-current-month {
    min-width: 124px;
    font-size: 0.76rem;
  }
}

@media (max-width: 767.98px) {
  .calendar-grid-head,
  .calendar-grid-body {
    min-width: 700px;
  }

  .home-calendar-card .card-body {
    overflow-x: auto;
  }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.05rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  margin: 0 auto 0.5rem;
}

.hero-meta {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.6rem;
  font-weight: 600;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.section-title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-heading);
}

/* Page headers */
/* ========== 11) TYPOGRAPHY ========== */

.page-title,
h1.futuristic-heading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-heading);
}

.page-subtitle {
  color: var(--text-secondary);
  line-height: 1.7;
  letter-spacing: 0.01em;
  margin-bottom: 2.2rem;
}

@media (max-width: 991.98px) {
  .portal-footer-wrap {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* Dividers */
hr.border-secondary {
  border-color: var(--glass-border) !important;
}

/* Empty state */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Tracking page - prominent search */
.track-search-card {
  border: 1px solid var(--glass-border);
}

.track-search-input {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.track-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.track-search-btn {
  white-space: nowrap;
}

/* Tracking page - premium result card */
.track-result-card {
  border: 1px solid var(--glass-border);
}

.track-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem 2rem;
}

.track-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.track-result-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.track-result-value {
  font-size: 1rem;
  color: var(--text-primary);
}

.track-result-divider {
  border-color: var(--glass-border);
  margin: 1.5rem 0;
}

.status-badge-lg {
  font-size: 0.85rem;
  padding: 8px 14px;
}

.letter-spacing {
  letter-spacing: 0.08em;
}

/* Drone Permit - Required Documents section */
.drone-docs-section {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.drone-docs-checklist {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drone-doc-item {
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.drone-doc-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.drone-doc-item .form-label {
  color: var(--text-primary);
  font-weight: 500;
}

.drone-doc-item small.text-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Notifications */
.notification-unread {
  background: rgba(0, 214, 143, 0.05);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.portal-nav .nav-link.position-relative .badge {
  min-width: 1.2em;
}

/* Dark theme modals */
/* ========== 9) MODAL DESIGN ========== */

.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Safety: orphaned/inactive backdrops must never block interactions */
.modal-backdrop:not(.show) {
  pointer-events: none;
}

body:not(.modal-open) .modal-backdrop {
  display: none !important;
}

.modal-dark .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-deep), 0 0 40px rgba(0, 214, 143, 0.1);
}

.modal-dark .modal-header,
.modal-dark .modal-footer {
  border-color: var(--border-soft) !important;
}

.modal-dark .btn-close {
  filter: invert(1);
}

.modal-dark .form-check-input {
  background-color: var(--bg-elevated);
  border-color: var(--glass-border);
}

.modal-dark .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* Event Permit step pages - shared list style */

.prereq-section-list {
  padding-left: 1.35rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.65;
}

.prereq-section-list li {
  margin-bottom: 0.45rem;
}

.prereq-section-list li:last-child {
  margin-bottom: 0;
}

.btn-premium-outline {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.btn-premium-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.rules-acknowledgement-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.7;
}

.rules-acknowledgement-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.rules-acknowledgement-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.rules-acknowledgement-list li:last-child {
  margin-bottom: 0;
}

.acknowledgement-confirm-section {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}

.acknowledgement-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem 0;
}

/* Custom checkbox - clearly visible on dark background */
.acknowledgement-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.acknowledgement-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.acknowledgement-checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 214, 143, 0.5);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  position: relative;
}

.acknowledgement-checkbox-wrap:hover .acknowledgement-checkbox-custom {
  border-color: var(--accent);
  background: rgba(0, 214, 143, 0.08);
}

.acknowledgement-checkbox:checked + .acknowledgement-checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 214, 143, 0.4);
}

.acknowledgement-checkbox:checked + .acknowledgement-checkbox-custom::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.acknowledgement-checkbox-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* =====================================================
   Event Permit Form - Premium Dark Futuristic
   ===================================================== */
.event-permit-form-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.event-permit-form-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.event-permit-form-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 214, 143, 0.3);
}

.event-permit-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.event-permit-form-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.breadcrumb-premium .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-premium .breadcrumb-item a:hover {
  color: var(--accent);
}

.breadcrumb-premium .breadcrumb-item.active {
  color: var(--accent);
}

/* Form section cards */
.form-section-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.form-section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 214, 143, 0.18), transparent);
  opacity: 0.6;
}

.form-section-card:hover {
  border-left-color: rgba(0, 214, 143, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 214, 143, 0.08) inset;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.form-section-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 214, 143, 0.08);
  border: 1px solid rgba(0, 214, 143, 0.2);
  border-radius: 6px;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
  letter-spacing: -0.01em;
}

.form-section-body {
  padding-left: 0.25rem;
}

.form-label-premium {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.4rem;
}

.form-label-premium .text-accent {
  color: var(--accent);
}

.form-control-premium {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.9rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-control-premium::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-control-premium:focus {
  border-color: rgba(0, 214, 143, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(0, 214, 143, 0.14) !important;
  outline: none !important;
}

.form-select-premium {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300d68f' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  padding-right: 2.25rem !important;
}

.form-value-display {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.form-helper-premium {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.form-file-premium {
  padding: 0.5rem !important;
}

.form-file-premium::-webkit-file-upload-button {
  background: rgba(0, 214, 143, 0.15);
  border: 1px solid rgba(0, 214, 143, 0.3);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-right: 0.75rem;
}

.form-file-premium::-webkit-file-upload-button:hover {
  background: rgba(0, 214, 143, 0.25);
}

.event-permit-docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .event-permit-docs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ticket table - Event Permit */
.ticket-table-wrap {
  overflow-x: auto;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
}

.ticket-table th {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-align: left;
}

.ticket-table td {
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.6rem;
  vertical-align: middle;
}

.ticket-table .form-control-sm {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  min-width: 0;
}

.ticket-table input[type="number"] {
  width: 80px;
}

.ticket-table input[type="text"].ticket-benefits {
  min-width: 120px;
}

.btn-ticket-remove {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

.btn-ticket-remove:hover {
  background: rgba(239, 68, 68, 0.25) !important;
}

.ticket-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-total-label {
  color: rgba(255, 255, 255, 0.6);
  margin-right: 0.5rem;
}

.ticket-attendance-warning {
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.ticket-legacy-helper {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-legacy-link {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition);
}

.ticket-legacy-link:hover {
  color: var(--accent);
}

.ticket-totals span:last-child {
  color: var(--accent);
  font-weight: 600;
}

/* Admin ticket table */
.admin-ticket-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.admin-ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-ticket-table th {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-align: left;
}

.admin-ticket-table td {
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.admin-ticket-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.admin-ticket-totals strong {
  color: var(--accent);
}

/* Admin user table */
.admin-user-table-wrap {
  overflow-x: auto;
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-user-table th {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-align: left;
}

.admin-user-table td {
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.admin-user-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.admin-user-actions .btn {
  padding: 0.25rem 0.5rem;
}

/* Tracking ticket summary */
.track-ticket-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
}

.track-ticket-cat {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.track-ticket-total {
  font-size: 0.9rem;
  color: var(--accent);
}

.event-permit-doc-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Conditional document fields - highlight when required */
.event-permit-doc-conditional.doc-required-active {
  padding: 1rem 1.25rem;
  background: rgba(0, 214, 143, 0.06);
  border: 1px solid rgba(0, 214, 143, 0.2);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.doc-required-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 214, 143, 0.15);
  border-radius: 4px;
}

.form-helper-conditional {
  color: var(--accent) !important;
  opacity: 0.9;
}

.event-permit-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-premium-submit {
  background: var(--accent) !important;
  border: none !important;
  color: var(--bg-dark) !important;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 0 24px rgba(0, 214, 143, 0.25),
              0 0 48px rgba(0, 214, 143, 0.1);
}

.btn-premium-submit:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 0 32px rgba(0, 214, 143, 0.35),
              0 0 64px rgba(0, 214, 143, 0.14);
  color: var(--bg-dark) !important;
}

/* Admin: Event Permit detail - premium dark layout */
.admin-event-permit-wrap {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.admin-event-permit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-detail-card {
  margin-bottom: 1.25rem;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

.admin-detail-item-full {
  grid-column: 1 / -1;
}

.admin-detail-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.admin-detail-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.admin-doc-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-doc-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  background: rgba(0, 214, 143, 0.08);
  border: 1px solid rgba(0, 214, 143, 0.2);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.admin-doc-link:hover {
  background: rgba(0, 214, 143, 0.15);
  border-color: rgba(0, 214, 143, 0.4);
  color: var(--accent-hover);
}

.admin-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-meta-item {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Internal Notes section */
.admin-notes-card {
  margin-bottom: 0;
}

.admin-notes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-note-item {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border-left: 3px solid rgba(0, 214, 143, 0.4);
}

.admin-note-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.admin-note-author {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.admin-note-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.admin-note-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  white-space: pre-wrap;
}

.admin-notes-empty {
  padding: 0.5rem 0;
}

.admin-note-textarea {
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

.admin-note-textarea:focus {
  border-color: rgba(0, 214, 143, 0.4) !important;
}

.btn-premium-note {
  background: rgba(0, 214, 143, 0.15) !important;
  border: 1px solid rgba(0, 214, 143, 0.3) !important;
  color: var(--accent) !important;
}

.btn-premium-note:hover {
  background: rgba(0, 214, 143, 0.25) !important;
  border-color: var(--accent) !important;
  color: var(--accent-hover) !important;
}

/* Dashboard: highlight assigned rows */
.admin-row-assigned {
  background: rgba(0, 214, 143, 0.04);
  border-left: 3px solid rgba(0, 214, 143, 0.3);
}

/* Activity log */
.admin-activity-card {
  margin-bottom: 0;
}

.admin-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-activity-item {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 0.85rem;
}

.admin-activity-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.admin-activity-action {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.8rem;
}

.admin-activity-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.admin-activity-details {
  color: rgba(255, 255, 255, 0.7);
}

.admin-activity-actor {
  color: rgba(255, 255, 255, 0.9);
  margin-right: 0.5rem;
}

/* Tracking: Event Permit premium layout */
.track-result-event-permit .card-body {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.track-event-permit-sections {
  margin-top: 0.5rem;
}

.track-event-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.track-event-section-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.track-event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

.track-event-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.2rem;
}

.track-event-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.track-event-doc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.track-event-doc-item {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.track-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Auth login redesign */
body.auth-page {
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.05), transparent 35%),
    linear-gradient(160deg, #040404 0%, #090909 42%, #050505 100%);
}

body.auth-page::before {
  background-image: none;
}

.portal-header.auth-header {
  position: static;
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.portal-header.auth-header .container {
  min-height: 72px;
}

.portal-header.auth-header .portal-brand {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.portal-header.auth-header .portal-brand-logo {
  height: 26px;
}

.auth-header-locale {
  margin-left: auto;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

main .auth-main-container {
  max-width: 100%;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.auth-login-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-login-card {
  width: 100%;
  max-width: 430px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(80, 80, 90, 0.15) 0%, rgba(26, 26, 30, 0.86) 100%),
    rgba(20, 20, 22, 0.9);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.52);
}

.auth-login-card-body {
  padding: 1.5rem 1.2rem 1.15rem;
}

.auth-login-header {
  margin-bottom: 1.35rem;
}

.auth-login-eyebrow {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
}

.auth-login-title {
  font-size: clamp(1.24rem, 2.2vw, 1.5rem);
  font-weight: 650;
  line-height: 1.2;
  color: #fff;
}

.auth-login-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

.auth-login-divider {
  width: 72px;
  height: 1px;
  margin: 0.8rem auto 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

.auth-login-form .form-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.auth-input {
  border-radius: 4px;
  background: #313138;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #fff;
  padding: 0.68rem 0.85rem;
  min-height: 40px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.auth-input:focus {
  background: #3a3a42;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 0.16rem rgba(255, 255, 255, 0.17);
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .auth-input {
  padding-right: 2.2rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  line-height: 1;
  padding: 0.2rem;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: rgba(255, 255, 255, 0.88);
}

.auth-login-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.66rem 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: #171717;
  background: #efefef;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-login-btn:hover,
.auth-login-btn:focus {
  transform: translateY(-0.5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
  filter: brightness(1.02);
  color: #0f0f0f;
}

.auth-login-links {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.auth-login-link {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-login-link:hover,
.auth-login-link:focus {
  color: rgba(255, 255, 255, 0.85);
}

.auth-login-dot {
  margin: 0 0.28rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 576px) {
  .portal-header.auth-header .portal-brand-logo {
    height: 24px;
  }

  .portal-header.auth-header .portal-brand .full-name {
    font-size: 0.76rem;
  }

  .auth-login-card {
    max-width: 100%;
  }

  .auth-login-card-body {
    padding: 1.35rem 0.95rem 1rem;
  }
}

/* Event tracker table UX refinements */
.tracker-events-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tracker-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.tracker-events-toolbar-meta {
  text-align: right;
}

.tracker-event-card {
  border-color: rgba(255, 255, 255, 0.08);
}

.tracker-event-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracker-event-logo {
  width: 100%;
  max-width: 120px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.4rem;
}

.tracker-event-logo-placeholder {
  width: 120px;
  height: 72px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tracker-event-name {
  min-height: 2.6rem;
}

.tracker-event-dates {
  line-height: 1.45;
}

.tracker-event-countdown-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.tracker-event-countdown-lg {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
}

.tracker-header-main {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(11, 15, 24, 0.96) 100%);
}

.tracker-header-logo-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.tracker-header-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.35rem;
}

.tracker-header-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tracker-event-code {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.58rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tracker-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  min-height: 88px;
}

.tracker-kpi-label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.tracker-kpi-value {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
}

.tracker-kpi-value-sm {
  font-size: 0.86rem;
  font-weight: 500;
}

.tracker-access-card {
  border-color: rgba(255, 255, 255, 0.08);
}

.tracker-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem;
}

/* Shared admin dark table system */
.admin-table-wrap {
  max-height: 72vh;
  overflow: auto;
  overflow-x: auto;
  background: rgba(7, 9, 14, 0.66);
}

.admin-dark-table {
  margin-bottom: 0;
  min-width: 980px;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-color: var(--text-primary);
}

.admin-dark-table > :not(caption) > * > * {
  background-color: transparent !important;
  color: var(--text-primary);
}

.admin-dark-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-header-bg) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
}

.admin-dark-table tbody tr {
  background: var(--bg-card);
}

.admin-dark-table tbody tr:hover {
  background: var(--row-hover-bg) !important;
}

.admin-dark-table tbody td {
  border-bottom: 1px solid var(--border-soft);
  padding: 15px 17px;
  vertical-align: middle;
}

.admin-dark-table tbody td:first-child {
  color: var(--text-heading) !important;
}

/* Scoped hardening for tracker/admin dark tables */
.tracker-table-scope .tracker-table,
.admin-events-table {
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-color: rgba(255, 255, 255, 0.9);
}

.tracker-table-scope .tracker-table > :not(caption) > * > *,
.admin-events-table > :not(caption) > * > * {
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.88);
}

.tracker-table-wrap {
  max-height: 68vh;
  overflow: auto;
  overflow-x: auto;
  background: rgba(7, 9, 14, 0.66);
}

.tracker-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 14, 20, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tracker-table {
  min-width: 1280px;
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-color: rgba(255, 255, 255, 0.9);
}

.tracker-table thead th,
.tracker-table tbody td {
  padding: 14px 16px;
  line-height: 1.45;
}

.tracker-table tbody tr {
  background: rgba(11, 14, 22, 0.72);
}

.tracker-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.tracker-table tbody td {
  vertical-align: middle;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent !important;
}

.tracker-table tbody td:first-child {
  color: #ffffff !important;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: transparent !important;
}

.admin-events-table-wrap {
  max-height: 72vh;
}

.admin-events-table {
  min-width: 980px;
}

.admin-events-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 14, 20, 0.96) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-events-table tbody tr {
  background: rgba(11, 14, 22, 0.72);
}

.admin-events-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.admin-events-table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 17px;
}

.admin-events-table tbody td:first-child,
.admin-events-table tbody td:nth-child(2),
.admin-events-table tbody td:first-child code,
.admin-events-table tbody td:nth-child(2) code {
  color: #ffffff !important;
  font-weight: 620;
}

.tracker-status-badge,
.tracker-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.69rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
}

.tracker-status-badge.status-open {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.3);
}

.tracker-status-badge.status-in_progress {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.3);
}

.tracker-status-badge.status-awaiting_review {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.3);
}

.tracker-status-badge.status-done,
.tracker-status-badge.status-completed {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.32);
}

.tracker-status-badge.status-blocked {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.3);
}

.tracker-priority-badge.priority-high,
.tracker-priority-badge.priority-critical {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.28);
}

.tracker-priority-badge.priority-medium {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.24);
}

.tracker-priority-badge.priority-low {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.24);
}

.tracker-row-overdue {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0.02)) !important;
}

.tracker-row-overdue td:first-child {
  border-left: 2px solid rgba(248, 113, 113, 0.44);
}

.tracker-due-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.tracker-due-badge.due-overdue {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.tracker-due-badge.due-soon {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.32);
  color: #fcd34d;
}

.tracker-inline-status-form {
  margin: 0;
}

.tracker-inline-status-form .tracker-inline-status-select {
  min-width: 150px;
  background: rgba(12, 16, 25, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.tracker-inline-status-form .tracker-inline-status-select:focus {
  background: rgba(16, 20, 31, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) !important;
}

.recent-task-btn {
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
}

.task-filter-input {
  font-size: 0.88rem;
}

.user-filter-input {
  font-size: 0.85rem;
}

.event-form-logo-preview {
  max-width: 140px;
  max-height: 84px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
}

/* Event form date/time UX refresh */
.event-date-field {
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.event-date-field .gregorian-input,
.event-date-field .hijri-picker .form-select {
  min-height: 44px;
}

.show-period-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.show-period-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.show-period-calendar-select {
  width: 220px;
}

.show-period-field-premium {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.24);
}

.show-period-gregorian-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.75rem;
}

.show-period-gregorian-row .show-period-greg-date-input,
.show-period-gregorian-row .show-period-greg-time,
.show-period-hijri-picker .show-period-hijri-time,
.show-period-hijri-picker .show-period-hijri-year,
.show-period-hijri-picker .show-period-hijri-month,
.show-period-hijri-picker .show-period-hijri-day {
  min-height: 44px;
}

.show-period-hijri-preview {
  color: rgba(255, 255, 255, 0.58) !important;
  font-size: 0.76rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 0.4rem;
}

@media (max-width: 767.98px) {
  .show-period-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .show-period-calendar-select {
    width: 100%;
  }

  .show-period-gregorian-row {
    grid-template-columns: 1fr;
  }
}

.tracker-empty-state {
  max-width: 460px;
  margin: 0 auto;
}

.tracker-empty-icon {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.55rem;
}

@media (max-width: 991.98px) {
  .tracker-events-toolbar-meta {
    text-align: left;
  }

  .tracker-toolbar {
    padding: 0.9rem 1rem;
  }
}

.dual-calendar-field {
  display: block;
}

.dual-calendar-datetime-field {
  display: block;
}

.dual-calendar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.dual-calendar-meta .calendar-system-select {
  width: 120px;
}

.hijri-date-subtext {
  margin-top: 0.12rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* ---------- Theme switcher ---------- */
.theme-switcher-dropdown .dropdown-toggle {
  color: var(--text-secondary) !important;
  font-size: 0.78rem;
  padding: 8px 10px !important;
  border-radius: 6px;
  transition: var(--transition);
}
.theme-switcher-dropdown .dropdown-toggle:hover {
  color: var(--text-heading) !important;
  background: var(--nav-hover);
}
.theme-switcher-dropdown .dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  min-width: 180px;
}
.theme-switcher-dropdown .dropdown-item {
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-switcher-dropdown .dropdown-item:hover {
  background: var(--row-hover-bg);
}
.theme-switcher-dropdown .dropdown-item.active {
  background: var(--accent-muted);
  color: var(--accent);
}
.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border-soft);
}
.theme-swatch--dark { background: #0d1117; }
.theme-swatch--rose { background: #21151f; }
.theme-swatch--emerald { background: #13211b; }
.theme-swatch--light { background: #f4f6f8; }
