:root {
  /* --- TOKENS --- */

  /* Typography */
  --r-font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --r-font-title: 700 1.5rem/1.2 var(--r-font-family);
  /* H1 */
  --r-font-subtitle: 400 0.875rem/1.4 var(--r-font-family);
  /* Subtext */
  --r-font-body: 400 0.875rem/1.5 var(--r-font-family);
  /* Body text */
  --r-font-label: 500 0.75rem/1 var(--r-font-family);
  /* Labels/Chips */
  --r-font-btn: 600 0.875rem/1 var(--r-font-family);
  /* Buttons */

  /* Spacing Scale */
  --r-space-1: 0.25rem;
  /* 4px */
  --r-space-2: 0.5rem;
  /* 8px */
  --r-space-3: 0.75rem;
  /* 12px */
  --r-space-4: 1rem;
  /* 16px */
  --r-space-5: 1.25rem;
  /* 20px */
  --r-space-6: 1.5rem;
  /* 24px */
  --r-space-8: 2rem;
  /* 32px */

  /* Radius */
  --r-radius-sm: 0.5rem;
  /* 8px */
  --r-radius-md: 0.75rem;
  /* 12px */
  --r-radius-lg: 1.5rem;
  /* 24px (Card) */
  --r-radius-pill: 9999px;
  /* Pill */

  /* Colors - Neutral / Base */
  --r-bg-page: #f8fafc;
  /* slate-50 */
  --r-bg-card: #ffffff;
  --r-text-primary: #0f172a;
  /* slate-900 */
  --r-text-secondary: #64748b;
  /* slate-500 */
  --r-text-muted: #94a3b8;
  /* slate-400 */

  /* Colors - Brand */
  --r-primary: #2563eb;
  /* blue-600 */
  --r-primary-hover: #1d4ed8;
  /* blue-700 */
  --r-primary-light: #eff6ff;
  /* blue-50 */
  --r-primary-text: #1e40af;
  /* blue-800 */

  /* Colors - Status */
  --r-success-bg: #ecfdf5;
  --r-success-text: #047857;
  --r-success-border: #a7f3d0;

  --r-error-bg: #fef2f2;
  --r-error-text: #b91c1c;
  --r-error-border: #fecaca;

  --r-warning-bg: #fffbeb;
  --r-warning-text: #b45309;
  --r-warning-border: #fde68a;

  --r-info-bg: #f0f9ff;
  --r-info-text: #0369a1;
  --r-info-border: #bae6fd;

  /* Borders & Shadows */
  --r-border-color: #e2e8f0;
  /* slate-200 */
  --r-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --r-shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --r-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark Mode Overrides */
.dark {
  --r-bg-page: #0f172a;
  /* slate-900 */
  --r-bg-card: #1e293b;
  /* slate-800 */
  --r-text-primary: #f8fafc;
  /* slate-50 */
  --r-text-secondary: #94a3b8;
  /* slate-400 */
  --r-text-muted: #64748b;
  /* slate-500 */
  --r-border-color: #334155;
  /* slate-700 */
  --r-primary-light: rgba(37, 99, 235, 0.1);
  --r-primary-text: #60a5fa;
  /* blue-400 */

  --r-success-bg: rgba(6, 95, 70, 0.2);
  --r-success-text: #34d399;
  --r-success-border: #065f46;

  --r-error-bg: rgba(153, 27, 27, 0.2);
  --r-error-text: #f87171;
  --r-error-border: #991b1b;

  --r-warning-bg: rgba(146, 64, 14, 0.2);
  --r-warning-text: #fbbf24;
  --r-warning-border: #92400e;

  --r-info-bg: rgba(7, 89, 133, 0.2);
  --r-info-text: #38bdf8;
  --r-info-border: #075985;
}

/* ===== CRITICAL: Hide Pazartesi and Gelecek Hafta date shortcut buttons ===== */
/* These buttons are permanently removed - hide them immediately via CSS */
/* Hide buttons with data attributes for Pazartesi and Gelecek Hafta */
button[data-shortcut="next-monday"],
button[data-shortcut="next-week"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ===== TEMEL STİLLER ===== */
/* Tailwind CSS CDN üzerinden yükleniyor */

/* Root layout: keep full width without clamping or hiding overflow */
html,
body {
  width: 100%;
}

/* Media defaults: keep images/embeds responsive without clamping everything */
img,
video,
svg,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

/* Optional utility: apply intentionally where horizontal overflow must be hidden */
.prevent-x-scroll {
  overflow-x: hidden;
}

.brand-logo-filter {
  pointer-events: none;
  border: 0;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
}

.flash-animate-in {
  animation: slideInDown 0.3s ease-out;
}

.flash-fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.csp-hidden-hard {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Dashboard flash notifications */
.flash-notification {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 9999;
  max-width: 24rem;
  border-radius: 0.75rem;
  animation: slideInRight 0.3s ease-out forwards;
}

.flash-notification-leave {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.flash-success {
  background: var(--r-success-bg);
  color: var(--r-success-text);
  border: 1px solid var(--r-success-border);
}

.dark .flash-success {
  background: var(--r-success-bg);
  color: var(--r-success-text);
  border-color: var(--r-success-border);
}

.flash-error {
  background: var(--r-error-bg);
  color: var(--r-error-text);
  border: 1px solid var(--r-error-border);
}

.dark .flash-error {
  background: var(--r-error-bg);
  color: var(--r-error-text);
  border-color: var(--r-error-border);
}

.flash-warning {
  background: var(--r-warning-bg);
  color: var(--r-warning-text);
  border: 1px solid var(--r-warning-border);
}

.dark .flash-warning {
  background: var(--r-warning-bg);
  color: var(--r-warning-text);
  border-color: var(--r-warning-border);
}

.safe-area-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  right: calc(1.5rem + env(safe-area-inset-right));
}

.h-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Global Button Resets & Utilities ===== */
button,
.btn,
.quick-action-btn,
.section-header-link,
a.btn,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  min-height: 40px;
}

.btn-label {
  white-space: nowrap;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-wide {
  min-width: 8rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


.btn-success {
  background-color: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

.btn-error {
  background-color: #ef4444 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

.flash-info {
  background: var(--r-info-bg);
  color: var(--r-info-text);
  border: 1px solid var(--r-info-border);
}

.dark .flash-info {
  background: var(--r-info-bg);
  color: var(--r-info-text);
  border-color: var(--r-info-border);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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



/* ===== MOBILE FIX: Ensure main content has proper height on mobile ===== */
/* Fix for mobile viewport where header and footer take too much space */
/* Root Cause: html/body h-full classes don't work properly on mobile, flexbox needs explicit viewport height */
/* Solution: Use min-height: 100vh for html/body, flex: 1 1 auto for main to accommodate content */

@media (max-width: 768px) {

  /* html has h-full class (height: 100%) but has no parent, so 100% doesn't work */
  /* Use min-height: 100vh to allow html to grow with content */
  html {
    min-height: 100vh !important;
  }

  /* body has h-full flex flex-col classes from base.php */
  /* Use min-height: 100vh to allow body to grow with content */
  body {
    min-height: 100vh !important;
  }

  /* Prevent header and footer from shrinking */
  body>header,
  body>nav[data-header],
  body>footer.footer-container {
    flex-shrink: 0;
  }

  /* Main content: flex: 1 1 auto allows content to determine height while filling remaining space */
  main#main-content {
    flex: 1 1 auto !important;
    overflow: visible !important;
  }
}

/* ===== MOBILE FIX END ===== */

/* Dashboard KPI grid helpers */
.dashboard-kpi-grid {
  width: 100%;
}

.fa-exclamation-triangle {
  display: none !important;
}

.dashboard-kpi-grid [data-testid="dashboard-card"] {
  min-height: 100%;
}

@media (max-width: 640px) {
  .dashboard-kpi-grid {
    gap: 1rem !important;
  }
}

/* ===== CUSTOM COMPONENTS ===== */
@layer components {

  /* Shared base for inputs to avoid mobile zoom and keep consistent sizing */
  .form-input-base {
    font-size: 16px;
    line-height: 1.5;
  }

  /* Modern Form Components */
  .form-input {
    font-size: 16px;
    line-height: 1.5;
    @apply w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-xl dark:bg-gray-700 dark:text-white transition-all duration-300 text-sm placeholder-gray-400 dark:placeholder-gray-500 bg-gradient-to-b from-white to-gray-50/50 dark:from-gray-700 dark:to-gray-800/50;
  }

  .form-input:focus,
  .form-input:focus-visible {
    @apply outline-none shadow-lg shadow-primary-500/10 transform scale-[1.01] ring-2 ring-primary-500/50 border-primary-500;
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
  }

  .form-input.error {
    @apply border-red-500 bg-gradient-to-b from-red-50/50 to-white;
  }

  .form-input.error:focus {
    @apply ring-2 ring-red-500/50 border-red-500;
  }

  .form-input.success {
    @apply border-green-500 bg-gradient-to-b from-green-50/50 to-white;
  }

  .form-input.success:focus {
    @apply ring-2 ring-green-500/50 border-green-500;
  }

  /* Login-specific inputs share base sizing to prevent mobile zoom */
  .login-input {
    font-size: 16px;
    line-height: 1.5;
  }

  .form-label {
    @apply block text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2 tracking-wide;
  }

  .form-button {
    @apply inline-flex items-center justify-center gap-2 px-6 py-3 text-sm font-bold rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 min-h-[44px];
  }

  .form-button:focus,
  .form-button:focus-visible {
    @apply outline-none ring-2 ring-offset-2;
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
  }



  /* Base button component */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    min-height: 44px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  }

  .btn:disabled,
  .btn[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
  }

  /* Primary button gradient */
  .btn-primary {
    background-image: linear-gradient(to right, var(--r-primary), var(--r-primary-hover)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }

  .btn-primary:hover {
    background-image: linear-gradient(to right, var(--r-primary-hover), var(--r-primary-text)) !important;
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.35);
  }

  .form-button-secondary {
    @apply form-button bg-gradient-to-r from-gray-600 to-gray-700 hover:from-gray-700 hover:to-gray-800 text-white shadow-gray-500/30;
  }

  .form-button-secondary:focus {
    @apply ring-gray-500;
  }

  .form-button-danger {
    @apply form-button bg-gradient-to-r from-red-600 to-red-700 hover:from-red-700 hover:to-red-800 text-white shadow-red-500/30;
  }

  .form-button-danger:focus {
    @apply ring-red-500;
  }

  /* Premium Card Components */
  .card {
    @apply bg-white dark:bg-gray-800 rounded-2xl shadow-lg hover:shadow-2xl border border-gray-200/50 dark:border-gray-700/50 p-6 transition-all duration-300 transform hover:-translate-y-1 bg-gradient-to-br from-white to-gray-50/30 dark:from-gray-800 dark:to-gray-900/30;
  }

  .card-header {
    @apply flex items-center mb-6 pb-4 border-b border-gray-200/50 dark:border-gray-700/50;
  }

  .card-icon {
    @apply flex-shrink-0 p-4 bg-gradient-to-br from-primary-500 to-primary-600 dark:from-primary-600 dark:to-primary-700 rounded-2xl mr-4 shadow-lg shadow-primary-500/20 text-white;
  }

  .card-title {
    @apply text-2xl font-bold bg-gradient-to-r from-gray-900 to-gray-700 dark:from-white dark:to-gray-300 bg-clip-text text-transparent;
  }

  /* Premium Table Components */
  .table-responsive {
    @apply overflow-x-auto shadow-lg rounded-2xl border border-gray-200/50 dark:border-gray-700/50 bg-white dark:bg-gray-800;
  }

  .table {
    @apply min-w-full divide-y divide-gray-200/50 dark:divide-gray-700/50;
  }

  .table thead {
    @apply bg-gradient-to-r from-gray-50 to-gray-100/50 dark:from-gray-800 dark:to-gray-700/50;
  }

  .table th {
    @apply px-6 py-4 text-left text-xs font-bold text-gray-700 dark:text-gray-300 uppercase tracking-wider;
  }

  .table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white;
  }

  .table tbody tr {
    @apply hover:bg-gradient-to-r hover:from-primary-50/30 hover:to-transparent dark:hover:from-primary-900/10 dark:hover:to-transparent transition-all duration-300 border-b border-gray-100/50 dark:border-gray-800/50;
  }

  /* Accessibility - Focus Indicators */
  *:focus {
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
  }

  button:focus,
  a:focus,
  input:focus,
  select:focus,
  textarea:focus,
  [tabindex]:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  }

  /* Icon-only buttons need visible focus ring */
  button[aria-label]:focus,
  a[aria-label]:focus,
  button:not([aria-label]):focus:has(.fas),
  a:not([aria-label]):focus:has(.fas) {
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  }

  /* Dark mode focus adjustments for better contrast */
  .dark button:focus,
  .dark a:focus {
    outline-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.4);
  }

  /* WCAG AA compliant color contrast */
  .text-gray-500 {
    color: #6b7280;
  }

  /* 4.5:1 contrast ratio */
  .text-gray-600 {
    color: #4b5563;
  }

  /* 7:1 contrast ratio */

  /* Dark mode contrast improvements */
  .dark .text-gray-500 {
    color: #9ca3af;
  }

  /* Better contrast in dark mode */
  .dark .text-gray-600 {
    color: #d1d5db;
  }

  /* Notification text contrast */
  .notif-item .text-gray-700 {
    color: #374151;
  }

  /* 4.5:1+ on white */
  .dark .notif-item .text-gray-200 {
    color: #e5e7eb;
  }

  /* 4.5:1+ on dark */

  /* Touch targets for mobile */
  .touch-target {
    min-width: 44px;
    min-height: 44px;
  }

  /* STANDARDIZED: Mobile breakpoint (< 640px) */
  @media (max-width: 639px) {

    button,
    a.button,
    .btn {
      min-height: 44px;
      padding: 12px 16px;
    }

    /* Global touch target improvements */
    a,
    button,
    input[type="button"],
    input[type="submit"],
    .clickable {
      min-height: 44px;
      min-width: 44px;
    }

    /* Table action buttons */
    table a,
    table button {
      min-height: 36px;
      min-width: 36px;
      padding: 0.5rem;
    }
  }

  /* Premium Button Components */
  .btn {
    @apply inline-flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-bold rounded-xl transition-all duration-300 disabled:opacity-50 disabled:cursor-not-allowed transform hover:scale-105 active:scale-95 disabled:hover:scale-100 shadow-lg hover:shadow-xl;
  }

  .btn:focus {
    @apply outline-none ring-2 ring-offset-2;
  }

  .btn-sm {
    @apply px-3 py-2 text-xs rounded-lg;
  }

  .btn-lg {
    @apply px-8 py-4 text-base rounded-2xl;
  }

  .btn-primary {
    @apply btn bg-gradient-to-r from-primary-600 to-primary-700 hover:from-primary-700 hover:to-primary-800 text-white shadow-primary-500/30;
  }

  .btn-primary:focus {
    @apply ring-primary-500;
  }

  .btn-secondary {
    @apply btn bg-gradient-to-r from-gray-600 to-gray-700 hover:from-gray-700 hover:to-gray-800 text-white shadow-gray-500/30;
  }

  .btn-secondary:focus {
    @apply ring-gray-500;
  }

  .btn-success {
    @apply btn bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white shadow-green-500/30;
  }

  .btn-success:focus {
    @apply ring-green-500;
  }

  .btn-danger {
    @apply btn bg-gradient-to-r from-red-600 to-red-700 hover:from-red-700 hover:to-red-800 text-white shadow-red-500/30;
  }

  .btn-danger:focus {
    @apply ring-red-500;
  }

  .btn-warning {
    @apply btn bg-gradient-to-r from-yellow-600 to-yellow-700 hover:from-yellow-700 hover:to-yellow-800 text-white shadow-yellow-500/30;
  }

  .btn-warning:focus {
    @apply ring-yellow-500;
  }

  .btn-outline {
    @apply btn border-2 border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gradient-to-r hover:from-gray-50 hover:to-gray-100 dark:hover:from-gray-700 dark:hover:to-gray-600 shadow-gray-500/10;
  }

  /* Premium Modal Components */
  .modal-overlay {
    @apply fixed inset-0 bg-gradient-to-br from-black/60 via-black/50 to-black/40 backdrop-blur-md z-50 animate-fade-in;
  }

  .modal-container {
    @apply fixed inset-0 z-50 overflow-y-auto;
  }

  /* Lock body scroll when modal is open */
  body.modal-open {
    overflow: hidden !important;
  }

  .modal-content {
    @apply inline-block align-bottom bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 rounded-3xl text-left overflow-hidden shadow-2xl transform transition-all duration-300 sm:my-8 sm:align-middle sm:max-w-lg sm:w-full border border-gray-200/50 dark:border-gray-700/50;
  }

  .modal-header {
    @apply bg-gradient-to-r from-gray-50 to-white dark:from-gray-800 dark:to-gray-700 px-6 pt-6 pb-4 sm:p-8 sm:pb-6 border-b border-gray-200/50 dark:border-gray-700/50;
  }

  .modal-body {
    @apply bg-white dark:bg-gray-800 px-6 pb-4 sm:px-8 sm:pb-6;
  }

  .modal-footer {
    @apply bg-gradient-to-r from-gray-50 to-white dark:from-gray-800 dark:to-gray-700 px-6 py-4 sm:px-8 sm:flex sm:flex-row-reverse gap-3 border-t border-gray-200/50 dark:border-gray-700/50;
  }

  /* Premium Alert Components */
  .alert {
    @apply rounded-2xl p-4 mb-4 border-2 shadow-lg backdrop-blur-sm;
  }

  .alert-success {
    @apply alert bg-gradient-to-br from-green-50 to-green-100/50 dark:from-green-900/20 dark:to-green-900/10 text-green-800 dark:text-green-300 border-green-300/50 dark:border-green-700/50 shadow-green-500/20;
  }

  .alert-error {
    @apply alert bg-gradient-to-br from-red-50 to-red-100/50 dark:from-red-900/20 dark:to-red-900/10 text-red-800 dark:text-red-300 border-red-300/50 dark:border-red-700/50 shadow-red-500/20;
  }

  .alert-warning {
    @apply alert bg-gradient-to-br from-yellow-50 to-yellow-100/50 dark:from-yellow-900/20 dark:to-yellow-900/10 text-yellow-800 dark:text-yellow-300 border-yellow-300/50 dark:border-yellow-700/50 shadow-yellow-500/20;
  }

  .alert-info {
    @apply alert bg-gradient-to-br from-blue-50 to-blue-100/50 dark:from-blue-900/20 dark:to-blue-900/10 text-blue-800 dark:text-blue-300 border-blue-300/50 dark:border-blue-700/50 shadow-blue-500/20;
  }

  /* Loading Components */
  .loading {
    @apply opacity-60 pointer-events-none relative;
  }

  .loading::after {
    @apply absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-gray-800/50;
    content: '';
  }

  .spinner {
    @apply animate-spin rounded-full h-6 w-6 border-b-2 border-primary-600;
  }

  /* Toast Components */
  .toast {
    @apply fixed top-4 right-4 z-50 max-w-sm w-full;
  }

  .toast-content {
    @apply rounded-lg shadow-lg p-4;
  }

  .toast-success {
    @apply toast-content bg-green-50 border border-green-200 text-green-800;
  }

  .toast-error {
    @apply toast-content bg-red-50 border border-red-200 text-red-800;
  }

  .toast-warning {
    @apply toast-content bg-yellow-50 border border-yellow-200 text-yellow-800;
  }

  .toast-info {
    @apply toast-content bg-blue-50 border border-blue-200 text-blue-800;
  }
}

/* ===== RESPONSIVE UTILITIES ===== */
@layer utilities {

  /* Mobile First Responsive */
  .mobile-stack {
    @apply flex flex-col space-y-4;
  }

  .mobile-full {
    @apply w-full;
  }

  .mobile-text-sm {
    @apply text-sm;
  }

  .mobile-p-2 {
    @apply p-2;
  }

  /* Touch Targets */
  .touch-target {
    @apply min-h-[44px] min-w-[44px];
  }

  /* Responsive Grid */
  .responsive-grid {
    @apply grid grid-cols-1 gap-4 sm:gap-6;
  }

  .responsive-grid-2 {
    @apply grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6;
  }

  .responsive-grid-3 {
    @apply grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6;
  }

  .responsive-grid-4 {
    @apply grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6;
  }

  /* Responsive Text */
  .responsive-text-xs {
    @apply text-xs sm:text-sm;
  }

  .responsive-text-sm {
    @apply text-sm sm:text-base;
  }

  .responsive-text-base {
    @apply text-base sm:text-lg;
  }

  .responsive-text-lg {
    @apply text-lg sm:text-xl;
  }

  .responsive-text-xl {
    @apply text-xl sm:text-2xl;
  }

  /* Responsive Spacing */
  .responsive-p {
    @apply p-4 sm:p-6;
  }

  .responsive-px {
    @apply px-3 sm:px-6;
  }

  .responsive-py {
    @apply py-4 sm:py-6;
  }

  .responsive-mb {
    @apply mb-4 sm:mb-6;
  }

  .responsive-mt {
    @apply mt-4 sm:mt-6;
  }
}

/* ===== MOBILE OPTIMIZATIONS ===== */
/* STANDARD BREAKPOINTS: Mobile < 640px, Tablet 640px-1024px, Desktop > 1024px */
@media (max-width: 639px) {

  /* Prevent horizontal overflow */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }

  /* Better table responsiveness */
  .table-responsive {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    @apply px-3 py-3;
  }

  /* Better touch targets */
  button,
  a,
  input,
  select,
  textarea {
    @apply touch-target;
  }

  /* Mobile form improvements */
  .form-input {
    @apply text-base;
    /* Prevents zoom on iOS */
  }

  /* Mobile navigation improvements */
  .mobile-menu {
    @apply fixed inset-0 z-40 bg-white dark:bg-gray-800;
  }

  /* Mobile card improvements */
  .card {
    @apply p-4;
  }

  /* Mobile button improvements */
  .btn {
    @apply w-full justify-center;
  }

  .btn-sm {
    @apply w-auto;
  }

  /* Mobile font-size minimum 14px (text-sm) for better readability */
  .text-xs {
    font-size: 0.875rem !important;
    /* 14px instead of 12px */
  }

  /* Ensure all inputs have minimum 14px font-size on mobile */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 0.875rem !important;
    /* 14px minimum for iOS zoom prevention */
  }

  /* ===== PLAYWRIGHT_FIX: Prevent horizontal scroll on mobile ===== */
  body,
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .container,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl {
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
  }

  @media (max-width: 639px) {

    /* Mobile: Ensure no horizontal overflow - Removed destructive universal selector */

    /* Fix for cards and containers that might overflow */
    .card,
    .bg-white,
    .bg-gray-50 {
      overflow-x: hidden !important;
    }

    /* Safe replacement for media elements */
    img,
    video,
    canvas,
    audio,
    iframe,
    embed,
    object {
      max-width: 100%;
      height: auto;
    }
  }

  /* ===== PLAYWRIGHT_FIX END ===== */

  /* ===== PRIMARY COLOR FALLBACKS (when CDN Tailwind misses dynamic classes) ===== */
  /* These ensure primary-colored elements render even if the CDN config doesn't pre-generate classes */
  :root {
    --primary-50: var(--r-primary-light);
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: var(--r-primary);
    --primary-700: var(--r-primary-hover);
    --primary-800: var(--r-primary-text);
    --primary-900: #1e3a8a;
    /* RGB fallbacks for Tailwind gradient stop utilities */
    --primary-50-rgb: 239 246 255;
    --primary-500-rgb: 59 130 246;
    --primary-600-rgb: 37 99 235;
    --primary-700-rgb: 29 78 216;
    --primary-800-rgb: 30 64 175;
    --primary-900-rgb: 30 58 138;
  }

  /* Background utilities */
  .bg-primary-50 {
    background-color: var(--primary-50) !important;
  }

  .bg-primary-100 {
    background-color: var(--primary-100) !important;
  }

  .bg-primary-200 {
    background-color: var(--primary-200) !important;
  }

  .bg-primary-300 {
    background-color: var(--primary-300) !important;
  }

  .bg-primary-400 {
    background-color: var(--primary-400) !important;
  }

  .bg-primary-500 {
    background-color: var(--primary-500) !important;
  }

  .bg-primary-600 {
    background-color: var(--primary-600) !important;
  }

  .bg-primary-700 {
    background-color: var(--primary-700) !important;
  }

  .bg-primary-800 {
    background-color: var(--primary-800) !important;
  }

  .bg-primary-900 {
    background-color: var(--primary-900) !important;
  }

  /* Hover states commonly used on buttons */
  .hover\:bg-primary-700:hover {
    background-color: var(--primary-700) !important;
  }

  .hover\:bg-primary-600:hover {
    background-color: var(--primary-600) !important;
  }

  /* Text and border utilities often used in icons and badges */
  .text-primary-400 {
    color: var(--primary-400) !important;
  }

  .text-primary-500 {
    color: var(--primary-500) !important;
  }

  .text-primary-600 {
    color: var(--primary-600) !important;
  }

  .border-primary-500 {
    border-color: var(--primary-500) !important;
  }

  /* Dark mode variant fallbacks for classes written as `dark:bg-primary-900/20` etc. */
  .dark .dark\:bg-primary-900\/20 {
    background-color: rgba(30, 58, 138, 0.2) !important;
  }

  .dark .dark\:text-primary-400 {
    color: var(--primary-400) !important;
  }

  /* Gradient stop utilities (Tailwind-like) for primary color */
  .from-primary-50 {
    --tw-gradient-from: rgb(var(--primary-50-rgb));
    --tw-gradient-to: rgb(var(--primary-50-rgb) / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
  }

  /* from-primary-500 fallback removed */

  /* Primary gradient stop fallbacks removed to avoid affecting non-button components */

  /* hover:from-primary-700 fallback removed */

  /* Gradient utility fallbacks removed to prevent global side effects */

  /* ===== SMOOTH SCROLL & TRANSITIONS ===== */
  html {
    scroll-behavior: smooth;
  }

  /* Global transition for interactive elements */
  a,
  button,
  .btn,
  .card,
  input,
  select,
  textarea,
  .clickable,
  [role="button"] {
    transition: all 0.2s ease-in-out;
  }

  /* Enhanced transitions for interactive elements */
  a:hover,
  button:hover,
  .btn:hover,
  .card:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Smooth transitions for form elements */
  input,
  select,
  textarea {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
  }

  /* Enhanced hover states for links */
  a:not(.btn):not(.form-button):hover {
    opacity: 0.8;
    text-decoration: underline;
  }

  /* Enhanced focus states - Accessibility */
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  [role="button"]:focus-visible {
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
    border-radius: 4px;
    transition: outline 0.2s ease-in-out;
  }

  /* Ensure all inputs have proper focus states */
  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="password"]:focus,
  input[type="number"]:focus,
  input[type="tel"]:focus,
  input[type="date"]:focus,
  input[type="time"]:focus,
  input[type="datetime-local"]:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
    border-color: var(--r-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transition: all 0.2s ease-in-out;
  }

  /* ===== TEXT BREAKING & LINE HEIGHT IMPROVEMENTS ===== */
  /* Prevent bad line breaks in titles and buttons */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
  }

  /* Better line height for body text */
  p,
  .text-body,
  .text-sm,
  .text-base {
    line-height: 1.6;
  }

  /* Long text handling */
  .text-ellipsis,
  .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Word break for long words */
  .break-words {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* ===== FOOTER ACCORDION ANIMATION ===== */
  .footer-accordion {
    transition: all 0.3s ease-in-out;
  }

  /* Desktop: Remove accordion behavior completely, show as regular divs */
  /* CRITICAL: Hide ALL chevron icons on desktop - must be first rule */
  @media (min-width: 1024px) {

    /* Hide chevron wrapper and all chevron icons on desktop - override Font Awesome */
    .footer-chevron-wrapper,
    footer .footer-accordion summary .footer-chevron-wrapper,
    .footer-container .footer-accordion summary .footer-chevron-wrapper,
    .footer-accordion summary .footer-chevron-wrapper,
    .footer-accordion summary .footer-chevron-wrapper i,
    .footer-accordion summary .footer-chevron-wrapper i.fas,
    .footer-accordion summary .footer-chevron-wrapper i.fa-chevron-down,
    footer .footer-accordion summary i.fa-chevron-down,
    footer .footer-accordion summary i[class*="chevron"],
    .footer-container .footer-accordion summary i.fa-chevron-down,
    .footer-container .footer-accordion summary i[class*="chevron"],
    .footer-accordion summary i.fa-chevron-down,
    .footer-accordion summary i[class*="chevron"],
    .footer-accordion summary .fa-chevron-down,
    .footer-accordion summary i.fas.fa-chevron-down,
    .footer-accordion summary>i.fa-chevron-down,
    .footer-accordion summary *[class*="chevron"] {
      --fa-display: none !important;
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      width: 0 !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      font-size: 0 !important;
      line-height: 0 !important;
      position: absolute !important;
      left: -9999px !important;
      overflow: hidden !important;
      flex: 0 0 0 !important;
      min-width: 0 !important;
      max-width: 0 !important;
    }

    .footer-accordion {
      display: block !important;
      position: relative !important;
      pointer-events: none !important;
    }

    /* Force details to always be open on desktop */
    .footer-accordion[open],
    .footer-accordion:not([open]) {
      pointer-events: none !important;
    }

    .footer-accordion summary {
      display: block !important;
      cursor: default !important;
      pointer-events: none !important;
      position: relative !important;
      width: 100% !important;
      user-select: none !important;
    }

    /* Prevent summary from being clickable */
    .footer-accordion summary::before,
    .footer-accordion summary::after {
      display: none !important;
    }

    .footer-accordion summary h4 {
      margin-bottom: 0.75rem !important;
      display: block !important;
      width: 100% !important;
      pointer-events: none !important;
    }

    /* Force content to display below summary on desktop - always visible */
    .footer-accordion>*:not(summary) {
      display: block !important;
      opacity: 1 !important;
      max-height: none !important;
      transform: none !important;
      width: 100% !important;
      position: relative !important;
      margin-top: 0 !important;
      padding-top: 0 !important;
      animation: none !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }

    /* Disable accordion animations on desktop */
    .footer-accordion[open]>*:not(summary),
    .footer-accordion:not([open])>*:not(summary) {
      animation: none !important;
      opacity: 1 !important;
      max-height: none !important;
      transform: none !important;
      display: block !important;
    }

    /* Hide chevron icons completely on desktop - enhanced rules */
    .footer-accordion summary i.fa-chevron-down,
    .footer-accordion summary .fa-chevron-down,
    .footer-accordion summary i[class*="chevron"],
    .footer-accordion summary [class*="chevron"],
    .footer-accordion summary .footer-chevron-mobile,
    .footer-accordion summary i.fas.fa-chevron-down {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      width: 0 !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      font-size: 0 !important;
      line-height: 0 !important;
      position: absolute !important;
      left: -9999px !important;
      overflow: hidden !important;
    }

    /* Ensure lists are displayed as block, not inline */
    .footer-accordion ul,
    .footer-accordion ol,
    .footer-accordion div {
      display: block !important;
      width: 100% !important;
    }

    /* Make links clickable even though parent has pointer-events: none */
    .footer-accordion a {
      pointer-events: auto !important;
      cursor: pointer !important;
    }
  }

  /* Tablet: Keep accordion but make it behave better */
  @media (min-width: 640px) and (max-width: 1023px) {
    .footer-accordion {
      display: block !important;
      position: relative !important;
    }

    .footer-accordion summary {
      display: block !important;
      cursor: default !important;
      pointer-events: none !important;
      position: relative !important;
      width: 100% !important;
    }

    .footer-accordion summary h4 {
      margin-bottom: 0.75rem !important;
      display: block !important;
      width: 100% !important;
    }

    .footer-accordion>*:not(summary) {
      display: block !important;
      opacity: 1 !important;
      max-height: none !important;
      transform: none !important;
      width: 100% !important;
      position: relative !important;
      margin-top: 0 !important;
      padding-top: 0 !important;
      animation: none !important;
      visibility: visible !important;
    }

    /* Hide ALL chevron icons on desktop - use more specific selectors */
    .footer-accordion summary i.fa-chevron-down,
    .footer-accordion summary .fa-chevron-down,
    .footer-accordion summary i[class*="chevron"],
    .footer-accordion summary [class*="chevron"],
    .footer-accordion summary i.fas.fa-chevron-down,
    .footer-accordion summary i[class*="fa-chevron"],
    .footer-accordion summary .footer-chevron-mobile {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      width: 0 !important;
      height: 0 !important;
      overflow: hidden !important;
      position: absolute !important;
      left: -9999px !important;
      margin: 0 !important;
      padding: 0 !important;
      font-size: 0 !important;
      line-height: 0 !important;
    }

    /* Also hide chevron icons that might be in flex containers */
    .footer-accordion summary.flex i.fa-chevron-down,
    .footer-accordion summary[class*="flex"] i.fa-chevron-down,
    .footer-accordion summary.flex .footer-chevron-mobile,
    .footer-accordion summary[class*="flex"] .footer-chevron-mobile {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      width: 0 !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      flex: 0 0 0 !important;
      min-width: 0 !important;
    }

    /* Force hide any icon with chevron in class name on desktop - highest specificity */
    @media (min-width: 1024px) {

      /* Target all possible chevron icon variations */
      .footer-accordion summary i[class*="chevron"],
      .footer-accordion summary .fa-chevron-down,
      .footer-accordion summary .footer-chevron-mobile,
      .footer-accordion summary i.fas.fa-chevron-down,
      .footer-accordion summary>i.fa-chevron-down,
      .footer-accordion summary i.fa-chevron-down.footer-chevron-mobile,
      footer .footer-accordion summary i[class*="chevron"],
      footer .footer-accordion summary .fa-chevron-down,
      .footer-container .footer-accordion summary i[class*="chevron"],
      .footer-container .footer-accordion summary .fa-chevron-down,
      /* Target by class combination */
      .footer-accordion summary i.fas.fa-chevron-down.lg\:hidden,
      .footer-accordion summary i[class*="chevron"][class*="hidden"],
      /* Universal selector for any chevron in summary */
      .footer-accordion summary *[class*="chevron"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        overflow: hidden !important;
        flex: 0 0 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        content: "" !important;
      }

      /* Also hide the space/gap that flex creates */
      .footer-accordion summary.flex:has(i[class*="chevron"]) {
        gap: 0 !important;
      }
    }
  }

  /* Mobile: Show chevron wrapper and icons */
  @media (max-width: 1023px) {
    .footer-chevron-wrapper {
      display: inline-flex !important;
      visibility: visible !important;
      opacity: 1 !important;
    }

    .footer-chevron-wrapper i {
      --fa-display: inline-block !important;
      display: inline-block !important;
      visibility: visible !important;
      opacity: 0.9 !important;
    }
  }

  .footer-accordion summary {
    transition: all 0.2s ease-in-out;
    user-select: none;
  }

  .footer-accordion summary::-webkit-details-marker {
    display: none;
  }

  .footer-accordion summary::marker {
    display: none;
  }

  /* Mobile only: Accordion animations */
  @media (max-width: 639px) {
    .footer-accordion[open]>*:not(summary) {
      animation: slideDown 0.3s ease-in-out;
    }

    .footer-accordion:not([open])>*:not(summary) {
      animation: slideUp 0.3s ease-in-out;
    }
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      max-height: 1000px;
      transform: translateY(0);
    }
  }

  @keyframes slideUp {
    from {
      opacity: 1;
      max-height: 1000px;
      transform: translateY(0);
    }

    to {
      opacity: 0;
      max-height: 0;
      transform: translateY(-10px);
    }
  }

  /* ===== TOUCH TARGET IMPROVEMENTS ===== */
  /* Ensure all interactive elements meet 44px minimum on mobile */
  @media (max-width: 639px) {
    a:not(.btn):not(.form-button):not(.card) {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      padding: 0.5rem 0.75rem;
    }

    button:not(.btn):not(.form-button) {
      min-height: 44px;
      min-width: 44px;
    }

    /* Icon buttons */
    button i,
    a i {
      min-width: 24px;
      min-height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
  }

  /* ===== GRID LAYOUT STANDARDIZATION UTILITY ===== */
  /* Helper class to convert md: breakpoint to sm: for mobile-first approach */
  /* Note: This is a fallback for pages that still use md:grid-cols */
  /* Best practice: Update HTML to use sm:grid-cols-X lg:grid-cols-Y directly */

  /* Override md:grid-cols-2 to behave like sm:grid-cols-2 on mobile */
  @media (min-width: 640px) and (max-width: 1023px) {
    .grid.grid-cols-1[class*="md:grid-cols-2"] {
      grid-template-columns: repeat(2, 1fr);
    }

    .grid.grid-cols-1[class*="md:grid-cols-3"] {
      grid-template-columns: repeat(3, 1fr);
    }

    .grid.grid-cols-1[class*="md:grid-cols-4"] {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  /* Ensure mobile-first: single column on mobile for all grids */
  @media (max-width: 639px) {
    .grid[class*="md:grid-cols"] {
      grid-template-columns: 1fr !important;
    }
  }

  /* ===== DARK MODE GLOBAL FALLBACKS ===== */
  /* Ensure dark mode is visually obvious even if some Tailwind dark: utilities are missing */
  html.dark body {
    background-color: #111827 !important;
    color: #e5e7eb;
  }

  .dark .bg-white {
    background-color: #1f2937 !important;
  }

  .dark .border-gray-200 {
    border-color: #374151 !important;
  }

  .dark .text-gray-900 {
    color: #f9fafb !important;
  }

  .dark .text-gray-700 {
    color: #e5e7eb !important;
  }

  .dark .text-gray-600 {
    color: #d1d5db !important;
  }

  .dark .bg-gray-50 {
    background-color: var(--r-text-primary) !important;
  }

  .dark .bg-gray-100 {
    background-color: #111827 !important;
  }

  /* ===== HIGH CONTRAST THEME ===== */
  html.contrast body {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
  }

  .contrast .bg-white {
    background-color: #0f0f0f !important;
  }

  .contrast .text-gray-900,
  .contrast .text-gray-800,
  .contrast .text-gray-700 {
    color: #ffffff !important;
  }

  .contrast .text-gray-600,
  .contrast .text-gray-500,
  .contrast .text-gray-400 {
    color: #e5e5e5 !important;
  }

  .contrast .border-gray-200,
  .contrast .border-gray-300 {
    border-color: #6b7280 !important;
  }

  .contrast a {
    color: #60a5fa !important;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .contrast .focus-ring:focus,
  .contrast .focus-ring-dark:focus {
    box-shadow: 0 0 0 3px #f59e0b !important;
  }

  .contrast .btn-primary {
    background-color: var(--r-primary) !important;
    color: #fff !important;
  }

  .contrast .bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--r-primary-text), var(--r-primary-hover), var(--r-primary)) !important;
  }

  /* ===== Notification UI helpers (using spacing tokens) ===== */
  .nowrap {
    white-space: nowrap !important;
  }

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

  .btn-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: 9999px;
    font-size: var(--text-xs);
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .btn-chip-primary {
    background: rgba(37, 99, 235, .1);
    color: var(--r-primary);
  }

  .btn-chip-primary:hover {
    background: rgba(37, 99, 235, .2);
  }

  .btn-chip-muted {
    background: rgba(107, 114, 128, .12);
    color: #6b7280;
  }

  .btn-chip-muted:hover {
    background: rgba(107, 114, 128, .2);
  }

  .btn-chip:focus {
    outline: 2px solid var(--r-primary);
    outline-offset: 2px;
  }

  /* ===== NEOFUTURE NOTIFICATION ITEMS ===== */
  .notification-item {
    position: relative !important;
    padding: 1rem 1.5rem !important;
    margin: 0.5rem 0.75rem !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: row !important;
    width: calc(100% - 1.5rem) !important;
    box-sizing: border-box !important;
  }

  .notification-item:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
  }

  .dark .notification-item {
    background: rgba(31, 41, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
  }

  .notification-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, currentColor 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .notification-item__glow {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .notification-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow:
      0 8px 24px -4px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(59, 130, 246, 0.1) inset;
  }

  .dark .notification-item:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow:
      0 8px 24px -4px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(59, 130, 246, 0.2) inset;
  }

  .notification-item:hover::before {
    opacity: 1;
  }

  .notification-item:hover .notification-item__glow {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }

  .notification-item--read {
    opacity: 0.7;
  }

  .notification-item--read::before {
    display: none;
  }

  .notification-item--critical::before {
    color: #ef4444;
  }

  .notification-item--critical .notification-item__icon-bg {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
  }

  .notification-item--critical .notification-item__icon {
    color: #ef4444;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
  }

  .notification-item--system::before {
    color: #3b82f6;
  }

  .notification-item--system .notification-item__icon-bg {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
  }

  .notification-item--system .notification-item__icon {
    color: #3b82f6;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
  }

  .notification-item--ops::before {
    color: #f59e0b;
  }

  .notification-item--ops .notification-item__icon-bg {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
  }

  .notification-item--ops .notification-item__icon {
    color: #f59e0b;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
  }

  .notification-item[data-loading="true"] {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
  }

  .notification-item__content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
    z-index: 1;
  }

  .notification-item__icon-wrapper {
    position: relative !important;
    flex-shrink: 0 !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .notification-item__icon-bg {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .notification-item__mark-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6b7280;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }

  .notification-item--read .notification-item__mark-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .notification-item__mark-toggle:hover {
    color: #111827;
    border-color: rgba(59, 130, 246, 0.35);
  }

  .notification-item__mark-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
  }

  .dark .notification-item__mark-toggle {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
    color: #d1d5db;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  }

  .dark .notification-item__mark-toggle:hover {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.6);
  }

  .notification-item:hover .notification-item__icon-bg {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.1);
  }

  .notification-item__icon {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .notification-item:hover .notification-item__icon {
    transform: scale(1.1);
  }

  .notification-item__body {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .notification-item__header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    margin-bottom: 0 !important;
    flex-wrap: wrap !important;
  }

  .notification-item__badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0.25rem 0.625rem !important;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    color: white !important;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
    flex-shrink: 0 !important;
    animation: badgePulse 2s ease-in-out infinite !important;
  }

  @keyframes badgePulse {

    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    50% {
      transform: scale(1.05);
      box-shadow: 0 2px 12px rgba(59, 130, 246, 0.5);
    }
  }

  .notification-item__badge-dot {
    width: 0.375rem;
    height: 0.375rem;
    background: white;
    border-radius: 50%;
    animation: dotBlink 1.5s ease-in-out infinite;
  }

  @keyframes dotBlink {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.3;
    }
  }

  .notification-item__title {
    flex: 1 !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
  }

  .dark .notification-item__title {
    color: #f9fafb;
  }

  /* ==========================================================================
   NOTIFICATION PANEL SYSTEM (Unified Desktop & Mobile)
   ========================================================================== */

  /* 1. Panel Container & Positioning */
  .notification-panel {
    display: none !important;
    /* Hidden by default - !important to prevent auto-open */
    /* Position is set per variant (desktop vs mobile) below */
  }

  /* Desktop: Dropdown from button */
  .notification-panel[data-variant="desktop"] {
    position: absolute;
    /* Position relative to the button container */
    top: 100%;
  }

  /* Force visibility classes - CSP-safe alternative to inline styles */
  .notification-panel--force-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .notification-panel--force-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    /* Below the button */
    right: 0;
    /* Aligned to right edge */
    margin-top: 0.75rem;
    /* mt-3 equivalent */
    z-index: 10000;
    transform-origin: top right;
  }

  .notification-panel:not(.hidden) {
    display: block;
    animation: notificationPanelSlideIn 0.2s ease-out;
  }

  /* Mobile override - FIXED: Use top: 3.5rem to match header height */
  @media (max-width: 640px) {
    .notification-panel[data-variant="mobile"] {
      position: fixed !important;
      /* Use fixed on mobile for better viewport handling */
      top: 3.5rem !important;
      /* FIXED: Changed from 4.5rem to 3.5rem to match header */
      left: 50% !important;
      transform: translateX(-50%) !important;
      /* Center horizontally */
      right: auto !important;
      width: 95vw !important;
      max-width: 24rem !important;
      margin-top: 0;
    }
  }

  /* 2. Backdrop (The main card) */
  .notification-panel__backdrop {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Fixed dimensions for consistency */
    width: 24rem;
    /* 384px - Phone size */
    max-width: calc(100vw - 1.5rem);
    /* Responsive on very small screens */
    min-height: 60vh;
    max-height: 85vh;

    /* Visual Styling (Solid Gradient - NO transparency to match mobile) */
    background: linear-gradient(140deg, rgba(236, 72, 153, 1.0) 0%, rgba(147, 51, 234, 1.0) 42%, rgba(59, 130, 246, 1.0) 100%) !important;
    /* REMOVED backdrop-filter to prevent transparency */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
      0 20px 60px -15px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(255, 255, 255, 0.2) inset;

    /* Text Colors */
    color: #ffffff;
    /* REMOVED overflow: hidden to allow border glow */
  }

  /* Ensure all text inside is white */
  .notification-panel__backdrop * {
    color: #ffffff;
  }

  /* 3. Header */
  .notification-panel__header {
    flex: 0 0 auto;
    /* Don't shrink or grow */
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
  }

  .notification-panel__header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .notification-panel__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .notification-panel__actions {
    display: flex;
    gap: 0.5rem;
  }

  .notification-panel__action-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
  }

  .notification-panel__action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  /* 4. List (Content Area) */
  .notification-panel__list {
    flex: 1 1 auto;
    /* Grow to fill available space */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 200px;
    /* Ensure minimum height for empty state */
  }

  /* Scrollbar Styling */
  .notification-panel__list::-webkit-scrollbar {
    width: 6px;
  }

  .notification-panel__list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }

  .notification-panel__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
  }

  /* 5. Empty State */
  .notification-panel__empty {
    flex: 1 1 auto;
    /* Fill the list container */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    height: 100%;
    /* Ensure it takes full height */
  }

  .notification-panel__empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.7;
  }

  .notification-panel__empty-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .notification-panel__empty-subtext {
    font-size: 0.875rem;
    opacity: 0.8;
  }

  /* 6. Footer */
  .notification-panel__footer {
    flex: 0 0 auto;
    /* Don't shrink or grow */
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    text-align: right;
  }

  .notification-panel__footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    transition: all 0.2s;
  }

  .notification-panel__footer-link:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  /* 7. Scrim (Overlay) */
  .notification-panel__scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: -1;
  }

  /* 8. Border Glow Animation */
  .notification-panel__border-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(130deg, #ec4899, #8b5cf6, #3b82f6);
    z-index: -1;
    border-radius: 22px;
    opacity: 0.5;
    filter: blur(8px);
  }

  /* 9. Dark Mode Overrides (Ensure consistency) */
  .dark .notification-panel__backdrop {
    background: linear-gradient(140deg, rgba(236, 72, 153, 0.98) 0%, rgba(147, 51, 234, 0.95) 42%, rgba(59, 130, 246, 0.95) 100%);
  }

  .notification-item__meta {
    font-size: 0.8125rem !important;
    color: #6b7280 !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
  }

  .dark .notification-item__meta {
    color: #9ca3af;
  }

  .notification-item__actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    margin-top: 0.5rem !important;
  }

  .notification-item__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
  }

  .notification-item__action-btn--primary {
    background: linear-gradient(135deg, #3b82f6 0%, var(--r-primary) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  }

  .notification-item__action-btn--primary:hover {
    background: linear-gradient(135deg, var(--r-primary) 0%, var(--r-primary-hover) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  }

  .notification-item__action-btn--primary:active {
    transform: translateY(0);
  }

  .notification-item__action-btn--secondary {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, 0.08);
  }

  .dark .notification-item__action-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.1);
  }

  .notification-item__action-btn--secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #374151;
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
  }

  .dark .notification-item__action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.15);
  }

  .notification-item__action-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
  }

  .notification-item__action-btn:hover i {
    transform: translateX(2px);
  }

  /* Legacy support - keep old classes working */
  .notif-item {
    border-left: 4px solid transparent;
    padding: var(--space-4) !important;
    gap: var(--space-2);
    transition: opacity 0.2s ease, transform 0.15s ease;
    display: flex !important;
    flex-direction: row !important;
  }

  .notif-item:hover {
    transform: translateX(2px);
    background-color: rgba(59, 130, 246, 0.03) !important;
  }

  .notif-item[data-loading="true"] {
    opacity: 0.6;
    pointer-events: none;
  }

  .notif-item:not([data-loading]):hover {
    will-change: transform;
  }

  .notif-critical {
    border-left-color: #ef4444;
  }

  .notif-system {
    border-left-color: #3b82f6;
  }

  .notif-ops {
    border-left-color: #f59e0b;
  }

  body.notification-panel-open {
    overflow: hidden !important;
  }

  @keyframes notificationPanelSlideIn {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.95);
    }

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

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

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

