
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group:hover .group-hover\:scale-110 { transform: scale(1.1); }

/* Component-Specific Utilities */

/* Button Variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(255 255 255 / 4%);
  color: var(--q-text-primary);
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
}

.btn:hover {
  background-color: rgb(255 255 255 / 8%);
  border-color: var(--q-color-starlight-blue);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  background-color: rgb(255 255 255 / 3%);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

html[data-theme="light"] .btn {
  background-color: rgb(0 0 0 / 3%);
  border-color: #cbd5e1;
  color: #1e293b !important;
}

html[data-theme="light"] .btn:hover {
  background-color: var(--q-light-card-bg);
  border-color: #94a3b8;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  filter: brightness(1.02);
}

html[data-theme="light"] .btn:active {
  background-color: rgb(0 0 0 / 2%);
  transform: translateY(0) scale(0.97);
}

.btn-secondary {
  /* Synced with .btn - inherits all styles */
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--q-color-starlight-peach) 0%,
    var(--q-color-starlight-blue) 100%
  );
  color: #000 !important;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 0 20px var(--q-color-starlight-glow);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 0 30px color-mix(in srgb, var(--q-color-starlight-blue), transparent 50%);
  border: 0;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.95);
  box-shadow: 0 0 10px color-mix(in srgb, var(--q-color-starlight-blue), transparent 60%);
}

.btn-outline {
  background-color: transparent;
  color: var(--q-color-primary);
  border-color: var(--q-color-primary);
}

.btn-outline:hover {
  background-color: var(--q-color-primary);
  color: white;
  border-color: var(--q-color-primary);
}

.btn-ghost {
  background-color: transparent;
  color: var(--q-color-primary);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--q-color-primary-100);
}

.btn-sm {
  padding: var(--q-space-1) var(--q-space-3);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--q-space-3) var(--q-space-6);
  font-size: 1.125rem;
}

.btn-xl {
  padding: var(--q-space-4) var(--q-space-8);
  font-size: 1.25rem;
}

/* Glossy/Aqua Button - Neutral/Silver */
.btn-glossy {
  position: relative;
  border: none;
  border-radius: 1000px;
  overflow: hidden;
  padding: 0.5rem 1.25rem;
  min-width: 4rem;
  background: linear-gradient(
    color-mix(in srgb, #a0a0a0, black 30%),
    #c0c0c0,
    color-mix(in srgb, #ffffff, white 30%)
  );
  box-shadow: 0 0.375em 0.5em rgba(0, 0, 0, 0.2), 
              0 0.125em 0.125em rgba(0, 0, 0, 0.3), 
              inset 0 0.25em 0.25em rgba(0, 0, 0, 0.4),
              inset 0 0.375em 0.5em 0.25em #BBBBBB;
  color: #000 !important;
  font-weight: 600;
}

.btn-glossy::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);
  width: calc(100% - 0.875em);
  border-radius: 2em 2em 0.5em 0.5em;
  top: 5%;
  z-index: 2;
  pointer-events: none;
}

.btn-glossy::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.5));
  width: calc(100% - 1.25em);
  border-radius: 0.75em;
  bottom: 10%;
  filter: blur(3px);
  pointer-events: none;
}

.btn-glossy:hover {
  background: linear-gradient(
    color-mix(in srgb, #ffb38a, black 20%),
    #ffb38a,
    color-mix(in srgb, #ffb38a, white 30%)
  );
  box-shadow: 0 0.375em 0.5em rgba(0, 0, 0, 0.2), 
              0 0.125em 0.125em rgba(0, 0, 0, 0.3), 
              inset 0 0.25em 0.25em rgba(0, 0, 0, 0.4),
              inset 0 0.375em 0.5em 0.25em #BBBBBB !important;
  transform: none !important;
  border-radius: 1000px !important;
  border: none !important;
}

.btn-glossy:active {
  transform: translateY(2px) !important;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.15),
              inset 0 0.5em 1em rgba(0, 0, 0, 0.4),
              inset 0 0.25em 0.5em rgba(0, 0, 0, 0.2) !important;
  border-radius: 1000px !important;
  border: none !important;
}

/* Glossy/Aqua Button - Primary Color */
.btn-glossy-primary {
  position: relative;
  border: none;
  border-radius: 1000px;
  overflow: hidden;
  padding: 0.5rem 1.25rem;
  min-width: 4rem;
  background: linear-gradient(
    color-mix(in srgb, var(--q-color-primary), black 35%),
    var(--q-color-primary),
    color-mix(in srgb, var(--q-color-primary), white 20%)
  );
  box-shadow: 0 0.375em 0.5em rgba(0, 0, 0, 0.3), 
              0 0.125em 0.125em color-mix(in srgb, var(--q-color-primary), black 20%), 
              inset 0 0.25em 0.5em color-mix(in srgb, var(--q-color-primary), black 50%),
              inset 0 0.375em 0.5em 0.25em color-mix(in srgb, var(--q-color-primary), white 20%);
  color: #000 !important;
  font-weight: 600;
}

.btn-glossy-primary::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);
  width: calc(100% - 0.875em);
  border-radius: 2em 2em 0.5em 0.5em;
  top: 5%;
  z-index: 2;
  pointer-events: none;
}

.btn-glossy-primary::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.5));
  width: calc(100% - 1.25em);
  border-radius: 0.75em;
  bottom: 10%;
  filter: blur(3px);
  pointer-events: none;
}

.btn-glossy-primary:hover {
  background: linear-gradient(
    color-mix(in srgb, #ffb38a, black 20%),
    #ffb38a,
    color-mix(in srgb, #ffb38a, white 30%)
  );
  box-shadow: 0 0.375em 0.5em rgba(0, 0, 0, 0.2), 
              0 0.125em 0.125em rgba(0, 0, 0, 0.3), 
              inset 0 0.25em 0.25em rgba(0, 0, 0, 0.4),
              inset 0 0.375em 0.5em 0.25em #BBBBBB !important;
  transform: none !important;
  border-radius: 1000px !important;
  border: none !important;
}

.btn-glossy-primary:active {
  transform: translateY(2px) !important;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.15),
              inset 0 0.5em 1em rgba(0, 0, 0, 0.4),
              inset 0 0.25em 0.5em rgba(0, 0, 0, 0.2) !important;
  border-radius: 1000px !important;
  border: none !important;
}

/* Dark mode - trailer style */
html[data-theme="dark"] .btn-glossy {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 1000px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .btn-glossy::before,
html[data-theme="dark"] .btn-glossy::after {
  display: none;
}

html[data-theme="dark"] .btn-glossy:hover {
  background: transparent;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
  transform: none !important;
  border-radius: 1000px !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .btn-glossy:active {
  transform: translateY(2px) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  border-radius: 1000px !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

/* Dark mode - brighter primary for dark backgrounds */
html[data-theme="dark"] .btn-glossy-primary {
  background: transparent;
  color: #fff !important;
  border: 2px solid color-mix(in srgb, var(--q-color-primary), transparent 50%);
  border-radius: 1000px;
  box-shadow: 0 0 15px color-mix(in srgb, var(--q-color-primary), transparent 70%);
  transition: all 0.2s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="dark"] .btn-glossy-primary::before,
html[data-theme="dark"] .btn-glossy-primary::after {
  display: none;
}

html[data-theme="dark"] .btn-glossy-primary:hover {
  background: transparent;
  box-shadow: 0 0 25px color-mix(in srgb, var(--q-color-primary), transparent 50%);
  transform: none !important;
  border-radius: 1000px !important;
  border: 2px solid color-mix(in srgb, var(--q-color-primary), transparent 30%) !important;
}

html[data-theme="dark"] .btn-glossy-primary:active {
  transform: translateY(2px) !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--q-color-primary), transparent 60%);
  border-radius: 1000px !important;
  border: 2px solid color-mix(in srgb, var(--q-color-primary), transparent 50%) !important;
}

/* Glass Utility */
.glass {
  background: var(--q-glass-bg);
  border: 1px solid var(--q-glass-border);
  backdrop-filter: var(--q-glass-blur);
  -webkit-backdrop-filter: var(--q-glass-blur);
  border-radius: var(--q-radius-xl);
}

/* Card Component */
.card {
  background-color: var(--q-card-bg);
  color: var(--q-text-primary);
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-md);
  overflow: hidden;
  transition: all var(--q-duration-200) var(--q-ease-in-out);
}

html[data-theme="light"] .card {
  background-color: var(--q-light-card-bg, white);
  color: var(--q-light-text, #1e293b);
}

.card:hover {
  box-shadow: var(--q-shadow-lg);
}

.card-premium {
  background: var(--q-color-surface);
  border: 1px solid var(--q-color-border);
  border-radius: var(--q-radius-2xl);
  padding: 2.5rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: var(--q-color-text);
  box-shadow: var(--q-card-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium:hover {
  transform: translateY(-8px) scale(1.02);
  background-color: color-mix(in srgb, var(--q-color-surface), white 5%);
  box-shadow: 0 30px 60px -12px rgb(0 0 0 / 50%);
  border-color: var(--q-color-starlight-blue);
}

.card-header {
  padding: var(--q-space-6);
  border-bottom: 1px solid var(--q-glass-border);
}

.card-body {
  padding: var(--q-space-6);
}

.card-footer {
  padding: var(--q-space-6);
  border-top: 1px solid var(--q-glass-border);
  background-color: var(--q-glass-bg);
  color: var(--q-text-secondary);
}

html[data-theme="light"] .card-footer {
  background-color: #f9fafb;
  color: #1e293b;
}

/* Input Component */
.input {
  display: block;
  width: 100%;
  padding: var(--q-space-2) var(--q-space-3);
  border: 1px solid #d1d5db;
  border-radius: var(--q-radius-md);
  background-color: var(--q-input-bg, white);
  color: #1e293b;
  font-size: 1rem;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

html[data-theme="light"] .input {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

textarea.input {
  min-height: 100px;
}

.input:focus {
  outline: none;
  border-color: var(--q-color-primary);
  box-shadow: 0 0 0 3px var(--q-color-primary);
}

/* Date & Time Input Specifics */
input[type="date"].input,
input[type="datetime-local"].input,
input[type="time"].input {
  appearance: none;
  -webkit-appearance: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

/* Ensure dark-mode calendar picker */
.glass input[type="date"],
.starlight-card input[type="date"],
[class*="dark"] input[type="date"] {
  color-scheme: dark;
}

/* Fix for alignment in flex containers */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.5);
  margin-left: 0.5rem;
}

.input:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

html[data-theme="light"] .input:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
}

.input-error {
  border-color: var(--q-color-error);
}

.input-error:focus {
  border-color: var(--q-color-error);
  box-shadow: 0 0 0 3px var(--q-color-error);
}

/* Badge Component */
.badge,
.badge-primary,
.badge-secondary,
.badge-success,
.badge-warning,
.badge-error {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.badge-primary {
  background-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  color: var(--q-color-starlight-blue);
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
}

.badge-secondary {
  background-color: rgb(255 255 255 / 5%);
  color: rgb(255 255 255 / 80%);
  border-color: rgb(255 255 255 / 10%);
}

.badge-success {
  background-color: rgb(16 185 129 / 15%);
  color: #10b981;
  border-color: rgb(16 185 129 / 30%);
}

.badge-warning {
  background-color: rgb(245 158 11 / 15%);
  color: #f59e0b;
  border-color: rgb(245 158 11 / 30%);
}

.badge-error {
  background-color: rgb(239 68 68 / 15%);
  color: #ef4444;
  border-color: rgb(239 68 68 / 30%);
}

/* Light Mode Overrides for Badges */
html[data-theme="light"] .badge-primary {
  background-color: color-mix(in srgb, var(--q-color-primary), transparent 90%);
  color: color-mix(in srgb, var(--q-color-primary), black 10%);
  border-color: color-mix(in srgb, var(--q-color-primary), transparent 80%);
}

html[data-theme="light"] .badge-secondary {
  background-color: rgb(0 0 0 / 5%);
  color: #475569;
  border-color: rgb(0 0 0 / 10%);
}

html[data-theme="light"] .badge-success {
  background-color: rgb(16 185 129 / 10%);
  color: #059669;
  border-color: rgb(16 185 129 / 20%);
}

html[data-theme="light"] .badge-warning {
  background-color: rgb(245 158 11 / 10%);
  color: #d97706;
  border-color: rgb(245 158 11 / 20%);
}

html[data-theme="light"] .badge-error {
  background-color: rgb(239 68 68 / 10%);
  color: #dc2626;
  border-color: rgb(239 68 68 / 20%);
}

/* Alert Component */
.alert {
  padding: var(--q-space-4);
  border-radius: var(--q-radius-md);
  border: 1px solid;
}

.alert-success {
  background-color: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
}

.alert-warning {
  background-color: #fed7aa;
  border-color: #fbbf24;
  color: #92400e;
}

.alert-error {
  background-color: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.alert-info {
  background-color: rgb(59 130 246 / 15%);
  border-color: rgb(59 130 246 / 30%);
  color: #60a5fa;
}

html[data-theme="light"] .alert-info {
  background-color: rgb(59 130 246 / 10%);
  border-color: rgb(59 130 246 / 20%);
  color: #1e40af;
}

/* Modal Component */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background-color: var(--q-color-surface, white);
  color: #1e293b;
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-2xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

html[data-theme="light"] .modal-content {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(16px);
  color: #1e293b;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid color-mix(in srgb, var(--q-color-text), transparent 85%);
  border-top-color: var(--q-color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, 
    var(--q-skeleton-bg) 25%, 
    var(--q-skeleton-shimmer) 50%, 
    var(--q-skeleton-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
  border-radius: var(--q-radius-md);
}

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

html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, 
    var(--q-skeleton-bg) 25%, 
    var(--q-skeleton-shimmer) 50%, 
    var(--q-skeleton-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
}


/* Tooltip Component */
.tooltip {
  position: relative;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1f2937;
  color: white;
  padding: var(--q-space-1) var(--q-space-2);
  border-radius: var(--q-radius-md);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  z-index: 10;
  margin-bottom: var(--q-space-1);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* Dropdown Component */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--q-dropdown-bg, white);
  color: #1e293b;
  border: 1px solid #e5e7eb;
  border-radius: var(--q-radius-md);
  box-shadow: var(--q-shadow-lg);
  min-width: 200px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

html[data-theme="light"] .dropdown-content {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(12px);
  color: #1e293b;
}

.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--q-space-2) var(--q-space-3);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  transition: background-color var(--q-duration-150) var(--q-ease-in-out);
}

.dropdown-item:hover {
  background-color: var(--q-color-primary);
  color: #1e293b;
}

html[data-theme="light"] .dropdown-item {
  color: #1e293b;
}

html[data-theme="light"] .dropdown-item:hover {
  background-color: var(--q-color-starlight-blue);
  color: #1e293b;
}

/* ============================================================================
   MENU COMPONENT
   Navigation and user menus
   ============================================================================ */

/* Base menu */
.menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Horizontal menu */
.menu-horizontal {
  flex-direction: row;
  align-items: center;
  gap: var(--q-space-2);
}

/* Menu item */
.menu-item {
  position: relative;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: var(--q-space-2);
  padding: var(--q-space-2) var(--q-space-3);
  color: var(--q-text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--q-radius-md);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  cursor: pointer;
}

.menu-link:hover {
  color: var(--q-text-primary);
  background-color: var(--q-glass-bg);
}

.menu-link.active {
  color: var(--q-color-primary);
  background-color: color-mix(in srgb, var(--q-color-primary), transparent 90%);
}

/* Menu icon */
.menu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Menu badge */
.menu-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--q-color-primary);
  color: white;
  border-radius: 9999px;
}

/* Dropdown menu */
.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--q-card-bg);
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-lg);
  padding: var(--q-space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  z-index: 50;
}

.menu-item:hover .menu-dropdown,
.menu-item.active .menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-dropdown .menu-link {
  padding: var(--q-space-2) var(--q-space-3);
  border-radius: var(--q-radius-md);
}

.menu-dropdown .menu-link:hover {
  background-color: var(--q-glass-bg);
}

/* Mobile menu */
.menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--q-bg-primary);
  padding: var(--q-space-6);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform var(--q-duration-300) var(--q-ease-in-out);
}

