/* ==========================================================================
   Glass Form Inputs & Selects
   ========================================================================== */
/* Glass-styled form inputs - using higher specificity to avoid !important */
:where(input[type="text"]),
:where(input[type="email"]),
:where(input[type="tel"]),
:where(input[type="number"]),
:where(input[type="password"]),
:where(input[type="date"]),
:where(input[type="time"]),
:where(textarea),
:where(select) {
  background: rgb(255 255 255 / 0.6);
  backdrop-filter: blur(var(--blur-sm)) saturate(var(--backdrop-saturate));
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
  min-height: var(--touch-target);
  transition-property: all;
  transition-duration: var(--duration-slow);
  transition-timing-function: var(--easing-base);
}

:where(input[type="text"]:focus),
:where(input[type="email"]:focus),
:where(input[type="tel"]:focus),
:where(input[type="number"]:focus),
:where(input[type="password"]:focus),
:where(input[type="date"]:focus),
:where(input[type="time"]:focus),
:where(textarea:focus),
:where(select:focus) {
  background: rgb(255 255 255 / 0.8);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.1),
              0 4px 12px rgb(var(--color-primary-rgb) / 0.15);
  outline: none;
}

/* Dark mode form inputs - consolidated - matching sign-in input styles */
[data-theme="dark"] :where(input[type="text"]),
[data-theme="dark"] :where(input[type="email"]),
[data-theme="dark"] :where(input[type="tel"]),
[data-theme="dark"] :where(input[type="number"]),
[data-theme="dark"] :where(input[type="password"]),
[data-theme="dark"] :where(input[type="date"]),
[data-theme="dark"] :where(input[type="time"]),
[data-theme="dark"] :where(textarea),
[data-theme="dark"] :where(select) {
  background: rgb(4 3 3 / 0.5) !important;
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  color: var(--text-primary);
}

[data-theme="dark"] :where(input[type="text"]:focus),
[data-theme="dark"] :where(input[type="email"]:focus),
[data-theme="dark"] :where(input[type="tel"]:focus),
[data-theme="dark"] :where(input[type="number"]:focus),
[data-theme="dark"] :where(input[type="password"]:focus),
[data-theme="dark"] :where(input[type="date"]:focus),
[data-theme="dark"] :where(input[type="time"]:focus),
[data-theme="dark"] :where(textarea:focus),
[data-theme="dark"] :where(select:focus) {
  background: rgb(4 3 3 / 0.7) !important;
  border-color: rgb(var(--color-primary-rgb) / 0.4);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.15),
              0 4px 12px rgb(var(--color-primary-rgb) / 0.2);
}

/* ==========================================================================
   Custom Select Styling
   ========================================================================== */
:where(select) {
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  /* Light mode chevron — dark blue */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e528c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

[data-theme="dark"] :where(select) {
  /* Dark mode chevron — light blue */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235ba3ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 1rem !important;
}

/* Option element styling — controls the open dropdown list */
:where(select) option {
  background: #ffffff;
  color: #1a1a1a;
  padding: 10px 14px;
  font-size: 0.9rem;
}

[data-theme="dark"] :where(select) option {
  background: #0d0d0d;
  color: #e8e8e8;
  padding: 10px 14px;
  font-size: 0.9rem;
}

[data-theme="dark"] :where(select) option:hover,
[data-theme="dark"] :where(select) option:focus,
[data-theme="dark"] :where(select) option:checked {
  background: rgb(var(--color-primary-rgb) / 0.3);
  color: #ffffff;
}

/* Dark mode placeholder text - white color to match text */
[data-theme="dark"] :where(input[type="text"])::-moz-placeholder, [data-theme="dark"] :where(input[type="email"])::-moz-placeholder, [data-theme="dark"] :where(input[type="tel"])::-moz-placeholder, [data-theme="dark"] :where(input[type="number"])::-moz-placeholder, [data-theme="dark"] :where(input[type="password"])::-moz-placeholder, [data-theme="dark"] :where(input[type="date"])::-moz-placeholder, [data-theme="dark"] :where(input[type="time"])::-moz-placeholder, [data-theme="dark"] :where(textarea)::-moz-placeholder, [data-theme="dark"] :where(select)::-moz-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}
[data-theme="dark"] :where(input[type="text"])::placeholder,
[data-theme="dark"] :where(input[type="email"])::placeholder,
[data-theme="dark"] :where(input[type="tel"])::placeholder,
[data-theme="dark"] :where(input[type="number"])::placeholder,
[data-theme="dark"] :where(input[type="password"])::placeholder,
[data-theme="dark"] :where(input[type="date"])::placeholder,
[data-theme="dark"] :where(input[type="time"])::placeholder,
[data-theme="dark"] :where(textarea)::placeholder,
[data-theme="dark"] :where(select)::placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

/* Webkit browser support for placeholder */
[data-theme="dark"] :where(input[type="text"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="email"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="tel"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="number"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="password"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="date"])::-webkit-input-placeholder,
[data-theme="dark"] :where(input[type="time"])::-webkit-input-placeholder,
[data-theme="dark"] :where(textarea)::-webkit-input-placeholder,
[data-theme="dark"] :where(select)::-webkit-input-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

/* Firefox placeholder support */
[data-theme="dark"] :where(input[type="text"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="email"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="tel"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="number"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="password"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="date"])::-moz-placeholder,
[data-theme="dark"] :where(input[type="time"])::-moz-placeholder,
[data-theme="dark"] :where(textarea)::-moz-placeholder,
[data-theme="dark"] :where(select)::-moz-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

/* ==========================================================================
   Prevent Mobile Zoom on Input Fields - Sitewide
   ========================================================================== */
/* iOS Safari and some Android browsers automatically zoom when input font-size < 16px
   This ensures ALL form inputs have at least 16px on mobile to prevent zoom.
   Applied sitewide to all input types that users commonly interact with. */
@media screen and (max-width: 768px) {
  /* All common input types that can trigger zoom */
  :where(input[type="text"]),
  :where(input[type="email"]),
  :where(input[type="password"]),
  :where(input[type="tel"]),
  :where(input[type="number"]),
  :where(input[type="date"]),
  :where(input[type="time"]),
  :where(input[type="search"]),
  :where(input[type="url"]),
  :where(textarea) {
    font-size: 16px !important;
  }
  
  /* Dark mode variants */
  [data-theme="dark"] :where(input[type="text"]),
  [data-theme="dark"] :where(input[type="email"]),
  [data-theme="dark"] :where(input[type="password"]),
  [data-theme="dark"] :where(input[type="tel"]),
  [data-theme="dark"] :where(input[type="number"]),
  [data-theme="dark"] :where(input[type="date"]),
  [data-theme="dark"] :where(input[type="time"]),
  [data-theme="dark"] :where(input[type="search"]),
  [data-theme="dark"] :where(input[type="url"]),
  [data-theme="dark"] :where(textarea) {
    font-size: 16px !important;
  }
  
  /* Specific classes that might be used for inputs */
  .mobile-signin-input,
  input.mobile-signin-input {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   Google Maps Autocomplete Dropdown Styling
   ========================================================================== */
/* Ensure Google Maps Places Autocomplete dropdown is visible and above other elements */
.pac-container {
  z-index: 9999 !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.15),
              0 6px 20px rgb(0 0 0 / 0.1) !important;
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2) !important;
  margin-top: 4px !important;
  background: rgb(255 255 255 / 0.98) !important;
  backdrop-filter: blur(var(--blur-md)) saturate(var(--backdrop-saturate)) !important;
  font-family: inherit !important;
}

[data-theme="dark"] .pac-container {
  background: rgb(4 3 3 / 0.98) !important;
  border-color: rgb(var(--color-neutral-400-rgb) / 0.3) !important;
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.5),
              0 6px 20px rgb(0 0 0 / 0.4) !important;
}

.pac-item {
  padding: 12px 16px !important;
  cursor: pointer !important;
  border-top: 1px solid rgb(var(--color-primary-rgb) / 0.1) !important;
  font-size: 14px !important;
  color: var(--text-primary) !important;
  transition: background-color 0.2s ease !important;
}

.pac-item:first-child {
  border-top: none !important;
}

.pac-item:hover,
.pac-item-selected {
  background-color: rgb(var(--color-primary-rgb) / 0.1) !important;
}

[data-theme="dark"] .pac-item {
  border-top-color: rgb(var(--color-neutral-400-rgb) / 0.2) !important;
}

[data-theme="dark"] .pac-item:hover,
[data-theme="dark"] .pac-item-selected {
  background-color: rgb(var(--color-primary-rgb) / 0.2) !important;
}

.pac-icon {
  margin-right: 8px !important;
}

.pac-item-query {
  color: var(--text-primary) !important;
  font-weight: 500 !important;
}

.pac-matched {
  font-weight: 600 !important;
  color: var(--color-primary) !important;
}

/* Ensure parent containers don't clip the autocomplete dropdown */
.equity-calculator-container,
.glass-card {
  overflow: visible !important;
}

/* Ensure the form container allows overflow for autocomplete */
.equity-calculator-container form {
  position: relative;
  z-index: 1;
  overflow: visible !important;
}

/* ==========================================================================
   Responsive Form Grid Patterns
   ========================================================================== */
/* Standard form grid - 1 column on mobile, 2 on tablet+ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-md);
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3-column form grid for desktop */
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-md);
}

@media (min-width: 768px) {
  .form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Full-width form item that spans all columns */
.form-item-full {
  grid-column: 1 / -1;
}

/* ==========================================================================
   Touch-Friendly Form Elements
   ========================================================================== */
/* Ensure buttons and submit inputs have adequate touch targets */
button,
.button,
[type="button"],
[type="submit"],
[type="reset"] {
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-6);
}

/* Labels should have adequate spacing for readability */
label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
}

/* Form field wrapper for consistent spacing */
.form-field {
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .form-field {
    margin-bottom: var(--space-5);
  }
}


