/* ==========================================================================
   Darzi Pro — light theme design system
   Uses logical properties (inline-start/end) so Urdu RTL works automatically.
   ========================================================================== */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --border: #e4e7ef;
  --border-strong: #d3d8e4;
  --text: #141b2d;
  --text-2: #4a5468;
  --muted: #7b8497;

  --primary: #4338ca;
  --primary-600: #3730a3;
  --primary-50: #eef0ff;
  --primary-100: #e0e3ff;
  --accent: #d97706;
  --accent-50: #fff7e8;

  --success: #059669; --success-50: #e7f8f1;
  --warning: #c27803; --warning-50: #fff6e0;
  --danger:  #dc2626; --danger-50:  #fdeeee;
  --info:    #0369a1; --info-50:    #e8f4fb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(10, 53, 39, .06);
  --shadow: 0 4px 16px rgba(10, 53, 39, .07), 0 1px 3px rgba(10, 53, 39, .05);
  --shadow-lg: 0 18px 50px rgba(10, 53, 39, .14);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ur: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif;
  --font-ur-display: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;

  --sidebar-w: 256px;
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--font-ur); font-size: 16px; line-height: 1.9; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] .display { font-family: var(--font-ur-display); line-height: 1.9; }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.center { text-align: center; }
.end { text-align: end; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem } .mt-4 { margin-top: 2.5rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem } .mb-3 { margin-bottom: 1.5rem }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .93rem; line-height: 1.2;
  cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s, color .15s, border-color .15s;
  white-space: nowrap; text-decoration: none; background: var(--surface); color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 1px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(18, 129, 85, .25); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #b46205; color: #fff; }
.btn-outline { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-600); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; color: #fff; }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-body { padding: 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 1.02rem; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
@media (max-width: 640px) { .card-body { padding: 16px; } .card-head { padding: 14px 16px; } }