.menu-mobile.open {
  transform: translateX(0);
}

.menu-mobile .menu {
  gap: var(--q-space-2);
}

.menu-mobile .menu-link {
  padding: var(--q-space-4);
  font-size: 1.125rem;
}

/* Menu divider */
.menu-divider {
  height: 1px;
  background-color: var(--q-glass-border);
  margin: var(--q-space-2) 0;
}

/* User menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: var(--q-space-3);
}

/* Light mode */
html[data-theme="light"] .menu-link:hover {
  background-color: #f1f5f9;
}

html[data-theme="light"] .menu-link.active {
  background-color: #eff6ff;
}

html[data-theme="light"] .menu-dropdown {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(12px);
  border-color: #e2e8f0;
}

html[data-theme="light"] .menu-divider {
  background-color: #e2e8f0;
}

/* ============================================================================
   TOAST COMPONENT
   Notification toasts
   ============================================================================ */

/* Toast container */
.toast-container {
  position: fixed;
  bottom: var(--q-space-6);
  right: var(--q-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--q-space-3);
  z-index: 1000;
  max-width: 400px;
}

.toast-container-top-right {
  top: var(--q-space-6);
  bottom: auto;
}

.toast-container-top-left {
  top: var(--q-space-6);
  left: var(--q-space-6);
  right: auto;
}

.toast-container-bottom-left {
  bottom: var(--q-space-6);
  left: var(--q-space-6);
  right: auto;
}

/* Toast */
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--q-space-3);
  padding: var(--q-space-4);
  background-color: var(--q-card-bg);
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-lg);
  color: var(--q-text-primary);
  animation: toast-slide-in 0.3s var(--q-ease-out);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.removing {
  animation: toast-slide-out 0.3s var(--q-ease-in) forwards;
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Toast icon */
.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #10b981;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

/* Toast content */
.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--q-text-secondary);
  line-height: 1.4;
}

/* Toast close button */
.toast-close {
  padding: 4px;
  background: none;
  border: none;
  color: var(--q-text-muted);
  cursor: pointer;
  border-radius: var(--q-radius-sm);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

.toast-close:hover {
  color: var(--q-text-primary);
  background-color: var(--q-glass-bg);
}

/* Toast variants */
.toast-success {
  border-left: 3px solid #10b981;
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-warning {
  border-left: 3px solid #f59e0b;
}

.toast-info {
  border-left: 3px solid #3b82f6;
}

/* Light mode */
html[data-theme="light"] .toast {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(12px);
  border-color: #e2e8f0;
}

/* Accordion Component */
.accordion-item {
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-md);
  margin-bottom: var(--q-space-2);
  overflow: hidden;
}

.accordion-header {
  padding: var(--q-space-3) var(--q-space-4);
  font-weight: 600;
  background-color: rgb(255 255 255 / 5%);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  color: var(--q-text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--q-duration-150) var(--q-ease-in-out);
}

.accordion-header:hover {
  background-color: rgb(255 255 255 / 8%);
  color: var(--q-text-primary);
}

.accordion-content {
  padding: 0 var(--q-space-4);
  background-color: var(--q-card-bg);
  color: var(--q-text-primary);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--q-duration-300) var(--q-ease-in-out), padding var(--q-duration-300) var(--q-ease-in-out);
}

html[data-theme="light"] .accordion-header {
  background-color: #f8fafc;
  border-bottom-color: #e2e8f0;
  color: var(--q-light-text);
}

html[data-theme="light"] .accordion-header:hover {
  background-color: #f1f5f9;
}

html[data-theme="light"] .accordion-header:hover {
  background-color: color-mix(in srgb, var(--q-color-primary), transparent 92%);
  color: var(--q-light-text);
}

html[data-theme="light"] .accordion-content {
  background-color: var(--q-light-card-bg);
  color: var(--q-light-text);
}

.accordion-item.active .accordion-content {
  max-height: 500px;
  padding: var(--q-space-4);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-icon {
  transition: transform var(--q-duration-300) var(--q-ease-in-out);
}

/* Tab Component */
.tab-list {
  display: flex;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.tab-button {
  padding: var(--q-space-3) var(--q-space-4);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--q-text-secondary);
  font-weight: 500;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

.tab-button:hover {
  background-color: color-mix(in srgb,var(--q-color-starlight),transparent 85%);
  border-radius: 7px 7px 0 0;
  color: var(--q-text-primary);
}

.tab-button.active {
  border-bottom-color: var(--q-color-starlight-blue);
  color: var(--q-color-starlight-blue);
}

html[data-theme="light"] .tab-list {
  border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .tab-button {
  color: #64748b;
}

html[data-theme="light"] .tab-button:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .tab-button.active {
  border-bottom-color: var(--q-color-primary);
  color: var(--q-color-primary);
}

.tab-content {
  padding: var(--q-space-4);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Progress Component */
.progress {
  width: 100%;
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: var(--q-radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  transition: width var(--q-duration-300) var(--q-ease-in-out);
}

/* ============================================================================
   CHIP COMPONENT
   ============================================================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--q-space-2);
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 9999px;
  background-color: var(--q-card-bg);
  border: 1px solid var(--q-card-border);
  color: var(--q-text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.chip:hover {
  background-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%);
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  color: var(--q-color-starlight-blue);
}

.chip.active {
  background-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%);
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  color: var(--q-color-starlight-blue);
}

/* Chip variants */
.chip-primary {
  background-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%);
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  color: var(--q-color-starlight-blue);
}

.chip-primary:hover,
.chip-primary.active {
  background-color: var(--q-color-starlight-blue);
  color: white;
}

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

.chip-success:hover,
.chip-success.active {
  background-color: #10b981;
  color: white;
}

.chip-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

.chip-warning:hover,
.chip-warning.active {
  background-color: #f59e0b;
  color: white;
}

.chip-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.chip-error:hover,
.chip-error.active {
  background-color: #ef4444;
  color: white;
}

/* Chip with icon */
.chip-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Chip close button */
.chip-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

.chip-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Chip sizes */
.chip-sm {
  padding: 2px var(--q-space-2);
  font-size: 0.75rem;
}

.chip-lg {
  padding: var(--q-space-2) var(--q-space-4);
  font-size: 1rem;
}

/* Light mode */
html[data-theme="light"] .chip {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #1e293b;
}

html[data-theme="light"] .chip:hover {
  background-color: #e2e8f0;
}

/* ============================================================================
   DATE PICKER COMPONENT
   ============================================================================ */

.date-picker {
  display: inline-block;
  position: relative;
}

/* Date picker input */
.date-picker-input {
  padding: var(--q-space-2) var(--q-space-3);
  padding-right: var(--q-space-10);
  background-color: var(--q-glass-bg);
  border: 1px solid var(--q-glass-border);
  border-radius: var(--q-radius-md);
  color: var(--q-text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  min-width: 160px;
}

.date-picker-input:focus {
  outline: none;
  border-color: var(--q-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--q-color-primary), transparent 30%);
}

.date-picker-input::placeholder {
  color: var(--q-text-muted);
}

/* Date picker dropdown/calendar */
.date-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: var(--q-space-2);
  background-color: var(--q-card-bg);
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow-lg);
  padding: var(--q-space-4);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  min-width: 280px;
}

.date-picker.active .date-picker-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Date picker header */
.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--q-space-3);
}

.date-picker-title {
  font-weight: 600;
  color: var(--q-text-primary);
}

.date-picker-nav {
  display: flex;
  gap: var(--q-space-1);
}

.date-picker-nav-btn {
  padding: var(--q-space-1);
  background: none;
  border: none;
  color: var(--q-text-muted);
  cursor: pointer;
  border-radius: var(--q-radius-sm);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

.date-picker-nav-btn:hover {
  color: var(--q-text-primary);
  background-color: var(--q-glass-bg);
}

/* Date picker grid */
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* Day labels */
.date-picker-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--q-text-muted);
  padding: var(--q-space-2);
  text-transform: uppercase;
}

/* Day */
.date-picker-day {
  text-align: center;
  padding: var(--q-space-2);
  font-size: 0.875rem;
  color: var(--q-text-secondary);
  cursor: pointer;
  border-radius: var(--q-radius-md);
  transition: all var(--q-duration-150) var(--q-ease-in-out);
}

.date-picker-day:hover {
  background-color: var(--q-glass-bg);
  color: var(--q-text-primary);
}

.date-picker-day.selected {
  background-color: var(--q-color-primary);
  color: white;
}

.date-picker-day.today {
  font-weight: 600;
  color: var(--q-color-primary);
}

.date-picker-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.date-picker-day.disabled:hover {
  background: none;
  color: var(--q-text-secondary);
}

.date-picker-day.other-month {
  color: var(--q-text-muted);
  opacity: 0.5;
}

/* Date picker footer */
.date-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--q-space-2);
  margin-top: var(--q-space-3);
  padding-top: var(--q-space-3);
  border-top: 1px solid var(--q-glass-border);
}

/* Range date picker */
.date-picker-range .date-picker-day.in-range {
  background-color: color-mix(in srgb, var(--q-color-primary), transparent 20%);
}

.date-picker-range .date-picker-day.start-range,
.date-picker-range .date-picker-day.end-range {
  background-color: var(--q-color-primary);
  color: white;
}

/* Time picker */
.time-picker {
  display: flex;
  align-items: center;
  gap: var(--q-space-2);
}

.time-picker-input {
  width: 60px;
  padding: var(--q-space-2);
  text-align: center;
  background-color: var(--q-glass-bg);
  border: 1px solid var(--q-glass-border);
  border-radius: var(--q-radius-md);
  color: var(--q-text-primary);
  font-size: 0.875rem;
}

