/* ==========================================================================
   Courier & Parcel Delivery Management System - application stylesheet
   Bootstrap 5 + custom components, RTL/LTR aware
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}

:root {
  --brand: #ffd103; --bs-primary: #ffd103; --bs-primary-rgb: 255, 209, 3;
  --brand-dark: #e0b400;
  --brand-soft: #fff8d6; --brand-ink: #8a6d00;
  /* Light scheme (default): sidebar follows the page background */
  --sidebar-bg: var(--page-bg);
  --sidebar-hover: #e9edf6;
  --sidebar-active: #e0b400;
  --sidebar-text: #4a5568;
  --sidebar-heading: #6b7488;
  --sidebar-border: rgba(16, 25, 43, .09);
  --sidebar-brand-text: #10192b;
  --sidebar-link-hover-text: #10192b;
  --sidebar-scrollbar: #cbd3e0;
  --topbar-height: 78px;
  --sidebar-width: 332px;
  --rail-width: 96px;
  --sub-bg: #fff;
  --rail-border: rgba(16, 25, 43, .09);
  --radius: .6rem;
  --shadow-sm: 0 1px 2px rgba(16, 25, 43, .06);
  --shadow: 0 4px 16px rgba(16, 25, 43, .08);
  --page-bg: #f4f6fb;
  --chart-grid: rgba(16, 25, 43, .08);
  --chart-label: #8a93a8;
  --chart-center: #1f2937;
}

html[lang="fa"], html[lang="ps"] { font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif; }
html[lang="en"] { font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif; }

body {
  background: var(--page-bg);
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  font-size: .925rem;
  min-height: 100vh;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   Public website
   ========================================================================== */

.site-navbar {
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(16, 25, 43, .07);
  transition: box-shadow .2s ease;
}
.site-navbar.scrolled { box-shadow: var(--shadow); }
.site-navbar .navbar-brand { font-weight: 700; letter-spacing: -.4px; }
.site-navbar .brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #ffb300);
  color: #10192b; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-inline-end: .55rem;
}

