/* ============================================================
   AutoMatch Admin Panel — App-Specific Styles
   Bootstrap 5 + Approx-skin covers layout/components.
   This file contains ONLY app-specific overrides and components
   that Bootstrap/Approx does not provide.
   ============================================================ */

/* ── CSS Design Tokens (used by perm-* and custom components) ── */
:root {
  /* Typography */
  --font-sans:            'Inter', system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono:            'Consolas', 'JetBrains Mono', monospace;

  /* Semantic surfaces */
  --bg-app:               #eef1f6;
  --bg-sidebar:             var(--sidebar-bg, #0c1222);
  --bg-header:              #ffffff;
  --bg-card:                #ffffff;
  --bg-card-elevated:       #f8fafc;
  --bg-input:               #ffffff;
  --bg-table-header:        #f1f4f9;

  /* Accent palette */
  --accent-primary:         #2563eb;
  --accent-primary-hover:   #1d4ed8;
  --accent-success:         #059669;
  --accent-success-bg:      rgba(16, 185, 129, 0.12);
  --accent-success-text:    #047857;
  --accent-warning:         #d97706;
  --accent-warning-bg:      rgba(217, 119, 6, 0.12);
  --accent-warning-text:    #92400e;
  --accent-danger:          #dc2626;
  --accent-danger-bg:       rgba(220, 38, 38, 0.12);
  --accent-danger-text:     #991b1b;
  --accent-info-bg:         rgba(59, 130, 246, 0.10);
  --accent-info-text:       #475569;
  --accent-neutral-bg:      rgba(148, 163, 184, 0.12);
  --accent-neutral-text:    #64748b;
  --accent-nav-active:      rgba(37, 99, 235, 0.14);
  --accent-nav-line:        #3b82f6;

  /* Brand — maps to accent */
  --color-primary:          var(--accent-primary);
  --color-primary-hover:    var(--accent-primary-hover);
  --color-primary-light:    rgba(37, 99, 235, 0.10);
  --color-primary-dark:     #1e40af;
  /* Semantic — muted enterprise tones */
  --color-success:          var(--accent-success);
  --color-success-light:    var(--accent-success-bg);
  --color-success-dark:     var(--accent-success-text);
  --color-warning:          var(--accent-warning);
  --color-warning-light:    var(--accent-warning-bg);
  --color-danger:           var(--accent-danger);
  --color-danger-light:     var(--accent-danger-bg);
  --color-danger-hover:     #b91c1c;
  --color-info:             var(--accent-info-text);
  --color-info-light:       var(--accent-info-bg);
  --color-violet:           #6366f1;
  --color-violet-light:     rgba(99, 102, 241, 0.10);
  /* Neutrals — soft gray-blue light theme */
  --color-gray-100:         #f1f4f9;
  --color-gray-200:         #e2e8f0;
  --color-gray-300:         #cbd5e1;
  --color-gray-400:         #94a3b8;
  --color-gray-500:         #64748b;
  --color-gray-600:         #475569;
  --text-primary:           var(--heading-color, #0f172a);
  --text-secondary:         var(--content-color, #475569);
  --text-tertiary:          var(--approx-secondary, #64748b);
  --text-muted:             #64748b;
  --text-inverse:           #ffffff;
  --surface-base:           var(--bg-card);
  --surface-raised:         var(--bg-card-elevated);
  --surface-overlay:        #eef2f7;
  --surface-sunken:         #e8edf4;
  --border-subtle:          #edf1f7;
  --border-default:         rgba(148, 163, 184, 0.22);
  --border-muted:           rgba(148, 163, 184, 0.14);
  --border-strong:          #cbd5e1;
  --shadow-card:            none;
  --shadow-sm:              0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:              0 4px 8px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg:              0 12px 24px -4px rgba(15, 23, 42, 0.08);
  --radius-sm:              4px;
  --radius-md:              6px;
  --radius-lg:              8px;
  --radius-xl:              12px;
  --radius-full:            9999px;
  --transition-fast:        120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:        200ms cubic-bezier(0.4, 0, 0.2, 1);
  --admin-sidebar-width:    var(--sidebar-width, 260px);
  --admin-header-height:    var(--topbar-height, 60px);
  --admin-input-height:     36px;
  --admin-input-height-sm:  32px;
  --admin-table-row-height: 44px;
  --admin-icon-sm:          16px;
  --admin-icon-md:          18px;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --admin-topbar-bg:        var(--bg-header);
  --admin-topbar-border:    var(--border-muted);
  --admin-topbar-icon:      #475569;
  --admin-topbar-icon-hover-bg: #eef2f7;
  --admin-shell-bg:         var(--bg-app);
  --focus-ring:             0 0 0 2px rgba(37, 99, 235, 0.15);
  --z-dropdown:             1050;
  --z-sticky:               1020;
  --z-modal:                1055;
  --z-toast:                9999;
  --bs-dropdown-divider-bg: var(--border-subtle);
}

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-gray-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* ── App-specific utility classes ───────────────────────────── */
.font-mono { font-family: var(--font-mono); }
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.link:hover { color: var(--color-primary-hover); text-decoration: underline; }
.sort-link { color: var(--text-secondary); text-decoration: none; transition: color var(--transition-fast); }
.sort-link:hover { color: var(--color-primary); }

/* ── Form helpers ────────────────────────────────────────────── */
.form-group { margin-bottom: var(--sp-4); }
.form-helper, .form-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.form-label.required::after {
  content: " *";
  color: var(--color-danger);
}
.field-error {
  font-size: 11.5px;
  color: var(--color-danger);
  margin-top: 4px;
}

/* ── Custom Modal Overlay (used by Listings, Logs, Roles pages) ─ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
  z-index: 1055;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  backdrop-filter: blur(1px);
}
.modal-overlay.open { display: flex; }
.modal-overlay .modal {
  background: var(--surface-base);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-default);
  animation: modalOverlayIn 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay .modal-lg  { max-width: 720px; }
.modal-overlay .modal-sm  { max-width: 400px; }
@keyframes modalOverlayIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal-overlay .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}
.modal-overlay .modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-overlay .modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition-fast);
  font-size: 18px;
  line-height: 1;
}
.modal-overlay .modal-close:hover { background: var(--surface-overlay); color: var(--text-primary); }
.modal-overlay .modal-body {
  padding: var(--sp-5);
  overflow-y: auto;
  flex: 1;
}
.modal-overlay .modal-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* ── Custom Toast (showToast in admin.js) ─────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 360px;
}
.toast-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-gray-500);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: toastIn 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast-item.toast-success { background: var(--color-success-dark); }
.toast-item.toast-danger  { background: var(--color-danger); }
.toast-item.toast-warning { background: var(--color-warning); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Custom Tab System (used in Subscriptions/Details, Plans/Details) */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-default);
  gap: 0;
  overflow-x: auto;
  flex-shrink: 0;
}
.tab-item {
  padding: 10px var(--sp-5);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-btn:hover { background: var(--surface-overlay); color: var(--text-primary); }
.tab-btn.active { background: var(--color-primary); color: var(--text-inverse); border-color: var(--color-primary); }

/* ── Avatar Component ────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-sm  { width: 28px; height: 28px; font-size: 11px; }
.avatar-md  { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 16px; }
.avatar-xl  { width: 64px; height: 64px; font-size: 20px; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  text-align: center;
  color: var(--text-tertiary);
}
.empty-state-icon {
  width: 48px; height: 48px;
  margin-bottom: var(--sp-4);
  opacity: 0.4;
}
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}
.empty-state-text {
  font-size: 13px;
  color: var(--text-tertiary);
  max-width: 320px;
  margin-bottom: var(--sp-4);
}
.empty-state-inline {
  padding: var(--sp-4);
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-default);
}

/* ── Loading Skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
  background-size: 400% 100%;
  animation: skeletonLoad 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeletonLoad {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Subscriptions Index ─────────────────────────────────────── */
.subscriptions-index-subtitle {
  font-size: 13px;
  max-width: 42rem;
  line-height: 1.45;
}
.subscriptions-kpi-row {
  align-items: stretch;
}
.subscriptions-kpi-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}
.subscriptions-kpi-row .subscription-kpi-card {
  flex: 1 1 auto;
  width: 100%;
}
.subscriptions-kpi-row .mini-stat {
  height: auto;
}
.subscription-kpi-card {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid var(--border-subtle);
}
.subscription-kpi-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}
.subscription-kpi-card--active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.subscription-details-listing-kpi .card {
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.subscription-details-listing-kpi .card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-sm);
}
.subscriptions-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.subscriptions-table-wrap .dropdown-menu {
  z-index: 1060;
}

.users-index-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.users-index-table-wrap .dropdown-menu {
  z-index: 1060;
}

.users-index-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised);
  box-shadow: 0 1px 0 var(--border-default);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.users-index-table tbody td {
  vertical-align: middle;
}

.subscriptions-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-raised);
  box-shadow: 0 1px 0 var(--border-default);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.subscriptions-table tbody td {
  vertical-align: middle;
}

/* ── Subscription Detail Styles ──────────────────────────────── */
.sub-plan-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.sub-plan-link:hover .sub-plan-name { color: var(--color-primary); text-decoration: underline; }
.sub-plan-name { font-size: 16px; font-weight: 600; color: var(--text-primary); transition: color var(--transition-fast); }
.sub-plan-chevron { color: var(--text-tertiary); font-size: 18px; }

