/* components-consolidated.css - Built: 2025-12-05 15:36:10 UTC */
/* Source files: 29 */


/* ========== components/accessibility.css ========== */
/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Non-keyboard users don't need visible focus outlines */
body:not(.using-keyboard) *:focus {
  outline: none;
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
   ======================================== */

@media (prefers-contrast: high) {
  *:focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
  }
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Keep focus transitions for accessibility */
  *:focus-visible {
    transition: outline 0.15s ease !important;
  }
}

/* ========================================
   TOUCH TARGET SIZES (WCAG 2.5.5)
   ======================================== */

/* Ensure minimum 44x44px touch targets on mobile */
@media (max-width: 768px) {
  button,
  .btn,
  a[role="button"],
  input[type="checkbox"],
  input[type="radio"],
  .modern-switch {
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
  }

  /* Exception for inline text links */
  p a,
  span a,
  td a:not(.btn) {
    min-width: auto;
    min-height: auto;
  }
}

/* ========================================
   FOCUS TRAP FOR MODALS
   ======================================== */

/* Modal focus management - Bootstrap handles pointer-events natively */
.modal.show {
  isolation: isolate;
}

/* ========================================
   ARIA LIVE REGIONS STYLING
   ======================================== */

[aria-live="polite"],
[aria-live="assertive"] {
  /* Ensure live regions are visible but not intrusive */
  position: relative;
}

/* Toast/Alert notifications */
.toast[role="alert"],
.alert[role="alert"] {
  /* Ensure proper focus management */
  position: relative;
}

/* ========================================
   DISABLED STATE ACCESSIBILITY
   ======================================== */

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

/* Ensure disabled state is communicated clearly */
button:disabled:focus,
input:disabled:focus,
select:disabled:focus,
textarea:disabled:focus {
  outline: none;
  box-shadow: none;
}

/* ========================================
   LOADING STATE ACCESSIBILITY
   ======================================== */

[aria-busy="true"] {
  position: relative;
  cursor: wait;
}

/* Loading spinner for screen readers */
.loading-spinner[role="status"] {
  /* Ensure spinner is announced to screen readers */
  position: relative;
}

/* ========================================
   ERROR STATE ACCESSIBILITY
   ======================================== */

/* Error messages should be clearly associated */
.error-message[role="alert"],
[aria-invalid="true"] + .error-message {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

.error-message::before {
  content: "⚠";
  font-weight: var(--font-weight-bold);
}

/* ========================================
   DARK MODE FOCUS ADJUSTMENTS
   ======================================== */

[data-theme="dark"] {
  --focus-outline: 2px solid rgba(96, 165, 250, 0.8);
  --color-focus-ring: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] *:focus-visible {
  outline-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}


/* ========== components/alerts.css ========== */
/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

/* Alert Component */
.ds-alert {
  padding: var(--space-4);
  border-radius: var(--border-radius);
  border-left: var(--border-width-4) solid currentColor;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  position: relative;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.ds-alert__icon {
  flex-shrink: 0;
  font-size: var(--font-size-lg);
}

.ds-alert__content {
  flex: 1;
}

.ds-alert__title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.ds-alert__message {
  color: var(--color-text-secondary);
}

.ds-alert__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text-secondary);
  transition: var(--transition-colors);
  border-radius: var(--border-radius-sm);
}

.ds-alert__close:hover {
  background-color: var(--color-alert-hover);
  color: var(--color-text-primary);
}

/* Alert Variants */
.ds-alert--success {
  color: var(--color-success-dark);
  border-color: var(--color-success);
  background-color: var(--color-success-bg);
}

.ds-alert--danger {
  color: var(--color-danger-dark);
  border-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.ds-alert--warning {
  color: var(--color-warning-dark);
  border-color: var(--color-warning);
  background-color: var(--color-warning-bg);
}

.ds-alert--info {
  color: var(--color-info-dark);
  border-color: var(--color-info);
  background-color: var(--color-info-bg);
}

/* Alert with gradient (for warning boxes) */
.ds-alert--warning-gradient {
  background: linear-gradient(135deg, var(--color-warning-bg-gradient-start) 0%, var(--color-warning-bg-gradient-end) 100%);
  border-left-color: var(--color-warning);
  border-left-width: 4px;
}

/* Dismissible animation */
.ds-alert.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Alert actions wrapper */
.ds-alert-actions {
  margin-top: var(--space-4);
}

/* ========================================
   DIVIDERS
   ======================================== */

.ds-divider {
  height: var(--border-width);
  background: var(--color-border);
  border: none;
  margin: var(--space-4) 0;
}

.ds-divider--strong {
  background: var(--color-border-strong);
}

.ds-divider--light {
  background: var(--color-border-light);
}


/* ========================================
   WARNING & INFO BOXES WITH GRADIENTS
   ======================================== */
/* Warning Box with Gradient */
.ds-warning-box {
  background: linear-gradient(135deg, var(--color-warning-bg-gradient-start) 0%, var(--color-warning-bg-gradient-end) 100%);
  border-left: 5px solid var(--color-warning-bright);
  border-radius: var(--border-radius);
  padding: var(--space-6);
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
  box-shadow: 0 2px 12px rgba(255, 152, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.ds-warning-box__icon {
  color: var(--color-warning-bright);
  font-size: var(--font-size-2xl);
  margin-top: 2px;
  flex-shrink: 0;
}

.ds-warning-box__content {
  flex: 1;
}

.ds-warning-box h6 {
  color: var(--color-warning-darker);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-3) 0;
  font-size: var(--font-size-base);
}

.ds-warning-box p {
  margin: 0 0 var(--space-4) 0;
  color: var(--color-brown);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

/* Info Box with Gradient */
.ds-info-box {
  background: linear-gradient(135deg, var(--color-info-gradient-start) 0%, var(--color-info-gradient-end) 100%);
  border-left: var(--border-width-4) solid var(--color-cyan);
  border-radius: var(--border-radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.ds-info-box__icon {
  color: var(--color-cyan);
  font-size: var(--font-size-xl);
  margin-top: var(--space-0-5);
  flex-shrink: 0;
}

.ds-info-box__content {
  flex: 1;
}

/* Warning Table (inside warning boxes) */
.ds-warning-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  margin-top: var(--space-3);
  border-radius: 8px;
  overflow: hidden;
}

.ds-warning-table thead tr {
  background: rgba(255, 152, 0, 0.15);
  border-bottom: 2px solid var(--color-warning-bright);
}

.ds-warning-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: var(--font-weight-bold);
  color: var(--color-warning-darker);
  font-size: var(--font-size-sm);
}

.ds-warning-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-brown);
  vertical-align: top;
}

.ds-warning-table tbody tr {
  border-bottom: var(--border-width) solid rgba(255, 152, 0, 0.15);
  transition: background 0.2s ease;
}

.ds-warning-table tbody tr:hover {
  background: rgba(255, 152, 0, 0.05);
}

.ds-warning-table tbody tr:last-child {
  border-bottom: none;
}

.ds-warning-table tbody tr.ds-warning-table__row--highlight {
  background: rgba(211, 47, 47, 0.08);
}

.ds-warning-table tbody tr.ds-warning-table__row--highlight:hover {
  background: rgba(211, 47, 47, 0.12);
}

/* Notice component - informational callouts */
.ds-notice {
  padding: var(--space-4);
  border-radius: var(--border-radius);
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  color: var(--color-info-dark);
  margin-bottom: var(--space-4);
}

.ds-notice--warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-dark);
}

.ds-notice--success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-dark);
}

.ds-notice--danger {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger-dark);
}


/* ========== components/badges.css ========== */
/* ========================================
   BADGES
   ======================================== */

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--badge-padding-y) var(--badge-padding-x);
  font-size: var(--badge-font-size);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-none);
  border-radius: var(--badge-border-radius);
  border: var(--border-width) solid transparent;
  white-space: nowrap;
}

.ds-badge--success {
  background: var(--color-success-bg);
  color: var(--color-success-dark);
  border-color: var(--color-success-border);
}

.ds-badge--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-dark);
  border-color: var(--color-warning-border);
}

.ds-badge--danger {
  background: var(--color-danger-bg);
  color: var(--color-danger-dark);
  border-color: var(--color-danger-border);
}

.ds-badge--info {
  background: var(--color-info-bg);
  color: var(--color-info-dark);
  border-color: var(--color-info-border);
}

.ds-badge--neutral {
  background: var(--color-surface-secondary);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.ds-badge--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* Badge sizes */
.ds-badge--sm {
  padding: calc(var(--badge-padding-y) / 2) var(--badge-padding-x);
  font-size: 0.625rem; /* 10px */
}

.ds-badge--lg {
  padding: var(--space-1-5) var(--space-3);
  font-size: var(--font-size-sm);
}

/* Badge List Components */
.ds-badge-list-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-secondary);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  margin-right: var(--space-2);
  margin-bottom: var(--space-2);
}

.ds-badge-remove-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}



/* ========== components/buttons.css ========== */
/* ========================================
   BUTTONS
   ======================================== */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  min-height: var(--btn-height);
  font-size: var(--font-size-base);
  font-weight: var(--btn-font-weight);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border: var(--border-width) solid transparent;
  border-radius: var(--btn-border-radius);
  cursor: pointer;
  user-select: none;
  transition: all 150ms ease;  /* Smooth transitions for all properties */
  gap: var(--space-2);
}

.ds-btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

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

/* Button Variants */
.ds-btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.ds-btn--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);  /* Subtle lift effect */
  box-shadow: var(--shadow-sm);
}

.ds-btn--secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.ds-btn--secondary:hover:not(:disabled) {
  background: var(--color-hover);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.ds-btn--outline:hover:not(:disabled) {
  background: var(--color-hover);
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

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

.ds-btn--ghost:hover:not(:disabled) {
  background: var(--color-hover);
  transform: translateY(-1px);
}

.ds-btn--inverse {
  background: color-mix(in srgb, var(--color-surface) 2%, transparent);
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.3);
}

.ds-btn--inverse:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-surface) 3%, transparent);
  color: var(--color-text-inverse);
  transform: translateX(-2px);
}

.ds-btn--success {
  background: var(--color-success);
  color: var(--color-text-inverse);
  border-color: var(--color-success);
}

.ds-btn--success:hover:not(:disabled) {
  background: var(--color-success-dark);
  border-color: var(--color-success-dark);
}

.ds-btn--danger {
  background: var(--color-danger);
  color: var(--color-text-inverse);
  border-color: var(--color-danger);
}

.ds-btn--danger:hover:not(:disabled) {
  background: var(--color-danger-dark);
  border-color: var(--color-danger-dark);
}

.ds-btn--warning {
  background: var(--color-warning);
  color: var(--color-text-inverse);
  border-color: var(--color-warning);
}

/* ========================================
   CRITICAL FIX: ACTIVE STATE FOR DESIGN SYSTEM BUTTONS
   All DS buttons in active state must have white text on dark backgrounds
   ======================================== */

/* Active state for toggle buttons (using aria-pressed) */
.ds-btn[aria-pressed="true"],
.ds-btn.is-active,
.ds-layout-toggle__btn[aria-pressed="true"],
.ds-layout-toggle__btn.is-active {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: var(--color-primary) !important;
}