/* CRITICAL: Mobile border glow - EXACT styles */
.notification-panel[data-variant="mobile"] .notification-panel__border-glow {
  display: block !important;
  visibility: visible !important;
  opacity: 0.9 !important;
  animation: gradientShift 4s ease infinite !important;
}

/* CRITICAL: Desktop uses EXACT same border glow as mobile - COPY ALL MOBILE STYLES */
.notification-panel[data-variant="desktop"] .notification-panel__border-glow {
  display: block !important;
  visibility: visible !important;
  opacity: 0.9 !important;
  animation: gradientShift 4s ease infinite !important;
  background: linear-gradient(130deg, rgba(236, 72, 153, 0.9) 0%, rgba(147, 51, 234, 0.78) 45%, rgba(59, 130, 246, 0.78) 100%) !important;
  background-size: 200% 200% !important;
  filter: blur(10px) !important;
  border-radius: 20px !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.notification-panel__header {
  position: relative;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.dark .notification-panel__header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.notification-panel__header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap !important;
  /* CRITICAL: Prevent wrapping - keep title and actions on same line */
  width: 100%;
  min-width: 0;
}

.notification-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff !important;
  /* CRITICAL: White text for visibility on gradient background */
  letter-spacing: -0.01em;
  flex: 0 1 auto;
  /* CRITICAL: Don't shrink too much, but allow some flexibility */
  min-width: 0;
  white-space: nowrap !important;
  /* CRITICAL: Prevent text wrapping in title */
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  /* CRITICAL: Add text shadow for better readability on gradient */
}

