@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: Shabnam;
  src: url('Shabnam-FD.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: Shabnam;
  src: url('Shabnam-Bold-FD.ttf') format('truetype');
  font-weight: 700;
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯
   Ø·Â³Ø·Â§Ø·Â±Ø·Â§Ø¸â  Ã¢â¬â Paint Lab
   Ø¹Â¯Ø·Â±Ø·Â§Ø¸Ù¾ØºÅØ·Ú¾ Ø·Â³Ø·Â±Ø·Â¯ + Ø¸âØ·Â§Ø¹Â© Ø¸Ù¾ØºÅØ·Â±Ø¸ËØ·Â²Ø¸â¡Ã¢â¬ÅØ·Â§ØºÅ + Ø¸âØ¸â¡Ø·Â¬Ø¸â¡ Ø¸â¦Ø·Â³ØºÅ Ø·Â¹Ø¸âØ·Â§Ø¸â¦Ø·Ú¾ Ø·Â±Ø¸â Ø¹Â¯
Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
:root {
  --ink: #1C2428;
  --brand: #0D7370;
  --brand-dark: #095E5C;
  --brand-soft: #E8F4F3;
  --mark: #D9773A;
  --mark-soft: #FDF0E6;
  --bg: #F3F5F4;
  --bg-2: #E8ECEB;
  --surface: #FFFFFF;
  --surface-2: #F8FAF9;
  --line: #D9E0DE;
  --text: #243033;
  --muted: #6A7A7C;
  --danger: #C62828;
  --ok: #1B7F5A;
  --shadow: 0 8px 24px rgba(28, 36, 40, .06);
  --shadow-sm: 0 1px 3px rgba(28, 36, 40, .05);
  --radius: 12px;
  --radius-sm: 8px;
  --rail: 88px;
  --font: "Vazir", "BYekan", "Vazirmatn", Tahoma, sans-serif;
  --swatch: linear-gradient(90deg,
    #2B2F33 0 12%, #8B949A 12% 24%, #C4C9CC 24% 36%,
    #0D7370 36% 48%, #3D8B6E 48% 60%, #D9773A 60% 72%,
    #C44B3C 72% 84%, #F2F2F0 84% 100%);
}

* { box-sizing: border-box; }
html {
  height: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}
img, svg, video {
  max-width: 100%;
  height: auto;
}
table { max-width: 100%; }
.main-area,
.page-box,
.dash-page,
.archive-page,
.finance-page,
.inspection-workspace {
  min-width: 0;
  max-width: 100%;
}

/* ─── Login ─── */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  font-family: "Vazir", "BYekan", Vazirmatn, Tahoma, sans-serif;
  color: #E8EEF0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(13,115,112,.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 85%, rgba(217,119,58,.22), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 10%, rgba(46,196,182,.12), transparent 45%),
    linear-gradient(160deg, #070A0D 0%, #101820 40%, #0B1F1E 72%, #0A1214 100%);
}
.auth-body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 18px,
      rgba(255,255,255,.012) 18px 19px
    ),
    linear-gradient(90deg,
      #1A1E22 0 7%,
      #3A4248 7% 14%,
      #7A848C 14% 21%,
      #0D7370 21% 28%,
      #1A8A6E 28% 35%,
      #D9773A 35% 42%,
      #B84A3C 42% 49%,
      #EDECEA 49% 56%,
      transparent 56% 100%);
  background-size: auto, 220% 8px;
  background-position: 0 0, 0 0;
  background-repeat: repeat, no-repeat;
  opacity: .55;
  mask-image: linear-gradient(180deg, #000 0%, transparent 42%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 42%);
  pointer-events: none;
  animation: loginSwatchDrift 18s ease-in-out infinite alternate;
}
.auth-body::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.18), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.12), transparent),
    radial-gradient(1.2px 1.2px at 40% 80%, rgba(255,255,255,.1), transparent);
  background-size: 120px 120px, 180px 180px, 90px 90px;
  opacity: .35;
  pointer-events: none;
}
@keyframes loginSwatchDrift {
  from { background-position: 0 0, 0% 0; }
  to { background-position: 0 0, 35% 0; }
}

