.glass {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.glass-strong {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }
.animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.transition-all-smooth { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
.file-upload-area {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(20, 184, 166, 0.1));
  border: 2px dashed rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}
.file-upload-area.dragover {
  border-color: rgba(139, 92, 246, 0.6);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(20, 184, 166, 0.2));
  transform: scale(1.02);
}
.chart-container { position: relative; height: 300px; width: 100%; }
@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.status-processing { animation: statusPulse 2s infinite; }

.switch-toggle{
  background: #ebebeb;
  width: 32px;
  border-radius: 30px;
  position: relative;
}

/* ── Modal card shadows (extracted from template inline styles) ───────────── */
.ats-modal-card {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.ats-modal-card-branded {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 48px rgba(42,198,101,0.12), 0 4px 16px rgba(0,0,0,0.08);
}
.ats-soft-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: rgba(0,0,0,0.05) 0px 2px 6px;
  border-radius: 12px;
}

/* ── KPI cards (Projects page) ───────────────────────────────────────────── */
.proj-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: rgba(0,0,0,0.03) 0px 2px 8px;
  border-radius: 12px;
}
.proj-kpi-card.filter-card-active {
  background: rgb(249, 254, 251);
  border: 2px solid var(--primary);
  box-shadow: rgba(0,0,0,0.08) 0px 2px 6px;
}

/* ── Full-viewport dashboard layout ─────────────────────────────────────── */
#primary.site-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
/* Header bar: stays at natural height */
#primary.site-main > .container.border-b {
  flex-shrink: 0;
}
/* Content container (has py-6, no border-b): fills remaining viewport height */
#primary.site-main > .container:not(.border-b) {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* .min-h-screen is inside content container */
#primary.site-main > .container:not(.border-b) > .min-h-screen {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex {
  height: 100%;
  min-height: 0;
}
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex > main.flex-1 {
  overflow-y: auto;
  min-height: 0;
}

/* ── Sidebar (extracted from dashboard.php inline styles) ────────────────── */
#sidebar {
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 0 16px 16px 0;
  /* Sticky: fills full panel height, scrolls internally if nav overflows */
  height: 100%;
  overflow-y: auto;
  align-self: stretch;
}
#sidebar > .border-b {
  border-color: rgba(0,0,0,0.06);
}

/* ── Sidebar collapsed state (extracted from dashboard.php <style> block) ── */
#sidebar.collapsed { width: 64px !important; }
#sidebar.collapsed .p-6 .flex { justify-content: center; }
#sidebar.collapsed .site-icon ~ div { display: none; }
#sidebar.collapsed nav .nav-item { justify-content: center; }
#sidebar.collapsed nav .nav-item span { display: none; }
#sidebar.collapsed nav .nav-item { padding-left: 0.5rem; padding-right: 0.5rem; gap: 0; }
#sidebar.collapsed nav .nav-item i,
#sidebar.collapsed nav .nav-item svg { display: inline-block !important; }
#sidebar.collapsed #ats-user-button { justify-content: center; }
#sidebar.collapsed #ats-user-button .leading-tight { display: none; }
#sidebar.collapsed #ats-user-chevron { display: none; }
#sidebar.collapsed #settings-submenu { display: none !important; }
#sidebar.collapsed #settings-submenu-toggle { display: none !important; }

/* ── Edit Project Modal: switch toggles (extracted from template <style>) ── */
#epm-no-transport ~ .switch-track,
#epm-no-lodging ~ .switch-track,
#epm-report-travel-enabled ~ .switch-track,
#epm-report-additions-enabled ~ .switch-track,
#epm-report-supplies-enabled ~ .switch-track {
  background: #e5e7eb;
}
#epm-no-transport:checked ~ .switch-track,
#epm-no-lodging:checked ~ .switch-track,
#epm-report-travel-enabled:checked ~ .switch-track,
#epm-report-additions-enabled:checked ~ .switch-track,
#epm-report-supplies-enabled:checked ~ .switch-track {
  background: #22c55e;
}
#epm-no-transport ~ .switch-thumb,
#epm-no-lodging ~ .switch-thumb,
#epm-report-travel-enabled ~ .switch-thumb,
#epm-report-additions-enabled ~ .switch-thumb,
#epm-report-supplies-enabled ~ .switch-thumb {
  transform: translateX(0);
}
#epm-no-transport:checked ~ .switch-thumb,
#epm-no-lodging:checked ~ .switch-thumb,
#epm-report-travel-enabled:checked ~ .switch-thumb,
#epm-report-additions-enabled:checked ~ .switch-thumb,
#epm-report-supplies-enabled:checked ~ .switch-thumb {
  transform: translateX(1rem);
}