.time-picker-separator {
  font-weight: 600;
  color: var(--q-text-muted);
}

/* Light mode */
html[data-theme="light"] .date-picker-input {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(8px);
  border-color: #e2e8f0;
}

html[data-theme="light"] .date-picker-dropdown {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(16px);
  border-color: #e2e8f0;
}

html[data-theme="light"] .date-picker-day:hover {
  background-color: #f1f5f9;
}

html[data-theme="light"] .time-picker-input {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(8px);
  border-color: #e2e8f0;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.5rem;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: background-color var(--q-duration-150) var(--q-ease-in-out);
  border-radius: var(--q-radius-full);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.125rem;
  bottom: 0.125rem;
  background-color: white;
  transition: transform var(--q-duration-150) var(--q-ease-in-out);
  border-radius: 50%;
}

.toggle-input:checked + .toggle-slider {
  background-color: var(--q-color-primary);
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(1.5rem);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@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); }
}

.animate-fade-in {
  animation: fadeIn var(--q-duration-500) var(--q-ease-in-out);
}

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

.animate-slide-up {
  animation: slideUp var(--q-duration-300) var(--q-ease-out);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-slide-down {
  animation: slideDown var(--q-duration-300) var(--q-ease-out);
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Table Component */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table-wrapper::-webkit-scrollbar-track {
  background: rgb(255 255 255 / 5%);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--q-color-starlight-blue, #3b82f6);
  border-radius: 4px;
}

html[data-theme="light"] .table-wrapper::-webkit-scrollbar-track {
  background: rgb(0 0 0 / 5%);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
  color: var(--q-text-primary);
}

.table th {
  padding: var(--q-space-3) var(--q-space-4);
  font-weight: 600;
  background-color: rgb(255 255 255 / 5%);
  border-bottom: 2px solid rgb(255 255 255 / 10%);
  color: var(--q-text-primary);
}

.table td {
  padding: var(--q-space-3) var(--q-space-4);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  color: var(--q-text-secondary);
}

.table tbody tr:hover {
  background-color: rgb(255 255 255 / 3%);
}

/* Light Mode Table Styles */
html[data-theme="light"] .table th {
  background-color: #f8fafc;
  border-bottom-color: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .table td {
  border-bottom-color: #e2e8f0;
  color: #334155;
}

html[data-theme="light"] .table tbody tr:hover {
  background-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%);
}

/* Premium Table Component */
.table-premium-container {
  background: var(--q-card-bg);
  border: 1px solid var(--q-card-border);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
  box-shadow: var(--q-shadow-md);
}

.table-premium-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--q-space-5) var(--q-space-6);
  border-bottom: 1px solid var(--q-card-border);
  background: rgba(255, 255, 255, 0.01);
}

.table-premium-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--q-text-primary);
}

.table-premium-filters {
  display: flex;
  gap: var(--q-space-3);
}

.table-premium {
  width: 100%;
  border-collapse: collapse;
}

.table-premium th {
  text-align: left;
  padding: var(--q-space-4) var(--q-space-6);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--q-text-muted);
  border-bottom: 1px solid var(--q-card-border);
  background: rgba(255, 255, 255, 0.02);
}

.table-premium td {
  padding: var(--q-space-4) var(--q-space-6);
  font-size: 0.875rem;
  color: var(--q-text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-premium tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-premium tbody tr:last-child td {
  border-bottom: none;
}

.table-premium-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--q-space-4) var(--q-space-6);
  border-top: 1px solid var(--q-card-border);
  background: rgba(255, 255, 255, 0.02);
}

.table-premium-info {
  font-size: 0.875rem;
  color: var(--q-text-muted);
}

/* Light Mode Overrides for Premium Table */
html[data-theme="light"] .table-premium-container {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(16px);
  border-color: var(--q-light-card-border);
  box-shadow: 
    0 10px 30px color-mix(in srgb, var(--q-color-primary), transparent 95%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .table-premium-header {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border-bottom-color: var(--q-light-card-border);
}

html[data-theme="light"] .table-premium th {
  background: #f8fafc;
  border-bottom-color: var(--q-light-card-border);
  color: #64748b;
}

html[data-theme="light"] .table-premium td {
  border-bottom-color: #f1f5f9;
  color: #334155;
}

html[data-theme="light"] .table-premium tbody tr:hover td {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 96%);
}

html[data-theme="light"] .table-premium-footer {
  background: #f8fafc;
  border-top-color: var(--q-light-card-border);
}

/* Mobile Responsive for Premium Table */
@media (max-width: 640px) {
  .table-premium-header {
    flex-direction: column;
    gap: var(--q-space-3);
    padding: var(--q-space-3) var(--q-space-4);
  }

  .table-premium-title {
    font-size: 1rem;
  }

  .table-premium-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .table-premium th,
  .table-premium td {
    padding: var(--q-space-2) var(--q-space-3);
  }

  .table-premium-footer {
    flex-direction: column;
    gap: var(--q-space-2);
    padding: var(--q-space-3) var(--q-space-4);
  }
}

/* ============================================================================
   LIST COMPONENT
   ============================================================================ */

/* Base list container */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--q-space-1);
}

/* Scrollable list container */
.list-scroll {
  display: flex;
  flex-direction: column;
  gap: var(--q-space-1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 400px;
  padding: var(--q-space-2);
}

.list-scroll::-webkit-scrollbar {
  width: 6px;
}

.list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.list-scroll::-webkit-scrollbar-thumb {
  background: var(--q-color-secondary);
  border-radius: 3px;
  opacity: 0.5;
}

.list-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--q-color-primary);
}

/* List item */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--q-space-3);
  padding: var(--q-space-3) var(--q-space-4);
  border-radius: var(--q-radius-md);
  cursor: pointer;
  transition: all var(--q-duration-150) var(--q-ease-in-out);
  color: var(--q-text-primary);
}

.list-item:hover {
  background-color: var(--q-glass-bg);
}

.list-item.active {
  background-color: color-mix(in srgb, var(--q-color-primary), transparent 90%);
  color: var(--q-color-primary);
}

/* List item with avatar */
.list-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* List item content */
.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: var(--q-space-4);
  font-weight: 500;
  color: var(--q-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-subtitle {
  font-size: var(--q-space-3);
  color: var(--q-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  font-size: var(--q-space-3);
  color: var(--q-text-muted);
  flex-shrink: 0;
}

/* List item with icon */
.list-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--q-text-muted);
}

.list-item:hover .list-item-icon {
  color: var(--q-text-primary);
}

/* List header */
.list-header {
  display: flex;
  align-items: center;
  gap: var(--q-space-3);
  padding: var(--q-space-2) var(--q-space-4);
  font-size: var(--q-space-3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--q-text-muted);
  border-bottom: 1px solid var(--q-glass-border);
}

/* List divider */
.list-divider {
  height: 1px;
  background-color: var(--q-glass-border);
  margin: var(--q-space-2) 0;
}

/* List actions */
.list-item-actions {
  display: flex;
  gap: var(--q-space-2);
  opacity: 0;
  transition: opacity var(--q-duration-150) var(--q-ease-in-out);
}

.list-item:hover .list-item-actions {
  opacity: 1;
}

/* Unread list item */
.list-item-unread .list-item-title,
.list-item-unread .list-item-subtitle {
  font-weight: 600;
  color: var(--q-text-primary);
}

/* Compact list */
.list-compact .list-item {
  padding: var(--q-space-2) var(--q-space-3);
}

/* List with borders */
.list-bordered {
  border: 1px solid var(--q-glass-border);
  border-radius: var(--q-radius-lg);
  padding: var(--q-space-2);
}

/* Grid list (for cards/media items) */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--q-space-4);
  padding: var(--q-space-4);
}

/* Light mode overrides */
html[data-theme="light"] .list-item:hover {
  background-color: #f1f5f9;
}

html[data-theme="light"] .list-item.active {
  background-color: #eff6ff;
}

html[data-theme="light"] .list-divider {
  background-color: #e2e8f0;
}

/* Overflow Utility */
.overflow-x-auto {
  overflow-x: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Touch Slide - Horizontal scroll with touch swipe support */
.touch-slide {
  display: flex;
  gap: var(--q-space-2, 0.5rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.touch-slide::-webkit-scrollbar {
  display: none;
}

.touch-slide > * {
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ============================================================================
   APP LAYOUT PATTERNS
   Standardized layout components for dashboard and admin applications
   ============================================================================ */

/* Main app layout - sidebar + content grid */
.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  max-width: 100vw;
}

.app-layout-narrow {
  grid-template-columns: 80px minmax(0, 1fr);
}

.app-layout-wide {
  grid-template-columns: 320px minmax(0, 1fr);
}

/* Sidebar navigation container */
.sidebar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 8, 26, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Main content area */
.main-content {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Top Header Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

html[data-theme="light"] .top-nav {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(12px);
  border-color: var(--q-light-card-border, #e2e8f0);
}

/* Page header with actions */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .page-header > div:first-child {
    min-width: 0;
  }
  .page-header .page-actions {
    justify-content: flex-start;
  }
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--q-text-primary, #f1f5f9);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--q-text-muted, #64748b);
  margin: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .page-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .page-actions::-webkit-scrollbar {
    display: none;
  }
}

html[data-theme="light"] .page-title {
  color: #0f172a;
}

/* Light mode overrides for layout */
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, var(--q-light-card-bg) 0%, var(--q-light-bg) 100%);
  border-right-color: var(--q-light-card-border);
}

/* Responsive layout adjustments */
@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 80px 1fr;
  }
  
  .sidebar {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
  
  .main-content {
  }
}

/* ============================================================================
   BREADCRUMBS
   Navigation trails for complex applications
   ============================================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--q-space-2, 0.5rem);
  font-size: 0.875rem;
  color: var(--q-text-muted, #64748b);
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--q-space-2, 0.5rem);
}

.breadcrumb-link {
  color: var(--q-text-secondary, #94a3b8);
  text-decoration: none;
  transition: color var(--q-duration-150, 0.2s);
}

.breadcrumb-link:hover {
  color: var(--q-color-primary, #00d4ff);
}

.breadcrumb-separator {
  color: var(--q-text-muted, #64748b);
  opacity: 0.6;
}

.breadcrumb-current {
  color: var(--q-text-primary, #f1f5f9);
  font-weight: 500;
}

/* Light mode overrides for breadcrumbs */
html[data-theme="light"] .breadcrumb-link {
  color: #64748b;
}

html[data-theme="light"] .breadcrumb-link:hover {
  color: #2563eb;
}

html[data-theme="light"] .breadcrumb-current {
  color: #0f172a;
}

/* ============================================================================
   NAVIGATION PATTERNS
   Sidebar navigation items and sections
   ============================================================================ */

/* Navigation section container */
.nav-section {
  margin-bottom: 1.5rem;
}

/* Navigation section title */
.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--q-text-muted, #64748b);
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
}

/* Navigation item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  color: var(--q-text-secondary, #94a3b8);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--q-text-primary, #f1f5f9);
}

.nav-item.active {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 88%);
  color: var(--q-color-starlight, #00d4ff);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -1.5rem; /* Align with sidebar edge */
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--q-color-starlight, #00d4ff);
  border-radius: 0 2px 2px 0;
}

/* Constrain nav item icons */
.nav-item i, .nav-item .icon, .nav-item svg {
  width: 1.125rem;
  height: 1.125rem;
  font-size: 1.125rem;
}

/* Sidebar scrollbar styling to prevent layout shift */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Navigation badge (count) */
.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Light mode overrides for navigation */
html[data-theme="light"] .nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .nav-section-title {
  color: #64748b;
}

/* ============================================================================
   QUICK ACTIONS
   Prominent action cards for dashboard navigation
   ============================================================================ */

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.quick-action-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.quick-action-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  border-color: var(--q-color-primary, #00d4ff);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--q-color-primary, #00d4ff);
  transition: all 0.3s ease;
}

.quick-action-icon i, .quick-action-icon .icon, .quick-action-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1.75rem;
}

.quick-action-card:hover .quick-action-icon {
  background: var(--q-color-primary, #00d4ff);
  color: white;
  transform: scale(1.1);
}

.quick-action-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--q-text-primary, #f1f5f9);
}

.quick-action-desc {
  font-size: 0.8125rem;
  color: var(--q-text-muted, #64748b);
  line-height: 1.4;
}

/* Light mode overrides for quick actions */
html[data-theme="light"] .quick-action-card {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(12px);
  border-color: #e2e8f0;
}

html[data-theme="light"] .quick-action-card:hover {
  background: #f8fafc;
}

html[data-theme="light"] .quick-action-icon {
  background: #f1f5f9;
}

/* ============================================================================
   STAT CARDS
   Dashboard metric cards with icons and values
   ============================================================================ */

/* Stats grid layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Individual stat card */
.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Stat card header with icon and trend */
.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* Icon wrapper for stat cards */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i, .stat-icon .icon, .stat-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
}