/* ==========================================================================
   Glass Tables
   ========================================================================== */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgb(255 255 255 / 0.5);
  backdrop-filter: blur(var(--blur-sm)) saturate(var(--backdrop-saturate));
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid rgb(var(--color-primary-rgb) / 0.15);
}

[data-theme="dark"] table {
  background: rgb(4 3 3 / 0.4);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

table thead {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.15), rgb(var(--color-primary-rgb) / 0.1));
}

[data-theme="dark"] table thead {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.2), rgb(var(--color-primary-rgb) / 0.1));
}

table th {
  padding: var(--space-4);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  border-bottom: 1px solid rgb(var(--color-primary-rgb) / 0.2);
}

[data-theme="dark"] table th {
  border-bottom-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

table td {
  padding: var(--space-4);
  border-bottom: 1px solid rgb(var(--color-primary-rgb) / 0.1);
  color: var(--text-primary);
}

[data-theme="dark"] table td {
  border-bottom-color: rgb(var(--color-neutral-400-rgb) / 0.1);
}

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

table tbody tr:hover {
  background: rgb(var(--color-primary-rgb) / 0.05);
}

[data-theme="dark"] table tbody tr:hover {
  background: rgb(var(--color-primary-rgb) / 0.1);
}

/* ==========================================================================
   Cost of Waiting Table - Dark Mode Row Behavior
   ========================================================================== */
/* In dark mode, swap static and hover backgrounds for the data rows only */
[data-theme="dark"] .cost-of-waiting-table tbody tr {
  /* Use the darker, tinted background that was previously the hover state */
  background: rgb(var(--color-primary-rgb) / 0.1);
}

/* On hover in dark mode, use a semi-dark gray background for both rows */
[data-theme="dark"] .cost-of-waiting-table tbody tr:hover {
  background: rgb(4 3 3 / 0.9);
}

/* When hovering in dark mode, keep specific Cost of Waiting values white
   for maximum contrast against the semi-dark hover background */
[data-theme="dark"] .cost-of-waiting-table tbody tr:hover .cost-of-waiting-value {
  color: rgb(255 255 255); /* White */
}

/* ==========================================================================
   Responsive Table Patterns
   ========================================================================== */
/* Standardize padding with responsive adjustments */
table th,
table td {
  padding: var(--space-4);
}

@media (min-width: 768px) {
  table th,
  table td {
    padding: var(--space-4) var(--space-6);
  }
}

/* Sticky table header for wide tables */
.sticky-header thead {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.95), rgb(var(--color-primary-rgb) / 0.9));
}

[data-theme="dark"] .sticky-header thead {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.95), rgb(var(--color-primary-rgb) / 0.85));
}

/* ==========================================================================
   Mobile Card Layout Pattern
   ========================================================================== */
/* Convert table to card layout on mobile for better readability */
@media (max-width: 767px) {
  .responsive-table {
    border: 0;
  }
  
  .responsive-table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  .responsive-table tbody,
  .responsive-table tr {
    display: block;
    margin-bottom: var(--space-4);
  }
  
  .responsive-table tr {
    border-radius: var(--radius-lg);
    border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
    background: rgb(255 255 255 / 0.5);
    backdrop-filter: blur(var(--blur-sm)) saturate(var(--backdrop-saturate));
  }
  
  [data-theme="dark"] .responsive-table tr {
    background: rgb(4 3 3 / 0.4);
    border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  }
  
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid rgb(var(--color-primary-rgb) / 0.1);
    text-align: right;
  }
  
  [data-theme="dark"] .responsive-table td {
    border-bottom-color: rgb(var(--color-neutral-400-rgb) / 0.1);
  }
  
  .responsive-table td:last-child {
    border-bottom: none;
  }
  
  /* Add label from data-label attribute */
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: var(--font-weight-semibold);
    margin-right: var(--space-4);
    color: var(--text-primary);
    text-align: left;
    flex: 0 0 auto;
    max-width: 50%;
  }
}


/* ==========================================================================
   Chart Components
   ========================================================================== */
/* Note: Base .chart-glass-card styles are now in utilities/_glass.css */
/* This file contains chart-specific styling only */

/* Chart widget title */
.chart-widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .chart-widget-title {
  color: var(--text-primary);
}

/* Timeframe buttons */
.timeframe-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.timeframe-btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  background: rgb(255 255 255 / 0.6);
  backdrop-filter: blur(var(--blur-sm)) saturate(var(--backdrop-saturate));
  border: 1.5px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition-property: all;
  transition-duration: var(--animation-duration-short);
  transition-timing-function: var(--animation-easing);
  position: relative;
  overflow: hidden;
}

.timeframe-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.3), transparent);
  transition-property: left;
  transition-duration: 0.5s;
}

.timeframe-btn:hover::before {
  left: 100%;
}

.timeframe-btn:hover {
  background: rgb(255 255 255 / 0.8);
  border-color: rgb(var(--color-primary-rgb) / 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(var(--color-primary-rgb) / 0.15),
              0 2px 6px rgb(var(--color-secondary-rgb) / 0.1);
}

.timeframe-btn.active {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.2), rgb(var(--color-primary-rgb) / 0.15));
  border-color: rgb(var(--color-primary-rgb) / 0.5);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgb(var(--color-primary-rgb) / 0.2),
              0 0 0 2px rgb(var(--color-primary-rgb) / 0.1) inset;
  font-weight: 700;
}

[data-theme="dark"] .timeframe-btn {
  background: rgb(4 3 3 / 0.6);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.25);
  color: var(--text-primary);
}

[data-theme="dark"] .timeframe-btn:hover {
  background: rgb(4 3 3 / 0.8);
  border-color: rgb(var(--color-primary-rgb) / 0.4);
  box-shadow: 0 4px 12px rgb(var(--color-primary-rgb) / 0.2),
              0 2px 6px rgb(var(--color-primary-rgb) / 0.1);
}

[data-theme="dark"] .timeframe-btn.active {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.25), rgb(var(--color-primary-rgb) / 0.15));
  border-color: rgb(var(--color-primary-rgb) / 0.5);
  color: rgb(var(--color-primary-rgb));
  box-shadow: 0 2px 8px rgb(var(--color-primary-rgb) / 0.3),
              0 0 0 2px rgb(var(--color-primary-rgb) / 0.15) inset;
}

/* Chart container */
.chart-container {
  background: rgb(255 255 255 / 0.4);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: 0 4px 16px rgb(var(--color-primary-rgb) / 0.08),
              0 2px 8px rgb(var(--color-secondary-rgb) / 0.06),
              0 0 0 1px rgb(255 255 255 / 0.2) inset;
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.03) 0%, transparent 50%, rgb(var(--color-secondary-rgb) / 0.03) 100%);
  pointer-events: none;
  z-index: 0;
}

.chart-container canvas {
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease-in-out;
}

[data-theme="dark"] .chart-container {
  background: rgb(4 3 3 / 0.5);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.3),
              0 2px 8px rgb(0 0 0 / 0.2),
              0 0 0 1px rgb(var(--color-neutral-400-rgb) / 0.15) inset;
}

[data-theme="dark"] .chart-container::before {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.05) 0%, transparent 50%, rgb(var(--color-secondary-rgb) / 0.05) 100%);
}

/* Chart current value */
.chart-current-value {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgb(255 255 255 / 0.5);
  backdrop-filter: blur(var(--blur-sm)) saturate(150%);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.15);
  border-radius: var(--radius-lg);
  display: inline-block;
}

[data-theme="dark"] .chart-current-value {
  background: rgb(4 3 3 / 0.6);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  color: var(--text-primary);
}


/* ==========================================================================
   Account Dropdown Glass Styling
   ========================================================================== */
.account-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 280px;
  background: rgb(255 255 255 / 0.98);
  backdrop-filter: blur(var(--blur-xl)) saturate(200%);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.15);
  border-radius: var(--radius-2xl);
  box-shadow: 0 12px 48px rgb(0 0 0 / 0.15),
              0 6px 24px rgb(0 0 0 / 0.1),
              0 0 0 1px rgb(255 255 255 / 0.5) inset,
              0 1px 0 rgb(255 255 255 / 0.6) inset;
  padding: var(--space-4);
  z-index: var(--z-dropdown);
  animation: dropdownSlideDown 0.2s ease-out;
}

[data-theme="dark"] .account-dropdown {
  background: rgb(10 18 38 / 0.96);
  border-color: rgb(var(--color-primary-rgb) / 0.18);
  box-shadow: 0 16px 56px rgb(0 0 0 / 0.55),
              0 6px 24px rgb(0 0 0 / 0.4),
              0 0 0 1px rgb(var(--color-primary-rgb) / 0.12) inset,
              0 1px 0 rgb(255 255 255 / 0.06) inset,
              0 0 80px rgb(var(--color-primary-rgb) / 0.08);
}

.account-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid rgb(var(--color-primary-rgb) / 0.2);
}

[data-theme="dark"] .account-dropdown-header {
  border-bottom-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

.account-dropdown-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

/* KISS Mortgage - Account dropdown avatar - Use gold color instead of orange */
[data-app="kiss-mortgage"] .account-dropdown-avatar {
  background: linear-gradient(135deg, var(--color-primary), rgb(199 159 79));
}

.account-dropdown-user-info {
  flex: 1;
  min-width: 0;
}

.account-dropdown-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: var(--space-1); /* External spacing - margin below name */
}

/* Light mode name - ensure good contrast */
:root:not([data-theme="dark"]) .account-dropdown-name {
  color: rgb(var(--color-neutral-900-rgb));
}

.account-dropdown-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Light mode email - ensure good contrast */
:root:not([data-theme="dark"]) .account-dropdown-email {
  color: rgb(var(--color-neutral-700-rgb));
}

.account-dropdown-type-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: rgb(var(--color-primary-rgb) / 0.1);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-1);
}

[data-theme="dark"] .account-dropdown-type-badge {
  background: rgb(var(--color-primary-rgb) / 0.15);
  border-color: rgb(var(--color-primary-rgb) / 0.3);
  color: rgb(var(--color-primary-rgb));
}

