/* ==========================================================================
   KANVAST 2026 — SMAN 3 PADANG COMPETITION PORTAL
   Design System: 60-30-10 Golden Rule, CSS Variables, Modular Foundations
   Craft Standard: Impeccable UI/UX — Clean typography, accessible contrast, natural easing
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Pixelify+Sans:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Silkscreen:wght@400;700&display=swap');
@import url('./landing.css');
@import url('./portal.css');

:root {
  /* Font Family Definitions */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-pixel: 'Pixelify Sans', 'Silkscreen', 'Courier New', monospace;
  /* ==========================================================================
     60-30-10 COLOR ARCHITECTURE RULE
     60% Dominant Canvas | 30% Secondary Structure | 10% Accent Sparks
     ========================================================================== */
  
  /* 60% Dominant: Immersive Midnight Canvas & Atmospheric Deep Space */
  --c-dom-bg: #061c38;
  --c-dom-canvas: radial-gradient(ellipse at 50% 0%, rgba(6, 28, 56, 0.2) 0%, rgba(3, 23, 48, 0.6) 55%, rgba(2, 18, 38, 0.94) 100%);
  --c-dom-surface: rgba(255, 255, 255, 0.94);
  --c-dom-glass: rgba(255, 255, 255, 0.92);
  --c-dom-border: rgba(255, 255, 255, 0.85);

  /* 30% Secondary: Structure, Frosted Card Foundations & High Contrast Typography */
  --primary-navy: #061c38;
  --primary-deep: #021226;
  --text-dark: #0f172a;
  --text-body: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --text-white: #ffffff;
  
  /* Surfaces & Glass Containers */
  --surface-white: #ffffff;
  --surface-card: rgba(255, 255, 255, 0.94);
  --surface-card-hover: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --surface-glass-dark: rgba(6, 28, 56, 0.85);
  --surface-overlay: rgba(2, 18, 38, 0.75);

  /* 10% Accent: Dynamic Sparks, Primary CTAs & Semantic Status */
  --brand-blue: #0077b6;
  --brand-cyan: #00b4d8;
  --brand-cyan-glow: rgba(0, 210, 255, 0.4);
  --brand-yellow: #ffb703;
  --brand-orange: #fb8500;
  --brand-green: #10b981;
  --brand-red: #ef4444;
  
  /* Badges */
  --badge-smp-bg: #2563eb;
  --badge-smp-text: #ffffff;
  --badge-sma-bg: #059669;
  --badge-sma-text: #ffffff;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Borders & Shadows */
  --border-light: rgba(226, 232, 240, 0.9);
  --border-cyan: rgba(0, 180, 216, 0.4);
  --shadow-sm: 0 2px 8px rgba(6, 28, 56, 0.06);
  --shadow-md: 0 10px 25px -3px rgba(6, 28, 56, 0.12), 0 4px 10px -2px rgba(6, 28, 56, 0.06);
  --shadow-lg: 0 20px 40px -6px rgba(6, 28, 56, 0.18), 0 8px 16px -4px rgba(6, 28, 56, 0.1);
  --shadow-xl: 0 28px 60px -12px rgba(2, 18, 38, 0.28);
  --shadow-glow: 0 0 25px var(--brand-cyan-glow);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;

  /* Transitions — Natural exponential deceleration */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-spring: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Device Safe Area Insets (Mobile Notches & Gesture Bars) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ==========================================
   RESET & BROWSER SURFACES
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: #03152c;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Touch & Tap responsiveness across all smartphones & tablets */
a, button, input, select, textarea, [role="button"], label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

::selection {
  background: #0077b6;
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(6, 28, 56, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 216, 0.4);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 180, 216, 0.75);
}

:focus-visible {
  outline: 2.5px solid #00d2ff;
  outline-offset: 2px;
}

/* ==========================================
   DYNAMIC PARALLAX BACKGROUND LAYER
   Full-bleed coverage with smooth perceptible scroll movement
   ========================================== */