.sub-kpi {
  padding: 10px 12px;
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.sub-kpi-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); margin-bottom: 2px; }
.sub-kpi-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.sub-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
  padding: var(--sp-4);
}
.sub-usage-item {
  padding: var(--sp-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-base);
}

/* ── Custom Progress Bars ────────────────────────────────────── */
.progress-bar-track {
  height: 6px;
  background: var(--color-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}
.progress-bar-fill.success { background: var(--color-success); }
.progress-bar-fill.warning { background: var(--color-warning); }
.progress-bar-fill.danger  { background: var(--color-danger); }

/* ── Activity Timeline ───────────────────────────────────────── */
.activity-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.activity-timeline-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}
.activity-timeline-item:last-child { border-bottom: none; }
.activity-timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-timeline-dot.dot-blue   { background: var(--color-primary); }
.activity-timeline-dot.dot-purple { background: #7c3aed; }
.activity-timeline-dot.dot-green  { background: var(--color-success); }
.activity-timeline-dot.dot-orange { background: #ea580c; }
.activity-timeline-dot.dot-yellow { background: var(--color-warning); }
.activity-timeline-dot.dot-gray   { background: var(--color-gray-400); }
.activity-timeline-content { flex: 1; min-width: 0; }

/* ── Toggle Switch ───────────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.toggle-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  display: inline-block;
  width: 36px; height: 20px;
  background: var(--color-gray-300);
  border-radius: 9999px;
  transition: background 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(16px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ── Chart Container ─────────────────────────────────────────── */
.chart-container { position: relative; }
.chart-container canvas { max-height: 300px; }

/* ── Notification Dropdown ───────────────────────────────────── */
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
}
.notif-item:hover { background: var(--surface-raised); }
.notif-item.unread { background: var(--color-primary-light); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--color-primary) 18%, var(--surface-raised)); }
.notif-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.notif-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.notif-body  { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.notif-time  { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ── Roles & Permissions Matrix (perm-matrix.js dependencies) ── */
.perm-matrix { padding-bottom: 80px; }

.perm-view-toggle {
  display: inline-flex;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
}
.perm-view-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.perm-view-btn:hover { color: var(--text-primary); background: var(--surface-raised); }
.perm-view-btn.active { background: var(--color-primary); color: var(--text-inverse); }

.perm-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.perm-role-card {
  text-align: left;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--sp-4);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  box-shadow: none;
}
.perm-role-card:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.perm-role-card.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.perm-role-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.perm-role-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.perm-role-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: var(--sp-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.perm-role-stats { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.perm-role-count { color: var(--text-secondary); font-weight: 500; }
.perm-role-critical { color: var(--color-danger); font-weight: 500; }

.perm-admin-notice {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent-info-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.perm-summary-grid { margin-bottom: var(--sp-4); }

.perm-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.perm-toolbar-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.perm-search-wrap { flex: 1; min-width: 200px; position: relative; display: flex; align-items: center; }
.perm-search-wrap svg { position: absolute; left: 10px; color: var(--text-tertiary); pointer-events: none; }
.perm-search-wrap .form-control { padding-left: 34px; }
.perm-filter-select { min-width: 140px; max-width: 180px; }
.perm-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chip {
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--surface-base);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.perm-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.perm-chip.active { background: var(--color-primary-light); border-color: var(--color-primary); color: var(--color-primary-dark); }
.perm-toolbar-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--border-subtle); }

.perm-groups { display: flex; flex-direction: column; gap: var(--sp-3); }
.perm-group { overflow: hidden; }
.perm-group.collapsed .perm-group-body { display: none; }
.perm-group.collapsed .perm-group-toggle svg { transform: rotate(-90deg); }
.perm-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4);
  cursor: pointer;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}
.perm-group-header-left { display: flex; align-items: flex-start; gap: var(--sp-3); min-width: 0; }
.perm-group-icon { font-size: 20px; line-height: 1; flex-shrink: 0; color: var(--admin-text-secondary, #64748b); }
.perm-group-icon i { font-size: 1.1em; line-height: 1; }
.perm-group-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.perm-group-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.perm-group-header-right { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }
.perm-group-count { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }
.perm-group-progress { width: 60px; height: 4px; background: var(--border-default); border-radius: var(--radius-full); overflow: hidden; }
.perm-group-progress-bar { height: 100%; background: var(--color-primary); border-radius: var(--radius-full); transition: width var(--transition-base); width: 0; }
.perm-group-toggle { border: none; background: transparent; padding: 4px; cursor: pointer; color: var(--text-tertiary); display: flex; align-items: center; }
.perm-group-toggle svg { transition: transform var(--transition-fast); }
.perm-group-body { padding: var(--sp-4); }

.perm-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }
.perm-item { border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--sp-3); transition: border-color var(--transition-fast), background var(--transition-fast); }
.perm-item:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.perm-item-enabled { border-color: rgba(37,99,235,.25); }
.perm-item-added { border-color: var(--color-success); background: var(--color-success-light); }
.perm-item-removed { border-color: var(--color-danger); background: var(--color-danger-light); opacity: .85; }
.perm-item-label { display: flex; gap: var(--sp-3); cursor: pointer; align-items: flex-start; }
.perm-item-label input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--color-primary); flex-shrink: 0; }
.perm-item-content { min-width: 0; flex: 1; }
.perm-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.perm-item-explanation { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.perm-item-key { font-size: 11px; font-family: var(--font-mono); color: var(--text-tertiary); margin-top: 4px; }
.perm-item-badges { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

.perm-matrix-table-wrap { overflow: hidden; }
.perm-matrix-table { min-width: 600px; }
.perm-matrix-sticky-col { position: sticky; left: 0; background: var(--surface-base); z-index: 2; min-width: 220px; box-shadow: 2px 0 4px rgba(0,0,0,.04); }
.perm-matrix-role-col { text-align: center; min-width: 80px; }
.perm-matrix-perm-name { font-size: 13px; font-weight: 500; }
.perm-matrix-perm-key { font-size: 11px; font-family: var(--font-mono); color: var(--text-tertiary); }
.perm-matrix-cell { text-align: center; }
.perm-matrix-check { color: var(--color-success); font-weight: 700; }
.perm-matrix-dash { color: var(--text-tertiary); }
.perm-matrix-changed { background: var(--color-warning-light); }

.perm-save-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  background: var(--surface-base);
  border-top: 1px solid var(--border-default);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  z-index: 50;
}
.perm-save-bar-info { font-size: 13px; color: var(--text-secondary); }
.perm-save-bar-diff { font-size: 12px; color: var(--text-tertiary); margin-left: var(--sp-2); }
.perm-save-bar-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

.perm-review-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.perm-review-list li { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.perm-review-list li:last-child { border-bottom: none; }

.perm-critical-warning { display: flex; gap: var(--sp-3); padding: var(--sp-3); background: var(--color-warning-light); border-radius: var(--radius-lg); margin-bottom: var(--sp-4); font-size: 13px; color: var(--text-secondary); }
.perm-critical-warning svg { color: var(--color-warning); flex-shrink: 0; }
.perm-critical-details { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); font-size: 13px; }
.perm-critical-details dt { color: var(--text-tertiary); font-weight: 500; }
.perm-critical-details dd { color: var(--text-primary); font-weight: 500; margin: 0; }

.perm-skeleton { padding: var(--sp-4); }
.perm-skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, var(--border-subtle) 25%, var(--border-default) 50%, var(--border-subtle) 75%);
  background-size: 200% 100%;
  animation: permShimmer 1.2s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-2);
}
@keyframes permShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Searchable filter dropdown ─────────────────────────────── */
.admin-search-select {
  position: relative;
  z-index: 1;
}

.admin-search-select.show,
.admin-search-select:has(.dropdown-menu.show) {
  z-index: 1060;
}

.admin-search-select-menu {
  width: auto;
  min-width: 0;
  max-width: none;
  max-height: 280px;
  z-index: 1060 !important;
  box-sizing: border-box;
}

.admin-search-select-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-search-select-list {
  max-height: 200px;
  overflow-y: auto;
}

.admin-search-select-option {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: var(--radius-md, 6px);
  padding: 6px 8px;
  font-size: 13px;
  color: inherit;
}

.admin-search-select-option:hover,
.admin-search-select-option:focus-visible {
  background: #f1f5f9;
  outline: none;
}

.admin-search-select-empty {
  font-size: 12px;
}

/* ── Server / client validation focus ───────────────────────── */
.input-validation-error,
.form-control.input-validation-error,
.form-select.input-validation-error {
  border-color: #dc2626 !important;
}

.admin-search-select:has(input.input-validation-error) .admin-search-select-toggle {
  border-color: #dc2626 !important;
}