.account-dropdown-divider {
  height: 1px;
  background: rgb(var(--color-primary-rgb) / 0.2);
  margin: var(--space-3) 0;
}

[data-theme="dark"] .account-dropdown-divider {
  background: rgb(var(--color-neutral-400-rgb) / 0.2);
}

.account-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* External spacing - gap between icon and text */
  padding: var(--space-3); /* Internal spacing - padding for dropdown item */
  min-height: 2.75rem; /* Ensure consistent vertical depth for all items */
  border-radius: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.account-dropdown-item:hover {
  background: rgb(var(--color-primary-rgb) / 0.1);
  color: var(--color-primary);
}

[data-theme="dark"] .account-dropdown-item:hover {
  background: rgb(var(--color-primary-rgb) / 0.15);
  color: rgb(var(--color-primary-rgb));
}

.account-dropdown-item-danger {
  color: rgb(var(--color-error-rgb));
}

.account-dropdown-item-danger:hover {
  background: rgb(var(--color-error-rgb) / 0.1);
  color: rgb(var(--color-error-rgb));
}

[data-theme="dark"] .account-dropdown-item-danger:hover {
  background: rgb(var(--color-error-rgb) / 0.15);
}

.account-dropdown-icon {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.account-dropdown-footer {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid rgb(var(--color-primary-rgb) / 0.15);
}

[data-theme="dark"] .account-dropdown-footer {
  border-top-color: rgb(var(--color-neutral-400-rgb) / 0.2);
}

/* ==========================================================================
   Sign In Dropdown Form Styling
   ========================================================================== */
.signin-dropdown {
  min-width: 340px;
  overflow: hidden;
}

/* Gradient top accent bar */
.signin-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

/* Header area */
.signin-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid rgb(var(--color-primary-rgb) / 0.15);
}

[data-theme="dark"] .signin-dropdown-header {
  border-bottom-color: rgb(255 255 255 / 0.08);
}

.signin-dropdown-header-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.2), rgb(var(--color-secondary-rgb) / 0.15));
  border: 1px solid rgb(var(--color-primary-rgb) / 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}

[data-theme="dark"] .signin-dropdown-header-icon {
  background: linear-gradient(135deg, rgb(var(--color-primary-rgb) / 0.15), rgb(var(--color-secondary-rgb) / 0.1));
  border-color: rgb(var(--color-primary-rgb) / 0.3);
  color: rgb(var(--color-primary-rgb));
}

.signin-dropdown-header-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0 0 0.15rem 0;
  line-height: 1.2;
}

:root:not([data-theme="dark"]) .signin-dropdown-header-title {
  color: rgb(var(--color-neutral-900-rgb));
}

.signin-dropdown-header-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
}

:root:not([data-theme="dark"]) .signin-dropdown-header-subtitle {
  color: rgb(var(--color-neutral-600-rgb));
}

.signin-dropdown-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.signin-dropdown-error {
  padding: var(--space-3);
  background: rgb(var(--color-error-rgb) / 0.1);
  border: 1px solid rgb(var(--color-error-rgb) / 0.3);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}

:root:not([data-theme="dark"]) .signin-dropdown-error {
  background: rgb(var(--color-error-rgb) / 0.08);
  border-color: rgb(var(--color-error-rgb) / 0.4);
}

.signin-dropdown-error p {
  font-size: var(--font-size-sm);
  color: rgb(var(--color-error-rgb));
  margin: 0;
}

[data-theme="dark"] .signin-dropdown-error {
  background: rgb(var(--color-error-rgb) / 0.12);
  border-color: rgb(var(--color-error-rgb) / 0.35);
}

.signin-dropdown-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.signin-dropdown-label {
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

:root:not([data-theme="dark"]) .signin-dropdown-label {
  color: rgb(var(--color-neutral-600-rgb));
}

[data-theme="dark"] .signin-dropdown-label {
  color: rgb(var(--color-neutral-400-rgb));
}

.signin-dropdown-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-input);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.2);
  background: rgb(255 255 255 / 0.85);
  color: rgb(var(--color-neutral-900-rgb));
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

:root:not([data-theme="dark"]) .signin-dropdown-input {
  background: rgb(255 255 255 / 0.9);
  border-color: rgb(var(--color-primary-rgb) / 0.25);
  color: rgb(var(--color-neutral-900-rgb));
}

:root:not([data-theme="dark"]) .signin-dropdown-input::-moz-placeholder {
  color: rgb(var(--color-neutral-400-rgb));
}

:root:not([data-theme="dark"]) .signin-dropdown-input::placeholder {
  color: rgb(var(--color-neutral-400-rgb));
}

.signin-dropdown-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.12);
}

:root:not([data-theme="dark"]) .signin-dropdown-input:focus {
  background: rgb(255 255 255);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.15);
}

.signin-dropdown-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-theme="dark"] .signin-dropdown-input {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.1);
  color: rgb(var(--color-neutral-100-rgb));
}

[data-theme="dark"] .signin-dropdown-input::-moz-placeholder {
  color: rgb(var(--color-neutral-400-rgb) / 0.6);
}

[data-theme="dark"] .signin-dropdown-input::placeholder {
  color: rgb(var(--color-neutral-400-rgb) / 0.6);
}

[data-theme="dark"] .signin-dropdown-input:focus {
  background: rgb(255 255 255 / 0.09);
  border-color: rgb(var(--color-primary-rgb) / 0.7);
  box-shadow: 0 0 0 3px rgb(var(--color-primary-rgb) / 0.15);
}

.signin-dropdown-submit {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-1);
  box-shadow: 0 2px 12px rgb(var(--color-primary-rgb) / 0.25);
}

.signin-dropdown-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgb(var(--color-primary-rgb) / 0.35);
  filter: brightness(1.08);
}

.signin-dropdown-submit:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.97);
}

.signin-dropdown-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

[data-app="kiss-mortgage"] .signin-dropdown-submit {
  background: linear-gradient(135deg, var(--color-primary), rgb(199 159 79));
}

.signin-dropdown-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgb(var(--color-primary-rgb) / 0.12);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

[data-theme="dark"] .signin-dropdown-footer {
  border-top-color: rgb(255 255 255 / 0.08);
}

.signin-dropdown-footer-divider {
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  background: rgb(var(--color-neutral-400-rgb) / 0.5);
  flex-shrink: 0;
}

.signin-dropdown-link {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

:root:not([data-theme="dark"]) .signin-dropdown-link {
  color: var(--color-primary);
}

[data-theme="dark"] .signin-dropdown-link {
  color: rgb(var(--color-primary-rgb) / 0.85);
}

.signin-dropdown-link:hover {
  color: var(--color-secondary);
  text-decoration: none;
  filter: brightness(1.15);
}

/* ==========================================================================
   Dropdown Animation
   ========================================================================== */
@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Login Button Transitions & Animations
   ========================================================================== */

/* Authenticating state - gentle pulse */
.user-button-authenticating {
  animation: authPulse 1.5s ease-in-out infinite;
}

@keyframes authPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

/* Checkmark success state - scale animation */
.user-button-checkmark {
  animation: checkmarkScale 0.3s ease-out;
}

@keyframes checkmarkScale {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Smooth transition for user name fade */
.user-button-transition {
  transition: opacity 0.3s ease-in-out;
}

/* ==========================================================================
   Skeleton Loading Animations
   ========================================================================== */

/* Fade in skeleton overlay */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.skeleton-fade-in {
  animation: fadeIn 0.2s ease-in;
}

/* Fade out skeleton overlay */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.skeleton-fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}


/* ==========================================================================
   Additional Component Styles
   ========================================================================== */
.parallax-section {
  position: relative;
  z-index: 1;
  /* Performance optimization: contain layout and paint for better scroll performance */
  contain: layout style paint;
}

/* Dashboard section background - let hero background show through */
#dashboard-section {
  background-color: transparent;
  background-image: none;
  background-attachment: scroll;
  backdrop-filter: none;
}

/* Dark theme dashboard section */
[data-theme="dark"] #dashboard-section {
  background-color: transparent;
  background-image: none;
  background-attachment: scroll;
  backdrop-filter: none;
}

/* Removed unused .parallax-gradient-bw class - not used anywhere in codebase */

.parallax-section .glass-card:not(.dashboard-nav-container) {
  position: relative;
  z-index: 1;
  transform: translateZ(10px) translateY(0);
  backface-visibility: hidden;
}

/* Prevent focus outline on Value Proposition card links from painting onto adjacent cards (artifact edges on other buttons) */
.value-proposition-card .value-proposition-card__nmls-link:focus,
.value-proposition-card .value-proposition-card__contact-btn:focus,
.value-proposition-card .value-proposition-card__nmls-link:focus-visible,
.value-proposition-card .value-proposition-card__contact-btn:focus-visible {
  outline: none !important;
  outline-offset: 0;
}

/* CRITICAL: Prevent transforms on glass cards inside content-wrapper that break backdrop-filter */
.content-wrapper .parallax-section .glass-card {
  transform: none !important;
  -webkit-transform: none !important;
  backface-visibility: visible !important;
  /* Optimize backdrop-filter rendering */
  will-change: auto;
}

.glass-card.calculator-results,
.glass-card.calculator-results.static-shadow {
  animation: none !important;
  box-shadow: 0 10px 30px rgb(var(--color-primary-rgb) / 0.1),
              0 6px 18px rgb(var(--color-secondary-rgb) / 0.08),
              0 4px 10px rgb(0 0 0 / 0.1) !important;
  transition: background 280ms ease, color 0.4s var(--animation-easing) !important;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.95) 0%, rgb(255 255 255 / 0.85) 100%) !important;
  /* Reduce backdrop-filter intensity for better performance */
  backdrop-filter: blur(8px) saturate(1.5);
  /* Performance hint for transition properties */
  will-change: background, color;
}

