/* =====================================================================
   SHARIK DESIGN SYSTEM — 2026
   Single source of truth. RTL-first. Production grade.
   ===================================================================== */

/* --- 1. DESIGN TOKENS -------------------------------------------- */
:root {
  /* Semantic Theme Tokens */
  --bg-main: #F6F8FC;
  --bg-secondary: #F8FAFC;

  --surface-1: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;

  --text-primary: #0B1F3A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EFF6FF;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Brand */
  --navy: #0B1F3A;
  --navy-hover: #132D4F;
  --blue: var(--primary);
  --blue-hover: var(--primary-hover);
  --blue-light: var(--primary-soft);
  --cyan: #0891B2;

  /* Surfaces */
  --page: var(--bg-main);
  --surface: var(--surface-1);
  --surface-2: var(--surface-2);
  --soft: var(--surface-3);

  /* Borders */
  --line: var(--border);
  --line-soft: #F1F5F9;

  /* Text */
  --text: var(--text-primary);
  --text-2: #334155;
  --muted: var(--text-secondary);
  --muted-2: var(--text-muted);

  /* Status */
  --success-bg: #ECFDF5;
  --warning-bg: #FFFBEB;
  --danger-bg: #FEF2F2;
  --info: #0284C7;
  --info-bg: #E0F2FE;

  /* Spacing Scale (4, 8, 12, 16, 20, 24, 32, 40, 48, 64px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius (8, 12, 16, 20px, 999px) */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 999px;

  /* Shadows — refined elevation */
  --shadow-xs: 0 1px 2px rgba(11, 31, 58, .04), 0 1px 3px rgba(11, 31, 58, .03);
  --shadow-sm: 0 4px 14px rgba(11, 31, 58, .05);
  --shadow-md: 0 10px 28px rgba(11, 31, 58, .07);
  --shadow-lg: 0 20px 48px rgba(11, 31, 58, .10);

  /* Sidebar */
  --sidebar-bg: #FFFFFF;
  --sidebar-border: #E2E8F0;
  --sidebar-active-bg: #EFF6FF;
  --sidebar-active-text: #2563EB;
  --sidebar-active-icon: #2563EB;
  --sidebar-text: #475569;
  --sidebar-width: 272px;
  --sidebar-collapsed: 78px;

  /* Topbar */
  --topbar-h: 72px;
  --topbar-bg: rgba(255, 255, 255, .92);
  --topbar-bg-scrolled: rgba(255, 255, 255, .98);
  --hero-bg: #FFFFFF;

  /* Layout rhythm */
  --content-max: 1600px;
  --public-max: 1440px;
  --content-pad: clamp(1rem, 2vw, 2rem);
  --section-gap: clamp(3.5rem, 7vw, 6.5rem);

  /* Semantic aliases */
  --panel: var(--surface);
  --panel-soft: #F8FAFC;
  --text-strong: #0B1F3A;
  --pale: var(--blue-light);
  --ring: rgba(37, 99, 235, .22);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode — Rich Black + Deep Navy + White + Sharik Blue */
html[data-theme="dark"] {
  /* Semantic Theme Tokens */
  --bg-main: #05070B;
  --bg-secondary: #070D16;

  --surface-1: #0A1524;
  --surface-2: #0D1B2D;
  --surface-3: #112238;

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #8492A6;

  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .22);

  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, .14);

  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;

  /* User-specified Dark Palette Aliases */
  --dark-bg: var(--bg-main);
  --dark-bg-secondary: var(--bg-secondary);
  --dark-surface: var(--surface-1);
  --dark-surface-2: var(--surface-2);
  --dark-surface-3: var(--surface-3);
  --dark-border: var(--border);
  --dark-border-strong: var(--border-strong);
  --dark-text: var(--text-primary);
  --dark-text-secondary: var(--text-secondary);
  --dark-text-muted: var(--text-muted);
  --dark-primary: var(--primary);
  --dark-primary-hover: var(--primary-hover);
  --dark-primary-soft: var(--primary-soft);

  /* Central semantic variable mappings */
  --page: var(--bg-main);
  --surface: var(--surface-1);
  --surface-2: var(--surface-2);
  --surface-3: var(--surface-3);
  --soft: var(--surface-2);
  --panel: var(--surface-1);
  --panel-soft: var(--bg-secondary);

  --line: var(--border);
  --line-soft: rgba(148, 163, 184, .08);

  --text: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-strong: #FFFFFF;
  --muted: var(--text-muted);
  --muted-2: #64748B;
  --navy: var(--text-primary);
  --navy-hover: #60A5FA;

  --blue: var(--primary);
  --blue-hover: var(--primary-hover);
  --blue-light: var(--primary-soft);

  --sidebar-bg: #081525;
  --sidebar-border: var(--border);
  --sidebar-active-bg: var(--primary-soft);
  --sidebar-active-text: #60A5FA;
  --sidebar-active-icon: #3B82F6;
  --sidebar-text: var(--text-secondary);

  --topbar-bg: rgba(7, 16, 28, .94);
  --topbar-bg-scrolled: rgba(7, 16, 28, .98);
  --hero-bg: var(--bg-main);

  /* Public Header Dark Tokens */
  --header-blue: var(--primary);
  --header-blue-hover: var(--primary-hover);
  --header-blue-light: var(--primary-soft);
  --header-navy: var(--text-primary);
  --header-muted: var(--text-muted);
  --header-border: var(--border);
  --header-soft: var(--surface-2);

  --success-bg: rgba(16, 185, 129, .15);
  --warning-bg: rgba(245, 158, 11, .15);
  --danger-bg: rgba(239, 68, 68, .15);
  --info-bg: rgba(59, 130, 246, .15);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .55);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .7);
}

/* Smooth theme transitions without layout shifts */
body,
.public-topbar,
.account-sidebar,
.admin-sidebar,
.dashboard-top,
.card,
.panel,
.field,
input,
select,
textarea,
.categories-mega-dropdown,
.user-dropdown-panel,
.mobile-drawer,
dialog,
.inbox-card,
.notification-card,
.footer-content-grid {
  transition: background-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
              color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  body,
  .public-topbar,
  .account-sidebar,
  .admin-sidebar,
  .dashboard-top,
  .card,
  .panel,
  .field,
  input,
  select,
  textarea,
  .categories-mega-dropdown,
  .user-dropdown-panel,
  .mobile-drawer,
  dialog,
  .inbox-card,
  .notification-card,
  .footer-content-grid {
    transition: none !important;
  }
}

/* Global scrollbar normalisation */
html {
  scrollbar-gutter: stable;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html[data-theme="dark"] * {
  scrollbar-color: #334155 transparent;
}

::selection {
  background: rgba(37, 99, 235, .18);
  color: var(--text-strong);
}


/* --- 2. RESET & BASE -------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

a,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
  text-wrap: balance;
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: 0;
  /* Arabic never needs negative tracking */
}

p {
  max-width: 72ch;
}

/* --- 3. UTILITY ------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1280px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: .75rem;
  inset-inline-end: 1rem;
  transform: translateY(-200%);
  padding: .65rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  transition: transform .2s;
}

.skip-link:focus {
  transform: none;
}

.clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.muted {
  color: var(--muted);
}

.text-sm {
  font-size: .875rem;
}

.text-xs {
  font-size: .75rem;
}

.content-container,
.dashboard-container {
  width: min(var(--content-max), calc(100% - 2 * var(--content-pad)));
  margin-inline: auto;
}

/* --- 4. TYPOGRAPHY ---------------------------------------------- */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

.accent-text {
  color: var(--blue);
  font-weight: 800;
}

/* --- 5. BUTTONS ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .6rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .15s, border-color .18s;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--muted-2);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--soft);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-link {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-weight: 700;
  padding-inline: .25rem;
  min-height: auto;
}

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

.btn-sm {
  min-height: 36px;
  padding: .4rem .85rem;
  font-size: .8rem;
}

.btn-lg {
  min-height: 52px;
  padding: .75rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

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

.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
}

/* --- 6. FORM INPUTS -------------------------------------------- */
.field {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: .65rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  margin-block: .35rem .9rem;
}

.field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.field:disabled {
  background: var(--soft);
  opacity: .7;
  cursor: not-allowed;
}

.field::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

textarea.field {
  resize: vertical;
  min-height: 110px;
}

select.field {
  cursor: pointer;
}

label {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-2);
  margin-block-start: .85rem;
}

label:first-child {
  margin-block-start: 0;
}

.field-help {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-block: -.6rem .8rem;
}

.field-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12) !important;
}

.error-msg {
  font-size: .75rem;
  color: var(--danger);
  margin-block: -.6rem .8rem;
}

.check {
  display: flex !important;
  align-items: center;
  gap: .5rem;
  margin-block: .3rem .8rem;
  font-weight: 500;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--blue);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width:600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 7. CARDS --------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s, border-color .2s;
}

a.card:hover,
.card-hoverable:hover {
  box-shadow: var(--shadow-md);
  border-color: #BFDBFE;
}

/* --- 8. BADGES / STATUS ----------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue-hover);
}

.badge-green {
  background: var(--success-bg);
  color: #166534;
}

.badge-amber {
  background: var(--warning-bg);
  color: #92400E;
}

.badge-red {
  background: var(--danger-bg);
  color: #991B1B;
}

.badge-gray {
  background: var(--soft);
  color: var(--text-2);
}

.badge-navy {
  background: var(--navy);
  color: #fff;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
}

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

.status-pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-active {
  background: var(--success-bg);
  color: var(--success);
}

.status-in_progress {
  background: var(--blue-light);
  color: var(--blue-hover);
}

.status-completed {
  background: var(--success-bg);
  color: var(--success);
}

.status-cancelled {
  background: var(--soft);
  color: var(--muted);
}

.status-cancelled::before {
  background: var(--muted);
}

.status-failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-disputed {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-delivered {
  background: #F0FDF4;
  color: #166534;
}

.status-revision {
  background: var(--warning-bg);
  color: var(--warning);
}

/* --- 9. AVATAR -------------------------------------------------- */
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue-hover);
  font-weight: 800;
  font-size: .9rem;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: .75rem;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 1.6rem;
  border-radius: var(--r-lg);
}

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

/* --- 10. VERIFIED BADGE ----------------------------------------- */
.verified-badge {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: .62rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, .3);
}

/* --- 11. FLASH MESSAGES ----------------------------------------- */
.flash {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-radius: var(--r-md);
  margin-block: 1rem;
  border: 1px solid transparent;
}

.flash-success {
  background: var(--success-bg);
  border-color: #BBF7D0;
  color: #166534;
}

.flash-error {
  background: var(--danger-bg);
  border-color: #FECACA;
  color: #991B1B;
}

.flash-warning {
  background: var(--warning-bg);
  border-color: #FDE68A;
  color: #92400E;
}

.flash-info {
  background: var(--info-bg);
  border-color: #BAE6FD;
  color: #075985;
}

.flash ul {
  margin: .35rem 0 0 1.25rem;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  z-index: 200;
  bottom: 1.5rem;
  inset-inline-start: 1.5rem;
  display: grid;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  font-size: .875rem;
  font-weight: 600;
  animation: toastIn .25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* --- 12. BREADCRUMBS -------------------------------------------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.breadcrumbs-sep {
  color: var(--muted-2);
  user-select: none;
}

.breadcrumbs .current {
  color: var(--text-2);
  font-weight: 600;
}

/* --- 13. PAGINATION -------------------------------------------- */
.pagination {
  margin-block-start: 1.5rem;
  overflow: auto;
}

.pagination nav>div:first-child {
  display: none;
}

.pagination nav>div:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination a,
.pagination span {
  display: inline-flex;
  padding: .45rem .65rem;
  border-radius: var(--r-sm);
}

.pagination a:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.pagination svg {
  width: 16px;
  height: 16px;
}

/* --- 14. TABLES ------------------------------------------------- */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  text-align: end;
  padding: .85rem 1rem;
  border-block-end: 1px solid var(--line);
  vertical-align: middle;
}

th {
  background: var(--soft);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 700;
}

tr:last-child td {
  border: 0;
}

tr:hover td {
  background: var(--soft);
}

.table-action {
  display: flex;
  gap: .35rem;
  justify-content: flex-end;
}

/* --- 15. TABS --------------------------------------------------- */
.tabs {
  display: flex;
  gap: 0;
  border-block-end: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .85rem 1.2rem;
  border-block-end: 2px solid transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  margin-block-end: -1px;
  transition: color .18s, border-color .18s;
}

.tab-link:hover {
  color: var(--text);
}

.tab-link.active {
  color: var(--blue);
  border-color: var(--blue);
}

/* --- 16. MODAL -------------------------------------------------- */
dialog.modal {
  width: min(520px, calc(100% - 2rem));
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

dialog.modal-lg {
  width: min(780px, calc(100% - 2rem));
}

dialog.modal-xl {
  width: min(1000px, calc(100% - 2rem));
}

dialog.modal::backdrop {
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-block-end: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 1.1rem;
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  padding: 1rem 1.5rem;
  border-block-start: 1px solid var(--line);
  background: var(--soft);
}

/* --- 17. DROPDOWN ----------------------------------------------- */
.dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  z-index: 80;
  inset-block-start: calc(100% + .5rem);
  inset-inline-end: 0;
  min-width: 220px;
  padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.dropdown-header {
  display: block;
  padding: .55rem .75rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .75rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: .875rem;
  transition: background .15s;
}

.dropdown-item:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.dropdown-sep {
  height: 1px;
  background: var(--line);
  margin: .35rem 0;
}

/* --- 18. EMPTY STATE ------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 1rem;
  max-height: 380px;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: var(--r-lg);
  background: var(--blue-light);
  color: var(--blue);
  font-size: 1.5rem;
}

.empty-state h3 {
  font-size: 1.05rem;
  margin: 0;
}

.empty-state p {
  color: var(--muted);
  font-size: .875rem;
  max-width: 42ch;
  margin: 0;
}

.empty-state .btn {
  margin-block-start: .25rem;
}

/* --- 19. SKELETON LOADING --------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--soft) 25%, var(--line-soft) 50%, var(--soft) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.5s infinite;
}

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

.skeleton-line {
  height: .875rem;
  margin-block: .35rem;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--r-lg);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* --- 20. STEPPER ----------------------------------------------- */
.stepper {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-block: 1.5rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
}

.step-item:last-child {
  flex: 0;
}

.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  border: 2px solid var(--line);
  transition: background .2s, border-color .2s, color .2s;
}

