/* =================================================================
   ANDÉN MOBILITY — Components
   ================================================================= */

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.625rem 1.125rem;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-4);
  border: 1px solid transparent;
  background: var(--bg-2);
  color: var(--text-0);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn .bi { font-size: 1.05em; }

.btn-primary {
  background: var(--gradient-brand);
  color: #051b13;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32), inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  /* Shimmer effect on hover (premium SaaS) */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.48), inset 0 1px 0 rgba(255,255,255,0.18);
  color: #051b13;
  transform: translateY(-1px);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:focus-visible { box-shadow: var(--shadow-focus), 0 4px 14px rgba(16, 185, 129, 0.32); }

.btn-secondary {
  background: var(--bg-2);
  color: var(--text-0);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--border-bold); }

.btn-ghost {
  background: transparent;
  color: var(--text-1);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text-0); }

.btn-outline {
  background: transparent;
  color: var(--text-0);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: var(--bg-2); border-color: var(--border-bold); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-danger:focus-visible { box-shadow: var(--shadow-focus-danger), 0 4px 14px rgba(239, 68, 68, 0.32); }

.btn-success {
  background: var(--success);
  color: #02261a;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.32), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-success:hover { background: #16a34a; color: #02261a; }

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--r-3);
}

.btn-sm {
  padding: 0.4375rem 0.75rem;
  font-size: var(--fs-sm);
  border-radius: var(--r-3);
}
.btn-sm.btn-icon { width: 32px; height: 32px; }

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: var(--fs-lg);
  border-radius: var(--r-5);
}
.btn-lg.btn-icon { width: 52px; height: 52px; }

.btn-pill { border-radius: var(--r-pill); }

.btn-block { display: flex; width: 100%; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  padding: var(--sp-5);
  transition: border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.card-hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-elevated {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card-floating {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-interactive {
  cursor: pointer;
  user-select: none;
}
.card-interactive:hover {
  border-color: var(--brand-500);
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.card-interactive:active { transform: translateY(0); }
.card-brand {
  background: var(--bg-brand-soft);
  border-color: var(--brand-500);
}

.card-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: 0.125rem;
}

/* ---------------- KPI ---------------- */
.kpi {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  background: var(--gradient-brand);
  opacity: 0.06;
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
}
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--primary-soft);
  color: var(--brand-500);
  margin-bottom: var(--sp-2);
}
.kpi-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
}
.kpi-value {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  line-height: 1;
}
.kpi-sub {
  font-size: var(--fs-sm);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.kpi-trend { font-weight: 600; }
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ---------------- Inputs ---------------- */
.input,
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--fs-base);
  font-family: var(--font-sans);
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  box-shadow: var(--shadow-inner);
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder, .form-control::placeholder { color: var(--text-3); }
.input:hover, .form-control:hover { border-color: var(--border-bold); }
.input:focus, .form-control:focus {
  border-color: var(--brand-500);
  background: var(--bg-1);
  box-shadow: var(--shadow-focus);
  outline: none;
}
.input:disabled, .form-control:disabled { opacity: 0.5; cursor: not-allowed; }
.input.is-invalid, .form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: var(--shadow-focus-danger);
}

.input-sm { padding: 0.5rem 0.75rem; font-size: var(--fs-sm); }
.input-lg { padding: 0.9rem 1.125rem; font-size: var(--fs-lg); border-radius: var(--r-5); }

.input-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  padding: 0 0.875rem;
  box-shadow: var(--shadow-inner);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.input-group:hover { border-color: var(--border-bold); }
.input-group:focus-within {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
.input-group .input,
.input-group input {
  background: transparent;
  border: 0;
  padding: 0.75rem 0;
  flex: 1;
}
.input-group .input:focus,
.input-group input:focus { box-shadow: none; background: transparent; }
.input-group-icon { color: var(--text-2); display: inline-flex; }

.label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field { display: flex; flex-direction: column; gap: 0; margin-bottom: var(--sp-4); }
.field-hint { font-size: var(--fs-xs); color: var(--text-2); margin-top: var(--sp-1); }
.field-error { font-size: var(--fs-xs); color: var(--danger); margin-top: var(--sp-1); }

/* Switch */
.switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-3);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out);
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--text-0);
  border-radius: 50%;
  transition: transform var(--dur-base) var(--ease-spring);
  box-shadow: var(--shadow-xs);
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch[data-on="true"], .switch.active { background: var(--brand-500); }
.switch[data-on="true"]::after, .switch.active::after { transform: translateX(20px); background: #001b13; }

/* Radio cards */
.radio-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card.active {
  border-color: var(--brand-500);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--brand-500) inset;
}

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.25rem 0.625rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--border);
  white-space: nowrap;
  line-height: 1.4;
}