.notification-panel__title>span {
  white-space: nowrap !important;
  /* CRITICAL: Prevent "Bildirimler" text from wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff !important;
  /* CRITICAL: Ensure text is white */
}

/* CRITICAL: Dark mode should use white text (same as mobile) */
.dark .notification-panel__title {
  color: #ffffff !important;
}

.dark .notification-panel__title>span {
  color: #ffffff !important;
}

/* CRITICAL: Icon gradient - SAME for both desktop and mobile */
.notification-panel__title-icon {
  font-size: 1.125rem !important;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%) !important;
  /* CRITICAL: White gradient for visibility on gradient background */
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5)) !important;
  /* CRITICAL: White drop shadow for better visibility */
  position: relative;
  z-index: 1;
}

/* CRITICAL: Mobile icon gradient - EXACT styles */
.notification-panel[data-variant="mobile"] .notification-panel__title-icon {
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5)) !important;
}

/* CRITICAL: Desktop uses EXACT same icon gradient as mobile - COPY ALL MOBILE STYLES */
.notification-panel[data-variant="desktop"] .notification-panel__title-icon {
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5)) !important;
  font-size: 1.125rem !important;
  position: relative !important;
  z-index: 1 !important;
}

.notification-panel__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.8) inset;
  animation: pulseGlow 2s ease-in-out infinite;
}