/* Active state for primary buttons */
.ds-btn--primary[aria-pressed="true"],
.ds-btn--primary.is-active {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Active state for secondary buttons */
.ds-btn--secondary[aria-pressed="true"],
.ds-btn--secondary.is-active {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: var(--color-primary) !important;
}

.ds-btn--warning:hover:not(:disabled) {
  background: var(--color-warning-dark);
  border-color: var(--color-warning-dark);
}

.ds-btn--info {
  background: var(--color-info);
  color: var(--color-text-inverse);
  border-color: var(--color-info);
}

.ds-btn--info:hover:not(:disabled) {
  background: var(--color-info-dark);
  border-color: var(--color-info-dark);
}

/* Outline variants for semantic colors */
.ds-btn--outline-primary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.ds-btn--outline-primary:hover:not(:disabled) {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.ds-btn--outline-success {
  background: transparent;
  color: var(--color-success);
  border-color: var(--color-success);
}

.ds-btn--outline-success:hover:not(:disabled) {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.ds-btn--outline-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.ds-btn--outline-danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: var(--color-text-inverse);
}

/* ========================================
   BUTTON LOADING STATE
   Consistent loading indicator for all buttons
   ======================================== */

/* Loading state - applies to all button types */
.btn-loading,
.ds-btn--loading,
button.btn-loading,
a.btn-loading {
  position: relative;
  pointer-events: none;
  cursor: wait !important;
}

.btn-loading:disabled,
.ds-btn--loading:disabled {
  opacity: 0.8;
}

/* Spinner styling within loading buttons */
.btn-loading .spinner-border,
.ds-btn--loading .spinner-border {
  width: 1em;
  height: 1em;
  border-width: 0.15em;
  vertical-align: -0.125em;
}

/* Small button spinners */
.btn-sm.btn-loading .spinner-border,
.ds-btn--sm.btn-loading .spinner-border {
  width: 0.875em;
  height: 0.875em;
  border-width: 0.12em;
}

/* Large button spinners */
.btn-lg.btn-loading .spinner-border,
.ds-btn--lg.btn-loading .spinner-border {
  width: 1.25em;
  height: 1.25em;
  border-width: 0.18em;
}

/* Icon-only buttons in loading state */
.btn-loading.btn-icon-only .spinner-border,
.ds-btn--loading.ds-btn--icon .spinner-border {
  margin: 0;
}

/* Ensure loading buttons maintain their width */
.btn-loading {
  transition: none;
}

/* Loading state preserves button colors */
.btn-primary.btn-loading,
.ds-btn--primary.btn-loading {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary.btn-loading,
.ds-btn--secondary.btn-loading {
  background-color: var(--bs-secondary, #6c757d);
  border-color: var(--bs-secondary, #6c757d);
}

.btn-success.btn-loading,
.ds-btn--success.btn-loading {
  background-color: var(--color-success);
  border-color: var(--color-success);
}

.btn-danger.btn-loading,
.ds-btn--danger.btn-loading {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-warning.btn-loading,
.ds-btn--warning.btn-loading {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
}

.btn-info.btn-loading,
.ds-btn--info.btn-loading {
  background-color: var(--color-info);
  border-color: var(--color-info);
}

/* Outline buttons in loading state */
.btn-outline-primary.btn-loading,
.btn-outline-secondary.btn-loading,
.btn-outline-success.btn-loading,
.btn-outline-danger.btn-loading,
.btn-outline-warning.btn-loading,
.btn-outline-info.btn-loading {
  opacity: 0.7;
}


/* ========== components/buttons-extended.css ========== */
/* ========================================
   EXTENDED BUTTON STYLES
   ======================================== */

/* Outline Success Button Hover State */
.ds-btn--outline-success:hover:not(:disabled) {
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.ds-btn--outline-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.ds-btn--outline-danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: var(--color-text-inverse);
}

.ds-btn--outline-warning {
  background: transparent;
  color: var(--color-warning);
  border-color: var(--color-warning);
}

.ds-btn--outline-warning:hover:not(:disabled) {
  background: var(--color-warning);
  color: var(--color-text-inverse);
}

.ds-btn--outline-info {
  background: transparent;
  color: var(--color-info);
  border-color: var(--color-info);
}

.ds-btn--outline-info:hover:not(:disabled) {
  background: var(--color-info);
  color: var(--color-text-inverse);
}

.ds-btn--outline-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.ds-btn--outline-secondary:hover:not(:disabled) {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

/* Link-style button */
.ds-btn--link {
  background: transparent;
  color: var(--color-primary);
  border-color: transparent;
  padding: 0;
  min-height: auto;
  text-decoration: underline;
}

.ds-btn--link:hover:not(:disabled) {
  color: var(--color-primary-hover);
  background: transparent;
  transform: none;
}

/* Close button (for modals/alerts) */
.ds-btn--close {
  background: transparent;
  border: none;
  padding: var(--space-2);
  min-height: auto;
  color: var(--color-text-secondary);
  opacity: 0.7;
}

.ds-btn--close:hover:not(:disabled) {
  background: var(--color-hover);
  opacity: 1;
  transform: none;
}

/* Button Sizes */
.ds-btn--sm {
  padding: calc(var(--btn-padding-y) - var(--space-1)) var(--space-3);
  font-size: var(--font-size-sm);
  min-height: var(--btn-height-sm);
}

.ds-btn--lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-md);
  min-height: var(--btn-height-lg);
}

.ds-btn--xl {
  padding: var(--space-8) var(--space-4);
  font-size: var(--font-size-base);
  min-height: var(--btn-height-lg);
}

/* Button with icon */
.ds-btn__icon {
  display: inline-flex;
  align-items: center;
}

.ds-btn__icon--left {
  margin-right: var(--space-2);
}

.ds-btn__icon--right {
  margin-left: var(--space-2);
}

/* Full width button */
.ds-btn--block {
  display: flex;
  width: 100%;
}

/* Gradient Button Variants */
.ds-btn--gradient-blue {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
  border: none;
  color: var(--color-text-inverse);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-info);
}

.ds-btn--gradient-orange {
  background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
  border: none;
  color: var(--color-text-inverse);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-warning);
}

.ds-btn--gradient-purple {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-dark) 100%);
  border: none;
  color: var(--color-text-inverse);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-purple);
}

.ds-btn--gradient-red {
  background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
  border: none;
  color: var(--color-text-inverse);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-danger);
}

.ds-btn--cancel-light {
  background: white;
  border: var(--border-width-2) solid var(--color-border);
  color: var(--color-gray-700);
  border-radius: 8px;
  transition: all 0.2s;
}

.ds-btn--clean-white {
  background: white;
  border: var(--border-width-2) solid var(--color-border);
  color: var(--color-gray-700);
  border-radius: 8px;
  transition: all 0.2s;
}

.ds-btn-danger-outline {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Mobile Touch Targets */
@media (max-width: 768px) {
  .ds-btn {
    min-height: var(--btn-height-mobile);
  }
  
  .ds-btn--sm {
    min-height: var(--btn-height-mobile);
    padding: var(--btn-padding-y) var(--btn-padding-x);
  }
}

/* ========================================
   EXTRA SMALL BUTTON VARIANT
   ======================================== */

.ds-btn--xs {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    min-height: 32px;
}



/* ========== components/cards.css ========== */
/* ========================================
   CARDS - Modern floating design with soft shadows
   ======================================== */

.ds-card {
  background: var(--card-bg);
  border: none;  /* No borders - use shadow for depth */
  border-radius: var(--card-border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 150ms ease;
}

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

.ds-card__header {
  padding: var(--card-padding);
  border-bottom: none;  /* Clean, borderless design */
  background: transparent;  /* No background - clean look */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-4);  /* Reduce bottom padding since no border */
}

.ds-card__title {
  font-size: var(--font-size-xl);  /* Larger, clearer titles */
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
}

.ds-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: var(--space-1) 0 0 0;
  line-height: var(--line-height-normal);
}

.ds-card__header-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.ds-card__body {
  padding: var(--card-padding);
}

.ds-card__body--no-padding {
  padding: 0;
}

.ds-card__footer {
  padding: var(--card-padding);
  border-top: var(--border-width) solid var(--color-border-light);  /* Very subtle separator */
  background: transparent;  /* Clean look */
  padding-top: var(--space-4);
}

/* Card Variants */
.ds-card--flat {
  box-shadow: var(--shadow-none);
}

.ds-card--elevated {
  box-shadow: var(--shadow-md);
}

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

.ds-card--interactive {
  cursor: pointer;
  transition: all 200ms ease;
}

.ds-card--interactive:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.ds-card--lg {
  border-radius: var(--border-radius-lg);
}

.ds-card--lg .ds-card__body {
  padding: var(--card-padding-lg);
}

.ds-card--bordered {
  border: var(--border-width-2) solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.ds-card--bordered:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Setting Item - Elevated Style */
.ds-setting-item--elevated {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.ds-setting-item--elevated:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.ds-setting-item--elevated .ds-setting-info {
  flex: 1;
}

.ds-setting-item--elevated .ds-setting-info span {
  display: block;
  margin-bottom: var(--space-1);
}

/**
 * Design System - Form Components
 * bIDMIO
 * 
 * All form elements, inputs, validation states, and layouts
 * Naming Convention: .ds-form-{element}[--{modifier}]
 */



/* ========== components/focus-states.css ========== */
/* ========================================
   FOCUS STATES - Universal Interactive Elements
   ======================================== */

/**
 * Focus-visible polyfill for keyboard navigation
 * Shows focus ring only when navigating with keyboard, not mouse clicks
 */
*:focus {
  outline: none; /* Remove default outline */
}

*:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
  border-radius: var(--border-radius-sm);
}

/* ========================================
   BUTTONS - Enhanced Focus States
   ======================================== */

button:focus-visible,
.btn:focus-visible,
.ds-btn:focus-visible,
[role="button"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
  box-shadow: var(--shadow-focus);
}

.btn-primary:focus-visible,
.ds-btn--primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.3);
}

.btn-secondary:focus-visible,
.ds-btn--secondary:focus-visible {
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

.btn-danger:focus-visible {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.btn-success:focus-visible {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* Icon buttons */
.btn-icon:focus-visible,
button[class*="icon"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* ========================================
   FORM INPUTS - Enhanced Focus States
   ======================================== */

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.ds-form-input:focus-visible,
.ds-form-textarea:focus-visible {
  border-color: var(--color-focus);
  box-shadow: var(--shadow-focus);
  outline: none;
}

/* Error state focus */
input.error:focus-visible,
.ds-form-input.error:focus-visible {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px var(--form-focus-ring-danger);
}

/* Success state focus */
input.success:focus-visible,
.ds-form-input.success:focus-visible {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px var(--form-focus-ring-success);
}

/* Checkbox and Radio */
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* File input */
input[type="file"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Range input */
input[type="range"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 4px;
}

/* ========================================
   LINKS - Enhanced Focus States
   ======================================== */

a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
  text-decoration: underline;
}

/* Navigation links */
nav a:focus-visible,
.nav-link:focus-visible,
.settings-nav a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  background-color: var(--color-hover);
}

/* Sidebar links */
.sidebar a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
  background-color: var(--color-hover);
}

/* ========================================
   TABS - Enhanced Focus States
   ======================================== */

[role="tab"]:focus-visible,
.tab-btn:focus-visible,
.nav-tabs .nav-link:focus-visible {
  outline: var(--focus-outline);
  outline-offset: -2px;
  z-index: var(--z-focus-state);
  box-shadow: var(--shadow-focus);
}

/* ========================================
   MODALS & DROPDOWNS - Enhanced Focus States
   ======================================== */

/* Modal close button */
.modal-header .btn-close:focus-visible,
.close:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* Dropdown items */
.dropdown-item:focus-visible {
  outline: var(--focus-outline);
  outline-offset: -2px;
  background-color: var(--color-hover);
}

/* ========================================
   TABLES - Enhanced Focus States
   ======================================== */

/* Table rows that are interactive */
tr[tabindex]:focus-visible,
.items-table tr[tabindex]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: -2px;
  background-color: var(--color-hover);
}

/* Table action buttons */
.items-table button:focus-visible,
.table button:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* ========================================
   CARDS - Enhanced Focus States
   ======================================== */

/* Interactive cards */
.ds-card[tabindex]:focus-visible,
.card[tabindex]:focus-visible,
.day-card:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ========================================
   CUSTOM CONTROLS - Enhanced Focus States
   ======================================== */

/* Toggle switches */
.modern-switch input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: 2px solid var(--color-focus);
}

/* Accordion toggles */
.accordion-toggle:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  background-color: var(--color-hover);
  box-shadow: var(--shadow-focus);
}

/* Color pickers */
input[type="color"]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
}

/* ========================================
   BADGES & CHIPS - Focus States
   ======================================== */

.badge[tabindex]:focus-visible,
.ds-badge[tabindex]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* ========================================
   SKIP LINKS - Accessibility Navigation
   ======================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: var(--border-radius);
  z-index: var(--z-notification);
  font-weight: var(--font-weight-semibold);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
}

/* ========================================
   SCREEN READER UTILITIES
   ======================================== */

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

/* Screen reader only focusable */
.sr-only-focusable:focus,
.visually-hidden-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ========================================
   KEYBOARD NAVIGATION INDICATORS
   ======================================== */

/* Add visual indicator for keyboard users */
body.using-keyboard *:focus {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}


/* ========== components/forms.css ========== */
/* ========================================
   FORM COMPONENTS
   ======================================== */

/* Form Field Container */
.ds-form-field {
  margin-bottom: var(--space-4);
}

/* Form Group (legacy support) */
.ds-form-group {
  margin-bottom: var(--space-4);
}

/* Form Labels */
.ds-form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.ds-form-label--required::after {
  content: " *";
  color: var(--color-danger);
}

/* Text Inputs & Textareas */
.ds-form-input,
.ds-form-textarea {
  display: block;
  width: 100%;
  padding: var(--space-2-5) var(--space-3);
  font-size: var(--font-size-base);
  font-family: inherit;
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ds-form-input {
  height: var(--input-height);
}

.ds-form-input:focus,
.ds-form-textarea:focus {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-primary);
}

.ds-form-input::placeholder,
.ds-form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.ds-form-input:disabled,
.ds-form-textarea:disabled {
  background-color: var(--color-surface-secondary);
  opacity: 0.6;
  cursor: not-allowed;
}

.ds-form-textarea {
  min-height: var(--textarea-min-height);
  resize: vertical;
}

/* Checkboxes & Radios */
.ds-form-check {
  display: flex;
  align-items: center;
  min-height: var(--space-6);
  padding-left: 0;
  margin-bottom: var(--space-3);
}

.ds-form-check__input {
  width: var(--space-4);
  height: var(--space-4);
  margin-right: var(--space-2);
  flex-shrink: 0;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius-sm);
  appearance: none;
  background-color: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.ds-form-check__input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.ds-form-check__input[type="radio"] {
  border-radius: var(--border-radius-full);
}

.ds-form-check__input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='8' cy='8' r='3' fill='currentColor'/%3e%3c/svg%3e");
}

.ds-form-check__input:focus {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-primary);
}

.ds-form-check__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ds-form-check__label {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  cursor: pointer;
  user-select: none;
}

.ds-form-check__input:disabled + .ds-form-check__label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Checkbox Size Utilities */
.ds-checkbox-lg {
  width: 20px;
  height: 20px;
}

/* Form Validation States */
.ds-form-input--invalid,
.ds-form-textarea--invalid {
  border-color: var(--color-danger);
}

.ds-form-input--invalid:focus,
.ds-form-textarea--invalid:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-danger);
}

.ds-form-input--valid,
.ds-form-textarea--valid {
  border-color: var(--color-success);
}

.ds-form-input--valid:focus,
.ds-form-textarea--valid:focus {
  border-color: var(--color-success);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-success);
}

/* Legacy validation state support */
.ds-form-input--error,
.ds-form-textarea--error {
  border-color: var(--color-danger);
}

/* Google Maps Autocomplete Dropdown - Fix z-index for modals */
.pac-container {
  z-index: 10000 !important;
}

/* ========================================
   TOGGLE SWITCHES
   ======================================== */

/* Toggle Setting Container */
.ds-toggle-setting {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

/* Toggle Switch */
.ds-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.ds-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border);
  transition: 0.2s;
  border-radius: 24px;
}

.ds-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

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

.ds-toggle-switch input:checked + .ds-toggle-slider:before {
  transform: translateX(20px);
}

.ds-toggle-switch input:focus + .ds-toggle-slider {
  box-shadow: 0 0 0 2px var(--form-focus-ring-primary);
}

/* Toggle Content */
.ds-toggle-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.ds-toggle-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ds-toggle-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  line-height: 1.4;
}


/* ========== components/forms-extended.css ========== */

.ds-form-input--error:focus,
.ds-form-textarea--error:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-danger);
}

.ds-form-input--success,
.ds-form-textarea--success {
  border-color: var(--color-success);
}