.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; display: flex; gap: 14px; align-items: center;
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 1.15rem;
  background: var(--primary-50); color: var(--primary);
}
.stat-icon.green { background: var(--success-50); color: var(--success); }
.stat-icon.amber { background: var(--accent-50); color: var(--accent); }
.stat-icon.red { background: var(--danger-50); color: var(--danger); }
.stat-icon.blue { background: var(--info-50); color: var(--info); }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stat-value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge-pending { background: var(--warning-50); color: var(--warning); }
.badge-in_progress, .badge-assigned { background: var(--info-50); color: var(--info); }
.badge-ready, .badge-active, .badge-done, .badge-approved { background: var(--success-50); color: var(--success); }
.badge-delivered { background: var(--primary-50); color: var(--primary); }
.badge-cancelled, .badge-expired, .badge-rejected, .badge-suspended { background: var(--danger-50); color: var(--danger); }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius); border: 1px solid transparent;
  font-size: .93rem; margin-bottom: 16px;
}
.alert i { margin-top: 3px; }
.alert-success { background: var(--success-50); border-color: #bfe9d7; color: #065f46; }
.alert-error, .alert-danger { background: var(--danger-50); border-color: #f6caca; color: #991b1b; }
.alert-warning { background: var(--warning-50); border-color: #f5dfa8; color: #8a5300; }
.alert-info { background: var(--info-50); border-color: #bfdcef; color: #075985; }
.alert .btn { margin-inline-start: auto; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.input, .select, .textarea, input:not([type]), input[type=text], input[type=password], input[type=number], input[type=tel],
input[type=email], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s; min-height: 42px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--primary); }
input[type=file] { padding: 8px; font-size: .88rem; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.input-group { display: flex; }
.input-group > input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group > .btn { border-start-start-radius: 0; border-end-start-radius: 0; }
.error-text { color: var(--danger); font-size: .8rem; }

/* Measurement grid: compact, big touch targets */
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.measure-grid .field { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.measure-grid .field label { font-size: .82rem; }
.measure-grid input, .measure-grid select { background: var(--surface); font-weight: 600; font-size: 1.02rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: start; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
[dir="rtl"] .table th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .actions { text-align: end; white-space: nowrap; }
.table .actions .btn + .btn, .table .actions form + .btn, .table .actions .btn + form { margin-inline-start: 4px; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }

/* Mobile: tables collapse to labelled cards */
@media (max-width: 720px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .table.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: start; }
  .table.responsive td.actions { justify-content: flex-end; padding-top: 8px; }
  .table.responsive td.actions::before { display: none; }
}

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 2.2rem; color: var(--border-strong); margin-bottom: 12px; display: block; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .88rem; }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Tabs / chips ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .86rem; white-space: nowrap;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
}
.tab:hover { color: var(--primary); border-color: var(--primary-100); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab .count { margin-inline-start: 6px; opacity: .75; font-weight: 500; }

/* ---------- Modal (native <dialog>) ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--radius-lg); width: min(520px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg); color: var(--text); background: var(--surface);
}
dialog.modal::backdrop { background: rgba(15, 18, 40, .45); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ==========================================================================
   App shell (shop panel + super admin)
   ========================================================================== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--surface); border-inline-end: 1px solid var(--border);
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40;
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #0f6444); color: #fff; font-size: 1rem;
  box-shadow: 0 6px 14px rgba(18, 129, 85, .3); overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 800; font-size: 1.02rem; color: var(--text); line-height: 1.15; }
.brand-sub { font-size: .74rem; color: var(--muted); font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-label { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 6px; }
[dir="rtl"] .nav-label { letter-spacing: 0; font-size: .8rem; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: .92rem; margin-bottom: 2px;
}
.nav a i { width: 20px; text-align: center; color: var(--muted); font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-50); color: var(--primary); }
.nav a.active i { color: var(--primary); }
.nav a .pill { margin-inline-start: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; }
.nav a.locked { opacity: .55; }
.nav a.locked::after { content: '\f023'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-inline-start: auto; font-size: .75rem; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); }
.plan-box { background: linear-gradient(135deg, var(--primary-50), #f5efff); border-radius: 12px; padding: 12px 14px; font-size: .84rem; }
.plan-box strong { display: block; color: var(--primary); }

.main { flex: 1; min-width: 0; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
}
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { padding-inline-start: 40px; background: var(--surface-2); border-color: transparent; }
.topbar .search input:focus { background: var(--surface); border-color: var(--primary); }
.topbar .search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 999px; cursor: pointer; background: transparent; border: 0; font: inherit; color: inherit; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-100); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.user-chip .who { text-align: start; line-height: 1.2; }
.user-chip .who small { color: var(--muted); display: block; font-size: .74rem; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font: inherit; font-size: .9rem; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: start;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu i { width: 18px; color: var(--muted); }

.lang-switch { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; border: 1px solid var(--border); }
.lang-switch a { padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--text-2); line-height: 1.6; }
.lang-switch a.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.lang-switch a[lang="ur"] { font-family: var(--font-ur); font-size: .85rem; }

.page { padding: 26px 24px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.page-head .sub { color: var(--muted); margin-top: 2px; font-size: .92rem; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

.backdrop { display: none; }
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 18, 40, .4); z-index: 35; }
  .main { margin-inline-start: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .page { padding: 18px 14px 60px; }
  .user-chip .who { display: none; }
}
@media (max-width: 560px) {
  .topbar .search { display: none; }
  .topbar .search.open { display: block; position: absolute; inset-inline: 10px; top: 10px; max-width: none; }
  .search-toggle { display: inline-flex !important; }
  .page-head h1 { font-size: 1.3rem; }
}
.search-toggle { display: none !important; }
@media (max-width: 560px) { .hide-sm { display: none !important; } }

/* Ads */
.ad-slot { margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--surface); border: 1px dashed var(--border-strong); }
.ad-slot img { width: 100%; max-height: 140px; object-fit: cover; }
.ad-slot .ad-tag { position: absolute; top: 8px; inset-inline-end: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: .68rem; padding: 2px 8px; border-radius: 6px; }
.ad-slot .ad-inner { padding: 12px; }

/* Misc app widgets */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv > div { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; }
.kv dt, .kv .k { font-size: .76rem; color: var(--muted); font-weight: 600; }
.kv dd, .kv .v { margin: 0; font-weight: 700; font-size: 1rem; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list-plain li:last-child { border-bottom: 0; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.warn > span { background: var(--accent); }
.progress.full > span { background: var(--danger); }
.garment-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--surface-2); padding: 4px; flex: none; }
.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.type-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-weight: 600; text-align: center; transition: .15s; }
.type-card:hover, .type-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); color: var(--primary); }
.type-card img { width: 64px; height: 64px; object-fit: contain; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 34px; padding-bottom: 20px; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 11px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; inset-inline-start: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: var(--surface-2); color: var(--muted); border: 2px solid var(--border); }
.timeline li.done .dot { background: var(--success); color: #fff; border-color: var(--success); }
.timeline li.current .dot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 5px var(--primary-50); }
.timeline strong { display: block; }
.field-row { display: grid; grid-template-columns: 28px 1.2fr 1.2fr 120px 1.6fr 70px 40px; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.field-row .handle { cursor: grab; color: var(--muted); text-align: center; }
.field-row textarea { min-height: 42px; height: 42px; font-size: .85rem; }
.field-row.dragging { opacity: .5; }
@media (max-width: 900px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .handle { display: none; }
  .field-row .opt { grid-column: 1 / -1; }
}
.field-head { display: grid; grid-template-columns: 28px 1.2fr 1.2fr 120px 1.6fr 70px 40px; gap: 8px; padding: 0 8px 6px; font-size: .75rem; color: var(--muted); font-weight: 700; }
@media (max-width: 900px) { .field-head { display: none; } }
.line-items .li-row { display: grid; grid-template-columns: 2.4fr 80px 120px 120px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 640px) { .line-items .li-row { grid-template-columns: 1fr 70px 1fr 40px; } .line-items .li-row .li-total { display: none; } .li-head { display: none !important; } }
.li-head { display: grid; grid-template-columns: 2.4fr 80px 120px 120px 40px; gap: 8px; font-size: .75rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.totals { max-width: 340px; margin-inline-start: auto; }
.totals .t-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.totals .t-row input { max-width: 140px; text-align: end; }
.totals .grand { border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; font-weight: 800; }
.suggest { position: absolute; z-index: 20; inset-inline: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; }
.suggest button { display: block; width: 100%; text-align: start; padding: 10px 14px; border: 0; background: none; font: inherit; cursor: pointer; }
.suggest button:hover { background: var(--surface-2); }
.rel { position: relative; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .board { grid-template-columns: minmax(0, 1fr); } }
.board-col { background: var(--surface-2); border-radius: var(--radius-lg); padding: 12px; border: 1px solid var(--border); }
.board-col h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 4px 6px 12px; }
.board-col h3 .count { margin-inline-start: auto; background: var(--surface); border-radius: 99px; padding: 1px 10px; font-size: .8rem; color: var(--muted); }
.job { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.job .meta { font-size: .8rem; color: var(--muted); }
.job form { display: flex; gap: 6px; margin-top: 10px; }
.job form select { min-height: 36px; padding: 6px 10px; font-size: .86rem; }
.job.late { border-inline-start: 3px solid var(--danger); }

/* ==========================================================================
   Public website
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(228, 231, 239, .8);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo:hover { color: var(--text); }
.site-nav { display: flex; gap: 4px; margin-inline-start: 18px; }
.site-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.site-nav a:hover { color: var(--primary); background: var(--primary-50); }
.site-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.site-menu-btn { display: none; }
@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; top: 70px; inset-inline: 0; background: var(--surface); flex-direction: column; padding: 12px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); margin: 0; }
  .site-nav.open { display: flex; }
  .site-menu-btn { display: inline-flex; }
  .site-actions .hide-sm { display: none; }
}

.hero { position: relative; overflow: hidden; padding: 80px 0 70px; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(124, 58, 237, .12), transparent 60%),
    radial-gradient(700px 360px at 10% 0%, rgba(18, 129, 85, .12), transparent 60%),
    radial-gradient(500px 260px at 60% 100%, rgba(217, 119, 6, .08), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .84rem; font-weight: 600; color: var(--primary); box-shadow: var(--shadow-sm); }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.12; letter-spacing: -.025em; margin: 18px 0; }
[dir="rtl"] .hero h1 { line-height: 1.85; font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: 0; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary), #0f6444 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.12rem; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-trust { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; color: var(--text-2); font-size: .9rem; font-weight: 500; }
.hero-trust i { color: var(--success); margin-inline-end: 6px; }
.mock {
  background: var(--surface); border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: 16px; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
}
[dir="rtl"] .mock { transform: perspective(1400px) rotateY(6deg) rotateX(3deg); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 12px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; }
.mock-bar span:nth-child(1) { background: #fca5a5 } .mock-bar span:nth-child(2) { background: #fcd34d } .mock-bar span:nth-child(3) { background: #86efac }
.mock .stat { padding: 12px; }
.mock .stat-value { font-size: 1.1rem; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.mock-row:last-child { border: 0; }
@media (max-width: 900px) {
  .hero { padding: 50px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .mock { transform: none !important; }
}

.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--accent); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; }
[dir="rtl"] .section-head .kicker { letter-spacing: 0; font-size: .95rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0 12px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.feature { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: .2s; height: 100%; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 1.25rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--text-2); margin: 0; font-size: .95rem; }

.step { text-align: center; padding: 10px 18px; }
.step .n { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #0f6444); color: #fff; font-size: 1.3rem; box-shadow: 0 10px 24px rgba(18, 129, 85, .28); }
.step p { color: var(--text-2); }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 30px 26px; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.price-card .ribbon { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
[dir="rtl"] .price-card .ribbon { transform: translateX(50%); }
.price-card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.price-card .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 4px; }
.price-card .amount small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 26px; flex: 1; }
.price-card li { padding: 7px 0; display: flex; gap: 10px; color: var(--text-2); font-size: .94rem; }
.price-card li i { color: var(--success); margin-top: 5px; }
.price-card .btn { width: 100%; }

.track-box { max-width: 620px; margin: 0 auto; }
.track-form { display: flex; gap: 10px; background: var(--surface); padding: 8px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.track-form input { border: 0; box-shadow: none !important; font-size: 1.05rem; text-transform: uppercase; }
@media (max-width: 520px) { .track-form { flex-direction: column; } }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--primary); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--text-2); padding-bottom: 12px; }

.cta-band { background: linear-gradient(135deg, var(--primary) 0%, #0a3527 100%); color: #fff; border-radius: 26px; padding: 50px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); }
.cta-band .btn-light { background: #fff; color: var(--primary); }

.site-footer { background: #0f1226; color: #b7bdd3; padding: 56px 0 26px; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer a { color: #b7bdd3; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; font-size: .85rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 820px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .foot-grid { grid-template-columns: 1fr; } }

/* Auth pages */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.wide { max-width: 760px; }
.auth-card .card-body { padding: 34px; }
@media (max-width: 520px) { .auth-card .card-body { padding: 22px; } }
.auth-title { text-align: center; margin-bottom: 24px; }
.auth-title .brand-mark { margin: 0 auto 14px; width: 52px; height: 52px; font-size: 1.4rem; }
.pay-box { background: linear-gradient(135deg, #fff8ec, #fff); border: 1px solid #f6dfb5; border-radius: 16px; padding: 18px 20px; }
.pay-box .num { font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; color: var(--text); }
.jc-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #c2410c; }
.cred-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 14px; padding: 16px; font-family: ui-monospace, Consolas, monospace; }

/* Shop public page */
.shop-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 40px 0; }
.shop-hero .row { gap: 20px; }
.shop-logo { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; background: var(--primary-50); display: grid; place-items: center; font-size: 2rem; color: var(--primary); font-weight: 800; flex: none; }
.rate-card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.rate-card img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.rate-card .price { margin-inline-start: auto; font-weight: 800; color: var(--primary); white-space: nowrap; }

/* ==========================================================================
   Print (receipts, measurement slips, karigar bills)
   ========================================================================== */
.print-page { max-width: 820px; margin: 24px auto; background: #fff; padding: 34px; border-radius: 14px; box-shadow: var(--shadow); }
.print-toolbar { max-width: 820px; margin: 20px auto 0; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 0 16px; }
.print-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 18px; }
.print-head h2 { margin: 0; }
.print-page .table th { background: #f3f4f6; color: #111; }
.receipt-slip { max-width: 380px; }
@media print {
  @page { margin: 10mm; }
  body { background: #fff !important; }
  .no-print, .print-toolbar, .sidebar, .topbar, .ad-slot { display: none !important; }
  .print-page { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .main { margin: 0 !important; }
  a { color: inherit; }
}

.credit a { font-weight: 700; }
.site-footer .credit a { color: #fff; }

/* ---------- Measurement sheet (two fields per row, like the paper form) ---------- */
.m-card { overflow: hidden; }
.m-title { display: flex; align-items: center; gap: 14px; padding: 22px 26px 8px; flex-wrap: wrap; }
.m-title img { width: 54px; height: 54px; object-fit: contain; background: var(--primary-50); border-radius: 14px; padding: 6px; }
.m-title h2 { margin: 0; flex: 1; color: var(--primary); }
.m-sheet { display: grid; grid-template-columns: 1fr 1fr; column-gap: 46px; padding: 6px 26px 22px; }
.m-row { display: flex; align-items: center; gap: 14px; padding: 9px 2px; border-bottom: 1px solid var(--border); min-height: 56px; }
.m-row label { flex: 0 0 36%; color: var(--text-2); font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .m-row label { font-family: var(--font-ur-display); font-size: 1.15rem; font-weight: 500; line-height: 2.1; }
.m-row input, .m-row select, .m-row textarea {
  flex: 1; min-width: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0;
  background: transparent; box-shadow: none !important; padding: 6px 8px; min-height: 40px;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.m-row select { cursor: pointer; }
.m-row input:hover, .m-row select:hover, .m-row textarea:hover { background: var(--surface-2); }
.m-row input:focus, .m-row select:focus, .m-row textarea:focus { border-bottom-color: var(--primary); background: var(--primary-50); }
.m-row textarea { min-height: 56px; font-weight: 500; font-size: 1rem; resize: vertical; }
.m-static { flex: 1; font-weight: 700; font-size: 1.05rem; padding: 6px 8px; }
.m-heading {
  grid-column: 1 / -1; margin: 22px 0 4px; padding-bottom: 8px; border-bottom: 2px dashed var(--primary-100);
  color: var(--primary); font-weight: 800; font-size: 1.15rem;
}
[dir="rtl"] .m-heading { font-family: var(--font-ur-display); font-size: 1.45rem; font-weight: 700; line-height: 2; }
.m-wide { grid-column: 1 / -1; }
.m-wide label { flex-basis: 17%; }
.m-row label::after { content: ":"; }
.m-hint { margin: 0; padding: 0 26px 14px; }
@media (max-width: 720px) {
  .m-sheet { grid-template-columns: minmax(0, 1fr); padding: 4px 16px 16px; }
  .m-title { padding: 18px 16px 4px; }
  .m-row label, .m-wide label { flex-basis: 42%; }
}
[dir="rtl"] .m-row input, [dir="rtl"] .m-row .m-static { text-align: right; }
/* Nastaliq glyphs are tall — never clip them */
[dir="rtl"] .m-row label { overflow: visible; text-overflow: clip; white-space: normal; line-height: 2.3; padding-top: 4px; }
[dir="rtl"] .m-heading { overflow: visible; padding-top: 6px; }

/* Work assignments */
.info-tile { display: flex; flex-direction: column; gap: 2px; background: var(--primary-50); border-radius: 14px; padding: 12px 14px; min-height: 64px; justify-content: center; }
.info-tile strong { font-size: 1.05rem; }
.work-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.work-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.08)); color: inherit; }

/* Bookings: priority badges, quiet WhatsApp button, read-only labels inside dialogs */
.badge-prio-fast_track { background: #fff4e5; color: #b45309; }
.badge-prio-urgent { background: #fee2e2; color: #b91c1c; }
.btn-wa.wa-quiet { background: transparent; color: #16a34a; border: 1px solid #bbf7d0; }
.plain-readonly { border: 0 !important; background: transparent !important; padding: 0 !important; font-weight: 700; box-shadow: none !important; }

/* Small daily bar chart (income) */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 6px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 8px; }
.bar span { display: block; width: 100%; max-width: 26px; background: var(--primary); border-radius: 6px 6px 2px 2px; opacity: .85; }
.bar:hover span { opacity: 1; }
.bar small { font-size: .7rem; color: var(--muted); margin-top: 4px; }

/* Rate list inline editor */
.rl-table input:not([type=checkbox]) { padding: 7px 10px; }
.rl-table .rl-num { width: 100px; }
.rl-table .ur-input { font-family: var(--font-ur, inherit); }
.rl-row.rl-removed td { opacity: .45; text-decoration: line-through; }
.rl-row.rl-removed .rl-remove { opacity: 1; background: #fee2e2; }

/* ==========================================================================
   Dark theme — same tokens, darker values. Toggled with the moon button
   (html[data-theme="dark"]); print pages always stay light.
   ========================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1220;
  --surface: #161b2b;
  --surface-2: #1e2436;
  --border: #2a3147;
  --border-strong: #3a4360;
  --text: #e7eaf3;
  --text-2: #b7bfd2;
  --muted: #8b94aa;
  --primary: #8b93ff;
  --primary-600: #a5acff;
  --primary-50: rgba(139, 147, 255, .13);
  --primary-100: rgba(139, 147, 255, .24);
  --accent: #f5a524;
  --accent-50: rgba(245, 165, 36, .14);
  --success: #34d399; --success-50: rgba(52, 211, 153, .13);
  --warning: #fbbf24; --warning-50: rgba(251, 191, 36, .13);
  --danger:  #f87171; --danger-50:  rgba(248, 113, 113, .13);
  --info:    #38bdf8; --info-50:    rgba(56, 189, 248, .13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] .btn-primary { color: #0e1220; box-shadow: none; }
html[data-theme="dark"] .btn-primary:hover { color: #0e1220; }
html[data-theme="dark"] .tab.active, html[data-theme="dark"] .pager .current { color: #0e1220; }
html[data-theme="dark"] .badge-prio-fast_track { background: rgba(245, 165, 36, .16); color: #fbbf24; }
html[data-theme="dark"] .badge-prio-urgent { background: rgba(248, 113, 113, .16); color: #fca5a5; }
html[data-theme="dark"] .pay-box { background: var(--accent-50); border-color: rgba(245, 165, 36, .3); }
html[data-theme="dark"] img.garment-thumb, html[data-theme="dark"] .type-card img { background: #f3f4f8; border-radius: 10px; }
html[data-theme="dark"] .rl-row.rl-removed .rl-remove { background: rgba(248, 113, 113, .2); }
.theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
html[data-theme="dark"] .table tbody tr:hover { background: var(--surface-2); }
html[data-theme="dark"] .print-toolbar { background: var(--surface); }
html[data-theme="dark"] .alert-success { color: var(--success); border-color: rgba(52, 211, 153, .3); }
html[data-theme="dark"] .alert-error, html[data-theme="dark"] .alert-danger { color: #fca5a5; border-color: rgba(248, 113, 113, .3); }
html[data-theme="dark"] .alert-warning { color: var(--warning); border-color: rgba(251, 191, 36, .3); }
html[data-theme="dark"] .alert-info { color: var(--info); border-color: rgba(56, 189, 248, .3); }

/* ==========================================================================
   Al-Musawwir look: emerald + mint with soft gold, Cormorant Garamond
   headings, glass cards and pill buttons — the same design as the MERN app.
   ========================================================================== */
:root {
  --bg: #f7fbf8;
  --surface: #ffffff;
  --surface-2: #eef7f2;
  --border: rgba(16, 129, 85, .14);
  --border-strong: rgba(16, 129, 85, .26);
  --text: #0b231b;
  --text-2: #2f4a3f;
  --muted: #4b6157;
  --primary: #128155;
  --primary-600: #0f6444;
  --primary-50: #eaf8f1;
  --primary-100: #d2f0e2;
  --accent: #c9a227;
  --accent-50: #fbf5e1;
  --gold: #c9a227;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(16, 129, 85, .06);
  --shadow: 0 8px 32px rgba(16, 129, 85, .12);
  --shadow-lg: 0 20px 50px -20px rgba(10, 53, 39, .35);
  --font-display: 'Cormorant Garamond', Georgia, serif;
}
body { background: radial-gradient(1200px 600px at 85% -10%, rgba(30, 158, 106, .10), transparent 70%) fixed, var(--bg); }
h1, h2, .brand-name, .display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.page-head h1 { font-size: 2rem; }
.page-head h1::after { content: ''; display: block; width: 64px; height: 3px; margin-top: 8px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), transparent); }
[dir="rtl"] .page-head h1::after { background: linear-gradient(270deg, var(--gold), transparent); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] .brand-name { font-family: var(--font-ur-display); }

/* Pill buttons with the lifted shadow */
.btn { border-radius: 999px; }
.btn-sm, .btn-lg { border-radius: 999px; }
.btn-icon { border-radius: 999px; }
.btn-primary { background: var(--primary); box-shadow: 0 14px 30px -14px rgba(10, 53, 39, .55); }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { border-color: rgba(16, 129, 85, .25); }
.btn-accent { background: var(--gold); color: #2b2205; }
.btn-accent:hover { background: #a9871b; color: #fff; }

/* Glass cards */
.card, .stat {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow); border-color: var(--border);
}
.card-foot { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.stat { padding: 20px 22px; }
.stat-value { font-family: var(--font); font-weight: 800; font-size: 1.6rem; letter-spacing: -.01em; }
.stat-icon { border-radius: 16px; }
.stat-icon.amber { background: var(--accent-50); color: #a9871b; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a.stat { transition: transform .15s, box-shadow .15s; }

/* Sidebar like the MERN dashboard: solid emerald pill for the active page */
.sidebar { background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand-mark { background: linear-gradient(135deg, #1e9e6a, #0a3527) !important; box-shadow: 0 8px 20px -8px rgba(10, 53, 39, .6) !important; }
.nav a { border-radius: 14px; }
.nav a:hover { background: var(--primary-50); }
.nav a.active { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.nav a.active i { color: #fff; }
.nav-label { color: #a9871b; }
.topbar { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* Tabs and badges */
.tab { border-radius: 999px; }
.tab.active { box-shadow: var(--shadow); }
.table thead th { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
[dir="rtl"] .table thead th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.table tbody tr:hover { background: var(--primary-50); }
.modal { border-radius: 26px; }

/* Dark mode, MERN palette */
html[data-theme="dark"] {
  --bg: #08130f;
  --surface: #0f1e19;
  --surface-2: #142821;
  --border: rgba(120, 206, 163, .16);
  --border-strong: rgba(120, 206, 163, .28);
  --text: #e8f5ee;
  --text-2: #c3dccf;
  --muted: #9bb8ac;
  --primary: #1e9e6a;
  --primary-600: #37b37e;
  --primary-50: rgba(55, 179, 126, .12);
  --primary-100: rgba(55, 179, 126, .22);
  --accent: #d9b85c;
  --accent-50: rgba(217, 184, 92, .14);
  --gold: #d9b85c;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px -20px rgba(0, 0, 0, .7);
}
html[data-theme="dark"] body { background: radial-gradient(1200px 600px at 85% -10%, rgba(30, 158, 106, .14), transparent 70%) fixed, var(--bg); }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .tab.active, html[data-theme="dark"] .pager .current { color: #fff; }
html[data-theme="dark"] a { color: #6fcea3; }
html[data-theme="dark"] .nav a, html[data-theme="dark"] .btn { color: var(--text); }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-success, html[data-theme="dark"] .btn-wa, html[data-theme="dark"] .nav a.active { color: #fff; }
html[data-theme="dark"] .btn-soft { color: #6fcea3; }
html[data-theme="dark"] .table tbody tr:hover { background: var(--primary-50); }
.plan-box { background: linear-gradient(135deg, var(--primary-50), var(--accent-50)); border: 1px solid var(--border); }
.info-tile span i { margin-inline-end: 4px; }
html[data-theme="dark"] .plan-box strong { color: #6fcea3; }

/* Measurements page: per-garment counts (Al-Musawwir style) */
.m-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.m-count { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px; text-align: center; border-radius: 20px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: var(--shadow); color: var(--text); transition: transform .15s, box-shadow .15s; }
.m-count:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.m-count.active { outline: 2px solid var(--primary); }
.m-count span { color: var(--primary); font-size: .95rem; }
.m-count strong { font-family: var(--font); font-weight: 800; font-size: 1.9rem; line-height: 1.2; }
.m-count small { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.m-count.total { background: var(--primary); color: #fff; border-color: transparent; }
.m-count.total span, .m-count.total small { color: rgba(255, 255, 255, .85); }
.ur-label, .ur-title { font-family: var(--font-ur-display); }
.ur-title { font-size: 1.6rem; line-height: 2; }
.m-booking-box { margin: 0 26px 18px; padding: 14px 16px; border: 1px dashed var(--primary); border-radius: 18px; background: var(--primary-50); }
.m-row input[readonly] { background: transparent; color: var(--text-2); }

/* ==========================================================================
   Urdu in Jameel Noori Nastaleeq (the shop's own font). Uses the installed
   font when the computer has it, otherwise downloads it once.
   ========================================================================== */
@font-face {
  font-family: 'Jameel Noori Nastaleeq';
  src: local('Jameel Noori Nastaleeq'), local('Jameel Noori Nastaleeq Regular'), local('JameelNooriNastaleeq'),
       url('../fonts/JameelNooriNastaleeq.woff2') format('woff2');
  font-display: swap;
}
:root {
  --font-ur: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;
  --font-ur-display: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
}
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--font-ur); font-size: 19px; line-height: 1.9; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .brand-name { font-family: var(--font-ur-display); font-weight: 400; line-height: 1.8; }
[dir="rtl"] h1 { font-size: 2.4rem; }
[dir="rtl"] .page-head h1 { font-size: 2.3rem; }
[dir="rtl"] .card-head h3 { font-size: 1.35rem; }
[dir="rtl"] .btn { font-size: 1.05rem; font-weight: 400; line-height: 1.5; padding-block: 7px; }
[dir="rtl"] .btn-sm { font-size: .98rem; padding-block: 4px; }
[dir="rtl"] .nav a { font-size: 1.12rem; font-weight: 400; }
[dir="rtl"] .nav-label { font-size: .95rem; }
[dir="rtl"] .tab { font-size: 1.05rem; font-weight: 400; }
[dir="rtl"] .stat-label, [dir="rtl"] .muted.small, [dir="rtl"] .small { font-size: .95rem; }
[dir="rtl"] .table td, [dir="rtl"] .table th { font-size: 1.02rem; }
[dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { font-family: var(--font-ur); font-size: 1.05rem; }
[dir="rtl"] .badge { font-size: .9rem; font-weight: 400; }
[dir="rtl"] .m-row label { font-size: 1.35rem; }
.ur-label, .ur-title, .m-count span { font-family: var(--font-ur-display); }
/* Numbers, phones and amounts stay in the Latin face so they line up */
.num, .ltr, input.ltr, .stat-value, .m-count strong { font-family: var(--font); }

/* Rate list, Al-Musawwir style: one line per category */
.rl-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 130px 40px 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.rl-line input { border-radius: 14px; }
.rl-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; padding: 0 4px; }
[dir="rtl"] .rl-head { font-size: .95rem; letter-spacing: 0; text-transform: none; }
.rl-del { border: 1px solid rgba(220, 38, 38, .25); color: var(--danger); background: transparent; }
.rl-del:hover { background: var(--danger-50); color: var(--danger); }
.rl-line.rl-removed input { text-decoration: line-through; opacity: .45; }
.rl-line.rl-removed .rl-del { background: var(--danger); color: #fff; }
.rl-line.rl-off input { opacity: .6; }
.rl-empty { border: 1px dashed var(--border-strong); border-radius: 14px; padding: 22px; }
@media (max-width: 640px) { .rl-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; } .rl-line > a, .rl-line > span:empty { display: none; } .rl-head span:nth-child(n+4) { display: none; } }

/* Karigar form: own wage per rate-list item */
.wage-grid { display: grid; gap: 6px; }
.wage-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 140px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.wage-head { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; border-bottom: 0; }
[dir="rtl"] .wage-head { font-size: .95rem; text-transform: none; letter-spacing: 0; }
.wage-grid[data-role="cutter"] .w-stitch, .wage-grid[data-role="stitcher"] .w-cut { display: none; }
.wage-grid[data-role="cutter"] .wage-row, .wage-grid[data-role="stitcher"] .wage-row { grid-template-columns: minmax(0, 1fr) 160px; }
@media (max-width: 640px) { .wage-row { grid-template-columns: minmax(0, 1fr) 90px 90px; } }
.slip-modal { width: min(760px, 96vw); }

/* Mixed Urdu/English: Latin letters and digits in Plus Jakarta Sans, Urdu letters in Jameel Noori */
:root {
  --font-ur: 'Plus Jakarta Sans', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
  --font-ur-display: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
}
[dir="rtl"] body, body[dir="rtl"] { font-size: 21px; line-height: 1.85; }
[dir="rtl"] .nav a { font-size: 1.2rem; }
[dir="rtl"] .btn { font-size: 1.12rem; }
[dir="rtl"] .btn-sm { font-size: 1.02rem; }
[dir="rtl"] .small, [dir="rtl"] .muted.small, [dir="rtl"] .hint, [dir="rtl"] .sub { font-size: 1rem; }
[dir="rtl"] .card-head h3 { font-size: 1.45rem; }
[dir="rtl"] .page-head h1 { font-size: 2.6rem; }
[dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { font-size: 1.1rem; }
[dir="rtl"] .num, [dir="rtl"] .ltr, [dir="rtl"] input.ltr, [dir="rtl"] .stat-value { font-size: inherit; }

/* ==========================================================================
   Home page, Al-Musawwir style: emerald hero, garment collage, gold marquee
   ========================================================================== */
.hero-emerald { color: #e8f5ee; padding: 90px 0 110px;
  background: radial-gradient(900px 500px at 85% 10%, rgba(201, 162, 39, .18), transparent 60%),
              radial-gradient(900px 600px at 0% 100%, rgba(55, 179, 126, .25), transparent 60%),
              linear-gradient(135deg, #0a3527 0%, #0f6444 55%, #128155 100%); }
.hero-emerald::before { display: none; }
.hero-emerald h1 { color: #fff; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
.hero-emerald h1 .gold { color: #e7ce86; font-style: italic; }
[dir="rtl"] .hero-emerald h1 { line-height: 1.7; font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
[dir="rtl"] .hero-emerald h1 .gold { font-style: normal; }
.hero-emerald .lead { color: rgba(232, 245, 238, .85); }
.hero-emerald .eyebrow { background: rgba(255, 255, 255, .1); border-color: rgba(231, 206, 134, .4); color: #e7ce86; }
.hero-emerald .hero-trust { color: rgba(232, 245, 238, .9); }
.hero-emerald .hero-trust i { color: #e7ce86; }
.btn-gold { background: linear-gradient(135deg, #e7ce86, #c9a227); color: #2b2205; box-shadow: 0 14px 30px -12px rgba(201, 162, 39, .7); }
.btn-gold:hover { color: #2b2205; filter: brightness(1.05); }
.btn-glass { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.hero-art { position: relative; height: 440px; }
.garment { position: absolute; border-radius: 26px; overflow: hidden; background: linear-gradient(160deg, #f4efe0, #fff); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55); border: 4px solid rgba(255, 255, 255, .85); }
.garment img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.garment.g1 { width: 46%; height: 78%; inset-inline-end: 22%; top: 4%; z-index: 2; animation: float 6s ease-in-out infinite; }
.garment.g2 { width: 34%; height: 54%; inset-inline-end: 0; top: 30%; z-index: 1; animation: float 7s ease-in-out infinite .6s; }
.garment.g3 { width: 34%; height: 54%; inset-inline-start: 0; top: 18%; z-index: 1; animation: float 8s ease-in-out infinite 1.2s; }
.float-card { position: absolute; z-index: 3; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .95); color: #0b231b; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }
.float-card i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #eaf8f1; color: #128155; }
.float-card small { display: block; color: #4b6157; font-size: .72rem; }
.float-card strong { font-size: 1rem; }
.fc1 { top: 0; inset-inline-start: 6%; }
.fc2 { bottom: 4%; inset-inline-start: 2%; }
.fc3 { bottom: -2%; inset-inline-end: 4%; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.marquee { overflow: hidden; background: linear-gradient(90deg, #c9a227, #e7ce86, #c9a227); color: #2b2205; padding: 12px 0; margin-top: -1px; }
.marquee-track { display: flex; gap: 46px; width: max-content; animation: marquee 32s linear infinite; font-weight: 700; white-space: nowrap; }
.marquee-track i { font-size: .7rem; opacity: .7; margin-inline-end: 6px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
.garment-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.garment-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 24px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.garment-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.gc-img { width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; background: linear-gradient(160deg, #f4efe0, #eaf8f1); display: grid; place-items: center; margin-bottom: 6px; }
.gc-img img { max-height: 92%; max-width: 92%; object-fit: contain; }
.garment-card strong { font-size: 1.25rem; color: var(--primary); }
.site-footer { background: linear-gradient(160deg, #0a3527, #08130f) !important; }
.section-head .kicker { color: #a9871b; letter-spacing: .2em; }
@media (max-width: 960px) { .garment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hero-art { height: 340px; margin-top: 20px; } }
@media (max-width: 640px) { .garment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-emerald { padding: 60px 0 80px; } .float-card.fc3 { display: none; } }
@media (prefers-reduced-motion: reduce) { .garment, .marquee-track { animation: none !important; } }
.hero.hero-emerald p.lead { color: rgba(232, 245, 238, .88); font-size: 1.15rem; }
.hero-emerald { margin-top: -1rem; }
[dir="rtl"] .hero.hero-emerald p.lead { font-size: 1.35rem; }
[dir="rtl"] .hero-emerald .eyebrow, [dir="rtl"] .hero-emerald .hero-trust { font-size: 1.1rem; }

/* ==========================================================================
   Measurement sheet exactly like the Al-Musawwir (MERN) form: two columns laid
   out left-to-right, each field right-aligned Urdu with the label above an
   underlined input.
   ========================================================================== */
.m-sheet { direction: ltr; column-gap: 32px; row-gap: 14px; padding: 10px 26px 24px; }
.m-sheet > * { direction: rtl; }
[dir="ltr"] .m-sheet > * { direction: ltr; }
.m-sheet > .m-row { display: block; position: relative; border-bottom: 0; min-height: 0; padding: 0; }
.m-sheet > .m-row label { display: block; flex: none; margin: 0 0 4px; text-align: start; color: var(--muted); white-space: normal; overflow: visible;
  font-family: var(--font-ur-display); font-size: 1.3rem; font-weight: 400; line-height: 1.6; padding: 0; }
.m-sheet > .m-row input, .m-sheet > .m-row select, .m-sheet > .m-row textarea {
  width: 100%; border: 0; border-bottom: 1px solid rgba(18, 133, 91, .22); border-radius: 0; background: transparent; box-shadow: none;
  padding: 8px 4px; text-align: start; font-size: 1.05rem; transition: border-color .15s; }
.m-sheet > .m-row input:focus, .m-sheet > .m-row select:focus, .m-sheet > .m-row textarea:focus { border-bottom-color: var(--primary); box-shadow: none; background: transparent; }
.m-sheet > .m-row input.m-num, .m-sheet > .m-row input.ltr { text-align: right; }
[dir="ltr"] .m-sheet > .m-row input.m-num, [dir="ltr"] .m-sheet > .m-row input.ltr { text-align: left; }
.m-sheet > .m-row > .btn { position: absolute; inset-inline-end: 0; bottom: 4px; }
.m-sheet > .m-heading { grid-column: 1 / -1; text-align: start; margin-top: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(18, 133, 91, .3); color: var(--primary); font-family: var(--font-ur-display); font-size: 1.5rem; }
.m-sheet > .m-wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .m-sheet { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Employees, Al-Musawwir style: list + popups (form, profile, add work, view work)
   ========================================================================== */
.emp-modal { width: min(980px, 96vw); }
.emp-modal .modal-body { max-height: 78vh; overflow: auto; }
.emp-form .emp-other, .emp-form .emp-hint-other { display: none; }
.emp-form[data-role="other"] .emp-other, .emp-form[data-role="other"] .emp-hint-other { display: block; }
.emp-form[data-role="other"] .emp-hint-master, .emp-form[data-role="other"] .emp-wages { display: none; }
.emp-box { border: 1px dashed var(--primary); background: var(--primary-50); border-radius: 18px; padding: 14px 16px; }
.emp-box-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; }
[dir="rtl"] .emp-box-title { font-size: 1rem; letter-spacing: 0; text-transform: none; }
.wage-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.wage-card { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.wage-card .ur-label { color: var(--text-2); text-align: end; }
.wage-card input { margin-top: 4px; }
.wage-card.view { text-align: center; align-items: center; }
.wage-card.view strong { color: var(--primary); }
.emp-hero { display: flex; gap: 18px; align-items: center; padding: 24px; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #1e9e6a, #0f6444); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.emp-avatar { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; background: rgba(255, 255, 255, .2); flex: none; }
.emp-name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
[dir="rtl"] .emp-name { font-family: var(--font-ur-display); line-height: 1.8; }
.emp-pill { display: inline-block; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: .78rem; font-weight: 600; }
.emp-pill.soft { background: rgba(255, 255, 255, .12); }
.emp-pill.off { background: rgba(0, 0, 0, .25); }
.emp-info { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; }
.emp-info small { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
[dir="rtl"] .emp-info small { font-size: .9rem; text-transform: none; letter-spacing: 0; }
.emp-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.emp-assign-head { text-align: center; border: 1px dashed var(--primary-100); border-radius: 18px; padding: 14px; }
.emp-phase { display: inline-block; padding: 3px 12px; border-radius: 99px; border: 1px solid var(--primary); background: var(--primary-50); color: var(--primary); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
[dir="rtl"] .emp-phase { font-size: .95rem; text-transform: none; letter-spacing: 0; }
.emp-name-lg { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.bk-pick { max-height: 190px; overflow: auto; border: 1px solid var(--border); border-radius: 14px; padding: 6px; display: grid; gap: 4px; }
.bk-chip { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; color: var(--text); cursor: pointer; text-align: start; }
.bk-chip:hover { background: var(--primary-50); }
.bk-chip.on { background: var(--primary-50); color: var(--primary); }
.bk-chip small { margin-inline-start: auto; }
.bk-chip small.late { color: var(--danger); font-weight: 700; }
.bk-box { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border-strong); display: grid; place-items: center; color: transparent; font-size: .65rem; flex: none; }
.bk-chip.on .bk-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.bk-items { border: 1px solid var(--border); border-radius: 16px; padding: 12px; margin-top: 10px; }
.it-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.it-line.on { border-color: var(--primary); background: var(--primary-50); }
.it-line .it-qty { width: 84px; text-align: center; font-weight: 700; }
.emp-total { margin-top: 12px; text-align: center; border: 1px dashed var(--primary); background: var(--primary-50); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.emp-total strong { font-size: 1.9rem; color: var(--primary); }
.select-all { display: inline-flex; gap: 8px; align-items: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; cursor: pointer; }
[dir="rtl"] .select-all { font-size: .95rem; text-transform: none; letter-spacing: 0; }
.emp-scroll { max-height: 22rem; overflow: auto; border: 1px solid var(--border); border-radius: 14px; }
.adv-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.adv-line { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; cursor: pointer; }
.emp-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; border: 1px dashed var(--primary); background: var(--primary-50); border-radius: 18px; padding: 14px; }
.emp-summary small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
[dir="rtl"] .emp-summary small { font-size: .95rem; text-transform: none; letter-spacing: 0; }
.emp-summary strong { font-size: 1.35rem; }
.emp-archive { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; }
.emp-archive summary { cursor: pointer; text-align: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); list-style: none; }
[dir="rtl"] .emp-archive summary { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.emp-archive[open] summary { margin-bottom: 10px; color: var(--primary); }
@media (max-width: 640px) { .adv-row, .emp-summary { grid-template-columns: minmax(0, 1fr); } }
.modal.emp-modal { width: min(980px, 96vw); max-width: min(980px, 96vw); }
.modal.slip-modal { width: min(760px, 96vw); max-width: min(760px, 96vw); }

.new-booking-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1e9e6a, #0f6444); box-shadow: var(--shadow-lg); }
.new-booking-bar i.fa-circle-check { color: #e7ce86; }

/* Home page photos: hero background, step cards, CTA background */
.hero-photo { background:
    linear-gradient(115deg, rgba(10, 53, 39, .96) 0%, rgba(15, 100, 68, .9) 45%, rgba(18, 129, 85, .72) 100%),
    var(--hero-img) center / cover no-repeat; }
.craft { background: linear-gradient(180deg, transparent, var(--primary-50)); }
.craft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.craft-card { position: relative; border-radius: 28px; overflow: hidden; min-height: 380px; box-shadow: var(--shadow-lg); isolation: isolate; }
.craft-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; z-index: -2; }
.craft-card:hover img { transform: scale(1.07); }
.craft-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 19, 15, .05) 20%, rgba(8, 19, 15, .55) 55%, rgba(10, 53, 39, .95) 100%); }
.craft-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; color: #fff; }
.craft-n { position: absolute; top: 18px; inset-inline-start: 22px; font-family: var(--font); font-size: 2.6rem; font-weight: 700; color: rgba(231, 206, 134, .9); line-height: 1; }
.craft-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #e7ce86; margin-bottom: 10px; font-size: 1.2rem; }
.craft-overlay h3 { color: #fff; font-size: 1.5rem; margin: 0 0 4px; font-family: var(--font-display); }
[dir="rtl"] .craft-overlay h3 { font-family: var(--font-ur-display); font-size: 1.7rem; }
.craft-overlay p { color: rgba(232, 245, 238, .85); margin: 0; }
.craft-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.craft-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 12px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow); text-align: center; }
.craft-stats i { color: #a9871b; font-size: 1.3rem; margin-bottom: 4px; }
.craft-stats strong { font-family: var(--font); font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.craft-stats span { color: var(--muted); font-size: .9rem; }
.cta-photo { background:
    linear-gradient(120deg, rgba(10, 53, 39, .95), rgba(18, 129, 85, .82)),
    var(--cta-img) center / cover no-repeat !important; }
@media (max-width: 960px) { .craft-grid { grid-template-columns: minmax(0, 1fr); } .craft-card { min-height: 300px; } .craft-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Bilingual name box: main text, the other language underneath */
.bi-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bi-field .bi-main { width: 100%; }
.bi-alt { display: flex; align-items: center; gap: 6px; padding: 0 4px; margin: 0; cursor: text; font-weight: 400; }
.bi-alt .bi-lang { flex: none; font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-family: var(--font); }
.bi-alt input { flex: 1; min-width: 0; border: 0 !important; border-bottom: 1px dashed transparent !important; background: transparent !important; box-shadow: none !important; padding: 0 2px !important; height: 22px; min-height: 0; font-size: .82rem; color: var(--muted); border-radius: 0 !important; }
.bi-alt input:focus { border-bottom-color: var(--primary) !important; color: var(--text); outline: none; }
.bi-busy .bi-lang { animation: biPulse 1s ease-in-out infinite; }
@keyframes biPulse { 50% { opacity: .35; } }
.rl-line { grid-template-columns: minmax(0, 2.4fr) 130px 40px 40px; align-items: start; }
.rl-line > input, .rl-line > a, .rl-line > label, .rl-line > span { margin-top: 0; }
.field-row, .field-head { grid-template-columns: 28px minmax(0, 2fr) 120px 1.6fr 70px 40px; }
.field-row { align-items: start; }
@media (max-width: 640px) { .rl-line { grid-template-columns: minmax(0, 1fr) 90px; } .rl-head span:nth-child(n+3) { display: none; } }
@media (max-width: 900px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row .bi-field { grid-column: 1 / -1; } }