/* Icon color variants */
.stat-icon-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.stat-icon-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.stat-icon-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.stat-icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.stat-icon-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Stat value display */
.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  background: var(--q-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.25rem;
}

/* Stat label */
.stat-label {
  font-size: 0.875rem;
  color: var(--q-text-muted, #64748b);
}

/* Trend indicator */
.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.stat-trend i, .stat-trend .icon, .stat-trend svg {
  width: 0.75rem;
  height: 0.75rem;
  font-size: 0.75rem;
}

.stat-trend-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.stat-trend-down {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ============================================================================
   ACTIVITY FEED
   Timeline of recent events and updates
   ============================================================================ */

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon i, .activity-icon .icon, .activity-icon svg {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 0.875rem;
  color: var(--q-text-primary, #f1f5f9);
  margin-bottom: 0.25rem;
}

.activity-text span {
  color: var(--q-color-starlight, #00d4ff);
  font-weight: 500;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--q-text-muted, #64748b);
}

/* Light mode overrides for activity feed */
html[data-theme="light"] .activity-item {
  border-bottom-color: #f1f5f9;
}

html[data-theme="light"] .activity-text {
  color: #0f172a;
}

/* Light mode overrides for stat cards */
html[data-theme="light"] .stat-card {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(10px);
  border-color: var(--q-light-card-border);
  box-shadow: 
    0 10px 30px color-mix(in srgb, var(--q-color-primary), transparent 95%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .stat-card:hover {
  background: color-mix(in srgb, var(--q-light-card-bg), white 5%);
  box-shadow: 
    0 15px 35px color-mix(in srgb, var(--q-color-primary), transparent 90%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

html[data-theme="light"] .stat-icon-blue {
  background: rgba(59, 130, 246, 0.1);
}

html[data-theme="light"] .stat-icon-green {
  background: rgba(16, 185, 129, 0.1);
}

html[data-theme="light"] .stat-icon-orange {
  background: rgba(249, 115, 22, 0.1);
}

html[data-theme="light"] .stat-icon-purple {
  background: rgba(139, 92, 246, 0.1);
}

html[data-theme="light"] .stat-icon-red {
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================================================
   ICON BUTTONS
   Square and circular icon buttons
   ============================================================================ */

/* Base icon button */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--q-text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.icon-btn i, .icon-btn .icon {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--q-text-primary, #f1f5f9);
}

/* Circular icon button */
.icon-btn-circle {
  border-radius: 50%;
}

/* Small icon button */
.icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
}

.icon-btn-sm i, .icon-btn-sm .icon {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
}

/* Large icon button */
.icon-btn-lg {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
}

.icon-btn-lg i, .icon-btn-lg .icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
}

/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Action button for tables/lists */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--q-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn i, .action-btn .icon {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--q-text-primary, #f1f5f9);
}

/* ICON SIZING UTILITIES */
.icon-xs { width: 0.75rem !important; height: 0.75rem !important; font-size: 0.75rem !important; }
.icon-sm { width: 1rem !important; height: 1rem !important; font-size: 1rem !important; }
.icon-md { width: 1.25rem !important; height: 1.25rem !important; font-size: 1.25rem !important; }
.icon-lg { width: 1.5rem !important; height: 1.5rem !important; font-size: 1.5rem !important; }
.icon-xl { width: 2rem !important; height: 2rem !important; font-size: 2rem !important; }

/* Delete action button */
.action-btn-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Light mode overrides for icon buttons */
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .action-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

html[data-theme="light"] .icon-btn:hover,
html[data-theme="light"] .action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ============================================================================
   THEME TOGGLE
   Theme toggle button and wrapper for sidebars
   ============================================================================ */

/* Theme toggle wrapper */
.theme-toggle-wrapper {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Theme toggle button */
.theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.625rem;
  color: var(--q-text-secondary, #94a3b8);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--q-text-primary, #f1f5f9);
}

/* Sun/moon icon visibility */
/* Light mode overrides for theme toggle */
html[data-theme="light"] .theme-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

html[data-theme="light"] .theme-toggle-wrapper {
  border-top-color: #e2e8f0;
}

/* ============================================================================
   AVATARS
   User avatars with initials and images
   ============================================================================ */

/* Base avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, var(--q-color-starlight, #00d4ff));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar sizes */
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-md {
  width: 36px;
  height: 36px;
  font-size: 0.8125rem;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-xl {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

/* User cell (for tables/lists) */
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: var(--q-text-primary, #f1f5f9);
  margin-bottom: 0.125rem;
}

.user-email {
  font-size: 0.75rem;
  color: var(--q-text-muted, #64748b);
}

/* Light mode overrides for user info */
html[data-theme="light"] .user-name {
  color: #0f172a;
}

html[data-theme="light"] .user-email {
  color: #64748b;
}

/* ============================================================================
   STATUS BADGES
   Status indicators with dots and labels
   ============================================================================ */

/* Base status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Status variants */
.status-active {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.status-pending {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.status-inactive {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

/* Simplified status for tables */
.status-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-active-dot { background-color: #34d399; }
.status-pending-dot { background-color: #fbbf24; }
.status-inactive-dot { background-color: #f87171; }

/* Role badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--q-text-secondary, #94a3b8);
}

.role-admin {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  color: var(--q-color-starlight, #00d4ff);
}

.role-moderator {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* Count badge */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(135deg, var(--q-color-starlight, #00d4ff), #3b82f6);
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
}

/* Label/tag */
.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.label-work {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.label-personal {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.label-important {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Light mode overrides for badges */
html[data-theme="light"] .status-active {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

html[data-theme="light"] .status-pending {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

html[data-theme="light"] .status-inactive {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

html[data-theme="light"] .role-badge {
  background: #f1f5f9;
  color: #475569;
}

html[data-theme="light"] .role-admin {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%);
  color: #0284c7;
}

html[data-theme="light"] .label-work {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

html[data-theme="light"] .label-personal {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

html[data-theme="light"] .label-important {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* ============================================================================
   SEARCH INPUTS
   Search boxes with integrated icons
   ============================================================================ */

/* Search input base handled in starlight.css */

.search-input::placeholder {
  color: var(--q-text-muted, #64748b);
}

/* Full-width search input */
.search-input-full {
  width: 100%;
}

/* Filter select (for table filters) */
.filter-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--q-text-secondary, #94a3b8);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--q-color-starlight-deep), 0 0 0 4px var(--q-color-starlight-blue);
  border-color: var(--q-color-starlight-blue);
}

/* Light mode overrides for search */
html[data-theme="light"] .filter-select {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

/* ============================================================================
   STATUS INDICATORS
   Online status and notification dots
   ============================================================================ */

/* Online status indicator */
.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid var(--q-bg-primary);
}

/* Away status indicator */
.away-indicator {
  background: #f59e0b;
}

/* Busy status indicator */
.busy-indicator {
  background: #ef4444;
}

/* Offline status indicator */
.offline-indicator {
  background: #64748b;
}

/* Generic dot component */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--q-text-muted, #64748b);
}

.blue-dot { background-color: #3b82f6; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.green-dot { background-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.red-dot { background-color: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }

/* Status dot variants */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--q-text-muted, #64748b);
}

.status-dot-online { 
  background-color: #10b981; 
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.status-dot-offline { 
  background-color: #64748b; 
}

.status-dot-away { 
  background-color: #f59e0b; 
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.status-dot-busy { 
  background-color: #ef4444; 
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Notification dot */
.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--q-bg-primary);
}

/* Notification badge with number */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--q-bg-primary);
}

/* Light mode overrides for indicators */
html[data-theme="light"] .online-indicator,
html[data-theme="light"] .notification-dot,
html[data-theme="light"] .notification-badge {
  border-color: var(--q-light-card-bg);
}

/* ============================================================================
   PAGINATION
   Table and list pagination controls
   ============================================================================ */

.pagination {
  display: flex;
  gap: 0.375rem;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--q-text-secondary, #94a3b8);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--q-text-primary, #f1f5f9);
}

.page-btn.active {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  color: var(--q-color-starlight, #00d4ff);
}

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

/* Light mode overrides for pagination */
html[data-theme="light"] .page-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

html[data-theme="light"] .page-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .page-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #2563eb;
}
/* ==========================================================================
   STARLIGHT BRANDED COMPONENTS 
   (Migrated from email-client.css)
   ========================================================================== */

/* User / Avatar Components */
user-cell { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
user-avatar { 
    width: 2.5rem; height: 2.5rem; border-radius: 50%; 
    background: var(--q-color-border-strong, #1e293b); color: #f1f5f9;
    display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; 
}
user-avatar.sm { width: 2.25rem; height: 2.25rem; font-size: 0.875rem; }
user-avatar.lg { width: 3rem; height: 3rem; font-size: 1.125rem; }
html[data-theme="light"] user-avatar { background: #e2e8f0; color: #64748b; }

user-info { display: flex; flex-direction: column; min-width: 0; }
user-name { font-size: 0.875rem; font-weight: 600; }
user-email { font-size: 0.75rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="light"] user-name { color: #0f172a; }

/* Branded Labels */
email-label { padding: 0.25rem 0.5rem; border-radius: 0.375rem; font-size: 0.75rem; font-weight: 600; }
email-label.work { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
email-label.personal { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
email-label.important { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* Branded Attachment Cards */
attachment-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.05); cursor: pointer; transition: background 0.2s ease; min-width: 240px;
}
attachment-card:hover { background: rgba(255, 255, 255, 0.1); }
html[data-theme="light"] attachment-card { 
  background: var(--q-light-card-bg); 
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0; 
}

file-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }
file-icon.pdf { background-color: rgba(239, 68, 68, 0.2); color: #f87171; }
file-icon.excel { background-color: rgba(34, 197, 94, 0.2); color: #4ade80; }

file-info { display: flex; flex-direction: column; }
file-name { font-size: 0.875rem; font-weight: 500; }
file-size { font-size: 0.75rem; color: #64748b; }

/* ============================================================================
   CSS-ONLY HORIZONTAL NAVIGATION
   Glassmorphic header with dropdown and mobile drawer
   ============================================================================ */

/* Mobile toggle checkbox - hidden but functional */
.nav-toggle { display: none; }

/* Nav Header */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .nav-header {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--q-light-card-border, rgba(0, 0, 0, 0.08));
}

/* Brand */
.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.03em;
  color: var(--q-text-primary, #f1f5f9);
}

/* Logo */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  color: var(--q-text-primary, #f1f5f9);
}

html[data-theme="light"] .nav-logo {
  color: var(--q-light-text, #1e293b);
}

/* Starlight logo mark - circular gradient icon */
.nav-logo-mark,
.nav-logo > i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

.nav-logo-mark {
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
}

.nav-logo > i {
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .nav-logo > i {
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
}

html[data-theme="light"] .nav-logo-mark {
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
}

html[data-theme="light"] .nav-logo > i {
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
}

/* Desktop nav links */
.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links > a,
.nav-dropdown summary {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: .625rem;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--q-text-secondary, rgba(255,255,255,0.6));
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, background .15s;
  white-space: nowrap;
  list-style: none;
  user-select: none;
  position: relative;
}

.nav-links > a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--q-color-starlight-blue);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-links > a:hover::after,
.nav-links > a.active::after {
  width: 80%;
  box-shadow: 0 0 10px var(--q-color-starlight-glow);
}

.nav-links > a:hover,
.nav-dropdown summary:hover {
  color: var(--q-text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-links > a:hover,
html[data-theme="light"] .nav-dropdown summary:hover {
  color: var(--q-light-text, #1e293b);
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .nav-links > a,
html[data-theme="light"] .nav-dropdown summary {
  color: var(--q-text-muted, #64748b);
}

html[data-theme="light"] .nav-links > a:hover,
html[data-theme="light"] .nav-dropdown summary:hover {
  color: var(--q-light-text, #1e293b);
  background: rgba(0, 0, 0, 0.05);
}

/* Dropdown chevron */
.nav-dropdown summary::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5l4 4 4-4' stroke='%23676a7c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .2s;
  flex-shrink: 0;
}

.nav-dropdown[open] > summary::after {
  transform: rotate(180deg);
}

.nav-dropdown[open] > summary {
  color: var(--q-text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-dropdown[open] > summary {
  color: var(--q-light-text, #1e293b);
}

/* Hide native marker */
.nav-dropdown summary::-webkit-details-marker,
.nav-dropdown summary::marker { display: none; }

/* Dropdown container */
.nav-dropdown {
  position: relative;
}

/* Dropdown panel */
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 180px;
  isolation: isolate;
  background-color: rgb(15,15,25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: .625rem;
  padding: .4rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: dropIn .18s ease;
  z-index: 50;
}

html[data-theme="light"] .nav-dropdown-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--q-text-secondary, rgba(255,255,255,0.6));
  text-decoration: none;
  transition: color .12s, background .12s;
}

html[data-theme="light"] .nav-dropdown-panel a {
  color: var(--q-text-muted, #64748b);
}

.nav-dropdown-panel a:hover {
  color: var(--q-text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-dropdown-panel a:hover {
  color: var(--q-light-text, #1e293b);
  background: rgba(0, 0, 0, 0.05);
}

.nav-dropdown-panel a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: background .12s;
}

html[data-theme="light"] .nav-dropdown-panel a::before {
  background: rgba(0, 0, 0, 0.15);
}

.nav-dropdown-panel a:hover::before {
  background: var(--q-color-starlight-blue);
}

/* Profile avatar */
.nav-profile {
  flex-shrink: 0;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
  text-decoration: none;
  font-weight: 700;
  font-size: .8rem;
  color: var(--q-color-starlight-deep, #0f172a);
  position: relative;
  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.3),
              inset 0 0.125em 0.25em rgba(255, 255, 255, 0.4),
              inset 0 -0.125em 0.25em rgba(0, 0, 0, 0.2);
}

.nav-profile::before {
  content: '';
  position: absolute;
  left: 10%;
  top: 5%;
  width: 80%;
  height: 35%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.1));
  border-radius: 50% 50% 40% 40%;
  pointer-events: none;
}

.nav-profile::after {
  content: '';
  position: absolute;
  left: 15%;
  bottom: 15%;
  width: 70%;
  height: 20%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

html[data-theme="light"] .nav-profile {
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  color: var(--q-light-text, #1e293b);
  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.15),
              inset 0 0.125em 0.25em rgba(255, 255, 255, 0.5),
              inset 0 -0.125em 0.25em rgba(0, 0, 0, 0.1);
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: .625rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: hsla(0,0%,100%,.05);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

html[data-theme="light"] .nav-hamburger {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Hamburger icon */
.nav-hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-hamburger-icon span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--q-text-muted, rgba(255,255,255,0.5));
  border-radius: 2px;
  transition: transform .2s, opacity .2s, background .15s;
}

html[data-theme="light"] .nav-hamburger-icon span {
  background: var(--q-text-muted, #64748b);
}

.nav-hamburger:hover .nav-hamburger-icon span {
  background: var(--q-text-primary, #f1f5f9);
}

html[data-theme="light"] .nav-hamburger:hover .nav-hamburger-icon span {
  background: var(--q-light-text, #1e293b);
}

/* Animate hamburger to X when checked */
.nav-toggle:checked ~ .nav-header .nav-hamburger-icon span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle:checked ~ .nav-header .nav-hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked ~ .nav-header .nav-hamburger-icon span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 99;
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease;
  background-color: hsla(0,0%,100%,.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-drawer {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-toggle:checked ~ .nav-drawer {
  max-height: 400px;
}

.nav-drawer-inner {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.nav-drawer-inner a {
  display: block;
  padding: .65rem .85rem;
  border-radius: .625rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--q-text-secondary, rgba(255,255,255,0.6));
  text-decoration: none;
  transition: color .12s, background .12s;
}

html[data-theme="light"] .nav-drawer-inner a {
  color: var(--q-text-muted, #64748b);
}

.nav-drawer-inner a:hover {
  color: var(--q-text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .nav-drawer-inner a:hover {
  color: var(--q-light-text, #1e293b);
  background: rgba(0, 0, 0, 0.05);
}

.nav-drawer-section-label {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--q-text-muted, rgba(255,255,255,0.4));
  padding: .4rem .85rem .2rem;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .nav-header .nav-links,
  .nav-header .nav-profile {
    display: none;
  }

  .nav-hamburger {
    display: flex;
    margin-left: 0;
  }

  .nav-drawer {
    display: block;
  }

  .nav-header {
    display: flex;
    gap: 0.5rem;
  }

  .nav-logo,
  .nav-brand {
    order: 2;
  }

  .nav-hamburger {
    order: 1;
  }

  .theme-toggle,
  .nav-header > .flex.items-center {
    order: 3;
    margin-left: auto;
  }

  .nav-header > .flex.items-center {
    flex-direction: row !important;
  }
  
  .nav-header > .flex.items-center .theme-toggle {
    order: 1;
  }
  
  .nav-header > .flex.items-center > .btn-starlight {
    order: 2;
  }
}

/* ============================================================================
   STARLIGHT COMPONENTS (Merged from starlight.css)
   ============================================================================ */

/* Card - Starlight enhanced version */
.card {
  background: var(--q-color-surface);
  border: 1px solid var(--q-color-border);
  border-radius: var(--q-radius-2xl);
  padding: var(--q-space-10);
  position: relative;
  transition:
    border-color var(--q-duration-base) var(--q-ease-in-out),
    transform var(--q-duration-base) var(--q-ease-in-out),
    background-color var(--q-duration-base) var(--q-ease-in-out);
}

.card:hover {
  background-color: var(--q-color-surface-elevated);
}

html[data-theme="light"] .card {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(10px);
  border-color: var(--q-light-card-border);
  color: #334155;
  box-shadow: 
    0 10px 40px color-mix(in srgb, var(--q-color-primary), transparent 94%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

/* Glass - Starlight enhanced version */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 30px color-mix(in srgb, var(--q-color-starlight-blue), transparent 75%);
  transition: all 0.3s ease;
  border-radius: 1rem;
  padding: 1.5rem;
}

.glass:hover {
  border-color: var(--q-color-starlight-blue);
  box-shadow: 0 0 40px color-mix(in srgb, var(--q-color-starlight-blue), transparent 60%);
}

html[data-theme="light"] .glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%));
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .glass:hover {
  border-color: var(--q-color-starlight-blue);
  box-shadow:
    0 12px 40px 0 rgba(31, 38, 135, 0.1),
    0 0 20px color-mix(in srgb, var(--q-color-starlight-blue), transparent 80%),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

html[data-theme="light"] .starlight-card {
  border-color: rgba(0, 0, 0, 0.12);
}

/* Glass Blue Glow variant */
.glow-blue {
  box-shadow:
    0 0 30px color-mix(in srgb, var(--q-color-starlight-blue), transparent 65%),
    0 0 60px color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
}

.glow-blue:hover {
  box-shadow:
    0 0 40px color-mix(in srgb, var(--q-color-starlight-blue), transparent 50%),
    0 0 80px color-mix(in srgb, var(--q-color-starlight-blue), transparent 80%);
}

/* Input - Starlight glass version */
.input,
.textarea,
.select {
  background-color: rgb(255 255 255 / 4%);
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 0.75rem;
  color: inherit;
  width: 100%;
  padding: 0.75rem 1.25rem;
}

.select:hover {
  background-color: rgb(255 255 255 / 8%);
  border-color: var(--q-color-starlight-blue);
}

textarea.input,
.textarea {
  min-height: 120px;
  display: block;
}

html[data-theme="light"] .input,
html[data-theme="light"] .textarea,
html[data-theme="light"] .select {
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  box-shadow:
    0 0 0 2px var(--q-color-starlight-deep),
    0 0 0 4px var(--q-color-starlight-blue);
  border-color: var(--q-color-starlight-blue);
}

/* Select Starlight */
.select-starlight {
  appearance: none;
  line-height: normal;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  padding-left: 1.25rem !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem !important;
}

html[data-theme="light"] .select-starlight {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e293b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

/* Range Starlight */
.range-starlight {
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--q-color-border-strong);
  border-radius: 2px;
  outline: none;
}

.range-starlight::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--q-color-starlight-blue);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--q-color-starlight-blue);
  transition: all 0.2s;
}

.range-starlight::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--q-color-starlight-blue);
}

.range-starlight::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--q-color-starlight-blue);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--q-color-starlight-blue);
  border: none;
}

html[data-theme="light"] .range-starlight {
  background: rgb(0 0 0 / 10%);
}

html[data-theme="light"] .range-starlight::-webkit-slider-thumb {
  background: var(--q-color-starlight-blue, #00d4ff);
  box-shadow: 0 0 10px var(--q-color-starlight-blue, #00d4ff);
}

/* Toggle Starlight */
.toggle-starlight {
  width: 3.5rem;
  height: 1.75rem;
}

.toggle-starlight .toggle-slider::before {
  height: 1.25rem;
  width: 1.25rem;
  top: 0.25rem;
  left: 0.25rem;
}

.toggle-starlight input:checked + .toggle-slider::before {
  transform: translateX(1.75rem);
}

.toggle-starlight .toggle-slider {
  background: var(--q-color-border-strong);
  border: 1px solid var(--q-color-border-strong);
}

html[data-theme="light"] .toggle-starlight .toggle-slider {
  background: rgb(0 0 0 / 10%);
  border-color: rgb(0 0 0 / 15%);
}

html[data-theme="light"] .toggle-starlight input:checked + .toggle-slider {
  background: var(--q-color-starlight-blue);
  border-color: var(--q-color-starlight-blue);
}

/* Checkboxes & Radio Buttons - Starlight */
.checkbox-starlight,
.radio-starlight {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--q-color-border);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radio-starlight {
  border-radius: 50%;
}

html[data-theme="light"] .checkbox-starlight,
html[data-theme="light"] .radio-starlight {
  border-color: rgb(0 0 0 / 20%);
  background: rgb(0 0 0 / 5%);
}

.checkbox-starlight:checked,
.radio-starlight:checked {
  background: var(--q-color-starlight-blue);
  border-color: var(--q-color-starlight-blue);
}

.checkbox-starlight:checked::after {
  content: "✓";
  color: black;
  font-size: 0.8rem;
  font-weight: 900;
}

.radio-starlight:checked::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: black;
  border-radius: 50%;
}

/* Tooltips */
.has-tooltip {
  position: relative;
}

.has-tooltip .tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 0.5rem 0.75rem;
  background-color: rgb(10 10 30 / 98%);
  backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  border-radius: 0.5rem;
  color: #f1f5f9;
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 800;
  box-shadow: 0 4px 15px rgb(0 0 0 / 40%);
}

.has-tooltip:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Starlight Stars (Atmospheric Background) */
.starlight-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: var(--q-bg-primary);
  overflow: hidden;
  contain: strict;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.3;
  z-index: -1;
  animation: star-twinkle var(--q-twinkle-duration, 3s) infinite ease-in-out;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

html[data-theme="light"] .star {
  background: var(--q-color-starlight-blue);
  opacity: 0.15;
}

/* Dialog & Overlays */
.window-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.window {
  position: absolute;
  border: 1px solid var(--q-window-border, var(--q-color-border));
  border-radius: var(--q-window-radius, 1.75rem);
  background: var(--q-window-bg, var(--q-color-surface));
  box-shadow: var(--q-window-shadow, 0 25px 50px -12px rgb(0 0 0 / 35%));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 17.5rem;
  min-height: 14rem;
  backdrop-filter: var(--q-window-backdrop, blur(24px) saturate(135%));
  -webkit-backdrop-filter: var(--q-window-backdrop, blur(24px) saturate(135%));
}

.window.focused {
  border-color: var(--q-window-border-focus, var(--q-color-border-strong));
  box-shadow: var(--q-window-shadow-focus, 0 32px 72px rgb(0 0 0 / 42%));
}

.window.minimized {
  display: none;
}

.window.maximized {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

.window.dragging {
  cursor: grabbing;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--q-window-header-padding, 0.875rem 1.125rem);
  border-bottom: 1px solid var(--q-window-divider, var(--q-color-border));
  background: var(--q-window-header-bg, color-mix(in srgb, var(--q-window-bg, var(--q-color-surface)), white 4%));
  cursor: grab;
  touch-action: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.window-title strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.window-title span {
  display: block;
  color: var(--q-window-muted, var(--q-text-muted));
  font-size: 0.8rem;
}

.window-traffic {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-control {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 0;
  box-shadow: none !important;
}

.window-control.is-close {
  background: #ff6f61;
}

.window-control.is-minimize {
  background: #ffcc5c;
}

.window-control.is-maximize {
  background: #4cd964;
}

.window-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--q-window-body-padding, 1.125rem);
  touch-action: auto;
}

.window-resize {
  position: absolute;
  right: 0.75rem;
  bottom: 0.625rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.375rem;
  cursor: nwse-resize;
  opacity: 0.7;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 35%, rgb(255 255 255 / 20%) 36%, transparent 37%) 0 0 / 100% 100%,
    linear-gradient(135deg, transparent 58%, rgb(255 255 255 / 34%) 59%, transparent 60%) 0 0 / 100% 100%;
}

@media (max-width: 53.75rem) {
  .window-stack {
    display: grid;
    gap: 1.125rem;
    height: auto;
    overflow: visible;
    align-content: start;
  }

  .window {
    display: block;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    max-width: 100%;
  }

  .window.maximized {
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    border-radius: var(--q-window-radius, 1.75rem);
  }

  .window-body {
    display: block;
    flex: none;
    height: auto !important;
    min-height: 0;
    overflow: visible;
  }

  .window-resize {
    display: none;
  }
}

/* Light mode window overrides */
html[data-theme="light"] .window {
  --q-window-bg: var(--q-light-card-bg);
  --q-window-border: var(--q-light-card-border);
  --q-window-shadow: 0 10px 40px rgb(0 0 0 / 12%);
  --q-window-header-bg: #fff;
  --q-window-divider: var(--q-surface-border);
  --q-window-muted: var(--q-light-text-muted);
}

html[data-theme="light"] .window-header {
  background: #fff;
}

html[data-theme="light"] .window-resize {
  background:
    linear-gradient(135deg, transparent 35%, rgb(0 0 0 / 10%) 36%, transparent 37%) 0 0 / 100% 100%,
    linear-gradient(135deg, transparent 58%, rgb(0 0 0 / 15%) 59%, transparent 60%) 0 0 / 100% 100%;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.dialog-content {
  background-color: rgb(10 10 20 / 98%);
  backdrop-filter: blur(20px);
  border: 1px solid var(--q-color-border-strong);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 90%;
  width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 50%);
  position: relative;
}

.dialog {
  background-color: rgb(10 10 20 / 98%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--q-color-border-strong);
  border-radius: 1.5rem;
  padding: 3rem;
  max-height: 85vh;
  overflow-y: auto;
  margin: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 50%);
}

/* Custom scrollbar for dialogs */
.dialog-content::-webkit-scrollbar,
.dialog::-webkit-scrollbar {
  width: 8px;
}

.dialog-content::-webkit-scrollbar-track,
.dialog::-webkit-scrollbar-track {
  background: var(--q-color-border);
  border-radius: 4px;
}

.dialog-content::-webkit-scrollbar-thumb,
.dialog::-webkit-scrollbar-thumb {
  background: var(--q-color-starlight-blue, #3b82f6);
  border-radius: 4px;
}

html[data-theme="light"] .dialog-content::-webkit-scrollbar-track,
html[data-theme="light"] .dialog::-webkit-scrollbar-track {
  background: rgb(0 0 0 / 5%);
}

html[data-theme="light"] .dialog {
  background-color: var(--q-light-card-bg);
  backdrop-filter: blur(24px);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.dialog-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--q-color-border);
  border: 1px solid var(--q-color-border-strong);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

html[data-theme="light"] .dialog-close {
  background: rgb(0 0 0 / 5%);
  border-color: rgb(0 0 0 / 10%);
  color: #1e293b;
}

.dialog-close:hover {
  background: rgb(255 255 255 / 15%);
  border-color: var(--q-color-starlight-blue);
  transform: rotate(90deg);
}

html[data-theme="light"] .dialog-overlay {
  background: rgb(255 255 255 / 40%);
}

html[data-theme="light"] .dialog-content {
  background-color: rgb(255 255 255 / 98%);
  border-color: rgb(0 0 0 / 10%);
  color: #1e293b;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 15%);
}

/* Dropdown Menu - Starlight version */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(8, 8, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--q-color-border-strong);
  border-radius: 0.75rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 200px;
  z-index: 600;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: backdrop-filter, transform, opacity;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  color: var(--q-text-primary, rgba(255, 255, 255, 0.7));
  transition: all 0.2s ease;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--q-color-primary);
  color: black;
}

html[data-theme="light"] .dropdown-menu {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .dropdown-item {
  color: #475569;
}

html[data-theme="light"] .dropdown-item:hover {
  background-color: var(--q-color-starlight-blue);
  color: black;
}

/* Accordion - Starlight version */
.accordion-item {
  background: rgb(255 255 255 / 2%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--q-radius-xl);
  margin-bottom: var(--q-space-4);
  transition: all var(--q-transition-base);
  position: relative;
}

.accordion-item:hover {
  border-color: color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
  background: rgb(255 255 255 / 4%);
  box-shadow: 0 0 20px color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%);
}

.accordion-item.active {
  border-color: var(--q-color-starlight-blue);
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  box-shadow:
    0 0 30px color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%),
    inset 0 0 20px color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%);
}

.accordion-header {
  background: transparent !important;
  padding: var(--q-space-6) var(--q-space-8);
  color: white;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.125rem;
}

.accordion-item.active .accordion-header {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--q-color-starlight-peach), transparent 55%),
    color-mix(in srgb, var(--q-color-starlight-blue), transparent 55%)
  ) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--q-color-starlight-blue), transparent 80%);
}

.accordion-content {
  background: linear-gradient(to bottom, rgb(0 0 0 / 30%), rgb(0 0 0 / 10%)) !important;
  color: rgb(255 255 255 / 60%) !important;
  font-size: 1rem;
  line-height: 1.8;
  padding: 0;
}

.accordion-item.active .accordion-content {
  padding: var(--q-space-6) var(--q-space-8);
}

.accordion-icon {
  color: var(--q-color-starlight-blue);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--q-color-starlight-blue), transparent 50%));
}

html[data-theme="light"] .accordion-item {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(8px);
  border-color: #e2e8f0;
}

html[data-theme="light"] .accordion-item.active {
  border-color: var(--q-color-starlight-blue);
  background: #f8fafc;
}

html[data-theme="light"] .accordion-header {
  color: #1e293b;
}

html[data-theme="light"] .accordion-content {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* Search - Starlight version */
.search-container,
.search {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--q-radius-xl);
  transition: all var(--q-duration-base) var(--q-ease-in-out);
  overflow: visible !important;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Prevent shrinking on active/press */
.search:active,
.search-container:active,
.search-input:active {
  transform: none !important;
}

.search:focus-within {
  box-shadow:
    0 0 0 1px var(--q-color-starlight-blue),
    inset 0 0 15px color-mix(in srgb, var(--q-color-starlight-blue), transparent 60%),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  border-color: var(--q-color-starlight-blue);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

html[data-theme="light"] .search-container:focus-within,
html[data-theme="light"] .search:focus-within {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%));
  border-bottom-color: var(--q-color-starlight-blue);
  border-top-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.04),
    inset 0 0 12px color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
}

.search-container input:focus,
.search input:focus {
  box-shadow: none !important;
  outline: none !important;
}

.search-input {
  width: 100%;
  border-radius: inherit;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
}

html[data-theme="light"] .search {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.search.has-icon .search-input {
  padding-left: 3rem !important;
}

.search .icon-search,
.search [class^="icon-"],
.search [class*=" icon-"] {
  position: absolute !important;
  left: 1.125rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--q-text-muted) !important;
  pointer-events: none;
  width: 1.25rem !important;
  height: 1.25rem !important;
  z-index: 10;
  background-color: var(--q-text-muted) !important;
}

html[data-theme="light"] .search .icon-search,
html[data-theme="light"] .search [class^="icon-"],
html[data-theme="light"] .search [class*=" icon-"] {
  color: #64748b !important;
  background-color: #64748b !important;
}

.search-icon {
  position: absolute;
  left: 1.125rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--q-text-muted);
  pointer-events: none;
  width: 1.25rem;
  height: 1.25rem;
  z-index: 10;
}

html[data-theme="light"] .search-icon {
  color: #64748b;
}

/* Code Window */
.code-window {
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--q-color-border-strong);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 50%);
}

.code-window-header {
  background: var(--q-color-border);
  border-bottom: 1px solid var(--q-color-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-window-controls {
  display: flex;
  gap: 0.5rem;
}

.code-window-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  opacity: 0.6;
}

.code-window-dot:nth-child(1) { background: #ff5f56; }
.code-window-dot:nth-child(2) { background: #ffbd2e; }
.code-window-dot:nth-child(3) { background: #27c93f; }

.code-window-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgb(255 255 255 / 40%);
}

html[data-theme="light"] .code-window {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 10px 30px rgb(0 0 0 / 5%);
}

html[data-theme="light"] .code-window-header {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html[data-theme="light"] .code-window-title {
  color: #94a3b8;
}

/* Gallery - Starlight version */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--q-space-4);
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--q-radius-xl);
  overflow: hidden;
  background: var(--q-glass-bg);
  border: 1px solid var(--q-glass-border);
  cursor: pointer;
  transition: all var(--q-transition-base);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--q-transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover {
  border-color: var(--q-color-starlight-blue);
  box-shadow: 0 0 20px var(--q-color-starlight-glow);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 80%), transparent);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white !important;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--q-space-6);
}

/* Stat Card - Starlight version */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--q-radius-xl);
  transition: all 0.3s ease;
}

html[data-theme="light"] .stat-card {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(10px);
  border-color: var(--q-light-card-border);
  box-shadow: 
    0 10px 30px color-mix(in srgb, var(--q-color-primary), transparent 95%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

.stat-card:hover {
  background: var(--q-color-border);
  border-color: rgb(255 255 255 / 12%);
}

html[data-theme="light"] .stat-card:hover {
  background: color-mix(in srgb, var(--q-light-card-bg), white 5%);
  box-shadow: 
    0 15px 35px color-mix(in srgb, var(--q-color-primary), transparent 90%),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--q-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 60%);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

html[data-theme="light"] .stat-label {
  color: #64748b;
}

.stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-trend.up { color: var(--q-color-success); }
.stat-trend.down { color: var(--q-color-error); }

/* Avatar - Starlight version */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--q-color-starlight-blue), #3b82f6);
  flex-shrink: 0;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.625rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.75rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 0.875rem; }
.avatar-xl { width: 4rem; height: 4rem; font-size: 1.125rem; }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-online::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.75rem;
  height: 0.75rem;
  background: #10b981;
  border: 2px solid var(--q-color-starlight-deep);
  border-radius: 50%;
}

/* Breadcrumb - Starlight version */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb-item {
  color: rgb(255 255 255 / 60%);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: var(--q-color-starlight-blue);
}

.breadcrumb-separator {
  color: rgb(255 255 255 / 40%);
}

.breadcrumb-current {
  color: inherit;
  font-weight: 500;
}

html[data-theme="light"] .breadcrumb-item {
  color: #64748b;
}

html[data-theme="light"] .breadcrumb-separator {
  color: #94a3b8;
}

/* Timeline Component */
.timeline {
  position: relative;
  padding: 2rem 0;
  container-type: inline-size;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--q-color-starlight-blue), transparent);
}

@container (min-width: 35rem) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  padding-left: 2.5rem;
}

@container (min-width: 35rem) {
  .timeline-item {
    width: 50%;
    padding-left: 0;
  }

  .timeline-item:nth-child(odd) {
    padding-right: 3.5rem;
    text-align: right;
  }

  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 3.5rem;
  }
}

.timeline-dot {
  position: absolute;
  left: -5px;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--q-color-starlight-blue);
  box-shadow: 0 0 10px var(--q-color-starlight-glow);
  z-index: 1;
}

@container (min-width: 35rem) {
  .timeline-dot {
    left: auto;
    right: -6px;
  }

  .timeline-item:nth-child(even) .timeline-dot {
    left: -6px;
    right: auto;
  }
}

.timeline-content {
  background: var(--q-color-surface);
  border: 1px solid var(--q-color-border);
  border-radius: var(--q-radius-xl);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--q-color-starlight-blue);
  transform: translateY(-2px);
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--q-color-starlight-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

/* Text Utilities */
.text-glow {
  text-shadow:
    0 0 10px color-mix(in srgb, var(--q-color-starlight-blue), transparent 50%),
    0 0 20px color-mix(in srgb, var(--q-color-starlight-blue), transparent 40%);
}

.text-glass {
  color: rgb(255 255 255 / 60%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html[data-theme="light"] .text-glow {
  text-shadow: 0 0 8px color-mix(in srgb, var(--q-color-starlight-blue), transparent 70%);
}

html[data-theme="light"] .text-glass {
  color: rgb(0 0 0 / 50%);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(to right, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 40%, var(--q-color-starlight-blue) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="light"] .text-success { color: #059669; }
html[data-theme="light"] .text-warning { color: #d97706; }

/* Blue Card */
.blue-card {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 95%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem;
  border-radius: var(--q-radius-xl);
  border: 1px solid var(--q-color-starlight-blue);
  font-size: 1.25rem;
  color: var(--q-text-primary);
  margin: 0;
}

html[data-theme="light"] .blue-card {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 90%);
}

/* H2 Accent Bar */
h2.has-accent,
h2:has(.accent-bar) {
  display: flex;
  align-items: center;
  gap: 1rem;
}

h2.text-center { justify-content: center; }

h2 .accent-bar {
  width: 0.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 0, var(--q-color-starlight-blue) 100%);
  border-radius: 9999px;
  box-shadow: 0 0 15px color-mix(in srgb, var(--q-color-starlight-blue), transparent 50%);
}

html[data-theme="light"] h2 .accent-bar {
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 40%, var(--q-color-starlight-blue) 100%) !important;
}

/* Skeleton Loading - Starlight variant */
.starlight-loading {
  background: linear-gradient(90deg, rgb(255 255 255 / 3%) 25%, rgb(255 255 255 / 8%) 50%, rgb(255 255 255 / 3%) 75%);
  background-size: 200% 100%;
  animation: starlight-shimmer 2s infinite linear;
  border-radius: var(--q-radius-md);
  min-height: 1rem;
}

@keyframes starlight-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

html[data-theme="light"] .starlight-loading {
  background: linear-gradient(90deg, rgb(0 0 0 / 3%) 25%, rgb(0 0 0 / 6%) 50%, rgb(0 0 0 / 3%) 75%);
  background-size: 200% 100%;
}

/* Light mode gradient overrides for buttons */
html[data-theme="light"] .bg-starlight,
html[data-theme="light"] .bg-starlight:hover,
html[data-theme="light"] .hover\:bg-starlight:hover,
html[data-theme="light"] .btn-starlight,
html[data-theme="light"] .btn-starlight:hover,
html[data-theme="light"] .hover\:btn-starlight:hover,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 40%, var(--q-color-starlight-blue) 100%) !important;
}

html[data-theme="light"] .dialog-content .bg-black_40 {
  background-color: rgb(0 0 0 / 5%);
  border-color: rgb(0 0 0 / 10%);
}

/* Nav Glass */
.nav-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--q-color-border-strong);
  background-clip: border-box;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
}

.nav-glass:hover {
  background-color: var(--q-color-border-strong);
}

html[data-theme="light"] .nav-glass {
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgb(0 0 0 / 8%);
  box-shadow: 0 4px 12px rgb(0 0 0 / 3%);
}

html[data-theme="light"] .nav-glass:hover {
  background-color: rgba(255, 255, 255, 0.98);
}

/* Nav Menu Mobile - Light mode */
html[data-theme="light"] .nav-menu-mobile {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .nav-menu-mobile a {
  color: #1e293b;
}

html[data-theme="light"] .nav-menu-mobile a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #2563eb;
}

html[data-theme="light"] .nav-menu-mobile li:last-child {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* Layout Presets - Light mode */
html[data-theme="light"] .email-nav,
html[data-theme="light"] .music-nav,
html[data-theme="light"] .chat-sidebar,
html[data-theme="light"] .admin-sidebar,
html[data-theme="light"] .analytics-sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .music-footer {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* Nav Container */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Nav Desktop */
.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
  }
}

/* Nav List */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-list.vertical {
  flex-direction: column;
  gap: 0.5rem;
}

/* Nav Link */
.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--q-text-secondary);
  transition: all 0.2s ease;
  position: relative;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--q-color-starlight-blue);
}

.nav-link.active {
  color: var(--q-color-starlight-blue);
}

.nav-list.vertical .nav-link {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.nav-list.vertical .nav-link:hover {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
}

.nav-list.vertical .nav-link.active {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
  border-left: 3px solid var(--q-color-starlight);
}

html[data-theme="light"] .nav-list.vertical .nav-link.active {
  background: rgba(0, 0, 0, 0.05);
  border-left-color: var(--q-color-starlight-blue);
}

/* Override nav-header/nav-links hover/active to match aside-nav */
.nav-links > a:hover,
.nav-dropdown summary:hover {
  color: var(--q-color-starlight);
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
}

.nav-dropdown[open] > summary {
  color: var(--q-color-starlight);
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
}

.nav-dropdown-panel a:hover {
  color: var(--q-color-starlight);
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--q-color-starlight-blue);
  transition: all var(--q-duration-slow) var(--q-ease-in-out);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
  box-shadow: 0 0 10px var(--q-color-starlight-glow);
}

/* Mobile Menu */
.nav-menu-mobile {
  display: none;
  position: absolute;
  top: 6rem;
  left: 0;
  width: 100%;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 40;
}

.nav-menu-mobile ul {
  list-style: none;
  padding: 2rem 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-menu-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-menu-mobile li { width: 100%; }

.nav-menu-mobile a {
  display: block;
  width: 100%;
  color: var(--q-text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.125rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s;
  position: relative;
}

.nav-menu-mobile a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--q-color-primary);
  transition: all 0.4s ease-in-out;
  transform: translateX(-50%);
}

.nav-menu-mobile a:hover {
  background: var(--q-highlight-bg);
  color: var(--q-color-primary);
}

.nav-menu-mobile a:hover::after {
  width: 80%;
  box-shadow: 0 0 10px var(--q-color-starlight-glow);
}

.nav-menu-mobile li:last-child {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu-mobile button { width: 100%; }

.nav-menu-mobile.active { display: block; }

/* Hamburger */
.hamburger {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: var(--q-color-border);
  border: 1px solid var(--q-color-border-strong);
  border-radius: 0.5rem;
  padding: 0.5rem;
  transition: all 0.3s;
  z-index: 50;
}

html[data-theme="light"] .hamburger {
  background: rgb(0 0 0 / 2%);
  border-color: rgb(0 0 0 / 10%);
}

.hamburger:hover {
  background: var(--q-color-border-strong);
  border-color: var(--q-color-starlight-blue);
}

html[data-theme="light"] .hamburger:hover {
  background: rgb(0 0 0 / 10%);
}

.hamburger span {
  width: 1.5rem;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
  transform-origin: center;
}

html[data-theme="light"] .hamburger span { background: #1e293b; }

.hamburger.active span {
  background-color: var(--q-color-starlight-blue);
  box-shadow: 0 0 10px var(--q-color-starlight-glow);
}

/* Nav Layout Modifiers */
.nav-reverse > div { flex-direction: row-reverse !important; }

.nav-center > div {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

@media (width < 768px) {
  .hamburger-left { order: -1; }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   ASIDE NAV (Merged from starlight.css)
   ============================================================================ */

.aside-nav {
  width: 260px;
  flex-shrink: 0;
  height: 100%;
  background-color: hsla(0, 0%, 100%, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.aside-nav-trigger { display: none; }

html[data-theme="light"] .aside-nav {
  background: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(0, 0, 0, 0.08);
}

.aside-nav-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

html[data-theme="light"] .aside-nav-header { border-bottom-color: rgba(0, 0, 0, 0.08); }

.aside-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

html[data-theme="light"] .aside-nav-icon {
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
}

.aside-nav-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .aside-nav-icon i { color: #fff; }

.aside-nav-brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--q-text-primary, #f1f5f9);
  font-weight: 700;
}

html[data-theme="light"] .aside-nav-brand strong { color: var(--q-light-text, #1e293b); }

.aside-nav-brand span {
  font-size: 0.72rem;
  color: var(--q-text-muted, #64748b);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.aside-nav-inner {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.aside-nav-section { padding: 0 0.75rem 0.5rem; }

.aside-nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--q-text-muted, rgba(255, 255, 255, 0.4));
  padding: 0.6rem 0.5rem 0.3rem;
  display: block;
}

html[data-theme="light"] .aside-nav-label { color: var(--q-text-muted, #64748b); }

.aside-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--q-text-secondary, rgba(255, 255, 255, 0.6));
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  position: relative;
}

.aside-nav-item:hover {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
}

html[data-theme="light"] .aside-nav-item { color: var(--q-light-text-muted, #64748b); }

html[data-theme="light"] .aside-nav-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--q-light-text, #1e293b);
}

.aside-nav-item.active {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .aside-nav-item.active {
  background: rgba(0, 0, 0, 0.05);
  color: var(--q-light-text, #1e293b);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.aside-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2.5px;
  border-radius: 0 2px 2px 0;
  background: var(--q-color-starlight);
  margin-left: -0.65rem;
}

html[data-theme="light"] .aside-nav-item.active::before { background: var(--q-color-starlight-blue); }

.aside-nav-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.12s;
}

.aside-nav-item:hover .aside-nav-item-icon,
.aside-nav-item.active .aside-nav-item-icon { opacity: 1; }

.aside-nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
  color: var(--q-color-starlight-deep, #0f172a);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.3),
              inset 0 0.0625em 0.125em rgba(255, 255, 255, 0.4),
              inset 0 -0.0625em 0.125em rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .aside-nav-badge {
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.1),
              inset 0 0.0625em 0.125em rgba(255, 255, 255, 0.5),
              inset 0 -0.0625em 0.125em rgba(0, 0, 0, 0.1);
}

.aside-nav-group > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--q-text-secondary, rgba(255, 255, 255, 0.6));
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s, color 0.12s;
  outline: none;
}

.aside-nav-group > summary::-webkit-details-marker,
.aside-nav-group > summary::marker { display: none; }

.aside-nav-group > summary:hover {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
}

html[data-theme="light"] .aside-nav-group > summary { color: var(--q-light-text-muted, #64748b); }

html[data-theme="light"] .aside-nav-group > summary:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--q-light-text, #1e293b);
}

.aside-nav-group[open] > summary {
  background: color-mix(in srgb, var(--q-color-starlight), transparent 85%);
  color: var(--q-color-starlight);
}

html[data-theme="light"] .aside-nav-group[open] > summary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--q-light-text, #1e293b);
}

.aside-nav-chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
  opacity: 0.5;
}

.aside-nav-group[open] .aside-nav-chevron {
  transform: rotate(90deg);
  opacity: 0.8;
}

.aside-nav-sub {
  padding-left: 1.5rem;
  margin-top: 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.aside-nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.5rem 0.75rem;
}

html[data-theme="light"] .aside-nav-divider { background: rgba(0, 0, 0, 0.08); }

.aside-nav-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html[data-theme="light"] .aside-nav-footer { border-top-color: rgba(0, 0, 0, 0.08); }

.aside-nav-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.5rem;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.12s;
}

.aside-nav-user:hover { background: rgba(255, 255, 255, 0.06); }
html[data-theme="light"] .aside-nav-user:hover { background: rgba(0, 0, 0, 0.05); }

.aside-nav-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--q-color-starlight-deep, #0f172a);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.3),
              inset 0 0.0625em 0.125em rgba(255, 255, 255, 0.4),
              inset 0 -0.0625em 0.125em rgba(0, 0, 0, 0.2);
}

.aside-nav-user-avatar::before {
  content: '';
  position: absolute;
  left: 10%;
  top: 5%;
  width: 80%;
  height: 35%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0.1));
  border-radius: 50% 50% 40% 40%;
  pointer-events: none;
}

html[data-theme="light"] .aside-nav-user-avatar {
  box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.15),
              inset 0 0.0625em 0.125em rgba(255, 255, 255, 0.5),
              inset 0 -0.0625em 0.125em rgba(0, 0, 0, 0.1);
}

.aside-nav-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.aside-nav-user-action {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 7px;
  transition: background 0.12s;
  cursor: pointer;
}

.aside-nav-user-action:hover { background: rgba(255, 255, 255, 0.06); }

.aside-nav-user-info strong {
  display: block;
  font-size: 0.825rem;
  color: var(--q-text-primary, #f1f5f9);
  font-weight: 600;
  line-height: 1.2;
}

html[data-theme="light"] .aside-nav-user-info strong { color: var(--q-light-text, #1e293b); }

.aside-nav-user-info span {
  font-size: 0.72rem;
  color: var(--q-text-muted, #64748b);
}

/* Aside Nav - Icon Only Mode */
.aside-nav.aside-nav-icons { width: 64px; }

.aside-nav.aside-nav-icons .aside-nav-header {
  padding: 1rem 0;
  justify-content: center;
  border-bottom: none;
}

.aside-nav.aside-nav-icons .aside-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="light"] .aside-nav.aside-nav-icons .aside-nav-icon {
  background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
}

.aside-nav.aside-nav-icons .aside-nav-icon svg,
.aside-nav.aside-nav-icons .aside-nav-icon i {
  width: 18px !important;
  height: 18px !important;
}

.aside-nav.aside-nav-icons .aside-nav-brand span { display: none; }

.aside-nav.aside-nav-icons .aside-nav-brand strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  margin-top: 0.25rem;
}

.aside-nav.aside-nav-icons .aside-nav-header {
  flex-direction: column;
  gap: 0.5rem;
}

.aside-nav.aside-nav-icons .aside-nav-inner { padding: 0.5rem 0; }
.aside-nav.aside-nav-icons .aside-nav-section { padding: 0 0.5rem 0.5rem; }
.aside-nav.aside-nav-icons .aside-nav-label { display: none; }

.aside-nav.aside-nav-icons .aside-nav-item {
  justify-content: center;
  padding: 0.625rem;
}

.aside-nav.aside-nav-icons .aside-nav-item span:not(.aside-nav-badge),
.aside-nav.aside-nav-icons .aside-nav-item > svg:not(.aside-nav-item-icon) { display: none; }

.aside-nav.aside-nav-icons .aside-nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.55rem;
  padding: 0.05rem 0.25rem;
  margin: 0;
  min-width: 14px;
  text-align: center;
}

.aside-nav.aside-nav-icons .aside-nav-group > summary {
  justify-content: center;
  padding: 0.625rem;
}

.aside-nav.aside-nav-icons .aside-nav-group > summary span,
.aside-nav.aside-nav-icons .aside-nav-group > summary > svg:not(.aside-nav-item-icon):not(.aside-nav-chevron) { display: none; }

.aside-nav.aside-nav-icons .aside-nav-chevron { display: none; }
.aside-nav.aside-nav-icons .aside-nav-sub { display: none; }
.aside-nav.aside-nav-icons .aside-nav-divider { margin: 0.25rem 0.25rem; }
.aside-nav.aside-nav-icons .aside-nav-footer { padding: 0.5rem; border-top: none; }

.aside-nav.aside-nav-icons .aside-nav-user {
  justify-content: center;
  padding: 0.5rem;
}

.aside-nav.aside-nav-icons .aside-nav-user-info { display: none; }

/* Responsive Aside Nav */
@media (max-width: 1280px) {
  .aside-nav {
    width: 64px;
    min-width: 64px;
  }

  .aside-nav details > *:not(summary) { display: none; }
  .aside-nav details > summary { justify-content: center; padding: 0.625rem; }
  .aside-nav details[open] > *:not(summary) { display: none; }

  .aside-nav .aside-nav-label,
  .aside-nav .nav-logo span,
  .aside-nav .aside-nav-brand,
  .aside-nav .aside-nav-brand *,
  .aside-nav .aside-nav-user-info,
  .aside-nav .aside-nav-item span:not(.aside-nav-badge),
  .aside-nav details > summary > span,
  .aside-nav details > summary > svg:not(.aside-nav-item-icon) { display: none !important; }

  .aside-nav .aside-nav-item-icon,
  .aside-nav summary > svg.aside-nav-item-icon,
  .aside-nav .aside-nav-user-avatar,
  .aside-nav .aside-nav-user-action,
  .aside-nav .nav-logo i { display: flex !important; }

  .aside-nav .aside-nav-header { justify-content: center; }
  .aside-nav .aside-nav-user-avatar { display: flex; justify-content: center; }

  .aside-nav .aside-nav-user {
    padding: 1rem 0;
    justify-content: center;
    border-bottom: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .aside-nav .aside-nav-user + .aside-nav-user-action { margin-top: 0.5rem; }
  .aside-nav.aside-nav-icons .aside-nav-footer { flex-direction: column; gap: 0.75rem; }
  .aside-nav .aside-nav-user-action { justify-content: center; display: flex; }
  .aside-nav .aside-nav-user > .ml-auto { margin-left: 0; margin-inline-start: auto; }

  .aside-nav .aside-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .aside-nav .aside-nav-icon svg,
  .aside-nav .aside-nav-icon i { width: 18px !important; height: 18px !important; }
  .aside-nav .aside-nav-inner { padding: 0.5rem 0; }
  .aside-nav .aside-nav-section { padding: 0 0.5rem 0.5rem; }
  .aside-nav .aside-nav-item { justify-content: center; padding: 0.625rem; }
  .aside-nav .aside-nav-group > summary { justify-content: center; padding: 0.625rem; }

  .aside-nav .aside-nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.55rem;
    padding: 0.05rem 0.25rem;
    margin: 0;
    min-width: 14px;
    text-align: center;
  }

  .aside-nav .aside-nav-divider { margin: 0.25rem 0.25rem; }

  .aside-nav .aside-nav-footer {
    padding: 0.5rem;
    border-top: none;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
  }

  .aside-nav .aside-nav-user { justify-content: center; padding: 0.5rem; }

  html[data-theme="light"] .aside-nav .aside-nav-icon {
    background: linear-gradient(135deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
  }
}

@media (max-width: 768px) {
  .aside-nav-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 201;
    position: absolute;
    top: 0;
    right: 0;
  }

  .aside-nav-trigger-icon {
    width: 20px;
    height: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .aside-nav-trigger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--q-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  #sidebar-toggle:checked ~ .aside-nav { transform: translateX(0); }

  .aside-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }

  .aside-nav .aside-nav-header { order: -1; justify-content: flex-start; }

  .aside-nav .aside-nav-label,
  .aside-nav .nav-logo span,
  .aside-nav .aside-nav-brand,
  .aside-nav .aside-nav-user-info,
  .aside-nav .aside-nav-item span:not(.aside-nav-badge),
  .aside-nav details > summary > span,
  .aside-nav details > summary > svg:not(.aside-nav-item-icon),
  .aside-nav .aside-nav-user-avatar,
  .aside-nav .aside-nav-user-action { display: flex !important; }

  .aside-nav .aside-nav-brand strong,
  .aside-nav .aside-nav-brand span { display: block !important; }
  .aside-nav details > *:not(summary) { display: flex !important; }
  .aside-nav details[open] > .aside-nav-sub { display: flex !important; }
  .aside-nav details summary svg { display: inline-flex !important; }

  .aside-nav .aside-nav-badge {
    display: flex;
    align-self: center;
    margin-left: auto;
    position: static;
  }

  .aside-nav .aside-nav-header {
    padding: 1.5rem 1.25rem 1rem;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .aside-nav .aside-nav-header .aside-nav-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .aside-nav .aside-nav-icon { width: 34px; height: 34px; }
  .aside-nav .aside-nav-item { justify-content: flex-start; padding: 0.5rem 0.65rem; }
  .aside-nav .aside-nav-user { justify-content: flex-start; flex-direction: row; }
  .aside-nav .aside-nav-user-action { justify-content: flex-start; }
  .aside-nav .aside-nav-footer { justify-content: flex-start; }

  #sidebar-toggle:checked ~ .app-layout .aside-nav,
  #sidebar-toggle-mobile:checked ~ .aside-nav { transform: translateX(0); }

  .aside-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 199;
    pointer-events: none;
    transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #sidebar-toggle:checked ~ .app-layout .aside-overlay,
  #sidebar-toggle-mobile:checked ~ .aside-overlay {
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
  }

  .aside-overlay { cursor: pointer; }
}

#sidebar-toggle,
#sidebar-toggle-mobile { display: none; }
.aside-overlay { display: none; }

/* ============================================================================
   LAYOUT PRESETS (Merged from starlight.css)
   ============================================================================ */

/* Email 3-column layout */
.email-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--q-color-border-strong);
  padding: 1rem;
  overflow-y: auto;
}

.email-feed {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--q-color-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--q-color-border-strong);
  overflow-y: auto;
}

.email-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* Music 2-column + footer layout */
.music-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--q-color-border-strong);
  padding: 1rem;
  overflow-y: auto;
}

.music-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.music-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--q-color-border-strong);
}

/* Chat 2-column layout */
.chat-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--q-color-border-strong);
  overflow: hidden;
}

.chat-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Admin 2-column layout */
.admin-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--q-color-border-strong);
  padding: 1rem;
  overflow-y: auto;
}