.login-wrap {
  width: min(1040px, calc(100vw - 32px));
  min-height: min(580px, calc(100dvh - 48px));
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background: rgba(18, 24, 30, .72);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0,0,0,.45),
    0 0 0 1px rgba(13,115,112,.12) inset;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise .6s ease;
  font-family: "Vazir", "BYekan", Vazirmatn, Tahoma, sans-serif;
}
.login-brand-pane {
  padding: clamp(28px, 4vw, 48px);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(155deg, rgba(28,36,40,.92) 0%, rgba(13,80,78,.55) 48%, rgba(13,115,112,.75) 100%);
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.login-brand-pane::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--swatch);
  opacity: .95;
  z-index: 2;
}
.login-brand-glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,119,58,.28), transparent 68%);
  pointer-events: none;
}
.login-brand-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
.login-brand-orb-a {
  width: 140px; height: 140px;
  top: -40px; left: -30px;
  background: radial-gradient(circle, rgba(46,196,182,.35), transparent 70%);
}
.login-brand-orb-b {
  width: 90px; height: 90px;
  bottom: 18%; left: 12%;
  background: radial-gradient(circle, rgba(217,119,58,.3), transparent 70%);
  animation: loginOrbFloat 7s ease-in-out infinite;
}
@keyframes loginOrbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.login-brand-top,
.login-brand-foot {
  position: relative;
  z-index: 1;
}
.login-brand-pane .mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .9rem;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  width: fit-content;
}
.login-brand-pane .mark-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(145deg, #D9773A, #C44B3C);
  display: grid; place-items: center;
  color: #fff; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(217,119,58,.35);
}
.login-brand-pane h1 {
  font-family: "Vazir", "BYekan", sans-serif;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.05;
  letter-spacing: -.03em;
  background: linear-gradient(120deg, #fff 20%, #A8E6E1 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-brand-pane p {
  opacity: .82;
  max-width: 28ch;
  font-size: .98rem;
  line-height: 1.85;
  margin: 0;
  font-weight: 400;
}
.login-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.login-swatches span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.login-swatches span:hover { transform: translateY(-3px) scale(1.06); }
.login-brand-foot {
  margin-top: 28px;
  font-size: .82rem;
  opacity: .7;
  letter-spacing: .02em;
}

.login-card {
  background:
    linear-gradient(180deg, rgba(248,250,249,.98) 0%, #fff 40%);
  padding: clamp(28px, 4vw, 44px) clamp(22px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  min-width: 0;
  color: var(--ink);
  font-family: "Vazir", "BYekan", Vazirmatn, Tahoma, sans-serif;
}
.login-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--mark), transparent);
  opacity: .85;
}
.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  font-family: "Vazir", "BYekan", sans-serif;
}
.login-card .sub {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: .9rem;
}
.login-card .form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.login-input {
  margin-bottom: 14px;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 13px 14px !important;
  background: #F7FAF9 !important;
  min-height: 48px;
  font-size: .95rem !important;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-input:focus {
  border-color: var(--brand) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(13,115,112,.14) !important;
}
.login-btn {
  margin-top: 10px;
  padding: 13px 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0D7370, #0A5F5C) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  min-height: 50px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(13,115,112,.28);
  transition: transform .15s, filter .15s, box-shadow .15s !important;
}
.login-btn:hover {
  background: linear-gradient(135deg, #0F8581, #095E5C) !important;
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(13,115,112,.34);
}
.login-btn:active { transform: translateY(0); }
.login-close { display: none; }

html[data-theme="dark"] .login-card {
  background: linear-gradient(180deg, #151C23 0%, #121920 100%);
  color: var(--ink);
}
html[data-theme="dark"] .login-card h2 { color: var(--ink); }
html[data-theme="dark"] .login-input {
  background: var(--surface-2) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .login-input:focus {
  background: #1E2832 !important;
}

@media (max-width: 991.98px) {
  .login-wrap {
    grid-template-columns: 1fr;
    width: min(460px, calc(100vw - 24px));
    min-height: auto;
  }
  .login-brand-pane {
    padding: 28px 24px 22px;
    min-height: 0;
  }
  .login-brand-pane h1 {
    font-size: clamp(2.1rem, 8vw, 2.7rem);
    margin: 18px 0 8px;
  }
  .login-brand-pane p {
    max-width: none;
    font-size: .92rem;
  }
  .login-swatches { margin-top: 18px; }
  .login-swatches span { width: 22px; height: 22px; border-radius: 6px; }
  .login-brand-foot { margin-top: 16px; }
  .login-card { padding: 28px 22px 32px; }
}

@media (max-width: 575.98px) {
  .auth-body { padding: 10px; align-items: stretch; }
  .login-wrap {
    width: 100%;
    min-height: calc(100dvh - 20px);
    border-radius: 18px;
  }
  .login-brand-pane {
    padding: 22px 18px 16px;
  }
  .login-brand-pane .mark { font-size: .82rem; }
  .login-brand-orb-b { display: none; }
  .login-card {
    flex: 1;
    padding: 24px 18px 28px;
    justify-content: flex-start;
  }
  .login-input,
  .login-btn { min-height: 48px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .auth-body { padding: 8px; }
  .login-wrap {
    grid-template-columns: 1fr 1.1fr;
    width: min(900px, calc(100vw - 16px));
    min-height: calc(100dvh - 16px);
  }
  .login-brand-pane { padding: 18px; }
  .login-brand-pane h1 { font-size: 1.8rem; margin: 12px 0 6px; }
  .login-brand-pane p { font-size: .82rem; line-height: 1.5; }
  .login-swatches { margin-top: 12px; }
  .login-brand-foot { display: none; }
  .login-card { padding: 18px 20px; }
}

/* ─── App shell ─── */
.app-body {
  min-height: 100vh;
  padding-bottom: 48px;
  background: linear-gradient(180deg, #EEF1F0 0%, var(--bg) 140px);
}
.app-shell {
  display: grid;
  grid-template-columns: 1fr var(--rail);
  min-height: calc(100vh - 48px);
  direction: ltr;
}
.main-area {
  order: 1;
  padding: 18px 20px 12px;
  overflow: auto;
  direction: rtl;
  width: 100%;
  min-width: 0;
}
.main-area > * {
  width: 100%;
  max-width: none;
}

.sidebar {
  order: 2;
  margin: 12px 12px 12px 0;
  border-radius: 14px;
  background: #1C2428;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 12px 6px;
  direction: rtl;
  border: 1px solid rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--swatch);
  opacity: .9;
  pointer-events: none;
}
.sidebar-brand { text-align: center; padding: 12px 0 16px; position: relative; z-index: 1; }
.brand-icon {
  width: 42px; height: 42px; margin: 0 auto 8px;
  border-radius: 10px;
  background: var(--brand);
  display: grid; place-items: center;
  font-size: 1.2rem;
  color: #fff;
}
.brand-text {
  font-weight: 800;
  font-size: .88rem;
  letter-spacing: .4px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  position: relative;
  z-index: 1;
}
.sidebar .nav-item {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: .66rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar .nav-item i { font-size: 1.15rem; }
.sidebar .nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.sidebar .nav-item.active {
  background: rgba(13,115,112,.28);
  color: #fff;
}
.sidebar .nav-item.active::before {
  content: '';
  position: absolute;
  left: 4px; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 2px;
  background: var(--mark);
}
.sidebar .nav-item.nav-danger { color: #E8A09A; }
.sidebar .nav-item.nav-danger:hover { background: rgba(198,40,40,.18); color: #fff; }
.sidebar-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.65);
  font-size: .66rem;
  padding: 10px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  margin-top: 8px;
}

.status-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 44px;
  background: #1C2428;
  color: rgba(255,255,255,.78);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  font-size: .78rem;
  z-index: 50;
  direction: rtl;
  border-top: 3px solid transparent;
  border-image: var(--swatch) 1;
}
.status-bar .sep { margin: 0 8px; opacity: .35; }
.trial-badge {
  background: var(--brand);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 10px;
  font-size: .7rem;
  font-weight: 600;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  padding: 14px;
}
.page-box {
  width: 100%;
  max-width: none;
}

/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Management Dashboard Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.dash-page {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 20px;
  flex-wrap: wrap;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background:
    radial-gradient(520px 180px at 100% 0%, rgba(13,115,112,.10), transparent 55%),
    linear-gradient(180deg, #fff 0%, #F7FAF9 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.dash-header-copy { min-width: 0; flex: 1 1 220px; }
.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: .02em;
}
.dash-eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mark);
  box-shadow: 0 0 0 3px rgba(217,119,58,.18);
}
.dash-header h1 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}
.dash-header p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.dash-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dash-toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 4px 2px;
}
.dash-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(28,36,40,.04);
  transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
  cursor: pointer;
  font: inherit;
}
.dash-action:hover {
  border-color: #b9d9d7;
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: 0 8px 20px rgba(13,115,112,.10);
  transform: translateY(-1px);
}
.dash-action-primary {
  border: 0;
  background: linear-gradient(135deg, #0D7370 0%, #0A5C5A 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13,115,112,.28);
}
.dash-action-primary:hover {
  background: linear-gradient(135deg, #0F8581 0%, #0D7370 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(13,115,112,.34);
}
.dash-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.05rem;
  flex: 0 0 auto;
}
.dash-action-icon.tone-ok { background: #E8F5E9; color: #1B7F5A; }
.dash-action-icon.tone-mark { background: var(--mark-soft); color: #9A4E16; }
.dash-action-primary .dash-action-icon {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.dash-action-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: right;
  line-height: 1.2;
}
.dash-action-text strong {
  font-size: .88rem;
  font-weight: 800;
}
.dash-action-text small {
  font-size: .68rem;
  opacity: .72;
  font-weight: 600;
}
.dash-action-primary .dash-action-text small { opacity: .8; }
.dash-icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 52px;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, color .15s, box-shadow .15s;
  font: inherit;
}
.dash-icon-btn i { font-size: 1.15rem; line-height: 1; }
.dash-icon-btn-label {
  font-size: .62rem;
  font-weight: 700;
  color: var(--muted);
}
.dash-icon-btn:hover {
  border-color: #b9d9d7;
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13,115,112,.1);
}
.dash-icon-btn:hover .dash-icon-btn-label { color: var(--brand-dark); }
.dash-icon-btn.theme-toggle {
  width: 52px;
  height: auto;
  min-height: 52px;
  padding: 6px 4px;
}
.dash-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.dash-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  position: relative;
  overflow: hidden;
}
.dash-kpi::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(13,115,112,.35), transparent);
  opacity: 0;
  transition: opacity .18s;
}
.dash-kpi-link { cursor: pointer; }
.dash-kpi-link:hover {
  border-color: #b9d9d7;
  box-shadow: 0 10px 24px rgba(28,36,40,.08);
  transform: translateY(-2px);
  color: inherit;
}
.dash-kpi-link:hover::after { opacity: 1; }
.dash-kpi.kpi-main {
  background: linear-gradient(135deg, #0D7370 0%, #134E4A 55%, #1C2428 120%);
  color: #fff;
  border: 0;
  box-shadow: 0 12px 28px rgba(13,115,112,.22);
}
.dash-kpi.kpi-main::after { display: none; }
.dash-kpi.kpi-main:hover {
  filter: brightness(1.04);
  border-color: transparent;
}
.dash-kpi.kpi-main .dash-kpi-label { color: rgba(255,255,255,.8); }
.dash-kpi-text { flex: 1; min-width: 0; }
.dash-kpi-go {
  font-size: .85rem;
  opacity: .35;
  flex: 0 0 auto;
}
.dash-kpi-link:hover .dash-kpi-go { opacity: .8; }
.dash-kpi.kpi-main .dash-kpi-go { color: #fff; opacity: .55; }
.dash-kpi-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.15rem;
  flex: 0 0 auto;
}
.dash-kpi.kpi-main .dash-kpi-icon {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.dash-kpi-icon.tone-mark { background: var(--mark-soft); color: #9A4E16; }
.dash-kpi-icon.tone-ok { background: #E8F5E9; color: #1B7F5A; }
.dash-kpi-icon.tone-warn { background: #FFF3E0; color: #E65100; }
.dash-kpi-value {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.dash-kpi-label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-quick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.dash-quick-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 10px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: .18s ease;
  cursor: pointer;
  min-height: 96px;
}
.dash-quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.25rem;
}
.dash-quick-icon.tone-ok { background: #E8F5E9; color: #1B7F5A; }
.dash-quick-icon.tone-mark { background: var(--mark-soft); color: #9A4E16; }
.dash-quick-item:hover {
  border-color: #b9d9d7;
  background: linear-gradient(180deg, #fff, var(--brand-soft));
  color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(13,115,112,.1);
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.dash-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color .18s, box-shadow .18s;
}
.dash-card:hover {
  border-color: #c5ddd9;
  box-shadow: 0 10px 26px rgba(28,36,40,.07);
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FBFCFC 0%, var(--surface-2) 100%);
}
.dash-card-head h6 {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
  font-size: .88rem;
}
.dash-card-body { padding: 12px 14px; flex: 1; }
.dash-card-compact .dash-card-body { padding: 10px 12px 12px; }
.dash-chart-box {
  position: relative;
  width: 100%;
  height: 150px;
}
.dash-chart-box-donut {
  height: 132px;
  max-width: 160px;
  margin: 0 auto;
}
.dash-charts-row {
  align-items: stretch;
}
.dash-status-wrap {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 12px;
  align-items: center;
}
.dash-status-legend { display: grid; gap: 6px; font-size: .8rem; }
.dash-status-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-left: 6px;
}
.dash-status-legend .dot.draft { background: #90A4AE; }
.dash-status-legend .dot.saved { background: var(--brand); }
.dash-status-legend .dot.printed { background: var(--mark); }
.dash-rank-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: .82rem;
}
.dash-rank-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-rank-bar {
  height: 8px;
  background: #eef3f2;
  border-radius: 99px;
  overflow: hidden;
}
.dash-rank-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #148F8C);
  border-radius: 99px;
}
.dash-rank-bar.tone-mark i {
  background: linear-gradient(90deg, var(--mark), #E8A06A);
}
.dash-rank-num { font-weight: 800; color: var(--brand-dark); }
.dash-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef3f2;
  font-size: .88rem;
}
.dash-list-row:last-child { border-bottom: 0; }
.dash-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: .75rem;
}
.dash-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef3f2;
  text-decoration: none;
  color: inherit;
}
.dash-alert-item:last-child { border-bottom: 0; }
.dash-alert-item > i { font-size: 1.25rem; }
.dash-alert-item > div { flex: 1; min-width: 0; }
.dash-alert-link:hover {
  color: inherit;
  background: var(--surface-2);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
}
.dash-sys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-sys-grid > div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-sys-grid span {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
}
.dash-sys-grid strong { font-size: .92rem; color: var(--ink); }

@media (max-width: 1199.98px) {
  .dash-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .dash-kpi { padding: 8px 10px; gap: 8px; }
  .dash-kpi-go { display: none; }
  .dash-quick { grid-template-columns: repeat(3, 1fr); }
  .dash-grid-4 { grid-template-columns: 1fr 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-quick { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-4 { grid-template-columns: 1fr; }
  .dash-status-wrap { grid-template-columns: 1fr; }
  .dash-chart-box { height: 140px; }
  .dash-chart-box-donut { height: 120px; max-width: 140px; }
  .dash-sys-grid { grid-template-columns: 1fr; }
  .dash-toolbar { width: 100%; justify-content: stretch; }
  .dash-action { flex: 1 1 calc(33.33% - 8px); min-width: 0; }
  .dash-toolbar-sep { display: none; }
  .dash-icon-btn { flex: 0 0 52px; }
}


/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Archive full-width desktop Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.archive-page {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.archive-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, #1C2428 0%, #0D7370 70%, #1A8A6E 100%);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.archive-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--swatch);
}
.archive-hero h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
}
.archive-hero p {
  margin: 0;
  opacity: .88;
  font-size: .92rem;
  max-width: 62ch;
}
.archive-hero-btn {
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 18px;
  white-space: nowrap;
}
.archive-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.archive-filters-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.archive-filters-head-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-inline-end: auto;
}
.archive-filters-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-dark);
  font-size: .95rem;
}
.archive-filters-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.archive-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.archive-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.archive-chip:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.archive-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.archive-filter-row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.65rem;
}
.archive-filter-row > [class*="col-"] {
  min-width: 0;
}
.archive-filters .jalali-date-wrap {
  width: 100%;
}
.archive-filters .form-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.2;
}
.archive-filters .form-control,
.archive-filters .form-select {
  border-radius: 10px;
  font-size: .88rem;
  min-height: 40px;
  width: 100%;
}
.archive-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.archive-filter-hint { margin-inline-start: auto; }
.archive-search-field {
  position: relative;
}
.archive-search-field > i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.archive-search-field .form-control {
  padding-right: 2.4rem;
  border-radius: 10px;
  min-height: 40px;
}
.archive-table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.archive-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.archive-table-wrap {
  max-height: calc(100vh - 340px);
  overflow: auto;
}
.archive-table {
  width: 100%;
  min-width: 1280px;
  margin: 0;
  font-size: .86rem;
}
.archive-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: .78rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
}
.archive-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid #eef3f2;
  vertical-align: middle;
}
.archive-table tbody tr:hover {
  background: rgba(14,107,106,.05);
}
.archive-table-md { min-width: 900px; }
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-draft { background: #eceff1; color: #546e7a; }
.status-saved { background: #e4f3f2; color: #0a4f4e; }
.status-printed { background: #fff1e6; color: #9a4e16; }

@media (max-width: 991.98px) {
  .archive-hero { padding: 18px; }
  .archive-hero h1 { font-size: 1.25rem; }
  .archive-table-wrap { max-height: none; }
  .archive-filter-hint { margin-inline-start: 0; width: 100%; }
}
@media (max-width: 575.98px) {
  .archive-hero-btn { width: 100%; }
  .archive-filters-head-actions { width: 100%; }
  .archive-filters-head-actions .btn { flex: 1; }
  .archive-quick-chips { width: 100%; }
  .archive-chip { flex: 1 1 calc(50% - 6px); justify-content: center; }
}

/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Finance report Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.finance-page {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.finance-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, #1C2428 0%, #0D7370 70%, #1A8A6E 100%);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.finance-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--swatch);
}
.finance-hero h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
}
.finance-hero p {
  margin: 0;
  opacity: .9;
  font-size: .92rem;
}
.finance-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.finance-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.finance-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.finance-preset {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  cursor: default;
}
a.finance-preset { cursor: pointer; }
a.finance-preset:hover {
  border-color: #b9d9d7;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.finance-preset.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.finance-filter-row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.65rem;
}
.finance-filter-row > [class*="col-"] {
  min-width: 0;
}
.finance-filters .form-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.finance-filters .jalali-date-wrap {
  width: 100%;
}
.finance-filter-actions { padding-bottom: 2px; }
.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.finance-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.finance-kpi-main {
  background: linear-gradient(135deg, #0D7370, #1C2428);
  color: #fff;
  border: 0;
  grid-column: span 1;
}
.finance-kpi-main .finance-kpi-label { color: rgba(255,255,255,.8); }
.finance-kpi-main .finance-kpi-sub { color: rgba(255,255,255,.7); }
.finance-kpi-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.3rem;
  flex: 0 0 auto;
}
.finance-kpi-main .finance-kpi-icon {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.finance-kpi-icon.tone-mark { background: var(--mark-soft); color: #9A4E16; }
.finance-kpi-icon.tone-ok { background: #E8F5E9; color: #1B7F5A; }
.finance-kpi-icon.tone-warn { background: #FFF3E0; color: #E65100; }
.finance-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}
.finance-kpi-label {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}
.finance-kpi-sub {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px;
}
.finance-kpi-change {
  margin-top: 6px;
  font-size: .75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.finance-kpi-change.up { color: #B9F6CA; }
.finance-kpi-change.down { color: #FFCDD2; }
.finance-grid-2 {
  display: grid;
  grid-template-columns: 1.45fr .95fr;
  gap: 12px;
  align-items: stretch;
}
.finance-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 0;
}
.finance-card-head h6 {
  margin: 0;
  font-weight: 800;
  font-size: .88rem;
  color: var(--ink);
}
.finance-card-body { padding: 10px 14px 14px; }
.finance-chart-box {
  position: relative;
  width: 100%;
}
.finance-chart-line {
  height: 160px;
  max-height: 28vh;
}
.finance-chart-donut {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
.finance-status-wrap {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 0;
}
.finance-status-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .82rem;
}
.finance-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.finance-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.finance-empty {
  text-align: center;
  color: var(--muted);
  padding: 18px 12px;
  font-size: .88rem;
}
.finance-status-legend .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}
.finance-status-legend .dot.draft { background: #90A4AE; }
.finance-status-legend .dot.saved { background: var(--brand); }
.finance-status-legend .dot.printed { background: var(--mark); }
.finance-rank-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 12px;
}
.finance-rank-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
}
.finance-rank-bar {
  height: 8px;
  background: #E8EEED;
  border-radius: 999px;
  overflow: hidden;
}
.finance-rank-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #148F8C);
  border-radius: 999px;
}
.finance-rank-bar.tone-mark i {
  background: linear-gradient(90deg, var(--mark), #E8A06A);
}
.finance-rank-meta {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
}
.finance-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f1;
  font-size: .88rem;
}
.finance-list-row:last-child { border-bottom: 0; }
.finance-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid; place-items: center;
  font-size: .75rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.finance-table-wrap {
  max-height: calc(100vh - 280px);
  overflow: auto;
}
.finance-table {
  font-size: .84rem;
  min-width: 980px;
}
.finance-table thead th {
  position: sticky;
  top: 0;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .78rem;
  white-space: nowrap;
  z-index: 1;
}
.finance-table tfoot td {
  background: #F7FAF9;
  border-top: 2px solid var(--line);
}
.finance-mobile-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.finance-mobile-item:last-child { border-bottom: 0; }
.finance-mobile-item:hover { background: var(--brand-soft); }

.fee-words {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.7;
  min-height: 1.4em;
}
.fee-words.has-value {
  color: var(--brand-dark);
  font-weight: 700;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 6px 10px;
}
.money-input {
  letter-spacing: .02em;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .finance-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .finance-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 991.98px) {
  .finance-grid-2 { grid-template-columns: 1fr; }
  .finance-status-wrap {
    grid-template-columns: auto 1fr;
    justify-items: start;
  }
  .finance-chart-line { height: 140px; max-height: 22vh; }
  .finance-chart-donut { width: 100px; height: 100px; }
  .finance-hero { padding: 18px; }
  .finance-hero h1 { font-size: 1.25rem; }
}
@media (max-width: 575.98px) {
  .finance-kpi-grid { grid-template-columns: 1fr 1fr; }
  .finance-hero-actions { width: 100%; }
  .finance-hero-actions .btn { flex: 1; }
}

@media print {
  .sidebar, .mobile-topbar, .mobile-bottom-nav, .status-bar,
  .finance-hero-actions, .finance-filters, .finance-table td:last-child,
  .finance-table th:last-child { display: none !important; }
  .app-shell { display: block !important; }
  .main-area { padding: 0 !important; }
  .finance-page { gap: 10px; }
  .finance-card, .finance-kpi { box-shadow: none; break-inside: avoid; }
}


/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Dashboard welcome Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.welcome-screen { display: grid; gap: 16px; }
.welcome-hero {
  min-height: min(52vh, 460px);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: grid;
  align-items: end;
  padding: 36px;
  background:
    linear-gradient(120deg, rgba(28,36,40,.9) 10%, rgba(13,115,112,.55) 55%, rgba(217,119,58,.28) 100%),
    linear-gradient(160deg, #1C2428, #0D7370);
  box-shadow: none;
}
.welcome-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 25%, rgba(255,255,255,.1), transparent 35%),
    repeating-linear-gradient(-18deg, transparent 0 18px, rgba(255,255,255,.03) 18px 19px);
  pointer-events: none;
}
.welcome-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--swatch);
  border: 0;
  border-radius: 0;
  width: auto;
  animation: none;
  top: auto;
}
.welcome-overlay {
  position: relative;
  z-index: 1;
  max-width: 540px;
  animation: rise .75s ease;
}
.welcome-kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  margin-bottom: 14px;
}
.welcome-overlay h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.welcome-overlay p {
  opacity: .9;
  margin-bottom: 22px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.welcome-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--mark);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
  transition: transform .2s, filter .2s;
}
.welcome-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  color: #fff;
}
.records-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}
.records-panel h6 {
  margin: 0;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
}