.step-item.active .step-num {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.step-item.done .step-num {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.step-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}

.step-item.active .step-label {
  color: var(--blue);
}

.step-item.done .step-label {
  color: var(--success);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}

.step-item.done .step-line {
  background: var(--success);
}

@media (max-width: 600px) {
  .step-label {
    display: none;
  }
}

/* =====================================================================
   PUBLIC LAYOUT
   ===================================================================== */

/* --- 21. PUBLIC HEADER (SHARIK 2026 SAAS MARKETPLACE REDESIGN) -- */
:root {
  --header-h: 78px;
  --header-blue: #2563EB;
  --header-blue-hover: #1D4ED8;
  --header-blue-light: #EFF6FF;
  --header-navy: #0B1F3A;
  --header-muted: #64748B;
  --header-border: #E6EAF0;
  --header-soft: #F8FAFC;
  --header-radius: 12px;
}

/* Reset any default summary bullet / marker across all browsers */
summary {
  list-style: none !important;
}
summary::-webkit-details-marker {
  display: none !important;
}
summary::marker {
  display: none !important;
  content: "" !important;
}

.public-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--header-border);
  box-shadow: 0 1px 3px rgba(11, 31, 58, 0.03);
  transition: box-shadow 200ms ease, background 200ms ease;
}

.public-topbar.scrolled {
  background: var(--topbar-bg-scrolled);
  box-shadow: 0 4px 20px -2px rgba(11, 31, 58, 0.08);
}

.public-nav-container {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 32px;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
  height: var(--header-h);
  width: 100%;
}

/* 1. Brand Logo */
.public-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px 0;
  transition: opacity 180ms ease;
}

.public-nav .brand:hover {
  opacity: 0.9;
}

.public-nav .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(11, 31, 58, 0.08);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.06);
  flex-shrink: 0;
}

.public-nav .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.public-nav .brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--header-navy);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* 2. Navigation Links & Mega Menu */
.nav-links-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 12px;
}

.nav-links-wrapper .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--header-navy);
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links-wrapper .nav-link:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.nav-links-wrapper .nav-link.active {
  background: var(--header-blue-light);
  color: var(--header-blue);
  font-weight: 600;
}

/* Mega Menu Trigger */
.mega-menu-container {
  position: relative;
}

.nav-item-categories {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--header-navy);
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.nav-item-categories:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.mega-menu-container.open .nav-item-categories {
  background: var(--header-blue-light);
  color: var(--header-blue);
  border-color: rgba(37, 99, 235, 0.2);
}

.category-grid-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--header-blue);
}

.chevron-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease;
}

.mega-menu-container.open .chevron-icon {
  transform: rotate(180deg);
}

/* Mega Dropdown Panel */
.categories-mega-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  width: min(1040px, calc(100vw - 64px));
  z-index: 1050;
  background: var(--surface);
  border: 1px solid var(--header-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(11, 31, 58, 0.14), 0 0 0 1px rgba(11, 31, 58, 0.04);
  animation: megaMenuFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

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

.mega-dropdown-inner {
  padding: 28px;
}

.mega-grid-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mega-category-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block-end: 10px;
  border-block-end: 1px solid #F1F5F9;
}

.mega-col-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--header-blue-light);
  color: var(--header-blue);
  flex-shrink: 0;
}

.mega-col-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--header-navy);
}

.mega-col-title a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}

.mega-col-title a:hover {
  color: var(--header-blue);
}

.mega-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.mega-link:hover {
  background: var(--header-soft);
  color: var(--header-blue);
  transform: translateX(-4px);
}

/* Mega Menu Footer */
.mega-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-start: 24px;
  padding-block-start: 16px;
  border-block-start: 1px solid #F1F5F9;
}

.mega-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--header-blue);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--header-blue-light);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.mega-view-all:hover {
  background: #DBEAFE;
  color: var(--header-blue-hover);
  transform: translateX(-3px);
}

.mega-footer-hint {
  font-size: 13px;
  color: var(--header-muted);
}

/* 3. Spacer */
.nav-spacer {
  flex: 1;
  min-width: 16px;
}

/* 4. Desktop Search Form */
.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 290px;
  height: 46px;
  border-radius: 14px;
  background: var(--header-soft);
  border: 1px solid var(--header-border);
  padding-inline: 14px 10px;
  gap: 10px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, width 180ms ease;
}

.header-search-form:focus-within {
  background: var(--surface);
  border-color: var(--header-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--header-muted);
  flex-shrink: 0;
  pointer-events: none;
}

.header-search-input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--header-navy);
  line-height: normal;
}

.header-search-input::placeholder {
  color: #94A3B8;
  font-size: 13.5px;
}

.header-search-input::-webkit-search-decoration,
.header-search-input::-webkit-search-cancel-button,
.header-search-input::-webkit-search-results-button,
.header-search-input::-webkit-search-results-decoration {
  display: none !important;
  -webkit-appearance: none;
}

/* 5. Actions Area (Guest & Auth) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* All Header Action Buttons strictly 46px */
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  transition: all 180ms ease;
}

.header-btn.btn-ghost {
  background: transparent;
  color: var(--header-navy);
  padding-inline: 16px;
}

.header-btn.btn-ghost:hover {
  background: var(--header-soft);
  color: var(--header-navy);
}

.header-btn.btn-outline {
  background: var(--surface);
  color: var(--header-navy);
  border-color: var(--line);
}

.header-btn.btn-outline:hover {
  border-color: var(--header-blue);
  color: var(--header-blue);
  background: var(--header-blue-light);
}

.header-btn.btn-primary-cta {
  background: var(--header-blue);
  color: #ffffff;
  border-color: var(--header-blue);
  font-weight: 700;
  padding-inline: 24px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.header-btn.btn-primary-cta:hover {
  background: var(--header-blue-hover);
  border-color: var(--header-blue-hover);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.header-btn.btn-primary-cta:active {
  transform: translateY(0);
}

/* Authenticated CTA & Icons */
.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  background: var(--header-blue);
  border: 1px solid var(--header-blue);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
  transition: all 180ms ease;
}

.header-cta-btn:hover {
  background: var(--header-blue-hover);
  border-color: var(--header-blue-hover);
  transform: translateY(-1px);
}

.header-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--header-border);
  background: var(--header-soft);
  color: var(--header-navy);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.header-icon-btn:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
  border-color: rgba(37, 99, 235, 0.25);
}

.header-icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  border: 2px solid var(--surface);
}

/* User Menu */
.user-menu-wrapper {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--header-border);
  background: var(--header-soft);
  cursor: pointer;
  font-family: inherit;
  transition: background 160ms ease, border-color 160ms ease;
}

.user-menu-trigger:hover {
  background: var(--header-blue-light);
  border-color: rgba(37, 99, 235, 0.25);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--header-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--header-navy);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chevron {
  color: var(--header-muted);
  transition: transform 180ms ease;
}

.user-menu-wrapper.open .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--header-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px -8px rgba(11, 31, 58, 0.14);
  padding: 10px;
  z-index: 1050;
  animation: megaMenuFadeIn 180ms ease forwards;
}

.user-dropdown-header {
  padding: 8px 12px;
}

.user-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--header-navy);
}

.user-dropdown-role {
  font-size: 12px;
  color: var(--header-muted);
  margin-top: 2px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.user-dropdown-item.logout-btn {
  color: #EF4444;
}

.user-dropdown-item.logout-btn:hover {
  background: var(--danger-bg);
  color: #DC2626;
}

/* 6. Mobile Navigation Triggers (Mobile & Tablet only) */
.mobile-nav-triggers {
  display: none;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.mobile-hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--header-border);
  background: var(--header-soft);
  color: var(--header-navy);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.mobile-hamburger-btn:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.mobile-hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* RTL Mobile Side Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: min(380px, 86vw);
  background: var(--surface);
  z-index: 1101;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 260ms ease;
  box-shadow: -12px 0 45px rgba(11, 31, 58, 0.18);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .mobile-drawer,
  .mobile-drawer-overlay,
  .mobile-nav-triggers {
    display: none !important;
  }
}


.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-block-end: 1px solid var(--header-border);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.drawer-brand .brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--header-navy);
}

.drawer-close-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--header-border);
  background: var(--header-soft);
  color: var(--header-navy);
  cursor: pointer;
  transition: background 150ms ease;
}

.drawer-close-btn:hover {
  background: var(--header-soft);
}

.drawer-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.drawer-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  border-radius: 12px;
  background: var(--header-soft);
  border: 1px solid var(--header-border);
  padding: 0 12px;
}

.drawer-search-form:focus-within {
  border-color: var(--header-blue);
  background: var(--surface);
}

.drawer-search-input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--header-navy);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--header-navy);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.drawer-link:hover {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.drawer-link.active {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

/* Drawer Categories Accordion */
.drawer-accordion-item {
  border-radius: 12px;
  overflow: hidden;
}

.drawer-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--header-navy);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.drawer-accordion-trigger:hover,
.drawer-accordion-item.open .drawer-accordion-trigger {
  background: var(--header-blue-light);
  color: var(--header-blue);
}

.drawer-link-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-chevron {
  transition: transform 200ms ease;
}

.drawer-accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.drawer-accordion-content {
  padding: 6px 14px 10px 14px;
  margin-inline-start: 24px;
  border-inline-start: 2px solid var(--header-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-sublink {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}

.drawer-sublink:hover {
  color: var(--header-blue);
  background: var(--header-soft);
}

.drawer-sublink.view-all-sublink {
  font-weight: 700;
  color: var(--header-blue);
  margin-top: 4px;
}

.drawer-divider {
  height: 1px;
  background: var(--line);
  margin-block: 4px;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.drawer-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.drawer-cta-btn.primary-action {
  background: var(--header-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.drawer-cta-btn.secondary-action {
  background: var(--header-soft);
  color: var(--header-navy);
  border: 1px solid var(--header-border);
}

.drawer-logout-btn {
  width: 100%;
  height: 42px;
  border: none;
  background: transparent;
  color: #EF4444;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: background 150ms ease;
}

.drawer-logout-btn:hover {
  background: var(--danger-bg);
}

/* 7. Responsive Breakpoints */
@media (max-width: 1279px) {
  .header-search-form {
    width: 220px;
  }
  .public-nav-container {
    padding-inline: 24px;
  }
  .nav-links-wrapper {
    gap: 2px;
    margin-inline-start: 6px;
  }
  .nav-links-wrapper .nav-link,
  .nav-item-categories {
    padding: 8px 10px;
    font-size: 14px;
  }
  .header-btn {
    padding: 0 16px;
    font-size: 14px;
  }
}

@media (max-width: 1023px) {
  .nav-links-wrapper {
    display: none;
  }
  .header-search-form {
    display: none;
  }
  .mobile-nav-triggers {
    display: flex;
  }
  .nav-actions {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --header-h: 70px;
  }
  .public-nav-container {
    padding-inline: 16px;
  }
  .public-nav .brand-name {
    font-size: 1.35rem;
  }
  .public-nav .brand-mark {
    width: 38px;
    height: 38px;
  }
}


/* =====================================================================
   22. PUBLIC FOOTER (SHARIK PREMIUM REDESIGN — RTL FIRST)
   ===================================================================== */
.public-footer {
  position: relative;
  background-color: #071D3A;
  background-image:
    radial-gradient(ellipse 90% 400px at 50% 0%, rgba(37, 99, 235, 0.14), transparent 75%),
    radial-gradient(circle at 15% 30%, rgba(37, 99, 235, 0.06), transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(8, 145, 178, 0.05), transparent 50%);
  color: #94A3B8;
  padding-block: 0;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
  overflow: hidden;
  font-family: inherit;
}

/* --- CTA Container & Card --- */
.footer-cta-container {
  padding-block: 3.5rem 2.5rem;
}

.footer-cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 38, 74, 0.88) 0%, rgba(7, 29, 58, 0.96) 100%);
  border: 1px solid rgba(37, 99, 235, 0.32);
  box-shadow:
    0 24px 54px -12px rgba(3, 13, 26, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.footer-cta-card::before {
  content: '';
  position: absolute;
  top: -80px;
  inset-inline-start: -80px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.footer-cta-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.footer-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.32);
  color: #93C5FD;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-cta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3B82F6;
  box-shadow: 0 0 10px #3B82F6;
  animation: pulse-cta 2.2s infinite ease-in-out;
}

@keyframes pulse-cta {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.footer-cta-title {
  color: #FFFFFF;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 0;
}

.footer-cta-desc {
  color: #CBD5E1;
  font-size: clamp(0.92rem, 1.5vw, 1.02rem);
  line-height: 1.7;
  margin: 0;
}

.footer-cta-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-block-start: 0.4rem;
}

.cta-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #E2E8F0;
  font-size: 0.82rem;
  font-weight: 600;
}

.cta-badge-item svg {
  color: #38BDF8;
  flex-shrink: 0;
}

.footer-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 215px;
}

.btn-footer-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.65rem;
  border-radius: 14px;
  background: #2563EB;
  color: #FFFFFF !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  white-space: nowrap;
}

.btn-footer-primary:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(37, 99, 235, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #FFFFFF !important;
}

.btn-footer-primary:active {
  transform: translateY(0);
}

.btn-footer-primary svg {
  transition: transform 0.2s ease;
}

.btn-footer-primary:hover svg {
  transform: translateX(-3px);
}

.btn-footer-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-footer-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  color: #FFFFFF !important;
}

/* --- Main Columns Grid --- */
.footer-content-grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(4, 1fr);
  gap: 3rem;
  padding-block: 3.5rem 4rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #FFFFFF !important;
  transition: opacity 0.2s ease;
}

.footer-brand:hover {
  opacity: 0.92;
}

.footer-brand .brand-mark.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.footer-brand .brand-mark.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.brand-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-details strong {
  color: #FFFFFF;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-details small {
  color: #93C5FD;
  font-size: 0.76rem;
  font-weight: 600;
}

.footer-desc {
  color: #94A3B8;
  font-size: 0.88rem;
  line-height: 1.75;
  margin: 0;
  max-width: 36ch;
}

.footer-trust-pills {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  margin-block-start: 0.25rem;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
  width: fit-content;
}

.trust-pill:hover {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.3);
  color: #FFFFFF;
}

.trust-pill svg {
  color: #38BDF8;
  flex-shrink: 0;
}

.footer-social-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-block-start: 0.5rem;
}

.footer-social-label {
  color: #E2E8F0;
  font-size: 0.82rem;
  font-weight: 700;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.social-link:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 2px;
}

/* --- Nav Columns --- */
.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.footer-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #FFFFFF;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  padding-block-end: 0.45rem;
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

.heading-accent {
  display: inline-block;
  width: 5px;
  height: 16px;
  border-radius: 99px;
  background: #2563EB;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
  flex-shrink: 0;
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links-list li {
  margin: 0;
  padding: 0;
}

.footer-links-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #94A3B8;
  font-size: 0.88rem;
  line-height: 1.5;
  text-decoration: none;
  padding-block: 0.2rem;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-links-list a:hover {
  color: #FFFFFF;
  transform: translateX(-5px);
}

.footer-links-list a:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
  color: #FFFFFF;
}