.parallax-bg-layer {
  position: fixed;
  top: -14vh;
  left: -3vw;
  width: 106vw;
  height: 128vh;
  background-color: #03152c;
  background-image: 
    radial-gradient(ellipse at 50% 12%, rgba(0, 210, 255, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 85% 25%, rgba(192, 38, 211, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 15% 55%, rgba(14, 165, 233, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(168, 85, 247, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, rgba(6, 28, 56, 0.05) 0%, rgba(4, 22, 46, 0.32) 50%, rgba(2, 16, 36, 0.65) 100%),
    url('/assets/img/backgroundpc.webp');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  pointer-events: none;
  z-index: -2;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

/* Atmospheric Living Ambient Aura Lights */
body::before {
  content: '';
  position: fixed;
  top: 8%;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: min(850px, 90vw);
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(0, 210, 255, 0.18) 0%, rgba(168, 85, 247, 0.12) 45%, transparent 70%);
  filter: blur(65px);
  pointer-events: none;
  z-index: -1;
  animation: auraFloat 10s ease-in-out infinite alternate;
  will-change: transform;
}

body::after {
  content: '';
  position: fixed;
  bottom: 12%;
  right: 4%;
  width: min(520px, 80vw);
  height: 520px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.14) 0%, rgba(14, 165, 233, 0.1) 50%, transparent 70%);
  filter: blur(75px);
  pointer-events: none;
  z-index: -1;
  animation: auraFloatRev 12s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes auraFloat {
  0% { transform: translate3d(-50%, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(-48%, 20px, 0) scale(1.08); opacity: 0.95; }
  100% { transform: translate3d(-52%, -18px, 0) scale(0.96); opacity: 0.75; }
}

@keyframes auraFloatRev {
  0% { transform: translate3d(0, 0, 0) scale(0.96); opacity: 0.65; }
  50% { transform: translate3d(-20px, -15px, 0) scale(1.06); opacity: 0.9; }
  100% { transform: translate3d(12px, 12px, 0) scale(1); opacity: 0.7; }
}

/* Mobile responsive background & Ultra-low-overhead mode */
@media (max-width: 768px) {
  .parallax-bg-layer {
    background-image: 
      radial-gradient(ellipse at 50% 10%, rgba(0, 210, 255, 0.18) 0%, transparent 55%),
      radial-gradient(circle at 80% 30%, rgba(192, 38, 211, 0.15) 0%, transparent 45%),
      radial-gradient(circle at 20% 70%, rgba(14, 165, 233, 0.14) 0%, transparent 45%),
      linear-gradient(180deg, rgba(6, 28, 56, 0.05) 0%, rgba(4, 22, 46, 0.35) 50%, rgba(2, 16, 36, 0.68) 100%),
      url('/assets/img/backgroundhp.webp');
    background-size: cover;
    background-position: center top;
  }

  /* Lightweight static ambient lighting on mobile (0% CPU, zero GPU battery drain) */
  body::before,
  body::after {
    animation: none !important;
    filter: blur(15px) !important;
    opacity: 0.45 !important;
    transform: none !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================
   LAYOUT CONTAINERS & SPACING
   ========================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section-padding { padding: 3.5rem 0; }
}

/* ==========================================
   BUTTONS & CTAs
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              color 0.2s ease,
              border-color 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  will-change: transform, box-shadow;
}

@media (max-width: 768px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #023e8a 0%, #0096c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 180, 216, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #04172f;
  box-shadow: 0 4px 15px rgba(251, 133, 0, 0.35);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(251, 133, 0, 0.45);
}

.btn-outline-navy {
  background: #ffffff;
  color: var(--primary-navy);
  border: 1.5px solid var(--primary-navy);
  box-shadow: var(--shadow-sm);
}

.btn-outline-navy:hover {
  background: var(--primary-navy);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(6, 28, 56, 0.2);
}

.btn-outline-white {
  background: transparent;
  color: var(--text-white);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

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

.btn-outline-primary {
  background: transparent;
  color: var(--brand-blue);
  border: 1.5px solid var(--brand-blue);
}

.btn-outline-primary:hover {
  background: rgba(0, 119, 182, 0.08);
}

.btn-success {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled, .btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================
   MODAL WINDOW SYSTEM
   ========================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 20, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--trans-normal), visibility var(--trans-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--trans-spring);
  position: relative;
}

.modal-backdrop.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box-lg { max-width: 880px; }
.modal-box-xl { max-width: 1040px; }

.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #334155;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

@media (max-width: 768px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal-box {
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
  }
  .modal-backdrop.active .modal-box { transform: translateY(0); }
  .modal-header { padding: 1.25rem 1.25rem 1rem; }
  .modal-body { padding: 1.25rem 1.25rem; }
  .modal-footer { padding: 1rem 1.25rem 1.5rem; flex-direction: column-reverse; border-radius: 0; }
  .modal-footer .btn { width: 100%; }
}

/* ==========================================
   FORMS & INPUT FIELDS
   ========================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 0.4rem;
}

.form-label-req {
  color: var(--brand-red);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-control:focus {
  outline: none;
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.form-control-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

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

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  
  /* Prevent iOS auto-zoom when focusing inputs */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  select,
  textarea,
  .form-control {
    font-size: 16px !important;
  }
}

.form-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Dynamic Team Members Box */
.team-members-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.team-member-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .team-member-row { grid-template-columns: 1fr 1fr; }
}

/* Password Toggle Eye Button */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 2.85rem !important;
}

.btn-toggle-password {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.35rem;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  outline: none;
}

.btn-toggle-password:hover {
  color: #0077b6;
  background-color: #f1f5f9;
}

.btn-toggle-password:active {
  transform: translateY(-50%) scale(0.92);
}

.btn-toggle-password svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* Auth Modal Tabs */
.auth-tab-nav {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.65rem 0.5rem;
  border-radius: calc(var(--radius-md) - 4px);
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn:hover { color: #0077b6; }
.auth-tab-btn.active { background: #ffffff; color: #0077b6; box-shadow: var(--shadow-sm); }

/* ==========================================
   BADGES & STATUS PILLS
   ========================================== */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-smp { background-color: #2563eb; color: #ffffff; }
.badge-sma { background-color: #047857; color: #ffffff; }
.badge-status-open { background-color: #dcfce7; color: #15803d; font-weight: 700; }
.badge-status-full { background-color: #fee2e2; color: #b91c1c; font-weight: 700; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-paid { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-waiting { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.status-unpaid { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.status-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.status-checkedin { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ==========================================
   E-TICKET & REGISTRATION CARDS
   ========================================== */
.ticket-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(6, 28, 56, 0.05);
  overflow: hidden;
  margin-bottom: 2.25rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  will-change: transform, box-shadow;
}

.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -4px rgba(6, 28, 56, 0.12);
  border-color: #cbd5e1;
}

.ticket-header {
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ticket-brand {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0077b6;
  text-transform: uppercase;
}

.ticket-body {
  padding: 2.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

.ticket-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.ticket-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ticket-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticket-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.ticket-qr-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
}

.ticket-qr-img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  background: #ffffff;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.ticket-token {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  background: #e2e8f0;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .ticket-body { grid-template-columns: 1fr; gap: 2rem; }
  .ticket-qr-wrap { width: 100%; }
}

/* ==========================================
   TOAST NOTIFICATION (REFINED & MODERN)
   ========================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1rem 1.35rem;
  box-shadow: 0 20px 40px -4px rgba(2, 18, 38, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  transform: translateY(-50px) scale(0.9);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  max-width: 440px;
}

.toast.toast-success {
  border-left: 5px solid #10b981;
}

.toast.toast-error {
  border-left: 5px solid #ef4444;
}

.toast.toast-warning {
  border-left: 5px solid #f59e0b;
}

.toast.toast-info {
  border-left: 5px solid #0284c7;
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast.dismissing {
  transform: translateY(-30px) scale(0.92);
  opacity: 0;
  pointer-events: none;
}

.toast-close-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  transition: all 0.15s ease;
}

@media (max-width: 576px) {
  .toast-container {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    align-items: stretch;
  }
  .toast {
    width: 100%;
    max-width: 100%;
  }
}

/* ==========================================
   EMPTY STATES & SPINNERS
   ========================================== */
.empty-state-box {
  text-align: center;
  padding: 3.5rem 2rem;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1.5px dashed #cbd5e1;
  box-shadow: 0 4px 16px rgba(6, 28, 56, 0.03);
}

.empty-state-icon {
  font-size: 2.75rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.92rem;
  color: #64748b;
  max-width: 440px;
  margin: 0 auto 1.5rem;
  line-height: 1.55;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.75s ease-in-out infinite;
}

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

/* ==========================================
   E-TICKET PRINT STYLES (@media print)
   ========================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .navbar, .footer, .toast-container, .user-nav-tabs,
  .user-sidebar, .user-topbar, .user-sidebar-backdrop,
  .user-profile-banner, .admin-stats-grid, .btn,
  .modal-close-btn, .filter-tabs, .section-header p {
    display: none !important;
  }
  .user-main-wrapper, .admin-main-wrapper {
    margin-left: 0 !important;
  }
  .ticket-card {
    box-shadow: none !important;
    border: 2px solid #000000 !important;
    page-break-inside: avoid;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .ticket-header {
    background: #f1f5f9 !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==========================================
   MODERN TOGGLE SWITCH (iOS-STYLE)
   ========================================== */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-toggle .slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border-radius: 34px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-toggle .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-toggle input:checked + .slider {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  box-shadow: 0 2px 8px rgba(0, 180, 216, 0.35);
}

.switch-toggle input:focus + .slider {
  box-shadow: 0 0 1px #0077b6;
}

.switch-toggle input:checked + .slider:before {
  transform: translateX(22px);
}

/* ==========================================
   ADMIN SUBJECT / SUB-CATEGORY MANAGER
   ========================================== */
.admin-subject-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg);
  min-height: 52px;
  align-items: center;
}

.admin-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: chipIn 0.25s ease;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.admin-subject-chip:hover {
  border-color: #00b4d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 180, 216, 0.15);
}

.admin-subject-chip .chip-icon {
  font-size: 1.1rem;
}

.admin-subject-chip .chip-delete-btn {
  background: #fee2e2;
  border: none;
  color: #dc2626;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  margin-left: 0.25rem;
  transition: all 0.15s ease;
}

.admin-subject-chip .chip-delete-btn:hover {
  background: #dc2626;
  color: #ffffff;
  transform: scale(1.15);
}

.admin-preset-tag {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-preset-tag:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #38bdf8;
  border-style: solid;
}

/* ==========================================
   CUSTOM CONFIRMATION POPUP (BESPOKE SWEETALERT STYLE)
   ========================================== */
.confirm-popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 20, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-popup-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.confirm-popup-card {
  background: #ffffff;
  border-radius: var(--radius-2xl, 24px);
  width: 100%;
  max-width: 480px;
  padding: 2.25rem 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(2, 18, 38, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-popup-backdrop.active .confirm-popup-card {
  transform: translateY(0) scale(1);
}

.confirm-popup-close-btn {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-popup-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.1);
}

.confirm-popup-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2);
  animation: popupIconPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupIconPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-popup-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #03254c;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.confirm-popup-msg {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.confirm-popup-detail {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-lg, 16px);
  padding: 1rem 1.15rem;
  text-align: left;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.confirm-popup-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.confirm-popup-actions .btn {
  flex: 1;
  padding: 0.85rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  .confirm-popup-card {
    padding: 1.75rem 1.25rem;
  }
  .confirm-popup-icon-wrap {
    width: 60px;
    height: 60px;
    font-size: 1.85rem;
  }
  .confirm-popup-title {
    font-size: 1.25rem;
  }
  .confirm-popup-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .confirm-popup-actions .btn {
    width: 100%;
  }
}


/* Browser Autofill Styling Neutralizer */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
  -webkit-text-fill-color: #0f172a !important;
  transition: background-color 5000s ease-in-out 0s;
}