.badge-brand   { background: var(--primary-soft);  color: var(--brand-400);   border-color: rgba(16,185,129,0.30); }
.badge-success { background: var(--success-bg);    color: var(--success-text); border-color: var(--success-border); }
.badge-warning { background: var(--warning-bg);    color: var(--warning-text); border-color: var(--warning-border); }
.badge-danger  { background: var(--danger-bg);     color: var(--danger-text);  border-color: var(--danger-border); }
.badge-info    { background: var(--info-bg);       color: var(--info-text);    border-color: var(--info-border); }

/* Filled variants para call-to-attention */
.badge-solid-brand   { background: var(--brand-500); color: #051b13; border-color: transparent; }
.badge-solid-success { background: var(--success); color: #02261a; border-color: transparent; }
.badge-solid-warning { background: var(--warning); color: #2b1e02; border-color: transparent; }
.badge-solid-danger  { background: var(--danger);  color: #fff;    border-color: transparent; }
.badge-solid-info    { background: var(--info);    color: #fff;    border-color: transparent; }

.badge-dot::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Status pills (driver/trip) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.3125rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg-3);
  text-transform: capitalize;
}
.status-pill::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

.status-online    { color: var(--success); border-color: var(--success-soft); }
.status-in-trip   { color: var(--info);    border-color: var(--info-soft); }
.status-offline   { color: var(--text-2); }
.status-requested { color: var(--warning); border-color: var(--warning-soft); }
.status-accepted  { color: var(--info);    border-color: var(--info-soft); }
.status-in-progress { color: var(--info);  border-color: var(--info-soft); }
.status-completed { color: var(--success); border-color: var(--success-soft); }
.status-cancelled { color: var(--danger);  border-color: var(--danger-soft); }
.status-pending   { color: var(--warning); border-color: var(--warning-soft); }

/* ---------------- Avatars ---------------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--text-0);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  overflow: hidden;
  text-transform: uppercase;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.avatar-xl { width: 88px; height: 88px; font-size: var(--fs-2xl); }
.avatar.tier-standard { background: color-mix(in srgb, var(--tier-standard) 22%, var(--bg-3)); color: var(--tier-standard); }
.avatar.tier-comfort  { background: color-mix(in srgb, var(--tier-comfort) 22%, var(--bg-3));  color: var(--tier-comfort); }
.avatar.tier-xl       { background: color-mix(in srgb, var(--tier-xl) 22%, var(--bg-3));       color: var(--tier-xl); }
.avatar.tier-premium  { background: color-mix(in srgb, var(--tier-premium) 22%, var(--bg-3));  color: var(--tier-premium); }

.avatar-indicator {
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-1);
  background: var(--success);
}
.avatar-indicator.offline { background: var(--text-3); }
.avatar-indicator.busy    { background: var(--info); }

/* ---------------- Tables ---------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
.table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr {
  transition: background var(--dur-fast) var(--ease-out);
}
.table tbody tr:hover { background: var(--bg-2); }
.table tbody tr.active { background: var(--primary-soft); }
.table .text-end { text-align: right; }
.table-borderless tbody td { border-bottom: 0; }

.table-wrap {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }

/* ---------------- Modals ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.65);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  animation: fade-in var(--dur-base) var(--ease-out) forwards;
  /* En móvil el modal sube como bottom-sheet */
  align-items: flex-end;
}
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-6) var(--r-6) 0 0;
  padding: var(--sp-6);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  animation: slide-up var(--dur-slow) var(--ease-spring) both;
  padding-bottom: calc(var(--sp-6) + var(--safe-bottom));
}
@media (min-width: 640px) {
  .modal {
    border-radius: var(--r-6);
    animation: scale-in var(--dur-slow) var(--ease-spring) both;
    padding-bottom: var(--sp-6);
  }
}
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 1040px; }
.modal-sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.modal-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.modal-close {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-3);
  color: var(--text-2);
  background: transparent;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.modal-close:hover { background: var(--bg-2); color: var(--text-0); }
.modal-body { color: var(--text-1); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

/* Bottom sheet (mobile-first) */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  /* Overlay translucent: más oscuro en dark, más claro pero aún visible en light */
  background: rgba(5, 7, 14, 0.55);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: fade-in var(--dur-base) var(--ease-out) forwards;
}
.sheet {
  background: var(--bg-1);
  border-top-left-radius: var(--r-7);
  border-top-right-radius: var(--r-7);
  padding: var(--sp-6);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  animation: sheet-up var(--dur-slow) var(--ease-out) forwards;
}
@keyframes sheet-up {
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--r-pill);
  margin: -0.5rem auto var(--sp-4);
}