.admin-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* Analytics 2-column layout */
.analytics-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--q-color-border-strong);
  padding: 1rem;
  overflow-y: auto;
}

.analytics-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* Layout container classes */
.layout-email-3col {
  display: grid;
  height: 100vh;
  grid-template-columns: 280px 320px 1fr;
  overflow: hidden;
}

.layout-music-2col {
  display: grid;
  height: 100vh;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.layout-music-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}

.layout-chat-2col {
  display: grid;
  height: 100vh;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

.layout-admin-2col {
  display: grid;
  height: 100vh;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
}

.layout-analytics-2col {
  display: grid;
  height: 100vh;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}

/* ============================================================================
   UI COMPONENT PRESETS (Merged from starlight.css)
   ============================================================================ */

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--q-radius-lg);
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  color: var(--q-color-starlight-blue);
}

.stat-icon-green { background: rgb(16 185 129 / 15%); color: #10b981; }
.stat-icon-orange { background: rgb(245 158 11 / 15%); color: #f59e0b; }
.stat-icon-purple { background: rgb(139 92 246 / 15%); color: #8b5cf6; }
.stat-icon-pink { background: rgb(236 72 153 / 15%); color: #ec4899; }

.stat-trend-up { color: #10b981; }
.stat-trend-down { color: #ef4444; }

/* Starlight Theme Toggle */
.starlight-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--q-color-border);
  border: 1px solid var(--q-color-border-strong);
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.starlight-theme-toggle:hover {
  background: var(--q-color-border-strong);
  transform: scale(1.05);
}

.starlight-theme-toggle svg { width: 1.25rem; height: 1.25rem; }

/* Starlight Notification */
.starlight-notification {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.starlight-notification:hover { color: var(--q-color-starlight-blue); }

.starlight-notification-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: #ef4444;
  border-radius: 50%;
  animation: starlight-pulse 2s infinite;
}

@keyframes starlight-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Starlight Table */
.starlight-table-container {
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
}

html[data-theme="light"] .starlight-table-container {
  background: var(--q-light-card-bg);
  backdrop-filter: blur(16px);
  border-color: var(--q-light-card-border);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--q-color-primary), transparent 95%);
}

.starlight-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.starlight-table-title { font-size: 1.125rem; font-weight: 600; }
.starlight-table-filters { display: flex; gap: 0.5rem; }

.starlight-table {
  width: 100%;
  border-collapse: collapse;
}

.starlight-table th,
.starlight-table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--q-color-border);
}

.starlight-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(255 255 255 / 60%);
  background: rgb(255 255 255 / 2%);
}