.ds-form-input--success:focus,
.ds-form-textarea--success:focus {
  border-color: var(--color-success);
  box-shadow: 0 0 0 var(--form-focus-ring-size) var(--form-focus-ring-success);
}

/* Helper & Error Text */
.ds-form-help {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.ds-form-error {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-danger);
}

/* Legacy helper text support */
.ds-form-helper {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: var(--space-1-5);
}

.ds-form-helper--error {
  color: var(--color-danger);
}

.ds-form-helper--success {
  color: var(--color-success);
}

.ds-form-helper-sm {
  color: var(--color-text-secondary);
  display: block;
  margin-top: 4px;
  font-size: var(--font-size-sm);
}

/* Form Sizes */
.ds-form-input--sm {
  padding: var(--space-2) var(--space-2-5);
  font-size: var(--font-size-sm);
  height: var(--input-height-sm);
}

.ds-form-input--lg {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-lg);
  height: var(--input-height-lg);
}

/* Input group (for buttons/icons attached to inputs) */
.ds-input-group {
  display: flex;
  gap: 0;
  position: relative;
}

.ds-input-group__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-3);
  background: var(--color-surface-secondary);
  border: var(--border-width) solid var(--color-border);
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
}

.ds-input-group__icon + .ds-form-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.ds-input-group > .ds-form-input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.ds-input-group > .ds-btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Form Field Utilities */
.ds-field-container-relative {
  position: relative;
}

/* Input with trailing action buttons (e.g., copy, validate) */
.ds-input-with-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.ds-input-with-actions input {
  flex: 1;
  min-width: 0;
}

.ds-input-action-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--border-radius);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.ds-input-action-btn:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.ds-input-action-btn--primary {
  color: var(--color-primary);
}

.ds-input-action-btn--primary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}


/* Ensure form elements in flex containers align properly */
.ds-flex .ds-form-input,
.ds-flex .ds-btn {
  height: var(--input-height);
  min-height: var(--input-height);
}

/* Mobile form inputs */
@media (max-width: 768px) {
  .ds-form-input {
    height: var(--input-height-mobile);
  }
  
  .ds-flex .ds-form-input,
  .ds-flex .ds-btn {
    height: var(--input-height-mobile);
    min-height: var(--input-height-mobile);
  }
}

/* ========================================
   PROFILE PHOTO PICKER
   ======================================== */

.ds-profile-photo-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.ds-profile-photo-container {
  width: 120px;
  height: 120px;
  border-radius: var(--border-radius-lg);
  border: 2px dashed var(--color-border);
  background: var(--color-surface-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: visible;
  position: relative;
}

.ds-profile-photo-container:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
  transform: scale(1.02);
}

.ds-profile-photo-container:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.ds-profile-photo-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.ds-profile-photo-icon {
  font-size: 64px;
  color: var(--color-text-tertiary);
  transition: all 0.2s ease;
}

.ds-profile-photo-container:hover .ds-profile-photo-icon {
  color: var(--color-primary);
  transform: scale(1.1);
}

.ds-profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-profile-photo-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-danger);
  color: white;
  border: 3px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 10;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ds-profile-photo-delete-btn:hover {
  background: var(--color-danger-dark);
  transform: scale(1.1);
}

.ds-profile-photo-delete-btn:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/**
 * COMPONENTS-LAYOUT.CSS - Core Layout Components
 * ================================================
 * 
 * Contains ONLY page structure, headers, dividers, navigation, and layout grids
 * All utilities have been moved to utilities-*.css modules
 * All @media queries have been moved to utilities-responsive.css
 * 
 * Naming Convention: .ds-{component}[__{element}][--{modifier}]
 */



/* ========== components/lists.css ========== */
/* ========================================
   RESPONSIVE TABLE ENHANCEMENTS
   ======================================== */

/* Mobile: Hide desktop tables, show mobile cards */
@media (max-width: 767px) {
  /* Hide desktop table view on mobile */
  .ds-table-container .ds-table,
  .table-responsive .ds-table {
    display: none;
  }
  
  /* Show mobile card view */
  .mobile-card-view,
  .mobile-card-view--project {
    display: block;
  }
  
  /* Mobile-specific table utilities */
  .ds-table-mobile-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* For tables that must be shown on mobile (admin tables, etc) */
  .ds-table--force-mobile {
    display: table;
    font-size: var(--font-size-sm);
  }
  
  .ds-table--force-mobile th,
  .ds-table--force-mobile td {
    padding: var(--space-2) var(--space-2);
    font-size: var(--font-size-sm);
  }
  
  /* Hide less important columns on mobile */
  .ds-table th.ds-hide-mobile,
  .ds-table td.ds-hide-mobile {
    display: none;
  }
  
  /* Mobile card actions: Full width buttons */
  .ds-mobile-card__actions .ds-btn {
    flex: 1;
    min-width: 0;
    font-size: var(--font-size-sm);
  }
}

/* Desktop: Hide mobile cards, show tables */
@media (min-width: 768px) {
  .mobile-card-view,
  .mobile-card-view--project {
    display: none;
  }
  
  /* Ensure tables are visible on desktop */
  .ds-table-container .ds-table,
  .table-responsive .ds-table {
    display: table;
  }
}


/* ========== components/modals-base.css ========== */
/* ========================================
   BASE MODAL SYSTEM
   ======================================== */

/* Base modal overlay and positioning */
.ds-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 1050);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  overflow-y: auto;
}

.ds-modal[aria-hidden="false"] {
  display: flex !important;
}

.ds-modal[aria-hidden="true"],
.ds-modal[style*="display: none"] {
  display: none !important;
}

.ds-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.ds-modal__container {
  position: relative;
  z-index: var(--z-modal-dialog, 1055);
  background: var(--color-surface, #ffffff);
  border-radius: var(--border-radius-lg, 16px);
  box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.35));
  width: min(90vw, 640px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.ds-modal__header,
.ds-modal__footer {
  padding: var(--space-5, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 0.75rem);
}

.ds-modal__header {
  border-bottom: var(--border-width) solid var(--color-border, #e2e8f0);
}

.ds-modal__body {
  padding: var(--space-5, 1.5rem);
  overflow-y: auto;
}

.ds-modal__footer {
  border-top: var(--border-width) solid var(--color-border, #e2e8f0);
  justify-content: flex-end;
}

.ds-modal__title {
  margin: 0;
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-text-primary, #0f172a);
}

.ds-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-secondary, #64748b);
  cursor: pointer;
}

.ds-modal__close:hover {
  color: var(--color-text-primary, #0f172a);
}


/* ========================================
   BOOTSTRAP 5 MODAL Z-INDEX OVERRIDES
   ======================================== */

/* Bootstrap modal backdrop - ensure it uses centralized z-index token */
.modal-backdrop {
  z-index: var(--z-modal-backdrop) !important;
}

/* Bootstrap modal container - ensure it uses centralized z-index token */
.modal {
  z-index: var(--z-modal) !important;
}

/* Bootstrap modal dialog - ensure proper stacking within modal */
.modal-dialog {
  z-index: var(--z-modal-dialog);
}

/* Bootstrap modal content - highest z-index within modal structure */
.modal-content {
  z-index: var(--z-modal-content);
}

/* Ensure select2 dropdowns inside modals appear above modal content */
.modal .select2-container--open,
.modal .select2-dropdown {
  z-index: calc(var(--z-modal-content) + 10) !important;
}

/* Ensure flatpickr date pickers inside modals appear above modal content */
.modal .flatpickr-calendar {
  z-index: calc(var(--z-modal-content) + 10) !important;
}

/* ========================================
   PROJECT ECONOMY MODAL VARIANT
   ======================================== */

.economy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-in-out;
}

.modal-container {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: var(--border-width) solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-surface-secondary);
    z-index: var(--z-modal-sticky-header);
}

.modal-header .modal-title {
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    margin: 0;
}

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--border-radius);
    color: var(--color-text-secondary);
    transition: var(--transition-colors);
}

.modal-close:hover {
    background: var(--color-hover);
    color: var(--color-text-primary);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-6);
    border-top: var(--border-width) solid var(--color-border);
    position: sticky;
    bottom: 0;
    background: var(--color-surface);
}

/* Modal Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.form-label .required {
    color: var(--color-danger);
}

/* ========================================
   DESIGN SYSTEM MODAL HEADER
   ======================================== */

.ds-modal-header {
  padding: var(--space-6);
  border-bottom: var(--border-width) solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
}

.ds-modal-header__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.ds-modal-header__icon {
  color: var(--color-primary);
  font-size: var(--font-size-xl);
}

.ds-modal-title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.3;
}