.footer-more-link {
  color: #60A5FA !important;
  font-weight: 700;
  margin-block-start: 0.25rem;
}

.footer-more-link:hover {
  color: #93C5FD !important;
  text-decoration: underline;
}

/* --- Footer Bottom Bar --- */
.footer-bottom-bar {
  background: #041328;
  border-block-start: 1px solid rgba(255, 255, 255, 0.07);
  padding-block: 1.35rem;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-copy {
  color: #94A3B8;
  font-size: 0.83rem;
  line-height: 1.6;
}

.footer-bottom-copy strong {
  color: #FFFFFF;
  font-weight: 700;
}

.footer-bottom-extras {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-geo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #CBD5E1;
  font-size: 0.77rem;
  font-weight: 600;
}

.footer-geo-pill svg {
  color: #38BDF8;
  flex-shrink: 0;
}

.footer-scroll-top {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-scroll-top:hover {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.footer-scroll-top:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 2px;
}

.footer-scroll-top svg {
  transition: transform 0.2s ease;
}

.footer-scroll-top:hover svg {
  transform: translateY(-2px);
}

/* --- Responsive Layouts --- */
@media (max-width: 1200px) {
  .footer-content-grid {
    grid-template-columns: 1.3fr repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
}

@media (max-width: 900px) {
  .footer-cta-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.8rem;
    padding: 2rem;
  }

  .footer-cta-content {
    max-width: 100%;
  }

  .footer-cta-actions {
    flex-direction: row;
    width: 100%;
  }

  .footer-cta-actions .btn-footer-primary,
  .footer-cta-actions .btn-footer-secondary {
    flex: 1;
  }

  .footer-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 1.8rem;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
  }

  .footer-desc {
    max-width: 100%;
  }

  .footer-trust-pills {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .footer-cta-actions {
    flex-direction: column;
  }

  .footer-content-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-bottom-extras {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}


/* --- 23. PUBLIC HERO -------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: 5rem 4rem;
  background: var(--hero-bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 80% 0%, rgba(37, 99, 235, .07), transparent 50%),
    radial-gradient(ellipse at 10% 100%, rgba(8, 145, 178, .05), transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: var(--r-full);
  background: var(--blue-light);
  color: var(--blue-hover);
  font-size: .8rem;
  font-weight: 800;
}

.eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  display: block;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  max-width: 12ch;
  margin-block: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.85;
  max-width: 50ch;
}

.hero-search {
  display: flex;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .5rem .5rem .5rem .75rem;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  margin-block-start: 1.5rem;
  max-width: 640px;
}

.hero-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  min-width: 0;
}

.hero-search input::placeholder {
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  gap: .65rem;
  margin-block-start: 1rem;
  flex-wrap: wrap;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-block-start: .75rem;
  font-size: .8rem;
  color: var(--muted);
}

.popular-searches a {
  color: var(--text-2);
  border-block-end: 1px dashed var(--line);
  transition: color .15s;
}

.popular-searches a:hover {
  color: var(--blue);
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block-start: 1.5rem;
}

.avatar-stack {
  display: flex;
  direction: ltr;
}

.avatar-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: var(--blue-light);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 900;
  margin-inline-start: -.6rem;
}

.avatar-stack span:first-child {
  margin: 0;
}

.hero-proof-text strong,
.hero-proof-text small {
  display: block;
}

.hero-proof-text small {
  font-size: .75rem;
  color: var(--muted);
}

/* Hero visual */
.hero-visual {
  position: relative;
}

.preview-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(3deg) rotateX(1deg);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--line);
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.preview-brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  color: #fff;
  font-weight: 900;
}

.preview-brand-text b,
.preview-brand-text small {
  display: block;
}

.preview-brand-text b {
  font-size: .85rem;
  color: var(--text);
}

.preview-brand-text small {
  font-size: .62rem;
  color: var(--muted);
}

.preview-status-pill {
  padding: .25rem .55rem;
  border-radius: var(--r-full);
  background: var(--success-bg);
  color: var(--success);
  font-size: .65rem;
  font-weight: 800;
}

.preview-progress-bar {
  margin-block: 1rem;
}

.preview-progress-bar .bar-track {
  height: 6px;
  background: var(--soft);
  border-radius: 6px;
  overflow: hidden;
  margin-block-start: .45rem;
}

.preview-progress-bar .bar-fill {
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: inherit;
}

.preview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.preview-card-mini {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--soft);
}

.preview-card-mini small,
.preview-card-mini strong,
.preview-card-mini span {
  display: block;
}

.preview-card-mini small {
  color: var(--muted);
  font-size: .62rem;
}

.preview-card-mini strong {
  color: var(--text);
  font-size: .78rem;
  margin-block: .18rem;
}

.preview-card-mini span {
  color: var(--muted);
  font-size: .62rem;
}

.preview-messages {
  display: grid;
  gap: .45rem;
  padding-block: .9rem;
}

.preview-msg {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.preview-msg-bubble {
  padding: .45rem .65rem;
  border-radius: 9px;
  background: var(--soft);
  color: var(--text-2);
  font-size: .65rem;
}

.preview-msg.me {
  flex-direction: row-reverse;
}

.preview-msg.me .preview-msg-bubble {
  background: var(--blue-light);
  color: var(--blue-hover);
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-start: .9rem;
  border-block-start: 1px solid var(--line);
  font-size: .65rem;
  color: var(--muted);
}

.preview-footer button {
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  padding: .45rem .7rem;
  font: inherit;
  font-size: .65rem;
  font-weight: 700;
  cursor: pointer;
}

.preview-float {
  position: absolute;
  z-index: 4;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.preview-secure {
  inset-inline-end: -1.25rem;
  bottom: 12%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .85rem;
}

.preview-secure-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--success-bg);
  color: var(--success);
  font-size: .9rem;
}

.preview-secure b,
.preview-secure small {
  display: block;
}

.preview-secure b {
  font-size: .72rem;
  color: var(--text);
}

.preview-secure small {
  font-size: .58rem;
  color: var(--muted);
}

.preview-rating {
  inset-inline-start: -1.25rem;
  top: 14%;
  padding: .65rem .85rem;
}

.preview-rating b {
  font-size: .95rem;
  color: var(--text);
}

.preview-rating-stars {
  color: #E6A20B;
  font-size: .65rem;
  letter-spacing: .1rem;
}

.preview-rating small {
  font-size: .58rem;
  color: var(--muted);
  display: block;
}

@media (max-width:900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero {
    text-align: center;
  }

  .hero h1 {
    margin-inline: auto;
  }

  .hero p {
    margin-inline: auto;
  }

  .hero-search {
    margin-inline: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .popular-searches {
    justify-content: center;
  }

  .hero-proof {
    justify-content: center;
  }

  .hero-visual {
    max-width: 580px;
    margin-inline: auto;
  }

  .preview-window {
    transform: none;
  }

  .preview-float {
    display: none;
  }
}

@media (max-width:600px) {
  .hero {
    padding-block: 3.5rem 3rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .hero-search {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: .75rem;
  }

  .hero-search button {
    width: 100%;
  }

  .preview-messages {
    display: none;
  }
}

/* Trust strip */
.trust-strip {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 1.25rem;
}

.trust-stat {
  padding-inline: 1.5rem;
  border-inline-start: 1px solid var(--line);
}

.trust-stat:first-child {
  border: 0;
}

.trust-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.25;
}

.trust-stat span {
  display: block;
  font-size: .78rem;
  color: var(--muted);
}

@media (max-width:700px) {
  .trust-stats {
    grid-template-columns: 1fr 1fr;
  }

  .trust-stat:nth-child(2) {
    border-inline-start: 1px solid var(--line);
  }
}

@media (max-width:400px) {
  .trust-stats {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding-block: 5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-block-end: 2.5rem;
}

.section-head h2 {
  margin-block: .35rem 0;
}

.section-head p {
  color: var(--muted);
  font-size: .9rem;
  margin: .35rem 0 0;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--blue);
  font-weight: 700;
  font-size: .875rem;
  transition: gap .2s;
}

.arrow-link:hover {
  gap: .6rem;
}

@media (max-width:600px) {
  .section {
    padding-block: 3.5rem;
  }
}

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #BFDBFE;
}

.category-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--blue-light);
  color: var(--blue);
  font-size: 1.4rem;
}

.category-card h3 {
  font-size: .9rem;
  margin: 0 0 .2rem;
}

.category-card span {
  font-size: .72rem;
  color: var(--muted);
}

@media (max-width:1000px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width:700px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:440px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* Service cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #BFDBFE;
}

.service-cover {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--soft);
  overflow: hidden;
}

.service-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.service-card:hover .service-cover img {
  transform: scale(1.04);
}

.service-cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--blue-light), #E0EAFF);
  font-size: 2.5rem;
}

.service-save-btn {
  position: absolute;
  top: .65rem;
  inset-inline-end: .65rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  border: 0;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color .15s, background .15s;
  backdrop-filter: blur(4px);
}

.service-save-btn:hover,
.service-save-btn.saved {
  color: var(--danger);
  background: var(--surface);
}

.service-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
}

.service-provider {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-block-end: .65rem;
}

.service-provider-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
}

.service-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-block-end: .5rem;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--muted);
  margin-block-end: .65rem;
}

.service-rating {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: #D97706;
  font-weight: 700;
}

.service-rating-count {
  color: var(--muted);
  font-weight: 400;
}

.service-footer {
  margin-block-start: auto;
  padding-block-start: .75rem;
  border-block-start: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-price-label {
  font-size: .72rem;
  color: var(--muted);
  display: block;
}

.service-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}

.promoted-badge {
  position: absolute;
  top: .65rem;
  inset-inline-start: .65rem;
}

@media (max-width:1000px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width:700px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:440px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* Request cards */
.request-list {
  display: grid;
  gap: .75rem;
}

.request-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: box-shadow .2s, border-color .2s;
}

.request-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: #BFDBFE;
}

.request-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-block-end: .5rem;
}

.request-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-block: .3rem .5rem;
}

.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: var(--muted);
}

.request-budget {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width:600px) {
  .request-card {
    grid-template-columns: 1fr;
  }
}

/* Provider cards */
.provider-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: box-shadow .2s, border-color .2s;
}

.provider-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #BFDBFE;
}

.provider-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.provider-handle {
  font-size: .78rem;
  color: var(--muted);
}

.provider-headline {
  font-size: .85rem;
  color: var(--text-2);
  margin-block: .35rem;
}

.provider-meta {
  display: flex;
  gap: .75rem;
  font-size: .78rem;
  font-weight: 600;
}

/* How it works */
.how-section {
  background: var(--navy);
  color: #fff;
}

.how-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

.how-copy h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.how-copy p {
  color: #94A3B8;
  line-height: 1.85;
  max-width: 50ch;
}

.how-steps {
  display: grid;
  gap: .75rem;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .05);
  transition: background .2s;
}

.how-step:hover {
  background: rgba(255, 255, 255, .08);
}

.how-step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  font-size: .95rem;
}

.how-step h3 {
  color: #fff;
  margin: 0 0 .25rem;
  font-size: 1rem;
}

.how-step p {
  color: #94A3B8;
  font-size: .85rem;
  margin: 0;
}

@media (max-width:900px) {
  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-copy {
    text-align: center;
  }
}

/* Escrow strip */
.escrow-section {
  background: var(--soft);
}

.escrow-flow {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-block-start: 1.5rem;
}

.escrow-step {
  padding: .85rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-weight: 700;
  font-size: .9rem;
}

.escrow-arrow {
  color: var(--muted-2);
  font-style: normal;
}

/* CTA banner */
.cta-section {
  background: var(--surface);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 3.5rem;
  border-radius: var(--r-2xl);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.cta-panel h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-block-end: .5rem;
}

.cta-panel p {
  color: #94A3B8;
  margin: 0;
}

.cta-actions {
  display: flex;
  gap: .65rem;
  flex-shrink: 0;
}

.btn-cta-primary {
  background: #fff;
  color: var(--navy);
}

.btn-cta-primary:hover {
  background: var(--soft);
}

.btn-cta-secondary {
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, .14);
}

html[data-theme="dark"] .cta-panel {
  background: var(--dark-surface-2);
  border: 1px solid var(--dark-border);
}

html[data-theme="dark"] .btn-cta-primary {
  background: var(--dark-primary);
  color: #FFFFFF;
}

html[data-theme="dark"] .btn-cta-primary:hover {
  background: var(--dark-primary-hover);
}

@media (max-width:800px) {
  .cta-panel {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 2rem;
  }

  .cta-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: .6fr 1.4fr;
  gap: 4rem;
}

.faq-list details {
  border-block-end: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
  padding-block: 1rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details p {
  color: var(--muted);
  font-size: .9rem;
  padding-block-end: 1rem;
  margin: 0;
}

@media (max-width:800px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Reviews */
.review-card blockquote {
  margin-block: .75rem;
  font-style: italic;
  color: var(--text-2);
  font-size: .9rem;
}

.review-stars {
  color: #D97706;
  letter-spacing: .1rem;
}

.review-card footer {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
}

.review-card footer strong {
  color: var(--text);
}

.review-card footer span {
  color: var(--muted);
}

/* =====================================================================
   AUTHENTICATION LAYOUT (MODERN ARABIC SAAS — RTL FIRST)
   ===================================================================== */
.auth-layout {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #F8FAFC;
  background-image:
    radial-gradient(ellipse 70% 500px at 90% 0%, rgba(37, 99, 235, 0.08), transparent 70%),
    radial-gradient(circle 450px at 5% 95%, rgba(8, 145, 178, 0.06), transparent 70%),
    radial-gradient(circle at 50% 50%, rgba(241, 245, 249, 0.5), transparent 100%);
  color: #0F172A;
  font-family: inherit;
  overflow-x: hidden;
}

/* --- Header --- */
.auth-header {
  width: 100%;
  padding-inline: clamp(1.25rem, 3.5vw, 2.75rem);
  padding-block: 1.15rem;
  flex-shrink: 0;
  z-index: 10;
}

.auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1360px, 100%);
  margin-inline: auto;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #0B1F3A !important;
  transition: opacity 0.2s ease;
}

.auth-brand-logo:hover {
  opacity: 0.9;
}

.auth-brand-logo .brand-mark.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #FFFFFF;
  padding: 2px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-brand-logo .brand-mark.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.auth-brand-logo .brand-text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0B1F3A;
  line-height: 1.2;
}