html[data-theme="light"] .starlight-table th {
  color: #64748b;
  background: #f8fafc;
}

.starlight-table tr:hover td { background: rgb(255 255 255 / 3%); }

html[data-theme="light"] .starlight-table tr:hover td { 
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 96%); 
}

.starlight-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
  font-size: 0.875rem;
  color: rgb(255 255 255 / 60%);
}

html[data-theme="light"] .starlight-table-footer {
  border-top-color: #e2e8f0;
  color: #64748b;
}

/* Starlight Chart */
.starlight-chart {
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
}

.starlight-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--q-color-border);
}

.starlight-chart-title { font-size: 1rem; font-weight: 600; }

.starlight-chart-tabs { display: flex; gap: 0.25rem; }

.starlight-chart-tab {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: var(--q-radius-md);
  color: rgb(255 255 255 / 60%);
  cursor: pointer;
  transition: all 0.2s ease;
}

html[data-theme="light"] .starlight-chart-tab {
  color: #64748b;
}

.starlight-chart-tab:hover { color: inherit; }

.starlight-chart-tab.active {
  background: color-mix(in srgb, var(--q-color-starlight-blue), transparent 85%);
  color: var(--q-color-starlight-blue);
}

.starlight-chart-container { padding: 1.25rem; }

/* Gallery Grid */
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.gallery-grid .gallery-item { aspect-ratio: 16 / 9; }