.ds-modal-close {
  background: var(--color-surface-secondary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ds-modal-close:hover {
  background: var(--color-surface-tertiary);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.ds-modal-close i {
  font-size: var(--font-size-lg);
}


/* ========== components/modals-bootstrap.css ========== */
/* ========================================
   BOOTSTRAP MODAL FORM ENHANCEMENTS
   ======================================== */

/* Form label styling within modals */
.modal .form-label {
    font-weight: var(--font-weight-bold);
}

.form-input {
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    font-family: var(--font-family-base);
    color: var(--color-text-primary);
    background: var(--color-surface);
    transition: var(--transition-colors);
    min-height: var(--btn-height);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-tertiary);
}

.form-input[type="date"],
.form-input[type="time"] {
    cursor: pointer;
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/**
 * Design System - Modal Variants
 * bIDMIO
 * 
 * Modal decorative variants, gradient headers, info banners, quick actions
 * Includes success/error modal styling and gradient utilities
 * 
 * Naming Convention: .ds-modal-{variant}[--{modifier}]
 */

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


/* ========== components/modals-enhancements.css ========== */

/* Modal Helper Text */
.ds-modal-helper-text {
  color: var(--color-text-secondary);
  display: block;
  margin-top: 0.25rem;
  font-size: var(--font-size-sm);
}

/* Modal Components */
.ds-modal-helper-text {
  color: var(--color-text-secondary);
}

.ds-modal-header--gradient-blue {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-orange {
  background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-purple {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-red {
  background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-indigo {
  background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-indigo-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--plain {
  border: none;
  padding: 2rem 2rem 1rem;
}

.ds-btn--gradient-blue {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
  border: none;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.ds-btn--gradient-orange {
  background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
  border: none;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.ds-btn--gradient-purple {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-dark) 100%);
  border: none;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.ds-btn--gradient-red {
  background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
  border: none;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.ds-btn--cancel-light {
  background: white;
  border: var(--border-width-2) solid var(--color-border);
  color: var(--color-gray-700);
  border-radius: 8px;
  transition: all 0.2s;
}

/**
 * Design System - Modal Workflows
 * bIDMIO
 * 
 * Task-oriented modal patterns for specific workflows
 * (Archive modals, confirmation flows, action modals)
 * 
 * Naming Convention: .ds-modal-{workflow}
 */

.ds-modal-warning-box {
  background: linear-gradient(135deg, var(--color-warning-bg) 0%, var(--color-warning-border) 100%);
  border-left: var(--border-width-4) solid var(--color-warning);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.ds-modal-warning-title {
  color: var(--color-warning-dark-brown);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ds-modal-warning-text {
  color: var(--color-warning-darkest);
  font-size: 0.9375rem;
  margin: 0;
}

.ds-modal-confirm-text {
  color: var(--color-gray-700);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.ds-modal-info-box {
  background: linear-gradient(135deg, var(--color-info-gradient-start) 0%, var(--color-info-gradient-end) 100%);
  border-left: var(--border-width-4) solid var(--color-info);
  padding: 1rem 1.25rem;
  border-radius: 8px;
}

.ds-modal-info-icon {
  color: var(--color-blue-dark);
  margin-top: var(--space-0-5);
}

.ds-modal-info-text {
  color: var(--color-blue-darker);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ds-modal-danger-box {
  background: linear-gradient(135deg, var(--color-danger-bg) 0%, var(--color-danger-border) 100%);
  border-left: var(--border-width-4) solid var(--color-danger);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.ds-modal-danger-icon {
  color: var(--color-danger-dark);
}

.ds-modal-danger-text {
  color: var(--color-danger-darkest);
  font-size: 0.9375rem;
  margin: 0;
}

.ds-modal-loading-spinner {
  font-size: 2rem;
  color: var(--color-indigo);
}

.ds-modal-footer--light {
  border: none;
  padding: 1rem 2rem 1.5rem;
  background: var(--color-gray-50);
}

.ds-modal-title-custom {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-gray-900);
}

.ds-modal-archive-icon {
  color: var(--color-warning);
  font-size: 1.5rem;
}

.ds-modal-body--archive {
  padding: 0 2rem 2rem;
}

.ds-modal-employee-name {
  margin: 0;
  font-weight: 600;
  color: var(--color-gray-900);
  font-size: 0.9375rem;
}

.ds-modal-footer--archive {
  border: none;
  padding: 0 2rem 2rem;
  gap: 0.75rem;
}

/**
 * COMPONENTS-TABLES.CSS - !important Usage Policy
 * =================================================
 * 
 * Phase 3 Refactoring: Reduced from 19 to 3 !important declarations (84% reduction)
 * 
 * ACCEPTABLE !important USE CASES:
 * 
 * 1. Responsive Display Utilities - .ds-mobile-hidden and .ds-desktop-hidden require !important
 *    to override any display value consistently across the application (common utility pattern)
 * 2. Third-Party Component Overrides - Google Maps .pac-container z-index requires !important
 *    to override inline styles from external libraries
 * 
 * Each remaining !important declaration below has an inline comment explaining why it's necessary.
 */

/**
 * Design System - Table Components
 * bIDMIO
 * 
 * This file contains all table-related components: Tables, Mobile Card Layouts, and Lists
 * Components use design tokens from design-tokens.css for colors, spacing, typography, etc.
 * 
 * Naming Convention: .ds-{component}[__{element}][--{modifier}]
 * Example: .ds-table, .ds-mobile-card, .ds-list__item
 */



/* ========== components/modals-variants.css ========== */
   MODAL VARIANTS
   ======================================== */

/* Modal content and header border variants */
.ds-modal-content-tertiary {
  background: var(--color-surface-tertiary);
  border: var(--border-width) solid var(--color-border-strong);
}

.ds-modal-header-strong {
  border-bottom-color: var(--color-border-strong);
}

.ds-modal-footer-strong {
  border-top-color: var(--color-border-strong);
}
/* Modal header with gradient */
.ds-modal-header--gradient {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  border-bottom: none;
}

.ds-modal-header--gradient .btn-close {
  filter: brightness(0) invert(1);
}

/* Info banner component */
.ds-info-banner {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-left: var(--border-width-4) solid var(--color-primary);
  padding: var(--space-4);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-5);
}

/* Quick actions container */
.ds-quick-actions {
  background: var(--color-surface);
  padding: var(--space-3);
  border-radius: var(--border-radius);
  border: var(--border-width) solid var(--color-border);
  margin-top: var(--space-4);
}

/* ========================================
   MODAL ENHANCEMENTS
   ======================================== */

.ds-modal-header--borderless {
  border-bottom: none;
  padding-bottom: 0;
}

.ds-modal-body--compact {
  padding-top: var(--space-2);
}

.ds-modal-body--scrollable {
  max-height: 70vh;
  overflow-y: auto;
}

.ds-modal-footer--borderless {
  border-top: none;
  padding-top: 0;
}

/* Success/Error Modal Variants */
.ds-modal-success .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ds-modal-success .modal-header {
  background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-success .modal-title {
  margin: 0;
}

.ds-modal-success .modal-title i {
  font-size: 1.25rem;
}

.ds-modal-success .modal-body {
  padding: var(--space-8);
}

.ds-modal-success .modal-body p {
  font-size: 1rem;
  color: var(--color-gray-700);
  line-height: 1.6;
}

.ds-modal-success .modal-footer {
  border: none;
  padding: 1rem 2rem 1.5rem;
  justify-content: center;
  background: var(--color-gray-50);
}

.ds-modal-success .ds-btn--primary {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.ds-modal-error .modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ds-modal-error .modal-header {
  background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-error .modal-title {
  margin: 0;
}

.ds-modal-error .modal-title i {
  font-size: 1.25rem;
}

.ds-modal-error .modal-body {
  padding: var(--space-8);
}

.ds-modal-error .modal-body p {
  font-size: 1rem;
  color: var(--color-gray-700);
  line-height: 1.6;
}

.ds-modal-error .modal-footer {
  border: none;
  padding: 1rem 2rem 1.5rem;
  justify-content: center;
  background: var(--color-gray-50);
}

.ds-modal-error .ds-btn {
  background: white;
  border: var(--border-width-2) solid var(--color-border);
  color: var(--color-gray-700);
  border-radius: 8px;
}

/* Notice Boxes */

/* Modal Headers with Gradients */
.ds-modal-header--gradient-blue {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-orange {
  background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-purple {
  background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-purple-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-red {
  background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--gradient-indigo {
  background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-indigo-dark) 100%);
  border: none;
  padding: 1.5rem 2rem;
}

.ds-modal-header--clean {
  border: none;
  padding: 2rem 2rem 1rem;
}

.ds-modal-title--clean {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-gray-900);
  font-weight: 700;
}

.ds-modal-icon--warning {
  color: var(--color-warning);
  font-size: 1.5rem;
}

.ds-modal-body--padded {
  padding: 0 2rem 2rem;
}

.ds-modal-footer--clean {
  border: none;
  padding: 0 2rem 2rem;
  gap: 0.75rem;
}

.ds-modal-footer--gradient-bg {
  border: none;
  padding: 1rem 2rem 1.5rem;
  background: var(--color-gray-50);
}

/* Modal Loading State */
.ds-modal-loading-icon {
  font-size: 2rem;
  color: var(--color-indigo);
}

/* ========================================
   LAST ENTRY TOOLTIP
   ======================================== */

.start-time-wrapper {
  position: relative;
}

.last-entry-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1050;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 14px;
  min-width: 200px;
  font-size: 0.85rem;
}

.last-entry-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 16px;
  width: 12px;
  height: 12px;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: rotate(45deg);
}

.last-entry-header {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border-light);
}

.last-entry-time,
.last-entry-project {
  color: var(--color-text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.last-entry-time i,
.last-entry-project i {
  color: var(--color-primary);
  width: 14px;
  text-align: center;
}

.last-entry-no-entries {
  color: var(--color-text-muted);
  font-style: italic;
}


/* ========== components/navigation.css ========== */
/* ========================================
   PAGE STRUCTURE
   ======================================== */

.ds-page-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ========================================
   PAGE HEADERS
   ======================================== */

.ds-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--color-info-gradient-start) 0%, var(--color-info-gradient-end) 100%);
  border-bottom: 2px solid var(--color-border-strong);
  border-radius: 8px;
}

.ds-page-header__content {
  flex: 1;
}

.ds-page-header__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

.ds-page-header__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  margin-bottom: 0;
  line-height: var(--line-height-normal);
}

.ds-page-header__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* ========================================
   DIVIDERS
   ======================================== */

.ds-divider {
  height: var(--border-width);
  background: var(--color-border);
  border: none;
  margin: var(--space-4) 0;
}

.ds-divider--strong {
  background: var(--color-border-strong);
}

.ds-divider--light {
  background: var(--color-border-light);
}

/* ========================================
   NAVIGATION COMPONENTS
   ======================================== */

/* Tab Navigation */
.ds-tab-nav {
  display: flex;
  gap: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border);
  padding: 0;
  margin: 0;
  list-style: none;
}

.ds-tab-nav__item {
  margin: 0;
  padding: 0;
}

.ds-tab-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: var(--border-width-2) solid transparent;
  transition: all var(--transition-base);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.ds-tab-nav__link:hover {
  color: var(--color-text-primary);
  background-color: var(--color-bg-subtle);
}

.ds-tab-nav__link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.ds-tab-nav__icon {
  font-size: var(--font-size-lg);
}

/* Vertical Tab Navigation */
.ds-tab-nav--vertical {
  flex-direction: column;
  border-bottom: none;
  border-right: var(--border-width) solid var(--color-border);
  gap: 0;
}

.ds-tab-nav--vertical .ds-tab-nav__link {
  border-bottom: none;
  border-left: var(--border-width-4) solid transparent;
  justify-content: flex-start;
}

.ds-tab-nav--vertical .ds-tab-nav__link:hover {
  background-color: var(--color-bg-subtle);
}

.ds-tab-nav--vertical .ds-tab-nav__link.active {
  border-left-color: var(--color-primary);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* List Group (Sidebar Navigation) */
.ds-list-group {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
  border-radius: var(--radius-md);
  background: var(--color-bg-primary);
  border: var(--border-width) solid var(--color-border);
}

.ds-list-group__item {
  margin: 0;
  padding: 0;
}

.ds-list-group__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: var(--border-width-4) solid transparent;
  transition: all var(--transition-base);
  border-bottom: var(--border-width) solid var(--color-border);
}

.ds-list-group__item:last-child .ds-list-group__link {
  border-bottom: none;
}

.ds-list-group__link:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-text-primary);
}

.ds-list-group__link.active {
  background-color: var(--color-primary-light);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.ds-list-group__icon {
  font-size: var(--font-size-sm);
  width: 16px;
}

/* ========================================
   MOBILE PAGE HEADER SPACING
   Ensure adequate gap between fixed header and page content
   ======================================== */

@media only screen and (max-width: 768px) {
  .ds-page-header {
    margin-top: 1.25rem; /* 20px gap between header and page title */
    padding: 1rem 1rem; /* Reduce padding on mobile */
  }
}



/* ========== components/page-structure.css ========== */
/* ========================================
   TIMELINE COMPONENT
   ======================================== */

.ds-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ds-timeline__item {
  position: relative;
  padding-left: var(--space-6);
}

.ds-timeline__item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: calc(-1 * var(--space-4));
  width: 2px;
  background: var(--color-border);
}

.ds-timeline__item:last-child::before {
  display: none;
}

.ds-timeline__marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg-primary);
  border: var(--border-width-2) solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  color: var(--color-primary);
}

.ds-timeline__content {
  background: var(--color-bg-primary);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.ds-timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.ds-timeline__title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.ds-timeline__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin: 0;
}

.ds-timeline__body {
  color: var(--color-text-secondary);
  margin: 0;
}

/* ========================================
   LAYOUT GRIDS
   ======================================== */

/* Two-column responsive layout */
.ds-layout--two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.ds-layout--two-col--equal {
  grid-template-columns: 1fr;
}

.ds-layout--two-col--sidebar-left {
  grid-template-columns: 1fr;
}

.ds-layout--two-col--sidebar-right {
  grid-template-columns: 1fr;
}

/* Inline actions (action toolbar) */
.ds-inline-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

/* Tab content visibility */
.tab-content {
  display: none;
}

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

/* Project tab content visibility (used in customer page, project pages, etc.) */
.ds-project-tab {
  display: none;
}

.ds-project-tab.active {
  display: block;
}

/* Info box component */
.ds-info-box {
  background: var(--color-surface);
  padding: var(--space-3);
  border-radius: var(--border-radius);
  border: var(--border-width) solid var(--color-info-border);
  margin-top: var(--space-3);
}

/* Organization layout grid */
.org-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* Compact grid for form fields */
.org-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

.org-grid--2-cols {
  grid-template-columns: 1fr;
}

/* Upload form layout */
.ds-upload-form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.ds-upload-form-layout__main {
  min-width: 0;
}

.ds-upload-form-layout__sidebar {
  min-width: 0;
}

.ds-upload-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.ds-upload-form-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
}


/* ========== components/placeholders.css ========== */
/* ========================================
   PLACEHOLDER SHARED STYLES
   ======================================== */

.placeholder-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.placeholder-icon {
    font-size: 64px;
    color: var(--color-primary);
    margin-bottom: var(--space-5);
    opacity: 0.8;
}

.placeholder-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.placeholder-subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
}

/* Preview Mockup Area */
.placeholder-preview {
    margin-top: var(--space-6);
}

.preview-mockup {
    background: var(--color-surface-secondary);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-4);
    border-bottom: var(--border-width) solid var(--color-border);
    margin-bottom: var(--space-4);
}

.mockup-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.mockup-title i {
    color: var(--color-primary);
}

.mockup-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Calendar Timeline Mockup */
.mockup-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.timeline-slot {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    border-left: var(--border-width-4) solid var(--color-primary);
}

.slot-time {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    min-width: 50px;
}

.slot-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

/* Calendar Grid Mockup */
.mockup-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
}

.grid-day {
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

/* Calendar Month Mockup */
.mockup-calendar {
    margin-top: var(--space-3);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.weekday {
    padding: var(--space-2);
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

/* Chat Preview Mockup */
.chat-preview {
    text-align: left;
}

.mockup-chat-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--border-radius);
    min-height: 200px;
}

.mock-message {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.mock-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-full);
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
    font-size: var(--font-size-sm);
}

.mock-message-content {
    flex: 1;
}

.mock-message-author {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.mock-message-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

.mockup-input-area {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: var(--border-width) solid var(--color-border);
}

.mock-input {
    flex: 1;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    background: var(--color-surface-secondary);
    color: var(--color-text-tertiary);
}

.mock-send-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
/**
 * Design System - Calendar Tab Navigation
 * bIDMIO
 * 
 * Tab navigation UI for calendar views with placeholder states
 * Used in: 3 template references (calendar-tab)
 * 
 * Naming Convention: .calendar-tab-*, .calendar-placeholder
 */

/* ========================================
   CALENDAR TAB STYLES
   ======================================== */

.calendar-tabs {
    margin-bottom: var(--space-6);
}

.calendar-tab-nav {
    display: flex;
    gap: var(--space-1);
    border-bottom: var(--border-width) solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow-x: auto;
    padding: var(--space-2) var(--space-2) 0;
}

.calendar-tab-btn {
    background: none;
    border: none;
    padding: var(--space-3) var(--space-5);
    min-height: var(--space-11);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    cursor: pointer;
    border-bottom: var(--border-width-4) solid transparent;
    transition: var(--transition-all);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.calendar-tab-btn:hover {
    color: var(--color-primary);
    background-color: var(--color-hover);
}

.calendar-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: var(--color-surface-secondary);
}

.calendar-tab-btn:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: -2px;
}

.calendar-tab-content {
    display: none;
}

.calendar-tab-content.active {
    display: block;
}

/* Calendar Placeholder */
.calendar-placeholder {
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-8);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* ========== components/responsive.css ========== */
/* ========================================
   RESPONSIVE UTILITIES
   Mobile/Desktop visibility, responsive grids, and flex modifiers
   Breakpoints: Mobile (<768px), Medium (768px+), Large (992px+)
   ======================================== */

/* Mobile/Desktop Visibility Toggles */
/* Hide on mobile (< 768px), show on desktop (>= 768px) */
.ds-mobile-hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .ds-mobile-hidden {
    display: block !important;
  }
}

/* Show on mobile (< 768px), hide on desktop (>= 768px) */
.ds-mobile-only,
.ds-mobile-visible {
  display: block !important;
}

@media (min-width: 768px) {
  .ds-mobile-only,
  .ds-mobile-visible {
    display: none !important;
  }
}

/* Hide on desktop (>= 768px), show on mobile (< 768px) */
.ds-desktop-hidden {
  display: block !important;
}

@media (min-width: 768px) {
  .ds-desktop-hidden {
    display: none !important;
  }
}

/* Show only on desktop (>= 768px) */
.ds-desktop-only {
  display: none !important;
}

@media (min-width: 768px) {
  .ds-desktop-only {
    display: block !important;
  }
}

/* Responsive Grid Modifiers - Medium Breakpoint (768px+) */
@media (min-width: 768px) {
  .ds-grid--md-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .ds-grid--md-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .ds-grid--md-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .ds-grid--md-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .ds-grid--md-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  
  .ds-grid--md-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Responsive Grid Modifiers - Large Breakpoint (992px+) */
@media (min-width: 992px) {
  .ds-grid--lg-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .ds-grid--lg-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .ds-grid--lg-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .ds-grid--lg-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .ds-grid--lg-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  
  .ds-grid--lg-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Responsive Flex Modifiers - Medium Breakpoint (768px+) */
@media (min-width: 768px) {
  .ds-flex-md-row {
    flex-direction: row;
  }
  
  .ds-flex-md-col {
    flex-direction: column;
  }
  
  .ds-flex-md-wrap {
    flex-wrap: wrap;
  }
  
  .ds-flex-md-nowrap {
    flex-wrap: nowrap;
  }
}

/* Responsive Flex Modifiers - Large Breakpoint (992px+) */
@media (min-width: 992px) {
  .ds-flex-lg-row {
    flex-direction: row;
  }
  
  .ds-flex-lg-col {
    flex-direction: column;
  }
  
  .ds-flex-lg-wrap {
    flex-wrap: wrap;
  }
  
  .ds-flex-lg-nowrap {
    flex-wrap: nowrap;
  }
}

/* Responsive Gap Utilities - Medium Breakpoint (768px+) */
@media (min-width: 768px) {
  .ds-gap-md-0 { gap: 0; }
  .ds-gap-md-1 { gap: var(--space-1); }
  .ds-gap-md-2 { gap: var(--space-2); }
  .ds-gap-md-3 { gap: var(--space-3); }
  .ds-gap-md-4 { gap: var(--space-4); }
  .ds-gap-md-5 { gap: var(--space-5); }
  .ds-gap-md-6 { gap: var(--space-6); }
  .ds-gap-md-8 { gap: var(--space-8); }
}

/* Responsive Gap Utilities - Large Breakpoint (992px+) */
@media (min-width: 992px) {
  .ds-gap-lg-0 { gap: 0; }
  .ds-gap-lg-1 { gap: var(--space-1); }
  .ds-gap-lg-2 { gap: var(--space-2); }
  .ds-gap-lg-3 { gap: var(--space-3); }
  .ds-gap-lg-4 { gap: var(--space-4); }
  .ds-gap-lg-5 { gap: var(--space-5); }
  .ds-gap-lg-6 { gap: var(--space-6); }
  .ds-gap-lg-8 { gap: var(--space-8); }
}

/* Grid layout utilities */
.ds-grid--cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.ds-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Grid column span utilities */
.ds-col-span-1 { grid-column: span 1 / span 1; }
.ds-col-span-2 { grid-column: span 2 / span 2; }
.ds-col-span-3 { grid-column: span 3 / span 3; }
.ds-col-span-4 { grid-column: span 4 / span 4; }
.ds-col-span-5 { grid-column: span 5 / span 5; }
.ds-col-span-6 { grid-column: span 6 / span 6; }
.ds-col-span-full { grid-column: 1 / -1; }

/* Stack layout */
.ds-stack { display: flex; flex-direction: column; }

/* Width utilities */
.ds-w-full { width: 100%; }
.ds-max-w-xs { max-width: 300px; }
.ds-max-w-sm { max-width: 400px; }
.ds-max-w-md { max-width: 500px; }
.ds-max-w-lg { max-width: 600px; }
.ds-max-w-xl { max-width: 800px; }
.ds-max-w-prose { max-width: var(--max-width-prose); }
.ds-min-w-280 { min-width: 280px; }

/* Height utilities */
.ds-min-h-screen { min-height: var(--min-height-screen); }

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

/* Working Hours Section Styling */
.ds-hours-overview-section {
  background-color: var(--color-bg-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.ds-hours-summary-card {
  background-color: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-hours-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ds-schedule-section {
  margin-top: var(--space-6);
}

/* Employee working hours schedule header grid */
.ds-schedule-header-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr 0.6fr 1.2fr 0.6fr 0.6fr 0.8fr;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  align-items: center;
}

/* Employee working hours row - complex grid layout */
.ds-employee-hours-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr 0.6fr 1.2fr 0.6fr 0.6fr 0.8fr;
  gap: var(--space-2);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--border-radius);
  align-items: center;
  margin-bottom: var(--space-2);
}

/* Combined flex utilities */
.ds-flex-gap-4-mb-4 {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ds-flex-items-center-gap-2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Position utilities */
.ds-relative { position: relative; }
.ds-absolute { position: absolute; }
.ds-fixed { position: fixed; }
.ds-sticky { position: sticky; }

/* Profile grid */
.ds-grid-profile {
  grid-template-columns: var(--profile-grid-template);
  gap: var(--space-4);
}

/* Form max width */
.ds-max-w-form { max-width: var(--max-width-form); }

/* Percentage widths */
.ds-w-10 { width: 10%; }
.ds-w-20 { width: 20%; }
.ds-w-25 { width: 25%; }



/* ========== components/shell.css ========== */
/**
 * Design System - Application Shell Components
 * bIDMIO
 * 
 * Global application scaffolding: header, navigation, sidebar, main content area
 * Mobile drawer states and backdrop managed here
 * 
 * !important Policy: 4 acceptable uses (documented inline)
 * - Navigation flex behavior (prevents layout breaking)
 * - JS-managed drag states (cursor during drag operations)
 * - iOS mobile scrolling fixes (prevents momentum scrolling bugs)
 * 
 * Naming Convention: .header-*, .top-nav, .sidebar-*, .main-content
 */

/* Two-Row Header Container */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background-color: var(--color-surface);
    border-bottom: var(--border-width) solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

/* Top Row - Tasks/Email/Chat, Settings, Notifications, User menu */
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--space-1-5) var(--space-5);
    background-color: var(--color-surface-secondary);
    border-bottom: var(--border-width) solid var(--color-border);
    min-height: 36px;
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-top-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-colors);
    white-space: nowrap;
}

.header-top-link:hover {
    color: var(--color-primary);
}

/* Dark Mode Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    cursor: pointer;
}

.theme-toggle i {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover i {
    transform: scale(1.1);
}

.notification-icon {
    position: relative;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-colors);
}

.notification-icon:hover {
    color: var(--color-primary);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--color-danger-dark);
    color: var(--color-text-inverse);
    border-radius: var(--border-radius-full);
    padding: var(--space-0-5) var(--space-1-5);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    min-width: 16px;
    text-align: center;
    line-height: var(--line-height-tight);
}

/* Bottom Row - Logo and Main Navigation */
.top-nav {
    background-color: var(--color-surface);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-5);
}

.logo {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-right: var(--space-10);
    min-width: 120px;
    display: flex;
    align-items: center;
}

.logo i {
    font-size: var(--font-size-xl);
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.nav-tabs-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.nav-tabs {
    border: none;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-wrap: nowrap !important;
    gap: var(--space-1-5);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    scroll-behavior: smooth;
    cursor: grab;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

/* Fade indicators for scrollable content */
.nav-tabs::before,
.nav-tabs::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: var(--z-sticky-local);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-tabs::before {
    left: 0;
    background: linear-gradient(to right, var(--color-surface) 0%, color-mix(in srgb, var(--color-surface) 80%, transparent) 30%, transparent 100%);
}

.nav-tabs::after {
    right: 0;
    background: linear-gradient(to left, var(--color-surface) 0%, color-mix(in srgb, var(--color-surface) 80%, transparent) 30%, transparent 100%);
}

.nav-tabs.can-scroll-left::before {
    opacity: 1;
}

.nav-tabs.can-scroll-right::after {
    opacity: 1;
}

.nav-tabs .nav-item {
    flex-shrink: 0;
    position: relative;
    z-index: var(--z-base);
}

/* Navigation scroll arrows */
.nav-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--border-radius-full);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-layer-11);
    color: var(--color-text-secondary);
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
}