/* --- Uploaded company logo — takes the place of .brand-mark ------------- */
.brand-logo {
  display: inline-block; box-sizing: border-box;
  height: 34px; width: auto; max-width: 130px;
  object-fit: contain; object-position: center;
  vertical-align: middle; border-radius: 6px;
}
.rail-brand .brand-logo { height: 34px; width: 34px; max-width: 34px; }
.sidebar-brand .brand-logo { height: 34px; max-width: 116px; }
.site-navbar .brand-logo { height: 38px; max-width: 150px; margin-inline-end: .55rem; }
.site-footer .brand-logo {
  height: 40px; max-width: 160px; border-radius: 6px;
}
/* the logo is a dark tile with gold artwork — no light plate behind it */
.auth-brand .brand-logo {
  height: 46px; max-width: 170px; border-radius: 10px;
}
.auth-panel-top .brand-logo {
  height: 40px; max-width: 150px; border-radius: 8px;
}
.site-nav-link { font-weight: 500; color: #34405a !important; padding: .5rem .78rem !important; border-radius: .5rem; }
.site-nav-link:hover { background: #eef2f9; color: var(--brand-ink) !important; text-decoration: none; }
.site-nav-link.active { color: var(--brand-ink) !important; background: var(--brand-soft); }

.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(900px 420px at 12% 10%, rgba(255,209,3,.20), transparent 60%),
    radial-gradient(760px 420px at 88% 24%, rgba(111,66,193,.22), transparent 62%),
    linear-gradient(160deg, #171717 0%, #212121 55%, #2b2b2b 100%);
  color: #fff;
  overflow: hidden;
}
.hero h1 { font-weight: 800; letter-spacing: -1.2px; line-height: 1.25; }
.hero .lead { color: #c6d2e8; font-size: 1.08rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: .42rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; pointer-events: none; }

.track-card {
  background: #fff; border-radius: 1rem; padding: 1.35rem;
  box-shadow: 0 22px 50px rgba(6, 14, 34, .35);
}
.track-card .input-group-text { background: #fff; border-inline-end: 0; }
[dir="rtl"] .track-card .input-group-text { border-inline-end: 1px solid #dee2e6; border-inline-start: 0; }
.track-input { font-weight: 600; letter-spacing: 1.4px; }

.section { padding: 4.25rem 0; }
.section-title { font-weight: 800; letter-spacing: -.6px; }
.section-muted { color: #66708a; }
.eyebrow {
  text-transform: uppercase; font-size: .76rem; letter-spacing: 2px;
  font-weight: 700; color: var(--brand-ink);
}

.card-soft {
  background: #fff; border: 1px solid rgba(16,25,43,.07);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-soft:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Live shipping-fee card shown beside the package fields on the public form. */
.quote-card {
  background: linear-gradient(150deg, #fffdf1 0%, #fff 62%);
  border: 1px solid rgba(224, 180, 0, .45);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(16, 25, 43, .10);
}
.quote-card .quote-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #10192b; font-size: 1.15rem;
}
.quote-card .quote-amount {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12;
  font-weight: 800; letter-spacing: -.5px; color: #10192b;
}
.quote-card #quoteParts li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .28rem 0; border-bottom: 1px dashed rgba(16, 25, 43, .09);
}
.quote-card #quoteParts li:last-child { border-bottom: 0; }
html[data-theme="dark"] .quote-card {
  background: linear-gradient(150deg, rgba(255, 209, 3, .12) 0%, var(--panel-bg) 65%);
  border-color: rgba(255, 209, 3, .35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .quote-card .quote-amount { color: #ffe566; }
html[data-theme="dark"] .quote-card #quoteParts li { border-bottom-color: rgba(255, 255, 255, .12); }

.icon-tile {
  width: 54px; height: 54px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--brand-soft); color: var(--brand-ink);
}
.icon-tile.alt { background: #fff0f6; color: #d63384; }
.icon-tile.green { background: #e6f6ec; color: #198754; }
.icon-tile.amber { background: #fff6e5; color: #fd7e14; }

.step-node {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; background: #fff; border: 2px solid #dbe2ee; color: #94a3b8;
}
.step-node.done { background: #198754; border-color: #198754; color: #fff; }
.step-node.current { background: var(--brand); border-color: var(--brand); color: #10192b; box-shadow: 0 0 0 6px rgba(255,209,3,.16); }

.stat-tile {
  background: #fff; border-radius: var(--radius); border: 1px solid rgba(16,25,43,.07);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
}
.stat-tile .stat-value { font-size: 1.65rem; font-weight: 800; letter-spacing: -.6px; }
.stat-tile .stat-label { color: #69748c; font-size: .83rem; font-weight: 500; }

.site-footer { background: #212121; color: #98a4bd; padding: 3.2rem 0 1.6rem; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #98a4bd; }
.site-footer a:hover { color: #fff; }

.faq-item { background: #fff; border: 1px solid rgba(16,25,43,.08); border-radius: var(--radius); }
.faq-item .faq-q { font-weight: 600; cursor: pointer; padding: 1rem 1.2rem; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item .faq-a { padding: 0 1.2rem 1.1rem; color: #5b6478; }
.faq-item .faq-q i { transition: transform .25s ease; }
.faq-item.open .faq-q i { transform: rotate(180deg); }

.review-card { background: #fff; border: 1px solid rgba(16,25,43,.08); border-radius: var(--radius); padding: 1.4rem; }
.rating-star { color: #f7b500; }

/* ==========================================================================
   Admin shell
   ========================================================================== */

.admin-body { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-inline-end: 1px solid var(--sidebar-border);
  position: fixed; inset-block: 0; inset-inline-start: 0;
  z-index: 1040; display: flex; flex-direction: column;
  transition: transform .25s ease, width .25s ease;
  overflow: hidden;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sidebar-scrollbar); border-radius: 3px; }

/* -- three-pane shell: rail | sub | page --------------------------- */
.sidebar-cols { display: flex; flex: 1; min-height: 0; min-width: 0; }

/* PART 1 — rail: section headers, icon above the label */
.rail {
  width: var(--rail-width); flex: none; min-height: 0;
  display: flex; flex-direction: column;
  border-inline-end: 1px solid var(--rail-border, var(--sidebar-border));
}
.rail-brand {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .85rem .3rem; border-bottom: 1px solid var(--rail-border, var(--sidebar-border));
  color: var(--sidebar-brand-text); flex: none;
  position: sticky; top: 0; background: var(--sidebar-bg); z-index: 2;
}
.rail-brand .brand-mark { width: 34px; height: 34px; font-size: 1rem; }
.rail-brand b { font-size: .62rem; font-weight: 700; line-height: 1.35; text-align: center; word-break: break-word; }

.rail-list { flex: 1; overflow-y: auto; padding: .5rem .35rem; display: flex; flex-direction: column; gap: .25rem; }
.rail-list::-webkit-scrollbar { width: 5px; }
.rail-list::-webkit-scrollbar-thumb { background: var(--sidebar-scrollbar); border-radius: 3px; }
.rail-foot {
  flex: none; display: flex; flex-direction: column; gap: .25rem;
  padding: .4rem .35rem; border-top: 1px solid var(--rail-border, var(--sidebar-border));
}

.rail-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; border: 0; background: transparent; cursor: pointer;
  color: var(--sidebar-text); padding: .55rem .2rem; border-radius: .7rem;
  font-size: 0; line-height: 1; text-align: center;
  text-decoration: none; transition: background .15s, color .15s, box-shadow .15s;
}
.rail-btn > i.bi { display: inline-block; flex: 0 0 auto; width: 1.75rem; height: 1.75rem; font-size: 1.55rem !important; line-height: 1.75rem; opacity: .9; }
.rail-btn:hover { background: var(--sidebar-hover); color: var(--sidebar-link-hover-text); text-decoration: none; }
.rail-btn.active,
.rail-btn[aria-current="page"] {
  background: linear-gradient(135deg, var(--brand), #ffb300); color: #10192b;
  box-shadow: 0 6px 16px rgba(255, 209, 3, .35);
}
.rail-btn.active i { opacity: 1; }

/* PART 2 — sub-items of the selected section */
.sub {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--sub-bg);
  border-inline-end: 1px solid var(--rail-border, var(--sidebar-border));
}
.sub.sub-empty { display: none; }
.sub-head {
  flex: none; padding: .95rem 1rem .7rem;
  border-bottom: 1px solid var(--rail-border, var(--sidebar-border));
}
.sub-head h3 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--text-strong, #10192b); letter-spacing: -.2px; }
.sub-head p { margin: .22rem 0 0; font-size: .7rem; color: var(--sidebar-heading); line-height: 1.55; }
.sub-eyebrow {
  font-size: .6rem; font-weight: 700; letter-spacing: 1.2px;
  color: var(--sidebar-heading); margin-bottom: .3rem;
}
.sub-list { flex: 1; overflow-y: auto; padding: .5rem .5rem 1.2rem; }
.sub-list::-webkit-scrollbar { width: 6px; }
.sub-list::-webkit-scrollbar-thumb { background: var(--sidebar-scrollbar); border-radius: 3px; }
.sub-group + .sub-group { margin-top: .15rem; }

.sidebar-foot {
  padding: .8rem .8rem 1.2rem;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1rem 1.15rem; color: var(--sidebar-brand-text); font-weight: 700; font-size: 1.02rem;
  border-bottom: 1px solid var(--sidebar-border);
  position: sticky; top: 0; background: var(--sidebar-bg); z-index: 2;
}
.sidebar-brand .brand-mark { width: 34px; height: 34px; font-size: 1rem; }

.sidebar-nav { padding: .75rem .7rem 1.5rem; flex: 1; }
.nav-section {
  font-size: .68rem; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sidebar-heading); padding: 1.15rem .8rem .45rem; font-weight: 700;
}
.side-link {
  display: flex; align-items: center; gap: .68rem;
  padding: .58rem .8rem; border-radius: .55rem;
  color: var(--sidebar-text); font-weight: 500; font-size: .875rem;
  margin-bottom: 2px; transition: background .15s, color .15s;
}
.side-link i { font-size: 1.02rem; width: 20px; text-align: center; opacity: .85; }
.side-link:hover { background: var(--sidebar-hover); color: var(--sidebar-link-hover-text); text-decoration: none; }
.side-link.active {
  background: linear-gradient(90deg, var(--sidebar-active), #ffb300);
  color: #10192b; box-shadow: 0 4px 14px rgba(255,209,3,.35);
}
.side-link .badge { margin-inline-start: auto; font-size: .66rem; }
.side-link.collapsed-child { padding-inline-start: 1.6rem; font-size: .83rem; }

.main {
  flex: 1; min-width: 0;
  margin-inline-start: var(--sidebar-width);
  display: flex; flex-direction: column;
  transition: margin-inline-start .25s ease;
}

.topbar {
  height: var(--topbar-height);
  background: #fff; border-bottom: 1px solid rgba(16,25,43,.08);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem; position: sticky; top: 0; z-index: 1030;
}
.topbar .page-title { font-weight: 700; font-size: 1.03rem; margin: 0; letter-spacing: -.3px; }
.topbar .breadcrumb { font-size: .78rem; margin: 0; color: #8a93a8; }

.topbar-crumb { flex-wrap: nowrap; min-width: 0; overflow: hidden; padding: 0; }
.topbar-crumb .breadcrumb-item { padding: 0; white-space: nowrap; }
.topbar-crumb .breadcrumb-item + .breadcrumb-item { padding-left: 0; }
.topbar-crumb .breadcrumb-item::before { content: none; }
.topbar-crumb .breadcrumb-item.active { color: #3d475c; font-weight: 600; }
.crumb-sep {
  display: inline-block; color: #b6bfd1; font-size: .85em;
  margin-inline-start: .1rem; margin-inline-end: .45rem;
}
[dir="rtl"] .crumb-sep { transform: scaleX(-1); }

.topbar-center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 0; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .35rem; }
.topbar-actions:first-child { margin-inline-start: 0; }
.topbar-actions:last-child { margin-inline-start: auto; }
.portal-role-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 16%, #fff);
  color: var(--brand-ink); font-size: .75rem; font-weight: 800; white-space: nowrap;
}

.topbar-search { align-items: center; gap: .4rem; }
.topbar-search .search-field {
  display: block; width: 0; overflow: hidden; visibility: hidden; opacity: 0;
  transition: width .2s ease, opacity .18s ease, visibility 0s linear .2s;
}
.topbar-search .search-field .form-control { width: 18rem; }
.topbar-search.open .search-field {
  width: 18rem; visibility: visible; opacity: 1;
  transition: width .2s ease, opacity .18s ease, visibility 0s linear 0s;
}
.topbar-search-expanded { flex: 1 1 auto; width: 100%; max-width: 48rem; background: #fff; border: 1px solid rgba(16,25,43,.12); border-radius: .7rem; padding: .3rem .5rem; box-shadow: var(--shadow-sm); }
.topbar-search-expanded .search-field { flex: 1 1 auto; width: 100%; max-width: none; visibility: visible; opacity: 1; transition: none; }
.topbar-search-expanded .search-field .form-control { width: 100%; max-width: none; border: 0; box-shadow: none; background: transparent; height: 46px; font-size: 1.05rem; }

.dropdown-panel { width: 330px; max-height: 380px; overflow: auto; }
@media (max-width: 575.98px) {
  .dropdown-panel { width: calc(100vw - 2rem); }
}


.icon-btn {
  width: 38px; height: 38px; border-radius: .55rem; border: 1px solid rgba(16,25,43,.10);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  color: #4a5568; position: relative;
}
.icon-btn:hover { background: #f1f4fa; color: var(--brand-ink); }
.icon-btn .dot {
  position: absolute; top: 7px; inset-inline-end: 7px;
  width: 8px; height: 8px; border-radius: 50%; background: #dc3545;
  border: 2px solid #fff;
}

/* Hamburger button */
.sidebar-toggle .burger {
  display: inline-flex; flex-direction: column; justify-content: space-between;
  width: 18px; height: 14px;
}
.sidebar-toggle .burger span {
  display: block; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .18s ease;
}
.sidebar-toggle.is-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sidebar-toggle.is-open .burger span:nth-child(2) { opacity: 0; }
.sidebar-toggle.is-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.user-chip { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem; border-radius: .6rem; }
.user-chip:hover { background: #f1f4fa; }
.user-chip .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #ffb300);
  color: #10192b; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
}
.user-chip .u-name { font-weight: 600; font-size: .85rem; line-height: 1.1; }
.user-chip .u-role { font-size: .7rem; color: #8a93a8; }

/* Profile photos (customers, senders, employees, users) */
.photo-avatar {
  border-radius: 50%; object-fit: cover; overflow: hidden; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--panel-border, rgba(16, 25, 43, .10));
  background: #eef1f8;
  box-shadow: 0 2px 8px rgba(16, 25, 43, .10);
}
.photo-avatar-fallback {
  background: linear-gradient(135deg, var(--brand), #ffb300);
  color: #10192b; font-weight: 700; text-transform: uppercase;
}

.page-content { padding: 1.4rem 1.4rem 2.5rem; flex: 1; }

/* Small-screen shortcuts for the public site. */
.mobile-quick-nav { display: none; }

/* ==========================================================================
   Portal home launcher — the four oversized shortcuts of the customer,
   sender and courier home screens (parcels, request, tracking, complaints).
   ========================================================================== */
.portal-launcher {
  display: flex; flex-direction: column;
  gap: 1rem; width: 100%; max-width: 880px; margin: 0 auto;
}
.portal-launcher-brand {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  color: var(--text-strong, #10192b);
}
.portal-launcher-logo {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 50%;
  border: 2px solid rgba(255, 209, 3, .55); background: #fff;
}
.portal-launcher-logo-image,
.portal-launcher-logo > i.bi { width: 100%; height: 100%; object-fit: contain; }
.portal-launcher-logo > i.bi {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-ink); font-size: 1.3rem;
}
.portal-launcher-name { font-size: 1rem; font-weight: 800; letter-spacing: -.2px; }
.portal-launcher-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.7rem, 2.5vw, 1.1rem);
}
.portal-launcher-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .9rem;
  min-height: clamp(9rem, 26vw, 12rem); padding: 1.2rem .8rem;
  border: 1px solid var(--launcher-border, rgba(16, 25, 43, .09));
  border-radius: 1.35rem; background: var(--launcher-bg, #fff);
  color: var(--text-strong, #10192b);
  box-shadow: 0 6px 20px rgba(16, 25, 43, .06);
  text-align: center; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.portal-launcher-tile:hover,
.portal-launcher-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(16, 25, 43, .1);
  text-decoration: none;
}
.portal-launcher-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: clamp(4rem, 14vw, 5.5rem); height: clamp(4rem, 14vw, 5.5rem);
  flex: 0 0 auto; border-radius: 1.4rem;
  background: var(--launcher-icon-bg, rgba(255, 209, 3, .18));
  color: var(--launcher-icon-color, var(--brand-ink));
  font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1;
}
.portal-launcher-icon > i.bi { font-size: inherit !important; line-height: 1; }
.portal-launcher-label {
  font-size: clamp(.95rem, 3.6vw, 1.12rem);
  font-weight: 800; line-height: 1.3;
}
.portal-launcher-tile.is-parcels {
  --launcher-bg: #fff8d6; --launcher-border: rgba(224, 180, 0, .3);
  --launcher-icon-bg: var(--brand); --launcher-icon-color: #10192b;
}
.portal-launcher-tile.is-request {
  --launcher-bg: #eef3ff; --launcher-border: rgba(47, 111, 237, .18);
  --launcher-icon-bg: #2f6fed; --launcher-icon-color: #fff;
}
.portal-launcher-tile.is-tracking {
  --launcher-bg: #e9f9f1; --launcher-border: rgba(18, 133, 90, .18);
  --launcher-icon-bg: #12855a; --launcher-icon-color: #fff;
}
.portal-launcher-tile.is-support {
  --launcher-bg: #eaf3ff; --launcher-border: rgba(47, 111, 237, .18);
  --launcher-icon-bg: #2f6fed; --launcher-icon-color: #fff;
}
.portal-launcher-tile.is-assigned {
  --launcher-bg: #e9f9f1; --launcher-border: rgba(18, 133, 90, .18);
  --launcher-icon-bg: #12855a; --launcher-icon-color: #fff;
}
.portal-launcher-tile.is-settlement {
  --launcher-bg: #fff8d6; --launcher-border: rgba(224, 180, 0, .3);
  --launcher-icon-bg: var(--brand); --launcher-icon-color: #10192b;
}
.portal-launcher-tile.is-profile {
  --launcher-bg: #f1edff; --launcher-border: rgba(111, 66, 193, .18);
  --launcher-icon-bg: #6f42c1; --launcher-icon-color: #fff;
}
.portal-launcher .portal-launcher-role {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .65rem; border: 1px solid rgba(16, 25, 43, .12);
  border-radius: 999px; background: rgba(255, 209, 3, .14);
  color: var(--brand-ink); font-size: .78rem; font-weight: 800;
}

@media (min-width: 1200px) {
  .portal-launcher { max-width: 1120px; gap: .75rem; }
  .portal-launcher-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
  .portal-launcher-tile {
    flex-direction: row; justify-content: flex-start; gap: .75rem;
    min-height: 7rem; padding: 1rem; border-radius: 1rem; text-align: start;
  }
  .portal-launcher-icon { width: 3.2rem; height: 3.2rem; border-radius: 1rem; font-size: 1.65rem; }
  .portal-launcher-label { font-size: .98rem; }
}

html[data-theme="dark"] .portal-launcher-tile {
  background: color-mix(in srgb, var(--launcher-icon-bg) 14%, var(--panel-bg));
  border-color: var(--panel-border);
}
html[data-theme="dark"] .portal-launcher-label { color: #f2f2f2; }

.panel {
  background: #fff; border: 1px solid rgba(16,25,43,.08);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel-header {
  padding: .95rem 1.15rem; border-bottom: 1px solid rgba(16,25,43,.07);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.panel-header h2, .panel-header h3 { font-size: .98rem; font-weight: 700; margin: 0; }
.panel-body { padding: 1.15rem; }

.kpi {
  background: #fff; border: 1px solid rgba(16,25,43,.08); border-radius: var(--radius);
  padding: 1.05rem 1.1rem; box-shadow: var(--shadow-sm); height: 100%;
  position: relative; overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; inset-inline-end: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); opacity: .55;
}
.kpi .kpi-icon {
  width: 40px; height: 40px; border-radius: 11px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.15rem;
  background: var(--brand-soft); color: var(--brand-ink);
}
.kpi .kpi-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; color: #10192b; }
.kpi .kpi-label { font-size: .8rem; color: #69748c; font-weight: 500; }
.kpi .kpi-trend { font-size: .74rem; font-weight: 600; }
.kpi.is-green .kpi-icon { background: #e6f6ec; color: #198754; }
.kpi.is-green::after { background: #e6f6ec; }
.kpi.is-amber .kpi-icon { background: #fff6e5; color: #fd7e14; }
.kpi.is-amber::after { background: #fff6e5; }
.kpi.is-red .kpi-icon { background: #fdecec; color: #dc3545; }
.kpi.is-red::after { background: #fdecec; }
.kpi.is-purple .kpi-icon { background: #f2ecff; color: #6f42c1; }
.kpi.is-purple::after { background: #f2ecff; }
.kpi.is-blue .kpi-icon { background: #fff8d6; color: #8a6d00; }
.kpi.is-blue::after { background: #fff8d6; }

/* Large dashboard KPI cards */
.kpi { transition: transform .18s ease, box-shadow .18s ease; }
a.kpi { display: block; color: inherit; }
.kpi-lg { padding: 1.45rem 1.4rem 1.25rem; border-radius: calc(var(--radius) * 1.4); }
.kpi-lg .kpi-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -1.2px; line-height: 1.15; position: relative; z-index: 1; }
.kpi-lg .kpi-label { font-size: .93rem; font-weight: 600; color: #4d5976; position: relative; z-index: 1; }
.kpi-lg .kpi-icon { width: 54px; height: 54px; border-radius: 15px; font-size: 1.6rem; position: relative; z-index: 1; }
.kpi-lg::after { width: 150px; height: 150px; inset-inline-end: -46px; top: -58px; }
.kpi-lg .kpi-sub {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-top: .75rem; font-size: .8rem; color: #69748c; font-weight: 500;
  position: relative; z-index: 1;
}
.kpi-lg .kpi-sub .bi-chevron-left { font-size: .7rem; opacity: .5; }
.kpi-lg:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(16,25,43,.13); }

/* Gradient highlight card */
.kpi.kpi-grad { border-color: transparent; color: #fff; }
.kpi.kpi-grad .kpi-label, .kpi.kpi-grad .kpi-sub { color: rgba(255,255,255,.86); }
.kpi.kpi-grad .kpi-value { color: #fff; }
.kpi.kpi-grad .kpi-icon { background: rgba(255,255,255,.2); color: #fff; }
.kpi.kpi-grad::after { background: rgba(255,255,255,.16); }
.kpi.kpi-grad.pos { background: linear-gradient(135deg, #1a9b60 0%, #0d6b43 100%); }
.kpi.kpi-grad.neg { background: linear-gradient(135deg, #ef5b6a 0%, #b5232f 100%); }
html[data-theme="dark"] .kpi.kpi-grad.pos { background: linear-gradient(135deg, #178a56 0%, #0b5c3a 100%); }
html[data-theme="dark"] .kpi.kpi-grad.neg { background: linear-gradient(135deg, #c8374a 0%, #7e1b26 100%); }

.kpi-trend-pill {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .12rem .48rem; border-radius: 99px;
  font-size: .72rem; font-weight: 700;
  background: #e6f6ec; color: #198754;
}
.kpi-trend-pill.down { background: #fdecec; color: #dc3545; }
.kpi.kpi-grad .kpi-trend-pill { background: rgba(255,255,255,.22); color: #fff; }

/* Dashboard status tiles */
.status-tile {
  --st: #e0b400;
  display: block; height: 100%;
  background: #fff; border: 1px solid rgba(16,25,43,.08);
  border-radius: var(--radius); padding: .8rem .85rem .75rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.status-tile:hover { transform: translateY(-2px); border-color: var(--st); box-shadow: var(--shadow); }
.status-tile .st-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.status-tile .st-label {
  display: flex; align-items: center; gap: .42rem; min-width: 0;
  font-size: .78rem; font-weight: 600; color: #4d5976;
}
.status-tile .st-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st); flex: 0 0 auto; }
.status-tile .st-count { font-size: 1.3rem; font-weight: 800; letter-spacing: -.5px; color: #10192b; }
.status-tile .st-bar { display: block; margin-top: .6rem; height: 6px; border-radius: 99px; background: #eef1f7; overflow: hidden; }
.status-tile .st-bar i { display: block; height: 100%; border-radius: 99px; background: var(--st); transition: width .35s ease; }
.status-tile .st-pct { display: block; margin-top: .35rem; font-size: .72rem; font-weight: 600; color: #98a2b5; }
.status-tile.is-active {
  border-color: var(--st); background: color-mix(in srgb, var(--st) 7%, #fff);
  box-shadow: 0 0 0 1px var(--st) inset;
}
.status-tile.is-active .st-label { color: #10192b; }
.status-tile.is-active .st-count { color: var(--st); }

/* Tables */
.table-datatable { width: 100%; margin: 0; }
.table-datatable thead th {
  background: #f7f9fc; font-size: .76rem; text-transform: uppercase;
  letter-spacing: .6px; color: #616b81; font-weight: 700;
  border-bottom: 1px solid rgba(16,25,43,.08); white-space: nowrap;
  padding: .7rem .85rem;
}
.table-datatable tbody td { padding: .72rem .85rem; vertical-align: middle; border-color: rgba(16,25,43,.06); }
.table-datatable .cell-main { font-weight: 600; color: #1f2937; }
.table-datatable .cell-sub { font-size: .78rem; color: #8a93a8; }
.parcel-action-label { display: none; }

.table-responsive { border-radius: var(--radius); }

.badge-soft {
  font-weight: 600; font-size: .74rem; padding: .38rem .62rem;
  border-radius: .45rem; display: inline-flex; align-items: center; gap: .3rem;
}

/* Forms */
.form-label { font-weight: 600; font-size: .84rem; color: #3c4757; margin-bottom: .35rem; }
.form-control, .form-select {
  border-color: #dfe4ec; border-radius: .5rem; font-size: .88rem; padding: .5rem .72rem;
  background-color: #fcfdff;
}
.form-control:focus, .form-select:focus {
  border-color: #e0b400; box-shadow: 0 0 0 .2rem rgba(255,209,3,.3); background-color: #fff;
}
.form-control.is-invalid, .form-select.is-invalid { border-color: #dc3545; }
.input-group-text { font-size: .86rem; background: #f7f9fc; border-color: #dfe4ec; }
.form-section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--brand-ink); border-bottom: 1px dashed #dbe2ee; padding-bottom: .5rem; margin-bottom: .9rem;
}
.customer-parcel-details { margin-bottom: 1.25rem; }
.customer-parcel-details > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; list-style: none; }
.customer-parcel-details > summary::-webkit-details-marker { display: none; }
.customer-parcel-details-caret { transition: transform .18s ease; }
.customer-parcel-details[open] .customer-parcel-details-caret { transform: rotate(180deg); }
.customer-parcel-details > .row { padding-top: .7rem; }
.field-error { color: #dc3545; font-size: .76rem; margin-top: .28rem; font-weight: 500; }
.form-text { font-size: .76rem; color: #8a93a8; }

/* Public delivery-request form */
.request-form-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.request-form .form-block + .form-block { margin-top: 1.6rem; }
.request-form .form-section-title {
  display: flex; align-items: center; gap: .55rem;
  font-size: .92rem; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: inherit; border-bottom: 1px solid #e6eaf2;
  padding-bottom: .65rem; margin-bottom: 1rem;
}
.request-form .form-section-icon {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: .95rem;
}
.request-form .quote-card { margin-top: 1.5rem; }
.request-form .quote-card .quote-amount { font-size: clamp(1.55rem, 2.8vw, 2rem); }
.request-form .form-control, .request-form .form-select { min-height: 42px; }
.request-form textarea.form-control { min-height: 70px; }

.delivery-speed-toggle {
  display: flex; align-items: center; gap: .9rem;
  padding: .95rem 1rem; border: 1px solid #e3e8f1; border-radius: .8rem;
  background: #fbfcff; cursor: pointer; margin: 0;
}
.delivery-speed-toggle:hover { border-color: rgba(224, 180, 0, .55); background: #fffdf1; }
.delivery-speed-toggle-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 1rem;
}
.delivery-speed-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 2.6em; height: 1.4em; margin: 0; flex: 0 0 auto;
  border: 0; border-radius: 2em; background: #cfd6e4;
  position: relative; cursor: pointer; transition: background .18s ease;
}
.delivery-speed-toggle input[type="checkbox"]::after {
  content: ""; position: absolute; top: .17em; inset-inline-start: .17em;
  width: 1.06em; height: 1.06em; border-radius: 50%;
  background: #fff; transition: transform .18s ease;
}
.delivery-speed-toggle input[type="checkbox"]:checked { background: var(--brand); }
html[dir="rtl"] .delivery-speed-toggle input[type="checkbox"]:checked::after { transform: translateX(-1.2em); }
html[dir="ltr"] .delivery-speed-toggle input[type="checkbox"]:checked::after { transform: translateX(1.2em); }
.delivery-speed-toggle input[type="checkbox"]:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
html[data-theme="dark"] .request-form .form-section-title { border-bottom-color: var(--field-border); }
html[data-theme="dark"] .request-form .form-section-icon { background: rgba(255, 209, 3, .12); color: #ffe566; }
html[data-theme="dark"] .delivery-speed-toggle { background: rgba(255, 255, 255, .03); border-color: var(--field-border); }
html[data-theme="dark"] .delivery-speed-toggle:hover { background: rgba(255, 209, 3, .06); }
html[data-theme="dark"] .delivery-speed-toggle input[type="checkbox"] { background: #3a4356; }
html[data-theme="dark"] .delivery-speed-toggle input[type="checkbox"]:checked { background: var(--brand); }

/* Buttons */
.btn { font-weight: 600; font-size: .86rem; border-radius: .5rem; }
.btn-sm { font-size: .78rem; padding: .3rem .6rem; }
.btn-lg { padding: .72rem 1.5rem; font-size: .97rem; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #10192b; }
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #10192b; }
.btn-ghost { background: transparent; border-color: #dfe4ec; color: #475069; }
.btn-ghost:hover { background: #f1f4fa; border-color: #cfd6e4; }
.btn-icon {
  width: 32px; height: 32px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; border-radius: .45rem;
}

/* Filter bar */
.filter-bar {
  background: #fff; border: 1px solid rgba(16,25,43,.08); border-radius: var(--radius);
  padding: .85rem 1rem; margin-bottom: 1rem;
  display: flex; gap: .45rem; flex-wrap: nowrap; align-items: center;
  overflow-x: auto; scrollbar-width: thin;
}
.filter-bar > * { flex: 0 0 auto; min-width: 0; }
.filter-bar .form-control, .filter-bar .form-select { min-width: 112px; flex: 0 1 auto; font-size: .85rem; }
.filter-bar .search-input { min-width: 150px; flex: 1 1 150px; }
.filter-bar .btn, .filter-bar .form-check { white-space: nowrap; }
.filter-bar .combo { min-width: 132px; }

/* Tabs inside panels */
.nav-tabs-custom { border-bottom: 1px solid rgba(16,25,43,.08); padding: 0 .75rem; }
.nav-tabs-custom .nav-link {
  border: 0; border-bottom: 2px solid transparent; color: #69748c;
  font-weight: 600; font-size: .85rem; padding: .8rem .85rem;
}
.nav-tabs-custom .nav-link:hover { color: var(--brand-ink); border-bottom-color: #ffe566; }
.nav-tabs-custom .nav-link.active { color: var(--brand-ink); border-bottom-color: var(--brand); background: transparent; }

/* Timeline */
.timeline { position: relative; padding-inline-start: 1.6rem; }
.timeline::before {
  content: ''; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px;
  width: 2px; background: #e3e8f1;
}
.timeline-item { position: relative; padding-bottom: 1.15rem; }
.timeline-item::before {
  content: ''; position: absolute; inset-inline-start: -1.6rem; top: 4px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand); transform: translateX(0);
}
[dir="rtl"] .timeline-item::before { inset-inline-start: auto; inset-inline-end: -1.6rem; }
.timeline-item.is-old::before { border-color: #c8d0de; }
.timeline-item .t-title { font-weight: 600; font-size: .87rem; }
.timeline-item .t-meta { font-size: .76rem; color: #8a93a8; }

/* Status timeline (public tracking) */
.track-steps { display: flex; flex-direction: column; gap: 0; }
.track-step { display: flex; gap: .9rem; position: relative; padding-bottom: 1.35rem; }
.track-step:last-child { padding-bottom: 0; }
.track-step::before {
  content: ''; position: absolute; inset-inline-start: 21px; top: 42px; bottom: -4px;
  width: 2px; background: #e3e8f1;
}
.track-step:last-child::before { display: none; }
.track-step .dot {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef1f7; color: #98a2b8; font-size: 1.05rem; z-index: 1;
}
.track-step.done .dot { background: #d1f0dd; color: #198754; }
.track-step.current .dot { background: var(--brand); color: #10192b; box-shadow: 0 0 0 6px rgba(255,209,3,.15); }
.track-step .s-title { font-weight: 700; font-size: .95rem; }
.track-step.upcoming .s-title { color: #98a2b8; font-weight: 500; }
.track-step .s-time { font-size: .78rem; color: #8a93a8; }

/* Make delivery progress easy to read in the customer portal. */
.customer-track-heading { font-size: 1.2rem; }
.customer-track-steps .track-step { gap: 1rem; padding-bottom: 1.35rem; }
.customer-track-steps .track-step::before { inset-inline-start: 23px; top: 50px; bottom: -2px; width: 3px; }
.customer-track-steps .track-step .dot {
  width: 50px; height: 50px; flex-basis: 50px; font-size: 1.25rem;
  border: 2px solid #fff; box-shadow: 0 3px 10px rgba(16,25,43,.1);
}
.customer-track-steps .track-step .flex-grow-1 {
  min-height: 3.6rem; padding: .75rem 1rem; border: 1px solid var(--panel-border, #e6eaf1);
  border-radius: .9rem; background: var(--panel-bg, #fff);
}
.customer-track-steps .track-step.done .flex-grow-1 { border-color: rgba(25,135,84,.3); }
.customer-track-steps .track-step.current .flex-grow-1 {
  border-color: rgba(255,209,3,.85); background: rgba(255,209,3,.1);
  box-shadow: 0 5px 16px rgba(255,209,3,.12);
}
.customer-track-steps .customer-track-title { font-size: 1.08rem; font-weight: 750; line-height: 1.5; }
.customer-track-steps .track-step.upcoming .customer-track-title { color: var(--text-soft, #68748a) !important; font-weight: 600; }
.customer-track-steps .customer-track-current { padding: .4rem .72rem; font-size: .88rem; }
.customer-track-steps .customer-track-time { margin-top: .28rem; font-size: .9rem; }
.customer-track-steps .customer-track-note { margin-top: .25rem; font-size: .9rem; line-height: 1.6; }

@media (max-width: 575.98px) {
  .customer-track-steps .track-step { gap: .75rem; }
  .customer-track-steps .track-step .dot { width: 46px; height: 46px; flex-basis: 46px; }
  .customer-track-steps .track-step::before { inset-inline-start: 21px; top: 47px; }
  .customer-track-steps .track-step .flex-grow-1 { padding: .72rem .8rem; }
  .customer-track-steps .customer-track-title { font-size: 1rem; }
}

/* Live tracking indicator + update flash */
.live-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .7rem; border-radius: 999px;
  background: #fff8d6; color: #8a6d00;
  font-size: .74rem; font-weight: 600; letter-spacing: .2px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74,.5);
  animation: livePulse 1.8s ease-out infinite;
}
.live-dot.is-pending { background: #e0b400; animation-duration: .9s; }
.live-dot.is-done { background: #16a34a; animation: none; box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,.45); }
  70%  { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
.track-steps.live-flash { animation: liveFlash .9s ease; }
@keyframes liveFlash {
  0%   { background: rgba(255,209,3,.10); }
  100% { background: transparent; }
}

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: #8a93a8; }
.empty-state i { font-size: 3rem; opacity: .5; }
.empty-state h6 { color: #5b6478; font-weight: 700; margin-top: .8rem; }

/* Toasts / flash */
.toast-stack { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .55rem; }
.app-toast {
  background: #fff; border-radius: .6rem; box-shadow: 0 12px 34px rgba(16,25,43,.20);
  padding: .75rem 1rem; min-width: 280px; max-width: 380px;
  border-inline-start: 4px solid var(--brand); display: flex; gap: .6rem; align-items: flex-start;
  animation: toastIn .25s ease;
}
.app-toast.success { border-inline-start-color: #198754; }
.app-toast.error { border-inline-start-color: #dc3545; }
.app-toast.warning { border-inline-start-color: #fd7e14; }
.app-toast .t-msg { font-size: .86rem; font-weight: 500; }
.app-toast .t-close { margin-inline-start: auto; cursor: pointer; color: #98a2b8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Auth — colors sampled from courier-scooter artwork */
.auth-body {
  min-height: 100vh; margin: 0; overflow-x: hidden;
  background: linear-gradient(160deg, #171717 0%, #212121 45%, #2b2b2b 100%);
}
.auth-split {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 3rem clamp(1.2rem, 4vw, 4rem);
  direction: ltr; /* card right, hero content left in both LTR/RTL */
}
html[dir="rtl"] .auth-hero,
html[dir="rtl"] .auth-panel { direction: rtl; }

.auth-split > * { position: relative; z-index: 2; }

/* Hero content - left side of the navy panel */
.auth-hero {
  position: static; overflow: visible;
  order: 1;
  flex: 0 1 480px;
  background: none;
  color: #fff; padding: 0;
  display: flex; align-items: center;
}
.auth-hero-inner { position: relative; z-index: 2; max-width: 480px; margin-inline: auto; width: 100%; }
.auth-brand { display: flex; align-items: center; gap: .7rem; }
.auth-brand .brand-mark {
  width: 46px; height: 46px; font-size: 1.3rem; border-radius: 14px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #10192b; display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.auth-brand-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.5px; }

.auth-illustration {
  position: relative; height: auto; margin: 1.6rem 0 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.auth-illustration-img {
  width: 100%; max-width: 360px; height: auto;
  border-radius: 1.4rem;
  box-shadow: 0 24px 50px rgba(0,0,0,.5);
  animation: authFloat 5s ease-in-out infinite;
}
@keyframes authFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.auth-hero-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.7px; line-height: 1.25; }
.auth-hero-text p { color: rgba(255,255,255,.85); font-size: .98rem; margin-top: .7rem; max-width: 42ch; }
.auth-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .55rem; }
.auth-points li { display: flex; align-items: center; gap: .55rem; font-size: .92rem; color: rgba(255,255,255,.92); }
.auth-points i { color: #ffd103; font-size: 1rem; } /* brand accent (was light blue) */

/* Company info card shown beside the minimal (login / reset) form */
.auth-hero-company { flex: 0 1 430px; }
.company-card {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 1.4rem;
  padding: 2.1rem 1.9rem;
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.company-card .auth-hero-text h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.company-card .auth-points { margin-top: 1.2rem; }
.company-contact {
  list-style: none; margin: 1.4rem 0 0; padding: 1.3rem 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
  display: grid; gap: .6rem;
  font-size: .88rem; color: rgba(255,255,255,.88);
}
.company-contact li { display: flex; align-items: center; gap: .55rem; }
.company-contact i { color: #ffd103; width: 18px; text-align: center; } /* brand accent (was light blue) */

/* Side card shares the form's geometry & accent so the two read as one design */
.company-card { border-radius: 12px; }            /* match .login-field / .login-submit */
.company-card .auth-brand .brand-mark {
  background: #ffd103; border-color: #ffd103; color: #10192b; backdrop-filter: none;
}
.company-card .auth-hero-text p { color: rgba(255,255,255,.78); }
.company-card .company-contact { border-top-color: rgba(255,255,255,.14); }

/* Decorative blobs on the navy panel */
.auth-hero-blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .35; z-index: 1; }
.auth-blob-1 { width: 340px; height: 340px; background: #e0b400; top: -110px; inset-inline-start: -90px; }
.auth-blob-2 { width: 420px; height: 420px; background: #333333; bottom: -160px; inset-inline-end: -130px; opacity: .5; }

/* Login card — sits on the right of the same navy panel */
.auth-panel {
  position: static;
  order: 2;
  flex: 0 1 440px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0;
  background: none;
}
.auth-panel-top { display: none; }
.auth-panel-top .auth-brand-name { color: #fff; }
.auth-panel-top .brand-mark { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); color: #fff; }

.auth-card {
  width: 100%; max-width: 440px; background: #fff; border-radius: 1.25rem;
  padding: 2.1rem 2rem; box-shadow: 0 30px 70px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.4);
}
.auth-card .form-label { font-weight: 600; font-size: .85rem; color: #34405a; }
.auth-card .input-group-text { background: #f1f5fd; border-color: #dde5f4; color: #10192b; }
.auth-card .form-control { border-color: #dde5f4; }
.auth-card .form-control:focus { border-color: #e0b400; box-shadow: 0 0 0 .2rem rgba(255,209,3,.3); }
.auth-card .btn-brand {
  background: #ffd103; border: 0; font-weight: 600; color: #10192b;
  box-shadow: 0 10px 24px rgba(255,209,3,.4);
}
.auth-card .btn-brand:hover { background: #e0b400; color: #10192b; }
.auth-card .btn-outline-primary { border-color: #e0b400; color: #8a6d00; }
.auth-card .btn-outline-primary:hover { background: #ffd103; border-color: #ffd103; color: #10192b; }
.auth-card a:not(.btn):hover { color: #8a6d00; }
.auth-card-head h4 { color: #1c2a3f; }
.auth-card-art {
  width: 100%; max-width: 250px; margin: 0 auto 1.1rem;
  line-height: 0;
}
.auth-card-art img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 12px 22px rgba(16,30,72,.3));
  animation: authFloat 5s ease-in-out infinite;
}
.auth-panel > .text-center a { color: rgba(255,255,255,.85); }
.auth-panel > .text-center a:hover { color: #fff; }
.auth-divider { display: flex; align-items: center; gap: .7rem; color: #98a2b8; font-size: .75rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e5eaf4; }

.demo-accounts { background: #f2f6fd; border: 1px dashed #c7d5f0; border-radius: .7rem; padding: .7rem .85rem; }
.demo-accounts code { background: #e7edfb; padding: .1rem .35rem; border-radius: .3rem; font-size: .74rem; }
.demo-accounts .btn-light:hover { border-color: #e2b253; color: #a8761f; }

@media (max-width: 991.98px) {
  .auth-split { padding: 2.5rem 1.2rem; }
  .auth-panel { flex: 1 1 100%; max-width: 440px; }
  .auth-panel-top { display: block; text-align: center; margin-bottom: 1.4rem; }
  .auth-panel-top .auth-brand { justify-content: center; }
  .auth-illustration { height: 170px; margin: 1.4rem 0 1rem; }
}

/* ==========================================================================
   LOGIN — minimal (hero-less) variant, matched to reference mock
   Scoped to body.auth-body-minimal so register / reset keep the old look.
   ========================================================================== */
/* NOTE: selectors below use html[data-theme] body.auth-body-minimal so they
   outrank the html[data-theme="dark"] .auth-body / .auth-card overrides. */
html[data-theme] body.auth-body-minimal {
  /* Same dark band the public site uses on .page-hero / .stats-band / .cta-band
     (site.css --band-bg) */
  background: linear-gradient(135deg, #171717 0%, #212121 48%, #2b2b2b 100%) !important;
  background-attachment: fixed;
}
.auth-body-minimal .auth-split { padding-block: 3rem; }
.auth-body-minimal .auth-panel { flex: 0 1 400px; max-width: 400px; }

/* The card itself disappears — fields sit straight on the gradient. */
html[data-theme] body.auth-body-minimal .auth-card {
  background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 0; max-width: 400px; border-radius: 0;
}

/* --- Avatar medallion with flanking hairlines ---------------------------- */
.login-avatar {
  display: flex; align-items: center; gap: 0;
  margin: .25rem 0 2rem;
}
.login-avatar-rule {
  flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45));
}
.login-avatar-rule:last-child { background: linear-gradient(90deg, rgba(255,255,255,.45), transparent); }
.login-avatar-ring {
  flex: 0 0 auto;
  width: 128px; height: 128px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.92); font-size: 3rem;
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 34px rgba(10,14,40,.22), inset 0 0 0 6px rgba(255,255,255,.03);
}
/* Uploaded company logo fills the medallion (falls back to the icon above) */
.login-avatar-ring .auth-logo {
  width: 100%; height: 100%; max-width: none;
  border-radius: 50%; object-fit: cover; display: block;
}

/* --- Fields -------------------------------------------------------------- */
.login-field {
  display: flex; align-items: stretch;
  background: #fff; /* white field on the navy band */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: .85rem;
  box-shadow: 0 6px 18px rgba(10,14,40,.18);
  transition: box-shadow .18s ease, transform .18s ease;
}
.login-field:focus-within {
  box-shadow: 0 0 0 3px rgba(255,255,255,.28), 0 8px 22px rgba(10,14,40,.26);
}
.login-field-icon {
  flex: 0 0 58px; width: 58px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffd103; /* public-site brand accent (site.css --orange) */
  color: #10192b; font-size: 1.35rem;
  border-inline-end: 1px solid rgba(0,0,0,.12);
}
/* Show/hide password toggle — a plain eye icon inside the field. */
.login-eye {
  flex: 0 0 44px; width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; cursor: pointer;
  color: #8b8b8b; font-size: 1.25rem;
  padding: 0;
}
.login-eye:hover, .login-eye:active { color: #10192b; }
.login-eye:focus-visible { outline: 2px dashed rgba(139,139,139,.7); outline-offset: -4px; }
/* The searchable picker needs its dropdown to escape the rounded field. */
.login-field:has(.combo) { overflow: visible; }
.login-field:has(.combo) .login-field-icon {
  border-start-start-radius: 12px;
  border-end-start-radius: 12px;
}
.login-input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: 0; background: none;
  padding: 0 1rem; height: 54px;
  font-size: .95rem; font-weight: 500;
  color: #2b2b2b;
}
.login-input::placeholder { color: #8b8b8b; font-weight: 600; letter-spacing: .04em; }
/* Remove iOS/Chrome focus ring — the wrapper handles it. */
.login-input:focus { box-shadow: none; }
/* The location pickers sit in the same white field as the text inputs, so
   they drop the native box and keep only the caret. */
.login-field select.login-input {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  padding-inline-end: 2.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 16 16' fill='%232b2b2b'><path d='M8 12 3 6h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
[dir="rtl"] .login-field select.login-input { background-position: left 1rem center; }
.login-field-error { margin: -.45rem 0 .8rem; padding-inline-start: .15rem; color: #f8d7da; text-shadow: 0 0 4px rgba(0,0,0,.4); }

/* --- Submit -------------------------------------------------------------- */
.login-submit {
  width: 100%; height: 54px; border: 0; border-radius: 12px;
  margin-top: .55rem; cursor: pointer;
  background: #ffd103; /* public-site brand orange (site.css --orange) */
  color: #10192b; font-size: 1.05rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(255,209,3,.42);
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.login-submit:hover { background: #e0b400; box-shadow: 0 12px 30px rgba(224,180,0,.5); }
.login-submit:active { transform: translateY(1px); }

/* --- Remember / forgot row ------------------------------------------------ */
.login-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap;
}
.login-remember {
  display: inline-flex; align-items: center; gap: .55rem;
  cursor: pointer; margin: 0; user-select: none;
}
.login-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.login-remember-box {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.06);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: .95rem; line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.login-remember input:checked + .login-remember-box {
  background: #ffd103; border-color: #ffd103; color: #10192b;
}
.login-remember input:focus-visible + .login-remember-box {
  box-shadow: 0 0 0 3px rgba(255,255,255,.35);
}
.login-remember-text { color: #d7dcec; font-size: .9rem; font-weight: 500; }
.login-forgot {
  color: #b9c1d8; font-size: .88rem; font-style: italic;
  text-decoration: none; transition: color .15s ease;
}
.login-forgot:hover { color: #fff; text-decoration: underline; }

/* --- Divider + secondary -------------------------------------------------- */
.login-divider {
  height: 1px; margin: 2.1rem 0 1.5rem;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
}
.login-secondary {
  display: block; text-align: center;
  padding: .7rem 1rem; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none;
  background: rgba(255,255,255,.06);
  transition: background .16s ease, border-color .16s ease;
}
.login-secondary:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.7); color: #fff; }

/* --- Google sign-in button ----------------------------------------------- */
.login-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; min-height: 52px; margin-top: .2rem;
  border: 1px solid #d7dde8; border-radius: 14px;
  background: #fff; color: #10192b;
  font-size: .95rem; font-weight: 700; text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.login-google:hover {
  border-color: #b9c3d4; background: #f8fafc; color: #10192b;
  box-shadow: 0 6px 18px rgba(16,25,43,.08);
}
.login-google svg { width: 20px; height: 20px; flex: 0 0 auto; }
.login-or {
  display: flex; align-items: center; gap: .75rem;
  margin: 1rem 0 .9rem; color: #94a3b8;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
}
.login-or::before, .login-or::after {
  content: ""; flex: 1 1 auto; height: 1px; background: rgba(148,163,184,.45);
}

/* Demo accounts — legible on the dark gradient */
.auth-body-minimal .demo-accounts {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.32);
  color: #eef1f8;
}
.auth-body-minimal .demo-accounts .btn-light { background: rgba(255,255,255,.92); }

/* Flash alert on gradient */
.auth-body-minimal .auth-card .alert {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

/* Footer language links on gradient */
.auth-body-minimal .auth-panel > .text-center a { color: rgba(255,255,255,.82); }
.auth-body-minimal .auth-panel > .text-center a:hover { color: #fff; }
.auth-body-minimal .auth-panel > .text-center a.text-muted { color: rgba(255,255,255,.72) !important; }
.auth-body-minimal .auth-panel > .text-center a.text-muted:hover { color: #fff !important; }
.auth-body-minimal .auth-panel > .text-center a.fw-bold.text-primary { color: #fff !important; }

/* The gradient is already dark — light & dark themes share this look. */
html[data-theme="dark"] body.auth-body-minimal .demo-accounts { background: rgba(255,255,255,.08); color: #eef1f8; }

@media (max-width: 991.98px) {
  .auth-body-minimal .auth-split { padding-block: 2rem; }
  .auth-body-minimal .auth-panel { flex: 1 1 100%; max-width: 400px; }
  .login-avatar-ring { width: 104px; height: 104px; font-size: 2.4rem; }
}

/* ==========================================================================
   AUTH — joined card (login / register)
   One white card holding two panes side by side: the dark company pane and
   the form pane. Scoped to .auth-card-solid so forgot / reset / pending
   keep their previous look.
   ========================================================================== */

/* Bounded column keeps the joined login / register card compact */
body.auth-body-minimal .auth-panel.auth-panel-solid { flex: 0 1 820px; max-width: 820px; }

/* The card: two panes, no inner padding of its own; one fixed height on
   every auth page so login and register never change size when switching */
html[data-theme] body.auth-body-minimal .auth-card.auth-card-solid {
  display: flex; direction: ltr; /* company pane stays on the left in RTL too */
  overflow: hidden;
  width: 100%; max-width: 820px;
  height: 600px; /* fallback for browsers without dvh */
  height: clamp(500px, calc(100dvh - 10rem), 620px);
  background: #fff !important;
  border: 0 !important;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(2,10,24,.45) !important;
  padding: 0;
}

/* Start pane — company text on the brand navy */
.auth-side {
  flex: 0 0 340px;
  display: flex; align-items: center;
  padding: 2rem 1.6rem;
  background: linear-gradient(160deg, #171717 0%, #212121 55%, #2b2b2b 100%);
  color: #fff;
}
html[dir="rtl"] .auth-side { direction: rtl; }
.auth-side-inner { width: 100%; }
.auth-side .auth-brand .brand-mark { background: #ffd103; border-color: #ffd103; color: #10192b; backdrop-filter: none; }
.auth-side .auth-hero-text h2 { font-size: clamp(1.4rem, 1.9vw, 1.75rem); }
.auth-side .auth-hero-text p { color: rgba(255,255,255,.78); font-size: .92rem; }
.auth-side .auth-points { margin-top: 1.3rem; }
.auth-side .company-contact { margin-top: 1.3rem; }

/* Form pane — scrolls inside the fixed-height card when the form is long
   (register), so the card itself never changes size */
.auth-card-body {
  position: relative; /* contains the visually-hidden labels so they cannot
                         escape and create a page scrollbar */
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  padding: 1.7rem 1.5rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #cfd9e8 transparent;
}
html[dir="rtl"] .auth-card-body { direction: rtl; }
.auth-card-body::-webkit-scrollbar { width: 8px; }
.auth-card-body::-webkit-scrollbar-track { background: transparent; }
.auth-card-body::-webkit-scrollbar-thumb { background: #d7dfec; border-radius: 999px; }
.auth-card-body:hover::-webkit-scrollbar-thumb { background: #c2cfe3; }

/* Centers the form when it is shorter than the card; starts at the top and
   scrolls when it is longer (auto margins instead of justify-content, which
   would clip the top in an overflow container) */
.auth-card-inner { margin: auto 0; width: 100%; }

/* Heading inside the form pane */
.auth-head { text-align: center; margin-bottom: 1.1rem; }
.auth-head-title {
  margin: 0; color: #10192b;
  font-size: 1.6rem; font-weight: 800; letter-spacing: -.6px; line-height: 1.25;
}
.auth-head-sub { margin: .35rem 0 0; color: #64748b; font-size: .9rem; }

/* Tabs on a light track */
body.auth-body-minimal .auth-card.auth-card-solid .auth-tabs {
  margin-bottom: 1.15rem;
  background: #f1f4fb; border-color: #e3e9f5;
  border-radius: 14px;
  backdrop-filter: none;
}
body.auth-body-minimal .auth-card.auth-card-solid .auth-tab { border-radius: 11px; }
body.auth-body-minimal .auth-card.auth-card-solid .auth-tab { color: #5c6779; }
body.auth-body-minimal .auth-card.auth-card-solid .auth-tab:hover { color: #10192b; background: rgba(33,33,33,.06); }
body.auth-body-minimal .auth-card.auth-card-solid .auth-tab.is-active {
  background: #ffd103; color: #10192b;
  box-shadow: 0 6px 14px rgba(255,209,3,.4);
}

/* Fields: white with a light border; brand-yellow focus ring */
body.auth-body-minimal .auth-card.auth-card-solid .login-field {
  background: #fff; border: 1px solid #e7ebf3;
  border-radius: 15px;
  box-shadow: 0 1px 2px rgba(16,25,43,.04);
  margin-bottom: .7rem;
}
body.auth-body-minimal .auth-card.auth-card-solid .login-field:focus-within {
  border-color: #ffd103; box-shadow: 0 0 0 3px rgba(255,209,3,.22);
}
body.auth-body-minimal .auth-card.auth-card-solid .login-field-error { color: #c2344a; text-shadow: none; }

/* Softer glow for the yellow submit on white */
body.auth-body-minimal .auth-card.auth-card-solid .login-submit {
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(255,209,3,.32);
}

/* Remember / forgot row */
body.auth-body-minimal .auth-card.auth-card-solid .login-row { margin-top: 1.1rem; }
body.auth-body-minimal .auth-card.auth-card-solid .login-remember-box { border-color: #c3cddf; background: #fff; }
body.auth-body-minimal .auth-card.auth-card-solid .login-remember-text { color: #455066; }
body.auth-body-minimal .auth-card.auth-card-solid .login-forgot { color: #64748b; }
body.auth-body-minimal .auth-card.auth-card-solid .login-forgot:hover { color: #10192b; }

/* Divider + public request link */
body.auth-body-minimal .auth-card.auth-card-solid .login-divider {
  margin: 1.5rem 0 1.1rem;
  background: linear-gradient(90deg, transparent, rgba(33,33,33,.14), transparent);
}
body.auth-body-minimal .auth-card.auth-card-solid .login-request-link {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  font-size: .9rem; font-weight: 600; color: #455066; text-decoration: none;
  transition: color .15s ease;
}
body.auth-body-minimal .auth-card.auth-card-solid .login-request-link:hover { color: #8a6d00; }

/* Demo accounts dropdown (debug builds) — light on the white card */
body.auth-body-minimal .auth-card.auth-card-solid .demo-accounts-details { margin-top: 1.1rem; }
.demo-accounts-details > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; color: #8a95a8;
  transition: color .15s ease;
}
.demo-accounts-details > summary::-webkit-details-marker { display: none; }
.demo-accounts-details > summary:hover { color: #455066; }
.demo-accounts-details[open] > summary { margin-bottom: .55rem; }
.demo-accounts-details .demo-accounts { padding: .6rem .7rem; text-align: start; }
body.auth-body-minimal .auth-card.auth-card-solid .demo-accounts {
  background: #f6f8fc; border-color: #dbe3f0; color: #455066;
}

/* Register widgets on the white pane */
body.auth-body-minimal .auth-card.auth-card-solid .reg-type-option {
  border-color: #e7ebf3; border-radius: 12px;
  background: #f6f8fc; color: #455066;
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-type-option:hover {
  background: #eef2f9; border-color: #cbd6e8; color: #10192b;
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-type-option.is-active {
  background: rgba(255,209,3,.16); border-color: #ffd103; color: #10192b;
  box-shadow: none;
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-type-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(255,209,3,.25);
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-photo-label {
  background: #f6f8fc; border-color: #d7deea; border-radius: 12px;
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-photo-label:hover { background: #eef2f9; border-color: #ffd103; }
body.auth-body-minimal .auth-card.auth-card-solid .reg-photo-preview { background: #e8eefb; color: #455066; border-color: #d3ddec; }
body.auth-body-minimal .auth-card.auth-card-solid .reg-photo-text { color: #2b3446; }
body.auth-body-minimal .auth-card.auth-card-solid .reg-photo-text small { color: #7a8699; }
body.auth-body-minimal .auth-card.auth-card-solid .reg-note {
  background: #fff8e1; color: #6b5b1f;
  border-inline-start-color: #ffd103;
  border-radius: 10px;
}
body.auth-body-minimal .auth-card.auth-card-solid .reg-note i { color: #b8860b; }

/* Flash alert on the white card */
body.auth-body-minimal .auth-card.auth-card-solid .alert { background: #eef4ff; border-color: #cfe0ff; color: #1c3d7a; }
body.auth-body-minimal .auth-card.auth-card-solid .alert-danger { background: #fdecec; border-color: #f3c2c8; color: #8a2f36; }
body.auth-body-minimal .auth-card.auth-card-solid .alert-success { background: #e9f8ef; border-color: #badbcc; color: #1d6b40; }
body.auth-body-minimal .auth-card.auth-card-solid .alert-warning { background: #fff6e5; border-color: #ffe0a3; color: #8a5a00; }

@media (max-width: 991.98px) {
  /* Single pane on small screens — the company pane is hidden and the card
     grows with its content again (no inner scroll on phones) */
  body.auth-body-minimal .auth-panel.auth-panel-solid { flex: 1 1 100%; max-width: 420px; }
  html[data-theme] body.auth-body-minimal .auth-card.auth-card-solid { height: auto; }
  .auth-card-body { overflow: visible; padding: 1.2rem 1rem 1rem; }
  .auth-card-inner { margin: 0; }
}

/* Desktop shell: keep the joined card centered at a comfortable size while
   the form pane scrolls inside when the registration form is long. */
@media (min-width: 992px) {
  body.auth-body-minimal .auth-split {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    padding: 2rem clamp(1.5rem, 4vw, 3rem);
  }
  body.auth-body-minimal .auth-panel.auth-panel-solid {
    flex: 0 1 820px; max-width: 820px;
  }
  html[data-theme] body.auth-body-minimal .auth-card.auth-card-solid {
    flex: 1 1 auto;
    max-width: 820px;
    height: clamp(500px, calc(100dvh - 10rem), 620px);
  }
  /* Company pane keeps a proportional share of the wide card */
  .auth-side { flex: 0 0 clamp(320px, 34%, 500px); }
  .auth-side-inner { max-width: 430px; margin-inline: auto; }
  /* The form keeps a comfortable column width in the wide white pane */
  .auth-card-body { align-items: center; }
  .auth-card-inner { max-width: 520px; }
}

/* ==========================================================================
   LOGIN / REGISTER tabs
   ========================================================================== */
.auth-tabs {
  position: relative;
  display: flex; gap: .35rem;
  padding: .3rem; margin-bottom: 1.75rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.auth-tab {
  position: relative; z-index: 1;
  flex: 1 1 0;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem .5rem; border-radius: 8px;
  color: rgba(255,255,255,.82); font-size: .95rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.auth-tab:hover { color: #fff; background: rgba(255,255,255,.12); }
.auth-tab.is-active {
  color: #4a1f47;
  background: #fff;
  box-shadow: 0 4px 14px rgba(10,14,40,.28);
}
.auth-tab i { font-size: 1.05rem; }

/* ==========================================================================
   REGISTER — account type, photo, note
   ========================================================================== */
.reg-type {
  display: flex; gap: .6rem; margin-bottom: .95rem;
}
.reg-type-option {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .3rem; padding: .85rem .5rem; cursor: pointer;
  border: 1px solid rgba(255,255,255,.4); border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.85); font-size: .88rem; font-weight: 600;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}
.reg-type-option i { font-size: 1.45rem; }
.reg-type-option:hover { background: rgba(255,255,255,.15); color: #fff; }
.reg-type-option.is-active {
  background: #fff; border-color: #fff; color: #6a2f66;
  box-shadow: 0 6px 18px rgba(10,14,40,.24);
}
.reg-type-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.reg-type-option:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(255,255,255,.45); }

/* Photo picker — clickable tile with live preview */
.reg-photo { margin-bottom: .95rem; }
.reg-photo-label {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem .85rem; margin: 0; cursor: pointer;
  background: rgba(255,255,255,.07);
  border: 1px dashed rgba(255,255,255,.45);
  border-radius: 6px;
  transition: background-color .16s ease, border-color .16s ease;
}
.reg-photo-label:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.reg-photo-preview {
  flex: 0 0 auto;
  width: 54px; height: 54px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.4rem;
  overflow: hidden; border: 1px solid rgba(255,255,255,.4);
}
.reg-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.reg-photo-preview.has-image { background: none; }
.reg-photo-text { display: flex; flex-direction: column; gap: .12rem; color: #fff; }
.reg-photo-text strong { font-size: .9rem; font-weight: 600; }
.reg-photo-text small { color: rgba(255,255,255,.7); font-size: .75rem; }
.reg-photo-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.reg-photo-input:focus-visible + .reg-photo-label,
.reg-photo-label:has(.reg-photo-input:focus-visible) { box-shadow: 0 0 0 3px rgba(255,255,255,.45); }

.reg-note {
  display: flex; align-items: flex-start; gap: .5rem;
  margin: 1.1rem 0 0; padding: .7rem .8rem;
  background: rgba(255,255,255,.1);
  border-inline-start: 3px solid #ffd166;
  border-radius: 4px;
  color: rgba(255,255,255,.9); font-size: .8rem; line-height: 1.6;
}
.reg-note i { color: #ffd166; flex: 0 0 auto; margin-top: .18rem; }

/* ==========================================================================
   PENDING APPROVAL screen
   ========================================================================== */
.pending-box { text-align: center; }
.pending-ring { background: rgba(255,255,255,.1); color: #ffd166; animation: pendingPulse 2.4s ease-in-out infinite; }
@keyframes pendingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,209,102,.45); }
  50%      { box-shadow: 0 0 0 14px rgba(255,209,102,0); }
}
.pending-title {
  font-size: 1.25rem; font-weight: 800; color: #fff;
  margin: 0 0 .7rem; letter-spacing: -.3px;
}
.pending-text {
  color: rgba(255,255,255,.85); font-size: .92rem; line-height: 1.85;
  margin: 0 auto 1.3rem; max-width: 40ch;
}
.pending-status {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 999px;
  background: rgba(255,209,102,.18);
  border: 1px solid rgba(255,209,102,.55);
  color: #ffe3a3; font-size: .85rem; font-weight: 600;
}
.pending-status i { font-size: 1.05rem; }
.pending-logout {
  max-width: 260px; margin-inline: auto;
  background: rgba(255,255,255,.14) !important;
  box-shadow: none !important;
  border: 1px solid rgba(255,255,255,.4);
  text-transform: none; letter-spacing: 0; font-size: .95rem;
}
.pending-logout:hover { background: rgba(255,255,255,.26) !important; }

@media (max-width: 575.98px) {
  .auth-tab { font-size: .88rem; padding: .68rem .35rem; }
  .reg-type-option i { font-size: 1.25rem; }
}

/* Modal / misc */
.modal-content { border: 0; border-radius: .8rem; box-shadow: 0 24px 60px rgba(3,10,24,.28); }
.modal-header { border-bottom-color: rgba(16,25,43,.07); }
.modal-footer { border-top-color: rgba(16,25,43,.07); }
.dropdown-menu { border: 0; box-shadow: 0 12px 34px rgba(16,25,43,.14); border-radius: .6rem; }
.dropdown-item { font-size: .86rem; padding: .48rem .9rem; }
.dropdown-item i { width: 18px; margin-inline-end: .45rem; opacity: .7; }

/* Nested dropdown for language in settings.
   NOTE: open toward inline-END so it always grows INTO the viewport:
   in LTR the parent menu sits at the right edge (opens left = inline-end),
   in RTL the parent menu sits at the left edge (opens right = inline-end).
   A previous [dir=rtl] override pinned it with right:100%, which pushed the
   language list to x<0 in Persian and made it unclickable. */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
  display: none;
  position: absolute;
  top: 0;
  inset-inline-end: 100%;
  margin-inline-end: .25rem;
  min-width: 160px;
}
.dropdown-submenu.show > .dropdown-menu,
.dropdown-submenu:hover > .dropdown-menu { display: block; }

/* ------------------------------------------------------------------ *
 * Users list — category chips + grouped rows (دسته‌بندی کاربران)
 * ------------------------------------------------------------------ */
.user-group-chip {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .5rem .85rem;
  font-size: .82rem; font-weight: 600;
  background: var(--sub-bg);
  color: #6b7688;
  border: 1px solid rgba(16, 25, 43, .10);
  border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
.user-group-chip:hover { background: rgba(16, 25, 43, .06); text-decoration: none; }
.user-group-chip.is-active,
html[data-theme="dark"] .user-group-chip.is-active { background: var(--brand); border-color: transparent; color: #fff; }
.user-group-chip .user-group-count {
  background: rgba(16, 25, 43, .08);
  border-radius: 999px;
  padding: 0 .5rem;
  font-variant-numeric: tabular-nums;
}
.user-group-chip.is-active .user-group-count,
html[data-theme="dark"] .user-group-chip.is-active .user-group-count { background: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .user-group-chip {
  background: var(--panel-bg); color: #c7d0e0;
  border-color: rgba(255, 255, 255, .10);
}
html[data-theme="dark"] .user-group-chip:hover { background: var(--hover-bg); }
html[data-theme="dark"] .user-group-chip .user-group-count { background: rgba(255, 255, 255, .10); }
html[data-theme="dark"] .user-group-chip.is-active:hover { background: var(--brand); }

/* ------------------------------------------------------------------ *
 * Searchable select (combo) — parcel form sender/customer pickers
 * ------------------------------------------------------------------ */
.combo { position: relative; }
/* Native select: still submitted and focusable for browser validation, but
   visually removed and out of the tab order. */
.combo > select.combo-native {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.combo-login { flex: 1 1 auto; min-width: 0; }
.combo-login .combo-input { width: 100%; }
.combo-input { background: transparent; }
.combo-input::placeholder { color: #9aa3b5; }
.combo-menu {
  position: fixed;
  z-index: 2000;
  max-height: 260px;
  overflow-y: auto;
  background: var(--sub-bg);
  border: 1px solid rgba(16, 25, 43, .10);
  border-radius: .6rem;
  box-shadow: 0 14px 40px rgba(16, 25, 43, .16);
  padding: .3rem;
}
html[data-theme="dark"] .combo-menu {
  background: var(--panel-bg);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.combo-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: .5rem .6rem;
  border-radius: .45rem;
  cursor: pointer;
  font-size: .87rem;
}
.combo-item:hover,
.combo-item.is-active { background: color-mix(in srgb, var(--brand) 10%, #fff); }
html[data-theme="dark"] .combo-item:hover,
html[data-theme="dark"] .combo-item.is-active { background: var(--hover-bg); }
.combo-name { font-weight: 600; color: #1f2937; }
.combo-phone { color: #8a93a8; font-size: .78rem; direction: ltr; }
html[data-theme="dark"] .combo-name { color: #e6ebf5; }
.combo-empty { padding: .7rem .6rem; color: #8a93a8; font-size: .82rem; text-align: center; }

/* Public site — camera barcode scanner modal */
.scan-stage {
  background: #10131c;
  border-radius: .8rem;
  overflow: hidden;
}
.scan-stage video {
  width: 100%;
  display: block;
}
.scan-stage canvas { display: none; } /* the library's frame-grab canvas */
.scan-status {
  margin-top: .6rem;
  font-size: .82rem;
  color: #8a93a8;
}
.scan-status.text-danger { color: #dc3545; }

.table-group-row > td {
  background: rgba(16, 25, 43, .05);
  font-size: .8rem;
  font-weight: 700;
  color: #6b7688;
  padding: .5rem .9rem;
}
.table-group-row:hover > td { background: rgba(16, 25, 43, .05); box-shadow: none; }
html[data-theme="dark"] .table-group-row > td { background: rgba(255, 255, 255, .05); color: var(--text-soft); }
html[data-theme="dark"] .table-group-row:hover > td { background: rgba(255, 255, 255, .05); }

/* Barcode / label */
.parcel-label {
  border: 2px solid #10192b; border-radius: .6rem; padding: 1rem;
  width: 100%; max-width: 380px; background: #fff;
}
.parcel-label .lbl-code { font-weight: 800; letter-spacing: 2px; font-size: 1.1rem; }

/* Print */
@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .site-footer, .no-print, .btn, .filter-bar, .toast-stack { display: none !important; }
  .main { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  .panel { border: 0 !important; box-shadow: none !important; }
  a[href]:after { content: ''; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* Responsive */
.sidebar-overlay { display: none; }

/* A section with no sub-items collapses the sidebar onto the rail */
html.nav-only-rail .sidebar { width: var(--rail-width); }
html.nav-only-rail .main { margin-inline-start: var(--rail-width); }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: min(var(--sidebar-width), calc(100vw - 44px)); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0) !important; }
  .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(3,10,24,.5); z-index: 1035; }
  .main { margin-inline-start: 0 !important; }
  .topbar { padding-inline-start: 64px; }
  /* The portal header has no menu toggle, so it needs no reserved gap. */
  .portal-body .topbar { padding-inline: .85rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3rem 0; }
}

@media (max-width: 575.98px) {
  .page-content { padding: 1rem .85rem 2rem; }
  .kpi .kpi-value { font-size: 1.3rem; }
  .filter-bar .search-input, .filter-bar .form-control, .filter-bar .form-select { min-width: 118px; }
  .filter-bar { padding: .6rem .7rem; gap: .4rem; }
}

@media (max-width: 767.98px) {
  body.site-public.site-public-portal { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)); }
  .parcel-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    overflow: visible;
    padding: .7rem;
  }
  .parcel-filter-bar > * { width: 100%; min-width: 0; }
  .parcel-filter-bar .search-input { grid-column: 1 / -1; min-width: 0; }
  .parcel-filter-bar .form-control,
  .parcel-filter-bar .form-select { min-width: 0; font-size: .9rem; }
  .filter-bar.parcel-filter-bar input[data-jalali-date] { min-width: 0; }
  .parcel-filter-bar .btn { min-height: 2.7rem; }
  /* Mobile parcel lists (مرسولات): the filter bar is not needed on a phone;
     search/filter stay available on the desktop layout. */
  .parcel-filter-bar { display: none; }
  .parcel-list-wrap { overflow: visible; }
  .parcel-list-table { display: block; width: 100%; }
  .parcel-list-table thead { display: none; }
  .parcel-list-table tbody {
    display: grid;
    gap: .65rem;
    padding: .65rem;
  }
  .parcel-list-table tbody tr:not(.parcel-empty-row) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding: .35rem .65rem;
    border: 1px solid var(--panel-border, rgba(16,25,43,.08));
    border-radius: 1rem;
    background: var(--panel-bg, #fff);
    box-shadow: 0 5px 16px rgba(16,25,43,.06);
  }
  .parcel-list-table tbody td:not([colspan]) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: .55rem .2rem;
    border: 0;
    border-bottom: 1px solid rgba(16,25,43,.07);
    overflow-wrap: anywhere;
    font-size: .88rem;
  }
  .parcel-list-table tbody td:not([colspan])::before {
    content: attr(data-label);
    margin-bottom: .18rem;
    color: var(--text-soft, #8992a6);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.3;
  }
  .parcel-list-table tbody td:first-child:not([colspan]) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-bottom: 1px solid rgba(16,25,43,.1);
  }
  .parcel-list-table tbody td:first-child::before { flex: 0 0 auto; margin: 0; }
  .parcel-list-table tbody td:first-child a { min-width: 0; overflow-wrap: anywhere; }
  .parcel-list-table tbody td:nth-child(2) { grid-column: 1 / -1; }
  .parcel-list-table tbody td:last-child:not([colspan]) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    border-bottom: 0;
    padding-block: .65rem .2rem;
  }
  .parcel-list-table tbody td:last-child::before { margin: 0; margin-inline-end: auto; }
  .parcel-list-table .parcel-action-button,
  .parcel-list-table td:last-child > a { min-height: 2.65rem; }
  .parcel-list-table .parcel-action-label { display: inline; margin-inline-start: .35rem; }
  .parcel-list-table tbody tr.parcel-empty-row { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .parcel-list-table tbody tr.parcel-empty-row td { display: block; border: 0; padding: .5rem; }
  .parcel-list-table tbody tr.parcel-empty-row td::before { display: none; }
  /* Portal home: a small header plus four shortcuts that fill the screen. */
  .portal-dashboard { --portal-topbar: 60px; }
  .portal-dashboard .topbar { height: var(--portal-topbar); padding-inline: .85rem; }
  .portal-dashboard .page-head { display: none !important; }
  .portal-dashboard .page-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--portal-topbar));
    height: calc(100dvh - var(--portal-topbar));
    min-height: 0;
    padding: .55rem .85rem calc(.55rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }
  .portal-dashboard .page-content > .portal-launcher {
    flex: 1 1 auto;
    min-height: 0;
  }
  .portal-dashboard .portal-launcher { gap: .5rem; max-width: none; }
  .portal-dashboard .portal-launcher-brand { flex: 0 0 auto; }
  .portal-dashboard .portal-launcher-logo { width: 2.2rem; height: 2.2rem; }
  .portal-dashboard .portal-launcher-name { font-size: .92rem; }
  .portal-dashboard .portal-launcher-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }
  .portal-dashboard .portal-launcher-tile {
    height: 100%;
    min-height: 0;
    gap: .45rem;
    padding: .45rem .4rem;
  }
  .portal-dashboard .portal-launcher-icon {
    width: clamp(3.2rem, 19vw, 6rem);
    height: clamp(3.2rem, 19vw, 6rem);
    font-size: clamp(1.8rem, 10vw, 3.4rem);
  }
  .portal-dashboard .portal-launcher-label { font-size: clamp(.8rem, 3.5vw, .98rem); }
  .portal-dashboard-detail { display: none !important; }
  .portal-dashboard .page-content { padding-top: 0; }
  .portal-dashboard .portal-launcher-brand {
    min-height: 14rem; flex-direction: column; gap: 1.1rem;
    margin: 0 -.85rem .1rem; padding: 1rem .85rem 1.1rem;
    border-radius: 0 0 2rem 2rem; background: var(--brand); color: #fff;
  }
  .portal-dashboard .portal-launcher-logo {
    width: clamp(5.8rem, 27vw, 7rem); height: clamp(5.8rem, 27vw, 7rem);
    border: 0; background: #fff; box-shadow: 0 8px 24px rgba(16, 25, 43, .14);
  }
  .portal-dashboard .portal-launcher-name { color: #fff; font-size: clamp(1rem, 4.2vw, 1.25rem); text-align: center; }
  .portal-dashboard .portal-launcher-role { border-color: rgba(255, 255, 255, .42); background: transparent; color: #fff; }
  .portal-dashboard .portal-launcher-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .portal-dashboard .mobile-quick-nav { display: none !important; }
  .mobile-quick-nav {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 1025;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .1rem;
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(16, 25, 43, .1);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 24px rgba(16, 25, 43, .08);
    backdrop-filter: blur(14px);
  }
  .mobile-quick-link {
    display: flex;
    min-width: 0;
    min-height: 3.25rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    border-radius: .75rem;
    padding: .15rem .08rem;
    color: #68748a;
    text-align: center;
    text-decoration: none;
    font-size: clamp(.5rem, 2.55vw, .62rem);
    font-weight: 600;
    line-height: 1.1;
    transition: color .15s ease, background .15s ease;
  }
  .mobile-quick-link:hover,
  .mobile-quick-link:focus-visible { color: var(--brand-ink); text-decoration: none; }
  .mobile-quick-icon {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    font-size: 1.6rem;
    line-height: 1;
    transition: background .15s ease, color .15s ease;
  }
  .mobile-quick-icon > i.bi { font-size: 1.6rem !important; line-height: 1; }
  .mobile-quick-label {
    display: block;
    width: 100%;
    line-height: 1.2;
    overflow-wrap: break-word;
    white-space: normal;
  }
  .mobile-quick-link.active { color: var(--brand-ink); background: rgba(255, 209, 3, .12); }
  .mobile-quick-link.active .mobile-quick-icon {
    background: linear-gradient(135deg, var(--brand), #ffe066);
    color: #10192b;
  }
  .mobile-quick-link:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: -2px; }
}

html[data-theme="dark"] .mobile-quick-nav {
  border-top-color: var(--panel-border);
  background: rgba(30, 30, 30, .96);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .26);
}
html[data-theme="dark"] .mobile-quick-link { color: var(--text-soft); }
html[data-theme="dark"] .mobile-quick-link:hover,
html[data-theme="dark"] .mobile-quick-link:focus-visible { color: #ffe879; }
html[data-theme="dark"] .mobile-quick-link.active {
  color: #ffe879;
  background: rgba(255, 209, 3, .09);
}
/* Compact KPI grid (6 cards in a row on XL) */
@media (min-width: 1200px) {
  .kpi-lg.kpi-sm-pad { padding: 1.1rem 1.05rem 1rem; }
  .kpi-lg.kpi-sm-pad .kpi-value { font-size: 1.55rem; letter-spacing: -.8px; }
  .kpi-lg.kpi-sm-pad .kpi-label { font-size: .84rem; }
  .kpi-lg.kpi-sm-pad .kpi-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.25rem; }
  .kpi-lg.kpi-sm-pad::after { width: 110px; height: 110px; inset-inline-end: -34px; top: -44px; }
  .kpi-lg.kpi-sm-pad .kpi-sub { margin-top: .55rem; font-size: .75rem; }
}


/* Chart placeholders resolve to real canvases */
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }


/* ==========================================================================
   Error pages
   ========================================================================== */
.error-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(800px 400px at 20% 20%, rgba(255,209,3,.18), transparent 60%),
              linear-gradient(160deg, #171717 0%, #212121 100%);
  padding: 2rem;
}
.error-box {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem; padding: 2.6rem 2rem; max-width: 520px; width: 100%; color: #fff;
}
.error-box p { color: #b7c0d4; }
.error-code { font-size: 4.2rem; font-weight: 800; letter-spacing: -2px; line-height: 1; color: #ff6b6b; }

/* ==========================================================================
   Site building blocks
   ========================================================================== */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -1.4px; line-height: 1.2; }
.hero-track { position: relative; z-index: 2; }
@media (max-width: 991.98px) { .hero-grid { grid-template-columns: 1fr; } }

.service-card { height: 100%; padding: 1.4rem 1.35rem; }
.service-card h5 { font-weight: 700; font-size: 1.05rem; margin: 1rem 0 .5rem; }
.service-card p { color: #66708a; font-size: .92rem; margin: 0; }

.step-card { text-align: center; padding: 1.3rem 1rem; height: 100%; }
.step-card .step-no {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800;
  background: var(--brand); color: #10192b; margin-bottom: .8rem;
}
.step-card h6 { font-weight: 700; }
.step-card p { color: #66708a; font-size: .88rem; margin: 0; }

.zone-card { height: 100%; padding: 1.2rem 1.25rem; }
.zone-card .zone-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.zone-card .zone-name { font-weight: 700; }

.rate-row { display: flex; justify-content: space-between; gap: .8rem; font-size: .9rem; padding: .45rem 0; border-top: 1px dashed #e6eaf2; }
.rate-row:first-of-type { border-top: 0; }
.rate-row .rate-weight { color: #66708a; }
.rate-row .rate-fee { font-weight: 700; color: var(--brand-ink); white-space: nowrap; }

.price-table th { background: #f5f7fc; font-weight: 700; }
.price-table td { vertical-align: middle; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.detail-item .d-label { font-size: .78rem; color: #8a93a8; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.detail-item .d-value { font-weight: 600; word-break: break-word; }
.customer-request-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: .85rem; min-width: 0; }
.customer-request-card { min-width: 0; max-width: 100%; padding: 1rem; overflow: hidden; border: 1px solid var(--panel-border, rgba(16,25,43,.1)); border-radius: var(--radius); background: var(--panel-bg, #fff); }
.customer-request-card-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding-bottom: .8rem; border-bottom: 1px solid var(--panel-border, rgba(16,25,43,.08)); }
.customer-request-card-number { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: .12rem; }
.customer-request-card-number strong { max-width: 100%; overflow-wrap: anywhere; }
.customer-request-card-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; margin-top: .85rem; }
.customer-request-card-details .detail-item { min-width: 0; }
.customer-request-card-action { display: flex; justify-content: flex-end; margin-top: .85rem; padding-top: .7rem; border-top: 1px solid var(--panel-border, rgba(16,25,43,.08)); }

.timeline-item .t-title { font-weight: 600; font-size: .92rem; }
.timeline-item .t-meta { font-size: .78rem; color: #8a93a8; }

.track-result { background: #fff; border-radius: var(--radius); border: 1px solid rgba(16,25,43,.07); box-shadow: var(--shadow-sm); }
.track-result .tr-head { padding: 1.1rem 1.25rem; border-bottom: 1px solid #eef1f7; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.track-result .tracking-receipt-table { --bs-table-bg: transparent; --bs-table-color: inherit; table-layout: fixed; }
.track-result .tracking-receipt-table > tbody > tr > td { width: 50%; padding: .8rem .65rem; vertical-align: middle; border-bottom: 1px solid var(--panel-border, rgba(16,25,43,.08)); }
.track-result .tracking-receipt-table > tbody > tr:last-child > td { border-bottom: 0; }
.tracking-receipt-cell { display: flex; min-height: 3rem; align-items: center; gap: .65rem; overflow-wrap: anywhere; }
.tracking-receipt-icon { display: inline-flex; width: 2.35rem; height: 2.35rem; flex: 0 0 2.35rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--panel-bg-2, #f1f3f6); color: var(--text-soft, #7b8497); font-size: 1rem; }
.tracking-receipt-copy { display: flex; min-width: 0; flex-direction: column; gap: .12rem; }
.tracking-receipt-label { color: var(--text-soft, #7b8497); font-size: .84rem; font-weight: 500; }
.tracking-receipt-value { color: var(--text-strong, #202938); font-size: .98rem; font-weight: 700; }
.tracking-receipt-history { border-top: 1px dashed var(--panel-border, rgba(16,25,43,.18)); padding-top: 1rem; }
.tracking-receipt-history > h2 { color: var(--text-strong, #202938); }
.tracking-receipt-history .table { margin-bottom: 0; }
.track-result .tracking-receipt-history table { width: 100%; table-layout: fixed; }
.track-result .tracking-receipt-history th,
.track-result .tracking-receipt-history td { overflow-wrap: anywhere; }
html[data-theme="dark"] .tracking-receipt-table > tbody > tr > td { border-color: var(--panel-border); }

@media (max-width: 575.98px) {
  .page-hero-tracking-result { display: none; }
  .tracking-result-section { padding: .5rem 0 .8rem; }
  .tracking-result-section .container { padding-inline: .55rem; }
  .tracking-result-section .row { margin-inline: 0; }
  .tracking-result-section .row > * { padding-inline: .25rem; }
  .track-result.mb-3,
  .track-result.mb-4 { margin-bottom: .55rem !important; }
  .track-result .tr-head { min-height: 0; padding: .45rem .6rem; gap: .4rem; }
  .track-result .tr-head .fs-5 { font-size: .95rem !important; }
  .track-result > .p-3,
  .track-result > .p-4 { padding: .4rem !important; }
  .track-result .tracking-receipt-table > tbody > tr > td { padding: .35rem .2rem !important; }
  .tracking-receipt-label { font-size: .7rem; line-height: 1.15; }
  .tracking-receipt-value { font-size: .8rem; line-height: 1.2; }
  .tracking-receipt-icon { width: 1.65rem; height: 1.65rem; flex-basis: 1.65rem; font-size: .76rem; }
  .tracking-receipt-cell { min-height: 2.2rem; gap: .35rem; }
  .track-result .tracking-receipt-history { margin-top: .35rem !important; padding-top: .45rem; }
  .tracking-receipt-history > h2 { margin-bottom: .2rem !important; font-size: .85rem; }
  .track-result .tracking-receipt-history .table > :not(caption) > * > * { padding: .24rem .38rem; font-size: .76rem; line-height: 1.15; }
  .tracking-result-portal-head .page-head { margin-bottom: .45rem !important; }
}

.page-hero { background: linear-gradient(140deg, #171717, #2b2b2b); color: #fff; padding: 3.2rem 0 2.6rem; }
.page-hero h1 { font-weight: 800; letter-spacing: -1px; }
.page-hero .lead { color: #b7c0d4; }

.table-responsive > .table > :not(caption) > * > * { padding: .62rem .75rem; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: .78rem; color: #8a93a8; }

.badge-soft { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

.timeline-item .t-title { line-height: 1.6; }
.timeline-item .t-title .badge { font-size: .68rem; }

.no-scroll { overflow: hidden; }

/* ------------------------------------------------------------------ */
/* Admin dashboard — hero, at-a-glance tiles and small helpers         */
/* ------------------------------------------------------------------ */
.dash-hero {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.15rem;
  padding: 1.45rem 1.55rem;
  border-radius: calc(var(--radius) * 1.7);
  border: 1px solid rgba(16, 25, 43, .10);
  background:
    radial-gradient(760px 280px at 100% -30%, rgba(255, 255, 255, .34), transparent 62%),
    radial-gradient(620px 260px at -8% 130%, rgba(16, 25, 43, .07), transparent 60%),
    linear-gradient(132deg, var(--brand) 0%, #ffc700 52%, #ffb300 100%);
  box-shadow: 0 18px 40px rgba(224, 180, 0, .30);
  color: #10192b;
  margin-bottom: 1rem;
}
.dash-hero::after {
  content: ''; position: absolute; inset-inline-end: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid rgba(16, 25, 43, .12);
  box-shadow: 0 0 0 38px rgba(16, 25, 43, .045), 0 0 0 76px rgba(16, 25, 43, .03);
  pointer-events: none;
}
.dash-hero-copy { position: relative; z-index: 1; min-width: 0; flex: 1 1 320px; }
.dash-hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: 1.1px;
  color: rgba(16, 25, 43, .70); text-transform: uppercase;
}
.dash-hero-eyebrow i { font-size: .85rem; }
.dash-hero h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 800;
  letter-spacing: -.8px; margin: .45rem 0 .35rem;
}
.dash-hero h1 .hero-name { color: #5f4b00; }
.dash-hero-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
  margin: 0; color: rgba(16, 25, 43, .78); font-size: .855rem;
}
.dash-hero-summary i { color: #10192b; }
.dash-hero-summary .hero-sep { opacity: .4; margin: 0 .15rem; }
.dash-hero-actions {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: .5rem;
  flex: 0 1 auto;
}
.btn-hero {
  background: #10192b; border: 1px solid #10192b; color: #ffd103;
  font-weight: 700; border-radius: .6rem; padding: .5rem .95rem;
  display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem;
}
.btn-hero:hover, .btn-hero:focus { background: #0b1220; border-color: #0b1220; color: #ffe14d; }
.btn-hero-ghost {
  background: rgba(255, 255, 255, .60); border: 1px solid rgba(16, 25, 43, .16);
  color: #10192b; font-weight: 600; border-radius: .6rem; padding: .5rem .9rem;
  display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem;
}
.btn-hero-ghost:hover, .btn-hero-ghost:focus {
  background: #fff; border-color: rgba(16, 25, 43, .30); color: #10192b;
}
.dash-hero .btn-hero i, .dash-hero .btn-hero-ghost i { font-size: .95rem; }

/* At-a-glance grid — the newer modules in one compact row */
.dash-glance {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}
.glance-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem; border-radius: calc(var(--radius) * .95);
  border: 1px solid rgba(16, 25, 43, .07);
  background: #f8f9fd;
  color: inherit; min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.glance-item:hover {
  transform: translateY(-2px); border-color: rgba(224, 180, 0, .45);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
}
.glance-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem; background: var(--brand-soft); color: var(--brand-ink);
}
.glance-copy { min-width: 0; line-height: 1.2; }
.glance-label {
  display: block; font-size: .72rem; font-weight: 500; color: #69748c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glance-value {
  display: block; font-size: 1.02rem; font-weight: 800;
  letter-spacing: -.35px; color: #10192b; margin-top: .1rem;
}
.glance-sub { display: block; font-size: .68rem; color: #8a93a8; margin-top: .1rem; }
.glance-item.is-green .glance-icon { background: #e6f6ec; color: #198754; }
.glance-item.is-amber .glance-icon { background: #fff6e5; color: #fd7e14; }
.glance-item.is-red   .glance-icon { background: #fdecec; color: #dc3545; }
.glance-item.is-blue  .glance-icon { background: #e8f1ff; color: #0d6efd; }
.glance-item.is-purple .glance-icon { background: #f2ecff; color: #6f42c1; }
html[data-theme="dark"] .glance-item {
  background: var(--panel-bg-2); border-color: var(--panel-border);
}
html[data-theme="dark"] .glance-label { color: var(--text-soft); }
html[data-theme="dark"] .glance-value { color: var(--text-strong); }
html[data-theme="dark"] .glance-sub { color: #8b95ab; }
html[data-theme="dark"] .glance-item.is-green .glance-icon { background: rgba(25, 135, 84, .20); color: #69d08c; }
html[data-theme="dark"] .glance-item.is-amber .glance-icon { background: rgba(253, 126, 20, .18); color: #ffa94d; }
html[data-theme="dark"] .glance-item.is-red .glance-icon   { background: rgba(220, 53, 69, .20); color: #ff8787; }
html[data-theme="dark"] .glance-item.is-blue .glance-icon  { background: rgba(13, 110, 253, .20); color: #8ab4ff; }
html[data-theme="dark"] .glance-item.is-purple .glance-icon{ background: rgba(111, 66, 193, .22); color: #b197fc; }

/* Courier success rate bar */
.dash-rate { display: flex; align-items: center; gap: .45rem; margin-top: .35rem; max-width: 190px; }
.dash-rate .progress { height: 4px; border-radius: 99px; background: #eef1f7; flex: 1 1 auto; min-width: 56px; }
.dash-rate .progress-bar { background-color: #2fb344; border-radius: 99px; }
.dash-rate span { font-size: .68rem; color: #8a93a8; font-weight: 600; white-space: nowrap; }
html[data-theme="dark"] .dash-rate .progress { background: #26314a; }
html[data-theme="dark"] .dash-rate span { color: #8b95ab; }

.dash-panel-note { font-size: .74rem; color: #8a93a8; font-weight: 500; }
html[data-theme="dark"] .dash-panel-note { color: var(--text-soft); }

/* ------------------------------------------------------------------ */
/* Dashboard motion (scoped to .dash-anim - admin dashboard only)      */
/* ------------------------------------------------------------------ */
@keyframes dashRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes dashFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dashPop {
  0% { opacity: 0; transform: scale(.5) rotate(-10deg); }
  60% { opacity: 1; transform: scale(1.12) rotate(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes dashGrow { from { width: 0; } }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.dash-anim .kpi,
.dash-anim .panel {
  animation: dashRise .6s cubic-bezier(.22, .61, .36, 1) backwards;
  animation-delay: var(--d, 0s);
}
.dash-anim .dash-hero,
.dash-anim .glance-item {
  animation: dashRise .55s cubic-bezier(.22, .61, .36, 1) backwards;
  animation-delay: var(--d, 0s);
}
.dash-anim .kpi .kpi-icon {
  animation: dashPop .55s cubic-bezier(.34, 1.56, .64, 1) backwards;
  animation-delay: calc(var(--d, 0s) + .2s);
}
.dash-anim .kpi.kpi-grad {
  background-size: 220% 220%;
  animation: dashRise .6s cubic-bezier(.22, .61, .36, 1) backwards, gradShift 7s ease-in-out 1.4s infinite;
  animation-delay: var(--d, 0s), 1.4s;
}

/* status tiles: stagger + growing bars */
.dash-anim .row.g-2 > *:nth-child(1) { --d: .68s; }
.dash-anim .row.g-2 > *:nth-child(2) { --d: .72s; }
.dash-anim .row.g-2 > *:nth-child(3) { --d: .76s; }
.dash-anim .row.g-2 > *:nth-child(4) { --d: .80s; }
.dash-anim .row.g-2 > *:nth-child(5) { --d: .84s; }
.dash-anim .row.g-2 > *:nth-child(6) { --d: .88s; }
.dash-anim .row.g-2 > *:nth-child(7) { --d: .92s; }
.dash-anim .row.g-2 > *:nth-child(8) { --d: .96s; }
.dash-anim .row.g-2 > *:nth-child(9) { --d: 1s; }
.dash-anim .row.g-2 > *:nth-child(10) { --d: 1.04s; }
.dash-anim .row.g-2 > *:nth-child(n+11) { --d: 1.08s; }
.dash-anim .status-tile { animation: dashRise .5s cubic-bezier(.22, .61, .36, 1) backwards; animation-delay: var(--d, 0s); }
.dash-anim .status-tile .st-bar i { animation: dashGrow .9s cubic-bezier(.22, .61, .36, 1) .25s backwards; }
.dash-anim .status-tile .st-dot { animation: dashPop .5s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--d, 0s) + .15s); }

/* table rows */
.dash-anim .table tbody tr { animation: dashFade .45s backwards; }
.dash-anim .table tbody tr:nth-child(1) { animation-delay: .86s; }
.dash-anim .table tbody tr:nth-child(2) { animation-delay: .90s; }
.dash-anim .table tbody tr:nth-child(3) { animation-delay: .94s; }
.dash-anim .table tbody tr:nth-child(4) { animation-delay: .98s; }
.dash-anim .table tbody tr:nth-child(5) { animation-delay: 1.02s; }
.dash-anim .table tbody tr:nth-child(6) { animation-delay: 1.06s; }
.dash-anim .table tbody tr:nth-child(n+7) { animation-delay: 1.1s; }

/* activity timeline */
.dash-anim .timeline-item { animation: dashRise .45s cubic-bezier(.22, .61, .36, 1) backwards; }
.dash-anim .timeline-item:nth-child(1) { animation-delay: .86s; }
.dash-anim .timeline-item:nth-child(2) { animation-delay: .92s; }
.dash-anim .timeline-item:nth-child(3) { animation-delay: .98s; }
.dash-anim .timeline-item:nth-child(4) { animation-delay: 1.04s; }
.dash-anim .timeline-item:nth-child(5) { animation-delay: 1.10s; }
.dash-anim .timeline-item:nth-child(6) { animation-delay: 1.16s; }
.dash-anim .timeline-item:nth-child(7) { animation-delay: 1.22s; }
.dash-anim .timeline-item:nth-child(n+8) { animation-delay: 1.28s; }

/* micro-interactions */
.dash-anim .kpi-lg .kpi-sub .bi-chevron-left { transition: transform .2s ease; }
.dash-anim .kpi-lg:hover .kpi-sub .bi-chevron-left { transform: translateX(-4px); }

@media (prefers-reduced-motion: reduce) {
  .dash-anim *, .dash-anim *::before, .dash-anim *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Dark mode — html[data-theme="dark"] (Bootstrap vars come from data-bs-theme)
   ========================================================================== */

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #121212;
  --sidebar-bg: #1c1c1c;
  --sidebar-hover: #2a2a2a;
  --sidebar-text: #b0b0b0;
  --sidebar-heading: #6f6f6f;
  --sidebar-border: transparent;
  --sidebar-brand-text: #fff;
  --sidebar-link-hover-text: #fff;
  --sidebar-scrollbar: #3a3a3a;
  --sub-bg: #1e1e1e;
  --panel-bg: #1e1e1e;
  --panel-bg-2: #262626;
  --panel-border: rgba(255, 255, 255, .08);
  --text-strong: #f0f0f0;
  --text-soft: #a8a8a8;
  --field-bg: #1c1c1c;
  --field-border: #3a3a3a;
  --hover-bg: #2a2a2a;
  --hover-bg-2: #333333;
  --brand-soft: rgba(110, 168, 254, .16);
  --brand-text: #8ab4ff;
  --chart-grid: rgba(255, 255, 255, .07);
  --chart-label: #9aa5bb;
  --chart-center: #e7ecf6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] body { background: var(--page-bg); color: #dee2e6; }

html[data-theme="dark"] .site-navbar {
  background: rgba(28, 28, 28, .92);
  border-bottom-color: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .site-nav-link { color: #c7d0e0 !important; }
html[data-theme="dark"] .site-nav-link:hover { background: var(--hover-bg); color: var(--brand-text) !important; }
html[data-theme="dark"] .site-nav-link.active { color: var(--brand-text) !important; }

html[data-theme="dark"] .track-card {
  background: var(--panel-bg);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] .track-card .input-group-text { background: var(--panel-bg); border-color: var(--field-border); }
html[data-theme="dark"] [dir="rtl"] .track-card .input-group-text { border-inline-end: 1px solid var(--field-border); }

html[data-theme="dark"] .section-muted,
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .step-card p,
html[data-theme="dark"] .rate-row .rate-weight,
html[data-theme="dark"] .faq-item .faq-a,
html[data-theme="dark"] .cell-sub,
html[data-theme="dark"] .form-text { color: var(--text-soft); }

html[data-theme="dark"] .card-soft,
html[data-theme="dark"] .stat-tile,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .track-result,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .status-tile {
  background: var(--panel-bg);
  border-color: var(--panel-border);
}

html[data-theme="dark"] .icon-tile.alt { background: rgba(214, 51, 132, .16); color: #f06595; }
html[data-theme="dark"] .icon-tile.green { background: rgba(25, 135, 84, .18); color: #51cf66; }
html[data-theme="dark"] .icon-tile.amber { background: rgba(253, 126, 20, .16); color: #ff922b; }
html[data-theme="dark"] .icon-tile,
html[data-theme="dark"] .kpi .kpi-icon { background: var(--brand-soft); color: var(--brand-text); }

html[data-theme="dark"] .step-node {
  background: var(--panel-bg-2); border-color: #3a3a3a; color: #9a9a9a;
}
html[data-theme="dark"] .step-node.current { box-shadow: 0 0 0 6px rgba(255, 209, 3, .22); }

html[data-theme="dark"] .stat-tile .stat-value { color: var(--text-strong); }
html[data-theme="dark"] .kpi .kpi-value { color: var(--text-strong); }
html[data-theme="dark"] .stat-tile .stat-label,
html[data-theme="dark"] .kpi .kpi-label,
html[data-theme="dark"] .kpi-lg .kpi-sub { color: var(--text-soft); }
html[data-theme="dark"] .kpi-lg .kpi-label { color: #c2cbdd; }
html[data-theme="dark"] .kpi.is-green .kpi-icon { background: rgba(25, 135, 84, .2); color: #69d08c; }
html[data-theme="dark"] .kpi.is-green::after { background: rgba(25, 135, 84, .2); }
html[data-theme="dark"] .kpi.is-amber .kpi-icon { background: rgba(253, 126, 20, .18); color: #ffa94d; }
html[data-theme="dark"] .kpi.is-amber::after { background: rgba(253, 126, 20, .18); }
html[data-theme="dark"] .kpi.is-red .kpi-icon { background: rgba(220, 53, 69, .2); color: #ff8787; }
html[data-theme="dark"] .kpi.is-red::after { background: rgba(220, 53, 69, .2); }
html[data-theme="dark"] .kpi.is-purple .kpi-icon { background: rgba(111, 66, 193, .22); color: #b197fc; }
html[data-theme="dark"] .kpi.is-purple::after { background: rgba(111, 66, 193, .22); }
html[data-theme="dark"] .kpi.is-blue .kpi-icon { background: rgba(255, 209, 3, .2); color: #91b9ff; }
html[data-theme="dark"] .kpi.is-blue::after { background: rgba(255, 209, 3, .2); }
html[data-theme="dark"] .kpi-lg:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }

html[data-theme="dark"] .kpi-trend-pill { background: rgba(25, 135, 84, .2); color: #75d19a; }
html[data-theme="dark"] .kpi-trend-pill.down { background: rgba(220, 53, 69, .2); color: #ff9aa4; }

html[data-theme="dark"] .status-tile .st-label { color: #c2cbdd; }
html[data-theme="dark"] .status-tile .st-count { color: var(--text-strong); }
html[data-theme="dark"] .status-tile .st-bar { background: #26314a; }
html[data-theme="dark"] .status-tile .st-pct { color: #8b95ab; }
html[data-theme="dark"] .status-tile.is-active {
  background: color-mix(in srgb, var(--st) 14%, var(--panel-bg));
}
html[data-theme="dark"] .status-tile.is-active .st-label { color: var(--text-strong); }

html[data-theme="dark"] .table-datatable thead th {
  background: var(--panel-bg-2); color: var(--text-soft); border-bottom-color: var(--panel-border);
}
html[data-theme="dark"] .table-datatable tbody td { border-color: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .table tbody tr:hover > * {
  background-color: var(--hover-bg);
  box-shadow: none;
}
html[data-theme="dark"] .table-datatable .cell-main,
html[data-theme="dark"] .cell-main { color: var(--text-strong); }
html[data-theme="dark"] .price-table th { background: var(--panel-bg-2); }

html[data-theme="dark"] .form-label { color: #c9d2e2; }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: var(--field-bg); border-color: var(--field-border); color: #e7ecf6;
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  background-color: var(--field-bg); border-color: #5b8def; color: #e7ecf6;
}
html[data-theme="dark"] .form-control::placeholder { color: #7d879e; }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-select:disabled { background-color: #141c2d; color: #7d879e; }
html[data-theme="dark"] .input-group-text { background: var(--panel-bg-2); border-color: var(--field-border); color: #c9d2e2; }
html[data-theme="dark"] .form-section-title { border-bottom-color: var(--field-border); }
html[data-theme="dark"] .field-error { color: #ff8787; }
html[data-theme="dark"] .form-check-input { background-color: var(--field-bg); border-color: var(--field-border); }
html[data-theme="dark"] .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

html[data-theme="dark"] .btn-ghost { border-color: var(--field-border); color: #c9d2e2; }
html[data-theme="dark"] .btn-ghost:hover { background: var(--hover-bg); border-color: #3a4763; color: #fff; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

html[data-theme="dark"] .nav-tabs-custom { border-bottom-color: var(--panel-border); }
html[data-theme="dark"] .nav-tabs-custom .nav-link { color: var(--text-soft); }
html[data-theme="dark"] .nav-tabs-custom .nav-link:hover { color: var(--brand-text); border-bottom-color: rgba(138, 180, 255, .45); }
html[data-theme="dark"] .nav-tabs-custom .nav-link.active { color: var(--brand-text); background: transparent; }

html[data-theme="dark"] .timeline::before { background: #253047; }
html[data-theme="dark"] .timeline-item::before { background: var(--panel-bg); border-color: #3a3a3a; }
html[data-theme="dark"] .timeline-item.is-old::before { border-color: #3a3a3a; }
html[data-theme="dark"] .timeline-item .t-meta { color: var(--text-soft); }

html[data-theme="dark"] .track-step::before { background: #253047; }
html[data-theme="dark"] .track-step .dot { background: #1b2740; color: #8b95ab; }
html[data-theme="dark"] .track-step.done .dot { background: rgba(25, 135, 84, .22); color: #69d08c; }
html[data-theme="dark"] .track-step.current .dot { box-shadow: 0 0 0 6px rgba(255, 209, 3, .2); }

html[data-theme="dark"] .empty-state { color: var(--text-soft); }
html[data-theme="dark"] .empty-state h6 { color: #b9c2d4; }

html[data-theme="dark"] .app-toast {
  background: var(--panel-bg-2); box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
}

html[data-theme="dark"] .topbar {
  background: var(--panel-bg); border-bottom-color: var(--panel-border);
}
html[data-theme="dark"] .topbar .breadcrumb { color: var(--text-soft); }
html[data-theme="dark"] .topbar-crumb .breadcrumb-item.active { color: #dbe3f2; }
html[data-theme="dark"] .crumb-sep { color: #64708c; }
html[data-theme="dark"] .icon-btn {
  background: var(--panel-bg-2); border-color: var(--field-border); color: #c9d2e2;
}
html[data-theme="dark"] .icon-btn:hover { background: var(--hover-bg-2); color: var(--brand-text); }
html[data-theme="dark"] .icon-btn .dot { border-color: var(--panel-bg); }
/* The topbar search box paints its own light pill (#fff) — without this it
   stays white in dark mode while the field text turns light, i.e. invisible. */
html[data-theme="dark"] .topbar-search-expanded {
  background: var(--panel-bg-2); border-color: var(--field-border); box-shadow: none;
}
html[data-theme="dark"] .topbar-search-expanded .search-field .form-control { color: var(--text-strong); }
html[data-theme="dark"] .topbar-search-expanded .search-field .form-control::placeholder { color: var(--text-soft); }
html[data-theme="dark"] .topbar-search .search-field .form-control::placeholder { color: var(--text-soft); }
html[data-theme="dark"] .user-chip:hover { background: var(--hover-bg); }
html[data-theme="dark"] .user-chip .u-role { color: var(--text-soft); }
html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb { background: #3a3a3a; }

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { border-color: var(--panel-border); }
html[data-theme="dark"] .dropdown-item:active { background: var(--hover-bg-2); color: #fff; }
html[data-theme="dark"] .dropdown-menu { box-shadow: 0 12px 34px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .dropdown-menu .dropdown-divider { border-color: var(--panel-border); }

html[data-theme="dark"] .detail-item .d-label { color: var(--text-soft); }
html[data-theme="dark"] .detail-item .d-value { color: var(--text-strong); }
html[data-theme="dark"] .rate-row { border-top-color: #3a3a3a; }
html[data-theme="dark"] .rate-row .rate-fee { color: var(--brand-text); }
html[data-theme="dark"] .eyebrow { color: var(--brand-text); }
html[data-theme="dark"] .badge-soft { background: var(--brand-soft); color: var(--brand-text); }
html[data-theme="dark"] .track-result .tr-head { border-bottom-color: var(--panel-border); }

html[data-theme="dark"] .auth-body {
  background: linear-gradient(160deg, #171717 0%, #1f1f1f 45%, #171717 100%);
}
html[data-theme="dark"] .auth-card {
  background: var(--panel-bg); border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .auth-card .form-label { color: #c9d2e2; }
html[data-theme="dark"] .auth-card .input-group-text { background: var(--panel-bg-2); border-color: var(--field-border); color: #8ab4ff; }
html[data-theme="dark"] .auth-card .form-control { background: var(--field-bg); border-color: var(--field-border); color: #e7ecf6; }
html[data-theme="dark"] .auth-card .form-control:focus { border-color: #5b8def; background: var(--field-bg); color: #e7ecf6; }
html[data-theme="dark"] .auth-card a:not(.btn):hover { color: #8ab4ff; }
html[data-theme="dark"] .auth-card-head h4 { color: var(--text-strong); }
html[data-theme="dark"] .auth-divider { color: #8b95ab; }
html[data-theme="dark"] .auth-divider::before,
html[data-theme="dark"] .auth-divider::after { background: #3a3a3a; }
html[data-theme="dark"] .demo-accounts {
  background: rgba(255, 255, 255, .04); border-color: #3a4763;
}
html[data-theme="dark"] .demo-accounts code { background: var(--field-bg); color: #9ec5fe; }

html[data-theme="dark"] .parcel-label { color: #10192b; }

@media print {
  html[data-theme="dark"] { color-scheme: light; }
  html[data-theme="dark"] body { background: #fff !important; }
  html[data-theme="dark"] .panel,
  html[data-theme="dark"] .kpi,
  html[data-theme="dark"] .stat-tile,
  html[data-theme="dark"] .status-tile,
  html[data-theme="dark"] .card-soft,
  html[data-theme="dark"] .filter-bar,
  html[data-theme="dark"] .table-datatable thead th,
  html[data-theme="dark"] .form-control,
  html[data-theme="dark"] .form-select,
  html[data-theme="dark"] .input-group-text { background: #fff !important; color: #111 !important; border-color: #dee2e6 !important; }
  html[data-theme="dark"] .cell-main,
  html[data-theme="dark"] .form-label,
  html[data-theme="dark"] .stat-tile .stat-label,
  html[data-theme="dark"] .kpi .kpi-label,
  html[data-theme="dark"] .status-tile .st-label,
  html[data-theme="dark"] .status-tile .st-count { color: #111 !important; }
}

/* ==========================================================================
   Global motion system
   Enabled before first paint by partials/theme.php (html.motion) and driven
   by public/assets/js/app.js (App.motion). Everything below is inert when the
   class is missing, so content always stays visible without JavaScript.
   ========================================================================== */

:root {
  --mv-ease: cubic-bezier(.22, .61, .36, 1);
  --mv-spring: cubic-bezier(.34, 1.56, .64, 1);
  --mv-from: -14px; /* entrance offset = inline-start */
}
[dir="rtl"] { --mv-from: 14px; }

@keyframes mvFadeUp   { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes mvFadeDown { from { opacity: 0; transform: translate3d(0, -12px, 0); } to { opacity: 1; transform: none; } }
@keyframes mvFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes mvRowIn    { from { opacity: 0; transform: translate3d(0, 7px, 0); } to { opacity: 1; transform: none; } }
@keyframes mvSideIn   { from { opacity: 0; transform: translate3d(var(--mv-from), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes mvPop      { 0% { opacity: 0; transform: scale(.55); } 60% { opacity: 1; transform: scale(1.09); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mvGrowW    { from { width: 0; } }
@keyframes mvMenuIn   { from { opacity: 0; transform: translate3d(0, -8px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mvSweep    { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(230%) skewX(-18deg); } }
@keyframes mvPing     { 0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(220, 53, 69, 0); } }

/* --- Reveal on scroll / on load ------------------------------------------ */
html.motion .reveal { opacity: 0; transform: translate3d(0, 18px, 0); }
html.motion .reveal.reveal-sm { transform: translate3d(0, 7px, 0); }
html.motion .reveal.reveal-x  { transform: translate3d(var(--mv-from), 0, 0); }

html.motion .reveal.is-visible {
  opacity: 1; transform: none;
  animation: mvFadeUp .55s var(--mv-ease) backwards;
  animation-delay: var(--md, 0ms);
}
html.motion .reveal.reveal-sm.is-visible { animation-name: mvRowIn; animation-duration: .4s; }
html.motion .reveal.reveal-x.is-visible  { animation-name: mvSideIn; }

/* --- Shell (sidebar / topbar / logo) ------------------------------------- */
html.motion .topbar { animation: mvFadeDown .5s var(--mv-ease) backwards; }
@media (min-width: 992px) {
  html.motion .sidebar { animation: mvSideIn .5s var(--mv-ease) backwards; }
}
html.motion .sidebar-nav > * {
  animation: mvSideIn .45s var(--mv-ease) backwards;
  animation-delay: calc(var(--mi, 0) * 26ms + .12s);
}

/* --- Content details pop in after their container ------------------------ */
html.motion .kpi .kpi-icon,
html.motion .status-tile .st-dot,
html.motion .kpi-trend-pill,
html.motion .badge-soft {
  animation: mvPop .5s var(--mv-spring) backwards;
  animation-delay: calc(var(--md, 0ms) + .28s);
}
html.motion .status-tile .st-bar i,
html.motion .progress-bar {
  animation: mvGrowW .9s var(--mv-ease) backwards;
  animation-delay: calc(var(--md, 0ms) + .3s);
}

/* ==========================================================================
   Micro-interactions — always on (hover / focus feedback)
   ========================================================================== */
.btn {
  transition: transform .16s var(--mv-ease), box-shadow .2s ease,
              background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 25, 43, .14); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn:focus-visible { box-shadow: 0 0 0 .2rem rgba(255, 209, 3, .35); }

.btn-brand { position: relative; overflow: hidden; }
.btn-brand::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .38) 50%, transparent 75%);
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
}
.btn-brand:hover::after { animation: mvSweep .75s ease; }

.icon-btn { transition: transform .16s var(--mv-ease), background-color .18s ease, color .18s ease, border-color .18s ease; }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { box-shadow: 0 0 0 .2rem rgba(255, 209, 3, .3); }
.icon-btn .dot { animation: mvPing 2.4s cubic-bezier(0, 0, .2, 1) infinite; }

.side-link { transition: background .18s ease, color .18s ease, transform .18s var(--mv-ease); }
.side-link:hover { transform: translateX(4px); text-decoration: none; }
[dir="rtl"] .side-link:hover { transform: translateX(-4px); }

.kpi, .status-tile, .card-soft, .panel { transition: transform .2s var(--mv-ease), box-shadow .2s ease, border-color .2s ease; }
.kpi:hover, .card-soft:hover, .panel:hover { box-shadow: 0 10px 26px rgba(16, 25, 43, .12); }

.table tbody tr { transition: background-color .18s ease; }
/* Bootstrap paints an opaque background-color AND a full-cell inset box-shadow
   (used by .table-striped) on every cell, so a tr:hover background is hidden
   underneath. Target the cells themselves and clear that overlay on hover. */
.table tbody tr > * { transition: background-color .18s ease, box-shadow .18s ease; }
.table tbody tr:hover > * {
  background-color: color-mix(in srgb, var(--brand) 6%, #fff);
  box-shadow: none;
}

.dropdown-menu.show { animation: mvMenuIn .2s var(--mv-ease); }
.dropdown-menu .dropdown-item { transition: background-color .15s ease, color .15s ease, transform .15s var(--mv-ease); }
.dropdown-menu .dropdown-item:hover { transform: translateX(3px); }
[dir="rtl"] .dropdown-menu .dropdown-item:hover { transform: translateX(-3px); }

.alert { animation: mvFadeUp .45s var(--mv-ease) backwards; }
.nav-tabs-custom .nav-link { transition: color .18s ease, border-color .18s ease, background-color .18s ease; }
.pagination .page-item .page-link { transition: transform .15s var(--mv-ease), background-color .15s ease, color .15s ease; }
.pagination .page-item:hover .page-link { transform: translateY(-2px); }
.form-control, .form-select { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.timeline-item::before { transition: transform .2s var(--mv-ease), box-shadow .2s ease; }
.timeline-item:hover::before { transform: scale(1.18); box-shadow: 0 0 0 5px rgba(255, 209, 3, .12); }
.sidebar-brand, .user-chip { transition: transform .18s var(--mv-ease), box-shadow .2s ease; }
.sidebar-brand:hover, .user-chip:hover { transform: translateY(-1px); }

/* --- Standalone error pages (no app.js on those screens) ----------------- */
.error-box { animation: mvFadeUp .6s var(--mv-ease) backwards; }
.error-code { display: inline-block; animation: mvPop .7s var(--mv-spring) backwards .18s; }

/* --- Popup (create) forms ------------------------------------------------- */
.popup-modal .modal-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -.2px; }
.popup-modal .modal-body { padding: 1.25rem 1.35rem 1.5rem; }
.popup-modal .modal-body > .panel { box-shadow: none; }
.popup-loading .spinner-border {
  width: 2.1rem; height: 2.1rem; border-width: .2rem; color: var(--brand-ink);
}
.popup-loaded { animation: mvFadeUp .38s var(--mv-ease); }
.popup-modal.show .modal-content { animation: mvFadeIn .2s var(--mv-ease); }
body > .modal-backdrop:not(.fade) { animation: mvFadeIn .2s var(--mv-ease); }
.popup-modal .modal-body .form-control,
.popup-modal .modal-body .form-select { font-size: .9rem; }
.popup-modal .btn-close { filter: none; }
html[data-theme="dark"] .popup-modal .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* --- Print: never render a half-animated page ---------------------------- */
@media print {
  html.motion .reveal,
  html.motion .reveal.is-visible { opacity: 1 !important; transform: none !important; animation: none !important; }
  .dash-anim .kpi, .dash-anim .panel, .dash-anim .status-tile,
  .dash-anim tbody tr, .dash-anim .timeline-item,
  .error-box, .error-code, .popup-loaded, .popup-modal .modal-content { opacity: 1 !important; transform: none !important; animation: none !important; }
  .btn, .icon-btn, .kpi, .panel { transform: none !important; }
}

/* --- Reduced motion: no entrances, no hover travel ------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html.motion .reveal { opacity: 1 !important; transform: none !important; }
  .popup-loaded { animation: none !important; }
}


/* ==========================================================================
   BRAND RECOLOR - the dashboard blue (#0d6efd) is now the brand gold (#ffd103).
   Bootstrap 5.3 hard-codes several "primary" shades, so they are re-mapped
   here; utilities that derive from --bs-primary-rgb (text-primary / bg-primary
   / border-primary / text-bg-primary) follow the :root override above.
   Text drawn on the gold uses a dark ink for contrast.
   ========================================================================== */
:root {
  --bs-link-color: #8a6d00;
  --bs-link-color-rgb: 138, 109, 0;
  --bs-link-hover-color: #6f5700;
  --bs-link-hover-color-rgb: 111, 87, 0;
  --bs-primary-text-emphasis: #5c4a00;
  --bs-primary-bg-subtle: #fff8d6;
  --bs-primary-border-subtle: #ffe566;
}
.btn-primary {
  --bs-btn-color: #10192b; --bs-btn-bg: #ffd103; --bs-btn-border-color: #e0b400;
  --bs-btn-hover-color: #10192b; --bs-btn-hover-bg: #e0b400; --bs-btn-hover-border-color: #e0b400;
  --bs-btn-focus-shadow-rgb: 255, 209, 3;
  --bs-btn-active-color: #10192b; --bs-btn-active-bg: #d9a800; --bs-btn-active-border-color: #d9a800;
  --bs-btn-disabled-color: #10192b; --bs-btn-disabled-bg: #ffd103; --bs-btn-disabled-border-color: #e0b400;
}
.btn-outline-primary {
  --bs-btn-color: #8a6d00; --bs-btn-border-color: #e0b400;
  --bs-btn-hover-color: #10192b; --bs-btn-hover-bg: #ffd103; --bs-btn-hover-border-color: #ffd103;
  --bs-btn-focus-shadow-rgb: 255, 209, 3;
  --bs-btn-active-color: #10192b; --bs-btn-active-bg: #e0b400; --bs-btn-active-border-color: #e0b400;
}
.text-primary { color: #8a6d00 !important; }
.link-primary { color: #8a6d00 !important; }
.link-primary:hover, .link-primary:focus { color: #6f5700 !important; }
.text-bg-primary { color: #10192b !important; }
.alert-primary { --bs-alert-color: #5c4a00; --bs-alert-bg: #fff8d6; --bs-alert-border-color: #ffe566; --bs-alert-link-color: #3d3100; }
.progress { --bs-progress-bar-bg: #ffd103; --bs-progress-bar-color: #10192b; }
.pagination {
  --bs-pagination-color: #8a6d00; --bs-pagination-hover-color: #6f5700;
  --bs-pagination-focus-color: #6f5700; --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(255,209,3,.3);
  --bs-pagination-active-color: #10192b; --bs-pagination-active-bg: #ffd103; --bs-pagination-active-border-color: #ffd103;
}
.dropdown-menu { --bs-dropdown-link-active-color: #10192b; --bs-dropdown-link-active-bg: #ffd103; }
.list-group { --bs-list-group-active-color: #10192b; --bs-list-group-active-bg: #ffd103; --bs-list-group-active-border-color: #ffd103; }
.nav-pills { --bs-nav-pills-link-active-color: #10192b; --bs-nav-pills-link-active-bg: #ffd103; }
.form-control:focus, .form-select:focus { border-color: #e0b400; box-shadow: 0 0 0 .2rem rgba(255,209,3,.3); }
.form-check-input:focus { border-color: #e0b400; box-shadow: 0 0 0 .25rem rgba(255,209,3,.3); }
.form-check-input:checked { background-color: #ffd103; border-color: #e0b400; }
.form-check-input:checked[type=checkbox] { --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2310192b' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.form-check-input:checked[type=radio] { --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2310192b'/%3e%3c/svg%3e"); }

/* ==========================================================================
   PROFILE HERO - shared identity header for customer / sender / courier /
   employee detail screens.
   ========================================================================== */
.profile-hero { position: relative; overflow: hidden; }
.profile-hero::after {
  content: ''; position: absolute; inset-inline-end: -70px; top: -90px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 209, 3, .30), rgba(255, 209, 3, 0) 70%);
  pointer-events: none;
}
.profile-hero .panel-body { position: relative; z-index: 1; }
.profile-hero-inner { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.profile-hero-avatar .photo-avatar { border: 4px solid #fff; box-shadow: 0 8px 22px rgba(16, 25, 43, .16); }
.profile-hero-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.4px; margin: 0; color: #10192b; }
.profile-hero-meta { color: #69748c; font-size: .84rem; margin-top: .3rem; }
.profile-hero-sub { color: #69748c; font-size: .82rem; margin-top: .25rem; }
.profile-hero-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
@media (max-width: 575.98px) { .profile-hero-actions { margin-inline-start: 0; width: 100%; } }

/* Sticky action bar for long forms */
.form-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
  margin-top: 1rem; padding: .8rem 1rem;
  background: rgba(255, 255, 255, .93);
  border: 1px solid rgba(16, 25, 43, .08); border-radius: var(--radius);
  box-shadow: 0 -6px 18px rgba(16, 25, 43, .07);
}
@supports (backdrop-filter: blur(6px)) {
  .form-actions { backdrop-filter: blur(8px); }
}

/* ==========================================================================
   SOLAR HIJRI DATE FILTERS - the popup calendar shown when the system runs
   on Shamsi (app.calendar). Body-anchored so it clears sticky filter bars.
   ========================================================================== */
.jalali-picker {
  position: absolute;
  z-index: 1080;
  /* an explicit width: absolutely positioned with only `left` set, the box would
     otherwise be shrink-to-fit and the width:100% table would stretch it across
     the whole viewport. */
  width: 268px;
  max-width: calc(100vw - 16px);
  padding: .55rem;
  background: var(--sub-bg, #fff);
  border: 1px solid var(--panel-border, rgba(16, 25, 43, .1));
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(16, 25, 43, .20);
  animation: mvFadeUp .16s var(--mv-ease);
}
.jalali-picker .jp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .35rem; padding: .1rem .15rem .45rem;
}
.jalali-picker .jp-title {
  font-weight: 700; font-size: .88rem; color: var(--text-strong, #10192b);
}
.jalali-picker .jp-nav {
  width: 28px; height: 28px; border: 0; border-radius: .4rem;
  background: transparent; color: var(--text-soft, #69748c);
  cursor: pointer; font-size: .72rem; line-height: 1;
  transition: background-color .15s ease, color .15s ease;
}
.jalali-picker .jp-nav:hover { background: var(--hover-bg, #eef1f8); color: var(--text-strong, #10192b); }
.jalali-picker .jp-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.jalali-picker .jp-grid th {
  font-size: .68rem; font-weight: 700; color: var(--text-soft, #69748c);
  padding: .2rem 0 .35rem; text-align: center;
}
.jalali-picker .jp-grid td { padding: 1px 0; text-align: center; }
.jalali-picker .jp-day {
  width: 100%; height: 30px; border: 0; border-radius: .4rem;
  background: transparent; cursor: pointer;
  font: inherit; font-size: .8rem; color: var(--text-strong, #10192b);
  transition: background-color .14s ease, color .14s ease;
}
.jalali-picker .jp-day:hover { background: var(--brand-soft, #fff8d6); }
.jalali-picker .jp-day.is-today {
  box-shadow: inset 0 0 0 1px var(--brand-dark, #e0b400);
}
.jalali-picker .jp-day.is-selected {
  background: var(--brand, #ffd103); color: #10192b; font-weight: 700;
  box-shadow: none;
}
.jalali-picker .jp-blank { height: 30px; }
.jalali-picker .jp-foot {
  display: flex; gap: .4rem; justify-content: flex-end;
  border-top: 1px solid var(--panel-border, rgba(16, 25, 43, .1));
  margin-top: .4rem; padding-top: .45rem;
}
.jalali-picker .jp-foot button {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .74rem; color: var(--text-soft, #69748c);
  padding: .18rem .45rem; border-radius: .4rem;
  transition: background-color .14s ease, color .14s ease;
}
.jalali-picker .jp-foot button:hover { background: var(--hover-bg, #eef1f8); color: var(--text-strong, #10192b); }

/* the filter box itself reads as a date, not as free text: tabular figures plus
   the calendar glyph native type=date fields show, so it is obvious the field
   opens a picker. The icon sits at the right edge because the field is dir=ltr. */
input[data-jalali-date] {
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding-right: 1.7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16' fill='none' stroke='%2369748c' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.6' y='3' width='12.8' height='11.4' rx='2.2'/%3E%3Cpath d='M1.6 6.6h12.8M5.2 1.6v2.8M10.8 1.6v2.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .5rem center;
  background-size: 15px 15px;
}
/* beats `.filter-bar .form-control`'s min-width so the glyph never crowds the date */
.filter-bar input[data-jalali-date] { min-width: 126px; }
html[data-theme="dark"] input[data-jalali-date] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16' fill='none' stroke='%239aa5bd' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.6' y='3' width='12.8' height='11.4' rx='2.2'/%3E%3Cpath d='M1.6 6.6h12.8M5.2 1.6v2.8M10.8 1.6v2.8'/%3E%3C/svg%3E");
}
@media print { .jalali-picker { display: none; } }

/* Expandable table rows: a collapse toggle that carries a chevron flips the
   glyph when its target opens, so the open/closed state is obvious. Used by the
   «تسویه‌نشده‌ها» screen to list each party's delivered parcels.
   The rotation targets ::before because bootstrap-icons renders the glyph there
   (the <i> itself stays display:inline, where transform has no effect). */
[data-bs-toggle="collapse"] > .bi-chevron-down::before { transition: transform .18s ease; }
[data-bs-toggle="collapse"][aria-expanded="true"] > .bi-chevron-down::before { transform: rotate(180deg); }

/* Keep unread notifications distinct without the strong warning-yellow row. */
.notification-unread-row > * { background-color: rgba(59, 110, 190, .055) !important; }
.notification-unread-row:hover > * { background-color: rgba(59, 110, 190, .11) !important; }
.notification-unread-dot { color: #4779c7; }
html[data-theme="dark"] .notification-unread-row > * { background-color: rgba(138, 180, 255, .1) !important; }
html[data-theme="dark"] .notification-unread-row:hover > * { background-color: rgba(138, 180, 255, .16) !important; }
html[data-theme="dark"] .notification-unread-dot { color: #8ab4ff; }

/* Mobile delivery-request form: sender details come from the account, so the
   whole sender block is hidden on phones (values still submit with the form). */
@media (max-width: 767.98px) {
  .request-sender-title,
  .request-sender-title + .row { display: none; }
}

/* Parcel QR codes — drawn locally by assets/js/qr.js */
.qr-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: .4rem;
  border: 1px solid rgba(16, 25, 43, .1);
  border-radius: .75rem;
  background: #fff;
  line-height: 0;
}
.qr-code svg { width: 100%; height: auto; display: block; }
.qr-code:empty { border-style: dashed; }
.parcel-qr { display: flex; flex-direction: column; align-items: center; gap: .35rem; flex: 0 0 auto; }
.parcel-qr-label { font-size: .7rem; color: #68748a; text-align: center; line-height: 1.35; }
.parcel-qr-label i { color: var(--brand-ink); }

@media print { .qr-code { border: 0; padding: 0; } }

/* Portal mobile tidy-up (customer / sender / courier) */
@media (max-width: 767.98px) {
  .portal-body .filter-bar:not(.parcel-filter-bar) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .7rem;
    overflow: visible;
  }
  .portal-body .filter-bar:not(.parcel-filter-bar) > label.form-label { display: none; }
  .portal-body .filter-bar:not(.parcel-filter-bar) .search-input { grid-column: 1 / -1; min-width: 0; }
  .portal-body .filter-bar:not(.parcel-filter-bar) .form-control,
  .portal-body .filter-bar:not(.parcel-filter-bar) .form-select { width: 100%; min-width: 0; max-width: none !important; }
  .portal-body .filter-bar:not(.parcel-filter-bar) .btn { width: 100%; justify-content: center; }

  /* Wide tables become stacked cards instead of a sideways scroll. */
  .portal-mobile-table-wrap { overflow: visible; }
  .portal-mobile-table { display: block; width: 100%; }
  .portal-mobile-table thead { display: none; }
  .portal-mobile-table tbody { display: grid; gap: .65rem; padding: .75rem; }
  .portal-mobile-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .3rem .75rem;
    padding: .7rem .85rem;
    border: 1px solid var(--panel-border, rgba(16, 25, 43, .08));
    border-radius: .9rem;
    background: var(--panel-bg, #fff);
    box-shadow: 0 4px 14px rgba(16, 25, 43, .05);
  }
  .portal-mobile-table tbody td {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    padding: .15rem 0;
    border: 0;
    text-align: start !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .portal-mobile-table tbody td::before {
    content: attr(data-label);
    color: var(--text-soft, #8992a6);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.35;
  }
  .portal-mobile-table tbody tr > td:first-child,
  .portal-mobile-table tbody tr > td.span-full,
  .portal-mobile-table tbody tr > td[colspan] { grid-column: 1 / -1; }
  .portal-mobile-table tbody tr:has(td[colspan]) {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .portal-mobile-table tbody tr > td[colspan]::before { content: none; }

  /* Settlement meta: two badges side by side instead of stacked. */
  .sender-settlement-badges { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; justify-content: flex-start !important; }
}

@media (max-width: 767.98px) {
  .portal-body .filter-bar:not(.parcel-filter-bar) .btn.btn-ghost { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  /* Dense numeric reports: three value cells per row keeps the card short. */
  .portal-mobile-table.portal-mobile-table-compact tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portal-mobile-table.portal-mobile-table-compact tbody td { min-width: 0; }
}

@media (max-width: 767.98px) {
  /* Dense numeric tables stay real tables, just tighter, instead of stacking. */
  .table-compact-mobile-wrap { overflow: visible; }
  .table-compact-mobile { width: 100%; font-size: .72rem; }
  .table-compact-mobile th,
  .table-compact-mobile td { padding: .4rem .25rem; white-space: normal; }
  .table-compact-mobile thead th { font-size: .66rem; line-height: 1.35; }
}

/* بخش‌هایی که با # به آن‌ها می‌پریم، زیر هدر چسبان پنهان نشوند. */
.scroll-anchor { scroll-margin-top: 84px; }

@media (max-width: 767.98px) {
  .table-compact-mobile { table-layout: fixed; font-size: .66rem; }
  .table-compact-mobile th,
  .table-compact-mobile td { padding: .35rem .15rem; }
  .table-compact-mobile thead th { font-size: .62rem; }
  .table-compact-mobile th:first-child,
  .table-compact-mobile td:first-child { width: 26%; }
}