/* Dark mode calculator results */
[data-theme="dark"] .glass-card.calculator-results,
[data-theme="dark"] .glass-card.calculator-results.static-shadow {
  background: linear-gradient(135deg, rgb(4 3 3 / 0.95) 0%, rgb(4 3 3 / 0.9) 100%) !important;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.3),
              0 6px 18px rgb(var(--color-primary-rgb) / 0.15),
              0 4px 10px rgb(0 0 0 / 0.2) !important;
  border: 1px solid rgb(var(--color-primary-rgb) / 0.1);
}

/* Disable animations on calculator panels - optimized selector */
.calculator-panel .glass-card,
[id*="Calc"] .glass-card,
#calculators .glass-card,
#dashboard-section .glass-card:not(.dashboard-nav-container),
#profile-settings-section .glass-card {
  animation: none !important;
  transform: translateY(0) translateZ(0) !important;
}

/* Allow sticky positioning for dashboard navigation container - transform fixes */
#dashboard-section .glass-card.dashboard-nav-container {
  transform: none !important;
  -webkit-transform: none !important;
  backface-visibility: visible !important;
}

#viewAmortTable {
  color: var(--color-primary) !important;
}

/* CRITICAL: Ensure all glass cards inside content-wrapper have no transforms that break backdrop-filter */
.content-wrapper .glass-card {
  transform: none !important;
  -webkit-transform: none !important;
  animation: none !important;
  transition: none !important;
  /* Optimize for scrolling performance */
  will-change: auto;
  contain: layout style;
}

/* CRITICAL: Dashboard navigation container sticky positioning - must be last to override all other rules */
@media (min-width: 1024px) {
  #dashboard-section .glass-card.dashboard-nav-container,
  .parallax-section#dashboard-section .glass-card.dashboard-nav-container,
  .content-wrapper #dashboard-section .glass-card.dashboard-nav-container {
    position: sticky !important;
    top: 6rem !important; /* 96px - matches lg:top-24 */
    z-index: 10 !important;
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: visible !important;
  }
}

/* ==========================================================================
   Service Card Icon Branding - KISS Mortgage Gold Override
   ========================================================================== */
/* Override Tailwind's from-mortgage-gold gradient for KISS Mortgage brand */
/* Target all elements with mortgage-gold gradient classes */
[data-app="kiss-mortgage"] [class*="from-mortgage-gold"][class*="to-mortgage-gold"] {
  background-image: linear-gradient(to bottom right, rgb(199 159 79), rgb(199 159 79 / 0.7)) !important;
}

/* Handle blue-to-gold gradients */
[data-app="kiss-mortgage"] [class*="from-mortgage-blue"][class*="to-mortgage-gold"] {
  background-image: linear-gradient(to bottom right, rgb(var(--color-primary-rgb)), rgb(199 159 79)) !important;
}

/* Handle gold-to-blue gradients */
[data-app="kiss-mortgage"] [class*="from-mortgage-gold"][class*="to-mortgage-blue"] {
  background-image: linear-gradient(to bottom right, rgb(199 159 79), rgb(var(--color-primary-rgb))) !important;
}

/* Fallback for any element with from-mortgage-gold that doesn't have a to- class */
[data-app="kiss-mortgage"] [class*="from-mortgage-gold"]:not([class*="to-"]) {
  background-image: linear-gradient(to bottom right, rgb(199 159 79), rgb(199 159 79 / 0.7)) !important;
}

/* ==========================================================================
   Profile Image Wrapper - Seamless background matching per theme
   ========================================================================== */
.profile-image-wrapper {
  background-color: rgb(255 255 255);
}

[data-theme="dark"] .profile-image-wrapper {
  background-color: rgb(var(--color-neutral-900-rgb));
}


/* ========================================================================== 

   Footer Styles

   ========================================================================== */

footer {

  padding-top: var(--space-8); /* Match section padding - consistent spacing between sections and footer (py-8 = 2rem) */

  padding-bottom: var(--space-8);

  margin-top: 0;

  position: relative;

  /* Use dropdown-level z-index so footer sits above hero/background, but will still be under global overlays like the qualification funnel (which portals to body with a higher z-index). */

  z-index: var(--z-dropdown);

  /* Glassmorphic background - consistent across all pages */

  background-color: rgb(202 213 229 / 0.75);

  background-image: none;

  background-attachment: scroll;

  /* Adjust footer for dashboard sidebar */
  transition: padding-left 0.3s ease;
}

/* Adjust footer padding on dashboard pages to account for sidebar */
@media (min-width: 1024px) {
  body.dashboard-page footer {
    padding-left: 240px; /* Sidebar width when expanded */
  }
  
  body.dashboard-page[data-sidebar-collapsed="true"] footer {
    padding-left: 64px; /* Sidebar width when collapsed */
  }
  
  /* Ensure footer container also adjusts */
  body.dashboard-page footer .container {
    transition: margin-left 0.3s ease;
  }
}



/* Responsive footer padding to match section padding pattern */

@media (min-width: 640px) {

  footer {

    padding-top: var(--space-10); /* Match sm:py-10 = 2.5rem */

  }

}



@media (min-width: 1024px) {

  footer {

    padding-top: var(--space-12); /* Match lg:py-12 = 3rem */

  }

}





/* Ensure footer connects seamlessly to content-wrapper on home page */

body.home-page main + footer {

  margin-top: 0;

}



/* Dark theme footer - glassmorphic background */

[data-theme="dark"] footer {

  background-color: rgb(4 3 3 / 0.75);

  background-image: none;

  background-attachment: scroll;

}



/* Footer now uses consistent glassmorphic style across all pages */

/* Removed body.home-page specificity - footer style is now universal */



/* Equal Housing Logo - Invert colors for dark mode */

.footer-equal-housing-icon {

  transition: filter 0.3s ease;

}



[data-theme="dark"] .footer-equal-housing-icon {

  filter: invert(1);

}



/* X (Twitter) Icon - Invert colors for dark mode */

.footer-x-icon {

  transition: filter 0.3s ease;

}



[data-theme="dark"] .footer-x-icon {

  filter: invert(1);

}



/* Remove blue glows from footer glass-card elements */

footer .glass-card[data-bg="light"] {

  box-shadow: 0 8px 32px rgb(0 0 0 / 0.08),

              0 4px 16px rgb(var(--color-secondary-rgb) / 0.08),

              0 0 0 1px rgb(255 255 255 / 0.3) inset,

              0 1px 0 rgb(255 255 255 / 0.5) inset,

              0 -1px 0 rgb(255 255 255 / 0.1) inset;

}



[data-theme="dark"] footer .glass-card {

  box-shadow: 0 8px 32px rgb(0 0 0 / 0.4),

              0 4px 16px rgb(0 0 0 / 0.3),

              0 0 0 1px rgb(var(--color-neutral-400-rgb) / 0.1) inset,

              0 1px 0 rgb(255 255 255 / 0.05) inset,

              0 -1px 0 rgb(0 0 0 / 0.2) inset;

}



[data-theme="dark"] footer .glass-card[data-bg="light"] {

  box-shadow: 0 8px 32px rgb(0 0 0 / 0.5),

              0 4px 16px rgb(0 0 0 / 0.4),

              0 0 0 1px rgb(var(--color-neutral-400-rgb) / 0.15) inset,

              0 1px 0 rgb(255 255 255 / 0.08) inset,

              0 -1px 0 rgb(0 0 0 / 0.3) inset;

}



/* Footer accent lines - blue in light mode, gold in dark mode */

footer .footer-section-title {

  border-bottom-color: rgb(var(--color-primary-rgb) / 0.5);

}



[data-theme="dark"] footer .footer-section-title {

  border-bottom-color: rgb(var(--color-secondary-rgb) / 0.5);

}



/* PRMG logo section border - blue in light mode, gold in dark mode */

footer .footer-logo-divider {

  border-top-color: rgb(var(--color-primary-rgb) / 0.3);

}



[data-theme="dark"] footer .footer-logo-divider {

  border-top-color: rgb(var(--color-secondary-rgb) / 0.3);

}



/* Legal container divider - blue in light mode, gold in dark mode */

footer .footer-legal-divider {

  border-top-color: rgb(var(--color-primary-rgb) / 0.3);

}



[data-theme="dark"] footer .footer-legal-divider {

  border-top-color: rgb(var(--color-secondary-rgb) / 0.3);

}



/* Ensure crisp logo rendering in footer */

footer .logo-light,

footer .logo-dark {

  image-rendering: -webkit-optimize-contrast;

  image-rendering: auto;

  -ms-interpolation-mode: bicubic;

}


/* ==========================================================================
   Glassmorphic Navbar
   ========================================================================== */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: var(--space-3); /* Internal spacing - padding for container */
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* Hide navbar when qualification funnel is open */
body.qualification-funnel-open .navbar-wrapper {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mobile portrait: position navbar at bottom */
@media (max-width: 767px) and (orientation: portrait) {
  .navbar-wrapper {
    top: auto;
    bottom: 0;
    padding: var(--space-3); /* Internal spacing - padding for container */
  }

  /* Add bottom padding to footer to ensure it can scroll up far enough to clear the navbar */
  footer {
    padding-bottom: calc(80px + 2rem);
  }

  /* Remove bottom padding from main content since footer already provides clearance */
  main {
    padding-bottom: 0;
  }

  /* Remove top padding since navbar is at bottom */
  html {
    scroll-padding-top: 0;
  }
}

.navbar-glass-container {
  width: 100%;
  max-width: calc(100vw - clamp(1rem, 2vw, 1.5rem));
  background: rgb(255 255 255 / 0.65);
  backdrop-filter: blur(var(--blur-2xl)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.1),
              0 4px 16px rgb(0 0 0 / 0.08),
              0 0 0 1px rgb(255 255 255 / 0.1) inset,
              inset 0 1px 0 rgb(255 255 255 / 0.5);
  padding: clamp(var(--space-2), 0.75vw, var(--space-3)) clamp(var(--space-3), 1vw, var(--space-4));
  pointer-events: auto;
  transition-property: all;
  transition-duration: var(--animation-duration-base);
  transition-timing-function: var(--animation-easing);
  position: relative;
  z-index: 41;
  min-width: 0; /* Allow container to shrink */
  overflow: visible; /* Allow dropdowns to be visible */
}

[data-theme="dark"] .navbar-glass-container {
  background: rgb(4 3 3 / 0.45);
  backdrop-filter: blur(var(--blur-2xl)) saturate(var(--backdrop-saturate));
  border-color: rgb(255 255 255 / 0.12);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.4),
              0 4px 16px rgb(0 0 0 / 0.3),
              0 0 0 1px rgb(255 255 255 / 0.05) inset,
              inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: clamp(0.5rem, 1vw, 1rem);
  position: relative;
  z-index: 42;
  min-width: 0; /* Allow flex items to shrink below their content size */
}

.navbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  min-width: 0; /* Allow logo to shrink if needed */
}

.navbar-logo img {
  height: clamp(2.75rem, 3.5vw, 3.25rem) !important; /* Larger logo, closer to bar edges */
  width: auto !important;
  max-width: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  transition: height 0.2s ease; /* Smooth size transitions */
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.navbar-logo:active {
  transform: scale(0.95);
}

/* Logo theme switching - Navbar and Footer */
.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

[data-theme="light"] .logo-light {
  display: block;
}

[data-theme="light"] .logo-dark {
  display: none;
}

.navbar-hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-button);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-2); /* Internal spacing - padding for button */
  transition: all 0.2s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 43;
}

.navbar-hamburger-btn.open {
  background: rgb(0 0 0 / 0.05);
}

[data-theme="dark"] .navbar-hamburger-btn.open {
  background: rgb(255 255 255 / 0.1);
}

.navbar-hamburger-btn:hover {
  background: rgb(0 0 0 / 0.05);
}

[data-theme="dark"] .navbar-hamburger-btn:hover {
  background: rgb(255 255 255 / 0.1);
}

.navbar-hamburger-btn:active {
  transform: scale(0.95);
}

.navbar-hamburger-btn:focus-visible {
  outline: 2px solid rgb(var(--color-primary-rgb) / 0.5);
  outline-offset: 2px;
}

.navbar-hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 16px;
  position: relative;
}

.navbar-hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

[data-theme="dark"] .navbar-hamburger-line {
  background: rgb(var(--color-neutral-100-rgb) / 0.9);
}

[data-theme="light"] .navbar-hamburger-line {
  background: rgb(var(--color-neutral-950-rgb) / 0.9);
}

.navbar-hamburger-btn.open .navbar-hamburger-icon {
  display: none;
}

.navbar-hamburger-btn.open .navbar-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger-btn.open .navbar-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-hamburger-btn.open .navbar-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Ensure close icon is visible when menu is open */
.navbar-hamburger-btn.open .navbar-close-icon {
  display: block !important;
  opacity: 1 !important;
}

/* Close Icon - Shows when menu is open */
.navbar-close-icon {
  width: 1.75rem;
  height: 1.75rem;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: closeIconFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: block;
  flex-shrink: 0;
  color: var(--text-primary);
}

@keyframes closeIconFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

[data-theme="dark"] .navbar-close-icon {
  color: rgb(var(--color-neutral-100-rgb) / 0.95);
  stroke: rgb(var(--color-neutral-100-rgb) / 0.95);
}

[data-theme="light"] .navbar-close-icon {
  color: rgb(var(--color-neutral-950-rgb) / 0.95);
  stroke: rgb(var(--color-neutral-950-rgb) / 0.95);
}

.navbar-hamburger-btn:hover .navbar-close-icon {
  transform: scale(1.15) rotate(90deg);
  color: rgb(var(--color-error-rgb));
  stroke: rgb(var(--color-error-rgb));
}

[data-theme="dark"] .navbar-hamburger-btn:hover .navbar-close-icon {
  color: rgb(var(--color-error-rgb));
  stroke: rgb(var(--color-error-rgb));
}

.navbar-hamburger-btn:active .navbar-close-icon {
  transform: scale(0.95);
}

.navbar-links {
  display: none !important;
  align-items: center;
  gap: clamp(0.25rem, 0.75vw, 1rem);
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0; /* Allow links container to shrink */
  overflow: visible; /* Allow dropdowns to be visible */
}

/* Desktop Nav Links - Glass Styling - Theme-aware */
.navbar-links a {
  padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 1vw, var(--space-4)); /* Internal spacing - padding for links */
  border-radius: var(--radius-button);
  color: var(--text-primary);
  text-decoration: none;
  font-size: clamp(0.75rem, 0.875vw, 0.875rem);
  font-weight: 500;
  text-align: center;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.2s ease,
              font-size 0.2s ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  border-radius: 2px;
  background: rgb(var(--color-primary-rgb));
  box-shadow: 0 0 6px rgb(var(--color-primary-rgb) / 0.8);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* Reduce padding for First-Time Homebuyer link to make it narrower */
.navbar-links a[href="/first-time-homebuyer"] {
  padding-left: clamp(0.25rem, 0.5vw, var(--space-2));
  padding-right: clamp(0.25rem, 0.5vw, var(--space-2));
  font-size: clamp(0.7rem, 0.8vw, 0.875rem); /* Slightly smaller font for long text */
}

.navbar-links a:hover {
  background: rgb(var(--color-primary-rgb) / 0.12);
  color: var(--color-primary);
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.15), inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.navbar-links a.active {
  background: rgb(var(--color-primary-rgb) / 0.2);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 0 14px rgb(var(--color-primary-rgb) / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.1);
}

[data-theme="dark"] .navbar-links a:hover {
  background: rgb(var(--color-primary-rgb) / 0.15);
  color: rgb(255 255 255);
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.25), inset 0 1px 0 rgb(255 255 255 / 0.08);
}

[data-theme="dark"] .navbar-links a.active {
  background: rgb(var(--color-primary-rgb) / 0.25);
  color: rgb(255 255 255) !important;
  font-weight: 600;
  box-shadow: 0 0 16px rgb(var(--color-primary-rgb) / 0.35), inset 0 1px 0 rgb(255 255 255 / 0.12);
}

@media (min-width: 768px) {
  .navbar-links {
    display: flex !important;
  }
}

/* Enhanced responsive breakpoints for better dynamic resizing */
@media (min-width: 768px) and (max-width: 1280px) {
  /* Fluid adjustments for medium desktop sizes */
  .navbar-links {
    gap: clamp(0.25rem, 0.5vw, 0.75rem);
  }

  .navbar-content {
    gap: clamp(0.5rem, 0.75vw, 0.875rem);
  }

  .navbar-links a {
    font-size: clamp(0.7rem, 0.8vw, 0.875rem);
    padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 0.875vw, var(--space-3));
  }

  .navbar-links a[href="/first-time-homebuyer"] {
    padding-left: clamp(0.25rem, 0.375vw, var(--space-1));
    padding-right: clamp(0.25rem, 0.375vw, var(--space-1));
  }

  .desktop-login-btn {
    padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 0.875vw, var(--space-3));
    font-size: clamp(0.7rem, 0.8vw, 0.875rem);
  }

  .desktop-login-btn .login-text,
  .desktop-login-btn .user-name {
    font-size: clamp(0.7rem, 0.8vw, 0.875rem);
  }

  .desktop-login-btn .user-name {
    max-width: clamp(80px, 10vw, 120px);
  }

  .theme-toggle-btn,
  .language-toggle-btn {
    width: clamp(2rem, 2.25vw, 2.5rem);
    height: clamp(2rem, 2.25vw, 2.5rem);
    padding: clamp(0.25rem, 0.375vw, var(--space-2));
  }

  .navbar-glass-container {
    padding: clamp(var(--space-2), 0.75vw, var(--space-3)) clamp(var(--space-3), 1vw, var(--space-4));
  }
}

/* Fix navbar layout at 1024px and narrower - more aggressive scaling */
@media (min-width: 768px) and (max-width: 1024px) {
  .navbar-links a {
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
    padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 0.75vw, var(--space-3)) !important;
  }

  .navbar-links a[href="/first-time-homebuyer"] {
    padding-left: clamp(0.25rem, 0.375vw, var(--space-1)) !important;
    padding-right: clamp(0.25rem, 0.375vw, var(--space-1)) !important;
  }

  .navbar-links {
    gap: clamp(0.25rem, 0.5vw, var(--space-2)) !important;
  }

  .navbar-content {
    gap: clamp(0.5rem, 0.75vw, var(--space-3)) !important;
  }

  .desktop-login-btn {
    padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 0.75vw, var(--space-3)) !important;
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
  }

  .desktop-login-btn .login-text {
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
  }

  .desktop-login-btn .user-name {
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
    max-width: clamp(70px, 8vw, 100px) !important;
  }

  .desktop-logout-btn {
    padding: clamp(0.375rem, 0.5vw, var(--space-2)) clamp(0.5rem, 0.75vw, var(--space-3)) !important;
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
  }

  .desktop-logout-btn .logout-text {
    font-size: clamp(0.65rem, 0.75vw, 0.75rem) !important;
  }

  .theme-toggle-btn {
    width: clamp(2rem, 2.25vw, 2.25rem) !important;
    height: clamp(2rem, 2.25vw, 2.25rem) !important;
    padding: clamp(0.25rem, 0.375vw, var(--space-1)) clamp(0.375rem, 0.5vw, var(--space-2)) !important;
  }

  .navbar-glass-container {
    padding: clamp(var(--space-2), 0.75vw, var(--space-3)) clamp(var(--space-3), 0.875vw, var(--space-4)) !important;
  }
}