.nav-scroll-arrow:hover {
    background-color: var(--color-hover);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.nav-scroll-arrow.left {
    left: 8px;
}

.nav-scroll-arrow.right {
    right: 8px;
}

.nav-scroll-arrow.visible {
    display: flex;
}

/* Change cursor to grabbing when dragging */
.nav-tabs.dragging {
    cursor: grabbing !important;
    user-select: none;
}

.nav-tabs .nav-link {
    border: none;
    background: none;
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    white-space: nowrap;
    transition: var(--transition-all);
    cursor: pointer;
}

.nav-tabs .nav-link.active {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border: none;
    font-weight: var(--font-weight-semibold);
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: var(--color-hover);
    color: var(--color-text-primary);
    border: none;
}

.user-area {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    min-width: 200px;
    justify-content: flex-end;
}

.user-area i {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-colors);
}



/* ========== components/shell-legacy.css ========== */
.user-area i:hover {
    color: var(--color-primary);
}


/* Sidebar - Hidden on desktop, shown as drawer on mobile */
.sidebar {
    position: fixed;
    top: 96px;
    left: 0;
    width: 180px;
    height: calc(100vh - 96px);
    background-color: var(--color-background);
    border-right: var(--border-width) solid var(--color-border);
    padding: var(--space-4) 0;
    overflow-y: auto;
    display: none;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: var(--space-0-5);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-all);
    border-radius: var(--border-radius-sm);
    margin: 0 var(--space-2);
}

.sidebar-nav a:hover {
    background-color: var(--color-hover);
}

.sidebar-nav a.active {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.sidebar-nav a i {
    margin-right: var(--space-3);
    width: 18px;
    font-size: var(--font-size-base);
}

/* Main Content - No left margin on desktop (no sidebar) */
.main-content {
    margin-left: 0;
    margin-top: 96px;
    padding: var(--space-6);
    background-color: var(--color-background);
    min-height: calc(100vh - 96px);
}

/* Mobile backdrop for sidebar */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
}

.mobile-backdrop.show {
    display: block;
}

/**
 * Legacy Compatibility Shims
 * bIDMIO
 * 
 * Backwards-compatible layout classes for templates not yet migrated to design system
 * These classes remain for live usage but should be replaced with .ds-* equivalents over time
 * 
 * Usage count (as of refactoring):
 * - .view-toggle: 5 templates
 * - .status-badge: 6 templates
 * - .btn-primary: 30 templates
 * - .btn-link: 2 templates
 * 
 * TODO: Migrate templates to use design system classes and remove this file
 */

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.view-btn {
    border: var(--border-width) solid var(--color-border-strong);
    background: var(--color-surface);
    padding: var(--space-1) var(--space-2-5);
    border-radius: 4px;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.view-btn:hover:not(.active) {
    background: var(--color-gray-100);
}


/* Status Badges */
.status-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    border-radius: 10px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-align: center;
}

.status-badge.ready {
    background: var(--color-success-bg);
    color: var(--color-success-dark);
}

.status-badge.open {
    background: var(--color-info-bg);
    color: var(--color-info-dark);
}

.status-badge.normal { 
    background: var(--color-gray-100); 
    color: var(--color-text-secondary); 
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    border: var(--border-width) solid var(--color-primary);
    color: white;
    padding: var(--space-1-5) var(--space-3);
    border-radius: 4px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
}

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

.btn-link {
    color: var(--color-text-secondary);
    border: none;
    background: none;
    padding: var(--space-0-5) var(--space-1);
    font-size: var(--font-size-xs);
}

.btn-link:hover {
    color: var(--color-primary);
}

/**
 * Design System - Calendar & Chat Preview Mockups
 * bIDMIO
 * 
 * Placeholder/preview elements for calendar timeline, grid, month views, and chat previews
 * Used in: 0 template references (mockups currently unused - reserved for future features)
 * 
 * Naming Convention: .mockup-*, .calendar-timeline-mockup, .calendar-grid-mockup
 */



/* ========== components/spacing.css ========== */
/* ========================================
   SPACING UTILITIES
   Margin and padding utilities for consistent spacing
   ======================================== */

/* Margin - All sides */
.ds-m-0 { margin: 0; }
.ds-m-1 { margin: var(--space-1); }
.ds-m-2 { margin: var(--space-2); }
.ds-m-3 { margin: var(--space-3); }
.ds-m-4 { margin: var(--space-4); }
.ds-m-5 { margin: var(--space-5); }
.ds-m-6 { margin: var(--space-6); }
.ds-m-8 { margin: var(--space-8); }
.ds-m-10 { margin: var(--space-10); }
.ds-m-12 { margin: var(--space-12); }
.ds-m-16 { margin: var(--space-16); }
.ds-m-20 { margin: var(--space-20); }
.ds-m-24 { margin: var(--space-24); }
.ds-m-auto { margin: auto; }

/* Margin Top */
.ds-mt-0 { margin-top: 0; }
.ds-mt-1 { margin-top: var(--space-1); }
.ds-mt-2 { margin-top: var(--space-2); }
.ds-mt-3 { margin-top: var(--space-3); }
.ds-mt-4 { margin-top: var(--space-4); }
.ds-mt-5 { margin-top: var(--space-5); }
.ds-mt-6 { margin-top: var(--space-6); }
.ds-mt-8 { margin-top: var(--space-8); }
.ds-mt-10 { margin-top: var(--space-10); }
.ds-mt-12 { margin-top: var(--space-12); }
.ds-mt-16 { margin-top: var(--space-16); }
.ds-mt-20 { margin-top: var(--space-20); }
.ds-mt-24 { margin-top: var(--space-24); }
.ds-mt-custom-6 { margin-top: var(--space-6); }

/* Margin Bottom */
.ds-mb-0 { margin-bottom: 0; }
.ds-mb-1 { margin-bottom: var(--space-1); }
.ds-mb-2 { margin-bottom: var(--space-2); }
.ds-mb-3 { margin-bottom: var(--space-3); }
.ds-mb-4 { margin-bottom: var(--space-4); }
.ds-mb-5 { margin-bottom: var(--space-5); }
.ds-mb-6 { margin-bottom: var(--space-6); }
.ds-mb-7 { margin-bottom: var(--space-7); }
.ds-mb-8 { margin-bottom: var(--space-8); }
.ds-mb-10 { margin-bottom: var(--space-10); }
.ds-mb-12 { margin-bottom: var(--space-12); }
.ds-mb-16 { margin-bottom: var(--space-16); }
.ds-mb-20 { margin-bottom: var(--space-20); }
.ds-mb-24 { margin-bottom: var(--space-24); }