.is-validation-focused {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.field-validation-error,
.invalid-feedback.field-validation-error {
  display: block;
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .perm-save-bar { left: 0; }
  .perm-items-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .perm-role-grid { grid-template-columns: 1fr; }
  .perm-toolbar-row { flex-direction: column; align-items: stretch; }
  .perm-filter-select { max-width: none; }
  .perm-group-header { flex-direction: column; align-items: flex-start; }
  .perm-group-header-right { flex-wrap: wrap; width: 100%; }
  .perm-items-grid { grid-template-columns: 1fr; }
  .perm-save-bar { flex-direction: column; align-items: stretch; padding: var(--sp-3) var(--sp-4); }
  .perm-save-bar-actions { justify-content: flex-end; }
  .sub-usage-grid { grid-template-columns: 1fr; }
}

/* ── Form select chevron (RTL-safe; approx-skin uses symmetric padding) ── */
.form-select {
  padding-block: 7px;
  padding-inline-start: 12px;
  padding-inline-end: 2.25rem;
  background-position: right 0.75rem center;
}

.form-select-sm {
  padding-block: 5px;
  padding-inline-start: 10px;
  padding-inline-end: 1.75rem;
  background-position: right 0.5rem center;
}

html[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
}

html[dir="rtl"] .form-select-sm {
  background-position: left 0.5rem center;
}

/* Number inputs — spinner theme + RTL placement */
html:not([data-theme="dark"]) input[type="number"].form-control {
  color-scheme: light;
}

html[data-theme="dark"] input[type="number"].form-control {
  color-scheme: dark;
}

input[type="number"].form-control:not([dir="rtl"]) {
  direction: ltr;
  text-align: start;
}

html[dir="rtl"] input[type="number"].form-control:not([dir="rtl"]) {
  text-align: end;
}

input[type="number"].form-control::-webkit-inner-spin-button,
input[type="number"].form-control::-webkit-outer-spin-button {
  opacity: 1;
  height: 1.25em;
}

/* Searchable filter toggle uses .form-select background chevron */
html[dir="rtl"] .admin-search-select-toggle {
  text-align: right;
}

/* ── RTL (Arabic) layout ─────────────────────────────────────── */
html[dir="rtl"] body {
  font-family: "Noto Sans Arabic", var(--font-sans);
}

html[dir="rtl"] .vertical-menu {
  left: auto;
  right: 0;
}

html[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

html[dir="rtl"] #page-topbar {
  left: 0;
  right: var(--sidebar-width);
}

html[dir="rtl"] .navbar-brand-box {
  left: auto;
  right: 0;
}

html[dir="rtl"] #sidebar-menu ul li.mm-active > a::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0.5rem;
  padding-right: 0;
  content: '‹';
}

/* Mirror horizontal directional icons for RTL reading flow */
html[dir="rtl"] i[class*="ri-arrow-left-"],
html[dir="rtl"] i[class*="ri-arrow-right-"] {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .sub-plan-chevron {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .text-sm-end {
  text-align: start !important;
}

html[dir="rtl"] .dropdown-menu-end {
  --bs-position: start;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .vertical-menu {
    left: auto;
    right: -260px;
  }

  html[dir="rtl"] .vertical-menu.show {
    right: 0;
  }

  html[dir="rtl"] .main-content {
    margin-right: 0 !important;
  }

  html[dir="rtl"] #page-topbar {
    right: 0;
  }
}

@media (min-width: 992px) {
  html[dir="rtl"] body.sidebar-collapsed .main-content {
    margin-right: var(--sidebar-mini-width);
    margin-left: 0;
  }

  html[dir="rtl"] body.sidebar-collapsed #page-topbar {
    right: var(--sidebar-mini-width);
  }
}

/* Final shell alignment after app-specific rules. */
#page-topbar {
  left: var(--sidebar-width);
  right: 0;
}

html[dir="rtl"] #page-topbar {
  left: 0;
  right: var(--sidebar-width);
}

html[dir="rtl"] .navbar-brand-box {
  left: auto;
  right: 0;
}

@media (min-width: 992px) {
  body.sidebar-collapsed #page-topbar {
    left: var(--sidebar-mini-width);
  }

  html[dir="rtl"] body.sidebar-collapsed #page-topbar {
    left: 0;
    right: var(--sidebar-mini-width);
  }
}

@media (max-width: 991.98px) {
  #page-topbar,
  html[dir="rtl"] #page-topbar {
    left: 0;
    right: 0;
  }

  html[dir="rtl"] .vertical-menu {
    left: auto;
    right: calc(-1 * var(--sidebar-width));
  }

  html[dir="rtl"] .vertical-menu.show {
    right: 0;
  }
}

/* ── Language toggle (EN / AR) — pill slider ─────────────────── */
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: auto;
  min-width: 8.75rem;
  height: 34px;
  padding: 2px;
  border-radius: var(--radius-full);
  background: var(--surface-overlay);
  border: 1px solid var(--border-default);
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
}

.lang-toggle__indicator {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: calc(50% - 2px);
  inset-inline-start: 2px;
  border-radius: var(--radius-full);
  background: var(--surface-base);
  box-shadow: var(--shadow-sm);
  transition: inset-inline-start var(--transition-base), background var(--transition-base);
  z-index: 0;
  pointer-events: none;
}

.lang-toggle--ar .lang-toggle__indicator {
  inset-inline-start: calc(50%);
}