.dark .notification-panel__count-badge {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1) inset;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.8) inset;
  }

  50% {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.8) inset;
  }
}

.notification-panel__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap !important;
  /* CRITICAL: Prevent action buttons from wrapping */
  justify-content: flex-end;
  flex-shrink: 0;
  /* CRITICAL: Don't allow actions to shrink */
}

.notification-panel__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.2) !important;
  transition: all 0.2s ease;
  /* CRITICAL: White background for visibility on gradient */
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  /* CRITICAL: White border for visibility */
  border-radius: 10px;
  color: #ffffff !important;
  /* CRITICAL: White icon color for visibility */
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dark .notification-panel__action-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.notification-panel__action-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .notification-panel__action-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}

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

.notification-panel__action-btn[aria-pressed="true"],
.notification-panel__action-btn.is-muted,
.notification-panel__action-btn--muted {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #dc2626 !important;
}

.dark .notification-panel__action-btn[aria-pressed="true"],
.dark .notification-panel__action-btn.is-muted,
.dark .notification-panel__action-btn--muted {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}

/* Mute button active state hover */
.notification-panel__action-btn--muted:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.dark .notification-panel__action-btn--muted:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Close button specific styling */
.notification-panel__close-btn {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.notification-panel__close-btn:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) scale(1.1) rotate(90deg);
}

.notification-panel__close-btn:active {
  transform: translateY(0) scale(0.95) rotate(90deg);
}

.dark .notification-panel__close-btn {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.dark .notification-panel__close-btn:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
}

.notification-panel__list {
  flex: 1 1 auto;
  min-height: 50vh;
  position: relative;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0.5rem 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* CRITICAL: When list contains only empty state, center it using flex */
.notification-panel__list[data-empty="true"],
.notification-panel__list[data-empty='true'] {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 50vh !important;
}

/* CRITICAL: Ensure empty state is properly centered when data-empty is set */
.notification-panel__list[data-empty="true"] .notification-panel__empty,
.notification-panel__list[data-empty='true'] .notification-panel__empty {
  width: 100% !important;
  flex: 0 0 auto !important;
}

@media (min-width: 640px) {
  .notification-panel__list {
    max-height: 9999px !important;
  }

  .notification-panel__empty {
    margin-top: auto;
    margin-bottom: auto;
  }
}

.notification-panel[data-variant="mobile"] .notification-panel__list {
  max-height: calc(100vh - 13rem) !important;
}

.notification-panel__list[data-loading="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.notification-panel__list[data-loading="true"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(59, 130, 246, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  animation: notificationShimmer 1.2s linear infinite;
  pointer-events: none;
}

.notification-panel__list::-webkit-scrollbar {
  width: 6px;
}

.notification-panel__list::-webkit-scrollbar-track {
  background: transparent;
}

.notification-panel__list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
}

.dark .notification-panel__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.notification-panel__list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

.dark .notification-panel__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.notification-panel__empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3rem 1.5rem !important;
  text-align: center !important;
  width: 100% !important;
  /* CRITICAL: Ensure empty state takes full width and is properly centered */
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.notification-panel__empty-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: #9ca3af;
  font-size: 1.5rem;
}

/* CRITICAL: Dark mode should use white icon (same as mobile) */
.dark .notification-panel__empty-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #ffffff !important;
}

