/**
 * ==========================================================================
 * E-VOTING SMAN 4 BANDUNG — MASTER RESPONSIVE STYLESHEET
 * Optimized for:
 *   - Mobile Smartphones (320px - 480px: iPhone SE, Galaxy, Pixel)
 *   - Phablets & Foldables (481px - 767px)
 *   - Tablets (768px - 1024px: iPad Mini, iPad Air/Pro)
 *   - Laptops & Desktops (1025px - 1440px)
 *   - Aula Projectors & Big Screens (1920x1080, 2K, 4K)
 * ==========================================================================
 */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES (SMAN 4 BANDUNG OFFICIAL BRANDING)
   -------------------------------------------------------------------------- */
:root {
  /* Official Design Tokens */
  --color-deep-forest: #1F4D36;
  --color-dark-teal: #4C6556;
  --color-muted-gold: #C5A059;
  --color-terracotta: #8C3A27;
  --color-warm-white: #F4F1EA;

  /* Functional Palette */
  --primary-green: #1F4D36;
  --primary-hover: #153827;
  --secondary-teal: #4C6556;
  --accent-gold: #C5A059;
  --accent-gold-hover: #ad8a43;
  --accent-red: #8C3A27;
  --accent-red-hover: #732e1e;
  --bg-light: #F4F1EA;
  --bg-card: #FFFFFF;
  --bg-dark-view: #0A1F16;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-light: rgba(76, 101, 86, 0.15);

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(31, 77, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 77, 54, 0.10);
  --shadow-lg: 0 16px 36px rgba(31, 77, 54, 0.16);

  /* Transition Curves */
  --transition-smooth: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --------------------------------------------------------------------------
   2. UNIVERSAL RESET & RESPONSIVE FOUNDATION
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent image and media overflow across all screen sizes */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Prevent long unbroken text from overflowing card boundaries */
p, span, h1, h2, h3, h4, h5, h6, strong, div, td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Ensure mobile inputs do not trigger automatic iOS Safari zoom (requires >= 16px) */
@media (max-width: 767.98px) {
  input.form-control,
  select.form-select,
  textarea.form-control {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   3. BRANDING & NAVBAR RESPONSIVENESS
   -------------------------------------------------------------------------- */
.navbar-custom {
  background-color: var(--primary-green) !important;
  box-shadow: 0 4px 20px rgba(31, 77, 54, 0.2);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  transition: var(--transition-smooth);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  white-space: nowrap;
}

.badge-gold {
  background-color: var(--accent-gold);
  color: #1E293B;
  font-weight: 700;
}

/* Mobile voter bar (displays voter info cleanly on mobile) */
.mobile-voter-bar {
  background-color: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
}

/* --------------------------------------------------------------------------
   4. BUTTONS & TAP TARGETS (TOUCH-FRIENDLY)
   -------------------------------------------------------------------------- */
.btn {
  touch-action: manipulation;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-primary-green {
  background-color: var(--primary-green);
  color: #FFFFFF !important;
  border: none;
}

.btn-primary-green:hover,
.btn-primary-green:focus {
  background-color: var(--primary-hover);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(31, 77, 54, 0.3);
}

.btn-accent-gold {
  background-color: var(--accent-gold);
  color: #1E293B !important;
  font-weight: 700;
  border: none;
}

.btn-accent-gold:hover,
.btn-accent-gold:focus {
  background-color: var(--accent-gold-hover);
  color: #0F172A !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.4);
}

.btn-terracotta {
  background-color: var(--accent-red);
  color: #FFFFFF !important;
  border: none;
}

.btn-terracotta:hover {
  background-color: var(--accent-red-hover);
  color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   5. LOGIN PORTAL RESPONSIVENESS
   -------------------------------------------------------------------------- */
.login-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.login-card {
  border: none;
  border-radius: clamp(14px, 3vw, 24px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: #FFFFFF;
}

.login-header {
  background: linear-gradient(135deg, var(--color-deep-forest) 0%, #153827 100%);
  color: #FFFFFF;
  padding: clamp(1.75rem, 5vw, 2.5rem) 1.25rem;
  text-align: center;
}

.login-header .brand-title {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
}

/* Responsive Login Nav Tabs */
.login-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  background: #F1F5F9;
  padding: 0.35rem;
  border-radius: 12px;
}

.login-nav .nav-item {
  flex: 1 1 0;
  text-align: center;
}

.login-nav .nav-link {
  color: #64748B;
  font-weight: 700;
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  border-radius: 9px;
  padding: clamp(8px, 1.8vw, 11px) clamp(6px, 1.5vw, 14px);
  white-space: nowrap;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.login-nav .nav-link.active {
  background-color: var(--primary-green);
  color: #FFFFFF !important;
  box-shadow: 0 4px 10px rgba(31, 77, 54, 0.2);
}

/* --------------------------------------------------------------------------
   6. VOTER BOOTH (BILIK SUARA) & PASLON CARDS
   -------------------------------------------------------------------------- */
.paslon-card {
  border: none;
  border-radius: clamp(16px, 3vw, 24px);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
}

.paslon-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.paslon-number-badge {
  position: absolute;
  top: clamp(10px, 2.5vw, 18px);
  left: clamp(10px, 2.5vw, 18px);
  width: clamp(42px, 8vw, 56px);
  height: clamp(42px, 8vw, 56px);
  background: var(--accent-gold);
  color: #1E293B;
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.45);
  z-index: 10;
  border: 2px solid #FFFFFF;
}

/* Fluid Candidate Photo Container (never breaks on any device) */
.paslon-img-container {
  width: 100%;
  height: clamp(210px, 38vw, 320px);
  overflow: hidden;
  background: linear-gradient(180deg, #E2E8F0 0%, #CBD5E1 100%);
  position: relative;
}

.paslon-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.paslon-card:hover .paslon-img-container img {
  transform: scale(1.03);
}

/* Anti-Spy Vignette (Privacy guard from side onlookers in booth) */
.anti-spy-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  box-shadow: inset 0 0 100px 30px rgba(10, 31, 22, 0.45);
  transition: opacity 0.3s ease;
}

/* --------------------------------------------------------------------------
   7. PROYECTOR VIEW (AULA DISPLAY & MOBILE MONITOR)
   -------------------------------------------------------------------------- */
.body-projector {
  background-color: var(--bg-dark-view) !important;
  color: #E2E8F0 !important;
  min-height: 100vh;
}

.projector-card {
  background: rgba(19, 45, 34, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: clamp(12px, 2.5vw, 18px);
  color: #FFFFFF;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.projector-stat-title {
  color: var(--accent-gold);
  font-size: clamp(0.72rem, 1.8vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
}

.projector-stat-value {
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.1;
  margin: 0.35rem 0;
}

/* Responsive Chart Wrappers */
.chart-container-bar {
  position: relative;
  width: 100%;
  height: clamp(230px, 35vw, 340px);
}

.chart-container-donut {
  position: relative;
  width: 100%;
  height: clamp(180px, 25vw, 240px);
}

/* --------------------------------------------------------------------------
   8. DIGITAL STAMP & VOTER BADGE (SUKSES MEMILIH)
   -------------------------------------------------------------------------- */
.digital-stamp {
  border: 3px dashed var(--primary-green);
  color: var(--primary-green);
  padding: clamp(6px, 1.5vw, 10px) clamp(14px, 3vw, 24px);
  display: inline-block;
  font-weight: 900;
  font-size: clamp(1rem, 3vw, 1.45rem);
  letter-spacing: 1.5px;
  transform: rotate(-4deg);
  border-radius: 10px;
  text-transform: uppercase;
  background: rgba(31, 77, 54, 0.08);
  max-width: 100%;
}

.voter-badge-card {
  background: linear-gradient(135deg, var(--color-deep-forest) 0%, #153827 100%);
  color: #FFFFFF;
  border-radius: clamp(16px, 3vw, 24px);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 15px 35px rgba(31, 77, 54, 0.35);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.voter-badge-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  background: rgba(197, 160, 89, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   9. DATA TABLES RESPONSIVENESS & SCROLLABILITY
   -------------------------------------------------------------------------- */
.table-responsive-custom {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
}

.table-responsive-custom::-webkit-scrollbar {
  height: 8px;
}

.table-responsive-custom::-webkit-scrollbar-track {
  background: #F1F5F9;
}

.table-responsive-custom::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.table-responsive-custom::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.custom-table th {
  background-color: #F8FAFC;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.85rem 1rem;
}

.custom-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.token-code {
  font-family: 'SFMono-Regular', Consolas, 'Courier New', Courier, monospace;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: #FEF3C7;
  color: #92400E;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.95rem;
  display: inline-block;
  white-space: nowrap;
}

/* Candidate thumbnail in admin */
.candidate-thumb {
  width: clamp(75px, 18vw, 115px);
  height: clamp(75px, 18vw, 115px);
  object-fit: cover;
  border-radius: 14px;
  flex-shrink: 0;
}

/* Mobile swipe hint */
.mobile-swipe-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
  .mobile-swipe-hint {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   10. MODAL DIALOGS RESPONSIVENESS
   -------------------------------------------------------------------------- */
.modal-dialog {
  margin: 0.75rem auto;
  max-width: calc(100vw - 1.5rem);
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
  }
  .modal-dialog.modal-lg {
    max-width: 780px;
  }
}

/* --------------------------------------------------------------------------
   11. BREAKPOINT-SPECIFIC TWEAKS
   -------------------------------------------------------------------------- */

/* Extra Small (Mobile Phones < 576px) */
@media (max-width: 575.98px) {
  .container, .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .card-body {
    padding: 1rem !important;
  }

  .login-card .card-body {
    padding: 1.25rem 0.85rem !important;
  }

  .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
  }

  /* Make candidate cards stack cleanly */
  .candidate-header-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .candidate-header-flex .candidate-thumb {
    width: 90px;
    height: 90px;
  }
}

/* Medium Tablets & Small Laptops (768px - 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .projector-card {
    padding: 1rem !important;
  }
}

/* Large Screens & Projector Displays (>= 1400px) */
@media (min-width: 1400px) {
  .projector-stat-value {
    font-size: 3rem;
  }
  .chart-container-bar {
    height: 380px;
  }
}

/* --------------------------------------------------------------------------
   12. ADMIN SIDEBAR LAYOUT & RESPONSIVE DASHBOARD
   -------------------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: #F8FAFC;
  width: 100%;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #102E20 0%, #0A1F16 100%);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1040;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.admin-sidebar .sidebar-brand {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar .sidebar-menu {
  padding: 0.65rem 0.65rem;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.35rem 0.65rem;
  font-weight: 700;
  margin-top: 0.6rem;
}

.sidebar-nav-item {
  margin-bottom: 0.15rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.48rem 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  border-radius: 0.55rem;
  transition: var(--transition-smooth);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.25) 0%, rgba(197, 160, 89, 0.08) 100%);
  color: #FFD700 !important;
  border-left: 3px solid #C5A059;
  font-weight: 600;
}

.sidebar-link i {
  width: 18px;
  text-align: center;
  font-size: 0.88rem;
}

.admin-main {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

@media (max-width: 991.98px) {
  .admin-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .admin-mobile-topbar {
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1025 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  .admin-main {
    width: 100% !important;
    min-width: 0 !important;
    flex-grow: 1 !important;
  }
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -285px !important;
    bottom: 0 !important;
    width: 270px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1050 !important;
    transition: left 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  }
  .admin-sidebar.show {
    left: 0 !important;
  }
  .sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1045;
    backdrop-filter: blur(2px);
  }
}

/* Responsive Table & Button Group Enhancement */
@media (max-width: 767.98px) {
  .table-responsive {
    border-radius: 0.75rem;
  }
  .table td, .table th {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.82rem;
  }
  .btn-sm {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.78rem !important;
  }
}

/* --------------------------------------------------------------------------
   13. ENHANCED ANTI-SPY SHIELD & PRIVACY CONTROLS
   -------------------------------------------------------------------------- */
.anti-spy-vignette {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.88) 85%);
  z-index: 1030;
  transition: opacity 0.3s ease;
}

.anti-spy-max {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.94) 75%),
              repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 2px, transparent 2px, transparent 4px);
  z-index: 1030;
}

/* Screen blur when focus is lost (Anti-Spy Shield) */
.anti-spy-unfocused-shield {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 31, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #FFFFFF;
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.anti-spy-floater {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1040;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   14. UNIQUE 3D DIGITAL BALLOT BOX & VOTING ANIMATION
   -------------------------------------------------------------------------- */
.ballot-stage-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 31, 22, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  overflow: hidden;
}

.ballot-card-3d {
  width: 320px;
  max-width: 90vw;
  background: #FFFFFF;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  text-align: center;
  transform-style: preserve-3d;
  position: relative;
  transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ballot-stamp-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(0);
  border: 4px dashed #8C3A27;
  color: #8C3A27;
  font-size: 1.4rem;
  font-weight: 900;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(140, 58, 39, 0.3);
}

.stamp-slam {
  animation: stampSlamAnim 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stampSlamAnim {
  0% { transform: translate(-50%, -50%) rotate(-25deg) scale(3); opacity: 0; }
  70% { transform: translate(-50%, -50%) rotate(-10deg) scale(0.9); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; }
}

.digital-ballot-box {
  width: 240px;
  height: 160px;
  background: linear-gradient(135deg, #1F4D36 0%, #153827 100%);
  border: 3px solid #C5A059;
  border-radius: 1.25rem;
  margin-top: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.ballot-slot {
  width: 140px;
  height: 10px;
  background: #0A1F16;
  border-radius: 999px;
  border: 2px solid #C5A059;
  position: absolute;
  top: -6px;
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.8);
}

.ballot-slot.slot-glow {
  animation: slotPulse 1s infinite alternate;
}

@keyframes slotPulse {
  0% { box-shadow: 0 0 10px #C5A059; }
  100% { box-shadow: 0 0 25px #FFD700, 0 0 10px #22C55E; }
}

@keyframes foldAndDrop {
  0% { transform: translateY(0) scale(1) rotateX(0deg); opacity: 1; }
  40% { transform: translateY(-40px) scale(0.85) rotateX(60deg); opacity: 0.95; }
  70% { transform: translateY(50px) scale(0.5) rotateX(85deg); opacity: 0.8; }
  100% { transform: translateY(120px) scale(0.2) rotateX(90deg); opacity: 0; }
}

.animate-fold-drop {
  animation: foldAndDrop 1.2s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

/* --------------------------------------------------------------------------
   14. COMPACT ADMIN DESIGN SYSTEM (GLOBAL COMPACT FORMS, TABLES, INPUTS)
   -------------------------------------------------------------------------- */
.admin-main .page-header-title,
.admin-main h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem) !important;
}

/* Global Compact Form Inputs & Selects in Admin & Modals */
.admin-main .form-control,
.admin-main .form-select,
.modal .form-control,
.modal .form-select {
  font-size: 0.8125rem !important;
  padding: 0.36rem 0.65rem !important;
  border-radius: 0.45rem !important;
  line-height: 1.45 !important;
  min-height: auto !important;
}

.admin-main .form-label,
.modal .form-label {
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 0.2rem !important;
}

.admin-main .input-group-text,
.modal .input-group-text {
  font-size: 0.8125rem !important;
  padding: 0.36rem 0.65rem !important;
  border-radius: 0.45rem !important;
}

/* Global Compact Buttons across Admin & Modals */
.admin-main .btn,
.modal .btn {
  font-size: 0.8rem !important;
  padding: 0.34rem 0.75rem !important;
  line-height: 1.4 !important;
}

.admin-main .btn-sm,
.modal .btn-sm {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.55rem !important;
}

.admin-main .btn-group-sm > .btn {
  padding: 0.22rem 0.45rem !important;
  font-size: 0.74rem !important;
}

/* Global Compact Data Tables */
.admin-main .table th,
.admin-main .custom-table th {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  padding: 0.45rem 0.65rem !important;
  vertical-align: middle !important;
  background-color: #F8FAFC !important;
  color: #475569 !important;
}

.admin-main .table td,
.admin-main .custom-table td {
  font-size: 0.8rem !important;
  padding: 0.4rem 0.65rem !important;
  vertical-align: middle !important;
}

/* Global Compact Badges */
.admin-main .badge,
.modal .badge {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.5rem !important;
  letter-spacing: 0.2px !important;
}

/* Global Compact Cards & Modals */
.admin-main .card {
  border-radius: 0.75rem !important;
}

.admin-main .card-header {
  padding: 0.6rem 0.85rem !important;
}

.admin-main .card-body {
  padding: 0.75rem 0.85rem !important;
}

.modal-content {
  border-radius: 0.85rem !important;
}

.modal-header {
  padding: 0.7rem 1rem !important;
}

.modal-title {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

.modal-body {
  padding: 0.9rem 1.15rem !important;
}

.modal-footer {
  padding: 0.6rem 1rem !important;
}

/* --------------------------------------------------------------------------
   15. STICKY DOCKED ADMIN FOOTER (STAYS AT THE BOTTOM OF VIEWPORT)
   -------------------------------------------------------------------------- */
.admin-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main > .container-fluid {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 1.5rem !important;
}

.admin-footer {
  margin-top: auto !important;
  position: sticky !important;
  bottom: 0 !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 0.45rem 1rem !important;
  z-index: 1010 !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
}

@media print {
  .admin-footer {
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    border-top: none !important;
    padding: 0 !important;
  }
}

.body-projector .admin-footer {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  position: static !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.6) !important;
}
.body-projector .admin-footer span,
.body-projector .admin-footer strong {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Flexible Button Spacing & Gap Utilities */
.gap-1\.5 {
  gap: 0.45rem !important;
}
.gap-2\.5 {
  gap: 0.75rem !important;
}
.mb-1\.5 {
  margin-bottom: 0.45rem !important;
}
.mb-2\.5 {
  margin-bottom: 0.75rem !important;
}

/* Ensure flex button bars always maintain horizontal and vertical spacing */
.d-flex.flex-wrap.gap-2 > .btn,
.d-flex.flex-wrap.gap-2 > .dropdown {
  margin-bottom: 0.15rem;
}

/* --------------------------------------------------------------------------
   16. SWEETALERT2 COMPACT MODERN SYSTEM
   Prevents oversized modals, massive icons, and bulky buttons
   -------------------------------------------------------------------------- */
.swal2-container {
  z-index: 10050 !important;
}

.swal2-popup {
  padding: 1.25rem 1.25rem 1rem !important;
  border-radius: 1rem !important;
  max-width: 420px !important;
  width: 92% !important;
  font-family: inherit !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Scaled-down icons using clean transform scaling (prevents broken checkmark & clipped titles) */
.swal2-icon {
  transform: scale(0.72) !important;
  transform-origin: center center !important;
  margin: -0.2rem auto -0.15rem !important;
}

/* Compact Title */
.swal2-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  padding: 0 0.5rem 0.2rem !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Compact HTML content container */
.swal2-html-container {
  font-size: 0.85rem !important;
  color: #475569 !important;
  margin: 0.4rem 0.2rem 0.65rem !important;
  line-height: 1.45 !important;
}

/* Compact Action Buttons */
.swal2-actions {
  margin: 0.65rem auto 0.2rem !important;
  gap: 0.5rem !important;
}
.swal2-styled {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  padding: 0.45rem 1.15rem !important;
  border-radius: 50rem !important;
  box-shadow: none !important;
}
.swal2-styled:focus {
  box-shadow: 0 0 0 3px rgba(31, 77, 54, 0.2) !important;
}
