/* NexiBook Sintra Theme - Unified Design System */
/* Based on /opt/bookify/newlook - Clean, High Contrast, Mobile-First */

:root {
  /* Core Colors - HIGH CONTRAST (WCAG AAA compliant) */
  --nb-bg: #0b0b0c;
  /* Near black background - maximum contrast */
  --nb-fg: #ffffff;
  /* Pure white foreground - maximum contrast */
  --nb-muted: #c8c8c8;
  /* Matching newlook exactly */
  --nb-card: #121214;
  /* Matching newlook exactly */
  --nb-border: rgba(255, 255, 255, 0.12);
  /* Matching newlook exactly */
  --nb-base-font-size: 16px;

  /* Accents - Gold - Matching newlook exactly */
  --nb-gold: #ffd700;
  --nb-gold-strong: #f2c300;
  /* Original gold for reference but use softer in rgba */

  /* Service Colors (kept for functional distinction but muted/integrated) */
  --nb-purple: #8B5CF6;
  --nb-blue: #3B82F6;
  --nb-green: #10B981;
  --nb-red: #EF4444;
  --nb-orange: #F59E0B;

  /* Glassmorphism - Premium Effects */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(12px);
  --glass-backdrop: saturate(140%) blur(8px);

  /* Premium Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 10px 16px rgba(242, 195, 0, 0.12);
  --shadow-gold-hover: 0 16px 32px rgba(212, 175, 55, 0.12);

  /* Typography */
  --nb-base-font-size: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --letter-spacing-tight: -0.01em;
  --letter-spacing-normal: -0.02em;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* Legacy Variable Mappings (Override Purple/Old Theme) */
  --page-bg: var(--nb-bg);
  --card-bg: var(--nb-card);
  --card-body-text: var(--nb-fg);
  --card-header-text: var(--nb-fg);
  --card-border: var(--nb-border);
  --btn-accent-bg: var(--nb-gold);
  --btn-accent-text: #000;
  --btn-gold-bg: var(--nb-gold);
  --btn-gold-bg-hover: var(--nb-gold-strong);
  --btn-gold-border: var(--nb-gold);
  --btn-gold-shadow: 0 10px 16px rgba(242, 195, 0, 0.12);
  --btn-gold-shadow-hover: 0 16px 32px rgba(212, 175, 55, 0.12);
  --btn-gold-text: #111;
  --primary: var(--nb-gold);
  --secondary: var(--nb-muted);
}

html {
  font-size: var(--nb-base-font-size);
  scroll-behavior: smooth;
}

html,
body {
  background: var(--nb-bg) !important;
  color: var(--nb-fg) !important;
  /* Ensure high contrast is always applied */
  background-color: var(--nb-bg) !important;
  color: var(--nb-fg) !important;
}

body {
  font-family: var(--font-sans) !important;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
}

/* Buttons - unified gold style matching newlook */
.btn {
  appearance: none;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 1rem;
}

.btn *,
.btn:hover *,
.btn:active * {
  color: var(--btn-gold-text) !important;
}

.btn:hover {
  background: var(--btn-gold-bg-hover);
  color: var(--btn-gold-text) !important;
  box-shadow: var(--btn-gold-shadow-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 12px 22px rgba(255, 188, 0, 0.35);
}

/* Ensure all button variants inherit the gold style */
.btn-primary,
.btn-success,
.btn-custom,
.btn-modern,
.btn-modern-primary {
  background: var(--nb-gold) !important;
  color: #111 !important;
  border-color: var(--nb-gold) !important;
  box-shadow: 0 10px 16px rgba(242, 195, 0, 0.12) !important;
}

.btn-primary:hover,
.btn-success:hover,
.btn-custom:hover,
.btn-modern:hover,
.btn-modern-primary:hover {
  background: var(--nb-gold-strong) !important;
  border-color: var(--nb-gold-strong) !important;
  color: #111 !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(212, 175, 55, 0.12) !important;
}

.btn-primary:active,
.btn-success:active,
.btn-custom:active,
.btn-modern:active,
.btn-modern-primary:active {
  transform: translateY(0);
}

.btn-secondary,
.btn-ghost,
.btn-outline,
.btn-outline-primary,
.btn-modern-outline {
  background: var(--nb-gold) !important;
  color: #111 !important;
  border-color: var(--nb-gold) !important;
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-outline:hover,
.btn-outline-primary:hover,
.btn-modern-outline:hover {
  background: var(--nb-gold-strong) !important;
  color: #111 !important;
  border-color: var(--nb-gold-strong) !important;
}

.btn-outline-danger {
  color: #EF4444 !important;
}

/* Small buttons */
.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 12px !important;
}

/* Danger buttons inherit the same look for consistency */
.btn-outline-danger {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 12px !important;
}

.btn-primary,
.btn-success,
.btn-custom {
  padding: 0.875rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}



/* Cards - Exact match with newlook */
.card {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
  color: var(--nb-fg) !important;
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35);
}

.card-header {
  background: var(--nb-card) !important;
  border-bottom: 1px solid var(--nb-border) !important;
  color: var(--nb-fg) !important;
  padding: 1rem;
}

.card-body {
  background: var(--nb-card) !important;
  color: var(--nb-fg) !important;
  padding: 1.1rem;
}

.card-body p,
.card-body .text-secondary {
  color: var(--nb-muted) !important;
}

/* Demo/Feature Cards */
.demo-card {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: fadeSlideUp 0.6s ease both;
}

.demo-card:nth-child(2) {
  animation-delay: 0.08s;
}

.demo-card:nth-child(3) {
  animation-delay: 0.16s;
}

.demo-card-title {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.demo-legend {
  color: var(--nb-muted);
}

/* Form Elements */
input,
select,
textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nb-border);
  color: var(--nb-fg);
  padding: 0.75rem;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--nb-gold);
  background: rgba(255, 255, 255, 0.08);
}

/* Typography - Exact match with newlook */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--nb-fg);
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2,
.primary-heading {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  margin: 2rem 0 1rem;
  letter-spacing: -0.01em;
}

a {
  color: var(--nb-gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--nb-gold-strong);
}

.text-muted {
  color: var(--nb-muted) !important;
  /* High contrast - ensure readability */
  color: #e0e0e0 !important;
  /* Override for maximum contrast */
}

/* Topbar/Navbar - Exact match with newlook */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(11, 11, 12, 0.66);
  border-bottom: 1px solid var(--nb-border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.55rem 0.75rem;
}

.navbar,
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(11, 11, 12, 0.66);
  border-bottom: 1px solid var(--nb-border);
  padding: 1rem 0;
}

.video-nav {
  border-bottom: 1px solid var(--nb-border);
  background: rgba(9, 9, 10, 0.92);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.video-nav-user {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--nb-fg);
}

.video-nav-user strong {
  color: var(--nb-gold);
}

.video-nav .btn:not(.btn-modern-back),
.video-nav .btn-modern:not(.btn-modern-back),
.video-nav .btn-modern-primary:not(.btn-modern-back),
.video-nav .btn-modern-outline:not(.btn-modern-back),
.video-nav .btn-custom:not(.btn-modern-back),
.video-nav .btn-primary:not(.btn-modern-back),
.video-nav .btn-outline:not(.btn-modern-back) {
  min-width: 150px;
  background: var(--nb-gold) !important;
  color: #050505 !important;
  border: 1px solid var(--nb-gold) !important;
  border-radius: 999px !important;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(212, 175, 55, 0.25);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
}

.video-nav .btn:not(.btn-modern-back):hover,
.video-nav .btn-modern:not(.btn-modern-back):hover,
.video-nav .btn-modern-primary:not(.btn-modern-back):hover,
.video-nav .btn-modern-outline:not(.btn-modern-back):hover,
.video-nav .btn-custom:not(.btn-modern-back):hover,
.video-nav .btn-primary:not(.btn-modern-back):hover,
.video-nav .btn-outline:not(.btn-modern-back):hover {
  background: var(--nb-gold-strong) !important;
  border-color: var(--nb-gold-strong) !important;
  color: #050505 !important;
}

.video-nav .btn:not(.btn-modern-back) *,
.video-nav .btn-modern:not(.btn-modern-back) *,
.video-nav .btn-modern-primary:not(.btn-modern-back) *,
.video-nav .btn-modern-outline:not(.btn-modern-back) *,
.video-nav .btn-custom:not(.btn-modern-back) *,
.video-nav .btn-primary:not(.btn-modern-back) *,
.video-nav .btn-outline:not(.btn-modern-back) * {
  color: #050505 !important;
}

.video-nav .btn-modern-back {
  min-width: 150px;
  background: transparent !important;
  color: var(--nb-gold) !important;
  border: 1px solid rgba(255, 215, 0, 0.5) !important;
  border-radius: 999px !important;
  font-weight: 600;
  box-shadow: none;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
}

.video-nav .btn-modern-back:hover {
  background: rgba(255, 215, 0, 0.1) !important;
  border-color: var(--nb-gold) !important;
  color: var(--nb-gold) !important;
}

.video-nav .btn-modern-back * {
  color: var(--nb-gold) !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nb-fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  color: var(--nb-gold);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--nb-bg);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* Legacy Class Mappings - Enhanced - Matching newlook */
.card-modern {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeSlideUp 0.6s ease both;
  color: var(--nb-fg) !important;
}

.card-modern:hover {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.card-modern-body {
  background: var(--nb-card) !important;
  color: var(--nb-fg) !important;
  padding: 1.1rem;
}

.card-modern-header {
  border-bottom: 1px solid var(--nb-border) !important;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  color: var(--nb-fg) !important;
}

/* Section spacing - match newlook */
section,
.section {
  padding-block: clamp(2rem, 6vw, 5rem);
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

.btn-custom {
  background: var(--nb-gold) !important;
  border: 1px solid var(--nb-gold) !important;
  color: #111 !important;
  border-radius: 999px;
  transition: all 0.2s ease;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
}

.btn-custom:hover {
  background: var(--nb-gold-strong) !important;
  border-color: var(--nb-gold-strong) !important;
  color: #111 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.stat-card {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  color: var(--nb-fg) !important;
  margin-bottom: 1.5rem !important;
}

.stat-card * {
  color: inherit !important;
}

.stat-card .stat-card-value {
  color: #ffffff !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
}

.stat-card .stat-card-icon {
  width: 60px !important;
  height: 60px !important;
  background: rgba(212, 175, 55, 0.08) !important;
  border-radius: var(--radius-full) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 1rem !important;
}

.stat-card .stat-card-icon i {
  font-size: 1.5rem !important;
  color: var(--nb-gold) !important;
}

.stat-card .text-secondary,
.stat-card .text-muted,
.stat-card small {
  color: var(--nb-muted) !important;
}

.stat-card h1,
.stat-card h2,
.stat-card h3,
.stat-card h4,
.stat-card h5,
.stat-card h6 {
  color: #ffffff !important;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--nb-gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35);
}

.stat-card:hover::before {
  opacity: 1;
}

.nav-card {
  display: block;
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--nb-fg);
  transition: all 0.3s ease;
  height: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.nav-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 1.5rem;
  color: var(--nb-gold);
}

.nav-card:hover {
  border-color: rgba(212, 175, 55, 0.25);
  transform: translateX(8px);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35);
  color: var(--nb-fg);
  text-decoration: none;
}

.nav-card:hover::after {
  content: '→';
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.nav-card-icon {
  font-size: 2rem;
  color: var(--nb-gold);
  margin-bottom: 1rem;
}

.nav-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--nb-fg);
}

.nav-card-description {
  color: var(--nb-muted);
  font-size: 0.9rem;
}