.btn-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.15rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2) !important;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-auth-back:hover {
  background: var(--soft);
  border-color: var(--line);
  color: var(--text) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.btn-auth-back svg {
  transition: transform 0.2s ease;
  color: #64748B;
}

.btn-auth-back:hover svg {
  transform: translateX(-3px);
  color: #2563EB;
}

/* --- Main Layout --- */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-block: 0.5rem 1.5rem;
}

.auth-flash {
  width: min(1360px, calc(100% - 3rem));
  margin-inline: auto;
  margin-block-end: 1rem;
}

/* Split auth layout (48% Form / 52% Showcase) */
.auth-split {
  display: grid;
  grid-template-columns: 48% 52%;
  align-items: center;
  gap: clamp(2.5rem, 4.5vw, 4.5rem);
  width: min(1360px, calc(100% - 3rem));
  margin-inline: auto;
  position: relative;
}

/* --- Login Form Column & Card --- */
.login-form-column {
  display: flex;
  justify-content: center;
  width: 100%;
}

.login-card {
  width: 100%;
  max-width: 470px;
  padding: clamp(32px, 3.8vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow:
    0 20px 45px -15px rgba(15, 23, 42, 0.07),
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
}

.login-card-head {
  margin-block-end: 1.6rem;
}

.login-card-title {
  color: #0F172A;
  font-size: clamp(1.75rem, 2.5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem 0;
}

.login-card-subtitle {
  color: #64748B;
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 0;
}

.login-general-error {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #FEF2F2;
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #DC2626;
  font-size: 0.85rem;
  margin-block-end: 1.25rem;
}

.login-general-error svg {
  flex-shrink: 0;
  margin-block-start: 2px;
}

.login-general-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.login-group {
  margin-block-end: 1.15rem;
}

.login-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1E293B;
  margin-block-end: 0.45rem;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 0.45rem;
}

.login-label-row .login-label {
  margin-block-end: 0;
}

.login-forgot-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-forgot-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.login-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-field-wrap .field-icon {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.login-field-wrap:focus-within .field-icon {
  color: #2563EB;
}

.login-input {
  width: 100%;
  height: 56px;
  padding-inline-start: 46px;
  padding-inline-end: 16px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  color: #0F172A;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.login-input.has-password-toggle {
  padding-inline-end: 72px;
}

.login-input:hover:not(:focus) {
  border-color: #CBD5E1;
  background: var(--surface);
}

.login-input:focus {
  border-color: #2563EB;
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-input.has-error {
  border-color: #DC2626;
  background: #FEF2F2;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.login-password-toggle {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748B;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-password-toggle:hover {
  background: #F1F5F9;
  color: #2563EB;
}

.login-error-msg {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #DC2626;
  font-size: 0.8rem;
  font-weight: 600;
  margin-block-start: 0.45rem;
}

.login-error-msg svg {
  flex-shrink: 0;
}

/* --- Remember Me Checkbox --- */
.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  margin-block: 0.35rem 0.25rem;
}

.login-remember .custom-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom-ui {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-custom-ui svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
  color: #FFFFFF;
}

.login-remember .custom-checkbox:checked+.checkbox-custom-ui {
  background: #2563EB;
  border-color: #2563EB;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.login-remember .custom-checkbox:checked+.checkbox-custom-ui svg {
  opacity: 1;
  transform: scale(1);
}

.login-remember .custom-checkbox:focus-visible+.checkbox-custom-ui {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.remember-text {
  font-size: 0.88rem;
  color: #475569;
  font-weight: 500;
}

/* --- Primary Submit Button --- */
.btn-login-submit {
  width: 100%;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF !important;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 10px 22px -4px rgba(37, 99, 235, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  margin-block-start: 0.65rem;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px -4px rgba(37, 99, 235, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.btn-login-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-login-submit svg {
  transition: transform 0.2s ease;
}

.btn-login-submit:hover svg {
  transform: translateX(-3px);
}

/* --- Divider & Signup Prompt --- */
.login-card-divider {
  position: relative;
  text-align: center;
  margin-block: 1.4rem 1.15rem;
}

.login-card-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.login-card-divider span {
  position: relative;
  background: var(--surface);
  padding-inline: 14px;
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 600;
}

.login-signup-prompt {
  text-align: center;
  font-size: 0.92rem;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.signup-link {
  color: #2563EB;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.signup-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* ==========================================================
   2. SHOWCASE & VALUE COMPOSITION COLUMN (~52%)
   ========================================================== */
.login-showcase-column {
  display: flex;
  justify-content: center;
  width: 100%;
}

.login-showcase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
}

.login-showcase::before {
  content: '';
  position: absolute;
  top: -60px;
  inset-inline-start: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #1D4ED8;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563EB;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
  animation: pulse-showcase 2s infinite ease-in-out;
}

@keyframes pulse-showcase {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.showcase-heading {
  color: #0B1F3A;
  font-size: clamp(1.85rem, 2.7vw, 2.45rem);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.025em;
  margin: 0;
}

.highlight-blue {
  color: #2563EB;
  display: inline;
}

.showcase-description {
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0;
  max-width: 48ch;
}

/* Feature Rows */
.showcase-features {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  width: 100%;
  margin-block: 0.35rem 0.6rem;
}

.showcase-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.feature-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.feature-icon-shield {
  background: #EFF6FF;
  color: #2563EB;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.12);
}

.feature-icon-milestones {
  background: #F0FDF4;
  color: #16A34A;
  border-color: rgba(22, 163, 74, 0.18);
  box-shadow: 0 4px 12px -2px rgba(22, 163, 74, 0.12);
}

.feature-icon-chat {
  background: #F8FAFC;
  color: #0891B2;
  border-color: rgba(8, 145, 178, 0.18);
  box-shadow: 0 4px 12px -2px rgba(8, 145, 178, 0.12);
}

.feature-text strong {
  display: block;
  color: #0F172A;
  font-size: 0.92rem;
  font-weight: 700;
  margin-block-end: 0.15rem;
}

.feature-text p {
  color: #64748B;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

/* Mini Dashboard Card */
.showcase-mini-dashboard {
  width: 100%;
  max-width: 500px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    0 16px 36px -12px rgba(15, 23, 42, 0.07),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(8px);
}

.mini-dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mini-dash-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mini-dash-label {
  font-size: 0.74rem;
  color: #94A3B8;
  font-weight: 600;
}

.mini-dash-project {
  color: #0F172A;
  font-size: 0.93rem;
  font-weight: 700;
}

.mini-dash-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: #ECFDF5;
  border: 1px solid rgba(22, 163, 74, 0.25);
  color: #15803D;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 8px #16A34A;
  animation: pulse-showcase 2s infinite ease-in-out;
}

.mini-dash-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mini-dash-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748B;
}

.mini-dash-progress-meta strong {
  color: #2563EB;
  font-weight: 800;
}

.mini-dash-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.mini-dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
  transition: width 0.6s ease;
}

.mini-dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-start: 9px;
  border-block-start: 1px solid #F1F5F9;
  font-size: 0.78rem;
}

.mini-dash-escrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #475569;
}

.mini-dash-escrow svg {
  color: #2563EB;
}

.mini-dash-escrow strong {
  color: #0F172A;
  font-weight: 700;
}

.mini-dash-avatar-cluster {
  display: inline-flex;
  align-items: center;
}

.mini-avatar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 0.73rem;
  font-weight: 700;
}

/* --- Legacy / Register fallback classes --- */
.auth-brand h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.25;
}

.auth-brand p {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.75;
}

.auth-benefits {
  display: grid;
  gap: 0.65rem;
  margin-block-start: 1.5rem;
}

.auth-benefit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.auth-benefit-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--blue-light);
  color: var(--blue);
}

.auth-card {
  max-width: 520px;
}


/* Register steps */
.register-progress {
  display: flex;
  gap: .65rem;
  list-style: none;
  margin-block-end: 1.5rem;
  padding: 0;
}

.register-progress li {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.register-progress li>span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  font-weight: 800;
  font-size: .72rem;
  flex-shrink: 0;
}

.register-progress li.active {
  color: var(--blue);
}

.register-progress li.active>span {
  border-color: var(--blue);
  background: var(--blue-light);
}

.register-progress li.done>span {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.register-step {
  border: 0;
  margin: 0;
  padding: 0;
}

.register-step[hidden] {
  display: none;
}

.register-step legend {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-block-end: 1.25rem;
}

.role-option-grid {
  display: grid;
  gap: 0.85rem;
  margin-block: 0.75rem 1.25rem;
}

.role-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.role-option:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.role-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow-sm);
}

.role-option-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
}

.role-option:has(input:checked) .role-option-icon {
  background: var(--blue);
  color: #FFFFFF;
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.role-option-content {
  flex: 1;
  min-width: 0;
}

.role-option-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.25rem;
}

.role-option-title-row strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.role-check-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
}

.role-check-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s ease;
}

.role-option:has(input:checked) .role-check-indicator {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.role-option:has(input:checked) .role-check-indicator::after {
  opacity: 1;
  transform: scale(1);
}

.role-option small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

/* Auth Dark Mode Overrides */
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .auth-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

html[data-theme="dark"] .login-card-title,
html[data-theme="dark"] .showcase-heading {
  color: var(--text);
}

html[data-theme="dark"] .login-label {
  color: var(--text);
}

html[data-theme="dark"] .login-input {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .login-input:hover:not(:focus) {
  border-color: rgba(148, 163, 184, 0.35);
  background: var(--surface);
}

html[data-theme="dark"] .login-input:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .login-card-divider::before {
  background: var(--line);
}

html[data-theme="dark"] .login-card-divider span {
  background: var(--surface);
  color: var(--muted);
}

html[data-theme="dark"] .showcase-mini-dashboard {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

html[data-theme="dark"] .mini-dash-project,
html[data-theme="dark"] .feature-text strong,
html[data-theme="dark"] .mini-dash-escrow strong {
  color: var(--text);
}

html[data-theme="dark"] .mini-dash-footer {
  border-color: var(--line);
}

html[data-theme="dark"] .feature-icon-box {
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] .checkbox-custom-ui {
  background: var(--surface-2);
  border-color: var(--line);
}

html[data-theme="dark"] .remember-text {
  color: var(--muted);
}

/* --- Responsive Media Queries for Auth --- */
@media (max-height: 720px) {
  .auth-layout {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
}

@media (max-width: 1024px) {
  .auth-layout {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .auth-split {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-block: 1.5rem 3rem;
  }

  .login-card {
    max-width: 480px;
    margin-inline: auto;
  }

  .login-showcase {
    max-width: 520px;
    margin-inline: auto;
  }

  .auth-brand {
    text-align: center;
  }

  .auth-benefits {
    max-width: 500px;
    margin-inline: auto;
  }

  .auth-card {
    max-width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  .login-showcase {
    display: none; /* Hide showcase on mobile to keep login fast & focused */
  }

  .auth-header {
    padding-block: 0.85rem;
  }

  .auth-main {
    padding-block: 0.5rem 2rem;
  }

  .auth-split {
    grid-template-columns: 1fr;
    padding-block: 0.5rem 1.5rem;
    width: min(100%, calc(100% - 1.5rem));
  }

  .login-card {
    max-width: 100%;
    padding: 26px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.06);
  }

  .login-card-title {
    font-size: 1.65rem;
  }

  .btn-auth-back span {
    display: inline;
  }
}


/* =====================================================================
   DASHBOARD LAYOUT
   ===================================================================== */

/* --- 24. SIDEBAR ------------------------------------------------ */
.account-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar-width);
  z-index: 80;
  background: var(--sidebar-bg);
  border-inline-end: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.account-sidebar::-webkit-scrollbar {
  width: 4px;
}

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

.account-sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.account-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem .75rem;
  border-block-end: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--sidebar-bg);
  z-index: 1;
}

.sidebar-close {
  display: none;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--r-sm);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-2);
}

/* User card in sidebar */
.sidebar-user {
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .85rem 1.1rem;
  border-block-end: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-handle {
  font-size: .7rem;
  color: var(--muted);
  display: block;
}

/* Role switcher */
.role-switcher {
  display: flex;
  gap: .25rem;
  margin-block-start: .5rem;
}

.role-pill {
  padding: .2rem .55rem;
  border-radius: var(--r-full);
  font-size: .7rem;
  font-weight: 700;
  background: var(--soft);
  color: var(--text-2);
  transition: background .15s, color .15s;
}

.role-pill.active {
  background: var(--blue-light);
  color: var(--blue-hover);
}

.role-pill:hover {
  background: var(--line);
}

/* Nav sections */
.sidebar-nav {
  flex: 1;
  padding: .65rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.sidebar-section-label {
  display: block;
  padding: 1rem .55rem .3rem;
  font-size: .65rem;
  font-weight: 800;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.side-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  padding: .55rem .65rem;
  border-radius: var(--r-md);
  color: var(--sidebar-text);
  font-size: .83rem;
  font-weight: 600;
  transition: background .15s, color .15s;
  position: relative;
}

.side-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted-2);
  transition: color .15s;
}

.side-link:hover {
  background: var(--soft);
  color: var(--text);
}

.side-link:hover svg {
  color: var(--text-2);
}

.side-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}

.side-link.active svg {
  color: var(--sidebar-active-icon);
}

.side-link.active::before {
  content: '';
  position: absolute;
  inset-inline-end: 0;
  inset-block: 25%;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--blue);
}

.side-badge {
  margin-inline-start: auto;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding-inline: .3rem;
  border-radius: var(--r-full);
  background: var(--blue);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
}

/* Sidebar footer */
.sidebar-footer {
  padding: .75rem .65rem .75rem;
  border-block-start: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--sidebar-bg);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.market-back-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: .82rem;
  font-weight: 600;
  background: var(--soft);
  transition: background .15s, color .15s;
  border: 1px solid var(--line);
}

.market-back-link:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #BFDBFE;
}

.market-back-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.sidebar-logout {
  display: flex;
}

.sidebar-logout button {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: .55rem .65rem;
  border-radius: var(--r-sm);
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  transition: background .15s, color .15s;
}

.sidebar-logout button:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.sidebar-logout button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

/* Sidebar scrim */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, .4);
  border: 0;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  will-change: opacity;
}

/* --- 25. DASHBOARD TOPBAR --------------------------------------- */
.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--topbar-bg);
  border-block-end: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
}

.dashboard-topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--topbar-h);
  padding-inline: 1.5rem;
  max-width: 1600px;
  margin-inline: auto;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.sidebar-launch {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
}

.sidebar-launch svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--muted);
}

.topbar-breadcrumb a {
  color: var(--muted);
  font-weight: 600;
  transition: color .15s;
}

.topbar-breadcrumb a:hover {
  color: var(--blue);
}