.lang-toggle__option {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.lang-toggle__option:hover:not(.is-active) {
  color: var(--text-secondary);
}

.lang-toggle__option.is-active {
  color: var(--text-primary);
  pointer-events: none;
}

html:not([data-theme="dark"]) .lang-toggle {
  background: #e8edf4;
  border-color: #dde4ee;
}

html:not([data-theme="dark"]) .lang-toggle__indicator {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .lang-toggle__option.is-active {
  color: #0f172a !important;
}

html:not([data-theme="dark"]) .lang-toggle__option:not(.is-active) {
  color: #64748b;
}

html:not([data-theme="dark"]) .theme-toggle {
  background: #ffffff;
  border-color: #dde4ee;
  color: #475569;
}

html:not([data-theme="dark"]) .theme-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.auth-header .lang-toggle {
  background: #e8edf4;
  border: 1px solid #dde4ee;
}

.auth-header .theme-toggle {
  background: #ffffff;
  border-color: #dde4ee;
  color: #475569;
}

html[data-theme="dark"] .auth-header .lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .auth-header .theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

.lang-toggle--page {
  margin: 0;
}

.lang-toggle--header {
  margin-inline-end: var(--sp-1);
}

/* ── Theme toggle — circular icon button ─────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  background: var(--surface-base);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface-overlay);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.theme-toggle__icon {
  font-size: 18px;
  line-height: 1;
}

.theme-toggle__icon--dark { display: none; }

html[data-theme="dark"] .theme-toggle__icon--light { display: none; }
html[data-theme="dark"] .theme-toggle__icon--dark { display: inline; }

.topbar-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.topbar-controls .lang-toggle {
  flex: 0 0 auto;
  width: auto;
  min-width: 8.75rem;
  height: 34px;
  margin-inline-end: 0;
}

.topbar-controls .theme-toggle,
.topbar-controls .dropdown:not(.user-dropdown) > .header-item {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: 50%;
}

.topbar-user-meta {
  max-width: 130px;
}

.topbar-user-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user-role {
  font-size: 11px;
  color: var(--text-tertiary);
}

.topbar-user-chevron {
  color: var(--text-tertiary);
  font-size: 14px;
}

.topbar-controls .dropdown:not(.user-dropdown) > .header-item {
  margin: 0;
}

html[data-theme="dark"] .topbar-controls .dropdown:not(.user-dropdown) > .header-item {
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .topbar-controls .dropdown:not(.user-dropdown) > .header-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ── Color scheme: match active theme for native form controls ─ */
html:not([data-theme="dark"]) {
  color-scheme: light;
}

/* ── Admin dark theme (topbar + shell) ───────────────────────── */
html[data-theme="dark"] {
  color-scheme: dark;
  /* Enterprise navy/charcoal layered surfaces */
  --bg-app:                #0b1120;
  --bg-sidebar:            #08111f;
  --bg-header:             #0f172a;
  --bg-card:               #111827;
  --bg-card-elevated:      #162033;
  --bg-input:              #151f31;
  --bg-table-header:       #182235;
  --admin-topbar-bg:       var(--bg-header);
  --admin-topbar-border:   rgba(148, 163, 184, 0.14);
  --admin-topbar-icon:     #94a3b8;
  --admin-topbar-icon-hover-bg: rgba(148, 163, 184, 0.08);
  --admin-shell-bg:        var(--bg-app);
  --surface-base:          var(--bg-card);
  --surface-raised:        var(--bg-card-elevated);
  --surface-overlay:       #1c2336;
  --surface-sunken:        #070b14;
  --text-primary:          #e5e7eb;
  --text-secondary:        #aab4c5;
  --text-tertiary:         #718096;
  --text-muted:            #718096;
  --border-default:        rgba(148, 163, 184, 0.14);
  --border-muted:          rgba(148, 163, 184, 0.10);
  --border-subtle:         rgba(148, 163, 184, 0.08);
  --border-strong:         rgba(148, 163, 184, 0.22);
  --shadow-card:           none;
  --shadow-md:             0 4px 12px rgba(0, 0, 0, 0.20);
  --shadow-lg:             0 12px 28px rgba(0, 0, 0, 0.28);
  --color-primary:         #2563eb;
  --color-primary-hover:   #1d4ed8;
  --color-primary-light:   rgba(37, 99, 235, 0.14);
  --color-primary-dark:    #7da2ff;
  --accent-success-text:   #10b981;
  --accent-info-text:      #93c5fd;
  --color-success-light:   rgba(16, 185, 129, 0.12);
  --color-success-dark:    #10b981;
  --color-warning-light:   rgba(217, 119, 6, 0.12);
  --color-danger-light:    rgba(220, 38, 38, 0.12);
  --color-info-light:      rgba(59, 130, 246, 0.10);
  --color-violet-light:    rgba(99, 102, 241, 0.10);
  --color-gray-100:        #162033;
  --color-gray-200:        #1c2336;
  --color-gray-300:        #2a3348;
  --focus-ring:            0 0 0 2px rgba(37, 99, 235, 0.15);
  /* approx-skin token bridge */
  --body-bg:               var(--bg-app);
  --card-bg:               var(--bg-card);
  --card-border:           var(--border-default);
  --heading-color:         var(--text-primary);
  --content-color:         var(--text-secondary);
  --input-border:          rgba(148, 163, 184, 0.18);
  --approx-secondary:      var(--text-tertiary);
  --sidebar-bg:            var(--bg-sidebar);
  --sidebar-item-color:    #94a3b8;
  --sidebar-item-hover-bg: rgba(148, 163, 184, 0.06);
  --sidebar-item-active-bg: var(--accent-nav-active);
  --sidebar-item-active-color: #dcebff;
  --sidebar-section-color: #64748b;
  --table-head-bg:         var(--bg-table-header);
  --table-row-hover-bg:    rgba(255, 255, 255, 0.025);
  --table-cell-border:     rgba(148, 163, 184, 0.10);
  --table-text:            var(--text-secondary);
  --section-divider:       rgba(148, 163, 184, 0.10);
  --btn-light-bg:          #151f31;
  --btn-light-border:      rgba(148, 163, 184, 0.14);
  --btn-light-text:        var(--text-secondary);
  --btn-light-hover-bg:    #1c2336;
  --muted-text:            var(--text-tertiary);
  --empty-icon-bg:         #162033;
  --input-group-bg:        #151f31;
  --bs-dropdown-divider-bg: var(--border-subtle);
}

html[data-theme="dark"] body:not(.auth-body) {
  background: var(--admin-shell-bg) !important;
  color: var(--text-secondary);
}

html[data-theme="dark"] #page-topbar {
  background-color: var(--admin-topbar-bg) !important;
  border-bottom-color: var(--admin-topbar-border) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #vertical-menu-btn,
html[data-theme="dark"] .header-item {
  color: var(--admin-topbar-icon);
}

html[data-theme="dark"] #vertical-menu-btn:hover,
html[data-theme="dark"] .header-item:hover {
  color: #f8fafc;
  background: var(--admin-topbar-icon-hover-bg);
}

html[data-theme="dark"] .app-search-box input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

html[data-theme="dark"] .app-search-box input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .app-search-box .search-icon {
  color: #94a3b8;
}

html[data-theme="dark"] .lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .lang-toggle__indicator {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

html[data-theme="dark"] .lang-toggle__option {
  color: #94a3b8;
}

html[data-theme="dark"] .lang-toggle__option:hover:not(.is-active) {
  color: #cbd5e1;
}

html[data-theme="dark"] .lang-toggle__option.is-active {
  color: #ffffff !important;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

html[data-theme="dark"] .header-item .notif-badge {
  background: #f59e0b;
  color: #111827;
}

html[data-theme="dark"] .user-dropdown .header-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 40px;
  padding-inline: 10px;
}

html[data-theme="dark"] .page-content,
html[data-theme="dark"] .main-content {
  background: var(--admin-shell-bg);
}

html[data-theme="dark"] .card {
  background: var(--surface-base);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

html[data-theme="dark"] .page-title-box {
  color: inherit;
}

html[data-theme="dark"] .dropdown-menu {
  background: var(--surface-base);
  border-color: var(--border-default);
}

html[data-theme="dark"] .dropdown-item {
  color: #e5e7eb;
}

html[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

html[data-theme="dark"] .dropdown-divider {
  border-color: var(--border-subtle);
  border-top-color: var(--border-subtle);
  --bs-dropdown-divider-bg: var(--border-subtle);
}

html[data-theme="dark"] .footer {
  background: var(--surface-base);
  border-color: var(--border-default);
  color: var(--text-tertiary);
}

/* ── Dark theme — global typography & Bootstrap bridge ───────── */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: var(--text-primary);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary {
  color: var(--text-tertiary) !important;
}

html[data-theme="dark"] .text-body {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-light-subtle,
html[data-theme="dark"] .table-light {
  --bs-table-bg: var(--table-head-bg);
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--table-cell-border);
  --bs-table-striped-bg: var(--surface-raised);
  --bs-table-hover-bg: var(--table-row-hover-bg);
  background-color: var(--surface-raised) !important;
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .badge.bg-light {
  background-color: var(--surface-raised) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-default) !important;
}

html[data-theme="dark"] .card-header.bg-light {
  background-color: var(--card-bg) !important;
}

html[data-theme="dark"] .alert-info {
  background: var(--accent-info-bg);
  border-color: rgba(59, 130, 246, 0.22);
  color: var(--accent-info-text);
}

html[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--table-text);
  --bs-table-border-color: var(--table-cell-border);
  --bs-table-hover-bg: var(--table-row-hover-bg);
  color: var(--table-text);
}

html[data-theme="dark"] .table thead th {
  background: var(--table-head-bg);
  color: var(--text-secondary);
  border-color: var(--table-cell-border) !important;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  border-color: var(--table-cell-border);
  color: var(--table-text);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: var(--surface-raised);
  border-color: var(--input-border);
  color: var(--text-primary);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: var(--surface-overlay);
  border-color: rgba(37, 99, 235, 0.5);
  color: var(--text-primary);
}

html[data-theme="dark"] .form-control::placeholder {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .input-group-text {
  background: var(--input-group-bg);
  border-color: var(--input-border);
  color: var(--text-tertiary);
}

html[data-theme="dark"] .btn-light {
  background-color: var(--btn-light-bg);
  border-color: var(--btn-light-border);
  color: var(--btn-light-text);
}

html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-light:focus {
  background-color: var(--btn-light-hover-bg);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

html[data-theme="dark"] .btn-icon:hover {
  background: var(--surface-overlay);
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer {
  background: var(--card-bg);
  border-color: var(--section-divider);
}

html[data-theme="dark"] .mini-stat {
  background: var(--card-bg);
  border-color: var(--card-border);
}

html[data-theme="dark"] .mini-stat-value {
  color: var(--text-primary);
}

html[data-theme="dark"] .mini-stat-label {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .page-title-box h4 {
  color: var(--text-primary);
}

html[data-theme="dark"] .breadcrumb-item a {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .breadcrumb-item.active {
  color: var(--text-secondary);
}

html[data-theme="dark"] .page-link {
  background: var(--surface-raised);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

html[data-theme="dark"] .page-item.disabled .page-link {
  background: var(--surface-base);
  color: var(--text-tertiary);
}

html[data-theme="dark"] .nav-tabs {
  border-color: var(--section-divider);
}

html[data-theme="dark"] .nav-tabs .nav-link {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .nav-tabs .nav-link:hover,
html[data-theme="dark"] .nav-tabs .nav-link.active {
  color: var(--color-primary);
}

html[data-theme="dark"] .modal-content {
  background: var(--surface-base);
  border-color: var(--border-default);
  color: var(--text-primary);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--border-default);
}

html[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-theme="dark"] .profile-view-only-banner {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--text-secondary);
}

html[data-theme="dark"] .profile-view-only-banner .text-secondary {
  color: var(--text-secondary) !important;
}

html[data-theme="dark"] .payments-balance-card {
  background: var(--bg-card-elevated);
  border-color: var(--border-default);
}

html[data-theme="dark"] .empty-state-icon {
  background: var(--empty-icon-bg);
  color: var(--text-tertiary);
}

html[data-theme="dark"] .empty-state h5,
html[data-theme="dark"] .empty-state-title {
  color: var(--text-primary);
}

html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] .empty-state-text {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
}

html[data-theme="dark"] .topbar-user-role,
html[data-theme="dark"] .topbar-user-chevron {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .form-section-title {
  border-color: var(--section-divider);
  color: var(--text-tertiary);
}

html[data-theme="dark"] .alert {
  border-color: var(--border-default);
}

html[data-theme="dark"] .notify-item {
  border-color: var(--border-subtle);
}

html[data-theme="dark"] .notify-item:hover {
  background: var(--surface-raised);
}

html[data-theme="dark"] .notify-item.unread {
  background: var(--color-primary-light);
}

html[data-theme="dark"] .notify-item.unread:hover {
  background: color-mix(in srgb, var(--color-primary) 22%, var(--surface-raised));
}

html[data-theme="dark"] .notify-details h6 {
  color: var(--text-primary);
}

html[data-theme="dark"] .notify-details p,
html[data-theme="dark"] .notify-time {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .notification-dropdown .dropdown-header,
html[data-theme="dark"] .notification-dropdown .dropdown-footer,
html[data-theme="dark"] .user-menu-header {
  border-color: var(--border-subtle);
}

html[data-theme="dark"] .notification-dropdown .dropdown-header h6,
html[data-theme="dark"] .user-menu-header .user-name {
  color: var(--text-primary);
}

html[data-theme="dark"] .app-search-box input {
  background: var(--surface-raised);
  border-color: var(--border-default);
  color: var(--text-primary);
}

html[data-theme="dark"] .app-search-box input:focus {
  background: var(--surface-overlay);
}

html[data-theme="dark"] .app-search-box .search-icon {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .header-item {
  color: var(--admin-topbar-icon);
}

html[data-theme="dark"] .activity-feed li {
  border-color: var(--border-subtle);
}

html[data-theme="dark"] .activity-action,
html[data-theme="dark"] .activity-title {
  color: var(--text-primary);
}

html[data-theme="dark"] .activity-meta {
  color: var(--text-tertiary);
}

html[data-theme="dark"] .pm-group-header {
  background: var(--table-head-bg);
  color: var(--text-primary);
}

html[data-theme="dark"] .pm-group-header:hover {
  background: var(--surface-overlay);
}

html[data-theme="dark"] code {
  color: var(--text-tertiary);
}

/* ── Shared utility classes (theme-aware) ───────────────────── */
.table-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.table-meta-nowrap {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.table-cell-sub {
  font-size: 12.5px;
  color: var(--content-color);
}

.table-cell-truncate {
  font-size: 13px;
  color: var(--text-tertiary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-cell-caption {
  font-size: 12px;
  color: var(--text-tertiary);
}

.code-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

.input-hint-text {
  font-size: 10px;
  color: var(--text-tertiary);
}

.thumb-placeholder {
  background: var(--surface-overlay);
}

.thumb-placeholder--md {
  width: 56px;
  height: 42px;
  object-fit: cover;
  display: block;
}

.lookup-icon-fallback {
  width: 32px;
  height: 32px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.lookup-tile-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 20px;
}

.map-canvas-placeholder {
  height: 320px;
  min-height: 320px;
  background: var(--surface-overlay);
}

.map-canvas-placeholder--sm {
  height: 220px;
  min-height: 220px;
  background: var(--surface-overlay);
}

.notif-empty-icon {
  font-size: 32px;
  color: var(--border-strong);
  margin-bottom: 10px;
}

.notif-empty-text {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.buyer-plan-banner {
  background: var(--color-primary-light);
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--border-default));
  color: var(--color-primary-dark);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

html[data-theme="dark"] .buyer-plan-banner {
  color: var(--text-primary);
}

.sidebar-logout-icon {
  color: var(--text-tertiary);
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0.65;
}

.standalone-page {
  background: var(--admin-shell-bg, #f5f7fb);
  font-family: var(--font-sans);
}

.standalone-page__inner {
  max-width: 480px;
  padding: 40px 20px;
}

.standalone-page__icon-wrap {
  width: 72px;
  height: 72px;
}

.standalone-page__icon {
  font-size: 32px;
}

.standalone-page__title {
  color: var(--text-primary);
}

.standalone-page__desc {
  font-size: 14px;
  line-height: 1.6;
}

.preview-sticky {
  position: sticky;
  top: 80px;
}

.push-preview-device {
  max-width: 280px;
  margin-inline: auto;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 12px;
}

.push-preview-statusbar {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 8px;
  color: #888;
  font-size: 10px;
}

.push-preview-card {
  background: #2a2a2a;
  border-radius: 14px;
  padding: 12px;
}

.push-preview-app-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.push-preview-app-icon {
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  font-size: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.push-preview-app-name {
  color: #888;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.push-preview-title {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.push-preview-body {
  color: #aaa;
  font-size: 11px;
  line-height: 1.5;
}

.push-preview-image {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.inapp-preview-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--color-primary);
  font-size: 14px;
}

.inapp-preview-title {
  font-weight: 600;
  font-size: 13px;
}

.inapp-preview-body {
  font-size: 12px;
  margin-top: 2px;
}

/* Listing details — statistics dashboard */
.listing-stats-dashboard .card-header {
  padding-block: var(--sp-3);
}

.listing-stats-period {
  font-size: 12px;
  color: var(--text-tertiary);
}

.listing-stats-chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.listing-stats-conversion {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.listing-stats-conversion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: var(--sp-2);
  align-items: center;
  font-size: 12px;
}

.listing-stats-conversion-label {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-stats-conversion-value {
  font-weight: 600;
  text-align: end;
  color: var(--text-primary);
}

.listing-stats-conversion-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface-overlay);
  overflow: hidden;
}

.listing-stats-conversion-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
  max-width: 100%;
}

.listing-stats-swipe-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.listing-stats-swipe-pill {
  flex: 1 1 0;
  min-width: 72px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-base);
  text-align: center;
}

.listing-stats-swipe-pill .value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.listing-stats-swipe-pill .label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.listing-stats-swipe-pill.is-like .value { color: var(--color-success); }
.listing-stats-swipe-pill.is-pass .value { color: var(--text-tertiary); }
.listing-stats-swipe-pill.is-super .value { color: #7c3aed; }

.listing-stats-empty-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-default);
  margin-bottom: var(--sp-3);
}

/* Plans index — opaque popular badge straddling card top border */
.plan-popular-badge {
  background: var(--surface-base, #ffffff) !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
  box-shadow: none;
  font-weight: 600;
  z-index: 2;
}

/* Listings index — dense operations table */
.listing-index-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.listing-index-table-wrap .dropdown-menu {
  z-index: 1060;
}

.listing-index-table {
  font-size: 13px;
}

.listing-index-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 600;
}

.listing-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.listing-sort-link:hover {
  color: var(--color-primary);
}

.listing-cell-sub {
  font-size: 11px;
  line-height: 1.35;
}

.listing-col-id { min-width: 64px; }
.listing-col-image { width: 64px; }
.listing-col-vehicle { min-width: 140px; }
.listing-col-mileage { min-width: 72px; }
.listing-col-price { min-width: 88px; }
.listing-col-status { min-width: 108px; }
.listing-col-seller { min-width: 120px; }
.listing-col-location { min-width: 120px; max-width: 180px; }
.listing-col-views { min-width: 56px; }
.listing-col-date { min-width: 96px; }
.listing-col-actions { width: 72px; }

.listing-location-cell {
  display: block;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* ── User profile page (Approx profile layout) ─────────────── */
.user-profile-layout {
  --profile-cover-h: 120px;
  --profile-avatar-size: 88px;
}

.user-profile-card {
  overflow: hidden;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-card);
}

.user-profile-cover {
  height: var(--profile-cover-h);
  background: var(--bg-card-elevated);
  border-bottom: 1px solid var(--border-default);
  position: relative;
}

.user-profile-cover::after {
  display: none;
}

.user-profile-body {
  padding: 0 var(--sp-5) var(--sp-5);
  margin-top: calc(var(--profile-avatar-size) / -2);
  text-align: center;
}

.user-profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--sp-3);
}

.user-profile-avatar {
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--surface-base);
  box-shadow: var(--shadow-md);
  background: var(--surface-raised);
}

.user-profile-avatar.is-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.user-profile-avatar.is-placeholder i {
  font-size: 36px;
  line-height: 1;
}

.user-profile-flag {
  position: absolute;
  bottom: 4px;
  inset-inline-end: 4px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-base);
  background: var(--surface-base);
  font-size: 10px;
  line-height: 18px;
  color: var(--text-secondary);
}

.user-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2px;
  line-height: 1.3;
}

.user-profile-handle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-3);
}

.user-profile-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: var(--sp-4);
}

.user-profile-contact {
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  text-align: start;
}

.user-profile-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.user-profile-contact li:last-child { border-bottom: 0; }

.user-profile-contact i {
  font-size: 15px;
  color: var(--text-tertiary);
  margin-top: 1px;
  flex-shrink: 0;
}

.user-profile-contact a {
  color: var(--color-primary);
  text-decoration: none;
  word-break: break-all;
}

.user-profile-contact a:hover { text-decoration: underline; }

.user-profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

.user-profile-actions .btn,
.user-profile-actions form {
  width: 100%;
}

.user-profile-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-profile-side-panel .card-body {
  padding: var(--sp-4) var(--sp-5);
}

.user-profile-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.user-profile-side-title h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-profile-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
}

.user-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-4);
}