/* Modern UI Mappings */
.btn-modern {
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  background: var(--nb-gold) !important;
  color: #111 !important;
  border: 1px solid var(--nb-gold) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-modern:hover {
  background: var(--nb-gold-strong) !important;
  border-color: var(--nb-gold-strong) !important;
  color: #111 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.form-control-modern {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nb-border);
  color: var(--nb-fg);
  padding: 0.75rem;
  border-radius: 8px;
  width: 100%;
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--nb-gold);
  background: rgba(255, 255, 255, 0.08);
}

.input-group-modern {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--nb-border);
  border-radius: 8px;
  overflow: hidden;
}

.input-group-modern .form-control-modern {
  border: none;
  background: transparent;
}

.input-group-modern-icon {
  padding: 0 1rem;
  color: var(--nb-muted);
}


.form-label-modern {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--nb-fg);
  font-weight: 500;
}

/* Table Styles */
.table {
  color: var(--nb-fg);
  border-color: var(--nb-border);
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
  color: var(--nb-fg);
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.03);
}

.table> :not(caption)>*>* {
  background-color: transparent;
  border-bottom-color: var(--nb-border);
  color: var(--nb-fg);
}

.table thead th {
  border-bottom: 2px solid var(--nb-border);
  color: var(--nb-gold);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.table-responsive {
  border-radius: 12px;
  border: 1px solid var(--nb-border);
  overflow: hidden;
}

/* Footer Styles */
.footer-modern {
  background: var(--nb-card) !important;
  border-top: 1px solid var(--nb-border);
  color: var(--nb-muted) !important;
}

.footer-modern h4,
.footer-modern h5 {
  color: var(--nb-fg);
}

.footer-modern a {
  color: var(--nb-muted);
  transition: color 0.3s ease;
}

.footer-modern a:hover {
  color: var(--nb-gold);
}

/* Booking Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  color: var(--nb-gold);
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.modal .close {
  color: var(--nb-muted);
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal .close:hover {
  color: var(--nb-gold);
}

.booking-when-lg,
.booking-price-lg {
  font-size: 1.1rem;
  color: var(--nb-fg);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.booking-resource {
  color: var(--nb-muted) !important;
  font-size: 0.95rem;
}

.modal .btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.modal .btn-check {
  display: none;
}

.modal .btn-outline-primary {
  background: transparent !important;
  border: 2px solid var(--nb-gold) !important;
  color: #ffffff !important;
  color: var(--nb-gold);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal .btn-check:checked+.btn-outline-primary {
  background: var(--nb-gold);
  color: #000;
}

.modal .btn-outline-primary:hover {
  background: var(--nb-gold);
  color: #000;
}

.modal .alert-warning {
  background: #fff8db !important;
  border: 1px solid rgba(255, 215, 0, 0.6) !important;
  color: #111 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.modal .alert-warning * {
  color: #111 !important;
}

.modal .form-check-input {
  background-color: var(--nb-card);
  border-color: var(--nb-border);
  width: 1.1rem;
  height: 1.1rem;
}

.modal .form-check-input:checked {
  background-color: var(--nb-gold);
  border-color: var(--nb-gold);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23000000' d='M12.97 4.97a.75.75 0 0 0-1.08-1.04L7.477 8.417 4.384 5.323a.75.75 0 0 0-1.06 1.06l3.646 3.647a.75.75 0 0 0 1.08-.02l4.92-5.02z'/%3e%3c/svg%3e");
  background-size: 0.65rem 0.65rem;
  background-position: center;
  background-repeat: no-repeat;
}

.form-check-input {
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background-color: #111827;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  border-radius: 0.35rem;
  position: relative;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 214, 10, 0.25);
}

.form-check-input:checked {
  background-color: #ffd60a;
  border-color: #ffd60a;
}

.form-check-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 0.9rem;
  border: solid #fff6c2;
  border-width: 0 0.25rem 0.25rem 0;
  transform: translate(-45%, -60%) rotate(45deg);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked::after {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #111827;
  border: none;
  transform: translate(-50%, -50%);
}

.form-check-modern {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-check-modern:hover {
  border-color: rgba(255, 214, 10, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.form-check-modern .form-check-input {
  margin-top: 0.15rem;
}

.form-check-modern .form-check-input:checked {
  box-shadow: 0 0 0 0.2rem rgba(255, 214, 10, 0.35);
}

.form-check-modern .form-check-label strong {
  color: #fff;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.alert {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--nb-fg);
}

.alert code {
  color: var(--nb-gold);
  background: rgba(255, 214, 10, 0.1);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
}

.modal .form-select {
  background-color: var(--nb-card);
  border-color: var(--nb-border);
  color: var(--nb-fg);
}

.modal .form-label {
  color: var(--nb-fg);
  font-weight: 500;
}

.modal .btn-primary {
  background: var(--nb-gold);
  border: none;
  color: #000;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal .btn-primary:hover:not(:disabled) {
  background: var(--nb-gold-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.modal .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal .alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--nb-red);
  color: var(--nb-red);
}

#booking-popup .terms-box {
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--nb-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--nb-muted);
  line-height: 1.5;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#booking-popup .terms-box::-webkit-scrollbar {
  width: 6px;
}

#booking-popup .terms-box::-webkit-scrollbar-thumb {
  background: var(--nb-border);
  border-radius: 4px;
}

#booking-popup .terms-box::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================
   MODERN UI ENHANCEMENTS - CONSOLIDATED
   All fixes and utilities from modern-ui.css
   ============================================ */

/* ============================================
   CONTRAST FIXES FOR FORM CONTROLS
   ============================================ */
/* Fix placeholder contrast */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(200, 200, 200, 0.6) !important;
  opacity: 1 !important;
}

.theme-light .form-control::placeholder,
.theme-light .form-select::placeholder,
.theme-light input::placeholder,
.theme-light textarea::placeholder {
  color: rgba(108, 117, 125, 0.8) !important;
  opacity: 1 !important;
}

/* Fix empty time input contrast */
input[type="time"]:invalid,
input[type="time"]:empty {
  color: rgba(200, 200, 200, 0.6) !important;
}

input[type="time"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field {
  color: var(--card-body-text) !important;
}

input[type="time"]:invalid::-webkit-datetime-edit-text,
input[type="time"]:invalid::-webkit-datetime-edit-hour-field,
input[type="time"]:invalid::-webkit-datetime-edit-minute-field {
  color: rgba(200, 200, 200, 0.6) !important;
}

.theme-light input[type="time"]:invalid,
.theme-light input[type="time"]:empty {
  color: rgba(108, 117, 125, 0.8) !important;
}

.theme-light input[type="time"]:invalid::-webkit-datetime-edit-text,
.theme-light input[type="time"]:invalid::-webkit-datetime-edit-hour-field,
.theme-light input[type="time"]:invalid::-webkit-datetime-edit-minute-field {
  color: rgba(108, 117, 125, 0.8) !important;
}

/* Fix input-group-text contrast */
.input-group-text {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--card-body-text) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.theme-light .input-group-text {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--card-body-text) !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
}

/* Ensure all form controls have proper text color */
.form-control,
.form-select {
  color: var(--card-body-text) !important;
}

.form-control:focus,
.form-select:focus {
  color: var(--card-body-text) !important;
}

/* Ensure dropdown options are readable in dark and light themes */
.form-select option,
select option {
  background: #0f172a;
  color: #f8fafc;
}

.theme-light .form-select option,
.theme-light select option {
  background: #ffffff;
  color: #0f172a;
}

/* Mobile optimizations for forms */
@media (max-width: 768px) {
  .row-cols-md-3>* {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .input-group {
    flex-wrap: wrap;
  }

  .input-group-sm .input-group-text {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
  }

  .form-check-inline {
    display: block !important;
    margin-bottom: 0.5rem;
  }

  .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Mobile navbar improvements */
  .site-header .d-flex {
    flex-wrap: wrap;
  }

  .site-header .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }

  .site-header .brand {
    font-size: 1.2rem;
  }
}

/* ============================================
   NAVBAR IMPROVEMENTS
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   MODAL Z-INDEX FIXES & ENHANCEMENTS
   ============================================ */
.modal.show {
  z-index: 1055 !important;
  pointer-events: none !important;
  /* Container doesn't capture events */
  /* Remove Bootstrap's flex centering that breaks modal layout */
  display: block !important;
  align-items: unset !important;
  justify-content: unset !important;
  padding: 0 !important;
}


.modal-backdrop {
  z-index: 1050 !important;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
  pointer-events: auto !important;
  /* Backdrop captures clicks */
}

.modal-dialog {
  z-index: 1056 !important;
  margin: 1.75rem auto;
  max-width: 500px;
  position: relative;
  pointer-events: auto !important;
  /* Dialog captures events */
  /* Ensure dialog is centered and visible */
  display: block !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}


/* Bootstrap 5 modal z-index fixes */
.modal.fade .modal-dialog {
  z-index: 1056 !important;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translate(0, -50px);
  opacity: 0;
  pointer-events: auto !important;
}

.modal.show .modal-dialog,
.modal.fade.show .modal-dialog {
  transform: translate(0, 0);
  opacity: 1;
  pointer-events: auto !important;
}

/* Ensure modal content and all interactive elements work */
.modal-content {
  pointer-events: auto !important;
}

.modal form,
.modal input,
.modal button,
.modal select,
.modal textarea,
.modal a,
.modal label,
.modal .form-check,
.modal .form-check-input,
.modal .form-check-label {
  pointer-events: auto !important;
}


/* Custom modals */
.modal-content,
.modal-content-custom {
  z-index: 1057 !important;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--card-body-text);
  overflow: hidden;
  position: relative;
}

/* Modal Header Improvements */
.modal-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 12px 0 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--card-header-text);
  margin: 0;
  line-height: 1.4;
}

.modal-header .btn-close {
  background: transparent;
  border: none;
  opacity: 0.7;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header .btn-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-header .btn-close:focus {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
  opacity: 1;
}

/* Modal Body Improvements */
.modal-body {
  padding: 1.5rem;
  color: var(--card-body-text);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Modal Footer Improvements */
.modal-footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
}

.modal-footer .btn {
  min-width: 100px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-footer .btn:focus {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
}

/* Mobile Modal Improvements */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .modal-content,
  .modal-content-custom {
    border-radius: 8px;
    max-height: calc(100vh - 1rem);
  }

  .modal-header {
    padding: 1rem;
    border-radius: 8px 8px 0 0;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: calc(100vh - 150px);
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 0;
  }

  .modal-footer .btn:not(:last-child) {
    margin-top: 0.5rem;
  }
}

/* ============================================
   ENHANCED VARIABLES - Dashboard Compatibility
   ============================================ */
:root {
  /* Animation speeds */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-base: 0.3s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.3);
  --glass-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.32);
  --glass-shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.35);
  --glass-shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.4);
  --gold-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  --gold-glow-subtle: 0 0 10px rgba(255, 215, 0, 0.2);

  /* Spacing - Dashboard compatibility */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Border radius - Dashboard compatibility */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 999px;

  /* Typography - Dashboard compatibility */
  --text-xs: 0.75rem;
  --font-semibold: 600;
  --font-bold: 700;
  --white: #ffffff;

  /* Z-index */
  --z-fixed: 1000;
}

/* ============================================
   ENHANCED STATISTICS CARDS
   ============================================ */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--btn-accent-bg), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--btn-accent-bg);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
  color: var(--btn-accent-bg);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
  color: var(--card-header-text);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--card-body-text);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   ENHANCED NAVIGATION CARDS
   ============================================ */
.nav-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.nav-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--spacing-lg);
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  transition: all var(--transition-normal);
  font-size: 1.5rem;
  color: var(--btn-accent-bg);
}

.nav-card:hover {
  transform: translateX(8px);
  border-color: var(--btn-accent-bg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
}

.nav-card:hover::after {
  content: '→';
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.nav-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  color: var(--btn-accent-bg);
  transition: all var(--transition-normal);
}

.nav-card:hover .nav-card-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
}

