@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200..900&display=swap');.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height, 90px);
  background: rgba(245, 243, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
  z-index: 1000;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

body[data-alert-open="true"] .navbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.navbar:hover {
  box-shadow: 0 6px 30px rgba(0,0,0,0.05);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 2rem;
  max-width: 100%;
  margin: 0;
}

/* Left Section: Navigation */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-right: 1.5rem;
  padding-right: 0.5rem;
}

.nav-left::-webkit-scrollbar {
  display: none;
}

.btn-nav-add {
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px; /* Clean proportional height */
  max-height: 42px;
  gap: 0.4rem;
  transition: var(--transition-fast);
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 100px; /* Clean pill shape */
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-nav-add svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.btn-nav-add.active {
  color: var(--primary-neon);
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.25);
  box-shadow: none;
  position: relative;
}

.btn-nav-add.active::after {
  display: none; /* Removed bottom indicator that bled out of navbar */
}

.btn-nav-add:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: none;
  transform: translateY(0);
}

.btn-nav-add:hover svg {
  color: var(--primary-neon);
  transform: scale(1.05);
}

/* Center Section: Logo */
.nav-center {
  padding: 0 1.5rem;
  cursor: pointer;
  transition: var(--transition-slow);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.nav-center:hover {
  transform: scale(1.05) rotate(-2deg);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
}

.logo-images {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 90px;
}

.nav-logo-img {
  height: 130px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-fast);
  mix-blend-mode: multiply;
  margin-top: -5px;
  transform-origin: left center;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Right Section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
}


.icon-btn {
  background: #ffffff;
  color: var(--text-base);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
  padding: 0;
}

.icon-btn:hover {
  background: var(--primary-glow);
  color: var(--primary-neon);
  border-color: rgba(234, 88, 12, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.15);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.logout-icon-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}

@media (max-width: 1024px) {
  .navbar-container { padding: 0 2rem; }
  .nav-center { display: none; }
}


.sidebar-global {
  width: 260px;
  background: #0B0F19;
  border-radius: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.25rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  z-index: 1000;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-global.collapsed {
  width: 72px;
  padding: 1.25rem 0.5rem;
}

.sidebar-section-header {
  font-size: 0.65rem;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.85rem 0.75rem 0.35rem 0.75rem;
  white-space: nowrap;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.25rem 1.25rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  flex-shrink: 0;
}

.sidebar-brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.sidebar-global-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-global-links::-webkit-scrollbar {
  width: 4px;
}

.sidebar-global-links::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-global-links::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.sidebar-global-links::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-global-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  position: relative;
}

.sidebar-global-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar-global-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.sidebar-global-link:hover svg {
  transform: translateX(2px);
  color: #ffffff;
}

.sidebar-global-link.active {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}

.sidebar-global-link.active svg {
  color: #ffffff;
}

.sidebar-link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e1b4b;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1001;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-global-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  width: 100%;
}

.sidebar-global-logout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-global-logout svg {
  flex-shrink: 0;
}