.user-profile-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 0;
}

.user-profile-meta {
  list-style: none;
  margin: 0;
  padding: 0;
}

.user-profile-meta li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 12.5px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.user-profile-meta li:last-child { border-bottom: 0; }

.user-profile-meta i {
  color: var(--text-tertiary);
  font-size: 15px;
  margin-top: 1px;
}

.user-profile-meta .label {
  color: var(--text-tertiary);
  min-width: 72px;
  flex-shrink: 0;
}

.user-profile-meta .value {
  color: var(--text-primary);
  font-weight: 500;
}

.user-profile-quicklinks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
}

.user-profile-quicklinks a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-default);
  background: var(--surface-raised);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.user-profile-quicklinks a:hover {
  background: var(--surface-base);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.user-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  border-bottom: 1px solid var(--border-default);
}

.user-profile-tabs a {
  display: block;
  padding: 10px 2px;
  margin-bottom: -1px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.user-profile-tabs a:hover { color: var(--text-primary); }

.user-profile-tabs a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.user-profile-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

@media (max-width: 575.98px) {
  .user-profile-kpi-row { grid-template-columns: 1fr; }
}

.user-profile-kpi {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.user-profile-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-overlay);
  color: var(--text-tertiary);
  font-size: 20px;
  flex-shrink: 0;
}

.user-profile-kpi-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.user-profile-kpi-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.user-profile-kpi-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-profile-tab-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  background: var(--surface-base);
}

.user-profile-tab-card .card-body {
  padding: var(--sp-5) var(--sp-6);
}

.user-profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4) var(--sp-5);
}

.details-field { min-width: 0; }

.details-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.details-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

.profile-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--sp-4);
}

.profile-section-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-horizontal-form .row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-top: 8px;
}

.profile-subcard {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.profile-subcard .card-body { padding: var(--sp-4) var(--sp-5); }

[dir="rtl"] .user-profile-contact,
[dir="rtl"] .user-profile-meta { text-align: start; }

.profile-view-only-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--color-primary-light);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-lg);
  font-size: 13px;
}

/* ── Payments dashboard ─────────────────────────────────────── */
.payments-page-subtitle { font-size: 13px; max-width: 42rem; }

.payments-balance-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  overflow: hidden;
  position: relative;
}