.nav-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--card-header-text);
}

.nav-card-description {
  font-size: 0.875rem;
  color: var(--card-body-text);
  opacity: 0.8;
  line-height: 1.5;
}

/* ============================================
   ENHANCED BUTTONS
   ============================================ */
.btn-modern {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--btn-gold-border);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background: var(--btn-gold-bg);
  color: var(--btn-gold-text) !important;
  box-shadow: var(--btn-gold-shadow);
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
  width: 280px;
  height: 280px;
}

.btn-modern-primary,
.btn-modern-outline {
  background: var(--btn-gold-bg);
  color: var(--btn-gold-text) !important;
  border-color: var(--btn-gold-border);
}

.btn-modern-primary:hover,
.btn-modern-outline:hover {
  transform: translateY(-2px);
  background: var(--btn-gold-bg-hover);
  color: var(--btn-gold-text) !important;
  box-shadow: var(--btn-gold-shadow-hover);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--btn-accent-bg);
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.loading-content .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  margin-bottom: var(--spacing-md);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: var(--card-body-text);
  opacity: 0.7;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
  color: var(--btn-accent-bg);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--card-header-text);
}

.empty-state-description {
  font-size: 0.875rem;
  margin-bottom: var(--spacing-lg);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  .nav-card {
    padding: var(--spacing-md);
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

.slide-in {
  animation: slideIn var(--transition-normal) ease-out;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--btn-accent-bg), #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-lift {
  transition: transform var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* ============================================
   PREMIUM ANIMATIONS - Exact match with newlook
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

/* Apply animations to cards */
.plan,
.use-case,
.lead-capture,
.demo-card,
.testimonial-card {
  animation: fadeSlideUp 0.5s ease both;
}

.plan:nth-child(2) {
  animation-delay: 0.06s;
}

.plan:nth-child(3) {
  animation-delay: 0.12s;
}

.demo-card:nth-child(2) {
  animation-delay: 0.08s;
}

.demo-card:nth-child(3) {
  animation-delay: 0.16s;
}

/* Reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   PREMIUM VALUE CHIPS / BADGES
   ============================================ */
.value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.value-chips li {
  border: 1px solid var(--nb-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--nb-fg);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-new {
  display: inline-block;
  background: var(--nb-gold);
  color: #111;
  font-weight: 900;
  padding: 0.12rem 0.45rem;
  border-radius: 0.6rem;
  font-size: 0.72rem;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

/* ============================================
   PREMIUM SECTION SPACING
   ============================================ */
section,
.section {
  padding-block: clamp(2rem, 6vw, 5rem);
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */
:focus-visible {
  outline: 2px solid var(--nb-gold);
  outline-offset: 2px;
}

/* ============================================
   PREMIUM HERO STYLING
   ============================================ */
.hero {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(1000px 400px at 50% -10%, rgba(255, 215, 0, 0.07), transparent 60%);
}

.hero .overlay {
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.5), rgba(11, 11, 12, 0.2));
}

.hero-title {
  font-weight: 900;
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1.12;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
}

.hero-subtext {
  margin-top: 0.6rem;
  color: var(--nb-muted);
  font-size: clamp(0.9rem, 1.2vw, 0.98rem);
}

/* ============================================
   CUSTOMER PAGES - Unified Styling
   ============================================ */

/* Dashboard Grids */
.dashboard-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-grid-2 {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Stat Cards */
.stat-card {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 24px rgba(255, 215, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stat-card-icon i {
  font-size: 1.5rem;
  color: var(--nb-gold);
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nb-fg);
  margin-bottom: 0.5rem;
}

.stat-card-label {
  color: var(--nb-muted);
  font-size: 0.9rem;
}

/* Brand Glow */
.brand,
.brand-glow {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--nb-fg);
  text-decoration: none;
}

.brand-glow:hover {
  color: var(--nb-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Logged in text */
.logged-in-text {
  color: var(--nb-fg);
  font-size: 0.9rem;
}

/* ============================================
   MOBILE OPTIMIZATIONS - Comprehensive
   ============================================ */

/* Mobile tweaks - match newlook */
@media (max-width: 600px) {
  .hero {
    min-height: 56vh;
  }

  .topbar .brand-inline img,
  .site-header .brand img {
    height: 24px;
  }

  .hero .hero-logo {
    width: clamp(100px, 22vw, 130px);
  }

  .hero-title {
    font-size: clamp(1.4rem, 3.2vw, 2rem);
  }

  .hero-subtext {
    font-size: clamp(0.9rem, 1.2vw, 0.98rem);
  }
}

/* Mobile optimizations for customer pages */
@media (max-width: 768px) {
  .container {
    padding-inline: 1rem;
  }

  .dashboard-grid,
  .dashboard-grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-md);
  }

  .nav-card {
    padding: 1.25rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .card-modern {
    padding: 1rem;
  }

  .site-header,
  .navbar {
    padding: 0.75rem 1rem;
  }

  .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  h2,
  .primary-heading {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
  }
}

@media (max-width: 576px) {
  .main-section {
    padding: 50px 0 60px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .dashboard-grid,
  .dashboard-grid-2 {
    gap: var(--spacing-sm);
  }

  .nav-card {
    padding: 1rem;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .stat-card-value {
    font-size: 1.1rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* ============================================
   BADASS 2025 ENHANCEMENTS - Mobile-First Excellence
   ============================================ */

/* Enhanced Glassmorphism with Depth */
.card,
.glass-card,
.demo-card {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(18, 18, 20, 0.8) 100%);
  position: relative;
  overflow: hidden;
}

.card::before,
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 215, 0, 0.3),
      transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before,
.glass-card:hover::before {
  opacity: 1;
}

/* Enhanced Button Interactions - Touch Optimized */
.btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
  /* iOS touch target */
  min-width: 44px;
  user-select: none;
  -webkit-user-select: none;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  box-shadow:
    0 4px 14px rgba(255, 215, 0, 0.15),
    0 0 0 0 rgba(255, 215, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow:
    0 2px 8px rgba(255, 215, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced Card Hover - 3D Effect */
.card,
.nav-card,
.stat-card {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.card:hover,
.nav-card:hover,
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 215, 0, 0.2),
    0 0 30px rgba(255, 215, 0, 0.1);
}

/* Smooth Scroll with Momentum */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

/* Enhanced Focus States - Accessibility + Style */
:focus-visible {
  outline: 3px solid var(--nb-gold);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--nb-gold);
  outline-offset: 2px;
}

/* Loading States - Skeleton & Spinner */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0.05) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

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

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 215, 0, 0.3);
  border-top-color: var(--nb-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Enhanced Form Inputs - Mobile Optimized */
input,
select,
textarea {
  font-size: 16px;
  /* Prevents zoom on iOS */
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(255, 215, 0, 0.15),
    0 0 0 3px rgba(255, 215, 0, 0.1);
  border-color: var(--nb-gold);
}

input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--nb-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--nb-green);
}

/* Enhanced Typography - Better Mobile Readability */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
}

/* Better Line Heights for Mobile */
p,
li,
.text-muted {
  line-height: 1.7;
  /* Better readability on mobile */
}

@media (max-width: 768px) {

  p,
  li {
    line-height: 1.75;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
  }
}

/* Sticky Elements - Mobile Optimized */
.sticky-top,
.sticky-bottom {
  position: sticky;
  z-index: 1020;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(11, 11, 12, 0.85);
  border-bottom: 1px solid var(--nb-border);
}

.sticky-bottom {
  border-top: 1px solid var(--nb-border);
  border-bottom: none;
}

/* Enhanced Modal - Mobile First */
.modal-content {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xl);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 215, 0, 0.1);
}

@media (max-width: 768px) {
  .modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
    border-radius: var(--radius-lg);
  }
}

/* Touch-Friendly Swipe Indicators */
.swipe-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
  opacity: 0.6;
}

.swipe-indicator::before,
.swipe-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nb-gold);
  animation: pulse 2s ease-in-out infinite;
}

.swipe-indicator::before {
  animation-delay: 0s;
}

.swipe-indicator::after {
  animation-delay: 0.5s;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Enhanced Grid - Better Mobile Spacing */
.dashboard-grid,
.dashboard-grid-2 {
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

@media (max-width: 768px) {

  .dashboard-grid,
  .dashboard-grid-2 {
    gap: 1rem;
  }
}

/* Better Image Loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Enhanced Table - Mobile Scroll */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--nb-gold) transparent;
}

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

.table-responsive::-webkit-scrollbar-track {
  background: var(--nb-bg);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--nb-gold);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--nb-gold-strong);
}

/* Better Badge/Pill Styling */
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  background: rgba(255, 215, 0, 0.15);
  color: var(--nb-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Enhanced Navigation - Mobile Menu */
@media (max-width: 768px) {
  .navbar-nav {
    padding: 1rem 0;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin: 0.25rem 0;
    transition: all 0.2s ease;
  }

  .nav-link:active {
    background: rgba(255, 215, 0, 0.1);
    transform: scale(0.98);
  }
}

/* Better Dropdowns - Mobile */
.dropdown-menu {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(18, 18, 20, 0.95);
  border: 1px solid var(--nb-border);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 215, 0, 0.1);
}

.dropdown-item {
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown-item:active {
  background: rgba(255, 215, 0, 0.15);
  color: var(--nb-gold);
}

/* Enhanced Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: var(--radius-md);
  color: var(--nb-fg);
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* Performance Optimizations */
.card,
.btn,
.nav-card {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Enhancements (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Print Styles */
@media print {

  .btn,
  .nav-card,
  .sticky-top,
  .sticky-bottom {
    display: none;
  }

  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Ultra Mobile (Small Phones) */
@media (max-width: 375px) {
  :root {
    --nb-base-font-size: 15px;
  }

  .container {
    padding-inline: 0.75rem;
  }

  .card,
  .nav-card,
  .stat-card {
    padding: 0.875rem;
  }

  h1 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  h2 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
  }
}

/* Landscape Mobile Optimizations */
@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    min-height: 70vh;
  }

  .modal-content {
    max-height: 85vh;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  .card,
  .btn-primary {
    box-shadow:
      0 4px 14px rgba(255, 215, 0, 0.12),
      0 0 0 0.5px rgba(255, 215, 0, 0.05);
  }
}

/* Enhanced Selection */
::selection {
  background: rgba(255, 215, 0, 0.3);
  color: var(--nb-fg);
}

::-moz-selection {
  background: rgba(255, 215, 0, 0.3);
  color: var(--nb-fg);
}

/* HIGH CONTRAST UTILITY CLASSES - Force high contrast everywhere */
.text-white {
  color: var(--nb-fg) !important;
  color: #ffffff !important;
}

.text-secondary {
  color: var(--nb-muted) !important;
  color: #e0e0e0 !important;
}

.text-muted {
  color: var(--nb-muted) !important;
  color: #e0e0e0 !important;
}

/* High contrast for all text elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
label,
a {
  color: var(--nb-fg) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #ffffff !important;
}

/* Utility padding classes - with card styling (matching newlook) */
.p-6 {
  padding: 1.1rem;
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
  color: var(--nb-fg) !important;
}

/* Dashboard sections that need card styling */
div>.p-6:first-child {
  margin-top: 0;
}

/* Quick Actions cards - ensure they're visible */
.row.g-4>div>a {
  display: block;
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  text-decoration: none !important;
  color: var(--nb-fg) !important;
  transition: all 0.3s ease !important;
  height: 100% !important;
}

.row.g-4>div>a:hover {
  border-color: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
  color: var(--nb-fg) !important;
}

.row.g-4>div>a h4 {
  color: #ffffff !important;
  margin-bottom: 0.75rem !important;
}

.row.g-4>div>a p {
  color: var(--nb-muted) !important;
}

.row.g-4>div>a i {
  font-size: 2.5rem !important;
  color: var(--nb-gold) !important;
  margin-bottom: 1rem !important;
  display: block !important;
}

/* Dashboard grid cards */
.dashboard-grid,
.dashboard-grid-2 {
  display: grid !important;
  gap: 1.5rem !important;
  margin-bottom: 2rem !important;
}

.dashboard-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.dashboard-grid>a,
.dashboard-grid-2>a {
  display: block;
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  text-decoration: none !important;
  color: var(--nb-fg) !important;
  transition: all 0.3s ease !important;
  text-align: center !important;
}

.dashboard-grid>a:hover,
.dashboard-grid-2>a:hover {
  border-color: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-2px) !important;
  text-decoration: none !important;
  color: var(--nb-fg) !important;
}

.dashboard-grid>a h4,
.dashboard-grid-2>a h4 {
  color: #ffffff !important;
  margin-bottom: 0.75rem !important;
}

.dashboard-grid>a p,
.dashboard-grid-2>a p {
  color: var(--nb-muted) !important;
}

.dashboard-grid>a i,
.dashboard-grid-2>a i {
  font-size: 2.5rem !important;
  color: var(--nb-gold) !important;
  margin-bottom: 1rem !important;
}

/* Ensure card-modern-body has proper styling */
.card-modern-body {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  color: var(--nb-fg) !important;
}

/* Class cards in dashboard - ensure they're visible */
.row.g-3>div>div,
.row.g-4>div>div {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.5rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  color: var(--nb-fg) !important;
  transition: all 0.3s ease !important;
  height: 100% !important;
}

.row.g-3>div>div:hover,
.row.g-4>div>div:hover {
  border-color: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.06), 0 6px 12px rgba(0, 0, 0, 0.35) !important;
  transform: translateY(-2px) !important;
}