/* Mobile menu backdrop overlay */
/* Mobile menu styling - Enhanced Glass */
.nav-links.mobile-menu {
  position: fixed;
  top: calc(80px + var(--space-3));
  left: var(--space-3);
  right: var(--space-3);
  max-width: calc(100vw - 1.5rem);
  overflow-y: auto;
  background: rgb(255 255 255 / 0.98);
  backdrop-filter: blur(var(--blur-2xl)) saturate(var(--backdrop-saturate));
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: var(--radius-3xl);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.12),
              0 8px 24px rgb(0 0 0 / 0.08),
              0 0 0 1px rgb(255 255 255 / 0.3) inset,
              0 1px 0 rgb(255 255 255 / 0.5) inset;
  padding: var(--space-6);
  padding-bottom: var(--space-3); /* Reduced bottom padding */
  z-index: 30;
  opacity: 0;
  transform: translateY(-20px) scale(0.95) translateZ(0);
  pointer-events: none;
  transition-property: opacity, transform, pointer-events;
  transition-duration: 0.35s, 0.35s, 0s;
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), cubic-bezier(0.34, 1.56, 0.64, 1), ease;
  transition-delay: 0s, 0s, 0.35s;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: -moz-fit-content;
  height: fit-content;
  max-height: calc(100vh - 100px);
  scrollbar-width: thin;
  scrollbar-color: rgb(0 0 0 / 0.2) transparent;
  /* GPU acceleration hints for iOS Safari */
  will-change: opacity, transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

.nav-links.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-links.mobile-menu::-webkit-scrollbar-track {
  background: transparent;
}

.nav-links.mobile-menu::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 0.2);
  border-radius: 3px;
}

.nav-links.mobile-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1) translateZ(0);
  pointer-events: auto;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              pointer-events 0s;
}

/* Smooth downward swipe collapse */
.nav-links.mobile-menu:not(.open) {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              pointer-events 0s;
}

[data-theme="dark"] .nav-links.mobile-menu {
  background: rgb(4 3 3 / 0.4);
  backdrop-filter: blur(var(--blur-3xl)) saturate(200%);
  border-color: rgb(var(--color-neutral-400-rgb) / 0.2);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.2),
              0 8px 24px rgb(0 0 0 / 0.15),
              0 0 0 1px rgb(255 255 255 / 0.1) inset,
              0 1px 0 rgb(255 255 255 / 0.15) inset,
              0 0 80px rgb(var(--color-primary-rgb) / 0.08);
}

[data-theme="dark"] .nav-links.mobile-menu::-webkit-scrollbar-thumb {
  background: rgb(255 255 255 / 0.2);
}

/* Mobile portrait: position menu above navbar */
@media (max-width: 767px) and (orientation: portrait) {
  .nav-links.mobile-menu {
    top: auto;
    bottom: calc(80px + 0.75rem);
    transform: translateY(20px) translateZ(0);
  }

  .nav-links.mobile-menu.open {
    transform: translateY(0) translateZ(0);
  }

  .nav-links.mobile-menu:not(.open) {
    opacity: 0;
    transform: translateY(-20px) translateZ(0);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
                pointer-events 0s;
  }
}

/* Mobile Menu Sections */
.mobile-nav-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2) var(--space-3); /* External spacing - gap between items (approx 0.625rem) */
  margin-bottom: var(--space-3); /* External spacing - margin between sections */
  border-bottom: 1px solid rgb(0 0 0 / 0.06);
  padding-bottom: var(--space-3); /* Internal spacing - padding inside section */
  position: relative;
}

.mobile-nav-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgb(0 0 0 / 0.1) 20%, 
    rgb(0 0 0 / 0.1) 80%, 
    transparent 100%);
}

[data-theme="dark"] .mobile-nav-section {
  border-bottom-color: rgb(255 255 255 / 0.1);
}

[data-theme="dark"] .mobile-nav-section::after {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgb(255 255 255 / 0.15) 20%, 
    rgb(255 255 255 / 0.15) 80%, 
    transparent 100%);
}

/* Mobile Menu Links - Redesigned - Theme-aware */
.mobile-menu-link,
.mobile-login-btn,
.theme-toggle-mobile {
  border-radius: var(--radius-button);
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3) var(--space-4); /* External spacing - gap between icon and text (approx 0.875rem) */
  padding: var(--space-3) var(--space-5); /* Internal spacing - padding for link (approx 1.125rem 1.375rem) */
  color: var(--text-primary) !important;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-decoration: none;
  background: linear-gradient(135deg, 
    rgb(0 0 0 / 0.02) 0%, 
    rgb(0 0 0 / 0.01) 50%,
    rgb(0 0 0 / 0.02) 100%);
  border: 2px solid rgb(0 0 0 / 0.06);
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 52px;
  box-shadow: 
    0 2px 6px rgb(0 0 0 / 0.04),
    0 1px 3px rgb(0 0 0 / 0.03),
    inset 0 1px 0 rgb(255 255 255 / 0.15),
    inset 0 -1px 0 rgb(0 0 0 / 0.03);
  overflow: hidden;
}

.mobile-menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, 
    rgb(var(--color-primary-rgb) / 0.9) 0%, 
    rgb(var(--color-primary-rgb) / 1) 50%, 
    rgb(var(--color-primary-rgb) / 0.9) 100%);
  border-radius: 0 3px 3px 0;
  transition: height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px rgb(var(--color-primary-rgb) / 0.3);
}

.mobile-menu-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgb(255 255 255 / 0.1) 0%, 
    rgb(255 255 255 / 0.05) 50%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

[data-theme="dark"] .mobile-menu-link {
  background: linear-gradient(135deg, 
    rgb(255 255 255 / 0.08) 0%, 
    rgb(255 255 255 / 0.05) 50%,
    rgb(255 255 255 / 0.08) 100%);
  border-color: rgb(255 255 255 / 0.15);
  box-shadow: 
    0 2px 6px rgb(0 0 0 / 0.1),
    0 1px 3px rgb(0 0 0 / 0.08),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(255 255 255 / 0.05);
  backdrop-filter: blur(var(--blur-lg));}

[data-theme="dark"] .mobile-menu-link::before {
  background: linear-gradient(180deg, 
    rgb(var(--color-primary-rgb) / 0.9) 0%, 
    rgb(var(--color-primary-rgb) / 1) 50%, 
    rgb(var(--color-primary-rgb) / 0.9) 100%);
  box-shadow: 0 0 8px rgb(var(--color-primary-rgb) / 0.4);
}