.sidebar-global-logout:hover {
  color: #ffffff;
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.sidebar-powered {
  flex-shrink: 0;
  margin-top: 12px;
  text-align: center;
}

.powered-text {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.powered-brand {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* Collapsed State Overrides */
.sidebar-global.collapsed .sidebar-brand-left,
.sidebar-global.collapsed .sidebar-link-text,
.sidebar-global.collapsed .sidebar-powered {
  display: none;
}

.sidebar-global.collapsed .sidebar-brand {
  justify-content: center;
  padding: 0.25rem 0 1.25rem 0;
}

.sidebar-global.collapsed .sidebar-toggle-btn {
  margin: 0 auto;
}

.sidebar-global.collapsed .sidebar-global-link,
.sidebar-global.collapsed .sidebar-global-logout {
  justify-content: center;
  padding: 0;
}

.sidebar-global.collapsed .sidebar-global-link:hover .sidebar-tooltip,
.sidebar-global.collapsed .sidebar-global-logout:hover .sidebar-tooltip {
  display: block;
  opacity: 1;
}

/* Default hidden state for mobile elements on desktop */
.sidebar-mobile-topbar {
  display: none;
}
.sidebar-mobile-backdrop {
  display: none;
}
.sidebar-mobile-close-btn {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #0B0F19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1rem;
    z-index: 1200;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .sidebar-mobile-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .sidebar-mobile-hamburger:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.18);
  }

  .sidebar-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sidebar-mobile-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
    flex-shrink: 0;
  }

  .sidebar-mobile-brand-title {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 1rem;
    color: #ffffff;
  }

  .sidebar-mobile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .sidebar-mobile-logout:active {
    transform: scale(0.95);
    background: rgba(239, 68, 68, 0.25);
  }

  .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    animation: fadeInDrawer 0.25s ease-out;
  }

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

  .sidebar-global {
    width: 290px !important;
    max-width: 85vw !important;
    padding: 1.25rem 1rem !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    visibility: hidden;
  }

  .sidebar-global.mobile-open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 14px 0 45px rgba(0, 0, 0, 0.85);
  }

  /* Reset collapsed overrides on mobile so mobile drawer always displays full items */
  .sidebar-brand-left,
  .sidebar-global.collapsed .sidebar-brand-left,
  .sidebar-link-text,
  .sidebar-global.collapsed .sidebar-link-text,
  .sidebar-powered,
  .sidebar-global.collapsed .sidebar-powered {
    display: flex !important;
  }

  .sidebar-section-header,
  .sidebar-global.collapsed .sidebar-section-header {
    display: block !important;
  }

  .sidebar-brand,
  .sidebar-global.collapsed .sidebar-brand {
    justify-content: space-between !important;
    padding: 0.25rem 0.25rem 1.25rem 0.25rem !important;
  }

  .sidebar-toggle-btn {
    display: none !important;
  }

  .sidebar-mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s ease;
  }

  .sidebar-mobile-close-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: transparent;
  }

  .sidebar-global-link,
  .sidebar-global.collapsed .sidebar-global-link,
  .sidebar-global-logout,
  .sidebar-global.collapsed .sidebar-global-logout {
    justify-content: flex-start !important;
    padding: 0 14px !important;
    height: 44px !important;
  }

  .sidebar-tooltip {
    display: none !important;
  }
}.olympia-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem;
}

.olympia-spinner-container.full-screen {
  min-height: 55vh;
}

.olympia-spinner-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dual-ring spinning gradient */
.olympia-spinner-ring {
  border-radius: 50%;
  animation: olympia-spin 0.9s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
  box-sizing: border-box;
}

.olympia-spinner-ring.sm {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(234, 88, 12, 0.2);
  border-top-color: #ea580c;
  border-right-color: #db2777;
}

.olympia-spinner-ring.md {
  width: 38px;
  height: 38px;
  border: 3.5px solid rgba(234, 88, 12, 0.2);
  border-top-color: #ea580c;
  border-right-color: #db2777;
}

.olympia-spinner-ring.lg {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(234, 88, 12, 0.2);
  border-top-color: #ea580c;
  border-right-color: #db2777;
}