.row.g-3>div>div h5,
.row.g-4>div>div h5 {
  color: #ffffff !important;
  margin-bottom: 1rem !important;
}

.row.g-3>div>div i,
.row.g-4>div>div i {
  font-size: 2rem !important;
  color: var(--nb-gold) !important;
  margin-bottom: 0.75rem !important;
}

.row.g-3>div>div .fw-bold,
.row.g-4>div>div .fw-bold {
  color: #ffffff !important;
}

.row.g-3>div>div .text-muted,
.row.g-4>div>div .text-muted,
.row.g-3>div>div .text-secondary,
.row.g-4>div>div .text-secondary {
  color: var(--nb-muted) !important;
}

/* Font utility classes */
.font-display {
  font-family: var(--font-sans) !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
}

.font-body {
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
}

/* Progress bar */
.progress-modern {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}

.progress-modern-bar {
  background: var(--nb-gold) !important;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Ensure all dashboard elements have high contrast */
.container .text-white,
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6 {
  color: #ffffff !important;
}

.container .text-secondary,
.container .text-muted,
.container p,
.container span:not(.badge):not(.btn) {
  color: var(--nb-muted) !important;
  color: #e0e0e0 !important;
}

/* High contrast for buttons */
.btn-secondary {
  background: transparent !important;
  border: 1px solid var(--nb-border) !important;
  color: var(--nb-fg) !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  border-color: var(--nb-gold) !important;
  color: var(--nb-gold) !important;
}

/* High contrast for form elements */
.form-control,
.form-control-modern,
input,
select,
textarea {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  color: var(--nb-fg) !important;
  color: #ffffff !important;
}

.form-control:focus,
.form-control-modern:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--nb-gold) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* High contrast for labels */
label,
.form-label-modern {
  color: var(--nb-fg) !important;
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* ============================================
   AGGRESSIVE HIGH CONTRAST OVERRIDES
   Force maximum contrast on ALL elements
   ============================================ */

/* Force white text on ALL headings - override Bootstrap and everything */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: #ffffff !important;
}

/* Force high contrast on all body text - but preserve card structure */
body {
  color: var(--nb-fg) !important;
  background: var(--nb-bg) !important;
}

/* Don't override everything - let cards handle their own styling */
body>*:not(.card):not(.card-modern):not(.stat-card):not(.nav-card):not(.btn):not(.btn-modern):not(.btn-modern-primary):not(.btn-modern-outline):not(.btn-custom):not(.btn-primary):not(.btn-success):not(.btn-secondary):not(.btn-ghost):not(.btn-outline):not(.btn-outline-primary):not(.badge):not(.text-muted):not(.text-secondary) {
  color: var(--nb-fg) !important;
}

/* Force high contrast on all cards and their children - PRESERVE CARD STRUCTURE */
.card,
.card-modern,
.stat-card,
.nav-card {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 1.1rem !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
  color: var(--nb-fg) !important;
  margin-bottom: 1.5rem !important;
  display: block !important;
  position: relative !important;
}

.card *,
.card-modern *,
.stat-card *,
.nav-card * {
  color: inherit !important;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card-modern h1,
.card-modern h2,
.card-modern h3,
.card-modern h4,
.card-modern h5,
.card-modern h6,
.stat-card h1,
.stat-card h2,
.stat-card h3,
.stat-card h4,
.stat-card h5,
.stat-card h6 {
  color: #ffffff !important;
}

.card p,
.card span:not(.badge):not(.btn),
.card-modern p,
.card-modern span:not(.badge):not(.btn),
.stat-card p,
.stat-card span:not(.badge):not(.btn) {
  color: var(--nb-muted) !important;
}

/* Force high contrast on all containers */
.container,
.container-fluid,
main,
section {
  color: var(--nb-fg) !important;
}

.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  color: #ffffff !important;
}

/* Override Bootstrap text utilities */
.text-white {
  color: #ffffff !important;
}

.text-secondary {
  color: #e0e0e0 !important;
}

.text-muted {
  color: #e0e0e0 !important;
}

/* Force high contrast on dashboard specific elements */
.dashboard-grid,
.dashboard-grid-2 {
  color: var(--nb-fg) !important;
}

.dashboard-grid *,
.dashboard-grid-2 * {
  color: inherit !important;
}

/* Force high contrast on all links */
a:not(.btn):not(.badge) {
  color: var(--nb-gold) !important;
}

a:not(.btn):not(.badge):hover {
  color: var(--nb-gold-strong) !important;
}

/* Force high contrast on all form elements */
input:not([type="submit"]):not([type="button"]),
select,
textarea {
  background: var(--nb-card) !important;
  border: 1px solid var(--nb-border) !important;
  color: #ffffff !important;
}

input:not([type="submit"]):not([type="button"])::placeholder,
textarea::placeholder {
  color: var(--nb-muted) !important;
  opacity: 0.7 !important;
}

/* Mobile: Ensure high contrast is maintained */
@media (max-width: 768px) {

  body,
  body * {
    color: var(--nb-fg) !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #ffffff !important;
  }

  .text-secondary,
  .text-muted {
    color: #e0e0e0 !important;
  }
}