/* ---------------- Toast ---------------- */
.toast-stack {
  position: fixed;
  top: var(--sp-5);
  right: var(--sp-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 360px;
  pointer-events: none;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
  animation: slide-up var(--dur-slow) var(--ease-spring) both;
  pointer-events: auto;
}
.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-body { flex: 1; }
.toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.danger  .toast-icon { color: var(--danger); }
.toast.info    .toast-icon { color: var(--info); }

/* ---------------- Tabs ---------------- */
.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.tab:hover { color: var(--text-0); }
.tab.active { color: var(--brand-500); border-bottom-color: var(--brand-500); }

.tab-pills {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.tab-pills .tab {
  border: 0;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--r-pill);
}
.tab-pills .tab.active {
  background: var(--bg-1);
  color: var(--text-0);
  box-shadow: var(--shadow-xs);
}

/* ---------------- Chips ---------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4375rem 0.875rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); background: var(--bg-3); transform: translateY(-1px); }
.chip:active { transform: translateY(0); }
.chip:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-color: var(--brand-500); }
.chip[disabled], .chip[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}
.chip .bi { font-size: 0.95rem; flex-shrink: 0; }
.chip.active {
  background: var(--primary-soft);
  border-color: var(--brand-500);
  color: var(--brand-500);
}
/* Primary chip variant — gradient brand fill, used as the main CTA in compact UIs */
.chip.chip-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  border-color: transparent;
  color: #051b13;
  font-weight: 700;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-500) 30%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.18);
}
.chip.chip-primary:hover {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-500));
  border-color: transparent;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-500) 40%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.22);
}
.chip.chip-primary:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 35%, transparent),
              0 4px 12px color-mix(in srgb, var(--brand-500) 30%, transparent);
}

/* ---------------- Empty state ---------------- */
.empty-state {
  text-align: center;
  padding: var(--sp-10) var(--sp-5);
  color: var(--text-2);
}
.empty-state-icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--sp-4);
  background: var(--bg-2);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-2);
}
.empty-state h4 { color: var(--text-0); margin-bottom: var(--sp-2); }

/* ---------------- Skeleton ---------------- */
@keyframes skel-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 200px 100%;
  border-radius: var(--r-3);
  animation: skel-shimmer 1.4s linear infinite;
  display: inline-block;
}

/* ---------------- Dividers ---------------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-5) 0;
}
.divider-v {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ---------------- Rating stars ---------------- */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--warning);
  font-size: var(--fs-base);
}
.stars-readonly { pointer-events: none; }
.star { cursor: pointer; transition: transform var(--dur-fast) var(--ease-out); }
.star:hover { transform: scale(1.1); }

/* ---------------- Tier card ---------------- */
.tier-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-5);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.tier-card:hover { border-color: var(--border-strong); }
.tier-card.active {
  border-color: var(--brand-500);
  background: var(--primary-soft);
}
.tier-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.tier-icon.standard { background: color-mix(in srgb, var(--tier-standard) 16%, var(--bg-3)); color: var(--tier-standard); }
.tier-icon.comfort  { background: color-mix(in srgb, var(--tier-comfort) 16%, var(--bg-3));  color: var(--tier-comfort); }
.tier-icon.xl       { background: color-mix(in srgb, var(--tier-xl) 16%, var(--bg-3));       color: var(--tier-xl); }
.tier-icon.premium  { background: color-mix(in srgb, var(--tier-premium) 16%, var(--bg-3));  color: var(--tier-premium); }
.tier-body { flex: 1; min-width: 0; }
.tier-name { font-weight: 700; font-size: var(--fs-base); }
.tier-meta { font-size: var(--fs-xs); color: var(--text-2); display: flex; gap: var(--sp-3); margin-top: 0.125rem; }
.tier-price { font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------------- Spinner / loader ---------------- */
.spinner-ring,
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }

/* ---------------- Dropdown ---------------- */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-4);
  padding: var(--sp-1);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  display: none;
  animation: fade-in var(--dur-base) var(--ease-out);
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-1);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.dropdown-item:hover { background: var(--bg-3); color: var(--text-0); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-soft); }
.dropdown-divider { height: 1px; background: var(--border); margin: var(--sp-1) 0; }

/* ---------------- Segmented control ---------------- */
.segmented {
  display: inline-flex;
  background: var(--bg-2);
  border-radius: var(--r-3);
  padding: 3px;
  border: 1px solid var(--border);
}
.segmented button {
  padding: 0.4375rem 0.875rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-2);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.segmented button.active {
  background: var(--bg-1);
  color: var(--text-0);
  box-shadow: var(--shadow-xs);
}

/* ---------------- Progress ---------------- */
.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: inherit;
  transition: width var(--dur-slow) var(--ease-out);
}