.olympia-spinner-pulse {
  position: absolute;
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background: radial-gradient(circle, #ea580c 0%, #db2777 100%);
  animation: olympia-pulse 1.4s ease-in-out infinite alternate;
  opacity: 0.75;
}

.olympia-spinner-text {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #64748b;
  animation: olympia-text-glow 1.8s ease-in-out infinite alternate;
}

@keyframes olympia-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes olympia-pulse {
  0% { transform: scale(0.65); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes olympia-text-glow {
  0% { opacity: 0.7; }
  100% { opacity: 1; color: #ea580c; }
}


:root {
  /* Light Premium Glassmorphism Palette */
  --primary-neon: #ef4444; /* Modern Red */
  --primary-glow: rgba(239, 68, 68, 0.2);

  --secondary-neon: #991b1b; /* Deep Dark Red */
  --secondary-glow: rgba(153, 27, 27, 0.2);

  --bg-deep: rgba(245, 243, 255, 0.05);
  /* Light Premium BG (Slate 50) */
  --bg-surface: transparent;
  /* Frosted White */
  --bg-glass: rgba(245, 243, 255, 0.6);

  --text-bright: #0f172a;
  /* Slate 900 (High contrast text) */
  --text-base: #334155;
  /* Slate 700 */
  --text-dim: #64748b;
  /* Slate 500 */

  --glass-border: rgba(0, 0, 0, 0.08);
  /* Subtle dark border */
  --glass-highlight: rgba(255, 255, 255, 0.9);

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Outfit', sans-serif;

  /* Shadows - Light Spatial */
  --shadow-glow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  --shadow-brutalist: 0 12px 40px rgba(147, 51, 234, 0.08), inset 0 2px 0 rgba(255, 255, 255, 0.5);

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Superadmin Dashboard Theme */
  --dash-bg: #f5f3ff;
  --dash-gradient: linear-gradient(to right, #ea580c, #db2777);
  --dash-purple: #6d28d9;
  --dash-accent: #10b981;
  --dash-text: #1e1b4b;
  --dash-card-bg: #ffffff;
  --dash-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  --dash-transition: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shared Layout Tokens */
  --navbar-height: 90px;
}

/* Reset & Base Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(234, 88, 12, 0.05), transparent 40%),
    radial-gradient(ellipse at 85% 30%, rgba(147, 51, 234, 0.05), transparent 40%);
  background-attachment: fixed;
  color: var(--text-base);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
}

/* Global Layout Setup */

.app-root {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #f5f3ff; /* Match Dashboard theme to remove white gaps */
}

.app-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh; /* Lock to viewport height */
  transition: margin-left 0.3s ease;
  overflow-y: auto; /* Enable page scroll inside content area */
  overflow-x: hidden;
  background: #f5f3ff;
  position: relative;
  box-sizing: border-box;
  min-width: 0; /* Prevent flex children from stretching the main content container width */
}

.app-main-content > div {
  min-width: 0;
  max-width: 100%;
}

/* Unified White Dropdown Input Tokens App-Wide */

input,
select,
textarea {
  box-sizing: border-box !important;
  max-width: 100%;
}

select {
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: #1e293b;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 2.25rem 0.5rem 0.85rem;
  line-height: 1.4;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
}

select:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

select:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f1f5f9;
}

select option {
  background-color: #ffffff;
  color: #0f172a;
  padding: 0.5rem 0.85rem;
}

/* Form layout overflow prevention */

.form-group,
.form-grid > *,
.form-row > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* SIDEBAR LAYOUT: Leaves space to accommodate the Flush Edge Classic Sidebar without overflow */

.app-root.superadmin-layout .app-main-content,
.app-root.logged-in .app-main-content {
  margin-left: 260px;
  width: calc(100vw - 260px);
  max-width: calc(100vw - 260px);
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-root.superadmin-layout.sidebar-collapsed .app-main-content,
.app-root.logged-in.sidebar-collapsed .app-main-content {
  margin-left: 72px;
  width: calc(100vw - 72px);
  max-width: calc(100vw - 72px);
}

@media (max-width: 768px) {
  .app-root.superadmin-layout .app-main-content,
  .app-root.logged-in .app-main-content,
  .app-root.superadmin-layout.sidebar-collapsed .app-main-content,
  .app-root.logged-in.sidebar-collapsed .app-main-content {
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding-top: 56px;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.06;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

/* Glassmorphism Utilities */

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
  border-radius: 20px;
}

.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-slow);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.text-neon {
  background: linear-gradient(135deg, var(--text-bright), var(--primary-neon));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 20px var(--primary-glow);
}

.bg-neon {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  color: #ffffff;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Custom Scrollbar */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-neon);
}

/* Button Variants */

.btn-primary {
  background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 100px;
  border: 1px solid rgba(234, 88, 12, 0.4);
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.2), 0 4px 15px rgba(147, 51, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: scale(1.02) translateY(-2px);
}

@keyframes fadeInStagger {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeInStagger 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Global Modal System */

.alert-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.alert-modal-card {
  background: #ffffff; /* Solid high-contrast white */
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-radius: 24px;
  width: 90%;
  max-width: 440px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.alert-modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}

.alert-modal-card p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-base);
  margin-bottom: 1.5rem;
}

@keyframes modalSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.alert-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.alert-icon-circle.warning {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.alert-modal-actions button {
  flex: 1;
  padding: 0.9rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.btn-alert-secondary {
  background: #f1f5f9;
  border: 1px solid #e2e8f0 !important;
  color: #475569;
}

.btn-alert-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-2px);
}

.btn-alert-primary.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-alert-primary.error:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Powered By Together Tech Branding */

.powered-by-wrapper {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.8;
  z-index: 50;
  pointer-events: none;
}

.powered-text {
  font-size: 13px;
  font-weight: 400; /* Subtle, not bold */
  letter-spacing: 0.05em;
  color: #888888; /* User specified light gray */
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.powered-brand {
  color: #888888;
  font-weight: 500;
  margin-left: 4px;
}

.sidebar-powered {
  display: none;
}

.global-powered-by {
  position: fixed;
  bottom: 8px;
  right: 14px;
  z-index: 100;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.02em;
  opacity: 0.75;
  user-select: none;
}

.global-powered-by span {
  color: #f97316;
  font-weight: 700;
}

/* ─── GLOBAL MOBILE RESPONSIVE TABLES ───────────────────────────────────────── */

.table-responsive,
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  scrollbar-width: thin;
  display: block;
}

/* Automatically ensure any container holding a table has overflow scroll active */

div:has(> table) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
  /* Set a minimum width for all tables to trigger horizontal scrolling instead of squeezing */
  table {
    min-width: 1000px !important;
    width: 100% !important;
  }
  
  /* Exclude small specific tables from having large min-width if they are inside modals or details */
  .payslip-breakdown-box table,
  .view-modal-card table,
  .alert-modal-card table,
  .payslip-modal-card table {
    min-width: auto !important;
  }

  /* Wrap top-level flex headers inside dashboards and main page containers to prevent overflow */
  .dashboard-main > div,
  .premium-dashboard > div,
  .app-main-content > div > header,
  .app-main-content > div > .controls-row,
  .manage-header-section,
  .other-services-header,
  .report-controls-bar,
  .card-header-bar {
    flex-wrap: wrap !important;
    gap: 1rem !important;
  }
}

@media (max-width: 768px) {
  /* Enforce horizontal scrolling container for all data tables */
  .table-responsive,
  .table-container {
    overflow-x: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Force minimum readable width for all table elements on mobile screens */
  .table-responsive > table,
  .table-container > table,
  table.clients-table,
  table.txn-full-table,
  table.report-table,
  table.sub-logs-table,
  table.sales-table,
  table.purchases-table,
  table.catalog-table,
  table.education-table,
  table.staff-table,
  table.today-logs-table,
  table.assign-table,
  table.os-clients-table,
  table.Inquiry-table,
  table.gst-audit-table,
  table.expenses-table,
  table.expired-table,
  table.history-table,
  table.adv-table,
  table.breakdown-table,
  table.client-table {
    min-width: 680px !important;
    width: 100% !important;
  }

  /* Compact touch padding & font size for table cells on mobile */
  .table-responsive th,
  .table-responsive td,
  .table-container th,
  .table-container td,
  table th,
  table td {
    padding: 0.6rem 0.5rem !important;
    font-size: 0.82rem !important;
    white-space: normal;
  }

  /* Allow action buttons in table cells to wrap neatly */
  .action-buttons-cell,
  .table-actions,
  td div[style*="display: flex"],
  td div[style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* Reduce table action buttons size slightly on mobile */
  .btn-action,
  .btn-view,
  .btn-edit,
  .btn-delete,
  .btn-renew,
  .btn-undo-log {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
}

/* Global Module Diagnostics Pill Button */

.btn-check-module-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #0284c7;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-check-module-pill:hover {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-check-module-pill .pill-icon {
  font-size: 0.9rem;
  color: #f59e0b;
}

.btn-check-module-pill:hover .pill-icon {
  color: #fbbf24;
}