/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Inspection workspace Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.inspection-workspace {
  width: 100%;
  max-width: none;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.workspace-header h5 {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}
.workspace-header .meta-chip {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--muted);
}
.workspace-header .meta-chip span {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  direction: ltr;
}

.workspace-grid {
  display: grid;
  direction: ltr; /* Ø¹â ØºÅØ·Â¯Ø¸â¦Ø·Â§Ø¸â  Ø·Â«Ø·Â§Ø·Â¨Ø·Ú¾: Ø·Â§Ø¸âØ·Â¯Ø·Â§Ø¸â¦Ø·Â§Ø·Ú¾ | Ø¸â Ø¸âØ·Â´Ø¸â¡ | Ø¸Ù¾Ø·Â±Ø¸â¦ */
  grid-template-columns: 118px minmax(0, 1.55fr) minmax(280px, 0.88fr);
  grid-template-areas: "actions canvas form";
  gap: 10px;
  min-height: calc(100vh - 190px);
  width: 100%;
  align-items: stretch;
}
.workspace-grid > .action-panel { grid-area: actions; }
.workspace-grid > .canvas-panel { grid-area: canvas; }
.workspace-grid > .form-panel { grid-area: form; direction: rtl; }
.canvas-panel, .form-panel, .action-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(210,222,220,.8);
  min-width: 0;
}
.canvas-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 92px;
  gap: 6px;
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}
.canvas-stage {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.canvas-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  max-height: min(72vh, 680px);
}
.canvas-viewport {
  overflow: auto;
  background:
    linear-gradient(rgba(14,107,106,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(14,107,106,.06) 1px, transparent 1px) 0 0 / 40px 40px,
    #fff;
  cursor: crosshair;
  min-width: 0;
  width: 100%;
  aspect-ratio: 900 / 620;
  max-height: min(72vh, 680px);
}
#paintCanvas {
  display: block;
  transform-origin: center center;
  width: 100%;
  height: 100%;
}
#rulerTop {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 20px;
}
#rulerLeft {
  display: block;
  width: 100%;
  height: 100%;
}
.paint-toolbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 5px 3px;
  overflow-y: auto;
  max-height: min(72vh, 680px);
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.tool-btn {
  width: 32px; height: 32px;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: .82rem;
  display: grid;
  place-items: center;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: .15s ease;
}
.tool-btn:hover, .tool-btn.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.color-swatch { border: 2px solid #fff !important; box-shadow: 0 0 0 2px var(--mark); }
#brushSize { width: 48px; writing-mode: vertical-lr; height: 64px; accent-color: var(--brand); }
.symbol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 100%;
}
.symbol-btn { font-weight: 700; font-size: .78rem; }
.image-side-list {
  border-left: 1px dashed var(--line);
  border-right: 0;
  padding: 5px;
  overflow: auto;
  min-width: 0;
}
.image-side-list .fw-bold { color: var(--brand-dark); font-size: .72rem; }
.image-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
  padding: 4px;
  text-align: center;
  font-size: .65rem;
  background: var(--surface-2);
}
.image-item img { width: 100%; height: 44px; object-fit: cover; border-radius: 6px; }
.btn-del-img {
  position: absolute; top: 2px; left: 4px; border: 0;
  background: var(--danger); color: #fff;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 11px; line-height: 1;
}