/* ── Edit Project Modal: report table column widths ─────────────────────── */
#epm-report-table .epm-report-day-col {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}
#epm-report-table .epm-day-per-diem-toggle::-webkit-details-marker { display: none; }
#epm-report-table .epm-day-per-diem-toggle { list-style: none; }
#epm-report-table .epm-day-per-diem { position: relative; }
#epm-report-table .epm-day-per-diem-popover {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 130px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 12px 24px rgba(15,23,42,0.16);
}
#epm-report-table .epm-report-day-col:nth-last-child(-n+8) .epm-day-per-diem-popover {
  left: auto;
  right: calc(100% + 6px);
}
#epm-report-table .epm-report-variable-col { width: 75px; min-width: 75px; }
#epm-report-table .epm-report-cell-drag,
#epm-report-table .epm-report-cell-delete {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
}

/* ── Animations (extracted from edit-project-modal.php <style> block) ────── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── UX improvements ─────────────────────────────────────────────────────── */

/* Active nav item: left-edge accent bar for clear visual indicator */
#sidebar .ats-nav-active {
  border-left: 3px solid var(--primary);
  border-radius: 0 0.75rem 0.75rem 0;
  padding-left: calc(1rem - 3px) !important;
}

/* Collapsed: drop the border, use full rounded bg highlight instead */
#sidebar.collapsed nav .ats-nav-active {
  border-left: none !important;
  border-radius: 0.75rem !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  background: rgba(var(--primary-rgb), 0.28) !important;
}

/* Row hover on data tables */
#projects-table tbody tr:hover,
#workforce-table tbody tr:hover,
#clients-table tbody tr:hover,
#transport-table tbody tr:hover,
#lodging-table tbody tr:hover {
  background-color: #f9fafb;
  cursor: pointer;
}

/* Max-width on main content to prevent over-stretching on ultra-wide monitors */
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex > main.flex-1 > .space-y-6,
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex > main.flex-1 > .ats-overview {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* Skills chart empty state */
.ov-skills-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: #9ca3af;
}
.ov-skills-empty p { font-size: 0.8125rem; margin: 0; }
.ov-skills-empty a { font-size: 0.75rem; color: var(--primary); text-decoration: underline; }

/* ── Design refresh: depth & contrast ───────────────────────────────────── */

/* 1. Topbar: green accent bottom line */
#primary.site-main > .container.border-b {
  border-bottom: 2px solid var(--primary) !important;
}

/* 2. Content area: subtle off-white background so white cards pop */
#primary.site-main > .container:not(.border-b),
#primary.site-main > .container:not(.border-b) > .min-h-screen,
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex,
#primary.site-main > .container:not(.border-b) > .min-h-screen > .flex > main.flex-1 {
  background: #f4f6f8;
}

/* 3. Dark sidebar */
#primary.site-main > .container:not(.border-b) {
  padding-left: 0 !important;
  padding-top: 0 !important;
}
#sidebar {
  background: #1a1f2e;
  border-color: transparent;
  border-radius: 0;
}
#sidebar > nav > div > .border-t {
  border-top-color: rgba(255, 255, 255, 0.10) !important;
}

/* Nav item text labels */
#sidebar nav .nav-item,
#sidebar nav .nav-item span {
  color: rgba(255, 255, 255, 0.72);
}
/* Nav item hover */
#sidebar nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}
#sidebar nav .nav-item:hover span {
  color: #fff;
}
/* Active nav item: bg tinted, text always white, icon keeps primary color (set via inline style) */
#sidebar nav .ats-nav-active {
  background: rgba(var(--primary-rgb), 0.16) !important;
}
#sidebar nav .ats-nav-active span {
  color: #fff !important;
}

/* Sidebar toggle button */
#sidebar-toggle {
  color: rgba(255, 255, 255, 0.65);
}
#sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Settings submenu toggle button & chevron */
#sidebar .settings-submenu-toggle {
  color: rgba(255, 255, 255, 0.5);
}
#sidebar .settings-submenu-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
#sidebar #settings-submenu-toggle i {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Settings submenu sub-links */
#sidebar .nav-subitem {
  color: rgba(255, 255, 255, 0.55) !important;
}
#sidebar .nav-subitem:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
#sidebar .nav-subitem.text--primary {
  color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.12) !important;
}