.notification-panel__empty-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff !important;
  /* CRITICAL: Force white color - same as mobile */
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* CRITICAL: Dark mode should use white text (same as mobile) */
.dark .notification-panel__empty-text {
  color: #ffffff !important;
}

/* CRITICAL: Desktop should use white text (same as mobile) */
.notification-panel[data-variant="desktop"] .notification-panel__empty-text,
.notification-panel[data-variant="desktop"] .notification-panel__empty-text * {
  color: #ffffff !important;
}

.dark .notification-panel[data-variant="desktop"] .notification-panel__empty-text,
.dark .notification-panel[data-variant="desktop"] .notification-panel__empty-text * {
  color: #ffffff !important;
}

.notification-panel__empty-subtext {
  font-size: 0.8125rem;
  color: #9ca3af;
}

/* CRITICAL: Dark mode should use light blue text (same as mobile) */
.dark .notification-panel__empty-subtext {
  color: #e0e7ff !important;
}

.notification-panel__footer {
  padding: 1rem 1.5rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: right !important;
  margin-top: auto;
}

.dark .notification-panel__footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.notification-panel__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  margin-left: auto;
}

.dark .notification-panel__footer-link {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
}

.notification-panel__footer-link:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--r-primary);
  transform: translateX(2px);
  gap: 0.75rem;
}

.dark .notification-panel__footer-link:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.notification-panel__footer-link i {
  font-size: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-panel__footer-link:hover i {
  transform: translateX(2px);
}

/* ===== Design Tokens (v1) ===== */
:root {
  /* brand */
  --color-primary-50: var(--r-primary-light);
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: var(--r-primary);
  --color-primary-700: var(--r-primary-hover);
  --color-primary-800: var(--r-primary-text);
  --color-primary-900: #1e3a8a;
  /* neutral */
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #e5e5e5;
  --color-neutral-300: #d4d4d4;
  --color-neutral-400: #a3a3a3;
  --color-neutral-500: #737373;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #171717;
  /* semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  /* elevation */
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
  --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, .10), 0 10px 10px -5px rgba(0, 0, 0, .04);
  --shadow-strong: 0 10px 40px -10px rgba(0, 0, 0, .15), 0 2px 10px -2px rgba(0, 0, 0, .05);
  /* radii */
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  /* spacing scale (4/8) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  /* typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-medium {
  box-shadow: var(--shadow-medium);
}

.shadow-strong {
  box-shadow: var(--shadow-strong);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.rounded-2xl {
  border-radius: var(--radius-2xl);
}

/* Layout helpers */
/* FIX: Reset container-page margins to prevent offset issues */
.container-page {
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* FIX: Ensure main-content handles sidebar offset correctly via CSS variable or state class */
/* Default state (no sidebar or mobile): No offset */
.app-content,
.main-content {
  margin-left: 0 !important;
  /* Force reset for mobile */
  width: 100%;
  transition: margin-left 0.3s ease;
}

@media (min-width: 640px) {
  .container-page {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-page {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.stack-4>*+* {
  margin-top: var(--space-4);
}

.stack-6>*+* {
  margin-top: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sidebar (new UI) */
.app-sidebar {
  position: fixed;
  inset: 64px auto 0 0;
  width: 260px;
  background: var(--r-text-primary);
  color: #e5e7eb;
  border-right: 1px solid rgba(255, 255, 255, .08);
  z-index: 40;
}

.app-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #cbd5e1;
}

.app-sidebar a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.app-shell {
  display: flex;
}

.app-content {
  flex: 1;
}

.app-content.with-sidebar {
  margin-left: 260px;
}

/* ===== DARK MODE IMPROVEMENTS ===== */
@media (prefers-color-scheme: dark) {

  /* Auto dark mode for system preference */
  .auto-dark {
    @apply dark:bg-gray-900 dark:text-white;
  }
}

/* ===== PREMIUM ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

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

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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }

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

@keyframes pulse {

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

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }

  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

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

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotate360 {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.8), 0 0 30px rgba(37, 99, 235, 0.4);
  }
}

/* Premium Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-down {
  animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-up {
  animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-shimmer {
  animation: shimmer 2s infinite;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.2) 20%,
      rgba(255, 255, 255, 0.5) 60%,
      rgba(255, 255, 255, 0));
  background-size: 200% 100%;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-rotate {
  animation: rotate360 2s linear infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* Hover Animations */
.hover-glow:hover {
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
  transition: box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
  transform: rotate(5deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered animations */
.animate-delay-100 {
  animation-delay: 100ms;
}

.animate-delay-200 {
  animation-delay: 200ms;
}

.animate-delay-300 {
  animation-delay: 300ms;
}

.animate-delay-400 {
  animation-delay: 400ms;
}

.animate-delay-500 {
  animation-delay: 500ms;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Focus indicators */
.focus-ring:focus {
  @apply outline-none ring-2 ring-primary-500 ring-offset-2;
}

.focus-ring-dark:focus {
  @apply outline-none ring-2 ring-primary-400 ring-offset-2 ring-offset-gray-800;
}

/* Screen reader only content */
.sr-only {
  @apply absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0;
  clip: rect(0, 0, 0, 0);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    @apply border-2 border-white;
  }

  .form-input {
    @apply border-2;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .card {
    @apply shadow-none border border-gray-300;
  }

  .btn {
    @apply border border-gray-300 bg-white text-black;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  @apply bg-gray-100 dark:bg-gray-700 rounded-full;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  @apply bg-gray-300 dark:bg-gray-600 rounded-full;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-400 dark:bg-gray-500;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ===== UTILITY CLASSES ===== */
.text-readable {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-contrast-high {
  color: #1f2937;
}

.text-contrast-medium {
  color: #4b5563;
}

.text-contrast-low {
  color: #6b7280;
}

.link-readable {
  color: var(--r-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.link-readable:hover {
  color: var(--r-primary-hover);
  text-decoration-thickness: 2px;
}

/* ===== FORM SPECIFIC IMPROVEMENTS ===== */
.form-group {
  @apply mb-6;
}

.form-error-message {
  @apply text-red-600 dark:text-red-400 text-sm mt-1 flex items-center;
}

.form-success-message {
  @apply text-green-600 dark:text-green-400 text-sm mt-1 flex items-center;
}

.form-help-text {
  @apply text-gray-500 dark:text-gray-400 text-sm mt-1;
}

/* ===== JOB FORM SPECIFIC STYLES ===== */
.job-form-container {
  @apply max-w-4xl mx-auto;
}

.job-form-section {
  @apply mb-8 p-6 bg-white dark:bg-gray-800 rounded-xl shadow-soft border border-gray-200 dark:border-gray-700;
}

.job-form-section-title {
  @apply text-lg font-semibold text-gray-900 dark:text-white mb-4 flex items-center;
}

.job-form-section-icon {
  @apply mr-2 text-primary-600;
}

/* ===== RESPONSIVE TABLE IMPROVEMENTS ===== */
@media (max-width: 640px) {
  .table-responsive {
    @apply text-xs;
  }

  .table th,
  .table td {
    @apply px-2 py-2;
  }

  /* Hide less important columns on mobile */
  .table .mobile-hide {
    @apply hidden;
  }
}

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

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

.skeleton-text {
  @apply h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse;
}

.skeleton-avatar {
  @apply w-10 h-10 bg-gray-200 dark:bg-gray-700 rounded-full animate-pulse;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

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

.page-content {
  animation: fadeIn 0.3s ease-out;
}

/* ===== ERROR STATES ===== */
.error-state {
  @apply text-center py-12;
}

.error-icon {
  @apply w-16 h-16 mx-auto mb-4 text-red-500;
}

.error-title {
  @apply text-lg font-semibold text-gray-900 dark:text-white mb-2;
}

.error-message {
  @apply text-gray-600 dark:text-gray-400 mb-4;
}

/* ===== SUCCESS STATES ===== */
.success-state {
  @apply text-center py-12;
}

.success-icon {
  @apply w-16 h-16 mx-auto mb-4 text-green-500;
}

.success-title {
  @apply text-lg font-semibold text-gray-900 dark:text-white mb-2;
}

.success-message {
  @apply text-gray-600 dark:text-gray-400 mb-4;
}

/* ===== EMPTY STATES ===== */
.empty-state {
  @apply text-center py-12;
}

.empty-icon {
  @apply w-16 h-16 mx-auto mb-4 text-gray-400;
}

.empty-title {
  @apply text-lg font-semibold text-gray-900 dark:text-white mb-2;
}

.empty-message {
  @apply text-gray-600 dark:text-gray-400 mb-4;
}

/* ===== HEADER & NAVIGATION ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

[x-cloak] {
  display: none !important;
}

nav[data-header] {
  position: relative;
  overflow: visible;
  backdrop-filter: blur(18px);
  --header-text-color: rgba(255, 255, 255, 0.92);
  --header-chip-bg: rgba(255, 255, 255, 0.16);
  --header-chip-border: rgba(255, 255, 255, 0.28);
  --header-chip-text: rgba(255, 255, 255, 0.92);
  --header-quick-bg: rgba(255, 255, 255, 0.16);
  --header-quick-border: rgba(255, 255, 255, 0.28);
  --header-quick-text: rgba(255, 255, 255, 0.95);
  --header-search-bg: rgba(15, 23, 42, 0.22);
  --header-search-border: rgba(255, 255, 255, 0.32);
  --header-search-text: rgba(255, 255, 255, 0.96);
  --header-search-placeholder: rgba(255, 255, 255, 0.65);
  --module-chip-bg: rgba(255, 255, 255, 0.16);
  --module-chip-border: rgba(255, 255, 255, 0.28);
  --module-chip-text: rgba(255, 255, 255, 0.86);
  --module-chip-active-bg: rgba(255, 255, 255, 0.98);
  --module-chip-active-text: var(--r-text-primary);
  --module-chip-shadow: rgba(15, 23, 42, 0.18);
}

.header-shell {
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

nav[data-header] .header-top {
  transition: padding 0.3s ease;
}

nav[data-header] .logo-title {
  transition: transform 0.3s ease, font-size 0.3s ease;
  color: var(--header-text-color);
}

nav[data-header] .status-badges .status-chip {
  background: var(--header-chip-bg);
  border-color: var(--header-chip-border);
  color: var(--header-chip-text);
}

nav[data-header] .status-badges .status-chip i {
  color: inherit;
}

nav[data-header] .header-search-input {
  background: var(--header-search-bg);
  border-color: var(--header-search-border);
  color: var(--header-search-text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

nav[data-header] .header-search-input::placeholder {
  color: var(--header-search-placeholder);
}

nav[data-header] .header-search-input:hover {
  background: rgba(255, 255, 255, 0.22);
}

nav[data-header].is-compact .header-top {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

nav[data-header].is-compact .logo-title {
  font-size: 0.95rem;
}

nav[data-header].is-compact .quick-action-btn {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* STANDARDIZED: Tablet breakpoint (640px-1024px) */
@media (min-width: 640px) and (max-width: 1023px) {
  .quick-action-btn {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
  }
}

@media (max-width: 640px) {
  .header-actions__primary {
    width: 100%;
  }

  .quick-action-btn {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    box-shadow: none;
  }
}

nav[data-header].mode-operations {
  --header-quick-bg: rgba(59, 130, 246, 0.18);
  --header-quick-border: rgba(59, 130, 246, 0.32);
  --header-quick-text: #f5f9ff;
  --module-chip-active-text: var(--r-primary-hover);
  --module-chip-shadow: rgba(59, 130, 246, 0.25);
  background-image: linear-gradient(135deg, var(--r-primary), var(--r-primary-hover));
}

nav[data-header].mode-management {
  --header-chip-bg: rgba(59, 130, 246, 0.20);
  --header-chip-border: rgba(16, 185, 129, 0.35);
  --header-chip-text: #ecfdf5;
  --header-quick-bg: rgba(16, 185, 129, 0.22);
  --header-quick-border: rgba(16, 185, 129, 0.38);
  --header-quick-text: #ecfdf5;
  --header-search-bg: rgba(15, 118, 110, 0.28);
  --header-search-border: rgba(59, 130, 246, 0.28);
  --module-chip-bg: rgba(16, 185, 129, 0.20);
  --module-chip-border: rgba(99, 102, 241, 0.32);
  --module-chip-text: rgba(236, 253, 245, 0.92);
  --module-chip-active-text: #0f766e;
  --module-chip-shadow: rgba(16, 185, 129, 0.25);
  background-image: linear-gradient(135deg, #6366f1, #10b981);
}

nav[data-header].mode-resident {
  --header-chip-bg: rgba(99, 102, 241, 0.18);
  --header-chip-border: rgba(45, 212, 191, 0.32);
  --header-chip-text: rgba(240, 253, 250, 0.95);
  --header-quick-bg: rgba(56, 189, 248, 0.22);
  --header-quick-border: rgba(56, 189, 248, 0.36);
  --header-quick-text: #f0f9ff;
  --header-search-bg: rgba(49, 196, 141, 0.24);
  --header-search-border: rgba(59, 130, 246, 0.28);
  --module-chip-bg: rgba(49, 196, 141, 0.22);
  --module-chip-border: rgba(99, 102, 241, 0.38);
  --module-chip-text: rgba(240, 253, 250, 0.92);
  --module-chip-active-text: #0ea5e9;
  --module-chip-shadow: rgba(59, 130, 246, 0.24);
  background-image: linear-gradient(115deg, #5c83ff 0%, #68cfff 48%, #60f5c3 100%);
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid var(--header-quick-border, rgba(59, 130, 246, 0.22));
  background: var(--header-quick-bg, rgba(59, 130, 246, 0.12));
  color: var(--header-quick-text, var(--r-primary-hover));
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.quick-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

.quick-action-btn i {
  color: inherit;
}

.quick-action-btn.variant-operations {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(59, 130, 246, 0.82));
  border-color: rgba(59, 130, 246, 0.65);
  color: #f8fbff;
}

.quick-action-btn.variant-operations:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(37, 99, 235, 0.9));
}

.quick-action-btn.variant-management {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.88), rgba(16, 185, 129, 0.9));
  border-color: rgba(16, 185, 129, 0.55);
  color: #f6fffb;
}

.quick-action-btn.variant-management:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 1), rgba(16, 185, 129, 1));
}

a.quick-action-btn--reset,
.quick-action-btn.quick-action-btn--reset,
.quick-action-btn--reset {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.4), rgba(148, 163, 184, 0.35)) !important;
  border: 1.5px solid rgba(100, 116, 139, 0.6) !important;
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  font-weight: 500 !important;
}

a.quick-action-btn--reset:hover,
.quick-action-btn.quick-action-btn--reset:hover,
.quick-action-btn--reset:hover {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.5), rgba(148, 163, 184, 0.45)) !important;
  border-color: rgba(100, 116, 139, 0.7) !important;
  color: var(--r-text-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

a.quick-action-btn--reset i,
.quick-action-btn.quick-action-btn--reset i,
.quick-action-btn--reset i {
  color: inherit !important;
}

.dark a.quick-action-btn--reset,
.dark .quick-action-btn.quick-action-btn--reset,
.dark .quick-action-btn--reset {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(100, 116, 139, 0.4)) !important;
  border-color: rgba(100, 116, 139, 0.6) !important;
  color: var(--r-border-color) !important;
  box-shadow: 0 2px 4px rgba(71, 85, 105, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.dark a.quick-action-btn--reset:hover,
.dark .quick-action-btn.quick-action-btn--reset:hover,
.dark .quick-action-btn--reset:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.6), rgba(100, 116, 139, 0.5)) !important;
  border-color: rgba(100, 116, 139, 0.7) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 8px rgba(71, 85, 105, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid var(--header-chip-border, rgba(59, 130, 246, 0.22));
  background: var(--header-chip-bg, rgba(59, 130, 246, 0.12));
  color: var(--header-chip-text, var(--r-primary-hover));
  font-weight: 500;
}

.mode-badge {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-health {
  color: #4b5563;
}

.mode-switcher__option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  transition: all 0.2s ease;
}

.mode-switcher__option i {
  font-size: 0.75rem;
  opacity: 0.85;
}

.mode-switcher__option:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.16);
}

.mode-switcher__option.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--r-primary-hover);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
}

nav[data-header].mode-management .mode-switcher__option.is-active {
  color: #047857;
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.32);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  color: rgba(59, 72, 98, 0.88);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--r-primary-hover);
}