.form-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 190px);
}
.insp-tabs {
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--line);
  gap: 2px;
  margin: 0;
}
.insp-tabs .nav-link {
  font-size: .74rem;
  padding: .4rem .55rem;
  border: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  color: var(--muted);
  font-weight: 600;
}
.insp-tabs .nav-link.active {
  background: var(--brand-soft) !important;
  color: var(--brand-dark) !important;
}
.form-panel .tab-content {
  overflow: auto;
  flex: 1;
  padding: 6px !important;
}
.form-panel .form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.form-panel .form-section legend {
  float: none;
  width: auto;
  font-size: .72rem;
  font-weight: 800;
  padding: 0 6px;
  margin-bottom: 0;
  color: var(--brand-dark);
}
.form-panel .form-label {
  font-size: .68rem;
  margin-bottom: 2px;
  color: var(--muted);
  font-weight: 600;
}
.form-panel .form-control,
.form-panel .form-select {
  border-radius: 7px !important;
  border-color: var(--line) !important;
  font-size: .8rem !important;
  padding: .28rem .5rem !important;
  min-height: 0 !important;
  height: calc(1.4em + .56rem + 2px);
}
.form-panel .form-control:focus,
.form-panel .form-select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2px rgba(13,115,112,.12) !important;
}
.form-panel .row {
  --bs-gutter-x: 0.45rem;
  --bs-gutter-y: 0.35rem;
}
.form-panel textarea.form-control {
  height: auto !important;
  min-height: 56px;
  padding: .35rem .45rem !important;
}
.form-panel .iran-plate-btn {
  height: 36px;
  font-size: .78rem;
}
.form-panel .fee-words {
  font-size: .68rem;
  margin-top: 2px;
  min-height: 1.1em;
}