/* Margin Right */
.ds-mr-0 { margin-right: 0; }
.ds-mr-1 { margin-right: var(--space-1); }
.ds-mr-2 { margin-right: var(--space-2); }
.ds-mr-3 { margin-right: var(--space-3); }
.ds-mr-4 { margin-right: var(--space-4); }
.ds-mr-5 { margin-right: var(--space-5); }
.ds-mr-6 { margin-right: var(--space-6); }
.ds-mr-8 { margin-right: var(--space-8); }
.ds-mr-10 { margin-right: var(--space-10); }
.ds-mr-12 { margin-right: var(--space-12); }
.ds-mr-16 { margin-right: var(--space-16); }
.ds-mr-20 { margin-right: var(--space-20); }
.ds-mr-24 { margin-right: var(--space-24); }
.ds-mr-auto { margin-right: auto; }

/* Margin Left */
.ds-ml-0 { margin-left: 0; }
.ds-ml-1 { margin-left: var(--space-1); }
.ds-ml-2 { margin-left: var(--space-2); }
.ds-ml-3 { margin-left: var(--space-3); }
.ds-ml-4 { margin-left: var(--space-4); }
.ds-ml-5 { margin-left: var(--space-5); }
.ds-ml-6 { margin-left: var(--space-6); }
.ds-ml-8 { margin-left: var(--space-8); }
.ds-ml-10 { margin-left: var(--space-10); }
.ds-ml-12 { margin-left: var(--space-12); }
.ds-ml-16 { margin-left: var(--space-16); }
.ds-ml-20 { margin-left: var(--space-20); }
.ds-ml-24 { margin-left: var(--space-24); }
.ds-ml-auto { margin-left: auto; }

/* Margin X-axis (left and right) */
.ds-mx-0 { margin-left: var(--space-0); margin-right: var(--space-0); }
.ds-mx-1 { margin-left: var(--space-1); margin-right: var(--space-1); }
.ds-mx-2 { margin-left: var(--space-2); margin-right: var(--space-2); }
.ds-mx-3 { margin-left: var(--space-3); margin-right: var(--space-3); }
.ds-mx-4 { margin-left: var(--space-4); margin-right: var(--space-4); }
.ds-mx-5 { margin-left: var(--space-5); margin-right: var(--space-5); }
.ds-mx-6 { margin-left: var(--space-6); margin-right: var(--space-6); }
.ds-mx-8 { margin-left: var(--space-8); margin-right: var(--space-8); }
.ds-mx-10 { margin-left: var(--space-10); margin-right: var(--space-10); }
.ds-mx-12 { margin-left: var(--space-12); margin-right: var(--space-12); }
.ds-mx-16 { margin-left: var(--space-16); margin-right: var(--space-16); }
.ds-mx-20 { margin-left: var(--space-20); margin-right: var(--space-20); }
.ds-mx-24 { margin-left: var(--space-24); margin-right: var(--space-24); }
.ds-mx-auto { margin-left: auto; margin-right: auto; }

/* Margin Y-axis (top and bottom) */
.ds-my-0 { margin-top: 0; margin-bottom: 0; }
.ds-my-1 { margin-top: var(--space-1); margin-bottom: var(--space-1); }
.ds-my-2 { margin-top: var(--space-2); margin-bottom: var(--space-2); }
.ds-my-3 { margin-top: var(--space-3); margin-bottom: var(--space-3); }
.ds-my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.ds-my-5 { margin-top: var(--space-5); margin-bottom: var(--space-5); }
.ds-my-6 { margin-top: var(--space-6); margin-bottom: var(--space-6); }
.ds-my-8 { margin-top: var(--space-8); margin-bottom: var(--space-8); }
.ds-my-10 { margin-top: var(--space-10); margin-bottom: var(--space-10); }
.ds-my-12 { margin-top: var(--space-12); margin-bottom: var(--space-12); }
.ds-my-16 { margin-top: var(--space-16); margin-bottom: var(--space-16); }
.ds-my-20 { margin-top: var(--space-20); margin-bottom: var(--space-20); }
.ds-my-24 { margin-top: var(--space-24); margin-bottom: var(--space-24); }

/* Padding - All Sides */
.ds-p-0 { padding: 0; }
.ds-p-1 { padding: var(--space-1); }
.ds-p-2 { padding: var(--space-2); }
.ds-p-3 { padding: var(--space-3); }
.ds-p-4 { padding: var(--space-4); }
.ds-p-5 { padding: var(--space-5); }
.ds-p-6 { padding: var(--space-6); }
.ds-p-8 { padding: var(--space-8); }
.ds-p-10 { padding: var(--space-10); }
.ds-p-12 { padding: var(--space-12); }
.ds-p-16 { padding: var(--space-16); }
.ds-p-20 { padding: var(--space-20); }
.ds-p-24 { padding: var(--space-24); }

/* Padding Top */
.ds-pt-0 { padding-top: var(--space-0); }
.ds-pt-1 { padding-top: var(--space-1); }
.ds-pt-2 { padding-top: var(--space-2); }
.ds-pt-3 { padding-top: var(--space-3); }
.ds-pt-4 { padding-top: var(--space-4); }
.ds-pt-5 { padding-top: var(--space-5); }
.ds-pt-6 { padding-top: var(--space-6); }
.ds-pt-8 { padding-top: var(--space-8); }
.ds-pt-10 { padding-top: var(--space-10); }
.ds-pt-12 { padding-top: var(--space-12); }
.ds-pt-16 { padding-top: var(--space-16); }
.ds-pt-20 { padding-top: var(--space-20); }
.ds-pt-24 { padding-top: var(--space-24); }

/* Padding Bottom */
.ds-pb-0 { padding-bottom: var(--space-0); }
.ds-pb-1 { padding-bottom: var(--space-1); }
.ds-pb-2 { padding-bottom: var(--space-2); }
.ds-pb-2-5 { padding-bottom: var(--space-2-5); }
.ds-pb-3 { padding-bottom: var(--space-3); }
.ds-pb-4 { padding-bottom: var(--space-4); }
.ds-pb-5 { padding-bottom: var(--space-5); }
.ds-pb-6 { padding-bottom: var(--space-6); }
.ds-pb-8 { padding-bottom: var(--space-8); }
.ds-pb-10 { padding-bottom: var(--space-10); }
.ds-pb-12 { padding-bottom: var(--space-12); }
.ds-pb-16 { padding-bottom: var(--space-16); }
.ds-pb-20 { padding-bottom: var(--space-20); }
.ds-pb-24 { padding-bottom: var(--space-24); }

/* Padding Left */
.ds-pl-0 { padding-left: var(--space-0); }
.ds-pl-1 { padding-left: var(--space-1); }
.ds-pl-2 { padding-left: var(--space-2); }
.ds-pl-3 { padding-left: var(--space-3); }
.ds-pl-4 { padding-left: var(--space-4); }
.ds-pl-5 { padding-left: var(--space-5); }
.ds-pl-6 { padding-left: var(--space-6); }
.ds-pl-8 { padding-left: var(--space-8); }
.ds-pl-10 { padding-left: var(--space-10); }
.ds-pl-12 { padding-left: var(--space-12); }
.ds-pl-16 { padding-left: var(--space-16); }
.ds-pl-20 { padding-left: var(--space-20); }
.ds-pl-24 { padding-left: var(--space-24); }

/* Padding Right */
.ds-pr-0 { padding-right: var(--space-0); }
.ds-pr-1 { padding-right: var(--space-1); }
.ds-pr-2 { padding-right: var(--space-2); }
.ds-pr-3 { padding-right: var(--space-3); }
.ds-pr-4 { padding-right: var(--space-4); }
.ds-pr-5 { padding-right: var(--space-5); }
.ds-pr-6 { padding-right: var(--space-6); }
.ds-pr-8 { padding-right: var(--space-8); }
.ds-pr-10 { padding-right: var(--space-10); }
.ds-pr-12 { padding-right: var(--space-12); }
.ds-pr-16 { padding-right: var(--space-16); }
.ds-pr-20 { padding-right: var(--space-20); }
.ds-pr-24 { padding-right: var(--space-24); }

/* Padding X-axis (left and right) */
.ds-px-0 { padding-left: var(--space-0); padding-right: var(--space-0); }
.ds-px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.ds-px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.ds-px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.ds-px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.ds-px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.ds-px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.ds-px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.ds-px-10 { padding-left: var(--space-10); padding-right: var(--space-10); }
.ds-px-12 { padding-left: var(--space-12); padding-right: var(--space-12); }
.ds-px-16 { padding-left: var(--space-16); padding-right: var(--space-16); }
.ds-px-20 { padding-left: var(--space-20); padding-right: var(--space-20); }
.ds-px-24 { padding-left: var(--space-24); padding-right: var(--space-24); }

/* Padding Y-axis (top and bottom) */
.ds-py-0 { padding-top: var(--space-0); padding-bottom: var(--space-0); }
.ds-py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.ds-py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.ds-py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.ds-py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.ds-py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.ds-py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.ds-py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.ds-py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.ds-py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.ds-py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.ds-py-20 { padding-top: var(--space-20); padding-bottom: var(--space-20); }
.ds-py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }



/* ========== components/tables.css ========== */
/* ========================================
   TABLES - Modern, cleaner design
   ======================================== */

.ds-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: var(--font-size-base);
}

.ds-table thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  background: transparent;
  border-bottom: 2px solid var(--color-border);
}

.ds-table tbody td {
  padding: var(--space-4) var(--space-4);
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-light);
}

.ds-table tbody tr {
  transition: background-color 150ms ease;
}

.ds-table tbody tr:hover {
  background: var(--color-hover);
  cursor: pointer;
}

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

/* Table variants */
.ds-table--bordered {
  border: var(--border-width) solid var(--table-border-color);
}

.ds-table--bordered td,
.ds-table--bordered th {
  border: var(--border-width) solid var(--table-border-color);
}

.ds-table--striped tbody tr:nth-child(odd) {
  background: var(--color-surface-secondary);
}

.ds-table--compact tbody td,
.ds-table--compact thead th {
  padding: var(--space-2) var(--space-3);
}

/* Responsive table wrapper */
.ds-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table container */
.ds-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table utilities */
.ds-table-no-margin {
  margin-bottom: 0;
}

.ds-table-col-w-100 { width: 100px; }
.ds-table-col-w-120 { width: 120px; }
.ds-table-col-w-140 { width: 140px; }
.ds-table-col-w-150 { width: 150px; }
.ds-table-col-w-180 { width: 180px; }

/* Transaction Table Styles */
.ds-transaction-cell--comment {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-transaction-cell--amount {
  text-align: right;
  font-weight: var(--font-weight-medium);
}

.ds-transaction-cell--date {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.ds-transaction-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.ds-transaction-lock-icon {
  color: var(--color-warning);
}

/* ========================================
   MOBILE CARD LAYOUTS
   ======================================== */

.ds-mobile-card {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
  border-radius: var(--border-radius-sm);
}

.ds-mobile-card:hover {
  background: var(--color-hover);
  transform: translateX(4px);
}

.ds-mobile-card:last-child {
  border-bottom: none;
}

.ds-mobile-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.ds-mobile-card__title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  font-size: var(--font-size-base);
}

.ds-mobile-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.ds-mobile-card__info {
  margin-top: var(--space-2);
}

.ds-mobile-card__info-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
}

.ds-mobile-card__info-row:last-child {
  margin-bottom: 0;
}

.ds-mobile-card__icon {
  width: 16px;
  text-align: center;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.ds-mobile-card__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ========================================
   LISTS
   ======================================== */

.ds-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-list__item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 150ms ease, padding-left 150ms ease;
}

.ds-list__item:first-child {
  padding-top: 0;
}

.ds-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ds-list__item--clickable {
  cursor: pointer;
  border-radius: var(--border-radius-sm);
}

.ds-list__item--clickable:hover {
  background-color: var(--color-hover);
  padding-left: var(--space-2);
}

.ds-list__item-content {
  flex: 1;
}

.ds-list__item-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-size-base);
}

.ds-list__item-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.ds-list__item-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* List utilities */
.ds-list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}



/* ========== components/utilities.css ========== */
/**
 * Design System - Core Utilities
 * bIDMIO
 *
 * Global icon fix, border-radius standardization, and layout utilities
 * Foundation utilities used across all components
 *
 * Naming Convention: .ds-{utility}-{value}
 */

/* ========================================
   GLOBAL ICON FIX - CRITICAL FOR VISIBILITY
   ======================================== */

/* CRITICAL FIX: Ensure all icons inherit color from parent elements */
/* This makes icons visible by allowing them to inherit text colors */
i, svg, .fa, .fas, .far, .fal, .fab {
    color: inherit !important;
}

/* MOBILE ICON VISIBILITY FIX: Force dark color on mobile icons
   Parent elements use light/secondary colors that make icons invisible */
@media (max-width: 768px) {
    /* Mobile menu hamburger icon */
    .mobile-menu-btn i,
    .mobile-menu-btn .fa,
    .mobile-menu-btn .fas {
        color: var(--color-text-primary) !important;
    }
    
    /* Notification bell icon */
    .notification-icon i,
    .notification-icon .fa,
    .notification-icon .fas {
        color: var(--color-text-primary) !important;
    }
    
    /* Header top links icons (settings, theme, etc.) */
    .header-top-link i,
    .header-top-link .fa,
    .header-top-link .fas {
        color: var(--color-text-primary) !important;
    }
    
    /* Project card quick action button icons */
    .mobile-card__quick-btn i,
    .mobile-card__quick-btn .fa,
    .mobile-card__quick-btn .fas {
        color: var(--color-text-primary) !important;
    }
    
    /* Sidebar navigation icons */
    .sidebar-nav a i,
    .sidebar-nav a .fa,
    .sidebar-nav a .fas {
        color: var(--color-text-primary) !important;
    }
    
    /* Active sidebar items should have white icons */
    .sidebar-nav a.active i,
    .sidebar-nav a.active .fa,
    .sidebar-nav a.active .fas {
        color: var(--color-text-inverse) !important;
    }
    
    /* Hover states for quick action buttons */
    .mobile-card__quick-btn:hover i,
    .mobile-card__quick-btn:focus i {
        color: #ffffff !important;
    }
}

/* CRITICAL FIX: Force Font Awesome font-family and font-weight
   This prevents other CSS rules from overriding the Font Awesome webfont */