.topbar-breadcrumb .sep {
  color: var(--muted-2);
  user-select: none;
}

.topbar-breadcrumb .current {
  color: var(--text-2);
  font-weight: 600;
}

/* Command palette trigger */
.cmd-palette-btn {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--soft);
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .18s;
  max-width: 260px;
  flex: 1;
}

.cmd-palette-btn:hover {
  border-color: var(--blue);
}

.cmd-palette-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.cmd-palette-btn kbd {
  margin-inline-start: auto;
  padding: .15rem .4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: .65rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* Topbar actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}

/* Quick create */
details.quick-create {
  position: relative;
}

details.quick-create summary {
  list-style: none;
  cursor: pointer;
}

details.quick-create summary::-webkit-details-marker {
  display: none;
}

.quick-create-panel {
  position: absolute;
  inset-block-start: calc(100% + .5rem);
  inset-inline-end: 0;
  width: 240px;
}

/* Dashboard wallet chip */
.wallet-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 700;
  transition: background .15s;
}

.wallet-chip:hover {
  background: var(--soft);
}

.wallet-chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  color: var(--success);
}

/* User pill in topbar */
.topbar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .6rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  transition: background .15s;
}

.topbar-user:hover {
  background: var(--soft);
}

.topbar-user b,
.topbar-user small {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user b {
  font-size: .78rem;
}

.topbar-user small {
  font-size: .65rem;
  color: var(--muted);
}

/* Header icon button */
.header-icon,
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.header-icon:hover,
.header-icon-btn:hover {
  background: var(--soft);
  color: var(--blue);
  border-color: var(--blue);
}

.header-icon svg,
.header-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--soft);
  color: var(--blue);
  border-color: var(--blue);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.theme-moon {
  display: block;
}

.theme-sun {
  display: none;
}

html[data-theme="dark"] .theme-moon {
  display: none;
}

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

/* --- 26. DASHBOARD MAIN AREA ------------------------------------ */
.dashboard-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.account-main {
  min-width: 0;
}

.dashboard-main-content {
  max-width: 1560px;
  margin-inline: auto;
  padding: 1.75rem 1.75rem 3rem;
}

.page-head {
  margin-block-end: 1.75rem;
}

.page-head h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-block: .35rem .25rem;
}

.page-head p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

.page-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

/* --- 27. STAT CARDS -------------------------------------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-block-end: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.stat-card-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  display: block;
  margin-block: .25rem;
}

.stat-card-sub {
  font-size: .72rem;
  color: var(--muted);
  display: block;
}

.stat-card-trend {
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-block-start: .35rem;
}

.stat-card-trend.up {
  color: var(--success);
}

.stat-card-trend.down {
  color: var(--danger);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  font-size: 1.2rem;
}

.stat-icon-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.stat-icon-green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon-amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon-purple {
  background: #F3F0FF;
  color: #7C3AED;
}

.stat-icon-cyan {
  background: #E0F2FE;
  color: var(--info);
}

html[data-theme="dark"] .stat-icon-purple {
  background: rgba(124, 58, 237, 0.18);
  color: #A78BFA;
}

html[data-theme="dark"] .stat-icon-cyan {
  background: rgba(2, 132, 199, 0.18);
  color: #38BDF8;
}

html[data-theme="dark"] .all-clear-icon {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34D399 !important;
}

/* --- 28. DASHBOARD PANELS --------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-block-end: 1px solid var(--line);
}

.panel-head-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
}

.panel-head h2 {
  font-size: 1rem;
  color: var(--text);
  margin: .1rem 0 0;
}

.panel-head a {
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.panel-body {
  padding: 1.25rem;
}

/* Action required panel */
.action-panel {
  border-color: #FCD34D;
}

.action-panel .panel-head {
  background: var(--warning-bg);
  border-color: #FDE68A;
}

.action-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.25rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s;
}

.action-item:last-child {
  border: 0;
}

.action-item:hover {
  background: var(--soft);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}

.action-text {
  flex: 1;
  min-width: 0;
}

.action-text strong {
  display: block;
  font-size: .875rem;
  color: var(--text);
}

.action-text small {
  display: block;
  font-size: .75rem;
  color: var(--muted);
}

.action-arrow {
  color: var(--muted-2);
  font-style: normal;
  flex-shrink: 0;
}

/* All clear state */
.all-clear {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem;
  color: var(--success);
  font-size: .875rem;
  font-weight: 600;
}

.all-clear-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--success-bg);
  font-size: 1rem;
}

/* --- 29. PROJECT LIST ITEMS ------------------------------------ */
.project-list {
  display: grid;
}

.project-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr .8fr auto;
  gap: .75rem;
  align-items: center;
  padding: .9rem .25rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s, padding-inline .15s;
}

.project-row:last-child {
  border: 0;
}

.project-row:hover {
  background: var(--soft);
  padding-inline: .65rem;
  border-radius: var(--r-sm);
}

.project-row-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.project-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 900;
  font-size: .9rem;
}

.project-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-meta {
  font-size: .7rem;
  color: var(--muted);
}

.progress-bar {
  height: 5px;
  background: var(--soft);
  border-radius: 5px;
  overflow: hidden;
  margin-block-start: .35rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width .3s;
}

.progress-label {
  font-size: .65rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* --- 30. RECENT MESSAGES MINI ---------------------------------- */
.message-mini {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.25rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s;
}

.message-mini:last-child {
  border: 0;
}

.message-mini:hover {
  background: var(--soft);
}

.message-mini-content {
  flex: 1;
  min-width: 0;
}

.message-mini strong {
  display: block;
  font-size: .85rem;
  font-weight: 700;
}

.message-mini p {
  font-size: .75rem;
  color: var(--muted);
  margin: .15rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-mini time {
  font-size: .65rem;
  color: var(--muted-2);
  flex-shrink: 0;
}

.message-mini .unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* --- 31. NOTIFICATIONS DROPDOWN -------------------------------- */
.notif-dropdown {
  width: 360px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s;
}

.notif-item:last-child {
  border: 0;
}

.notif-item:hover {
  background: var(--soft);
}

.notif-item.unread {
  background: rgba(37, 99, 235, .03);
}

.notif-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--blue-light);
  color: var(--blue);
  font-size: .85rem;
}

.notif-text {
  flex: 1;
  min-width: 0;
}

.notif-text strong {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}

.notif-text small {
  display: block;
  font-size: .7rem;
  color: var(--muted);
  margin-block-start: .15rem;
}

.notif-footer {
  padding: .65rem 1rem;
  text-align: center;
  border-block-start: 1px solid var(--line);
  font-size: .8rem;
  color: var(--blue);
  font-weight: 700;
}

/* --- 32. COMMAND PALETTE --------------------------------------- */
.command-palette-dialog {
  width: min(640px, calc(100% - 2rem));
  max-height: 75vh;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 0;
  overflow: hidden;
}

.command-palette-dialog::backdrop {
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
}

.palette-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-block-end: 1px solid var(--line);
}

.palette-head svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  flex-shrink: 0;
}

.palette-head input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
}

.palette-head kbd {
  padding: .2rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: .72rem;
  color: var(--muted);
  background: var(--soft);
}

.palette-results {
  overflow-y: auto;
  max-height: calc(75vh - 58px);
}

.palette-group {
  padding: .5rem .5rem;
}

.palette-label {
  display: block;
  padding: .4rem .65rem;
  font-size: .68rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .7rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: .875rem;
  transition: background .15s;
}

.palette-item:hover {
  background: var(--blue-light);
  color: var(--blue);
}

.palette-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--soft);
  color: var(--muted);
  font-size: .9rem;
  flex-shrink: 0;
}

/* --- 33. MOBILE BOTTOM NAV ------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 90;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
  padding-block-end: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav-inner {
  display: flex;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .6rem .5rem .5rem;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 600;
  transition: color .15s;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-item.active {
  color: var(--blue);
}

.bottom-nav-item.active svg {
  stroke-width: 2.25;
}

/* --- 34. WORKSPACE OVERVIEW PAGE ------------------------------ */
.workspace-greeting {
  margin-block-end: 1.5rem;
}

.workspace-greeting h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0;
}

.workspace-greeting p {
  color: var(--muted);
  margin: .25rem 0 0;
  font-size: .9rem;
}

.workspace-date {
  font-size: .78rem;
  color: var(--blue);
  font-weight: 700;
  margin-block-end: .35rem;
  display: block;
}

.workspace-quick-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-block-start: 1rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, .6fr);
  gap: 1.25rem;
}

.workspace-main {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.workspace-side {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.activity-feed {
  display: grid;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.25rem;
  border-block-end: 1px solid var(--line);
  font-size: .82rem;
}

.activity-item:last-child {
  border: 0;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--blue-light);
  color: var(--blue);
}

.activity-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.activity-text {
  flex: 1;
  color: var(--text-2);
}

.activity-time {
  font-size: .68rem;
  color: var(--muted-2);
  flex-shrink: 0;
}

/* Opportunity card */
.opportunity-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .65rem;
  padding: .9rem 1.25rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s;
}

.opportunity-card:last-child {
  border: 0;
}

.opportunity-card:hover {
  background: var(--soft);
}

.opp-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
}

.opp-meta {
  font-size: .75rem;
  color: var(--muted);
  margin-block-start: .2rem;
}

.opp-budget {
  font-size: .9rem;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
  text-align: end;
}

/* Financial snapshot */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  padding: 1.25rem;
}

.finance-item {
  text-align: center;
}

.finance-item span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
}

.finance-item strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-block-start: .2rem;
}

.finance-actions {
  padding: .75rem 1.25rem;
  display: flex;
  gap: .65rem;
  border-block-start: 1px solid var(--line);
}

/* Profile completion */
.profile-completion {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.profile-ring {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.profile-ring-svg {
  transform: rotate(-90deg);
}

.profile-ring-track {
  fill: none;
  stroke: var(--soft);
  stroke-width: 6;
}

.profile-ring-fill {
  fill: none;
  stroke: var(--blue);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}

.profile-ring-text {
  position: absolute;
  font-size: .9rem;
  font-weight: 900;
  color: var(--navy);
}

.profile-complete-text h3 {
  font-size: .9rem;
  margin: 0 0 .25rem;
}

.profile-complete-text p {
  font-size: .78rem;
  color: var(--muted);
  margin: 0;
}

.profile-complete-text a {
  font-size: .78rem;
  color: var(--blue);
  font-weight: 700;
}

/* --- 35. MESSAGING UI ------------------------------------------ */
.inbox-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
}

.inbox-sidebar {
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.inbox-sidebar-head {
  padding: 1rem;
  border-block-end: 1px solid var(--line);
}

.inbox-sidebar-head h2 {
  font-size: 1rem;
  margin: 0 0 .65rem;
}

.conversation-list {
  overflow-y: auto;
  flex: 1;
}

.conversation-item {
  display: flex;
  gap: .75rem;
  padding: .85rem 1rem;
  border-block-end: 1px solid var(--line);
  transition: background .15s;
  cursor: pointer;
}

.conversation-item:hover {
  background: var(--soft);
}

.conversation-item.active {
  background: var(--blue-light);
}

.conversation-item-content {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.conversation-preview {
  font-size: .75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  margin-block-start: .15rem;
}

.conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  flex-shrink: 0;
}

.conversation-time {
  font-size: .65rem;
  color: var(--muted-2);
}

.unread-count {
  min-width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  background: var(--blue);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding-inline: .3rem;
}

.chat-area {
  display: flex;
  flex-direction: column;
}

.chat-head {
  padding: 1rem 1.25rem;
  border-block-end: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-head-info {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.chat-person-name {
  font-size: .9rem;
  font-weight: 700;
}

.chat-person-meta {
  font-size: .72rem;
  color: var(--muted);
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.chat-message {
  display: flex;
  gap: .5rem;
}

.chat-message.own {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: min(75%, 580px);
  padding: .75rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.chat-message.own .chat-bubble {
  background: var(--blue-light);
  border-color: #BFDBFE;
}

.chat-bubble p {
  font-size: .875rem;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-bubble-time {
  font-size: .65rem;
  color: var(--muted-2);
  margin-block-start: .35rem;
  display: block;
}

.chat-compose {
  padding: 1rem;
  border-block-start: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .65rem;
  align-items: end;
}

.chat-compose textarea {
  resize: none;
  min-height: 46px;
  max-height: 180px;
  overflow-y: auto;
  margin: 0;
}

@media (max-width:900px) {
  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .inbox-sidebar {
    max-height: 350px;
  }
}

@media (max-width:600px) {
  .chat-compose {
    grid-template-columns: 1fr auto;
  }

  .chat-compose button.btn-icon:first-of-type {
    display: none;
  }
}

/* --- 36. PROJECT WORKSPACE ------------------------------------- */
.project-heading {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
  padding: 1.25rem 0 0;
  margin-block-end: 1.5rem;
}

.project-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-block: .65rem 1.25rem;
}

.project-title-row h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 0;
}

.project-overview-strip {
  display: flex;
  gap: 0;
  border-block-start: 1px solid var(--line);
}

.project-overview-item {
  padding: .9rem 1.5rem;
  border-inline-end: 1px solid var(--line);
}

.project-overview-item:last-child {
  border: 0;
}

.project-overview-item span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
}

.project-overview-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-block-start: .15rem;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
}

.project-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.sticky-panel {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
}

.milestone-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: .85rem;
  align-items: center;
  padding: 1rem 0;
  border-block-end: 1px solid var(--line);
}

.milestone-row:last-child {
  border: 0;
}

.milestone-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 900;
  font-size: .82rem;
  flex-shrink: 0;
}

.milestone-info h3 {
  font-size: .9rem;
  margin: 0 0 .2rem;
}

.milestone-info p {
  font-size: .75rem;
  color: var(--muted);
  margin: 0;
}

.milestone-amount {
  font-size: .9rem;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

.milestone-actions {
  display: flex;
  gap: .4rem;
}

@media (max-width:900px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-overview-strip {
    flex-wrap: wrap;
  }

  .project-overview-item {
    border-inline-end: 0;
    border-block-end: 1px solid var(--line);
    min-width: 140px;
  }
}

@media (max-width:600px) {
  .project-title-row {
    flex-direction: column;
  }

  .milestone-row {
    grid-template-columns: auto 1fr;
  }

  .milestone-amount {
    grid-column: 2;
  }

  .milestone-actions {
    grid-column: 1/-1;
  }
}

/* --- 37. WALLET / FINANCE --------------------------------------- */
.wallet-header {
  display: flex;
  gap: 1rem;
  margin-block-end: 1.5rem;
  flex-wrap: wrap;
}

.balance-card {
  flex: 1;
  min-width: 200px;
  padding: 1.5rem;
  border-radius: var(--r-lg);
}

.balance-card-main {
  background: var(--navy);
  color: #fff;
}

.balance-card-main .balance-label {
  color: #94A3B8;
  font-size: .75rem;
}

.balance-card-main .balance-value {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin-block: .35rem;
}

.balance-card-sub {
  background: var(--surface);
  border: 1px solid var(--line);
}

.balance-card-sub .balance-label {
  color: var(--muted);
  font-size: .75rem;
}

.balance-card-sub .balance-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-block: .35rem;
}

.balance-label {
  display: block;
}

.balance-value {
  display: block;
}

.wallet-actions {
  display: flex;
  gap: .65rem;
  margin-block-start: 1rem;
}

.transaction-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.25rem;
  border-block-end: 1px solid var(--line);
}