/* Starlight Progress */
.starlight-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.starlight-progress-bar {
  flex: 1;
  height: 0.5rem;
  background: var(--q-color-border-strong);
  border-radius: 9999px;
  overflow: hidden;
}

.starlight-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--q-color-starlight-blue), var(--q-color-starlight-peach));
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.starlight-progress-value {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 3rem;
  text-align: right;
}

/* Starlight Player */
.starlight-player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.starlight-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.starlight-player-btn:hover {
  color: var(--q-color-starlight-blue);
  transform: scale(1.1);
}

.starlight-player-btn-primary {
  width: 3rem;
  height: 3rem;
  background: var(--q-color-starlight-blue);
  border-radius: 50%;
  color: #000;
}

.starlight-player-btn-primary:hover { background: var(--q-color-starlight-peach); }

/* Starlight Page Header */
.starlight-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
}

.starlight-page-title { font-size: 1.875rem; font-weight: 700; }

.starlight-page-subtitle {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 60%);
  margin-top: 0.25rem;
}

html[data-theme="light"] .starlight-page-subtitle {
  color: #64748b;
}

.starlight-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .starlight-page-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .starlight-page-actions::-webkit-scrollbar { display: none; }
}

/* Vertical Accordion Dropdowns in nav */
.nav-list.vertical .dropdown-menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  padding: 0 0 0 1.5rem;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: transparent;
  pointer-events: none;
}