.iran-plate-btn {
  width: 100%;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: linear-gradient(#fff, #f5f8f8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow .2s;
}
.iran-plate-btn:hover { box-shadow: 0 0 0 4px rgba(14,107,106,.12); }
.iran-plate-btn .plate-region {
  background: var(--brand);
  color: #fff;
  padding: 7px 12px;
  border-radius: 6px;
  min-width: 44px;
}
.iran-plate-btn .plate-iran {
  writing-mode: vertical-rl;
  font-size: .65rem;
  color: var(--brand);
}
.iran-plate-editor {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.plate-seg {
  width: 64px; height: 48px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  border: 2px solid var(--brand-soft);
  border-radius: 10px;
  background: #fff;
}
.plate-seg:focus { border-color: var(--brand); outline: none; }
.plate-seg.wide { width: 90px; }
.plate-seg.letter { width: 100px; }
.plate-label { font-weight: 700; color: var(--brand); }

.action-panel {
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  min-width: 0;
  overflow: auto;
  max-height: calc(100vh - 190px);
}
.action-btn {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 3px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: .68rem;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
}
.action-btn .fs-3 { font-size: 1.35rem !important; }
.action-btn .fs-4 { font-size: 1.15rem !important; }
.action-btn:hover {
  background: var(--brand-soft);
  border-color: #b9d9d7;
  color: var(--brand-dark);
}
.action-btn .text-success { color: var(--ok) !important; }
.sig-btn {
  width: 100%;
  min-height: 74px;
  border: 1.5px dashed #b7cbc8;
  background: #fff;
  border-radius: 12px;
  font-size: .78rem;
  cursor: pointer;
  padding: 6px;
  color: var(--muted);
  transition: .15s ease;
}
.sig-btn:hover {
  border-color: var(--mark);
  background: var(--mark-soft);
  color: var(--ink);
}
.sig-btn img { max-width: 100%; max-height: 64px; }
.qr-box {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-align: center;
}
.qr-box-frame {
  width: 100%;
  max-width: 92px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #E2E8E6;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
}
.qr-box-frame img,
.qr-box img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  padding: 0;
}
.qr-box-meta {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.qr-box-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.qr-box-link {
  font-size: .66rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
  line-height: 1.3;
}
.qr-box-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}
.qr-box-link i {
  font-size: .7rem;
}
.print-checks { font-size: .72rem; width: 100%; color: var(--muted); }
.print-checks label { display: block; margin-bottom: 5px; }

.color-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.palette-color {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #c9d5d3;
  border-radius: 8px;
  cursor: pointer;
}
.palette-color.active { outline: 3px solid var(--brand); }

.chassis-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}
.chassis-modal .modal-header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}
.chassis-modal .modal-title { color: #fff; font-weight: 800; }
.chassis-modal .btn-close { filter: invert(1); }
.chassis-modal .chassis-input {
  border: 2px solid var(--brand) !important;
  border-radius: 12px !important;
}
.btn-icon-round {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.3rem;
}
.btn-primary {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-primary:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
}

.records-table thead {
  background: var(--brand-soft);
  font-size: .8rem;
  color: var(--brand-dark);
}
.records-table td { font-size: .82rem; }
.records-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.track-body {
  min-height: 100vh;
  background: var(--bg);
}
.track-logo {
  width: 56px; height: 56px;
  margin: 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: none;
}
.track-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.track-search-row .form-control { flex: 1 1 200px; min-width: 0; }
.track-search-row .btn { flex: 0 0 auto; min-width: 120px; }
.track-page {
  width: 100%;
  max-width: none !important;
}
.track-page .track-form-card,
.track-page > .card {
  width: 100%;
}
.track-disabled-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(700px 360px at 15% 10%, rgba(217,119,58,.14), transparent 55%),
    radial-gradient(600px 320px at 90% 90%, rgba(13,115,112,.2), transparent 50%),
    linear-gradient(145deg, #1C2428 0%, #243833 50%, #0D7370 100%);
}
.track-disabled-card {
  width: min(520px, 100%);
  background: rgba(255,255,255,.96);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: rise .55s ease;
}
.track-disabled-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--mark-soft);
  color: #9A4E16;
  font-size: 2rem;
}
.track-disabled-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--mark-soft);
  color: #9A4E16;
  font-weight: 800;
  font-size: .85rem;
}
.track-disabled-card h1 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
}
.track-disabled-company {
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 14px;
}
.track-disabled-text {
  color: var(--muted);
  line-height: 1.85;
  margin: 0 0 18px;
  font-size: .98rem;
}
.track-disabled-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: right;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: .86rem;
  line-height: 1.7;
}
.track-disabled-note i { margin-top: 3px; flex: 0 0 auto; }