.transaction-row:last-child {
  border: 0;
}

.tx-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.tx-icon-credit {
  background: var(--success-bg);
  color: var(--success);
}

.tx-icon-debit {
  background: var(--danger-bg);
  color: var(--danger);
}

.tx-info {
  flex: 1;
  min-width: 0;
}

.tx-info strong,
.tx-info small {
  display: block;
}

.tx-info strong {
  font-size: .875rem;
  font-weight: 700;
}

.tx-info small {
  font-size: .72rem;
  color: var(--muted);
}

.tx-amount {
  font-weight: 800;
  font-size: .95rem;
  white-space: nowrap;
}

.tx-amount.credit {
  color: var(--success);
}

.tx-amount.debit {
  color: var(--danger);
}

/* --- 38. ADMIN DASHBOARD --------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.admin-content {
  padding: 1.5rem;
  max-width: 1600px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-block-end: 1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 1rem;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.admin-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-inline: 1.5rem;
  background: rgba(255, 255, 255, .96);
  border-block-end: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
}

@media (max-width:1100px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:600px) {
  .admin-metrics {
    grid-template-columns: 1fr;
  }
}

/* Admin sidebar overrides (dark) */
.admin-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 270px;
  z-index: 80;
  padding: 1rem .85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  border-inline-end: 1px solid rgba(255, 255, 255, .06);
}

.admin-sidebar .sidebar-section-label {
  color: rgba(255, 255, 255, .35);
}

.admin-sidebar .side-link {
  color: rgba(255, 255, 255, .65);
}

.admin-sidebar .side-link svg {
  color: rgba(255, 255, 255, .4);
}

.admin-sidebar .side-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-sidebar .side-link:hover svg {
  color: rgba(255, 255, 255, .7);
}

.admin-sidebar .side-link.active {
  background: rgba(37, 99, 235, .3);
  color: #fff;
}

.admin-sidebar .side-link.active svg {
  color: #93C5FD;
}

.admin-sidebar .side-link.active::before {
  background: #60A5FA;
}

.admin-sidebar .sidebar-footer {
  border-color: rgba(255, 255, 255, .08);
  background: var(--navy);
}

.admin-sidebar .market-back-link {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .6);
}

.admin-sidebar .market-back-link:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
}

.admin-sidebar .sidebar-logout button {
  color: rgba(255, 255, 255, .5);
}

.admin-sidebar .sidebar-logout button:hover {
  background: rgba(239, 68, 68, .15);
  color: #FCA5A5;
}

.admin-sidebar .brand {
  color: #fff;
}

/* Mediator / Support workspaces */
.mediator-layout,
.support-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

/* --- 39. FILTER BAR -------------------------------------------- */
.filter-bar {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: end;
  margin-block-end: 1.25rem;
}

.filter-bar .field {
  margin: 0;
  flex: 1;
  min-width: 150px;
}

.filter-bar .btn {
  height: 46px;
  flex-shrink: 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-block-end: 1rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  border-radius: var(--r-full);
  background: var(--blue-light);
  color: var(--blue-hover);
  font-size: .78rem;
  font-weight: 700;
}

.filter-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  padding: 0;
}

/* --- 40. PROFILE PAGE ------------------------------------------ */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 .25rem;
}

.profile-handle {
  color: var(--muted);
  font-size: .9rem;
}

.profile-headline {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-block: .5rem;
}

.profile-stats {
  display: flex;
  gap: 2rem;
  margin-block: .75rem;
}

.profile-stat span {
  display: block;
  font-size: .75rem;
  color: var(--muted);
}

.profile-stat strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
}

@media (max-width:700px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- 41. RESPONSIVE DASHBOARD ---------------------------------- */
@media (max-width:1100px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .workspace-side {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1023px) {
  :root {
    --sidebar-width: 0px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    width: min(86vw, 300px);
    transform: translateX(120%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }

  .account-sidebar .sidebar-close {
    display: flex;
  }

  .sidebar-open .account-sidebar {
    transform: translateX(0);
  }

  .sidebar-open {
    overflow: hidden;
  }

  .sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-launch {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .dashboard-main-content {
    padding-block-end: calc(3rem + 68px);
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: min(86vw, 300px);
    transform: translateX(120%);
    transition: transform .25s ease;
  }

  .sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .workspace-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width:600px) {
  .dashboard-topbar-inner {
    padding-inline: .85rem;
  }

  .dashboard-main-content {
    padding: 1rem .9rem calc(2rem + 68px);
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .cmd-palette-btn {
    display: none;
  }

  .wallet-chip .wallet-chip-label {
    display: none;
  }

  .workspace-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width:420px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

/* --- 42. RTL SIDEBAR GEOMETRY ----------------------------------- */
/* Sidebar on right side (RTL start) = right */
@media (min-width:901px) {

  /* Physical right is intentional here: the application is Arabic/RTL. */
  .account-sidebar {
    right: 0;
    left: auto;
    border-right: 0;
    border-left: 1px solid var(--sidebar-border);
  }

  .admin-sidebar {
    right: 0;
    left: auto;
    border-right: 0;
    border-left: 1px solid var(--sidebar-border);
  }

  .dashboard-layout {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .account-sidebar {
    grid-column: 1;
    grid-row: 1;
  }

  .account-main {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    min-width: 0;
  }

  .side-link.active::before {
    right: auto;
    left: 0;
    inset-inline: auto;
    border-radius: 0 3px 3px 0;
  }
}

/* --- 43. ERROR PAGES ------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 900;
  color: var(--blue-light);
  line-height: 1;
}

.error-page h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-block: .75rem .5rem;
}

.error-page p {
  color: var(--muted);
  max-width: 40ch;
  margin-inline: auto;
}

.error-actions {
  display: flex;
  gap: .65rem;
  justify-content: center;
  margin-block-start: 1.5rem;
  flex-wrap: wrap;
}

/* --- 44. MISC / SHARED ----------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .4fr);
  gap: 1.25rem;
  align-items: start;
}

.sticky-card {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
}

.prose h2:not(:first-child) {
  margin-block-start: 2rem;
}

.prose p {
  white-space: pre-wrap;
}

.form-card {
  max-width: 720px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
  max-width: 960px;
}

.page-section {
  margin-block: 1.5rem;
}

.money {
  font-variant-numeric: tabular-nums;
}

@media (max-width:900px) {

  .detail-grid,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .sticky-card {
    position: static;
  }
}

/* --- 45. SETTINGS PAGE ----------------------------------------- */
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 200px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width:800px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* --- 46. CONFIRM DIALOG ----------------------------------------- */
.confirm-dialog {
  text-align: center;
  padding: 2rem;
}

.confirm-dialog-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-inline: auto;
  margin-block-end: 1.25rem;
  font-size: 1.5rem;
}

.confirm-dialog-icon.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.confirm-dialog-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.confirm-dialog h2 {
  font-size: 1.15rem;
  margin-block-end: .5rem;
}

.confirm-dialog p {
  color: var(--muted);
  font-size: .9rem;
  margin-block-end: 1.5rem;
}

.confirm-dialog-actions {
  display: flex;
  gap: .65rem;
  justify-content: center;
}

/* --- 47. REDUCED MOTION ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }
}

/* --- 48. DATA-REVEAL ------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}



/* =====================================================================
   CSS SVG ICON SYSTEM
   Usage: <span class="ui-icon i-home" aria-hidden="true"></span>
   or:    <span class="ui-icon" data-icon="home"></span>
   No external icon font / network dependency.
   ===================================================================== */
.ui-icon,
[data-icon]::before {
  --icon-size: 1.15rem;
  display: inline-block;
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 var(--icon-size);
  background-color: currentColor;
  -webkit-mask: var(--ui-icon) center / contain no-repeat;
  mask: var(--ui-icon) center / contain no-repeat;
  vertical-align: -.16em;
}

[data-icon]::before {
  content: "";
}

.i-home,
[data-icon="home"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.8 12 3l9 7.8'/%3E%3Cpath d='M5.5 9.5V21h13V9.5M9 21v-7h6v7'/%3E%3C/svg%3E")
}

.i-dashboard,
[data-icon="dashboard"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E")
}

.i-project,
[data-icon="project"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6V4h8v2'/%3E%3Crect x='3' y='6' width='18' height='14' rx='2'/%3E%3Cpath d='M3 11h18M9 11v2h6v-2'/%3E%3C/svg%3E")
}

.i-requests,
[data-icon="requests"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M7 4h10a2 2 0 0 1 2 2v14H5V6a2 2 0 0 1 2-2Z'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E")
}

.i-services,
[data-icon="services"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.4 4.9L20 9l-4 3.9.9 5.6L12 16l-4.9 2.5.9-5.6L4 9l5.6-1.1L12 3Z'/%3E%3C/svg%3E")
}

.i-offer,
[data-icon="offer"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v12H4zM8 7V5h8v2'/%3E%3Cpath d='m8 13 2.5 2.5L16 10'/%3E%3C/svg%3E")
}

.i-message,
[data-icon="message"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v12H9l-5 4V5Z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E")
}

.i-bell,
[data-icon="bell"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9a6 6 0 0 1 12 0c0 7 3 7 3 7H3s3 0 3-7'/%3E%3Cpath d='M10 20h4'/%3E%3C/svg%3E")
}

.i-wallet,
[data-icon="wallet"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 6h15a2 2 0 0 1 2 2v11H5a2 2 0 0 1-2-2V7a3 3 0 0 1 3-3h12'/%3E%3Cpath d='M16 11h5v4h-5a2 2 0 1 1 0-4Z'/%3E%3C/svg%3E")
}

.i-invoice,
[data-icon="invoice"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2V3Z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E")
}

.i-clock,
[data-icon="clock"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")
}

.i-calendar,
[data-icon="calendar"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E")
}

.i-file,
[data-icon="file"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v5h4'/%3E%3C/svg%3E")
}

.i-user,
[data-icon="user"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E")
}

.i-users,
[data-icon="users"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='10' r='2.5'/%3E%3Cpath d='M3 20a6 6 0 0 1 12 0M14 16a5 5 0 0 1 7 4'/%3E%3C/svg%3E")
}

.i-star,
[data-icon="star"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.7 5.5 6.1.9-4.4 4.3 1 6.1-5.4-2.9-5.4 2.9 1-6.1-4.4-4.3 6.1-.9L12 3Z'/%3E%3C/svg%3E")
}

.i-heart,
[data-icon="heart"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 0 0-7.8 7.8L12 21l8.8-8.6a5.5 5.5 0 0 0 0-7.8Z'/%3E%3C/svg%3E")
}

.i-shield,
[data-icon="shield"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v5c0 5-3.4 8.6-8 10-4.6-1.4-8-5-8-10V6l8-3Z'/%3E%3Cpath d='m8.5 12 2.2 2.2 4.8-5'/%3E%3C/svg%3E")
}

.i-search,
[data-icon="search"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E")
}

.i-settings,
[data-icon="settings"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21h-4v-.1a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H3v-4h.1a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6 1.7 1.7 0 0 0 10 3V3h4v.1a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1H21v4h-.1a1.7 1.7 0 0 0-1.5 1Z'/%3E%3C/svg%3E")
}

.i-support,
[data-icon="support"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 13v-2a8 8 0 0 1 16 0v2'/%3E%3Crect x='3' y='12' width='4' height='6' rx='2'/%3E%3Crect x='17' y='12' width='4' height='6' rx='2'/%3E%3Cpath d='M17 19c-1 1-2.5 2-5 2'/%3E%3C/svg%3E")
}

.i-logout,
[data-icon="logout"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 8V5H4v14h10v-3M10 12h11M18 9l3 3-3 3'/%3E%3C/svg%3E")
}

.i-store,
[data-icon="store"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 10v10h16V10M3 10l2-6h14l2 6'/%3E%3Cpath d='M3 10a3 3 0 0 0 5 2 3 3 0 0 0 4 0 3 3 0 0 0 4 0 3 3 0 0 0 5-2'/%3E%3C/svg%3E")
}

.i-plus,
[data-icon="plus"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")
}

.i-chevron,
[data-icon="chevron"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")
}

.i-menu,
[data-icon="menu"] {
  --ui-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E")
}

/* Auto-icons for controls without inline SVG */
:root {
  --icon-store: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 10v10h16V10M3 10l2-6h14l2 6'/%3E%3Cpath d='M3 10a3 3 0 0 0 5 2 3 3 0 0 0 4 0 3 3 0 0 0 4 0 3 3 0 0 0 5-2'/%3E%3C/svg%3E");
  --icon-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M14 8V5H4v14h10v-3M10 12h11M18 9l3 3-3 3'/%3E%3C/svg%3E");
}

.market-back-link:not(:has(svg)):not(:has(.ui-icon))::before,
.sidebar-logout button:not(:has(svg)):not(:has(.ui-icon))::before,
.logout-link:not(:has(svg)):not(:has(.ui-icon))::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  -webkit-mask: var(--ui-icon) center/contain no-repeat;
  mask: var(--ui-icon) center/contain no-repeat;
}

.market-back-link:not(:has(svg)):not(:has(.ui-icon))::before {
  --ui-icon: var(--icon-store);
}

.sidebar-logout button:not(:has(svg)):not(:has(.ui-icon))::before,
.logout-link:not(:has(svg)):not(:has(.ui-icon))::before {
  --ui-icon: var(--icon-logout);
}

/* =====================================================================
   CSS REPAIR LAYER — 2026-09
   Compatibility rules for Blade components and backoffice shell.
   These are deliberately limited to utility classes used by this project.
   ===================================================================== */

/* Legacy flash/alert markup used by admin, mediator and support layouts. */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: .875rem;
  line-height: 1.7
}

.alert-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800
}

.alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-weight: 900
}

.alert ul {
  margin: .5rem 1rem 0 0;
  padding: 0
}

.alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534
}

.alert-success .alert-icon {
  background: #dcfce7;
  color: #15803d
}

.alert-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b
}