/* Base .fa class - default to solid (most common usage) */
.fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Solid icons (fas, fa-solid) - weight 900 */
.fas,
.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Regular icons (far, fa-regular) - weight 400 */
.far,
.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Brands icons (fab, fa-brands) - weight 400 */
.fab,
.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Light icons (fal, fa-light) - Pro only, fallback to solid weight 900 */
.fal,
.fa-light {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Ensure Font Awesome icons render correctly across the app */
.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands {
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
    line-height: 1 !important;
    speak: never !important;
}

/* ========================================
   GLOBAL BORDER-RADIUS & SPACING STANDARDIZATION
   Applied consistently across the entire application
   ======================================== */

/* Global Border-Radius Standardization - 8px
   Note: Does NOT include generic .btn to preserve Bootstrap button groups,
   icon buttons, and pagination. Only design-system buttons are styled. */

/* Design System Buttons */
.ds-btn,
.project-view-btn,
.alphabet-btn {
    border-radius: 8px !important;
}

/* Form Controls */
.form-select,
.form-control {
    border-radius: 8px;
}

/* Cards and Containers */
.card,
.ds-card,
.ds-page-header,
.ds-project-tabs-container,
.ds-project-tabs-mobile,
.ds-table-container,
.project-filters-primary,
.bulk-action-toolbar {
    border-radius: 8px;
}

/* Sidebar Containers - Explicit List Only
   Note: No wildcard [class*="sidebar"] to avoid hitting helper classes */
.ds-project-sidebar,
.ds-sidebar,
.sidebar,
.sa-sidebar,
.workzone-sidebar,
.ds-dashboard-sidebar,
.ds-project-calendar-sidebar,
.chat-sidebar,
.settings-sidebar,
.ds-upload-form-layout__sidebar {
    border-radius: 8px !important;
}

/* Alphabet filter buttons - explicit override for project buttons */
.alphabet-filter .alphabet-btn {
    border-radius: 8px !important;
}

/* Consistent Section Spacing - 1.5rem margins */
.project-filters-primary,
.alphabet-filter-wrapper,
.view-toggle-wrapper {
    margin-bottom: 1.5rem;
}

/* Advanced Filters Card */
#advancedFilters .card {
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: none;
}

/* ========================================
   PROJECT VIEW TOGGLE BUTTONS
   ======================================== */

.project-view-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
}

.project-view-toggle-left {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.project-view-toggle-right {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .project-view-toggle-container {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .project-view-toggle-left,
    .project-view-toggle-right {
        width: 100%;
    }
    
    .project-view-toggle-left .ds-btn,
    .project-view-toggle-right .ds-btn {
        flex: 1;
    }
}

/* Mobile: Remove border-radius for full-bleed containers */
@media (max-width: 768px) {
    .ds-table-container,
    .project-filters-primary {
        border-radius: 0 !important;
    }
}

/* ========================================
   LAYOUT UTILITIES
   Display, flex, grid, position, sizing, alignment
   ======================================== */

/* Display utilities */
.ds-flex { display: flex; }
.ds-inline-flex { display: inline-flex; }
.ds-grid { display: grid; }
.ds-block { display: block; }
.ds-inline-block { display: inline-block; }
.ds-hidden { display: none !important; }

/* Flex direction */
.ds-flex-row { flex-direction: row; }
.ds-flex-col { flex-direction: column; }

/* Align items */
.ds-items-center { align-items: center; }
.ds-items-start { align-items: flex-start; }
.ds-items-end { align-items: flex-end; }

/* Justify content */
.ds-justify-center { justify-content: center; }
.ds-justify-between { justify-content: space-between; }
.ds-justify-end { justify-content: flex-end; }
.ds-justify-start { justify-content: flex-start; }

/* Flex wrap */
.ds-flex-wrap { flex-wrap: wrap; }
.ds-flex-nowrap { flex-wrap: nowrap; }

/* Flex grow/shrink */
.ds-flex-1 { flex: 1; }
.ds-flex-2 { flex: 2; }

/* Gap utilities */
.ds-gap-0 { gap: 0; }
.ds-gap-1 { gap: var(--space-1); }
.ds-gap-2 { gap: var(--space-2); }
.ds-gap-3 { gap: var(--space-3); }
.ds-gap-4 { gap: var(--space-4); }
.ds-gap-5 { gap: var(--space-5); }
.ds-gap-6 { gap: var(--space-6); }
.ds-gap-8 { gap: var(--space-8); }
.ds-gap-10 { gap: var(--space-10); }
.ds-gap-12 { gap: var(--space-12); }
.ds-gap-16 { gap: var(--space-16); }
.ds-gap-20 { gap: var(--space-20); }
.ds-gap-24 { gap: var(--space-24); }

/* ========================================
   EMPTY STATE COMPONENT
   ======================================== */

.ds-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-16) var(--space-8);
    min-height: 400px;
}

.ds-empty-state__icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-secondary);
    border-radius: 50%;
    margin-bottom: var(--space-5);
}

.ds-empty-state__icon i {
    font-size: 36px;
    color: var(--color-text-tertiary);
}

.ds-empty-state__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin: 0 0 var(--space-3) 0;
}

.ds-empty-state__message {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-6) 0;
    max-width: 400px;
}

.ds-empty-state__actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}


/* ========== components/calendar-legend.css ========== */
/* ==============================================
   Calendar Legend Component Styles
   ============================================== */

/* Base legend toggle button */
.ds-legend-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ds-legend-toggle:hover {
    background-color: var(--color-hover, #f5f5f5);
}

.ds-legend-toggle-icon {
    color: var(--color-text-secondary);
    transition: transform 0.3s ease;
}

/* Expanded state - rotate chevron */
.ds-calendar-legend.ds-legend-expanded .ds-legend-toggle-icon {
    transform: rotate(180deg);
}

/* Legend content container */
.ds-legend-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1rem;
}

.ds-calendar-legend.ds-legend-expanded .ds-legend-content {
    max-height: 500px;
    padding: 0 1rem 0.75rem 1rem;
}

/* Legend items grid */
.ds-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

/* Desktop: Legend expanded by default, toggle hidden */
@media (min-width: 769px) {
    .ds-calendar-legend--collapsible .ds-legend-toggle {
        display: none;
    }
    
    .ds-calendar-legend--collapsible .ds-legend-content {
        max-height: none;
        padding: 0.75rem 1rem;
        overflow: visible;
    }
    
    .ds-calendar-legend--collapsible .ds-legend-items {
        border-top: none;
        padding-top: 0;
    }
    
    /* Add the "Legend:" label on desktop */
    .ds-calendar-legend--collapsible .ds-legend-items::before {
        content: 'Legend:';
        font-weight: 600;
        color: var(--color-text-primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Mobile: Collapsed by default */
@media (max-width: 768px) {
    .ds-calendar-legend--collapsible .ds-legend-content {
        max-height: 0;
        padding: 0 1rem;
    }
    
    .ds-calendar-legend--collapsible.ds-legend-expanded .ds-legend-content {
        max-height: 500px;
        padding: 0 1rem 0.75rem 1rem;
    }
}

/* ==============================================
   Schedule Tab Mobile Enhancements
   ============================================== */

@media (max-width: 768px) {
    /* View controls - stack vertically */
    .ds-calendar-view-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    /* View buttons - horizontal scroll */
    .ds-calendar-view-buttons {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem !important;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }
    
    .ds-calendar-view-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .ds-calendar-view-buttons .ds-btn {
        flex-shrink: 0;
        min-width: auto;
        white-space: nowrap;
    }
    
    /* Action buttons - full width stack */
    .ds-calendar-action-buttons {
        display: flex;
        gap: 0.5rem !important;
    }
    
    .ds-calendar-action-buttons .ds-btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }
    
    /* Filter buttons - horizontal scroll */
    .ds-calendar-filter-buttons {
        display: flex;
        gap: 0.5rem !important;
    }
    
    .ds-calendar-filter-buttons .ds-btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }
    
    /* Calendar container - edge to edge */
    #organization-schedule-calendar-container {
        margin: 0 -0.75rem !important;
        padding: 0.5rem !important;
        border-radius: 0 !important;
        width: calc(100% + 1.5rem) !important;
    }
    
    /* Filters section styling */
    .ds-schedule-filters {
        margin: 0 -0.75rem 1rem -0.75rem !important;
        border-radius: 0 !important;
        width: calc(100% + 1.5rem) !important;
    }
    
    .ds-filters-toggle {
        min-height: 44px;
    }
    
    /* Calendar legend - edge to edge on mobile */
    .ds-calendar-legend {
        margin-left: -0.75rem !important;
        margin-right: -0.75rem !important;
        border-radius: 0 !important;
        width: calc(100% + 1.5rem) !important;
    }
}

/* ==============================================
   FullCalendar Toolbar Mobile Enhancements
   ============================================== */

@media (max-width: 768px) {
    /* FullCalendar header toolbar - wrap and center */
    #organization-schedule-calendar-container .fc-header-toolbar,
    .fc-header-toolbar.fc-toolbar {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        justify-content: center !important;
        padding: 0.5rem 0 !important;
    }
    
    /* Each toolbar chunk - center on its own row */
    #organization-schedule-calendar-container .fc-toolbar-chunk,
    .fc-header-toolbar .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    
    /* Navigation buttons (prev/next/today) - larger touch targets */
    #organization-schedule-calendar-container .fc-button,
    .fc-header-toolbar .fc-button {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        border-radius: 8px !important;
    }
    
    /* Arrow buttons specifically */
    #organization-schedule-calendar-container .fc-prev-button,
    #organization-schedule-calendar-container .fc-next-button,
    .fc-header-toolbar .fc-prev-button,
    .fc-header-toolbar .fc-next-button {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Date title - better readability */
    #organization-schedule-calendar-container .fc-toolbar-title,
    .fc-header-toolbar .fc-toolbar-title {
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-align: center !important;
        margin: 0 0.5rem !important;
    }
    
    /* Button group - remove tight borders */
    #organization-schedule-calendar-container .fc-button-group,
    .fc-header-toolbar .fc-button-group {
        gap: 0.25rem !important;
    }
    
    #organization-schedule-calendar-container .fc-button-group .fc-button,
    .fc-header-toolbar .fc-button-group .fc-button {
        border-radius: 8px !important;
    }
}

/* Extra small screens - stack navigation vertically */
@media (max-width: 480px) {
    #organization-schedule-calendar-container .fc-header-toolbar,
    .fc-header-toolbar.fc-toolbar {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    #organization-schedule-calendar-container .fc-toolbar-chunk,
    .fc-header-toolbar .fc-toolbar-chunk {
        width: 100% !important;
    }
    
    .ds-calendar-view-buttons .ds-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Hide text on very small screens, show only icons */
    .ds-calendar-action-buttons .ds-btn span,
    .ds-calendar-action-buttons .ds-btn:not(:has(i))::after {
        display: none;
    }
    
    .ds-calendar-action-buttons .ds-btn i {
        margin-right: 0 !important;
    }
}


/* ========== components/bidmio-loader.css ========== */
/**
 * Bidmio Loader Component
 * Lightweight branded loading animation with flip effect, shimmer, and loading dots
 */

/* Container */
.bidmio-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  gap: var(--spacing-md);
  position: relative;
}

/* Pulse ring animation */
.bidmio-loader__pulse {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(8, 105, 222, 0.3);
  animation: bidmioPulse 2s ease-out infinite;
}

.bidmio-loader__pulse:nth-child(2) {
  animation-delay: 0.5s;
}

@keyframes bidmioPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Logo text container */
.bidmio-loader__text {
  display: inline-flex;
  font-family: 'Nunito', var(--font-family-base), sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0869de;
  letter-spacing: -0.02em;
  perspective: 500px;
  position: relative;
}

/* Individual letter styling */
.bidmio-loader__letter {
  display: inline-block;
  transform-style: preserve-3d;
  position: relative;
}

/* Animated letters (b and o) */
.bidmio-loader__letter--flip {
  animation: bidmioFlip 1.8s ease-in-out infinite;
}

/* All letters same blue color */
.bidmio-loader__letter {
  color: #0869de;
}

/* Delay the 'o' flip */
.bidmio-loader__letter--flip-delayed {
  animation-delay: 0.9s;
}

/* The flip animation */
@keyframes bidmioFlip {
  0%, 100% {
    transform: rotateY(0deg);
  }
  25% {
    transform: rotateY(360deg);
  }
  50%, 100% {
    transform: rotateY(360deg);
  }
}

/* Optional loading text below */
.bidmio-loader__subtext {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  opacity: 0.8;
}

/* Size variants */
.bidmio-loader--sm .bidmio-loader__text {
  font-size: 1.25rem;
}

.bidmio-loader--lg .bidmio-loader__text {
  font-size: 2.25rem;
}

/* Inline variant (minimal padding) */
.bidmio-loader--inline {
  padding: var(--spacing-md);
}

/* Centered in container variant */
.bidmio-loader--centered {
  min-height: 200px;
}

/* Hidden state */
.bidmio-loader[hidden] {
  display: none;
}

/* ========================================
   SHIMMER EFFECT
   Light wave that sweeps across letters
   ======================================== */

.bidmio-loader--shimmer .bidmio-loader__text {
  overflow: hidden;
}

.bidmio-loader--shimmer .bidmio-loader__text::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: bidmioShimmer 2.5s ease-in-out infinite;
}

[data-theme="dark"] .bidmio-loader--shimmer .bidmio-loader__text::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
}

@keyframes bidmioShimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 200%;
  }
}

/* ========================================
   LOADING DOTS
   Animated dots below the logo
   ======================================== */

.bidmio-loader__dots {
  display: flex;
  gap: 8px;
  margin-top: var(--spacing-sm);
}

.bidmio-loader__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #0869de;
  opacity: 0.3;
  animation: bidmioDotPulse 1.4s ease-in-out infinite;
}

.bidmio-loader__dot:nth-child(1) {
  animation-delay: 0s;
}

.bidmio-loader__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.bidmio-loader__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bidmioDotPulse {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ========================================
   FULL-PAGE OVERLAY VARIANT
   For page transitions and navigation
   ======================================== */

.bidmio-loader--overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.96);
  z-index: 9999;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
  backdrop-filter: blur(4px);
}