.settings-switch-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #F7FAF9, #E4F3F2);
}
.settings-switch-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-switch-text {
  flex: 1 1 260px;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
}
.settings-switch-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 110px;
}
.settings-switch-control .form-check-input {
  width: 3em;
  height: 1.55em;
  cursor: pointer;
  background-color: #cfd8dc;
  border-color: #b0bec5;
}
.settings-switch-control .form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ Print settings tab (responsive fixed preview) Ã¢ââ¬Ã¢ââ¬Ã¢ââ¬ */
.settings-tabs .nav-link {
  color: var(--muted);
  font-weight: 600;
  gap: 6px;
  display: inline-flex;
  align-items: center;
}
.settings-tabs .nav-link.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}
.print-settings-panel {
  overflow: hidden;
  max-width: 100%;
}
.print-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}
.print-template-col,
.print-options-col {
  min-width: 0;
  max-width: 100%;
}
.print-settings-panel .row {
  --bs-gutter-x: 1.25rem;
}
.print-settings-panel [class*="col-"] {
  min-width: 0;
}
.print-settings-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.print-settings-intro {
  min-width: 0;
}
.print-settings-intro p {
  overflow-wrap: anywhere;
}
.print-template-preview {
  width: 100%;
  max-width: 100%;
  height: 220px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background:
    linear-gradient(45deg, #eef1f0 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #eef1f0 25%, transparent 25%) 0 0 / 16px 16px,
    var(--surface-2);
  display: block;
  overflow: hidden;
  position: relative;
}
.print-template-preview.has-image {
  border-style: solid;
  border-color: var(--line);
  background: #243033;
}
.print-template-preview img,
.print-template-preview #printTemplateImg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: calc(100% - 12px) !important;
  max-height: calc(100% - 12px) !important;
  object-fit: contain;
}
.print-template-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
  z-index: 1;
}
.print-template-empty i {
  font-size: 2rem;
  opacity: .6;
}
.print-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.print-settings-actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
}
@media (max-width: 991.98px) {
  .print-settings-grid {
    grid-template-columns: 1fr;
  }
  .print-template-preview {
    height: 200px;
  }
  .print-settings-intro .d-flex {
    flex-direction: column;
  }
}
@media (max-width: 575.98px) {
  .print-template-preview {
    height: 170px;
  }
  .print-settings-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
.btn-scan-barcode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff !important;
  background: var(--brand);
  box-shadow: none;
}
.btn-scan-barcode i { font-size: 1.4rem; }
.btn-scan-barcode:active { transform: scale(.98); }
.scanner-modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.qr-reader-box {
  width: 100%;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
}
.qr-reader-box video {
  width: 100% !important;
  border-radius: 14px;
}
#qr-reader__scan_region { min-height: 260px; }
#qr-reader__dashboard { display: none !important; }
@media (max-width: 575.98px) {
  .track-search-row .btn { width: 100%; min-height: 48px; }
  .card-header.d-flex { flex-direction: column; gap: 10px; text-align: center; }
  .scanner-modal-content { border-radius: 0; }
}

.modal-content { border-radius: 16px; border: 0; box-shadow: var(--shadow); }
.modal-header { border-bottom-color: var(--line); }
.modal-footer { border-top-color: var(--line); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(12px) rotate(4deg); }
}

/* Mobile chrome (hidden on large screens by Bootstrap utilities) */
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
  background: #1C2428;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mark);
  box-shadow: none;
}
.mob-icon-btn {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
}
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1040;
  height: calc(64px + env(safe-area-inset-bottom));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(28,36,40,.06);
  backdrop-filter: none;
}
.mb-nav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: .68rem;
  font-weight: 600;
  border-radius: 10px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.mb-nav-item i { font-size: 1.2rem; }
.mb-nav-item.active, .mb-nav-item:hover { color: var(--brand); background: var(--brand-soft); }
.mb-nav-fab {
  background: var(--brand) !important;
  color: #fff !important;
  transform: translateY(-10px);
  box-shadow: 0 6px 16px rgba(13,115,112,.3);
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 14px !important;
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,36,40,.45);
  z-index: 1045;
}
.sidebar-backdrop.show { display: block; }