.alert-danger .alert-icon {
  background: #fee2e2;
  color: #b91c1c
}

.alert-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e
}

.alert-warning .alert-icon {
  background: #fef3c7;
  color: #b45309
}

/* Backoffice shell: matches views/layouts/admin.blade.php and admin-sidebar. */
.dashboard-page {
  min-height: 100vh;
  background: var(--page)
}

.dashboard-shell {
  min-height: 100vh;
  background: var(--page)
}

.dashboard-main {
  min-width: 0;
  min-height: 100vh;
  margin-right: 270px;
  margin-left: 0
}

.dashboard-top {
  position: sticky;
  top: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: .7rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px) saturate(150%)
}

.dashboard-top-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-inline-start: auto
}

.dashboard-content {
  min-width: 0;
  padding-block: 1.5rem 3rem
}

.dashboard-content>.container {
  width: min(1500px, calc(100% - 2rem))
}

.top-profile {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0
}

.top-profile .avatar {
  width: 34px;
  height: 34px
}

.top-profile .name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 700
}

.admin-sidebar {
  position: fixed;
  inset-block: 0;
  right: 0;
  left: auto;
  width: 270px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--line);
  border-right: 0;
  box-shadow: -8px 0 30px rgba(15, 23, 42, .03)
}

.admin-sidebar .sidebar-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 64px;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar-bg)
}

.admin-sidebar .sidebar-user {
  margin: .7rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft)
}

.admin-sidebar .sidebar-user-info {
  min-width: 0
}

.admin-sidebar .sidebar-user-info strong,
.admin-sidebar .sidebar-user-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.admin-sidebar .sidebar-user-info strong {
  font-size: .82rem
}

.admin-sidebar .sidebar-user-info span {
  font-size: .68rem;
  color: var(--muted)
}

.admin-sidebar .sidebar-nav {
  padding: .25rem .65rem .9rem
}

.admin-sidebar .sidebar-label {
  display: block;
  padding: .9rem .65rem .3rem;
  color: #94a3b8;
  font-size: .65rem;
  font-weight: 800
}

.admin-sidebar>.sidebar-nav+.sidebar-footer,
.admin-sidebar>div:last-child {
  margin-top: auto
}

.admin-sidebar .sidebar-close {
  display: none
}

/* Small semantic gaps left by legacy templates. */
.page-head.compact {
  padding-block: 1.15rem;
  margin-block-end: 1rem
}

.page-head.compact h1 {
  font-size: clamp(1.45rem, 2.4vw, 2rem)
}

.tab-content {
  min-width: 0
}

.brand-light {
  color: #fff
}

.text-link {
  color: var(--blue);
  font-weight: 700
}

.text-link:hover {
  text-decoration: underline
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-size: .75rem;
  color: var(--text-2)
}

/* Minimal Tailwind-compatible utility subset used by Blade components. */
.flex {
  display: flex
}

.inline-flex {
  display: inline-flex
}

.grid {
  display: grid
}

.block {
  display: block
}

.hidden {
  display: none !important
}

.relative {
  position: relative
}

.absolute {
  position: absolute
}

.fixed {
  position: fixed
}

.sticky {
  position: sticky
}

.flex-1 {
  flex: 1 1 0%
}

.flex-col {
  flex-direction: column
}

.flex-wrap {
  flex-wrap: wrap
}

.shrink-0 {
  flex-shrink: 0
}

.items-center {
  align-items: center
}

.items-start {
  align-items: flex-start
}

.justify-center {
  justify-content: center
}

.justify-between {
  justify-content: space-between
}

.justify-end {
  justify-content: flex-end
}

.gap-1 {
  gap: .25rem
}

.gap-1\.5 {
  gap: .375rem
}

.gap-2 {
  gap: .5rem
}

.gap-2\.5 {
  gap: .625rem
}

.gap-3 {
  gap: .75rem
}

.gap-4 {
  gap: 1rem
}

.w-full {
  width: 100%
}

.w-10 {
  width: 2.5rem
}

.w-12 {
  width: 3rem
}

.w-16 {
  width: 4rem
}

.w-20 {
  width: 5rem
}

.h-0\.5 {
  height: .125rem
}

.h-10 {
  height: 2.5rem
}

.h-12 {
  height: 3rem
}

.h-16 {
  height: 4rem
}

.h-20 {
  height: 5rem
}

.h-auto {
  height: auto
}

.min-w-0 {
  min-width: 0
}

.max-w-xs {
  max-width: 20rem
}

.max-w-md {
  max-width: 28rem
}

.p-0 {
  padding: 0
}

.p-1 {
  padding: .25rem
}

.p-4 {
  padding: 1rem
}

.p-5 {
  padding: 1.25rem
}

.p-6 {
  padding: 1.5rem
}

.px-1 {
  padding-inline: .25rem
}

.px-1\.5 {
  padding-inline: .375rem
}

.px-2 {
  padding-inline: .5rem
}

.px-2\.5 {
  padding-inline: .625rem
}

.px-3 {
  padding-inline: .75rem
}

.px-4 {
  padding-inline: 1rem
}

.px-5 {
  padding-inline: 1.25rem
}

.px-6 {
  padding-inline: 1.5rem
}

.py-0\.5 {
  padding-block: .125rem
}

.py-1 {
  padding-block: .25rem
}

.py-1\.5 {
  padding-block: .375rem
}

.py-2 {
  padding-block: .5rem
}

.py-2\.5 {
  padding-block: .625rem
}

.py-3 {
  padding-block: .75rem
}

.py-3\.5 {
  padding-block: .875rem
}

.py-4 {
  padding-block: 1rem
}

.py-12 {
  padding-block: 3rem
}

.pt-2 {
  padding-top: .5rem
}

.pt-4 {
  padding-top: 1rem
}

.pr-4 {
  padding-right: 1rem
}

.pl-3 {
  padding-left: .75rem
}

.pl-12 {
  padding-left: 3rem
}

.pe-10 {
  padding-inline-end: 2.5rem
}

.m-auto {
  margin: auto
}

.mx-auto {
  margin-inline: auto
}

.my-4 {
  margin-block: 1rem
}

.mt-1 {
  margin-top: .25rem
}

.mt-2 {
  margin-top: .5rem
}

.mt-4 {
  margin-top: 1rem
}

.mb-0\.5 {
  margin-bottom: .125rem
}

.mb-1 {
  margin-bottom: .25rem
}

.mb-2 {
  margin-bottom: .5rem
}

.mb-3 {
  margin-bottom: .75rem
}

.mb-4 {
  margin-bottom: 1rem
}

.mb-5 {
  margin-bottom: 1.25rem
}

.mb-6 {
  margin-bottom: 1.5rem
}

.-mb-px {
  margin-bottom: -1px
}

.rounded {
  border-radius: .25rem
}

.rounded-lg {
  border-radius: .5rem
}

.rounded-xl {
  border-radius: .75rem
}

.rounded-2xl {
  border-radius: 1rem
}

.rounded-full {
  border-radius: 9999px
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: var(--line)
}

.border-2 {
  border-width: 2px;
  border-style: solid
}

.border-t {
  border-top: 1px solid var(--line)
}

.border-b {
  border-bottom: 1px solid var(--line)
}

.border-b-2 {
  border-bottom-width: 2px;
  border-bottom-style: solid
}

.border-dashed {
  border-style: dashed
}

.border-transparent {
  border-color: transparent
}

.border-slate-100 {
  border-color: #f1f5f9
}

.border-slate-200 {
  border-color: #e2e8f0
}

.border-slate-300 {
  border-color: #cbd5e1
}

.border-blue-100 {
  border-color: #dbeafe
}

.border-blue-200 {
  border-color: #bfdbfe
}

.border-blue-600 {
  border-color: #2563eb
}

.border-emerald-200 {
  border-color: #a7f3d0
}

.border-amber-200 {
  border-color: #fde68a
}

.border-red-200 {
  border-color: #fecaca
}

.border-sky-200 {
  border-color: #bae6fd
}

.bg-transparent {
  background: transparent
}

.bg-white {
  background: var(--surface)
}

.bg-slate-50 {
  background: #f8fafc
}

.bg-slate-50\/50 {
  background: rgba(248, 250, 252, .5)
}

.bg-slate-100 {
  background: #f1f5f9
}

.bg-slate-200 {
  background: #e2e8f0
}

.bg-blue-50 {
  background: #eff6ff
}

.bg-blue-100 {
  background: #dbeafe
}

.bg-blue-600 {
  background: #2563eb
}

.bg-emerald-50 {
  background: #ecfdf5
}

.bg-emerald-600 {
  background: #059669
}

.bg-amber-50 {
  background: #fffbeb
}

.bg-red-50 {
  background: #fef2f2
}

.bg-red-600 {
  background: #dc2626
}

.bg-sky-50 {
  background: #f0f9ff
}

.text-white {
  color: #fff
}

.text-slate-300 {
  color: #cbd5e1
}

.text-slate-400 {
  color: #94a3b8
}

.text-slate-500 {
  color: #64748b
}

.text-slate-600 {
  color: #475569
}

.text-slate-700 {
  color: #334155
}

.text-slate-800 {
  color: #1e293b
}

.text-slate-900 {
  color: #0f172a
}

.text-blue-500 {
  color: #3b82f6
}

.text-blue-600 {
  color: #2563eb
}

.text-blue-700 {
  color: #1d4ed8
}

.text-blue-900 {
  color: #1e3a8a
}

.text-emerald-500 {
  color: #10b981
}

.text-emerald-700 {
  color: #047857
}

.text-emerald-900 {
  color: #064e3b
}

.text-amber-500 {
  color: #f59e0b
}

.text-amber-700 {
  color: #b45309
}

.text-amber-900 {
  color: #78350f
}

.text-red-500 {
  color: #ef4444
}

.text-red-600 {
  color: #dc2626
}

.text-red-700 {
  color: #b91c1c
}

.text-red-900 {
  color: #7f1d1d
}

.text-sky-700 {
  color: #0369a1
}

.text-\[10px\] {
  font-size: 10px
}

.text-\[11px\] {
  font-size: 11px
}

.text-xs {
  font-size: .75rem
}

.text-sm {
  font-size: .875rem
}

.text-base {
  font-size: 1rem
}

.text-lg {
  font-size: 1.125rem
}

.text-xl {
  font-size: 1.25rem
}

.text-2xl {
  font-size: 1.5rem
}

.text-3xl {
  font-size: 1.875rem
}

.text-center {
  text-align: center
}

.text-start {
  text-align: start
}

.font-normal {
  font-weight: 400
}

.font-medium {
  font-weight: 500
}

.font-semibold {
  font-weight: 600
}

.font-bold {
  font-weight: 700
}

.font-extrabold {
  font-weight: 800
}

.font-black {
  font-weight: 900
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace
}

.leading-tight {
  line-height: 1.25
}

.leading-relaxed {
  line-height: 1.625
}

.shadow {
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 1px 2px rgba(15, 23, 42, .08)
}

.shadow-sm {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06)
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .25)
}

.overflow-hidden {
  overflow: hidden
}

.overflow-x-auto {
  overflow-x: auto
}

.whitespace-nowrap {
  white-space: nowrap
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden
}

.border-collapse {
  border-collapse: collapse
}

.align-middle {
  vertical-align: middle
}

.pointer-events-none {
  pointer-events: none
}

.select-none {
  user-select: none
}

.select-all {
  user-select: all
}

.cursor-pointer {
  cursor: pointer
}

.transition {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity;
  transition-duration: .15s
}

.transition-all {
  transition: all .2s
}

.transition-colors {
  transition: color .15s, background-color .15s, border-color .15s
}

.duration-200 {
  transition-duration: .2s
}

.inset-y-0 {
  top: 0;
  bottom: 0
}

.left-0 {
  left: 0
}

.right-0 {
  right: 0
}

.top-1\/2 {
  top: 50%
}

.-bottom-1 {
  bottom: -.25rem
}

.-left-1 {
  left: -.25rem
}

.-translate-y-1\/2 {
  transform: translateY(-50%)
}

.z-10 {
  z-index: 10
}

.-z-0 {
  z-index: 0
}

.space-y-3>:not([hidden])~:not([hidden]) {
  margin-top: .75rem
}

.space-y-6>:not([hidden])~:not([hidden]) {
  margin-top: 1.5rem
}

.space-x-6>:not([hidden])~:not([hidden]) {
  margin-inline-start: 1.5rem
}

.space-x-reverse>:not([hidden])~:not([hidden]) {
  margin-inline-start: 0;
  margin-inline-end: 1.5rem
}

.divide-y>:not([hidden])~:not([hidden]) {
  border-top-width: 1px;
  border-top-style: solid
}

.divide-slate-100>:not([hidden])~:not([hidden]) {
  border-color: #f1f5f9
}

.ring-4 {
  box-shadow: 0 0 0 4px currentColor
}

.ring-blue-50 {
  --ring-color: #eff6ff
}

.ring-4.ring-blue-50 {
  box-shadow: 0 0 0 4px #eff6ff
}

.hover\:underline:hover {
  text-decoration: underline
}

.hover\:bg-blue-700:hover {
  background: #1d4ed8
}

.hover\:bg-red-700:hover {
  background: #b91c1c
}

.hover\:bg-slate-100:hover {
  background: #f1f5f9
}

.hover\:bg-slate-200:hover {
  background: #e2e8f0
}

.hover\:text-slate-700:hover {
  color: #334155
}

.hover\:text-slate-900:hover {
  color: #0f172a
}

.hover\:text-blue-600:hover {
  color: #2563eb
}

.hover\:border-blue-300:hover {
  border-color: #93c5fd
}

.hover\:border-slate-300:hover {
  border-color: #cbd5e1
}

.hover\:shadow-md:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .10)
}

.focus-visible\:ring-2:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .45);
  outline-offset: 2px
}

.focus-visible\:ring-blue-500:focus-visible {
  outline-color: #3b82f6
}

.focus-visible\:ring-red-500:focus-visible {
  outline-color: #ef4444
}

.focus-visible\:ring-slate-400:focus-visible {
  outline-color: #94a3b8
}

.focus\:border-blue-500:focus {
  border-color: #3b82f6
}

.focus\:ring-blue-500:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .16)
}

.disabled\:opacity-50:disabled {
  opacity: .5
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed
}

@media(min-width:640px) {
  .sm\:flex-row {
    flex-direction: row
  }

  .sm\:w-48 {
    width: 12rem
  }

  .sm\:w-auto {
    width: auto
  }

  .sm\:text-sm {
    font-size: .875rem
  }
}

@media(min-width:768px) {
  .md\:flex-row {
    flex-direction: row
  }

  .md\:items-center {
    align-items: center
  }
}