.nav-link i {
  margin-right: 0.35rem;
}

.mobile-nav {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(22px);
}

nav[data-header].mode-management .mobile-nav {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.92), rgba(16, 185, 129, 0.9));
}

:root {
  /* Fluid Typography - Responsive font sizes (Mobile-first) */
  --fluid-h1: clamp(1.5rem, 4vw + 1rem, 2.5rem);
  /* 24px - 40px */
  --fluid-h2: clamp(1.25rem, 3vw + 0.75rem, 2rem);
  /* 20px - 32px */
  --fluid-h3: clamp(1.125rem, 2vw + 0.5rem, 1.5rem);
  /* 18px - 24px */
  --fluid-body: clamp(0.875rem, 1vw + 0.5rem, 1rem);
  /* 14px - 16px */
  --fluid-kpi: clamp(1.75rem, 4vw + 0.75rem, 3rem);
  /* 28px - 48px */
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-glass-dark: rgba(15, 23, 42, 0.72);
}

.fluid-h1 {
  font-size: var(--fluid-h1);
  line-height: 1.2;
  font-weight: 700;
}

.fluid-h2 {
  font-size: var(--fluid-h2);
  line-height: 1.25;
  font-weight: 600;
}

.fluid-h3 {
  font-size: var(--fluid-h3);
  line-height: 1.3;
  font-weight: 600;
}

.fluid-body {
  font-size: var(--fluid-body);
  line-height: 1.6;
}

.fluid-kpi {
  font-size: var(--fluid-kpi);
  line-height: 1.1;
  font-weight: 700;
}

.dashboard-hero {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(16, 185, 129, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.16);
  backdrop-filter: blur(24px);
  border-radius: 1.75rem;
  padding: 1.75rem;
}

.dashboard-hero__context {
  display: grid;
  gap: 1rem;
}

.dashboard-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-card {
  border-radius: 1.5rem;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(30px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .kpi-card {
    padding: 1.25rem;
    gap: 0.625rem;
  }
}

@media (min-width: 1280px) {
  .kpi-card {
    padding: 1.5rem;
    gap: 0.75rem;
  }
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.dark .kpi-card {
  background: var(--surface-glass-dark);
  border-color: rgba(15, 23, 42, 0.45);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* KPI Card Color Variants - Premium UI */
.kpi-card--indigo {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
  border-color: rgba(99, 102, 241, 0.2);
}

.kpi-card--indigo::before {
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

.dark .kpi-card--indigo {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border-color: rgba(99, 102, 241, 0.25);
}

.kpi-card--emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
  border-color: rgba(16, 185, 129, 0.2);
}

.kpi-card--emerald::before {
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

.dark .kpi-card--emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
  border-color: rgba(16, 185, 129, 0.25);
}

.kpi-card--rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08), rgba(225, 29, 72, 0.05));
  border-color: rgba(244, 63, 94, 0.2);
}

.kpi-card--rose::before {
  background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.4), transparent);
}

.dark .kpi-card--rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(225, 29, 72, 0.08));
  border-color: rgba(244, 63, 94, 0.25);
}

.kpi-card--sky {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(2, 132, 199, 0.05));
  border-color: rgba(14, 165, 233, 0.2);
}

.kpi-card--sky::before {
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.4), transparent);
}

.dark .kpi-card--sky {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 132, 199, 0.08));
  border-color: rgba(14, 165, 233, 0.25);
}

.kpi-card--emerald-alt {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
  border-color: rgba(16, 185, 129, 0.2);
}

.kpi-card--emerald-alt::before {
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

.dark .kpi-card--emerald-alt {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
  border-color: rgba(16, 185, 129, 0.25);
}

.kpi-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
  .kpi-label {
    font-size: 0.7rem;
  }
}

@media (min-width: 1280px) {
  .kpi-label {
    font-size: 0.75rem;
  }
}

/* KPI Value - Optimized font sizes with better readability */
.kpi-value {
  font-size: clamp(1.5rem, 4vw + 0.5rem, 2.75rem);
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .kpi-value {
    font-size: clamp(1.75rem, 3.5vw + 0.75rem, 2.75rem);
  }
}

.kpi-value-money {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: clamp(1.5rem, 4vw + 0.5rem, 2.75rem);
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .kpi-value-money {
    font-size: clamp(1.75rem, 3.5vw + 0.75rem, 2.75rem);
  }
}

.kpi-amount {
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
}

.kpi-currency {
  font-size: 0.7em;
  line-height: 1;
  opacity: 0.95;
  vertical-align: baseline;
  font-weight: 600;
  margin-left: 0.05em;
}

/* Stat chip money formatting */
.stat-money {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
  white-space: nowrap;
  font-weight: 600;
}

.stat-currency {
  font-size: 0.9em;
  line-height: 1;
  opacity: 0.95;
  font-weight: 600;
}

.mobile-card-stack {
  display: grid;
  gap: 0.75rem;
}

.mobile-card {
  position: relative;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
  display: grid;
  gap: 0.65rem;
  overflow: visible;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (max-width: 640px) {
  .mobile-card {
    padding: 1rem 0.875rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.mobile-card::after {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  height: 140px;
  width: 140px;
  border-radius: 999px;
  opacity: 0.6;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.16), transparent 65%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}

.mobile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.14);
}

.mobile-card--sky::after {
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), transparent 68%);
}

.mobile-card--emerald::after {
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.22), transparent 68%);
}

.mobile-card--rose::after {
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.22), transparent 68%);
}

.mobile-card--amber::after {
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 68%);
}

.dark .mobile-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(15, 23, 42, 0.6);
}

.mobile-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.mobile-card__avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.92), rgba(148, 163, 184, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mobile-card--sky .mobile-card__avatar {
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.92), rgba(59, 130, 246, 0.35));
  color: rgba(30, 64, 175, 0.92);
}

.mobile-card--emerald .mobile-card__avatar {
  background: linear-gradient(135deg, rgba(167, 243, 208, 0.92), rgba(16, 185, 129, 0.35));
  color: rgba(6, 95, 70, 0.92);
}

.mobile-card--rose .mobile-card__avatar {
  background: linear-gradient(135deg, rgba(252, 165, 165, 0.92), rgba(244, 63, 94, 0.35));
  color: rgba(136, 19, 55, 0.92);
}

.mobile-card--amber .mobile-card__avatar {
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.92), rgba(245, 158, 11, 0.35));
  color: rgba(120, 53, 15, 0.92);
}

.dark .mobile-card__avatar {
  color: rgba(226, 232, 240, 0.9);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.25);
}

.mobile-card__headline {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}

.mobile-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: rgba(15, 23, 42, 0.94);
}

.mobile-card__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: rgba(100, 116, 139, 0.95);
}

.mobile-card__subtitle i {
  font-size: 0.7rem;
  opacity: 0.75;
}

.dark .mobile-card__name {
  color: rgba(226, 232, 240, 0.95);
}

.dark .mobile-card__subtitle {
  color: rgba(148, 163, 184, 0.9);
}

.mobile-card__timestamp {
  margin-left: auto;
  font-size: 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-card__timestamp-wrapper {
  flex-shrink: 0;
  width: 100%;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .mobile-card__header {
    flex-wrap: nowrap;
    position: relative;
    margin-right: 0;
    margin-left: 0;
    width: 100%;
  }

  .mobile-card__timestamp-wrapper {
    width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 0.5rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    max-width: 100%;
    order: 2;
  }

  .mobile-card__timestamp {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: inline-flex;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .mobile-card__headline {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .mobile-card__avatar {
    flex-shrink: 0;
  }

  .mobile-card__tags {
    order: 3;
  }
}

.mobile-card__timestamp i {
  font-size: 0.7rem;
}

.mobile-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.6);
}

.dark .mobile-card__meta {
  color: rgba(226, 232, 240, 0.7);
}

.mobile-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.75rem;
  background: rgba(148, 163, 184, 0.14);
  color: inherit;
}

.mobile-card--sky .mobile-card__meta span {
  background: rgba(125, 211, 252, 0.18);
  color: rgba(30, 64, 175, 0.9);
}

.mobile-card--emerald .mobile-card__meta span {
  background: rgba(134, 239, 172, 0.18);
  color: rgba(6, 95, 70, 0.9);
}

.mobile-card--rose .mobile-card__meta span {
  background: rgba(252, 165, 165, 0.18);
  color: rgba(136, 19, 55, 0.9);
}

.mobile-card--amber .mobile-card__meta span {
  background: rgba(253, 224, 71, 0.2);
  color: rgba(120, 53, 15, 0.9);
}

.dark .mobile-card__meta span {
  background: rgba(71, 85, 105, 0.35);
  color: rgba(226, 232, 240, 0.85);
}

.mobile-card__meta span i {
  font-size: 0.75rem;
  opacity: 0.75;
}

.mobile-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mobile-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.2rem;
}

.mobile-card__footer button,
.mobile-card__footer a {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4338ca;
}

.dark .mobile-card__footer button,
.dark .mobile-card__footer a {
  color: #818cf8;
}

.mobile-card__footer button:hover,
.mobile-card__footer a:hover {
  text-decoration: underline;
}

.mobile-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.85rem;
  background: rgba(148, 163, 184, 0.16);
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.75);
}

.mobile-card--sky .mobile-card__tag {
  background: rgba(125, 211, 252, 0.18);
  color: rgba(30, 64, 175, 0.9);
}

.mobile-card--emerald .mobile-card__tag {
  background: rgba(134, 239, 172, 0.18);
  color: rgba(6, 95, 70, 0.92);
}

.mobile-card--rose .mobile-card__tag {
  background: rgba(252, 165, 165, 0.2);
  color: rgba(136, 19, 55, 0.9);
}

.mobile-card--amber .mobile-card__tag {
  background: rgba(253, 224, 71, 0.22);
  color: rgba(120, 53, 15, 0.9);
}

.dark .mobile-card__tag {
  background: rgba(71, 85, 105, 0.35);
  color: rgba(226, 232, 240, 0.88);
}

.mobile-card__tag i {
  font-size: 0.78rem;
  opacity: 0.8;
}

.mobile-card__title {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.dark .mobile-card__title {
  color: rgba(226, 232, 240, 0.92);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(59, 130, 246, 0.12);
  color: var(--r-primary-hover);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.stat-chip:hover {
  background: rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.dark .stat-chip {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.2);
}

.dark .stat-chip:hover {
  background: rgba(96, 165, 250, 0.18);
}

/* Portal Invite Card - Desktop View */
.portal-invite-card {
  position: relative;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.portal-invite-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.portal-invite-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.portal-invite-card:hover::before {
  opacity: 1;
}

.dark .portal-invite-card {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(15, 23, 42, 0.4);
}

.dark .portal-invite-card:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(14, 165, 233, 0.3);
}

.portal-invite-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(30, 64, 175, 0.95);
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(59, 130, 246, 0.4));
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.portal-invite-avatar--sky {
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(59, 130, 246, 0.4));
  color: rgba(30, 64, 175, 0.95);
}

.dark .portal-invite-avatar {
  color: rgba(191, 219, 254, 0.95);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(15, 23, 42, 0.3);
}

.dark .portal-invite-avatar--sky {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.4), rgba(59, 130, 246, 0.25));
}

/* Section Header Link - Premium Design */
a.section-header-link,
.section-header-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #4f46e5 !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.625rem !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08)) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
}

a.section-header-link::before,
.section-header-link::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  transition: left 0.5s ease !important;
  z-index: 1 !important;
}

a.section-header-link:hover::before,
.section-header-link:hover::before {
  left: 100% !important;
}