.nav-links.mobile-menu.open .mobile-menu-link {
  animation: mobileMenuLinkFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Smooth fade out for menu items on collapse */
.nav-links.mobile-menu:not(.open) .mobile-menu-link {
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(1) {
  animation-delay: 0.06s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(2) {
  animation-delay: 0.12s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(3) {
  animation-delay: 0.18s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(4) {
  animation-delay: 0.24s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(5) {
  animation-delay: 0.3s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(6) {
  animation-delay: 0.36s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(7) {
  animation-delay: 0.42s;
}

.nav-links.mobile-menu.open .mobile-menu-link:nth-child(8) {
  animation-delay: 0.48s;
}


.mobile-menu-link:hover {
  background: linear-gradient(135deg, 
    rgb(0 0 0 / 0.05) 0%, 
    rgb(0 0 0 / 0.03) 50%,
    rgb(0 0 0 / 0.05) 100%);
  border-color: rgb(0 0 0 / 0.1);
  transform: translateX(4px) translateY(-2px) scale(1.01);
  box-shadow: 
    0 4px 12px rgb(0 0 0 / 0.08),
    0 2px 6px rgb(0 0 0 / 0.05),
    0 0 0 3px rgb(var(--color-primary-rgb) / 0.08),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.03);
  padding-left: var(--space-6); /* Internal spacing - padding for active/hover state */
}

.mobile-menu-link:hover::before {
  height: 75%;
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.4);
}

.mobile-menu-link:hover::after {
  opacity: 1;
}

[data-theme="dark"] .mobile-menu-link:hover {
  background: linear-gradient(135deg, 
    rgb(255 255 255 / 0.15) 0%, 
    rgb(255 255 255 / 0.1) 50%,
    rgb(255 255 255 / 0.15) 100%);
  border-color: rgb(255 255 255 / 0.2);
  box-shadow: 
    0 4px 12px rgb(0 0 0 / 0.15),
    0 2px 6px rgb(0 0 0 / 0.1),
    0 0 0 3px rgb(var(--color-primary-rgb) / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.25),
    inset 0 -1px 0 rgb(255 255 255 / 0.1);
  backdrop-filter: blur(var(--blur-xl));}

[data-theme="dark"] .mobile-menu-link:hover::before {
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.5);
}

.mobile-menu-link:active {
  transform: translateX(2px) translateY(-1px) scale(0.99);
  box-shadow: 
    0 2px 6px rgb(0 0 0 / 0.06),
    0 1px 3px rgb(0 0 0 / 0.04),
    0 0 0 2px rgb(var(--color-primary-rgb) / 0.12),
    inset 0 1px 0 rgb(255 255 255 / 0.15);
}

[data-theme="dark"] .mobile-menu-link:active {
  box-shadow: 
    0 2px 6px rgb(0 0 0 / 0.15),
    0 1px 3px rgb(0 0 0 / 0.1),
    0 0 0 2px rgb(var(--color-primary-rgb) / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.2);
}

.mobile-menu-link.active {
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb) / 0.15) 0%, 
    rgb(var(--color-primary-rgb) / 0.1) 50%,
    rgb(var(--color-primary-rgb) / 0.12) 100%);
  border-color: rgb(var(--color-primary-rgb) / 0.3);
  color: rgb(var(--color-primary-rgb) / 1);
  font-weight: 600;
  padding-left: 1.5rem;
  box-shadow: 
    0 4px 12px rgb(var(--color-primary-rgb) / 0.15),
    0 2px 6px rgb(var(--color-primary-rgb) / 0.1),
    0 0 0 3px rgb(var(--color-primary-rgb) / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    inset 0 -1px 0 rgb(0 0 0 / 0.05);
}

.mobile-menu-link.active::before {
  height: 85%;
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.5);
}

.mobile-menu-link.active::after {
  opacity: 1;
}

[data-theme="dark"] .mobile-menu-link.active {
  background: linear-gradient(135deg, 
    rgb(var(--color-primary-rgb) / 0.4) 0%, 
    rgb(var(--color-primary-rgb) / 0.35) 50%,
    rgb(var(--color-primary-rgb) / 0.4) 100%);
  border-color: rgb(var(--color-primary-rgb) / 0.6);
  color: rgb(255 255 255) !important;
  box-shadow: 
    0 4px 12px rgb(var(--color-primary-rgb) / 0.25),
    0 2px 6px rgb(var(--color-primary-rgb) / 0.15),
    0 0 0 3px rgb(var(--color-primary-rgb) / 0.25),
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 -1px 0 rgb(var(--color-primary-rgb) / 0.15);
  backdrop-filter: blur(var(--blur-xl));
}

[data-theme="dark"] .mobile-menu-link.active::before {
  box-shadow: 0 0 12px rgb(var(--color-primary-rgb) / 0.6);
}

.mobile-menu-link:focus-visible,
.mobile-login-btn:focus-visible,
.theme-toggle-mobile:focus-visible {
  border-radius: var(--radius-button);
}

.mobile-menu-link:focus-visible {
  outline: 3px solid rgb(var(--color-primary-rgb) / 0.4);
  outline-offset: 3px;
}

/* Mobile Menu Icons */
.mobile-menu-icon {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
}

.mobile-menu-link:hover .mobile-menu-icon {
  transform: scale(1.15) translateX(2px);
  opacity: 1;
}

.mobile-menu-link.active .mobile-menu-icon {
  stroke: currentColor;
  opacity: 1;
  transform: scale(1.1);
}

.mobile-menu-link:active .mobile-menu-icon {
  transform: scale(1.05);
}

/* Mobile Dashboard Links */
.mobile-dashboard-link {
  background: rgb(var(--color-primary-rgb) / 0.05);
  border: 1px solid rgb(var(--color-primary-rgb) / 0.1);
}

[data-theme="dark"] .mobile-dashboard-link {
  background: rgb(var(--color-primary-rgb) / 0.15);
  border-color: rgb(var(--color-primary-rgb) / 0.25);
  backdrop-filter: blur(var(--blur-lg));}

.mobile-dashboard-link:hover {
  background: rgb(var(--color-primary-rgb) / 0.1);
  border-color: rgb(var(--color-primary-rgb) / 0.2);
}

[data-theme="dark"] .mobile-dashboard-link:hover {
  background: rgb(var(--color-primary-rgb) / 0.2);
  border-color: rgb(var(--color-primary-rgb) / 0.35);
  backdrop-filter: blur(var(--blur-xl));}

/* Mobile Menu Actions Container */
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* Minimal gap for very tight spacing between buttons */
  padding-top: 0; /* Removed top padding to minimize gap above theme toggle */
  margin-top: 0; /* No external margin */
}

/* Initial hidden state for action items */
.mobile-menu-actions > * {
  opacity: 0;
  transform: translateY(10px);
}

/* Fade in animation for action items when menu opens */
.nav-links.mobile-menu.open .mobile-menu-actions > * {
  animation: mobileActionItemFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered delays for action items */
.nav-links.mobile-menu.open .mobile-menu-actions > *:nth-child(1) {
  animation-delay: 0.4s;
}

.nav-links.mobile-menu.open .mobile-menu-actions > *:nth-child(2) {
  animation-delay: 0.45s;
}

.nav-links.mobile-menu.open .mobile-menu-actions > *:nth-child(3) {
  animation-delay: 0.5s;
}

/* Fade out animation for action items on collapse - reverse order */
.nav-links.mobile-menu:not(.open) .mobile-menu-actions > * {
  animation: mobileActionItemFadeOut 0.2s ease-out forwards;
}

.nav-links.mobile-menu:not(.open) .mobile-menu-actions > *:nth-child(1) {
  animation-delay: 0.1s;
}

.nav-links.mobile-menu:not(.open) .mobile-menu-actions > *:nth-child(2) {
  animation-delay: 0.05s;
}

.nav-links.mobile-menu:not(.open) .mobile-menu-actions > *:nth-child(3) {
  animation-delay: 0s;
}

/* Mobile Account Container */
.mobile-account-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* Reduced gap to minimize spacing */
  position: relative;
  /* Only reserve space when form is visible */
  min-height: auto;
  margin-bottom: 0; /* Reset - spacing handled by logout button margin */
}

/* Expand container only when sign-in form is opening/visible */
.mobile-account-container:has(.mobile-signin-form-container.opening) {
  min-height: 450px; /* Adjusted to prevent overlap while minimizing gap */
}

/* Hide button wrapper when form is visible */
.mobile-login-btn-wrapper.hidden {
  display: none; /* Completely remove from layout when hidden */
}

/* Mobile login — layout only; visual from .btn .btn-secondary in _buttons.css */
.mobile-login-btn {
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-6);
  gap: var(--space-3);
  text-decoration: none;
}

.mobile-login-btn .login-icon {
  width: 1.375rem;
  height: 1.375rem;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.mobile-login-btn:hover .login-icon {
  transform: scale(1.15) rotate(5deg);
}

.mobile-login-btn .user-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Sign-In Form Container */
.mobile-signin-form-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: var(--space-5); /* Internal spacing - padding for form container (1.25rem) */
  background: linear-gradient(135deg, 
    rgb(255 255 255 / 0.95) 0%, 
    rgb(255 255 255 / 0.9) 100%);
  border: 2px solid rgb(var(--color-secondary-rgb) / 0.2);
  border-radius: 1.25rem;
  box-shadow: 
    0 4px 12px rgb(var(--color-secondary-rgb) / 0.1),
    0 2px 6px rgb(0 0 0 / 0.05),
    inset 0 1px 0 rgb(255 255 255 / 0.5);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  border-width: 0;
  visibility: hidden;
  min-height: 0;
  z-index: 10;
}

.mobile-signin-form-container.opening {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0) scale(1);
  padding: var(--space-4); /* Reduced padding for form container */
  border-width: 2px;
  margin: 0;
  animation: mobileSignInSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  visibility: visible;
  min-height: 420px; /* Adjusted to ensure content fits without overlap */
  z-index: 10;
}

.mobile-signin-form-container.closing {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  animation: mobileSignInSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mobileSignInSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 600px;
  }
}

@keyframes mobileSignInSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 600px;
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    max-height: 0;
  }
}

[data-theme="dark"] .mobile-signin-form-container {
  background: linear-gradient(135deg,
    rgb(4 3 3 / 0.5) 0%,
    rgb(4 3 3 / 0.4) 100%);
  border-color: rgb(var(--color-secondary-rgb) / 0.3);
  box-shadow: 
    0 4px 12px rgb(var(--color-secondary-rgb) / 0.1),
    0 2px 6px rgb(0 0 0 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.15);
  backdrop-filter: blur(var(--blur-2xl)) saturate(var(--backdrop-saturate));}

.mobile-signin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5); /* External spacing - margin below header (1.25rem) */
}

.mobile-signin-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: rgb(var(--color-secondary-rgb) / 1);
  margin: 0;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .mobile-signin-title {
  color: rgb(var(--color-secondary-rgb) / 1);
}

.mobile-signin-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgb(0 0 0 / 0.15);
  border: 1px solid rgb(0 0 0 / 0.25);
  color: rgb(0 0 0 / 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  z-index: 10;
}

.mobile-signin-close:hover {
  background: rgb(0 0 0 / 0.2);
  border-color: rgb(0 0 0 / 0.3);
  color: rgb(0 0 0 / 1);
  transform: scale(1.05);
}

.mobile-signin-close:active {
  transform: scale(0.95);
  background: rgb(0 0 0 / 0.2);
}