@media(max-width:900px) {
  .dashboard-main {
    margin: 0
  }

  .admin-sidebar {
    width: min(88vw, 310px);
    right: 0;
    left: auto;
    transform: translateX(110%);
    transition: transform .24s ease;
    box-shadow: -22px 0 60px rgba(15, 23, 42, .16)
  }

  .admin-sidebar.active,
  .sidebar-open .admin-sidebar {
    transform: translateX(0)
  }

  .admin-sidebar.active+.sidebar-scrim,
  .sidebar-open .admin-sidebar~.sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-sidebar .sidebar-close {
    display: flex
  }

  .dashboard-top .sidebar-launch {
    display: flex
  }

  .dashboard-content>.container {
    width: min(100% - 1.25rem, 1500px)
  }

  .dashboard-grid,
  .grid-3 {
    grid-template-columns: 1fr
  }
}

html[data-theme="dark"] .dashboard-top,
html[data-theme="dark"] .admin-sidebar,
html[data-theme="dark"] .admin-sidebar .sidebar-head {
  background: rgba(15, 30, 46, .98);
  border-color: var(--line)
}

html[data-theme="dark"] .admin-sidebar .sidebar-user {
  background: var(--soft);
  border-color: var(--line)
}

html[data-theme="dark"] .admin-sidebar .sidebar-label {
  color: var(--muted)
}

html[data-theme="dark"] .bg-white {
  background: var(--surface)
}

html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] .bg-slate-50\/50,
html[data-theme="dark"] .bg-slate-100 {
  background: var(--soft)
}

html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800 {
  color: var(--text)
}

html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-600 {
  color: var(--text-2)
}

html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300 {
  border-color: var(--line)
}

/* =====================================================================
   NOTIFICATION CENTER & CHAT SYSTEM POLISH
   ===================================================================== */
.notifications-container {
  max-width: 880px;
  margin-inline: auto;
}

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

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.notification-card {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.notification-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(37, 99, 235, 0.35);
}

.notification-card.unread {
  background: var(--surface);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.notification-card.unread::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
}

[dir="ltr"] .notification-card.unread::before {
  border-radius: 4px 0 0 4px;
}

.notification-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.notification-card.unread .notification-icon-wrap {
  background: var(--blue-light);
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.25);
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.3rem;
}

.notification-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.notification-time {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notification-text {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 0.55rem 0;
}

.notification-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  transition: gap 0.15s ease;
}

.notification-action:hover {
  gap: 0.55rem;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  align-self: center;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

/* Chat Card Dark Mode & Layout Refinement */
.chat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

.chat-head {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}

.chat-thread {
  background: var(--page);
}

.chat-compose {
  background: var(--surface);
  border-block-start: 1px solid var(--line);
}

/* =====================================================================
   SETTINGS & ACCOUNT EDIT WORKSPACE
   ===================================================================== */
.settings-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav-card {
    position: static !important;
  }

  .settings-tabs {
    flex-direction: row !important;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

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

  .settings-tab-btn {
    white-space: nowrap;
  }
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: right;
  width: 100%;
}

.settings-tab-btn svg {
  color: var(--muted);
  transition: color 0.18s ease;
  flex-shrink: 0;
}

.settings-tab-btn:hover {
  background: var(--soft);
  color: var(--text);
}

.settings-tab-btn:hover svg {
  color: var(--text);
}

.settings-tab-btn.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.settings-tab-btn.active svg {
  color: var(--sidebar-active-icon);
}

.settings-panel {
  display: block;
  animation: fadeInPanel 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-panel[hidden] {
  display: none !important;
}

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

/* =====================================================================
   DARK THEME COMPONENT COMPLETION & FORM REFINEMENTS
   ===================================================================== */
html[data-theme="dark"] .field,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #0B1726 !important;
  border-color: rgba(148, 163, 184, .18) !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .field:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18) !important;
}

html[data-theme="dark"] .field::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748B !important;
}

html[data-theme="dark"] .field:disabled,
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] select:disabled {
  background: #07101C !important;
  border-color: rgba(148, 163, 184, .1) !important;
  color: #8492A6 !important;
  cursor: not-allowed;
}

html[data-theme="dark"] .field-error,
html[data-theme="dark"] .has-error {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, .08) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .16) !important;
}

html[data-theme="dark"] select option {
  background: #0A1524;
  color: #F8FAFC;
}

/* Modals & Dialogs */
html[data-theme="dark"] dialog,
html[data-theme="dark"] dialog.modal,
html[data-theme="dark"] dialog.command-palette-dialog,
html[data-theme="dark"] #cmd-palette {
  background: #0D1B2D;
  border-color: rgba(148, 163, 184, .14);
  color: #F8FAFC;
}

html[data-theme="dark"] dialog::backdrop,
html[data-theme="dark"] .command-palette-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

html[data-theme="dark"] .palette-head {
  border-bottom-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .palette-head input {
  color: #F8FAFC;
}

html[data-theme="dark"] .palette-head kbd {
  background: #112238;
  border-color: rgba(148, 163, 184, .14);
  color: #8492A6;
}

html[data-theme="dark"] .palette-item {
  color: #CBD5E1;
}

html[data-theme="dark"] .palette-item:hover {
  background: rgba(59, 130, 246, .14);
  color: #60A5FA;
}

html[data-theme="dark"] .palette-icon {
  background: #112238;
  color: #8492A6;
}

/* Dropdowns & Panels */
html[data-theme="dark"] .dropdown-panel,
html[data-theme="dark"] .quick-create-panel,
html[data-theme="dark"] .user-dropdown-panel {
  background: #0D1B2D;
  border-color: rgba(148, 163, 184, .14);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .dropdown-header,
html[data-theme="dark"] .user-dropdown-role {
  color: #8492A6;
}

html[data-theme="dark"] .user-dropdown-name {
  color: #F8FAFC;
}

html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .user-dropdown-item {
  color: #CBD5E1;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .user-dropdown-item:hover {
  background: rgba(59, 130, 246, .14);
  color: #60A5FA;
}

html[data-theme="dark"] .dropdown-item strong {
  color: #F8FAFC;
}

html[data-theme="dark"] .dropdown-item small {
  color: #8492A6;
}

html[data-theme="dark"] .dropdown-sep,
html[data-theme="dark"] .user-dropdown-divider {
  background: rgba(148, 163, 184, .14);
}

/* Sidebar in Dark Mode */
html[data-theme="dark"] .account-sidebar,
html[data-theme="dark"] .admin-rail,
html[data-theme="dark"] .admin-sidebar {
  background: #081525 !important;
  border-color: rgba(148, 163, 184, .14) !important;
}

html[data-theme="dark"] .account-sidebar .account-sidebar-head,
html[data-theme="dark"] .account-sidebar .sidebar-user,
html[data-theme="dark"] .account-sidebar .sidebar-footer {
  background: #081525;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .side-link {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .side-link svg {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .side-link:hover {
  background: rgba(255, 255, 255, .04) !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .side-link:hover svg {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .side-link.active {
  background: rgba(59, 130, 246, .14) !important;
  color: #60A5FA !important;
  border: 1px solid rgba(59, 130, 246, .15) !important;
}

html[data-theme="dark"] .side-link.active svg {
  color: #3B82F6 !important;
}

html[data-theme="dark"] .role-pill {
  background: #0D1B2D;
  color: #CBD5E1;
}

html[data-theme="dark"] .role-pill.active {
  background: rgba(59, 130, 246, .14);
  color: #60A5FA;
}

html[data-theme="dark"] .role-pill:hover {
  background: rgba(255, 255, 255, .08);
}

/* Topbar in Dark Mode */
html[data-theme="dark"] .dashboard-topbar {
  background: rgba(7, 16, 28, 0.94) !important;
  border-bottom-color: rgba(148, 163, 184, .14) !important;
}

html[data-theme="dark"] .cmd-palette-btn {
  background: #0D1B2D;
  border-color: rgba(148, 163, 184, .14);
  color: #CBD5E1;
}

html[data-theme="dark"] .cmd-palette-btn kbd {
  background: #112238;
  border-color: rgba(148, 163, 184, .14);
  color: #8492A6;
}

html[data-theme="dark"] .wallet-chip {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
  color: #CBD5E1;
}

html[data-theme="dark"] .topbar-user {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
  color: #F8FAFC;
}

html[data-theme="dark"] .topbar-user:hover {
  background: #0D1B2D;
}

html[data-theme="dark"] .header-icon,
html[data-theme="dark"] .header-icon-btn,
html[data-theme="dark"] .theme-toggle {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
  color: #CBD5E1;
}

html[data-theme="dark"] .header-icon:hover,
html[data-theme="dark"] .header-icon-btn:hover,
html[data-theme="dark"] .theme-toggle:hover {
  background: #0D1B2D;
  border-color: #3B82F6;
  color: #3B82F6;
}

/* Inverted White Header & Background Protection */
html[data-theme="dark"] .skip-link {
  background: #081525;
  color: #F8FAFC;
  border: 1px solid rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .support-header,
html[data-theme="dark"] .mediator-header {
  background: #081525 !important;
  color: #F8FAFC !important;
  border-bottom: 1px solid rgba(148, 163, 184, .14) !important;
}

html[data-theme="dark"] .badge-navy {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93C5FD !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .preview-footer button {
  background: #3B82F6 !important;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .balance-card-main {
  background: #0D1B2D !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
  color: #F8FAFC !important;
}

html[data-theme="dark"] .balance-card-main .balance-label {
  color: #8492A6 !important;
}

html[data-theme="dark"] .balance-card-main .balance-value {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .balance-card-sub {
  background: #0A1524 !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
}

html[data-theme="dark"] .balance-card-sub .balance-value {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .admin-sidebar,
html[data-theme="dark"] .admin-sidebar .sidebar-footer {
  background: #081525 !important;
}

html[data-theme="dark"] .how-section {
  background: #05070B !important;
}

html[data-theme="dark"] .cta-panel {
  background: #0D1B2D !important;
  border: 1px solid rgba(148, 163, 184, .14) !important;
}

html[data-theme="dark"] .admin-topbar {
  background: rgba(7, 16, 28, .96) !important;
  border-bottom-color: rgba(148, 163, 184, .14) !important;
}

/* Chat & Messages in Dark Mode */
html[data-theme="dark"] .chat-thread {
  background: #070D16;
}

html[data-theme="dark"] .chat-bubble {
  background: #0D1B2D;
  border: 1px solid rgba(148, 163, 184, .14);
  color: #F8FAFC;
}

html[data-theme="dark"] .chat-message.own .chat-bubble {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

html[data-theme="dark"] .chat-message.own .chat-bubble .chat-bubble-time {
  color: rgba(255, 255, 255, 0.75);
}

html[data-theme="dark"] .chat-compose {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .inbox-card {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .inbox-card.unread {
  background: rgba(59, 130, 246, .08);
  border-color: rgba(59, 130, 246, .3);
}

/* Notifications in Dark Mode */
html[data-theme="dark"] .notification-card {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .notification-card.unread {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.06);
}

html[data-theme="dark"] .notification-icon-wrap {
  background: #0D1B2D;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .notification-card.unread .notification-icon-wrap {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.25);
}

/* Tables in Dark Mode */
html[data-theme="dark"] th {
  background: #0D1B2D;
  color: #CBD5E1;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] td {
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] tr:hover td {
  background: #0D1B2D;
}

/* Status Badges in Dark Mode */
html[data-theme="dark"] .status-badge {
  border: 1px solid transparent;
}

html[data-theme="dark"] .status-active {
  background: rgba(16, 185, 129, .15);
  color: #34D399;
  border-color: rgba(16, 185, 129, .25);
}

html[data-theme="dark"] .status-pending {
  background: rgba(245, 158, 11, .15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, .25);
}

html[data-theme="dark"] .status-completed {
  background: rgba(59, 130, 246, .15);
  color: #60A5FA;
  border-color: rgba(59, 130, 246, .25);
}

html[data-theme="dark"] .status-cancelled,
html[data-theme="dark"] .status-failed,
html[data-theme="dark"] .status-closed {
  background: rgba(148, 163, 184, .12);
  color: #94A3B8;
  border-color: rgba(148, 163, 184, .2);
}

html[data-theme="dark"] .status-delivered {
  background: rgba(16, 185, 129, .15);
  color: #34D399;
  border-color: rgba(16, 185, 129, .25);
}

html[data-theme="dark"] .status-revision {
  background: rgba(245, 158, 11, .15);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, .25);
}

/* Tabs in Dark Mode */
html[data-theme="dark"] .tab-link {
  color: #8492A6;
}

html[data-theme="dark"] .tab-link:hover {
  color: #F8FAFC;
}

html[data-theme="dark"] .tab-link.active {
  color: #60A5FA;
  border-color: #3B82F6;
}

/* Alerts & Toasts in Dark Mode */
html[data-theme="dark"] .alert-success {
  border-color: rgba(16, 185, 129, .25);
  background: rgba(16, 185, 129, .08);
  color: #34D399;
}

html[data-theme="dark"] .alert-success .alert-icon {
  background: rgba(16, 185, 129, .18);
  color: #34D399;
}

html[data-theme="dark"] .alert-danger {
  border-color: rgba(239, 68, 68, .25);
  background: rgba(239, 68, 68, .08);
  color: #F87171;
}

html[data-theme="dark"] .alert-danger .alert-icon {
  background: rgba(239, 68, 68, .18);
  color: #F87171;
}

html[data-theme="dark"] .alert-warning {
  border-color: rgba(245, 158, 11, .25);
  background: rgba(245, 158, 11, .08);
  color: #FBBF24;
}

html[data-theme="dark"] .alert-warning .alert-icon {
  background: rgba(245, 158, 11, .18);
  color: #FBBF24;
}

html[data-theme="dark"] .alert-info {
  border-color: rgba(59, 130, 246, .25);
  background: rgba(59, 130, 246, .08);
  color: #60A5FA;
}

html[data-theme="dark"] .alert-info .alert-icon {
  background: rgba(59, 130, 246, .18);
  color: #60A5FA;
}

/* Empty States in Dark Mode */
html[data-theme="dark"] .all-clear-card {
  background: #0A1524;
  border-color: rgba(148, 163, 184, .14);
}

html[data-theme="dark"] .all-clear-icon {
  background: rgba(16, 185, 129, .14);
  color: #34D399;
}

html[data-theme="dark"] .empty-state {
  color: #CBD5E1;
}

html[data-theme="dark"] .empty-state p {
  color: #8492A6;
}

/* Scrollbars in Dark Mode */
html[data-theme="dark"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: transparent;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .25);
  border-radius: 4px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, .4);
}

html[data-theme="dark"] {
  scrollbar-color: rgba(148, 163, 184, .25) transparent;
}