/* Dark mode support */
[data-theme="dark"] .bidmio-loader--overlay {
  background-color: rgba(30, 41, 59, 0.96);
}

/* Active/visible state */
.bidmio-loader--overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* MUCH LARGER text for overlay - scales with screen size */
.bidmio-loader--overlay .bidmio-loader__text {
  font-size: 3.5rem;
  letter-spacing: -0.01em;
  z-index: 1;
}

/* Pulse animation for overlay */
.bidmio-loader--overlay .bidmio-loader__pulse {
  width: 280px;
  height: 280px;
  border-width: 3px;
}

/* Larger dots for overlay */
.bidmio-loader--overlay .bidmio-loader__dot {
  width: 14px;
  height: 14px;
}

.bidmio-loader--overlay .bidmio-loader__dots {
  gap: 12px;
  margin-top: var(--spacing-lg);
}

/* Tablet screens */
@media (min-width: 768px) {
  .bidmio-loader--overlay .bidmio-loader__text {
    font-size: 4.5rem;
    letter-spacing: -0.01em;
  }
  
  .bidmio-loader--overlay .bidmio-loader__pulse {
    width: 340px;
    height: 340px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dot {
    width: 16px;
    height: 16px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dots {
    gap: 14px;
  }
}

/* Desktop screens */
@media (min-width: 1024px) {
  .bidmio-loader--overlay .bidmio-loader__text {
    font-size: 5.5rem;
    letter-spacing: -0.01em;
  }
  
  .bidmio-loader--overlay .bidmio-loader__pulse {
    width: 400px;
    height: 400px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dot {
    width: 18px;
    height: 18px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dots {
    gap: 16px;
  }
}

/* Large desktop screens (1440px+) */
@media (min-width: 1440px) {
  .bidmio-loader--overlay .bidmio-loader__text {
    font-size: 6.5rem;
    letter-spacing: -0.01em;
  }
  
  .bidmio-loader--overlay .bidmio-loader__pulse {
    width: 480px;
    height: 480px;
    border-width: 4px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dot {
    width: 20px;
    height: 20px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dots {
    gap: 18px;
  }
}

/* Extra large screens (1920px+) */
@media (min-width: 1920px) {
  .bidmio-loader--overlay .bidmio-loader__text {
    font-size: 7.5rem;
    letter-spacing: -0.01em;
  }
  
  .bidmio-loader--overlay .bidmio-loader__pulse {
    width: 560px;
    height: 560px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dot {
    width: 22px;
    height: 22px;
  }
  
  .bidmio-loader--overlay .bidmio-loader__dots {
    gap: 20px;
  }
}

/* Subtle fade-in animation for overlay content */
.bidmio-loader--overlay.is-active .bidmio-loader__text {
  animation: bidmioFadeInScale 0.4s ease-out forwards;
}

.bidmio-loader--overlay.is-active .bidmio-loader__dots {
  animation: bidmioFadeInDots 0.5s ease-out 0.2s forwards;
  opacity: 0;
}

@keyframes bidmioFadeInScale {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Subtle shadow/glow effect on the text */
.bidmio-loader--overlay .bidmio-loader__text {
  text-shadow: 0 4px 20px rgba(8, 105, 222, 0.15);
}

[data-theme="dark"] .bidmio-loader--overlay .bidmio-loader__text {
  text-shadow: 0 4px 30px rgba(8, 105, 222, 0.25);
}


/* ========== components/auto-save.css ========== */
/**
 * AutoSave Indicator Styles
 *
 * Visual feedback for background save operations.
 * Provides a non-intrusive saving indicator with smooth animations.
 */

.autosave-indicator {
    position: fixed;
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--border-radius, 6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-secondary, #6b7280);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.autosave-indicator--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.autosave-indicator--top-right {
    top: var(--space-4, 1rem);
    right: var(--space-4, 1rem);
}

.autosave-indicator--top-left {
    top: var(--space-4, 1rem);
    left: var(--space-4, 1rem);
}

.autosave-indicator--bottom-right {
    bottom: var(--space-4, 1rem);
    right: var(--space-4, 1rem);
}

.autosave-indicator--bottom-left {
    bottom: var(--space-4, 1rem);
    left: var(--space-4, 1rem);
}

.autosave-indicator--inline {
    position: relative;
    display: inline-flex;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
}

.autosave-indicator__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #3b82f6);
    border-radius: 50%;
    animation: autosave-spin 0.8s linear infinite;
}

.autosave-indicator--success .autosave-indicator__spinner {
    border-color: var(--color-success, #10b981);
    border-top-color: var(--color-success, #10b981);
    animation: none;
}

.autosave-indicator--success .autosave-indicator__spinner::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-success, #10b981);
}

.autosave-indicator--error .autosave-indicator__spinner {
    border-color: var(--color-danger, #ef4444);
    border-top-color: var(--color-danger, #ef4444);
    animation: none;
}

.autosave-indicator--success {
    color: var(--color-success, #10b981);
    border-color: var(--color-success-light, #d1fae5);
    background: var(--color-success-bg, #ecfdf5);
}

.autosave-indicator--error {
    color: var(--color-danger, #ef4444);
    border-color: var(--color-danger-light, #fee2e2);
    background: var(--color-danger-bg, #fef2f2);
}

.autosave-indicator__text {
    font-weight: 500;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    .autosave-indicator {
        top: auto !important;
        bottom: calc(var(--mobile-nav-height, 60px) + var(--space-3, 0.75rem));
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(10px);
    }
    
    .autosave-indicator--visible {
        transform: translateX(-50%) translateY(0);
    }
}

.form-saving {
    pointer-events: none;
    opacity: 0.7;
}

.form-saving input,
.form-saving select,
.form-saving textarea,
.form-saving button {
    cursor: wait;
}

.save-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-secondary, #6b7280);
}

.save-status--saving {
    color: var(--color-primary, #3b82f6);
}

.save-status--saved {
    color: var(--color-success, #10b981);
}

.save-status--error {
    color: var(--color-danger, #ef4444);
}

.save-status__icon {
    font-size: 0.75rem;
}

.save-status__text {
    font-weight: 500;
}

.btn-save-indicator {
    position: relative;
}

.btn-save-indicator .spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    border-radius: inherit;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.btn-save-indicator.is-saving .spinner-overlay {
    opacity: 1;
    visibility: visible;
}

.btn-save-indicator.is-saving .btn-content {
    opacity: 0;
}


/* ========== components/image-annotation.css ========== */
.annotation-toolbar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.annotation-toolbar.active {
    display: block;
}

.annotation-toolbar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.annotation-toolbar__group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.annotation-toolbar__divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
}

.annotation-tool-btn,
.annotation-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 14px;
}

.annotation-tool-btn:hover,
.annotation-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.annotation-tool-btn.active {
    background: var(--primary, #3b82f6);
    color: #fff;
}

.annotation-tool-btn:disabled,
.annotation-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.annotation-action-btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.annotation-color-btn {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.annotation-color-btn:hover {
    transform: scale(1.15);
}

.annotation-color-btn.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.annotation-size-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.annotation-stroke-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.annotation-stroke-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.annotation-stroke-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.annotation-save-btn,
.annotation-export-btn,
.annotation-cancel-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.annotation-save-btn {
    background: var(--primary, #3b82f6);
    color: #fff;
}

.annotation-save-btn:hover {
    background: var(--primary-hover, #2563eb);
}

.annotation-export-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.annotation-export-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.annotation-cancel-btn {
    background: transparent;
    color: #94a3b8;
}

.annotation-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.annotation-save-btn:disabled,
.annotation-export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.annotation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1005;
    pointer-events: none;
}

.annotation-overlay.active {
    pointer-events: auto;
}

.annotation-overlay canvas,
.annotation-overlay .canvas-container {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.annotation-overlay .upper-canvas {
    pointer-events: auto !important;
}

.annotation-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary, #3b82f6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.file-preview-modal__toolbar-btn--annotate {
    position: relative;
}

.file-preview-modal__toolbar-btn--annotate.has-annotations::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--primary, #3b82f6);
    border-radius: 50%;
    border: 2px solid var(--surface-color, #1e293b);
}

.annotation-toggle-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.annotation-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.annotation-toggle-btn.showing-original {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary, #3b82f6);
    color: var(--primary, #3b82f6);
}

@media (max-width: 768px) {
    .annotation-toolbar {
        padding: 6px 8px;
    }
    
    .annotation-toolbar__inner {
        gap: 8px;
    }
    
    .annotation-toolbar__group {
        gap: 2px;
    }
    
    .annotation-tool-btn,
    .annotation-action-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .annotation-color-btn {
        width: 32px;
        height: 32px;
    }
    
    .annotation-stroke-slider {
        width: 60px;
    }
    
    .annotation-save-btn,
    .annotation-export-btn,
    .annotation-cancel-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .annotation-toolbar__divider {
        display: none;
    }
    
    .annotation-toolbar__tools {
        order: 1;
    }
    
    .annotation-toolbar__colors {
        order: 2;
    }
    
    .annotation-toolbar__size {
        order: 3;
    }
    
    .annotation-toolbar__actions {
        order: 4;
    }
    
    .annotation-toolbar__save {
        order: 5;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .annotation-toolbar__inner {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .annotation-save-btn span,
    .annotation-export-btn span {
        display: none;
    }
    
    .annotation-save-btn,
    .annotation-export-btn {
        padding: 10px;
    }
}


/* ========== components-modals-base.css ========== */
/**
 * Design System - Standardized Modal Components
 * bIDMIO
 *
 * Global modal styling that prevents double scrollbars, ensures responsive behavior,
 * and provides consistent UI across all modals in the application.
 *
 * Usage: Include this stylesheet after components-consolidated.css
 */

/* ========================================
   MODAL OVERLAY & CONTAINER
   ======================================== */

.ds-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ds-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    cursor: pointer;
}

.ds-modal-container {
    background: white;
    border-radius: var(--border-radius-lg, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Modal Sizes */
.ds-modal-container--sm {
    max-width: 400px;
}

.ds-modal-container--md {
    max-width: 600px;
}

.ds-modal-container--lg {
    max-width: 800px;
}

.ds-modal-container--xl {
    max-width: 1000px;
}

/* ========================================
   MODAL HEADER
   ======================================== */

.ds-modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    background: white;
    border-radius: var(--border-radius-lg, 12px) var(--border-radius-lg, 12px) 0 0;
}

.ds-modal-header-content {
    flex: 1;
    min-width: 0;
}

.ds-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary, #111827);
    line-height: 1.4;
}

.ds-modal-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6b7280);
    line-height: 1.5;
}

.ds-modal-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary, #6b7280);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.15s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius, 8px);
    margin-left: 1rem;
}

.ds-modal-close:hover {
    color: var(--color-text-primary, #111827);
    background: var(--color-surface-secondary, #f9fafb);
}

.ds-modal-close:focus-visible {
    outline: 2px solid var(--color-primary, #3b82f6);
    outline-offset: 2px;
}

/* ========================================
   MODAL BODY - CRITICAL: NO OVERFLOW HERE
   ======================================== */

.ds-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ds-modal-body-content {
    padding: 1.5rem;
}

/* Form styling within modals */
.ds-modal-body-content form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ========================================
   MODAL FOOTER
   ======================================== */

.ds-modal-footer {
    flex-shrink: 0;
    background: var(--color-surface-secondary, #f9fafb);
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0 0 var(--border-radius-lg, 12px) var(--border-radius-lg, 12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.ds-modal-footer > *:only-child {
    margin-left: auto;
}

.ds-modal-footer .ds-modal-footer-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE BEHAVIOR
   ======================================== */

@media (max-width: 768px) {
    .ds-modal {
        padding: 0;
    }
    
    .ds-modal-container {
        max-height: 100vh;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .ds-modal-header {
        border-radius: 0;
        padding: 1rem 1.25rem;
    }
    
    .ds-modal-title {
        font-size: 1.125rem;
    }
    
    .ds-modal-body-content {
        padding: 1.25rem;
    }
    
    .ds-modal-footer {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        border-radius: 0;
    }
    
    .ds-modal-footer .ds-modal-footer-actions {
        width: 100%;
        flex-direction: column-reverse;
    }
    
    .ds-modal-footer .ds-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 374px) {
    .ds-modal-body-content {
        padding: 1rem;
    }
}

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


/* ========== components-modals-legacy.css ========== */
   LEGACY MODAL SUPPORT (Economy modals)
   ======================================== */

/* Support for existing .economy-modal class */
.economy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.economy-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    cursor: pointer;
}

.economy-modal .modal-container {
    background: white;
    border-radius: var(--border-radius-lg, 12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* CRITICAL FIX: Remove inline max-height/overflow from modal-body */
.economy-modal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    /* Override any inline styles */
    max-height: none !important;
}

.economy-modal .modal-header {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.economy-modal .modal-footer {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Mobile responsive for legacy modals */
@media (max-width: 768px) {
    .economy-modal {
        padding: 0;
    }
    
    .economy-modal .modal-container {
        max-height: 100vh;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .economy-modal .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .economy-modal .modal-body {
        padding: 1.25rem;
    }
    
    .economy-modal .modal-footer {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .economy-modal .modal-footer .ds-btn {
        width: 100%;
    }
}

/* ========================================
   MODAL ANIMATIONS
   ======================================== */

@keyframes ds-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ds-modal-slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ds-modal[style*="display: flex"],
.ds-modal[style*="display:flex"] {
    animation: ds-modal-fade-in 0.15s ease-out;
}

.ds-modal[style*="display: flex"] .ds-modal-container,
.ds-modal[style*="display:flex"] .ds-modal-container {
    animation: ds-modal-slide-up 0.2s ease-out;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.ds-modal:focus {
    outline: none;
}

.ds-modal-container:focus-visible {
    outline: 2px solid var(--color-primary, #3b82f6);
    outline-offset: -2px;
}

/* Ensure keyboard focus is visible on modal elements */
.ds-modal .ds-btn:focus-visible,
.ds-modal .ds-form-input:focus-visible,
.ds-modal .form-select:focus-visible,
.ds-modal .ds-form-textarea:focus-visible {
    outline: 2px solid var(--color-primary, #3b82f6);
    outline-offset: 2px;
}