/* === CRITICAL BUTTON OVERRIDES - MUST BE LAST === */
/* Force all primary-style buttons to use gold with dark text */
.btn.btn-primary,
.btn.btn-success,
.btn.btn-custom,
.btn.btn-modern,
.btn.btn-modern-primary,
.btn.luxury-btn-primary,
button.btn-primary,
button.btn-success,
button.btn-custom,
button.btn-modern,
button.btn-modern-primary,
button.luxury-btn-primary,
a.btn-primary,
a.btn-success,
a.btn-custom,
a.btn-modern,
a.btn-modern-primary,
a.luxury-btn-primary {
  background: var(--nb-gold, #ffd700) !important;
  background-color: var(--nb-gold, #ffd700) !important;
  color: #111 !important;
  border-color: var(--nb-gold, #ffd700) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}

.btn.btn-primary:hover,
.btn.btn-success:hover,
.btn.btn-custom:hover,
.btn.btn-modern:hover,
.btn.btn-modern-primary:hover,
button.btn-primary:hover,
button.btn-success:hover,
button.btn-custom:hover,
button.btn-modern:hover,
button.btn-modern-primary:hover,
a.btn-primary:hover,
a.btn-success:hover,
a.btn-custom:hover,
a.btn-modern:hover,
a.btn-modern-primary:hover,
.btn.btn-primary:focus,
.btn.btn-success:focus,
.btn.btn-custom:focus,
.btn.btn-modern:focus,
.btn.btn-modern-primary:focus {
  background: var(--nb-gold-strong, #f2c300) !important;
  background-color: var(--nb-gold-strong, #f2c300) !important;
  color: #111 !important;
  border-color: var(--nb-gold-strong, #f2c300) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
}

/* Outline buttons - gold background with dark text (matching primary) */
.btn.btn-secondary,
.btn.btn-ghost,
.btn.btn-outline,
.btn.btn-outline-primary,
.btn.btn-modern-outline,
.btn.luxury-btn-outline,
.btn.luxury-btn-ghost,
.btn.btn-pink,
.btn.btn-light,
.btn.btn-modern-back,
button.btn-secondary,
button.btn-ghost,
button.btn-outline,
button.btn-outline-primary,
button.btn-modern-outline,
button.luxury-btn-outline,
button.luxury-btn-ghost,
button.btn-pink,
button.btn-light,
button.btn-modern-back,
a.btn-secondary,
a.btn-ghost,
a.btn-outline,
a.btn-outline-primary,
a.btn-modern-outline,
a.luxury-btn-outline,
a.luxury-btn-ghost,
a.btn-pink,
a.btn-light,
a.btn-modern-back {
  background: var(--nb-gold, #ffd700) !important;
  background-color: var(--nb-gold, #ffd700) !important;
  color: #111 !important;
  border-color: var(--nb-gold, #ffd700) !important;
  border-radius: 999px !important;
}

.btn.btn-secondary:hover,
.btn.btn-ghost:hover,
.btn.btn-outline:hover,
.btn.btn-outline-primary:hover,
.btn.btn-modern-outline:hover,
.btn.luxury-btn-outline:hover,
.btn.luxury-btn-ghost:hover,
.btn.btn-pink:hover,
.btn.btn-light:hover,
.btn.btn-modern-back:hover,
button.btn-secondary:hover,
button.btn-ghost:hover,
button.btn-outline:hover,
button.btn-outline-primary:hover,
button.btn-modern-outline:hover,
button.luxury-btn-outline:hover,
button.luxury-btn-ghost:hover,
button.btn-pink:hover,
button.btn-light:hover,
button.btn-modern-back:hover,
a.btn-secondary:hover,
a.btn-ghost:hover,
a.btn-outline:hover,
a.btn-outline-primary:hover,
a.btn-modern-outline:hover,
a.luxury-btn-outline:hover,
a.luxury-btn-ghost:hover,
a.btn-pink:hover,
a.btn-light:hover,
a.btn-modern-back:hover {
  background: var(--nb-gold-strong, #f2c300) !important;
  background-color: var(--nb-gold-strong, #f2c300) !important;
  color: #111 !important;
  border-color: var(--nb-gold-strong, #f2c300) !important;
}

/* === ULTRA-SPECIFIC FIXES FOR BUTTON TEXT COLOR === */
/* Force black text on gold for all button contexts */
.hero-cta .btn-modern.btn-modern-primary,
.hero-cta .btn-modern.btn-modern-outline,
.package-card .btn-modern.btn-modern-primary,
.package-card .btn-modern.btn-modern-primary.btn-sm,
.service-card .btn-modern.btn-modern-primary,
.service-card .btn-modern.btn-modern-primary.btn-sm,
.stat-card .btn-modern.btn-modern-primary,
.stat-card .btn-modern.btn-modern-primary.btn-sm,
.card .btn-modern.btn-modern-primary,
.card .btn-modern.btn-modern-primary.btn-sm,
.dashboard-packages .btn-modern.btn-modern-primary,
.dashboard-packages .btn-modern.btn-modern-primary.btn-sm,
.nav-card .btn-modern.btn-modern-primary,
.nav-card .btn-modern.btn-modern-primary.btn-sm {
  background: var(--nb-gold, #ffd700) !important;
  color: #111 !important;
  border-color: var(--nb-gold, #ffd700) !important;
}

.hero-cta .btn-modern.btn-modern-primary:hover,
.hero-cta .btn-modern.btn-modern-outline:hover,
.package-card .btn-modern.btn-modern-primary:hover,
.package-card .btn-modern.btn-modern-primary.btn-sm:hover,
.service-card .btn-modern.btn-modern-primary:hover,
.service-card .btn-modern.btn-modern-primary.btn-sm:hover,
.stat-card .btn-modern.btn-modern-primary:hover,
.stat-card .btn-modern.btn-modern-primary.btn-sm:hover,
.card .btn-modern.btn-modern-primary:hover,
.card .btn-modern.btn-modern-primary.btn-sm:hover,
.dashboard-packages .btn-modern.btn-modern-primary:hover,
.dashboard-packages .btn-modern.btn-modern-primary.btn-sm:hover,
.nav-card .btn-modern.btn-modern-primary:hover,
.nav-card .btn-modern.btn-modern-primary.btn-sm:hover {
  background: var(--nb-gold-strong, #f2c300) !important;
  color: #111 !important;
  border-color: var(--nb-gold-strong, #f2c300) !important;
}

/* Tenant legacy styles from modern-ui.css */
/* ============================================
   MODERN UI ENHANCEMENTS
   Beautiful, modern interface improvements
   ============================================ */

/* Bootstrap Icons - Loaded via <link> tag in HTML for better reliability */

/* ============================================
   CONTRAST FIXES FOR FORM CONTROLS
   ============================================ */
/* Fix placeholder contrast */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(244, 244, 246, 0.6) !important;
  opacity: 1 !important;
}

.theme-light .form-control::placeholder,
.theme-light .form-select::placeholder,
.theme-light input::placeholder,
.theme-light textarea::placeholder {
  color: rgba(108, 117, 125, 0.8) !important;
  opacity: 1 !important;
}

/* Fix empty time input contrast */
input[type="time"]:invalid,
input[type="time"]:empty {
  color: rgba(244, 244, 246, 0.6) !important;
}

input[type="time"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field {
  color: var(--card-body-text) !important;
}

input[type="time"]:invalid::-webkit-datetime-edit-text,
input[type="time"]:invalid::-webkit-datetime-edit-hour-field,
input[type="time"]:invalid::-webkit-datetime-edit-minute-field {
  color: rgba(244, 244, 246, 0.6) !important;
}

.theme-light input[type="time"]:invalid,
.theme-light input[type="time"]:empty {
  color: rgba(108, 117, 125, 0.8) !important;
}

.theme-light input[type="time"]:invalid::-webkit-datetime-edit-text,
.theme-light input[type="time"]:invalid::-webkit-datetime-edit-hour-field,
.theme-light input[type="time"]:invalid::-webkit-datetime-edit-minute-field {
  color: rgba(108, 117, 125, 0.8) !important;
}

/* Fix input-group-text contrast */
.input-group-text {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--card-body-text) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.theme-light .input-group-text {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--card-body-text) !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
}

/* Ensure all form controls have proper text color */
.form-control,
.form-select {
  color: var(--card-body-text) !important;
}

.form-control:focus,
.form-select:focus {
  color: var(--card-body-text) !important;
}

/* Mobile optimizations for forms */
@media (max-width: 768px) {
  .row-cols-md-3>* {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .input-group {
    flex-wrap: wrap;
  }

  .input-group-sm .input-group-text {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
  }

  .form-check-inline {
    display: block !important;
    margin-bottom: 0.5rem;
  }

  .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Mobile navbar improvements */
  .site-header .d-flex {
    flex-wrap: wrap;
  }

  .site-header .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }

  .site-header .brand {
    font-size: 1.2rem;
  }
}

/* ============================================
   NAVBAR IMPROVEMENTS
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   MODAL Z-INDEX FIXES & ENHANCEMENTS
   Ensure modals appear above the sticky nav bar
   ============================================ */
.modal,
.modal.show,
.modal.fade {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.modal-dialog {
  z-index: 1056 !important;
  margin: 1.75rem auto;
  max-width: 500px;
  position: relative;
}

/* Bootstrap 5 modal z-index fixes */
.modal.fade .modal-dialog {
  z-index: 1056 !important;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translate(0, -50px);
  opacity: 0;
}

.modal.show .modal-dialog,
.modal.fade.show .modal-dialog {
  transform: translate(0, 0);
  opacity: 1;
}

/* Custom modals */
.modal-content,
.modal-content-custom {
  z-index: 1057 !important;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--card-body-text);
  overflow: hidden;
  position: relative;
}

/* Modal Header Improvements */
.modal-header {
  background-color: var(--card-header-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--card-header-text);
  margin: 0;
  line-height: 1.4;
}

.modal-header .btn-close {
  background: transparent;
  border: none;
  opacity: 0.7;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem auto;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header .btn-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-header .btn-close:focus {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
  opacity: 1;
}

/* Modal Body Improvements */
.modal-body {
  padding: 1.5rem;
  color: var(--card-body-text);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Modal Footer Improvements */
.modal-footer {
  background-color: var(--card-header-bg);
  border-top: 1px solid var(--card-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
}

.modal-footer .btn {
  min-width: 100px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.modal-footer .btn:focus {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
}

/* Custom Modal Content */
.modal-content-custom {
  padding: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
}

.modal-header-custom {
  background-color: var(--card-header-bg);
  color: var(--card-header-text);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-body-custom {
  padding: 1.5rem;
  color: var(--card-body-text);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

/* Close Button (Legacy) */
.close {
  color: var(--card-body-text);
  opacity: 0.7;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  background: transparent;
  border: none;
}

.close:hover,
.close:focus {
  opacity: 1;
  color: var(--btn-accent-bg);
  transform: scale(1.1);
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translate(0, -50px);
    opacity: 0;
  }

  to {
    transform: translate(0, 0);
    opacity: 1;
  }
}

.modal.fade {
  animation: modalFadeIn 0.3s ease-out;
}

.modal.fade .modal-dialog {
  animation: modalSlideIn 0.3s ease-out;
}

/* Mobile Modal Improvements */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .modal-content,
  .modal-content-custom {
    border-radius: var(--radius-md);
    max-height: calc(100vh - 1rem);
  }

  .modal-header {
    padding: 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: calc(100vh - 150px);
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
    margin: 0;
  }

  .modal-footer .btn:not(:last-child) {
    margin-top: 0.5rem;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.25rem;
    max-width: calc(100% - 0.5rem);
  }

  .modal-content {
    border-radius: var(--radius-sm);
  }

  .modal-header {
    padding: 0.75rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  .modal-footer {
    padding: 0.75rem;
  }
}

/* Large Modal Variant */
.modal-dialog.modal-lg {
  max-width: 800px;
}

.modal-dialog.modal-xl {
  max-width: 1140px;
}

/* Fullscreen Modal on Mobile */
@media (max-width: 576px) {
  .modal-dialog.modal-fullscreen-sm-down {
    max-width: 100%;
    margin: 0;
    height: 100vh;
  }

  .modal-dialog.modal-fullscreen-sm-down .modal-content {
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .modal-dialog.modal-fullscreen-sm-down .modal-body {
    flex: 1;
    overflow-y: auto;
  }
}

/* Focus Trap for Accessibility */
.modal:focus {
  outline: none;
}

.modal *:focus {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
}

/* Ensure any modal overlay is above header */
[class*="modal"],
[id*="modal"],
[id*="Modal"] {
  z-index: 1055 !important;
}

/* Popup Content (Legacy) */
.popup-content {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 90%;
  position: relative;
  z-index: 1057 !important;
}

/* Light Theme Modal Adjustments */
.theme-light .modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

.theme-light .modal-content,
.theme-light .modal-content-custom {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.theme-light .modal-header .btn-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.theme-light .close:hover,
.theme-light .close:focus {
  color: var(--btn-accent-bg);
}

/* ============================================
   CALENDAR MOBILE IMPROVEMENTS
   Top mobile experience for calendar
   ============================================ */

/* Mobile Calendar Container */
@media (max-width: 767px) {
  #calendar {
    padding: 0.25rem !important;
    /* Reduced padding for more space */
    border-radius: var(--radius-md);
    margin: 0.25rem 0;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: visible !important;
  }

  /* Force full width calendar on mobile */
  .fc {
    width: 100% !important;
    max-width: 100% !important;
  }

  .fc .fc-view-harness {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Remove any min-width constraints on time grid */
  .fc .fc-timegrid {
    min-width: 100% !important;
    width: 100% !important;
  }

  /* Ensure columns are full width */
  .fc .fc-timegrid-col {
    min-width: 100% !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 0.25rem !important;
  }

  /* Make event boxes take maximum width */
  .fc .fc-timegrid-event {
    min-width: calc(100% - 0.75rem) !important;
    /* Almost full width */
    width: calc(100% - 0.75rem) !important;
    max-width: calc(100% - 0.75rem) !important;
    margin: 0.375rem 0.25rem !important;
    /* Minimal margins */
    left: 0.25rem !important;
    right: 0.25rem !important;
  }

  .fc .fc-timegrid-event-harness {
    margin-right: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  /* Sticky Toolbar on Mobile */
  .nb-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Better Toolbar Layout */
  .nb-toolbar .btn-group {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
  }

  .nb-toolbar .btn-modern {
    min-height: 44px;
    /* iOS touch target */
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    flex: 1 1 auto;
    min-width: calc(50% - 0.1875rem);
  }

  .nb-toolbar .nb-range {
    font-size: 0.9375rem;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-header-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--card-header-text) !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  /* Fix orange/gold text on white background in range display */
  .nb-toolbar .nb-range,
  .nb-toolbar .nb-range * {
    color: var(--card-header-text) !important;
  }

  /* Override any orange/gold colors in range */
  .nb-toolbar .nb-range [style*="color"],
  .nb-toolbar .nb-range [style*="ffd700"],
  .nb-toolbar .nb-range [style*="ff9800"] {
    color: var(--card-header-text) !important;
  }

  /* View Buttons - Hide Month View on Mobile, Only Day & Week */
  .nb-toolbar .btn-group[role="group"] {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    margin-top: 0.5rem;
  }

  /* Hide Month View Button on Mobile */
  #nb-view-month {
    display: none !important;
  }

  /* Also hide by icon class */
  .nb-toolbar .btn-modern:has(.bi-calendar-month) {
    display: none !important;
  }

  .nb-toolbar .btn-group[role="group"] .btn-modern {
    min-width: auto;
    width: 100%;
  }

  /* Navigation Buttons */
  .nb-toolbar .btn-group:first-of-type {
    display: flex;
    width: 100%;
    gap: 0.375rem;
  }

  .nb-toolbar .btn-group:first-of-type .btn-modern {
    flex: 1;
    min-width: 44px;
  }

  /* Calendar Events - Better Touch Targets & Maximum Visibility */
  .fc-event-custom {
    min-height: 44px !important;
    /* iOS touch target */
    padding: 0.625rem 0.75rem !important;
    margin: 0.375rem 0 !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.2);
    /* Enhanced background for better text visibility */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.35)) !important;
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  }

  .fc-event-custom:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  /* Event Text - Maximum Readability & Contrast */
  .fc-event-custom .ec-title {
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    margin-bottom: 0.375rem;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7) !important;
    letter-spacing: 0.2px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .fc-event-custom .ec-time {
    font-size: 0.8125rem !important;
    padding: 0.375rem 0.75rem !important;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
    background: var(--btn-accent-bg) !important;
    color: var(--btn-accent-text) !important;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4) !important;
    border: 1px solid rgba(255, 215, 0, 0.3);
  }

  /* Hide Less Important Info on Mobile */
  .fc-event-custom .ec-slots,
  .fc-event-custom .ec-resource {
    display: none !important;
  }

  /* Day Grid Improvements */
  .fc .fc-daygrid-day-frame {
    padding: 0.25rem !important;
    min-height: 60px;
  }

  .fc .fc-daygrid-day-number {
    font-size: 0.875rem !important;
    padding: 0.375rem 0.5rem !important;
    font-weight: 600;
  }

  /* Column Headers */
  .fc .fc-col-header-cell-cushion {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.25rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Better Scrolling */
  .fc .fc-scroller {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  /* Calendar Grid - Optimized Width */
  .fc .fc-scrollgrid,
  .fc .fc-daygrid-body table,
  .fc .fc-col-header table {
    min-width: 100% !important;
  }

  /* Toolbar Title */
  .fc .fc-toolbar-title {
    font-size: 1.1rem !important;
    text-align: center;
    width: 100%;
    margin: 0.5rem 0;
  }

  /* Filter Sidebar - Mobile Drawer */
  #pub-sidebar,
  #cust-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--card-border);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    padding: 1rem;
  }

  #pub-sidebar.open,
  #cust-sidebar.open {
    left: 0;
  }

  /* Filter Sidebar Overlay */
  #pub-sidebar::before,
  #cust-sidebar::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  #pub-sidebar.open::before,
  #cust-sidebar.open::before {
    opacity: 1;
    pointer-events: all;
  }

  /* Filter Card Mobile */
  .nb-filter-card {
    position: static !important;
    margin-bottom: 1rem;
  }

  .nb-filter-header {
    padding: 1rem;
    font-size: 1.1rem;
  }

  .nb-filter-select {
    min-height: 200px;
    font-size: 0.875rem;
  }

  /* Filter Toggle Button */
  #pub-filter-toggle,
  #cust-filter-toggle {
    min-height: 44px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
  }

  /* List View - Mobile Optimized */
  .fc .fc-list-event {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
  }

  .fc .fc-list-event-title {
    font-size: 0.9375rem;
    line-height: 1.4;
  }

  .fc .fc-list-event-time {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }

  /* ============================================
     PREMIUM DAY & WEEK VIEW ENHANCEMENTS
     ============================================ */

  /* Time Grid - Premium Mobile Experience */
  .fc-timeGridDay-view,
  .fc-timeGridWeek-view {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  /* Time Labels - Premium Styling */
  .fc .fc-timegrid-slot-label {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 600;
    color: var(--card-header-text);
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
  }

  .fc .fc-timegrid-slot-label-cushion {
    color: var(--card-body-text);
    opacity: 0.9;
  }

  /* Time Slots - Better Spacing */
  .fc .fc-timegrid-slot {
    height: 3em !important;
    min-height: 48px;
  }

  /* Time Grid Events - MAXIMUM WIDTH & READABILITY ON MOBILE */
  .fc .fc-timegrid-event {
    min-height: 56px !important;
    margin: 0.375rem 0.25rem !important;
    /* Minimal margins - boxes take almost full width */
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5)) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    min-width: calc(100% - 0.75rem) !important;
    /* Almost full width */
    width: calc(100% - 0.75rem) !important;
    max-width: calc(100% - 0.75rem) !important;
    left: 0.25rem !important;
    right: 0.25rem !important;
  }

  /* Time Grid Event Harness - MAXIMUM WIDTH */
  .fc .fc-timegrid-event-harness {
    margin-right: 0 !important;
    margin-left: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Time Grid Columns - FULL WIDTH for maximum box width */
  .fc .fc-timegrid-col {
    min-width: 100% !important;
    width: 100% !important;
    padding: 0 0.25rem !important;
  }

  /* Time Grid Body - FULL WIDTH */
  .fc .fc-timegrid-body {
    width: 100% !important;
    overflow-x: visible !important;
  }

  /* Time Grid Scroll Grid - Remove horizontal scroll constraints */
  .fc .fc-timegrid {
    width: 100% !important;
  }

  .fc .fc-scrollgrid {
    width: 100% !important;
    table-layout: fixed !important;
  }

  .fc .fc-scrollgrid-sync-table {
    width: 100% !important;
  }

  .fc .fc-timegrid-event:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px);
  }

  /* Time Grid Event Content - MAXIMUM WIDTH & PADDING */
  .fc .fc-timegrid-event .fc-event-main {
    padding: 1rem 1.125rem !important;
    /* More padding for readability */
    border-radius: var(--radius-md);
    background: transparent !important;
    position: relative;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Dark overlay for text readability */
  .fc .fc-timegrid-event .fc-event-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    border-radius: var(--radius-md);
    z-index: 0;
    pointer-events: none;
  }

  .fc .fc-timegrid-event .fc-event-main>* {
    position: relative;
    z-index: 1;
  }

  .fc .fc-timegrid-event .ec-title {
    font-size: 1.25rem !important;
    /* MUCH LARGER for mobile readability */
    font-weight: 800 !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    margin-bottom: 0.625rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 1) !important;
    letter-spacing: 0.4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    white-space: normal !important;
    /* Allow wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block !important;
    width: 100% !important;
  }

  .fc .fc-timegrid-event .ec-time {
    font-size: 0.9375rem !important;
    /* Larger time badge */
    padding: 0.5rem 0.875rem !important;
    font-weight: 800;
    background: var(--btn-accent-bg) !important;
    color: var(--btn-accent-text) !important;
    border-radius: 999px;
    box-shadow: 0 3px 6px rgba(255, 215, 0, 0.5);
    margin-bottom: 0.375rem;
    display: inline-block;
  }

  /* Show Resource on Time Grid Mobile */
  .fc .fc-timegrid-event .ec-resource {
    display: block !important;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* Time Grid Column Headers - Fix White Background, Use Dark */
  .fc .fc-timegrid-col-header {
    background: var(--card-header-bg) !important;
    border-bottom: 2px solid var(--card-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  /* Fix white background on header cells */
  .fc .fc-timegrid-col-header .fc-col-header-cell {
    background: var(--card-header-bg) !important;
    border: none !important;
  }

  .fc .fc-timegrid-col-header .fc-col-header-cell-cushion {
    font-size: 0.9375rem !important;
    font-weight: 800 !important;
    padding: 0.875rem 0.625rem !important;
    color: var(--card-header-text) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: transparent !important;
  }

  /* Force dark background for any white backgrounds in headers */
  .fc .fc-timegrid-col-header,
  .fc .fc-timegrid-col-header *,
  .fc .fc-col-header,
  .fc .fc-col-header * {
    background-color: var(--card-header-bg) !important;
    background: var(--card-header-bg) !important;
  }

  /* Override any orange/gold colors in column headers */
  .fc .fc-timegrid-col-header .fc-col-header-cell-cushion,
  .fc .fc-timegrid-col-header .fc-col-header-cell-cushion *,
  .fc .fc-timegrid-col-header [style*="ffd700"],
  .fc .fc-timegrid-col-header [style*="ff9800"],
  .fc .fc-timegrid-col-header [style*="orange"] {
    color: var(--card-header-text) !important;
  }

  /* Column Headers - Better Contrast */
  .fc .fc-col-header-cell-cushion {
    font-size: 0.8125rem !important;
    padding: 0.625rem 0.375rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--card-header-text) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: var(--card-header-bg);
    border-radius: var(--radius-sm);
    margin: 0.25rem;
    display: inline-block;
  }

  /* Fix orange/gold text on light backgrounds - Force dark text */
  .fc .fc-timegrid-col-header,
  .fc .fc-timegrid-col-header *,
  .fc .fc-col-header,
  .fc .fc-col-header *,
  .fc .fc-timegrid-slot-label,
  .fc .fc-timegrid-slot-label * {
    color: var(--card-header-text) !important;
  }

  /* Override any inline styles with orange/gold colors */
  .fc [style*="ffd700"],
  .fc [style*="ff9800"],
  .fc [style*="orange"],
  .fc [style*="gold"] {
    color: var(--card-header-text) !important;
  }

  /* Fix separator text in time grid */
  .fc .fc-timegrid-divider,
  .fc .fc-timegrid-divider *,
  .fc .fc-timegrid-slot-label-cushion {
    color: var(--card-header-text) !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  /* Ensure all day/date text in week view has good contrast */
  .fc-timeGridWeek-view .fc-col-header-cell-cushion,
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell-cushion {
    background: var(--card-header-bg) !important;
    color: var(--card-header-text) !important;
    font-weight: 800 !important;
    padding: 0.75rem 0.5rem !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  /* Fix yellow text on white background in week view day headers - MAXIMUM CONTRAST */
  .fc-timeGridWeek-view .fc-timegrid-col-header,
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell,
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell-cushion {
    background-color: var(--card-header-bg) !important;
    background: var(--card-header-bg) !important;
    color: var(--card-header-text) !important;
  }

  /* Override any yellow/gold colors in week view day headers */
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell-cushion,
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell-cushion *,
  .fc-timeGridWeek-view .fc-timegrid-col-header [style*="color"],
  .fc-timeGridWeek-view .fc-timegrid-col-header [style*="ffd700"],
  .fc-timeGridWeek-view .fc-timegrid-col-header [style*="ff9800"],
  .fc-timeGridWeek-view .fc-timegrid-col-header [style*="orange"],
  .fc-timeGridWeek-view .fc-timegrid-col-header [style*="gold"] {
    color: var(--card-header-text) !important;
    background-color: var(--card-header-bg) !important;
    background: var(--card-header-bg) !important;
  }

  /* Force dark background for week view headers - no white backgrounds */
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell[style*="background"],
  .fc-timeGridWeek-view .fc-timegrid-col-header .fc-col-header-cell[style*="background-color"] {
    background-color: var(--card-header-bg) !important;
    background: var(--card-header-bg) !important;
  }

  /* Day Grid Week View - Premium Styling */
  .fc-dayGridWeek-view .fc-daygrid-day {
    border-right: 1px solid var(--card-border);
  }

  .fc-dayGridWeek-view .fc-daygrid-day-frame {
    padding: 0.5rem !important;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.01);
    transition: background 0.2s ease;
  }

  .fc-dayGridWeek-view .fc-daygrid-day-frame:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  /* Week View Day Numbers - Premium */
  .fc-dayGridWeek-view .fc-daygrid-day-number {
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 0.5rem 0.75rem !important;
    color: var(--card-header-text) !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    display: inline-block;
  }

  /* Week View Events - Maximum Visibility */
  .fc-dayGridWeek-view .fc-event-custom {
    min-height: 48px !important;
    padding: 0.625rem 0.75rem !important;
    margin: 0.375rem 0 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.35)) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
  }

  .fc-dayGridWeek-view .fc-event-custom .ec-title {
    font-size: 0.9375rem !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
  }

  .fc-dayGridWeek-view .fc-event-custom .ec-time {
    font-size: 0.75rem !important;
    padding: 0.3125rem 0.625rem !important;
  }

  /* Day View - Single Day Premium */
  .fc-timeGridDay-view .fc-timegrid-col {
    border-right: 1px solid var(--card-border);
  }

  .fc-timeGridDay-view .fc-daygrid-day-frame {
    padding: 0.75rem !important;
  }

  /* Current Time Indicator - Premium */
  .fc .fc-timegrid-now-indicator-line {
    border-color: var(--btn-accent-bg);
    border-width: 2px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  }

  .fc .fc-timegrid-now-indicator-arrow {
    border-color: var(--btn-accent-bg);
    border-left-color: transparent;
    border-right-color: transparent;
    border-top-color: transparent;
  }

  /* Hour Separators - Subtle */
  .fc .fc-timegrid-slot {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .fc .fc-timegrid-slot-minor {
    border-top: 1px solid rgba(255, 255, 255, 0.02);
  }

  /* Maximum Contrast for Event Text - Premium Visibility */
  .fc-timeGridDay-view .fc-event-custom,
  .fc-timeGridWeek-view .fc-event-custom,
  .fc-dayGridWeek-view .fc-event-custom {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3)) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  }

  /* Override ALL class-specific backgrounds for maximum text visibility */
  .fc-timeGridDay-view .fc-event-custom[class*="event-class"],
  .fc-timeGridWeek-view .fc-event-custom[class*="event-class"],
  .fc-dayGridWeek-view .fc-event-custom[class*="event-class"],
  .fc-event-custom[class*="event-class"] {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5)) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
  }

  /* Ensure text is always white and highly visible on all events */
  .fc-event-custom .ec-title,
  .fc-event-custom[class*="event-class"] .ec-title {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 1) !important;
    font-weight: 800 !important;
  }

  /* Add dark overlay to all event-class backgrounds for text readability */
  .fc-event-custom[class*="event-class"] {
    position: relative;
  }

  .fc-event-custom[class*="event-class"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
    border-radius: var(--radius-md);
    z-index: 0;
    pointer-events: none;
  }

  .fc-event-custom[class*="event-class"]>* {
    position: relative;
    z-index: 1;
  }

  /* Enhanced Event Borders for Better Visibility */
  .fc-timeGridDay-view .fc-event-custom,
  .fc-timeGridWeek-view .fc-event-custom {
    border-left-width: 5px !important;
  }

  /* Premium Typography for Day/Week Views - Maximum Contrast */
  .fc-timeGridDay-view .fc-event-custom .ec-title,
  .fc-timeGridWeek-view .fc-event-custom .ec-title {
    font-weight: 800 !important;
    font-size: 1rem !important;
    letter-spacing: 0.3px;
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Better Visual Hierarchy */
  .fc-timeGridDay-view .fc-timegrid-axis,
  .fc-timeGridWeek-view .fc-timegrid-axis {
    background: var(--card-header-bg);
    border-right: 2px solid var(--card-border);
  }

  /* Premium Scrollbar for Time Grid */
  .fc-timeGridDay-view .fc-scroller::-webkit-scrollbar,
  .fc-timeGridWeek-view .fc-scroller::-webkit-scrollbar {
    width: 8px;
  }

  .fc-timeGridDay-view .fc-scroller::-webkit-scrollbar-track,
  .fc-timeGridWeek-view .fc-scroller::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
  }

  .fc-timeGridDay-view .fc-scroller::-webkit-scrollbar-thumb,
  .fc-timeGridWeek-view .fc-scroller::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .fc-timeGridDay-view .fc-scroller::-webkit-scrollbar-thumb:hover,
  .fc-timeGridWeek-view .fc-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  /* Premium Event Hover Effects */
  .fc-timeGridDay-view .fc-event-custom:active,
  .fc-timeGridWeek-view .fc-event-custom:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
  }

  /* Better Spacing Between Events */
  .fc-timeGridDay-view .fc-timegrid-event-harness+.fc-timegrid-event-harness,
  .fc-timeGridWeek-view .fc-timegrid-event-harness+.fc-timegrid-event-harness {
    margin-top: 0.5rem;
  }

  /* Premium Background for Empty Slots */
  .fc-timeGridDay-view .fc-timegrid-slot,
  .fc-timeGridWeek-view .fc-timegrid-slot {
    background: rgba(255, 255, 255, 0.01);
  }

  .fc-timeGridDay-view .fc-timegrid-slot:hover,
  .fc-timeGridWeek-view .fc-timegrid-slot:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  /* More Events Popover - Mobile */
  .fc-more-popover,
  .fc-popover {
    max-width: 90vw !important;
    max-height: 70vh !important;
    border-radius: var(--radius-lg);
  }

  .fc-more-popover .fc-popover-body {
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Close Sidebar Button */
  .nb-filter-card .btn-close,
  #pub-sidebar .btn-close,
  #cust-sidebar .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 10;
  }
}

/* Small Mobile (iPhone SE, etc.) */
@media (max-width: 420px) {
  #calendar {
    padding: 0.375rem !important;
  }

  .nb-toolbar {
    padding: 0.375rem;
  }

  .nb-toolbar .btn-modern {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    min-height: 40px;
  }

  .fc .fc-toolbar-title {
    font-size: 1rem !important;
  }

  .fc-event-custom {
    min-height: 40px !important;
    padding: 0.375rem 0.5rem !important;
  }

  .fc-event-custom .ec-title {
    font-size: 0.8125rem !important;
  }

  .fc-event-custom .ec-time {
    font-size: 0.6875rem !important;
    padding: 0.1875rem 0.5rem !important;
  }

  .fc .fc-daygrid-day-number {
    font-size: 0.8125rem !important;
  }

  .fc .fc-col-header-cell-cushion {
    font-size: 0.6875rem !important;
  }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {

  /* Better touch feedback */
  .fc-event-custom:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  .nb-toolbar .btn-modern:active {
    transform: scale(0.98);
  }

  /* Remove hover effects on touch devices */
  .fc-event-custom:hover {
    transform: none;
  }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .nb-toolbar {
    position: relative;
    top: auto;
  }

  .fc .fc-toolbar-title {
    font-size: 1rem !important;
  }

  .fc-event-custom {
    min-height: 36px !important;
    padding: 0.375rem 0.5rem !important;
  }
}

/* Calendar Loading State */
.fc-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Smooth Transitions */
.fc-event-custom,
.nb-toolbar .btn-modern,
.fc .fc-button {
  transition: all 0.2s ease;
}

/* Better Focus States for Accessibility */
.fc-event-custom:focus-visible {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.nb-toolbar .btn-modern:focus-visible {
  outline: 2px solid var(--btn-accent-bg);
  outline-offset: 2px;
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.site-header .d-flex.align-items-center {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-header .btn {
  white-space: nowrap;
  transition: all var(--transition-speed) ease;
  font-weight: 600;
  border-radius: 8px;
}

.site-header .btn.btn-custom {
  background-color: var(--btn-accent-bg) !important;
  border: 2px solid var(--btn-accent-bg) !important;
  color: var(--btn-accent-text) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

.site-header .btn.btn-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.35);
  background-color: #ffed4e !important;
}

.site-header .btn.btn-custom.active {
  background-color: var(--btn-accent-bg) !important;
  border-color: var(--btn-accent-bg) !important;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.site-header .btn i {
  margin-right: 0.25rem;
}

/* Mobile hamburger menu (if needed in future) */
@media (max-width: 767px) {

  /* Reduce mobile nav size */
  .site-header {
    padding: 0.5rem 0 !important;
  }

  .site-header .brand {
    font-size: 1rem !important;
    margin-bottom: 0.25rem;
  }

  .site-header .container {
    gap: 0.5rem !important;
  }

  .site-header .d-flex.align-items-center {
    justify-content: flex-start;
    gap: 0.375rem !important;
  }

  .site-header .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 0.25rem);
    font-size: 0.75rem !important;
    padding: 0.375rem 0.5rem !important;
    white-space: nowrap;
  }

  .site-header .btn i {
    font-size: 0.7rem;
    margin-right: 0.15rem;
  }

  .site-header .logged-in-text {
    font-size: 0.75rem !important;
    margin-right: 0.5rem;
  }
}

/* ============================================
   ENHANCED VARIABLES
   ============================================ */
:root {
  /* Animation speeds */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.3);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ============================================
   STATISTICS CARDS
   ============================================ */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--btn-accent-bg), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--btn-accent-bg);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
  color: var(--btn-accent-bg);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
  color: var(--card-header-text);
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--card-body-text);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-change {
  font-size: 0.75rem;
  margin-top: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.stat-card-change.positive {
  color: #10b981;
}

.stat-card-change.negative {
  color: #ef4444;
}

/* ============================================
   MODERN NAVIGATION CARDS
   ============================================ */
.nav-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.nav-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: var(--spacing-lg);
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  transition: all var(--transition-normal);
  font-size: 1.5rem;
  color: var(--btn-accent-bg);
}

.nav-card:hover {
  transform: translateX(8px);
  border-color: var(--btn-accent-bg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
}

.nav-card:hover::after {
  content: '→';
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.nav-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
  color: var(--btn-accent-bg);
  transition: all var(--transition-normal);
}

.nav-card:hover .nav-card-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
}

.nav-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
  color: var(--card-header-text);
}

.nav-card-description {
  font-size: 0.875rem;
  color: var(--card-body-text);
  opacity: 0.8;
  line-height: 1.5;
}

/* ============================================
   ENHANCED BUTTONS
   ============================================ */
.btn-modern {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
  width: 300px;
  height: 300px;
}

.btn-modern-primary {
  background: var(--btn-accent-bg);
  color: var(--btn-accent-text);
  border-color: var(--btn-accent-bg);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-modern-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  color: var(--btn-accent-text);
}

.btn-modern-outline {
  background: transparent;
  color: var(--card-header-text);
  border-color: var(--card-border);
}

.btn-modern-outline:hover {
  background: var(--card-bg);
  border-color: var(--btn-accent-bg);
  color: var(--card-header-text);
  transform: translateY(-2px);
}

/* ============================================
   PROGRESS BARS (Enhanced)
   ============================================ */
.progress-modern {
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.progress-modern-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--btn-accent-bg), #ffed4e);
  position: relative;
  transition: width var(--transition-slow);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.progress-modern-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ============================================
   BADGES (Enhanced)
   ============================================ */
.badge-modern {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-modern-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-modern-warning {
  background: rgba(255, 215, 0, 0.2);
  color: var(--btn-accent-bg);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-modern-info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-modern-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   ALERTS (Enhanced)
   ============================================ */
.alert-modern {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: var(--spacing-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.alert-modern::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
}

.alert-modern-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-modern-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.alert-modern-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-modern-warning {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--btn-accent-bg);
}

.alert-modern-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
  background: linear-gradient(90deg,
      var(--card-bg) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      var(--card-bg) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--spacing-sm);
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: var(--spacing-md);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--btn-accent-bg);
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.loading-content .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 4px;
  margin-bottom: var(--spacing-md);
}

/* Button Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: var(--card-body-text);
  opacity: 0.7;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
  color: var(--btn-accent-bg);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--card-header-text);
}

.empty-state-description {
  font-size: 0.875rem;
  margin-bottom: var(--spacing-lg);
}

/* ============================================
   ENHANCED FORMS
   ============================================ */
.form-group-modern {
  margin-bottom: var(--spacing-lg);
}

.form-label-modern {
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--card-header-text);
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--card-body-text);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--btn-accent-bg);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  background: var(--card-bg);
}

.form-control-modern::placeholder {
  color: var(--card-body-text);
  opacity: 0.5;
}

.input-group-modern {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-modern-icon {
  position: absolute;
  left: 1rem;
  color: var(--card-body-text);
  opacity: 0.5;
  pointer-events: none;
}

.input-group-modern .form-control-modern {
  padding-left: 3rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.quick-action-btn {
  flex: 1;
  min-width: 150px;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--card-header-text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  transition: all var(--transition-fast);
  text-align: center;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--btn-accent-bg);
  box-shadow: var(--shadow-md);
  color: var(--card-header-text);
  text-decoration: none;
}

.quick-action-btn-icon {
  font-size: 1.5rem;
  color: var(--btn-accent-bg);
}

.quick-action-btn-label {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  .nav-card {
    padding: var(--spacing-md);
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-action-btn {
    min-width: 100%;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

/* ============================================
   Tenant contrast & mobile adjustments
   ============================================ */
:root {
  --tenant-surface-bg: #050a15;
  --tenant-card-bg: rgba(10, 16, 30, 0.96);
  --tenant-card-border: rgba(148, 163, 184, 0.55);
  --tenant-fg: #f1f5f9;
  --tenant-muted: #cbd5e1;
}

.full-width-report {
  color: var(--tenant-fg);
  background: var(--tenant-surface-bg);
  padding: 2.5rem 2rem;
}

.full-width-report .card {
  background: var(--tenant-card-bg);
  border-color: var(--tenant-card-border);
  color: var(--tenant-fg);
  box-shadow: 0 25px 45px rgba(2, 6, 23, 0.65);
}

.full-width-report .card-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: var(--tenant-fg);
}

.full-width-report .text-muted,
.full-width-report .text-secondary {
  color: var(--tenant-muted) !important;
}

.full-width-report .nav-tabs .nav-link {
  color: var(--tenant-muted);
  border-color: transparent;
  background: transparent;
}

.full-width-report .nav-tabs .nav-link.active {
  color: #f8fafc;
  border-color: var(--tenant-card-border);
  background: rgba(14, 23, 42, 0.65);
}

.full-width-report .table {
  color: var(--tenant-fg);
  border-color: rgba(148, 163, 184, 0.3);
}

.full-width-report .table thead {
  background: rgba(14, 23, 42, 0.95);
  color: #f8fafc;
}

.full-width-report .table-hover tbody tr:hover {
  background: rgba(14, 165, 233, 0.15);
}

.full-width-report .table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-accent-bg: rgba(15, 23, 42, 0.5);
  color: inherit;
}

.full-width-report .badge,
.full-width-report .chip {
  color: #f8fafc;
}

.full-width-report .table th,
.full-width-report .table td {
  border-color: rgba(148, 163, 184, 0.35);
  vertical-align: middle;
}

.full-width-report .form-control,
.full-width-report .form-select,
.full-width-report .input-group-text,
.full-width-report textarea {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: #f8fafc;
  box-shadow: none;
}

.full-width-report .form-control::placeholder,
.full-width-report .form-select::placeholder,
.full-width-report textarea::placeholder {
  color: rgba(226, 232, 240, 0.65);
}

.full-width-report .form-control:focus,
.full-width-report .form-select:focus,
.full-width-report textarea:focus {
  background: rgba(15, 23, 42, 0.98);
  border-color: #38bdf8;
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2);
  color: #f8fafc;
}

.full-width-report .form-select option,
.full-width-report select option {
  background: #0f172a;
  color: #f8fafc;
}

.full-width-report .btn,
.full-width-report .btn-group .btn {
  border-radius: 0.9rem;
  font-weight: 600;
}

.full-width-report .btn-outline-primary,
.full-width-report .btn-outline-secondary,
.full-width-report .btn-outline-light {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(15, 23, 42, 0.35);
}

.full-width-report .btn-outline-primary:hover,
.full-width-report .btn-outline-secondary:hover,
.full-width-report .btn-outline-light:hover {
  color: #0f172a;
  background: #fbbf24;
  border-color: #fbbf24;
}

.full-width-report .card h1,
.full-width-report .card h2,
.full-width-report .card h3,
.full-width-report .card h4 {
  color: #f8fafc;
}

.full-width-report .card p,
.full-width-report label {
  color: var(--tenant-muted);
}

.full-width-report .table-responsive {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.5rem;
  background: rgba(4, 6, 14, 0.35);
}

@media (max-width: 768px) {
  .full-width-report {
    padding: 2rem 1.25rem;
  }

  .full-width-report .card-header,
  .full-width-report .card .d-flex.gap-2 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .full-width-report .btn,
  .full-width-report .btn-group .btn {
    width: 100%;
  }

  .full-width-report .table-responsive {
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem;
  }

  .full-width-report .table {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .full-width-report {
    padding: 1.5rem 1rem;
  }

  .full-width-report .card {
    padding: 1.25rem;
  }

  .full-width-report .nav-tabs .nav-link {
    width: 100%;
    text-align: left;
  }

  .full-width-report .btn-group-vertical .btn,
  .full-width-report .btn-group .btn,
  .full-width-report .btn {
    width: 100%;
  }

  .full-width-report .table-responsive {
    border-radius: 0.75rem;
  }
}

.slide-in {
  animation: slideIn var(--transition-normal) ease-out;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--btn-accent-bg), #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-lift {
  transition: transform var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Light theme adjustments */
.theme-light .stat-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-light .nav-card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.theme-light .progress-modern {
  background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   Zoom Reviewer Mode
   ============================================ */
body.zoom-reviewer .tenant-interactive {
  pointer-events: none;
  opacity: 0.4;
  filter: grayscale(0.45);
}

body.zoom-reviewer .tenant-interactive.zoom-allowed {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}

.zoom-reviewer-alert {
  border-left: 4px solid #38bdf8;
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

/* ============================================
   TENANT SIDEBAR
   ============================================ */

.tenant-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 280px;
  background: var(--card-bg, #1a1a1f);
  border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease, width 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.tenant-sidebar.collapsed {
  width: 70px;
}

.tenant-sidebar.collapsed .tenant-sidebar-brand-text,
.tenant-sidebar.collapsed .tenant-sidebar-label,
.tenant-sidebar.collapsed .tenant-sidebar-category .tenant-sidebar-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-toggle i {
  transform: rotate(180deg);
}

/* Improved collapsed sidebar styling */
.tenant-sidebar.collapsed .tenant-sidebar-header {
  padding: 1rem 0.5rem;
  justify-content: center;
  position: relative;
}

.tenant-sidebar.collapsed .tenant-sidebar-brand {
  justify-content: center;
  width: 100%;
}

.tenant-sidebar.collapsed .tenant-sidebar-logo {
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.tenant-sidebar.collapsed .tenant-sidebar-toggle {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  margin-left: -18px;
  width: 36px;
  height: 36px;
  z-index: 10;
  background: var(--card-header-bg, rgba(255, 255, 255, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.tenant-sidebar.collapsed .tenant-sidebar-toggle:hover {
  background: var(--btn-primary-bg, #667eea);
  color: #ffffff;
  border-color: var(--btn-primary-bg, #667eea);
}

.tenant-sidebar.collapsed .tenant-sidebar-toggle i {
  transform: rotate(180deg);
  display: block;
}

.tenant-sidebar.collapsed .tenant-sidebar-nav {
  padding: 0.5rem 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-section {
  margin-bottom: 0.25rem;
}

.tenant-sidebar.collapsed .tenant-sidebar-category {
  padding: 0.5rem 0;
  justify-content: center;
  opacity: 0.3;
  min-height: 20px;
}

.tenant-sidebar.collapsed .tenant-sidebar-category i {
  font-size: 0.7rem;
}

.tenant-sidebar.collapsed .tenant-sidebar-item {
  padding: 0.75rem 0;
  justify-content: center;
  border-radius: var(--radius-sm, 6px);
  margin: 0.125rem 0.5rem;
  position: relative;
}

.tenant-sidebar.collapsed .tenant-sidebar-item i {
  font-size: 1.25rem;
  width: auto;
  margin: 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-subitem {
  padding-left: 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-item.active {
  background: var(--btn-primary-bg, #667eea);
}

.tenant-sidebar.collapsed .tenant-sidebar-item.active::before {
  width: 4px;
  height: 60%;
  top: 20%;
  left: 0;
  border-radius: 0 2px 2px 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-item:hover {
  background: var(--card-header-bg, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-sm, 6px);
}

.tenant-sidebar.collapsed .tenant-sidebar-footer {
  padding: 0.5rem 0;
}

.tenant-sidebar.collapsed .tenant-sidebar-logout {
  justify-content: center;
  padding: 0.75rem 0;
  margin: 0.125rem 0.5rem;
  border-radius: var(--radius-sm, 6px);
}

.tenant-sidebar.collapsed .tenant-sidebar-submenu {
  padding-left: 0;
}

.tenant-sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.tenant-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--card-title-text, #ffffff);
  font-weight: 600;
  font-size: 1.1rem;
  transition: opacity 0.2s;
}

.tenant-sidebar-brand:hover {
  opacity: 0.8;
}

.tenant-sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: var(--radius-sm, 6px);
}

.tenant-sidebar-logo.is-circle {
  border-radius: 50%;
}

.tenant-sidebar-logo.is-rounded {
  border-radius: 8px;
}

.tenant-sidebar-brand-text {
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.tenant-sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--card-body-text, rgba(255, 255, 255, 0.7));
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm, 6px);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.tenant-sidebar-toggle:hover {
  background: var(--card-header-bg, rgba(255, 255, 255, 0.05));
  color: var(--card-title-text, #ffffff);
}

.tenant-sidebar-toggle i {
  transition: transform 0.3s ease;
  font-size: 1.1rem;
}

.tenant-sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.tenant-sidebar-section {
  margin-bottom: 0.5rem;
}

.tenant-sidebar-category {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--card-body-text, rgba(255, 255, 255, 0.6));
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease;
}

.tenant-sidebar-category i {
  font-size: 0.9rem;
  opacity: 0.7;
}

.tenant-sidebar-submenu {
  padding-left: 0.5rem;
}

.tenant-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: var(--card-body-text, rgba(255, 255, 255, 0.8));
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
  position: relative;
  white-space: nowrap;
}

.tenant-sidebar-item:hover {
  background: var(--card-header-bg, rgba(255, 255, 255, 0.05));
  color: var(--card-title-text, #ffffff);
}

.tenant-sidebar-item.active {
  background: var(--btn-primary-bg, #667eea);
  color: #ffffff;
  font-weight: 500;
}

.tenant-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ffffff;
}

.tenant-sidebar-subitem {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

.tenant-sidebar-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.tenant-sidebar-label {
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.tenant-sidebar-footer {
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding: 0.75rem 0;
}

.tenant-sidebar-logout {
  color: var(--danger, #ef4444);
}

.tenant-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger, #ef4444);
}

/* Sidebar Overlay (Mobile) */
.tenant-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tenant-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Main Content Adjustment */
body.has-tenant-sidebar {
  padding-left: 280px;
  transition: padding-left 0.3s ease;
}

body.has-tenant-sidebar.collapsed-sidebar {
  padding-left: 70px;
}

body.has-tenant-sidebar .site-header {
  display: none !important;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .tenant-sidebar {
    transform: translateX(-100%);
  }

  .tenant-sidebar.open {
    transform: translateX(0);
  }

  body.has-tenant-sidebar {
    padding-left: 0;
  }

  body.has-tenant-sidebar.collapsed-sidebar {
    padding-left: 0;
  }

  .tenant-sidebar-overlay.active {
    display: block;
  }
}

/* Full-width pages (reports) */
body.has-tenant-sidebar .container-fluid.full-width-report,
body.has-tenant-sidebar.collapsed-sidebar .container-fluid.full-width-report {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

body.has-tenant-sidebar .full-width-report,
body.has-tenant-sidebar.collapsed-sidebar .full-width-report {
  width: 100%;
}

/* Light Theme Adjustments */
.theme-light .tenant-sidebar {
  background: var(--card-bg, #ffffff);
  border-right-color: var(--border-color, rgba(0, 0, 0, 0.1));
}

.theme-light .tenant-sidebar-item {
  color: var(--card-body-text, rgba(0, 0, 0, 0.8));
}

.theme-light .tenant-sidebar-item:hover {
  background: var(--card-header-bg, rgba(0, 0, 0, 0.03));
  color: var(--card-title-text, #000000);
}

.theme-light .tenant-sidebar-category {
  color: var(--card-body-text, rgba(0, 0, 0, 0.6));
}

.theme-light .tenant-sidebar-toggle {
  color: var(--card-body-text, rgba(0, 0, 0, 0.7));
}

.theme-light .tenant-sidebar-toggle:hover {
  background: var(--card-header-bg, rgba(0, 0, 0, 0.05));
  color: var(--card-title-text, #000000);
}