a.section-header-link:hover,
.section-header-link:hover {
  color: #4338ca !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12)) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25), 0 2px 4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

a.section-header-link:active,
.section-header-link:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

a.section-header-link::after,
.section-header-link::after {
  content: '→' !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  margin-left: 0.125rem !important;
  transition: transform 0.25s ease !important;
  position: relative !important;
  z-index: 2 !important;
}

a.section-header-link:hover::after,
.section-header-link:hover::after {
  transform: translateX(2px) !important;
}

.dark a.section-header-link,
.dark .section-header-link {
  color: #a5b4fc !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15)) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.dark a.section-header-link::before,
.dark .section-header-link::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
}

.dark a.section-header-link:hover,
.dark .section-header-link:hover {
  color: #c7d2fe !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2)) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), 0 2px 4px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0));
  margin: 2rem 0;
}

.mobile-card-grid {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .mobile-card-grid {
    padding: 0.5rem 0.75rem !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .mobile-card-grid.px-0 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

.mobile-card-grid .mobile-card__meta {
  font-size: 0.72rem;
}

.pill-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: 0.72rem;
  font-weight: 600;
}

.dark .pill-indicator {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.pill-indicator--warning {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

.dark .pill-indicator--warning {
  background: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

.pill-indicator--success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-sizing: border-box;
}

.dark .pill-indicator--success {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.25);
}

@media (max-width: 640px) {
  .pill-indicator--success.mobile-card__timestamp {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.pill-indicator--info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--r-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.dark .pill-indicator--info {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.25);
}

.mobile-nav__section {
  margin-top: 0.75rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-nav__section:first-of-type {
  margin-top: 0;
}

.mobile-nav__section[open] .mobile-nav__section-trigger {
  background: rgba(255, 255, 255, 0.18);
}

.mobile-nav__section-trigger {
  cursor: pointer;
  font-weight: 600;
}

.mobile-nav__section-trigger::-webkit-details-marker {
  display: none;
}

.mobile-nav__section-trigger i {
  transition: transform 0.2s ease;
}

.mobile-nav__section[open] .mobile-nav__section-trigger i {
  transform: rotate(180deg);
}

.mobile-nav__section-body {
  padding-bottom: 0.5rem;
}

.mobile-nav__link--static {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.mobile-nav__link--static i {
  color: inherit;
}

.mobile-nav__parent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin: 0.35rem 0.15rem 0.25rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.mobile-nav__parent-link:hover {
  color: rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav__parent-link--active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--r-primary-hover);
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.28);
}

.mobile-nav__group-heading {
  margin: 0.5rem 0 0.25rem 1.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.mobile-nav__link,
.mobile-nav__sublink {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 0.9rem;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.88);
}

.mobile-nav__link {
  padding: 0.55rem 0.9rem;
  font-size: 1rem;
}

.mobile-nav__sublink {
  padding: 0.45rem 0.9rem 0.45rem 1.45rem;
  font-size: 0.95rem;
}

.mobile-nav__link:hover,
.mobile-nav__sublink:hover {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.98);
}

.mobile-nav__link--active,
.mobile-nav__sublink.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--r-primary-hover);
  font-weight: 600;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.32);
}

nav[data-header].mode-management .mobile-nav__link--active,
nav[data-header].mode-management .mobile-nav__sublink.is-active {
  color: #047857;
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.32);
}

.mobile-nav__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0.75rem 0;
  border-radius: 999px;
}

.footer-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.dark .footer-status-chip {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.notif-item {
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.notif-item:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.notif-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.85);
  color: var(--r-primary-hover);
}

.dark .notif-pill {
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

.hide-scrollbar {
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* STANDARDIZED: Tablet breakpoint */
@media (max-width: 1023px) {
  nav[data-header] .status-badges {
    width: 100%;
    order: 3;
    justify-content: flex-start;
    gap: 0.4rem;
  }
}

/* STANDARDIZED: Tablet breakpoint - hide search on smaller tablets */
@media (max-width: 1023px) {

  .header-search,
  .header-search * {
    position: relative !important;
    z-index: 10002 !important;
    overflow: visible !important;
  }

  .header-search {
    display: none;
  }

  nav[data-header] .hide-scrollbar>a,
  nav[data-header] .hide-scrollbar>button,
  nav[data-header] [data-dropdown]>button {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    gap: 0.35rem;
    font-size: 0.9rem;
  }

  nav[data-header] .hide-scrollbar {
    gap: 0.4rem;
  }
}

/* STANDARDIZED: Mobile breakpoint */
@media (max-width: 639px) {
  nav[data-header] .header-top .flex.flex-wrap.items-center.justify-end {
    gap: 0.75rem;
  }
}

/* Section Header Link - Force Override (High Specificity) */
section a.section-header-link,
section .section-header-link,
div a.section-header-link,
div .section-header-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #4f46e5 !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.625rem !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08)) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
}

section a.section-header-link::before,
section .section-header-link::before,
div a.section-header-link::before,
div .section-header-link::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  transition: left 0.5s ease !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

section a.section-header-link:hover::before,
section .section-header-link:hover::before,
div a.section-header-link:hover::before,
div .section-header-link:hover::before {
  left: 100% !important;
}

section a.section-header-link:hover,
section .section-header-link:hover,
div a.section-header-link:hover,
div .section-header-link:hover {
  color: #4338ca !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12)) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25), 0 2px 4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

section a.section-header-link:active,
section .section-header-link:active,
div a.section-header-link:active,
div .section-header-link:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

section a.section-header-link::after,
section .section-header-link::after,
div a.section-header-link::after,
div .section-header-link::after {
  content: '→' !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  margin-left: 0.125rem !important;
  transition: transform 0.25s ease !important;
  position: relative !important;
  z-index: 2 !important;
}

section a.section-header-link:hover::after,
section .section-header-link:hover::after,
div a.section-header-link:hover::after,
div .section-header-link:hover::after {
  transform: translateX(2px) !important;
}

.dark section a.section-header-link,
.dark section .section-header-link,
.dark div a.section-header-link,
.dark div .section-header-link {
  color: #a5b4fc !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15)) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.dark section a.section-header-link::before,
.dark section .section-header-link::before,
.dark div a.section-header-link::before,
.dark div .section-header-link::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
}

.dark section a.section-header-link:hover,
.dark section .section-header-link:hover,
.dark div a.section-header-link:hover,
.dark div .section-header-link:hover {
  color: #c7d2fe !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2)) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3), 0 2px 4px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Reset Button - Force Override (High Specificity) */
form a.quick-action-btn--reset,
form .quick-action-btn.quick-action-btn--reset,
div a.quick-action-btn--reset,
div .quick-action-btn.quick-action-btn--reset {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.5), rgba(148, 163, 184, 0.45)) !important;
  border: 1.5px solid rgba(100, 116, 139, 0.7) !important;
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

form a.quick-action-btn--reset:hover,
form .quick-action-btn.quick-action-btn--reset:hover,
div a.quick-action-btn--reset:hover,
div .quick-action-btn.quick-action-btn--reset:hover {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.6), rgba(148, 163, 184, 0.55)) !important;
  border-color: rgba(100, 116, 139, 0.8) !important;
  color: var(--r-text-primary) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  opacity: 1 !important;
}

form a.quick-action-btn--reset i,
form .quick-action-btn.quick-action-btn--reset i,
div a.quick-action-btn--reset i,
div .quick-action-btn.quick-action-btn--reset i {
  color: inherit !important;
  opacity: 1 !important;
}

.dark form a.quick-action-btn--reset,
.dark form .quick-action-btn.quick-action-btn--reset,
.dark div a.quick-action-btn--reset,
.dark div .quick-action-btn.quick-action-btn--reset {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.6), rgba(100, 116, 139, 0.5)) !important;
  border-color: rgba(100, 116, 139, 0.7) !important;
  color: var(--r-border-color) !important;
  box-shadow: 0 2px 4px rgba(71, 85, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  opacity: 1 !important;
}

.dark form a.quick-action-btn--reset:hover,
.dark form .quick-action-btn.quick-action-btn--reset:hover,
.dark div a.quick-action-btn--reset:hover,
.dark div .quick-action-btn.quick-action-btn--reset:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.7), rgba(100, 116, 139, 0.6)) !important;
  border-color: rgba(100, 116, 139, 0.8) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 4px 8px rgba(71, 85, 105, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  opacity: 1 !important;
}

/* Footer - Responsive + Layout */
.footer-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  margin-top: auto !important;
  position: relative !important;
  clear: both !important;
  flex-shrink: 0 !important;
  z-index: 1 !important;
  overflow-x: hidden !important;
  /* CRITICAL: Force gradient background - override any white background */
  background: linear-gradient(to right, #1e3a8a, var(--r-primary-text), #1e3a8a) !important;
  background-color: transparent !important;
  color: #ffffff !important;
}