.mobile-signin-close svg {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  stroke-width: 2.5;
  stroke: currentColor;
  fill: none;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.mobile-signin-close svg path {
  stroke: inherit;
  stroke-width: inherit;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

[data-theme="dark"] .mobile-signin-close {
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.2);
  color: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(var(--blur-lg));}

[data-theme="dark"] .mobile-signin-close:hover {
  background: rgb(255 255 255 / 0.18);
  border-color: rgb(255 255 255 / 0.3);
  color: rgb(255 255 255 / 1);
}

.mobile-signin-success {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: rgb(34 197 94 / 0.1);
  border: 1px solid rgb(34 197 94 / 0.3);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

[data-theme="dark"] .mobile-signin-success {
  background: rgb(34 197 94 / 0.15);
  border-color: rgb(34 197 94 / 0.4);
}

.mobile-signin-error {
  padding: var(--space-3) var(--space-4); /* Internal spacing - padding for error message (approx 0.875rem 1rem) */
  margin-bottom: var(--space-4); /* External spacing - margin below error message */
  background: rgb(var(--color-error-rgb) / 0.1);
  border: 1px solid rgb(var(--color-error-rgb) / 0.3);
  border-radius: 0.75rem;
  color: rgb(var(--color-error-rgb) / 1);
  font-size: 0.875rem;
  font-weight: 500;
  animation: mobileSignInErrorShake 0.4s ease;
}

@keyframes mobileSignInErrorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

[data-theme="dark"] .mobile-signin-error {
  background: rgb(var(--color-error-rgb) / 0.2);
  border-color: rgb(var(--color-error-rgb) / 0.35);
  color: rgb(var(--color-error-rgb) / 1);
  backdrop-filter: blur(var(--blur-lg));}

.mobile-signin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-signin-form-container.opening .mobile-signin-form {
  animation: mobileSignInFormFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.mobile-signin-form-container.closing .mobile-signin-form {
  animation: mobileSignInFormFadeOut 0.2s ease both;
}

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

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

.mobile-signin-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-signin-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.mobile-signin-input {
  width: 100%;
  padding: var(--space-3) var(--space-4); /* Internal spacing - padding for input (approx 0.875rem 1rem) */
  border-radius: var(--radius-input);
  border: 2px solid rgb(var(--color-secondary-rgb) / 0.2);
  background: rgb(255 255 255 / 0.8);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
}

.mobile-signin-input:focus {
  outline: none;
  border-color: rgb(var(--color-secondary-rgb) / 0.5);
  background: rgb(255 255 255 / 1);
  box-shadow: 0 0 0 3px rgb(var(--color-secondary-rgb) / 0.1);
}

.mobile-signin-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

[data-theme="dark"] .mobile-signin-input {
  background: rgb(4 3 3 / 0.5);
  border-color: rgb(var(--color-secondary-rgb) / 0.3);
  color: var(--text-primary);
  backdrop-filter: blur(var(--blur-lg));}

[data-theme="dark"] .mobile-signin-input:focus {
  border-color: rgb(var(--color-secondary-rgb) / 0.5);
  background: rgb(4 3 3 / 0.6);
  box-shadow: 0 0 0 3px rgb(var(--color-secondary-rgb) / 0.2);
  backdrop-filter: blur(var(--blur-xl));}

/* Dark mode placeholder text for mobile signin input - white color */
[data-theme="dark"] .mobile-signin-input::-moz-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}
[data-theme="dark"] .mobile-signin-input::placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

[data-theme="dark"] .mobile-signin-input::-webkit-input-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

[data-theme="dark"] .mobile-signin-input::-moz-placeholder {
  color: var(--text-primary);
  opacity: 0.6;
}

.mobile-signin-submit {
  width: 100%;
  padding: var(--space-4); /* Internal spacing - padding for submit button */
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, 
    rgb(var(--color-secondary-rgb) / 0.9) 0%, 
    rgb(var(--color-secondary-rgb) / 0.85) 100%);
  border: 2px solid rgb(var(--color-secondary-rgb) / 0.3);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 4px 12px rgb(var(--color-secondary-rgb) / 0.3),
    0 2px 6px rgb(0 0 0 / 0.1);
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-signin-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, 
    rgb(var(--color-secondary-rgb) / 1) 0%, 
    rgb(var(--color-secondary-rgb) / 0.95) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 16px rgb(var(--color-secondary-rgb) / 0.4),
    0 3px 8px rgb(0 0 0 / 0.15);
}

.mobile-signin-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.mobile-signin-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .mobile-signin-submit {
  background: linear-gradient(135deg, 
    rgb(var(--color-secondary-rgb) / 0.85) 0%, 
    rgb(var(--color-secondary-rgb) / 0.8) 100%);
  border-color: rgb(var(--color-secondary-rgb) / 0.4);
  box-shadow: 
    0 4px 12px rgb(var(--color-secondary-rgb) / 0.25),
    0 2px 6px rgb(0 0 0 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.15);
  backdrop-filter: blur(var(--blur-xl));}

[data-theme="dark"] .mobile-signin-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, 
    rgb(var(--color-secondary-rgb) / 0.95) 0%, 
    rgb(var(--color-secondary-rgb) / 0.9) 100%);
  box-shadow: 
    0 6px 16px rgb(var(--color-secondary-rgb) / 0.3),
    0 3px 8px rgb(0 0 0 / 0.2),
    inset 0 1px 0 rgb(255 255 255 / 0.2);
  backdrop-filter: blur(var(--blur-xl));}

.mobile-signin-switch {
  width: 100%;
  padding: var(--space-3); /* Internal spacing - padding for switch button */
  background: transparent;
  border: none;
  color: rgb(var(--color-secondary-rgb) / 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-signin-switch:hover {
  color: rgb(var(--color-secondary-rgb) / 1);
}

[data-theme="dark"] .mobile-signin-switch {
  color: rgb(var(--color-secondary-rgb) / 0.8);
}

[data-theme="dark"] .mobile-signin-switch:hover {
  color: rgb(var(--color-secondary-rgb) / 1);
}

/* Mobile logout — layout only; visual from .btn .btn-danger in _buttons.css */
.mobile-logout-btn {
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-6);
  gap: var(--space-3);
  margin-bottom: 0;
}

.mobile-logout-btn .logout-icon {
  width: 1.375rem;
  height: 1.375rem;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.mobile-logout-btn:hover .logout-icon {
  transform: scale(1.15) translateX(2px);
}

/* Theme Toggle Mobile — layout only; visual from .btn .btn-ghost */
.theme-toggle-mobile,
.theme-toggle-btn.theme-toggle-mobile {
  width: 100% !important;
  padding: var(--space-3) var(--space-6);
  min-height: 56px;
  flex-shrink: 1;
}

.theme-toggle-mobile .theme-toggle-icon {
  width: 1.625rem;
  height: 1.625rem;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
}

.theme-toggle-mobile:hover .theme-toggle-icon {
  transform: scale(1.2) rotate(15deg);
}

.theme-toggle-mobile:active .theme-toggle-icon {
  transform: scale(1.1) rotate(30deg);
}

/* Theme icon visibility - ensure only one icon shows at a time */
.theme-icon-light,
.theme-icon-dark {
  display: block;
}

/* Hide dark icon by default (light mode) */
.theme-icon-dark {
  display: none;
}

/* Show dark icon in dark mode, hide light icon */
[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-link {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  
  .mobile-menu-link:hover {
    transform: none;
  }
  
  .mobile-menu-link:active {
    transform: scale(0.98);
  }
}

/* Theme & language toggles — layout only; visual from .btn .btn-ghost in _buttons.css */
.theme-toggle-btn {
  width: clamp(2rem, 2.5vw, 2.5rem);
  height: clamp(2rem, 2.5vw, 2.5rem);
  padding: clamp(0.25rem, 0.5vw, var(--space-2));
  flex-shrink: 0;
  min-width: -moz-fit-content;
  min-width: fit-content;
}

.theme-toggle-btn .theme-toggle-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn:hover .theme-toggle-icon {
  transform: scale(1.1) rotate(15deg);
}

.theme-toggle-btn:active .theme-toggle-icon {
  transform: scale(0.95);
}

.navbar-content > .theme-toggle-btn {
  margin-left: var(--space-2);
}

/* Desktop account buttons — layout only; visual from .btn in _buttons.css */
.desktop-login-btn .login-icon,
.desktop-logout-btn .logout-icon {
  width: clamp(1rem, 1.125vw, 1.125rem);
  height: clamp(1rem, 1.125vw, 1.125rem);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.desktop-login-btn .login-text,
.desktop-login-btn .user-name,
.desktop-logout-btn .logout-text {
  font-size: clamp(0.75rem, 0.875vw, var(--font-size-sm));
}

/* Sign-in button and signed-in user name: black in light mode, white in dark mode */
.desktop-login-btn:has(.login-text),
.desktop-login-btn:has(.user-name) {
  color: rgb(var(--color-neutral-950-rgb));
}
.desktop-login-btn:has(.login-text) .login-icon,
.desktop-login-btn:has(.user-name) .login-icon {
  stroke: rgb(var(--color-neutral-950-rgb));
}
.mobile-login-btn {
  color: rgb(var(--color-neutral-950-rgb));
}
.mobile-login-btn .login-icon {
  stroke: rgb(var(--color-neutral-950-rgb));
}
[data-theme="dark"] .desktop-login-btn:has(.login-text),
[data-theme="dark"] .desktop-login-btn:has(.user-name) {
  color: rgb(var(--color-white-rgb));
}
[data-theme="dark"] .desktop-login-btn:has(.login-text) .login-icon,
[data-theme="dark"] .desktop-login-btn:has(.user-name) .login-icon {
  stroke: rgb(var(--color-white-rgb));
}
[data-theme="dark"] .mobile-login-btn {
  color: rgb(var(--color-white-rgb));
}
[data-theme="dark"] .mobile-login-btn .login-icon {
  stroke: rgb(var(--color-white-rgb));
}

.desktop-login-btn .user-name {
  max-width: clamp(80px, 12vw, 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.language-toggle-btn {
  width: clamp(2rem, 2.5vw, 2.5rem);
  height: clamp(2rem, 2.5vw, 2.5rem);
  padding: clamp(0.25rem, 0.5vw, var(--space-2));
  flex-shrink: 0;
  min-width: -moz-fit-content;
  min-width: fit-content;
}

.language-toggle-text {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.language-toggle-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.language-toggle-flag svg {
  width: 1.25em;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1);
}

.navbar-content > .language-toggle-btn {
  margin-left: var(--space-2);
}

.language-toggle-btn.theme-toggle-mobile,
.mobile-menu-actions .language-toggle-btn {
  width: 100% !important;
  padding: var(--space-3) var(--space-6);
  margin-bottom: var(--space-2);
}

@media (max-width: 767px) {
  .language-toggle-btn {
    width: 2.25rem !important;
    height: 2.25rem !important;
    padding: var(--space-1) var(--space-2) !important;
  }
}

@media (min-width: 768px) {
  html {
    scroll-padding-top: 5rem;
  }

  .glass-card {
    border-radius: 1.5rem;
  }

  .navbar-wrapper {
    padding: clamp(var(--space-3), 1vw, var(--space-4)) clamp(var(--space-4), 1.5vw, var(--space-6));
  }

  .navbar-glass-container {
    max-width: calc(100vw - clamp(2rem, 4vw, 3rem));
    padding: clamp(var(--space-2), 0.75vw, var(--space-3)) clamp(var(--space-3), 1.25vw, var(--space-5));
  }

  .nav-links.mobile-menu {
    display: none !important;
  }

  footer {
    padding-bottom: var(--space-12); /* Internal spacing - padding at bottom of footer (3rem) */
  }
}

/* Large desktop screens - ensure navbar doesn't get too spread out */
@media (min-width: 1920px) {
  .navbar-glass-container {
    max-width: min(calc(100vw - 4rem), 1920px);
  }

  .navbar-content {
    gap: clamp(1rem, 1.5vw, 1.5rem);
  }

  .navbar-links {
    gap: clamp(0.75rem, 1vw, 1.25rem);
  }

  .navbar-links a {
    font-size: clamp(0.875rem, 1vw, 1rem);
    padding: clamp(var(--space-2), 0.75vw, var(--space-3)) clamp(var(--space-3), 1vw, var(--space-5));
  }
}



/*# sourceMappingURL=41c0737012b44de2.css.map*/