.nav-list.vertical .dropdown.active .dropdown-menu {
  max-height: 300px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  pointer-events: auto;
}

.nav-list.vertical .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.825rem;
  border-left: 1px solid var(--q-color-border-strong);
  border-radius: 0;
}

@media (width >= 768px) {
  .nav-desktop { display: flex; }
  .hamburger { display: none; }
  .nav-menu-mobile { display: none !important; }
}

/* Nav Header container variant */
.nav-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-header .left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-header .logo {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 0, var(--q-color-starlight-blue) 100%);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

html[data-theme="light"] .nav-header .logo {
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 40%, var(--q-color-starlight-blue) 100%) !important;
}

.nav-header .banner {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--q-color-starlight-peach), var(--q-color-starlight-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .nav-header .banner {
  background: linear-gradient(135deg, var(--q-color-starlight-peach) 40%, var(--q-color-starlight-blue) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.nav-header .right { display: none; }

@media (min-width: 768px) {
  .nav-header .right {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-header .right a {
  font-size: 0.875rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-header .right a:hover { color: var(--accent); }

.nav-header .right button {
  background-color: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.nav-header .right button { padding: 0.5rem 1rem; }

/* Gallery enhanced variant */
.gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--q-radius-lg);
  overflow: hidden;
}

.gallery-item:hover img { transform: scale(1.05); }