.payments-balance-card::after {
  display: none;
}

.payments-balance-card .card-body { position: relative; }

.payments-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.payments-balance-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.payments-balance-currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.payments-currency-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.payments-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.payments-trend--up { color: var(--color-success); }
.payments-trend--down { color: var(--color-danger); }

.payments-balance-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.payments-mini-stat {
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-base);
  text-align: center;
}

.payments-mini-stat__label {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.payments-mini-stat__value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.payments-last-txn { font-size: 12px; color: var(--text-secondary); font-style: italic; }

.payments-metric-card { border: 1px solid var(--border-default); }

.payments-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.payments-metric-value small {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.payments-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.payments-metric-icon--pink { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.payments-metric-icon--blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.payments-metric-icon--orange { background: rgba(245, 158, 11, 0.12); color: #d97706; }

.payments-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.payments-member-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.payments-invoice-ref {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

.payments-history-table th,
.payments-history-table td { padding: 12px 14px; vertical-align: middle; }

@media (max-width: 991.98px) {
  .payments-balance-value { font-size: 24px; }
}

/* Mobile app system icon (shared partial _SystemAppIcon) */
img.brand-icon,
img.auth-brand-icon,
img.sidebar-logo-mark,
img.system-app-icon {
  object-fit: cover;
  flex-shrink: 0;
}

img.brand-icon,
img.sidebar-logo-mark {
  border-radius: 8px;
}

img.auth-brand-icon {
  border-radius: 9px;
}

.admin-sidebar .sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

img.sidebar-logo-mark {
  width: 32px;
  height: 32px;
}

/* ── Sidebar nav pending badges ─────────────────────────────── */
#sidebar-menu ul li > a .nav-menu-badge {
  flex-shrink: 0;
  margin-inline-start: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e91e8c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  letter-spacing: 0.02em;
}

#sidebar-menu ul li.mm-active > a .nav-menu-badge {
  background: #fff;
  color: #e91e8c;
}

body.sidebar-collapsed #sidebar-menu ul li > a .nav-menu-badge {
  display: none;
}

/* ── User Activities analytics dashboard ─────────────────────── */
.activities-page-subtitle {
  font-size: 13px;
  max-width: 52rem;
}

.activities-kpi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  margin-bottom: 2px;
}

.activities-kpi-row .mini-stat {
  min-height: 88px;
}

/* ── Request / Audit Logs monitor ───────────────────────────── */
.request-logs-subtitle {
  font-size: 13px;
  max-width: 52rem;
}

.request-logs-kpi-row {
  align-items: stretch;
}

.request-logs-kpi-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.request-logs-kpi-card {
  flex: 1 1 auto;
  width: 100%;
}

.request-logs-kpi-card .mini-stat {
  width: 100%;
  min-height: 72px;
}

.request-logs-charts-dashboard {
  align-items: flex-start;
}

.request-logs-charts-dashboard > [class*="col-"] {
  min-width: 0;
}

.request-logs-charts-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
}

.request-logs-charts-stack > .card {
  flex: 0 0 auto;
}

.request-logs-chart-wrap {
  position: relative;
  height: 280px;
  width: 100%;
  max-width: 100%;
}

.request-logs-chart-wrap--donut {
  height: 220px;
}

.request-logs-chart-wrap--bar {
  height: 180px;
}

.request-logs-table {
  font-size: 13px;
}

.request-logs-table thead.sticky-top {
  z-index: 2;
}

.request-logs-endpoint {
  max-width: 220px;
}

.request-logs-json {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .request-logs-json {
  text-align: right;
}

.activities-heatmap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-x: auto;
  font-size: 10px;
}

.activities-heatmap__header,
.activities-heatmap__row {
  display: grid;
  grid-template-columns: 36px repeat(24, 1fr);
  gap: 2px;
  align-items: center;
}

.activities-heatmap__header span {
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: 9px;
}

.activities-heatmap__day {
  font-weight: 600;
  color: var(--bs-secondary-color);
}

.activities-heatmap__cell {
  display: block;
  height: 14px;
  border-radius: 2px;
  background: rgba(37, 99, 235, calc(0.08 + var(--intensity, 0) * 0.92));
  cursor: default;
}