.records-cards { display: grid; gap: 10px; }
.record-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.record-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.record-id {
  font-size: .75rem;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.record-card-meta {
  display: grid;
  gap: 6px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.record-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.record-card-actions { display: flex; gap: 8px; }

.mobile-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
  background: var(--surface);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.mws-tab {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 8px;
  font-weight: 700;
  color: var(--muted);
  font-size: .85rem;
  min-height: 44px;
}
.mws-tab.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.mobile-sticky-actions {
  position: sticky;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 10px;
  margin-top: 10px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ Laptop mid Ã¢â°Â¤ 1399px Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .workspace-grid {
    grid-template-columns: 108px minmax(0, 1.75fr) minmax(250px, 0.72fr);
    gap: 8px;
  }
  .canvas-panel {
    grid-template-columns: minmax(0, 1fr) 56px 84px;
  }
  .form-panel .form-control,
  .form-panel .form-select {
    font-size: .76rem !important;
    padding: .22rem .4rem !important;
  }
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ Tablet Ã¢â°Â¤ 1199px Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
@media (max-width: 1199.98px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "canvas" "form" "actions";
    min-height: 0;
    direction: rtl;
  }
  .mws-panel { display: none !important; }
  .mws-panel.is-active { display: block !important; }
  .form-panel.is-active {
    display: flex !important;
    flex-direction: column;
    max-height: none;
  }
  .canvas-panel.is-active {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .canvas-panel.is-active .paint-toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    width: 100%;
    padding: 8px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .canvas-panel.is-active .symbol-grid {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
  }
  .canvas-panel.is-active #brushSize {
    writing-mode: horizontal-tb;
    width: 100px;
    height: auto;
  }
  .canvas-panel.is-active .image-side-list {
    border-left: 0;
    border-top: 1px dashed var(--line);
    display: flex;
    flex-direction: column;
  }
  .canvas-panel.is-active .image-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .canvas-panel.is-active .image-item {
    min-width: 96px;
    margin-bottom: 0;
  }
  .action-panel.is-active {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
    max-height: none;
    overflow: visible;
  }
  .action-panel.is-active .qr-box,
  .action-panel.is-active .print-checks {
    grid-column: 1 / -1;
  }
  .action-panel.is-active .sig-btn { min-height: 88px; }
  .canvas-row,
  .canvas-viewport {
    max-height: min(58vh, 480px);
  }
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ Large tablet / small laptop Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .app-shell { grid-template-columns: 1fr 84px; }
  .sidebar { margin: 10px 10px 10px 0; }
  .sidebar .nav-item span { font-size: .62rem; }
  .brand-text { font-size: .85rem; }
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ Mobile & small tablet Ã¢â°Â¤ 991px Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
@media (max-width: 991.98px) {
  .app-body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .main-area {
    order: 1;
    padding: 12px;
    padding-bottom: 28px;
    overflow-x: hidden;
  }
  .sidebar {
    order: 0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 320px);
    margin: 0;
    border-radius: 0;
    z-index: 1050;
    transform: translateX(105%);
    transition: transform .28s ease;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    padding: 8px 12px 16px;
  }
  .sidebar-brand .brand-icon { margin: 0; }
  .sidebar-nav { gap: 2px; padding: 0 8px; }
  .sidebar .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    font-size: .92rem;
    min-height: 48px;
  }
  .sidebar .nav-item i { font-size: 1.15rem; width: 22px; text-align: center; }
  .sidebar .nav-item span { display: inline !important; }
  .brand-text { display: inline !important; }
  .sidebar-toggle { display: none !important; }
  .sidebar .nav-item.active::before {
    left: auto;
    right: 4px;
    top: 18%;
    bottom: 18%;
  }

  .status-bar { display: none; }

  .welcome-hero {
    min-height: auto;
    padding: 28px 20px;
    border-radius: 18px;
  }
  .welcome-hero::after { width: 160px; height: 160px; border-width: 16px; }
  .welcome-overlay h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .welcome-overlay p { font-size: .95rem; margin-bottom: 16px; }
  .welcome-cta { width: 100%; justify-content: center; min-height: 48px; }
  .records-panel .panel-head {
    flex-direction: column;
    align-items: stretch;
  }
  .records-panel .panel-head .btn { width: 100%; }

  .page-box { max-width: none; width: 100%; }
  .panel { padding: 12px; border-radius: 14px; }

  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
  }
  .insp-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .insp-tabs .nav-link { white-space: nowrap; font-size: .78rem; padding: .5rem .55rem; }
  .form-panel { min-height: 50vh; max-height: none; }
  .form-panel .tab-content { max-height: none; overflow: visible; }
  .form-section { padding: 10px; }
  .iran-plate-editor { gap: 6px; flex-wrap: wrap; justify-content: center; }
  .plate-seg { width: 52px; height: 44px; font-size: 1rem; }
  .plate-seg.wide { width: 72px; }
  .plate-seg.letter { width: 84px; }

  .modal-dialog {
    margin: .75rem auto;
    max-width: calc(100vw - 1.5rem);
  }
  .modal-content { border-radius: 16px; }
  #sigCanvas { width: 100% !important; height: auto !important; max-height: 220px; }

  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .settings-tabs .nav-link { white-space: nowrap; }
  .settings-switch-card {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-switch-control {
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }

  .table-responsive,
  .archive-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .archive-table,
  .finance-table {
    min-width: 720px;
  }

  .dash-header {
    flex-direction: column;
    align-items: stretch;
  }
  .finance-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .finance-hero-actions,
  .archive-hero {
    width: 100%;
  }
  .archive-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .track-search-row {
    flex-direction: column;
  }
  .track-search-row .btn {
    width: 100%;
    min-width: 0;
  }

  .btn, .form-control, .form-select {
    min-height: 42px;
  }
  .btn-sm { min-height: 36px; }
}

/* Phones Ã¢â°Â¤ 575px */
@media (max-width: 575.98px) {
  .dash-header { padding: 14px; border-radius: 14px; }
  .dash-action { padding: 8px 10px 8px 8px; min-height: 48px; gap: 8px; border-radius: 12px; }
  .dash-action-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }
  .dash-action-text strong { font-size: .8rem; }
  .dash-icon-btn { width: 48px; min-height: 48px; }
  .dash-icon-btn.theme-toggle { width: 48px; min-height: 48px; }
  .main-area { padding: 10px; }
  .form-panel .row > [class*="col-"] { width: 100%; }
  .welcome-kicker { font-size: .72rem; }
  .status-date-text { display: none; }
  .qr-box {
    padding: 10px;
  }
  .qr-box-frame {
    max-width: 120px;
  }
  .qr-box-title { font-size: .75rem; }
  .qr-box-link { font-size: .72rem; }
  .canvas-viewport { max-height: 48vh; }
  .canvas-row { max-height: 48vh; }
  .tool-btn { width: 40px; height: 40px; flex: 0 0 auto; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .welcome-hero { min-height: auto; padding: 18px; }
  .mobile-bottom-nav { height: 56px; }
  .mb-nav-fab { transform: none; width: 44px; height: 44px; }
  .canvas-viewport { max-height: 70vh; }
  .canvas-row { max-height: 70vh; }
}

/* Desktop restore: show all panels + full-bleed content */
@media (min-width: 1200px) {
  .mws-panel { display: revert; }
  .canvas-panel { display: grid; }
  .form-panel { display: flex; }
  .action-panel { display: flex; }
  .mobile-sticky-actions { display: none !important; }

  .main-area {
    padding: 16px 18px 12px;
  }
  .login-wrap {
    width: min(1480px, calc(100vw - 40px));
    min-height: calc(100vh - 40px);
  }
  .paint-toolbar {
    max-height: min(72vh, 680px);
  }
  .form-panel { max-height: calc(100vh - 190px); }
  .action-panel { max-height: calc(100vh - 190px); }
  .track-page {
    padding-inline: 24px !important;
  }
}

/* Touch-friendly focus */
@media (hover: none) {
  .sidebar .nav-item:hover { transform: none; }
  .welcome-cta:hover { transform: none; }
  .tool-btn:hover { transform: none; }
}

@media (min-width: 576px) {
  .w-sm-auto { width: auto !important; }
}

/* Prevent iOS zoom on inputs */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 991.98px) {
    .form-control, .form-select, .login-input, .chassis-input, .plate-seg,
    .jalali-date, textarea.form-control {
      font-size: 16px !important;
    }
  }
}

/* Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯
   Responsive polish Ã¢â¬â Ø¸â¡Ø¸â¦Ø¸â¡ Ø·ÂµØ¸Ù¾Ø·Â­Ø·Â§Ø·Ú¾
   Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯Ã¢â¢Ú¯ */
@media (max-width: 1199.98px) {
  .dash-kpi-value { font-size: 1.15rem; }
  .finance-kpi-value { font-size: 1.15rem; }
  .print-settings-grid { gap: 14px; }
}

@media (max-width: 767.98px) {
  .dash-header h1,
  .archive-hero h1,
  .finance-hero h1 {
    font-size: 1.25rem;
  }
  .dash-header p,
  .archive-hero p,
  .finance-hero p {
    font-size: .86rem;
  }
  .dash-toolbar,
  .finance-hero-actions,
  .archive-filters-head-actions {
    width: 100%;
  }
  .dash-action {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
  .dash-action-text small { display: none; }
  .finance-hero-actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .archive-hero-btn { width: 100%; }
  .finance-presets {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .finance-preset { flex: 0 0 auto; }
  .record-card-actions {
    display: flex;
    gap: 8px;
  }
  .record-card-actions .btn { flex: 1; }
  .mb-nav-item span { font-size: .62rem; }
  .jdp-popover {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 575.98px) {
  .dash-header { padding: 14px; border-radius: 14px; }
  .dash-action { padding: 8px 10px 8px 8px; min-height: 48px; gap: 8px; border-radius: 12px; }
  .dash-action-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .95rem; }
  .dash-action-text strong { font-size: .8rem; }
  .dash-icon-btn { width: 48px; min-height: 48px; }
  .dash-icon-btn.theme-toggle { width: 48px; min-height: 48px; }
  .main-area { padding: 10px; }
  .form-panel .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; width: 100%; }
  .welcome-kicker { font-size: .72rem; }
  .status-date-text { display: none; }
  .qr-box { padding: 10px; }
  .qr-box-frame { max-width: 120px; }
  .qr-box-title { font-size: .75rem; }
  .qr-box-link { font-size: .72rem; }
  .canvas-viewport { max-height: 48vh; }
  .canvas-row { max-height: 48vh; }
  .tool-btn { width: 40px; height: 40px; flex: 0 0 auto; }

  .dash-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-kpi { padding: 10px; }
  .dash-kpi-icon { width: 36px; height: 36px; font-size: 1rem; }
  .dash-kpi-go { display: none; }
  .dash-quick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-quick-item { min-height: 72px; padding: 12px 8px; font-size: .8rem; }
  .dash-alert-item {
    flex-wrap: wrap;
  }
  .dash-alert-item .btn {
    width: 100%;
  }

  .finance-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .finance-filter-actions .btn { width: 100%; }
  .finance-chart-line { height: 130px; }
  .finance-kpi-main { grid-column: span 2; }

  .archive-filters { padding: 12px; }
  .archive-filter-actions .btn { width: 100%; }
  .archive-filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .backup-page .btn,
  .page-box .btn.rounded-pill { width: 100%; }
  .page-box .row.g-2 .btn,
  .page-box form .btn:not(.btn-sm) {
    min-height: 44px;
  }

  .settings-tabs .nav-link {
    font-size: .82rem;
    padding: .55rem .7rem;
  }
  .settings-switch-card { padding: 12px; }
  .print-settings-actions .btn { width: 100%; }

  .modal-dialog {
    margin: .5rem;
    max-width: calc(100% - 1rem);
  }
  .modal-header, .modal-footer {
    padding: .75rem 1rem;
  }
  .modal-body { padding: 1rem; }

  .no-print {
    flex-direction: column;
    align-items: stretch !important;
  }
  .no-print .actions {
    width: 100%;
  }
  .no-print .actions a,
  .no-print .actions button {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }

  .sheet-wrap { padding: 10px !important; }
  .sheet {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: var(--pw-n, 210) / var(--ph-n, 148);
    max-width: 100%;
  }

  .track-page { padding: 16px 12px !important; }
  .track-logo { font-size: 1.5rem; }
  .track-form-card { padding: 14px !important; }
  .track-search-row .form-control-lg {
    font-size: 1rem;
    min-height: 48px;
  }

  .workspace-header h5 { font-size: 1rem; }
  .mobile-workspace-tabs { position: sticky; top: 56px; z-index: 20; }
  .mobile-sticky-actions {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }
  .iran-plate-editor { transform: scale(.92); transform-origin: center; }
}

/* Tablet landscape / mid */
@media (min-width: 768px) and (max-width: 991.98px) {
  .main-area { padding: 14px 16px 28px; }
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Touch: larger hit areas, no hover sticky styles */
@media (hover: none) and (pointer: coarse) {
  .sidebar .nav-item,
  .mb-nav-item,
  .dash-quick-item,
  .pe-field-item,
  .action-btn,
  .tool-btn {
    min-height: 44px;
  }
  a, button { -webkit-tap-highlight-color: transparent; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .welcome-hero { min-height: auto; padding: 18px; }
  .mobile-bottom-nav { height: 56px; }
  .mb-nav-fab { transform: none; width: 44px; height: 44px; }
  .canvas-viewport { max-height: 70vh; }
  .canvas-row { max-height: 70vh; }
}

/* ═══════════════════════════════════════════
   Responsive final pass - all pages
   ═══════════════════════════════════════════ */
.status-desktop-only { display: inline; }
.settings-hero-panel {
  border-color: transparent;
  background: var(--brand-soft);
}
.settings-hero-title { color: var(--brand-dark); }

@media (max-width: 1199.98px) {
  .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991.98px) {
  .status-desktop-only { display: none !important; }
  .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid-2,
  .dash-charts-row { grid-template-columns: 1fr; }
  .finance-grid-3 { grid-template-columns: 1fr; }
  .settings-page .panel,
  .backup-page .panel { border-radius: 14px; }
  .print-settings-intro .d-flex { gap: 12px !important; }
  .workspace-header .meta-chip { gap: 6px; }
  .mobile-sticky-actions .btn { flex: 1; min-height: 44px; }
}

@media (max-width: 767.98px) {
  .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-sys-grid { grid-template-columns: 1fr; }
  .finance-kpi { padding: 12px; gap: 10px; }
  .finance-kpi-icon { width: 40px; height: 40px; }
  .archive-filters-head {
    flex-direction: column;
    align-items: stretch;
  }
  .archive-filters-head-info { margin-inline-end: 0; }
  .archive-quick-chips { order: 3; }
  .track-disabled-card { padding: 28px 18px; }
}

@media (max-width: 575.98px) {
  .dash-kpi-grid > .dash-kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .finance-kpi-value { font-size: 1.05rem; }
  .settings-page .btn,
  .backup-page form .btn { width: 100%; }
  .print-settings-intro h6 { font-size: .95rem; }
  .form-panel .input-group {
    flex-direction: column;
  }
  .form-panel .input-group > .form-control,
  .form-panel .input-group > .btn {
    width: 100%;
    border-radius: 10px !important;
  }
  .form-panel .input-group > .btn { margin-top: 6px; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1400px) {
  .main-area { padding-inline: 22px; }
}