.footer-container .footer-inner {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* CRITICAL: Force all footer text to white - override any inherited colors */
.footer-container,
.footer-container *,
.footer-container h1,
.footer-container h2,
.footer-container h3,
.footer-container h4,
.footer-container h5,
.footer-container h6,
.footer-container p,
.footer-container span,
.footer-container a,
.footer-container li,
.footer-container div {
  color: #ffffff !important;
}

.footer-container a {
  color: rgba(255, 255, 255, 0.9) !important;
}

.footer-container a:hover {
  color: #ffffff !important;
}

@media (min-width: 640px) {
  .footer-container .footer-inner {
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (min-width: 1024px) {
  .footer-container .footer-inner {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

.footer-container .footer-grid {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2rem !important;
  overflow-x: hidden !important;
}

@media (max-width: 1023px) {
  .footer-container .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 639px) {

  /* Force footer to full viewport width - break out of any container */
  html,
  html body {
    overflow-x: hidden !important;
  }

  html body>footer.footer-container,
  body>footer.footer-container,
  main+footer.footer-container,
  footer.footer-container {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    /* CRITICAL: Force gradient background on mobile too */
    background: linear-gradient(to right, #1e3a8a, var(--r-primary-text), #1e3a8a) !important;
    background-color: transparent !important;
    color: #ffffff !important;
  }

  /* Ensure footer inner doesn't add extra width or padding */
  .footer-container .footer-inner {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    box-sizing: border-box !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
  }

  /* Force grid to full width on mobile */
  .footer-container .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
  }

  .footer-container .footer-grid>div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  .footer-container .footer-grid>div>* {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  .footer-container .footer-grid ul,
  .footer-container .footer-grid li,
  .footer-container .footer-grid a,
  .footer-container .footer-grid span,
  .footer-container .footer-grid p {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
}

.footer-meta {
  width: 100% !important;
}

.footer-metrics .footer-status-chip {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.dark .footer-metrics .footer-status-chip {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.footer-links a {
  position: relative;
}

.footer-links a:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.7);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Prevent horizontal scroll on all viewports */
html,
body {
  overflow-x: hidden !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100vw;
}

* {
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

/* Operations Dashboard - 2 Column Grid KPI Cards */
.grid.grid-cols-2>div {
  min-height: 0;
}

/* Ensure KPI cards have equal height in 2-column grid */
.grid.grid-cols-2 .bg-white,
.grid.grid-cols-2 .dark\:bg-gray-800 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Responsive font sizes for 2-column grid */
@media (max-width: 639px) {
  .grid.grid-cols-2 .text-2xl {
    font-size: 1.5rem !important;
    line-height: 1.75rem !important;
  }

  .grid.grid-cols-2 .text-3xl {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }

  .grid.grid-cols-2 .text-4xl {
    font-size: 2rem !important;
    line-height: 2.25rem !important;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .grid.grid-cols-2 .text-2xl {
    font-size: 1.875rem !important;
    line-height: 2.25rem !important;
  }

  .grid.grid-cols-2 .text-3xl {
    font-size: 2.25rem !important;
    line-height: 2.5rem !important;
  }

  .grid.grid-cols-2 .text-4xl {
    font-size: 2.5rem !important;
    line-height: 3rem !important;
  }
}

/* Dashboard mobile card spacing - FIX for test */
.dashboard-grid,
[class*='grid'][class*='gap'] {
  gap: 1rem !important;
  /* 16px minimum spacing */
}

@media (max-width: 640px) {

  .dashboard-grid,
  [class*='grid'][class*='gap'] {
    gap: 1rem !important;
    /* Ensure 16px spacing on mobile */
  }
}

/* Prevent horizontal scroll on all elements - FIX for edge cases */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Long Turkish words - word break */
p,
span,
div,
h1,
h2,
h3,
h4,
h5,
h6,
td,
th,
li {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Very small viewports (320px) */
@media (max-width: 320px) {
  * {
    max-width: 100vw !important;
  }
}

/* ===== FOOTER SOCIAL MEDIA ICONS ===== */
/* Social media icon container styling */
.footer-accordion .flex.items-center.gap-2\.5 {
  gap: 0.625rem !important;
  justify-content: flex-start !important;
}

/* Social media icon buttons - responsive and symmetric */
.footer-social-icon {
  min-width: 36px !important;
  min-height: 36px !important;
  width: 36px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
  background: rgba(255, 255, 255, 0.1) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  flex-shrink: 0 !important;
  position: relative !important;
}

.footer-social-icon:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.footer-social-icon:active {
  transform: translateY(0) scale(1) !important;
}

.footer-social-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5) !important;
  outline-offset: 2px !important;
}

/* Icon sizing inside social buttons */
.footer-social-icon i {
  font-size: 0.875rem !important;
  line-height: 1 !important;
  display: inline-block !important;
}

/* Responsive sizing for social icons */
@media (max-width: 639px) {
  .footer-social-icon {
    min-width: 40px !important;
    min-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .footer-social-icon i {
    font-size: 1rem !important;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .footer-social-icon {
    min-width: 38px !important;
    min-height: 38px !important;
    width: 38px !important;
    height: 38px !important;
  }

  .footer-social-icon i {
    font-size: 0.9375rem !important;
  }
}

@media (min-width: 1024px) {
  .footer-social-icon {
    min-width: 36px !important;
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
  }

  .footer-social-icon i {
    font-size: 0.875rem !important;
  }
}

/* ==== Migrated from inline styles (CSP-safe) ==== */
[x-cloak] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  word-break: break-word;
  overflow-wrap: break-word;
}

html {
  overflow-wrap: break-word;
  word-break: break-word;
}

* {
  overflow-wrap: break-word;
}

code,
pre {
  word-break: normal;
  overflow-wrap: normal;
}

nav[data-header] .header-top {
  transition: padding 0.3s ease;
}

nav[data-header] .logo-title {
  transition: transform 0.3s ease, font-size 0.3s ease;
}

nav[data-header].is-compact .header-top {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

nav[data-header].is-compact .logo-title {
  font-size: 0.95rem;
}

nav[data-header].is-compact .quick-action-btn {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: rgba(255, 255, 255, 0.98);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}

.quick-action-btn:hover,
.quick-action-btn:focus {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.25);
}

nav[data-header] .quick-action-btn {
  background: var(--header-quick-bg, rgba(59, 130, 246, 0.12));
  border-color: var(--header-quick-border, rgba(59, 130, 246, 0.22));
  color: var(--header-quick-text, var(--r-primary-hover));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

nav[data-header] .quick-action-btn:hover,
nav[data-header] .quick-action-btn:focus {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

.quick-action-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 600;
}

.footer-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: var(--r-text-primary);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.dark .footer-status-chip {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.95);
}

.footer-metrics .footer-status-chip {
  border-color: rgba(37, 99, 235, 0.35) !important;
  background: rgba(37, 99, 235, 0.12) !important;
  color: rgba(15, 23, 42, 0.95) !important;
}

.dark .footer-metrics .footer-status-chip {
  border-color: rgba(148, 163, 184, 0.55) !important;
  background: rgba(148, 163, 184, 0.18) !important;
  color: rgba(226, 232, 240, 0.98) !important;
}

.header-search-input {
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .grid.grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

.grid.grid-cols-3>div {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

button[data-shortcut="next-monday"],
button[data-shortcut="next-week"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.responsive-table {
  overflow-x: auto;
}

.responsive-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.responsive-table th {
  padding: 1rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  color: #475569;
  border-bottom: 1px solid #e5e7eb;
}

.dark .responsive-table th {
  color: #d1d5db;
  border-color: #374151;
}

.responsive-table td {
  padding: 1rem 0.75rem;
  white-space: nowrap;
  font-size: 0.875rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .responsive-table td {
  border-color: #374151;
}

.responsive-table .action-buttons {
  display: flex;
  gap: 0.5rem;
}

.responsive-table .action-button {
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.responsive-form {
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
  background: #fff;
}

.dark .responsive-form {
  border-color: #374151;
  background: #1f2937;
}

.responsive-form .form-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .responsive-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .responsive-form .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.responsive-form .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  background: #fff;
  color: #111827;
  transition: all 0.2s ease;
}

.dark .responsive-form .form-input {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.responsive-form .form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
  border-color: #3b82f6;
}

.responsive-form .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.dark .responsive-form .form-label {
  color: #d1d5db;
}

.responsive-form .form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--r-primary);
  color: #fff;
  font-weight: 700;
  transition: all 0.2s ease;
}

.responsive-form .form-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.responsive-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
  padding: 1rem;
}

.dark .responsive-card {
  background: #1f2937;
  border-color: #374151;
}

.responsive-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.responsive-card-icon {
  flex-shrink: 0;
  padding: 0.5rem;
  background: #dbeafe;
  border-radius: 0.5rem;
  margin-right: 0.75rem;
}

.dark .responsive-card-icon {
  background: rgba(37, 99, 235, 0.15);
}

.responsive-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.dark .responsive-card-title {
  color: #f9fafb;
}

.responsive-grid,
.responsive-grid-2,
.responsive-grid-3,
.responsive-grid-4 {
  display: grid;
  gap: 1rem;
}

.responsive-grid-2 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.responsive-grid-3 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.responsive-grid-4 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .responsive-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .responsive-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .responsive-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.responsive-text-xs {
  font-size: 0.75rem;
}

/* ===== CSP-SAFE UTILITY CLASSES FOR LAYOUT GLOBALS ===== */
/* These classes replace inline style writes to comply with strict CSP */

/* Modal/Dialog visibility */
.modal-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.modal-visible {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 10000 !important;
}

#toast-container {
  z-index: 10000 !important;
}

.fixed.top-4.right-4.z-50 {
  z-index: 10000 !important;
}

/* Dropdown positioning and visibility */
.dropdown-positioned {
  position: fixed !important;
  z-index: 9999 !important;
  top: var(--dropdown-top, auto) !important;
  left: var(--dropdown-left, auto) !important;
}

.dropdown-visible {
  display: block !important;
}

.dropdown-hidden {
  display: none !important;
}

/* ===== FORM VALIDATION STYLES (moved from form-validation.php for CSP compliance) ===== */
.field-error {
  font-size: 0.875rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.field-error::before {
  content: '';
  margin-right: 0;
}

.field-error:empty {
  display: none !important;
}

.form-hint {
  font-size: 0.875rem;
}

/* Success checkmark */
.form-group:has(input:not(:invalid):not(:placeholder-shown)) .field-success {
  display: block;
}

.field-success {
  display: none;
  color: #16a34a;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
}

.field-success::before {
  content: "✓ ";
  margin-right: 0.25rem;
  font-weight: 700;
}

/* Required field indicator */
.form-label .required-indicator {
  color: #ef4444;
  margin-left: 0.25rem;
}

/* Character counter */
.char-counter {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  text-align: right;
}

.char-counter.warning {
  color: #d97706;
}

.char-counter.error {
  color: #dc2626;
}

/* Loading state for inputs */
.form-input.loading {
  position: relative;
}

.form-input.loading::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--r-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Validation icon positions */
.form-group {
  position: relative;
}

.validation-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Error icon */
.validation-icon.error {
  color: #ef4444;
}

/* Success icon */
.validation-icon.success {
  color: #22c55e;
}

/* ARIA Live Regions for Screen Readers */
.aria-live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Real-time validation feedback */
.field-error[role="alert"] {
  font-size: 0.875rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {

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

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* Focus visible improvements */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--r-primary);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* ===== DASHBOARD CHART BAR STYLES (CSP-safe) ===== */
.dashboard-chart-bar-container {
  height: 100%;
}

.dashboard-chart-bar {
  height: var(--chart-bar-height, 0px);
}

/* ===== UTILITY CLASSES FOR JS-DRIVEN VISIBILITY (CSP-safe) ===== */
/* Body overflow control for bottom sheet */
.body-overflow-hidden {
  overflow: hidden !important;
}

.is-visible {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.is-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.is-flex-visible {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.is-flex-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Loading indicator visibility */
.loading-indicator-visible {
  display: block !important;
}

.loading-indicator-hidden {
  display: none !important;
}

/* Progress bar width (uses CSS custom property) */
.progress-bar-fill {
  width: var(--progress-width, 0%);
  transition: width 0.3s ease;
}

/* Widget positioning (for dashboard customizer) */
.widget-positioned {
  position: relative !important;
}

.widget-order {
  order: var(--widget-order, 0);
}

/* ===== NOTIFICATION PANEL CSP-SAFE CLASSES ===== */
/* Panel visibility states */
.notification-panel--force-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.notification-panel--force-visible {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Backdrop styles (CSP-safe) */
.notification-panel__backdrop--styled {
  background: linear-gradient(140deg, rgba(236, 72, 153, 0.98) 0%, rgba(147, 51, 234, 0.95) 42%, rgba(59, 130, 246, 0.95) 100%) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
  color: #ffffff !important;
}

/* Border glow styles (CSP-safe) */
.notification-panel__border-glow--visible {
  display: block !important;
  visibility: visible !important;
  opacity: 0.8 !important;
}

/* Header styles (CSP-safe) */
.notification-panel__header--styled {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Footer styles (CSP-safe) */
.notification-panel__footer--styled {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Notification item styles (CSP-safe) */
.notification-item--styled {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 1rem 1.5rem !important;
  margin: 0.5rem 0.75rem !important;
}

/* Icon wrapper styles (CSP-safe) */
.notification-item__icon-wrapper--styled {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%) !important;
  border-radius: 12px !important;
  position: relative !important;
  display: flex !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Badge styles (CSP-safe) */
.notification-item__badge--styled {
  display: inline-flex !important;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
  color: white !important;
  padding: 0.25rem 0.625rem !important;
  border-radius: 9999px !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.responsive-text-sm {
  font-size: 0.875rem;
}

.responsive-text-base {
  font-size: 1rem;
}

.responsive-text-lg {
  font-size: 1.125rem;
}

.responsive-text-xl {
  font-size: 1.25rem;
}

.responsive-p {
  padding: 1rem;
}

.responsive-px {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.responsive-py {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.responsive-mb {
  margin-bottom: 1rem;
}

.responsive-mt {
  margin-top: 1rem;
}

.responsive-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.75rem;
  box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.12);
  transition: all 0.2s ease;
}

.responsive-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

.responsive-button-primary {
  background: var(--r-primary);
  color: #fff;
}

.responsive-button-secondary {
  background: #374151;
  color: #fff;
}

/* ===== FOOTER STYLES (CSP-safe) ===== */
.footer-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 400px !important;
  position: relative !important;
  z-index: 10 !important;
  background: linear-gradient(to right, #1e3a8a, var(--r-primary-text), #1e3a8a) !important;
  background-color: transparent !important;
  color: #ffffff !important;
}

.footer-text-opacity-90 {
  opacity: 0.9 !important;
}

.footer-text-opacity-85 {
  opacity: 0.85 !important;
}

.footer-text-opacity-80 {
  opacity: 0.8 !important;
}

.footer-text-opacity-100 {
  opacity: 1 !important;
}

/* ===== COMPANY SELECTOR STYLES (CSP-safe) ===== */
.company-selector {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22white%22%3E%3Cpath d=%22M7 10l5 5 5-5z%22/%3E%3C/svg%3E') !important;
  background-repeat: no-repeat !important;
  background-position: right 0.25rem center !important;
  background-size: 1em 1em !important;
  padding-right: 1.75rem !important;
}

.company-selector-option {
  background-color: #1e293b !important;
  color: white !important;
}

/* ===== PROGRESS BAR STYLES (CSP-safe) ===== */
.progress-fill {
  width: var(--progress-width, 0%);
}

/* ===== COMMENTS MAX HEIGHT (CSP-safe) ===== */
.comments-container {
  max-height: var(--comments-max-height, 400px);
  overflow-y: auto;
}

.comments-container--dynamic-height {
  max-height: var(--comments-max-height, 400px);
  overflow-y: auto;
}

/* ===== QUICK ACTION RESET BUTTON (CSP-safe) ===== */
.quick-action-reset-styled {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.5), rgba(148, 163, 184, 0.45)) !important;
  border: 1.5px solid rgba(100, 116, 139, 0.7) !important;
  color: #1e293b !important;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  font-weight: 500 !important;
}

/* ===== JOB CHECKBOX VISIBILITY (CSP-safe) ===== */
.job-checkbox.is-hidden {
  display: none !important;
}

.job-checkbox.is-visible {
  display: block !important;
}

.staff-checkbox.is-hidden {
  display: none !important;
}

.staff-checkbox.is-visible {
  display: block !important;
}

/* ===== FORM BUTTON STYLES (CSP-safe) ===== */

.form-button-text-white {
  color: white !important;
}

.form-button-text-white-important {
  color: #ffffff !important;
}


.form-overlay-z-index {
  z-index: 1 !important;
}

.form-element-pointer-events {
  pointer-events: auto !important;
}

.form-element-positioned {
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* ===== CALENDAR CSS CUSTOM PROPERTIES ===== */
/* Calendar view dynamic positioning using CSS custom properties (CSP-safe) */
/* These are set via JavaScript using element.style.setProperty() */
.calendar-current-line {
  top: var(--current-line-top, 0%);
}

.calendar-working-hours {
  top: var(--working-hours-top, 0%);
  height: var(--working-hours-height, 0%);
}

.calendar-selection {
  top: var(--selection-top, 0%);
  height: var(--selection-height, 0%);
}

/* ===== PORTAL/RESIDENT LOGIN CRITICAL CSS (moved from inline <style> blocks) ===== */
/* Critical CSS: Above-the-fold layout and typography for login pages */
/* Note: Most layout styles are handled by Tailwind CSS, only body-specific styles are kept here */
body.portal-login-body,
body.resident-login-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  min-height: 100vh;
}

.calendar-preview-tooltip {
  left: var(--preview-x, 0px);
  top: var(--preview-y, 0px);
}

/* ===== EMPTY STATE PARTIAL STYLES ===== */
/* Moved from src/Views/partials/empty-state.php inline <style> block (CSP compliance) */
.empty-state {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-icon {
  opacity: 0.5;
}

/* ===== NOTIFICATION SLIDE-OUT ANIMATION (CSP-safe) ===== */
.notification-slide-out {
  transform: translateX(100%) !important;
  transition: transform 0.3s ease-out;
}

/* ===== DRAGGING NO POINTER EVENTS (CSP-safe) ===== */
.dragging-no-pointer-events {
  pointer-events: none !important;
}

/* ===== BUTTON CURSOR STATES (CSP-safe) ===== */
.button-cursor-wait {
  cursor: wait !important;
}
/* GLOBAL HEADER GLITCH FIX */
/* Forces the header to be full width when fixed/sticky */
/* Addresses the issue where scrolling up causes the header to lose width */
nav[data-header] {
  width: 100% !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure sticky/fixed states don't collapse */
nav[data-header].sticky,
nav[data-header].fixed,
.sticky nav[data-header],
.fixed nav[data-header] {
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Fix for resident portal header specifically if different */
#resident-main-nav {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}