.activities-table__details {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activities-detail-drawer {
  width: min(420px, 100vw);
}

.activities-user-profile .card-title {
  font-size: 15px;
}

@media print {
  .page-title-right,
  #activities-advanced-filters,
  .activities-detail-drawer,
  .dropdown,
  #sidebar-menu,
  .navbar-header {
    display: none !important;
  }
}

/* Email & OTP settings — segmented tab bar */
.email-otp-tabs-bar {
  padding: 6px;
  background: var(--surface-raised, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.email-otp-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  min-width: min-content;
}

.email-otp-tabs .nav-item {
  flex: 0 0 auto;
}

.email-otp-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-secondary, #475569);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.email-otp-tabs .nav-link i {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.email-otp-tabs .nav-link:hover {
  color: var(--approx-primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.12);
}

.email-otp-tabs .nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.email-otp-tabs .nav-link.active {
  color: #fff;
  background: var(--approx-primary, #2563eb);
  border-color: var(--approx-primary, #2563eb);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.28);
}

.email-otp-tabs .nav-link.active:hover {
  color: #fff;
  background: var(--approx-primary-dark, #1d4ed8);
  border-color: var(--approx-primary-dark, #1d4ed8);
}

html[data-theme="dark"] .email-otp-tabs-bar {
  background: var(--surface-sunken, #1e293b);
  border-color: var(--border-default, #334155);
}

html[data-theme="dark"] .email-otp-tabs .nav-link {
  color: var(--text-secondary, #94a3b8);
}

html[data-theme="dark"] .email-otp-tabs .nav-link:hover {
  color: var(--color-primary, #60a5fa);
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.18);
}

html[data-theme="dark"] .email-otp-tabs .nav-link.active {
  color: #fff;
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
}

@media (max-width: 767.98px) {
  .email-otp-tabs-bar {
    padding: 4px;
  }

  .email-otp-tabs {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .email-otp-tabs .nav-link {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12.5px;
  }
}

/* ═══════════════════════════════════════════════════════════
   ENTERPRISE ENHANCEMENT LAYER
   Added: confirm modals, toast v2, verification badges,
   activity timeline, alert banners, workflow badges,
   dashboard quick actions, loading overlay, role cards.
   ═══════════════════════════════════════════════════════════ */

/* ── Confirm Modal — Enterprise ─────────────────────────────── */
.confirm-modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden;
}

.confirm-modal-icon-wrap {
  padding: var(--sp-6) var(--sp-6) 0;
  display: flex;
  justify-content: center;
}

.confirm-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.confirm-icon-danger  { background: rgba(244,63,94,.12);  color: var(--color-danger); }
.confirm-icon-warning { background: rgba(245,158,11,.12); color: var(--color-warning); }
.confirm-icon-primary { background: var(--color-primary-light); color: var(--color-primary); }
.confirm-icon-info    { background: rgba(52,184,217,.12); color: var(--color-info); }
.confirm-icon-success { background: var(--color-success-light); color: var(--color-success); }

.confirm-modal-body {
  padding: var(--sp-4) var(--sp-6) var(--sp-3);
  text-align: center;
}

.confirm-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-2);
}

.confirm-modal-message {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.confirm-reason-wrap {
  margin-top: var(--sp-4);
  text-align: start;
}

.confirm-reason-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.confirm-reason-input {
  resize: vertical;
  min-height: 72px;
}

.confirm-modal-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  padding: var(--sp-3) var(--sp-5);
  justify-content: center;
  gap: var(--sp-2);
}

.confirm-cancel-btn { min-width: 100px; }
.confirm-ok-btn     { min-width: 100px; }

/* ── Toast v2 — with progress bar ───────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  inset-inline-end: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 380px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.45;
  color: #fff;
  position: relative;
  overflow: hidden;
  pointer-events: all;
  animation: toastSlideIn 260ms cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes toastSlideIn {
  from { opacity:0; transform: translateX(calc(100% + 24px)); }
  to   { opacity:1; transform: translateX(0); }
}

.toast-item.toast-leaving {
  animation: toastSlideOut 320ms ease forwards;
}

@keyframes toastSlideOut {
  to { opacity:0; transform: translateX(calc(100% + 24px)); max-height:0; padding:0; margin:0; }
}

.toast-success { background: #065f46; }
.toast-danger  { background: #9f1239; }
.toast-warning { background: #92400e; color: #fff; }
.toast-info    { background: #1e3a5f; }

.toast-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.toast-msg  { flex: 1; word-break: break-word; }

.toast-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  transition: color var(--transition-fast);
}
.toast-close:hover { color: #fff; }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.2);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  background: rgba(255,255,255,.6);
  transition: width linear;
  border-radius: 0 2px 2px 0;
}

/* ── Verification Pill Badges ───────────────────────────────── */
.verify-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.verify-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.verify-pill i { font-size: 11px; }

.verify-pill-done    { background: var(--color-success-light); color: var(--color-success-dark); }
.verify-pill-pending { background: var(--color-gray-100);      color: var(--color-gray-500);     }
.verify-pill-seller  { background: var(--color-primary-light); color: var(--color-primary-dark); }
.verify-pill-locked  { background: rgba(245,158,11,.12);       color: #92400e; }

/* ── Activity Timeline (Dashboard) ──────────────────────────── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: 10px var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-raised); }

.activity-dot-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  font-size: 14px;
  margin-top: 1px;
}
.activity-dot-wrap.dot-blue   { background: rgba(37,99,235,.12);  color: var(--color-primary); }
.activity-dot-wrap.dot-green  { background: var(--color-success-light); color: var(--color-success); }
.activity-dot-wrap.dot-orange { background: rgba(249,115,22,.12); color: #ea580c; }
.activity-dot-wrap.dot-red    { background: var(--color-danger-light); color: var(--color-danger); }
.activity-dot-wrap.dot-purple { background: rgba(124,58,237,.12); color: #7c3aed; }
.activity-dot-wrap.dot-yellow { background: rgba(245,158,11,.12); color: #92400e; }
.activity-dot-wrap.dot-gray   { background: var(--color-gray-100); color: var(--color-gray-400); }

.activity-dot { display: none; } /* legacy compat — hidden, replaced by dot-wrap */

.activity-content { flex: 1; min-width: 0; }

.activity-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Quick Action Shortcuts (Dashboard) ─────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-3);
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-2);
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.quick-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.qa-blue   { background: var(--color-primary-light); color: var(--color-primary); }
.qa-green  { background: var(--color-success-light); color: var(--color-success); }
.qa-orange { background: rgba(249,115,22,.12);       color: #ea580c; }
.qa-purple { background: rgba(124,58,237,.12);       color: #7c3aed; }
.qa-pink   { background: rgba(236,72,153,.12);       color: #db2777; }
.qa-yellow { background: rgba(245,158,11,.12);       color: #92400e; }

/* ── Inline Alert Banners ───────────────────────────────────── */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: var(--sp-4);
  border: 1px solid;
}

.alert-banner-icon {
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-banner-content { flex: 1; min-width: 0; }
.alert-banner-title   { font-weight: 600; margin-bottom: 2px; }
.alert-banner-text    { color: inherit; opacity: 0.85; }

.alert-banner-danger  { background: var(--color-danger-light);  border-color: rgba(244,63,94,.2);  color: #9f1239; }
.alert-banner-warning { background: var(--color-warning-light); border-color: rgba(245,158,11,.2); color: #92400e; }
.alert-banner-info    { background: var(--accent-info-bg);    border-color: var(--border-default); color: var(--accent-info-text); }
.alert-banner-success { background: var(--color-success-light); border-color: rgba(16,163,127,.2); color: #065f46; }

/* ── Workflow Status Badges (full chip with icon) ────────────── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.status-chip i { font-size: 12px; }

.status-chip-approved    { background: var(--color-success-light); color: var(--color-success-dark); }
.status-chip-published   { background: rgba(5, 150, 105, 0.14);   color: #047857; }
.status-chip-pending     { background: rgba(245,158,11,.12);       color: #92400e; }
.status-chip-rejected    { background: var(--color-danger-light);  color: #9f1239; }
.status-chip-suspended   { background: rgba(249,115,22,.12);       color: #9a3412; }
.status-chip-draft       { background: var(--color-gray-100);      color: var(--color-gray-500); }
.status-chip-archived    { background: var(--color-gray-100);      color: var(--color-gray-400); }
.status-chip-sold        { background: var(--accent-neutral-bg);    color: var(--accent-neutral-text); }
.status-chip-active      { background: var(--color-success-light); color: var(--color-success-dark); }
.status-chip-disabled    { background: var(--color-gray-100);      color: var(--color-gray-500); }
.status-chip-received    { background: var(--color-success-light); color: var(--color-success-dark); }
.status-chip-failed      { background: var(--color-danger-light);  color: #9f1239; }
.status-chip-refunded    { background: var(--accent-neutral-bg);    color: var(--accent-neutral-text); }

/* ── Role Cards (Roles Index) ───────────────────────────────── */
.role-card {
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--sp-4) var(--sp-5);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  box-shadow: none;
}
.role-card:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.role-card.role-card-system { border-inline-start: 2px solid var(--border-strong); }
.role-card.role-card-custom { border-inline-start: 2px solid var(--color-primary); }
.role-card.role-card-inactive { opacity: .65; }

.role-card-header { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }

.role-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.role-icon-system { background: var(--empty-icon-bg); color: var(--text-tertiary); }
.role-icon-custom { background: var(--empty-icon-bg); color: var(--text-tertiary); }
.role-icon-inactive { background: var(--color-gray-100);   color: var(--color-gray-400); }

.role-card-name        { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.role-card-desc        { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4;
                         display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.role-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}
.role-meta-item { display: flex; align-items: center; gap: 4px; }
.role-meta-item i { font-size: 13px; color: var(--text-tertiary); }

.role-card-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

/* ── Loading Overlay ─────────────────────────────────────────── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* ── Advanced Filters Panel ──────────────────────────────────── */
.advanced-filters-panel {
  border-top: 1px dashed var(--border-default);
  padding-top: var(--sp-3);
  margin-top: var(--sp-3);
}

.filter-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-2);
}

/* ── Page Header enhancements (card styles in admin-design-system.css) ── */
.page-subtitle {
  max-width: 54rem;
}

/* ── Stat card delta trend ───────────────────────────────────── */
.stat-delta-up   { color: var(--color-success); font-size: 11px; font-weight: 600; }
.stat-delta-down { color: var(--color-danger);  font-size: 11px; font-weight: 600; }
.stat-delta-neutral { color: var(--text-tertiary); font-size: 11px; }

/* ── Row hover quick action (listing/user table) ─────────────── */
.row-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: transparent;
}
.row-quick-action-approve { color: var(--color-success); border-color: rgba(16,163,127,.3); }
.row-quick-action-approve:hover { background: var(--color-success-light); border-color: var(--color-success); color: var(--color-success-dark); }
.row-quick-action-reject  { color: var(--color-danger);  border-color: rgba(244,63,94,.3); }
.row-quick-action-reject:hover  { background: var(--color-danger-light); border-color: var(--color-danger); color: #9f1239; }

/* ── Dashboard pending-listing table improvement ─────────── */
.pending-listing-thumb {
  width: 44px;
  height: 36px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--surface-raised);
  flex-shrink: 0;
}

/* -- Pill-style page breadcrumb --- */
.breadcrumb { --bs-breadcrumb-divider: '/'; }
.breadcrumb-item a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--color-primary); }
.breadcrumb-item.active { color: var(--text-tertiary); }

/* -- Stat card delta trend --- */
.stat-delta-up   { color: var(--color-success); font-size: 11px; font-weight: 600; }
.stat-delta-down { color: var(--color-danger);  font-size: 11px; font-weight: 600; }
.stat-delta-neutral { color: var(--text-tertiary); font-size: 11px; }

/* -- Responsive helpers --- */
@media (max-width: 575.98px) {
  .quick-actions-grid { grid-template-columns: repeat(3, 1fr); }
  .toast-container {
    inset-inline-end: var(--sp-3);
    bottom: var(--sp-3);
    max-width: calc(100vw - var(--sp-6));
  }
}

/* ── Auth login (split layout) ──────────────────────────────── */
:root {
  --auth-page-bg: #eef2f7;
  --auth-panel-bg: #ffffff;
  --auth-input-bg: #ffffff;
  --auth-input-border: #e2e8f0;
  --auth-showroom-overlay: rgba(8, 15, 30, 0.48);
}

html[data-theme="dark"] {
  --auth-page-bg: #0b1220;
  --auth-panel-bg: #111827;
  --auth-input-bg: #1f2937;
  --auth-input-border: #374151;
  --auth-showroom-overlay: rgba(4, 8, 18, 0.72);
  --surface-base: #111827;
  --surface-raised: #1f2937;
  --surface-overlay: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-default: #374151;
  --border-subtle: #1f2937;
}

html[data-theme="dark"] .auth-shell {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}

.auth-body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--text-primary);
  background: transparent !important;
  transition: color var(--transition-base);
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #0f172a;
}

.auth-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.auth-bg__scrim {
  position: absolute;
  inset: 0;
  background: var(--auth-showroom-overlay);
}

.auth-body::before {
  display: none;
}

.auth-header {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 10;
  padding: var(--sp-4) var(--sp-6);
}

.auth-header__controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.auth-header__controls .lang-toggle {
  flex: 0 0 auto;
  margin: 0;
}

.auth-header__controls .theme-toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
}

html[data-theme="dark"] .auth-header__controls {
  background: rgba(17, 24, 39, 0.82);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.auth-page {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px var(--sp-4) var(--sp-6);
}

.auth-shell {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1040px;
  min-height: 580px;
  background: var(--auth-panel-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
}

/* LTR: visual left, login right. RTL (dir=rtl): visual right, login left — DOM order unchanged. */

.auth-shell__visual {
  flex: 1 1 50%;
  position: relative;
  min-height: 320px;
  background: #0a1628;
  overflow: hidden;
}

.auth-shell__visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-shell__visual-img--ltr {
  object-position: left center;
}

.auth-shell__visual-img--rtl {
  object-position: right center;
}

.auth-shell__visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 15, 30, 0.55) 0%, rgba(8, 15, 30, 0.15) 42%, rgba(8, 15, 30, 0.72) 100%),
    linear-gradient(90deg, rgba(8, 15, 30, 0.35) 0%, transparent 55%);
  pointer-events: none;
}

html[dir="rtl"] .auth-shell__visual-overlay {
  background:
    linear-gradient(180deg, rgba(8, 15, 30, 0.55) 0%, rgba(8, 15, 30, 0.15) 42%, rgba(8, 15, 30, 0.72) 100%),
    linear-gradient(270deg, rgba(8, 15, 30, 0.35) 0%, transparent 55%);
}

.auth-shell__visual-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(var(--sp-6), 4vw, 40px);
  pointer-events: none;
  text-align: start;
}

/* RTL: flex-start / text-align:start map to the physical right edge */
html[dir="rtl"] .auth-shell__visual-content,
.auth-shell--rtl .auth-shell__visual-content {
  align-items: flex-start;
  text-align: start;
}

html[dir="rtl"] .auth-hero-copy,
html[dir="rtl"] .auth-visual-brand__text,
.auth-shell--rtl .auth-hero-copy,
.auth-shell--rtl .auth-visual-brand__text {
  text-align: start;
}

.auth-hero-copy {
  max-width: 280px;
  text-align: inherit;
}

.auth-hero-copy p {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.auth-hero-copy p + p {
  margin-top: var(--sp-1);
}

.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.auth-visual-brand__icon,
img.auth-visual-brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.auth-visual-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-visual-brand__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.1;
}

.auth-visual-brand__tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.2;
}

.auth-shell__panel {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-10) clamp(var(--sp-6), 5vw, 56px);
  background: var(--auth-panel-bg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.auth-brand--centered {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: var(--sp-6);
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

.auth-brand--centered .auth-brand-icon {
  width: 52px;
  height: 52px;
}

.auth-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.auth-brand--centered .auth-brand-name {
  margin-top: var(--sp-3);
  font-size: 18px;
}

.auth-brand-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-2);
  line-height: 1.25;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 var(--sp-6);
  line-height: 1.5;
}

.auth-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}

.auth-form .form-control {
  height: 44px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--auth-input-border);
  background-color: var(--auth-input-bg);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

html:not([data-theme="dark"]) .auth-form .form-control {
  background-color: #ffffff;
  border-color: #e2e8f0;
  color: #111827;
}

html:not([data-theme="dark"]) .auth-form .form-control:-webkit-autofill,
html:not([data-theme="dark"]) .auth-form .form-control:-webkit-autofill:hover,
html:not([data-theme="dark"]) .auth-form .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #111827;
  caret-color: #111827;
  border-color: #e2e8f0;
}

.auth-form .form-control::placeholder {
  color: var(--text-tertiary);
}

.auth-form .form-control:focus {
  border-color: var(--color-primary);
  background-color: var(--auth-input-bg);
  box-shadow: var(--focus-ring);
}

html:not([data-theme="dark"]) .auth-form .form-control:focus {
  background-color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

html:not([data-theme="dark"]) .auth-form .form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: var(--focus-ring);
  border-color: var(--color-primary);
}

html[data-theme="dark"] .auth-form .form-control:focus {
  background: var(--auth-input-bg);
}

.auth-field {
  margin-bottom: var(--sp-4);
}

.auth-field-control {
  position: relative;
}

.auth-field-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.auth-field-control .form-control {
  padding-inline-start: 42px;
  padding-inline-end: 42px;
  text-align: center;
}

.auth-field-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 2;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.auth-field-toggle:hover {
  color: var(--text-secondary);
  background: var(--surface-overlay);
}

.auth-form .form-check {
  margin-bottom: var(--sp-5);
  padding-inline-start: 1.6em;
}

.auth-form .form-check-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 48px;
  margin-top: var(--sp-1);
  padding-inline: var(--sp-5);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.24);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.auth-submit-btn i {
  font-size: 18px;
  line-height: 1;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.32);
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

html[data-theme="dark"] .auth-submit-btn {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

html[data-theme="dark"] .auth-submit-btn:hover,
html[data-theme="dark"] .auth-submit-btn:focus-visible {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.42);
}

.auth-alert {
  font-size: 13px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius-md);
}

@media (max-width: 767.98px) {
  .auth-header {
    padding: var(--sp-3) var(--sp-4);
  }

  .auth-page {
    padding-top: 64px;
    align-items: flex-start;
  }

  .auth-shell {
    flex-direction: column;
    max-width: 440px;
    min-height: auto;
    border-radius: 16px;
  }

  .auth-shell__visual {
    flex: none;
    height: 260px;
    order: 1;
  }

  .auth-shell__panel {
    order: 2;
  }

  html[dir="rtl"] .auth-shell__visual {
    order: 2;
  }

  html[dir="rtl"] .auth-shell__panel {
    order: 1;
  }

  .auth-hero-copy p {
    font-size: 20px;
  }

  .auth-visual-brand__name {
    font-size: 15px;
  }

  .auth-shell__panel {
    padding: var(--sp-6) var(--sp-5) var(--sp-8);
  }

  .auth-title {
    font-size: 22px;
  }
}

/* ── Theme shell overrides (must follow approx-skin) ─────────── */
#page-topbar {
  background-color: var(--admin-topbar-bg) !important;
  border-bottom: 1px solid var(--admin-topbar-border) !important;
  box-shadow: none !important;
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

#vertical-menu-btn {
  color: var(--admin-topbar-icon);
}

#vertical-menu-btn:hover {
  background: var(--admin-topbar-icon-hover-bg);
}

html[data-theme="dark"] #page-topbar .navbar-brand-box .brand-name,
html[data-theme="dark"] #page-topbar .user-name {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] #page-topbar .user-dropdown .header-item .text-start > div:last-child,
html[data-theme="dark"] #page-topbar .user-dropdown .ri-arrow-down-s-line {
  color: #94a3b8 !important;
}

@media (max-width: 991.98px) {
  html[data-theme="dark"] #page-topbar .navbar-brand-box .brand-name {
    color: #f1f5f9 !important;
  }
}

html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-content {
  background: var(--admin-shell-bg);
}

html:not([data-theme="dark"]) body:not(.auth-body) {
  background: var(--admin-shell-bg) !important;
}

body.auth-body {
  background: transparent !important;
  --bs-body-bg: transparent;
}

/* ── Listing Excel bulk import ───────────────────────────────── */
.modal-overlay .modal-xl { max-width: min(1200px, 96vw); }
.listing-import-body { padding: var(--sp-4) var(--sp-5); }
.listing-import-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  justify-content: space-between;
}
.listing-import-seller-wrap { flex: 1; min-width: 240px; max-width: 420px; }
.listing-import-dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.listing-import-dropzone.is-dragover,
.listing-import-dropzone:focus-visible {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  outline: none;
}
.listing-import-dropzone-icon { font-size: 32px; color: var(--color-primary); opacity: .85; }
.listing-import-dropzone-title { font-size: 14px; font-weight: 600; margin: var(--sp-2) 0 0; color: var(--text-primary); }
.listing-import-dropzone-hint { font-size: 12px; color: var(--text-tertiary); margin: var(--sp-1) 0 0; }
.listing-import-file-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-base);
  font-size: 13px;
}
.listing-import-quota-note { font-size: 12px; color: var(--text-secondary); margin-top: var(--sp-3); }
.listing-import-quota-banner {
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--accent-info-bg);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}
.listing-import-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.listing-import-stat {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-base);
}
.listing-import-stat-label { display: block; font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .03em; }
.listing-import-stat-value { display: block; font-size: 18px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.listing-import-stat-success .listing-import-stat-value { color: var(--color-success-dark); }
.listing-import-stat-warning .listing-import-stat-value { color: #92400e; }
.listing-import-stat-danger .listing-import-stat-value { color: var(--color-danger); }
.listing-import-stat-primary .listing-import-stat-value { color: var(--color-primary-dark); }
.listing-import-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; }
.listing-import-search { max-width: 220px; }
.listing-import-table-wrap {
  overflow: auto;
  max-height: 52vh;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.listing-import-table { font-size: 12px; white-space: nowrap; }
.listing-import-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-overlay);
  box-shadow: inset 0 -1px 0 var(--border-default);
}
.listing-import-table .sticky-col { position: sticky; left: 0; z-index: 3; background: var(--surface-base); min-width: 48px; }
.listing-import-table .sticky-col-2 { position: sticky; left: 48px; z-index: 3; background: var(--surface-base); min-width: 110px; box-shadow: 2px 0 0 var(--border-subtle); }
.listing-import-table thead .sticky-col,
.listing-import-table thead .sticky-col-2 { background: var(--surface-overlay); z-index: 4; }
.listing-import-msg { max-width: 280px; white-space: normal; font-size: 11px; color: var(--text-secondary); }
.listing-import-row-excluded { opacity: .55; }
.listing-import-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.listing-import-footer-left,
.listing-import-footer-right { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.listing-import-loading { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--text-secondary); margin-top: var(--sp-3); }
.import-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.import-chip-valid { background: rgba(13, 148, 136, .12); color: #0f766e; }
.import-chip-warning { background: rgba(245, 158, 11, .14); color: #92400e; }
.import-chip-invalid { background: var(--color-danger-light); color: #9f1239; }
.import-chip-duplicate { background: rgba(249, 115, 22, .14); color: #9a3412; }
.import-chip-unknown { background: rgba(139, 92, 246, .12); color: #5b21b6; }
.import-chip-quota { background: var(--color-danger-light); color: #9f1239; }
.listing-import-result-summary h4 { font-size: 15px; font-weight: 600; margin-bottom: var(--sp-2); }
.listing-import-result-list { font-size: 13px; max-height: 240px; overflow: auto; padding-inline-start: var(--sp-4); margin: 0; }
html[dir="rtl"] .listing-import-table .sticky-col-2 { left: auto; right: 48px; box-shadow: -2px 0 0 var(--border-subtle); }
html[dir="rtl"] .listing-import-table .sticky-col { left: auto; right: 0; }
