
:root {
  --forest: #303B2B;
  --forest-login: #164E4A; /* کله‌غازی — login shell */
  --copper: #A9734D;
  --paper: #FDFDFD;
  --white: #FFFFFF;
  --cream: #F7F4EF;
  --ink: #303B2B;
  --muted: #6a7264;
  --line: #e4e0d8;
  --accent: #A9734D;
  --accent-soft: #F7F4EF;
  --warn: #b45309;
  --danger: #b91c1c;
  --live: #2f7d4a;
  --transit: #c47a1a;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(48, 59, 43, .07);
  --glass-bg: rgba(253, 253, 253, .72);
  --glass-bg-strong: rgba(253, 253, 253, .86);
  --glass-border: rgba(228, 224, 216, .7);
  --glass-blur: 14px;
  --font: Vazirmatn, Tahoma, sans-serif;
  --display: Estedad, Vazirmatn, Tahoma, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin:0; font-family:var(--font); color:var(--ink); line-height:1.7; min-height:100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(169,115,77,.10), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, rgba(48,59,43,.08), transparent 50%),
    linear-gradient(180deg, #f7f4ef 0%, var(--paper) 38%, #f4f1ea 100%);
  background-attachment: fixed;
}
a { color:var(--forest); text-decoration:none; }
a:hover { color:var(--copper); text-decoration:none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
img { max-width:100%; height:auto; display:block; }
.container { width:min(1100px, calc(100% - 2rem)); margin-inline:auto; }
.site-header {
  background: var(--glass-bg-strong);
  border-bottom:1px solid var(--glass-border);
  position:sticky; top:0; z-index:40;
  backdrop-filter: saturate(1.2) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(1.2) blur(var(--glass-blur));
}
.site-header::after { content:""; display:block; height:1px; background:linear-gradient(90deg, transparent, var(--copper), transparent); opacity:.55; }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:1.25rem; padding:1rem 0; }
.brand { display:flex; align-items:center; color:var(--forest); }
.brand-logo { height:40px; width:auto; display:block; }
.nav { display:flex; gap:.9rem; flex-wrap:wrap; align-items:center; }
.nav a, .nav button.linkish { color:var(--muted); font-size:.95rem; background:none; border:0; cursor:pointer; font-family:inherit; }
.nav a:hover, .nav button.linkish:hover { color:var(--copper); }
.nav-badge {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:1.25rem; height:1.25rem; padding:0 .35rem;
  border-radius:999px; background:var(--copper); color:var(--cream);
  font-size:.7rem; font-weight:800; vertical-align:middle; margin-right:.15rem;
}
.btn { display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:10px; padding:.75rem 1.2rem; font-family:inherit; font-weight:600; cursor:pointer; background:var(--forest); color:var(--cream); gap:.35rem; }
.btn:hover { background:#263022; color:var(--cream); text-decoration:none; }
.btn-secondary { background:var(--white); color:var(--forest); border:1px solid var(--line); }
.btn-secondary:hover { border-color:var(--copper); color:var(--forest); background:var(--white); }
.btn-danger { background:var(--danger); color:#fff; }
.btn-confirm { background:#1f6b3a; color:#fff; font-size:1.05rem; padding:.9rem 1.4rem; box-shadow:0 8px 24px rgba(31,107,58,.25); }
.btn-confirm:hover { background:#185530; color:#fff; }
.btn-sm { padding:.4rem .75rem; font-size:.85rem; border-radius:8px; }
.btn-block { width:100%; }
.flash { border-radius:12px; padding:.85rem 1rem; margin:1rem 0; border:1px solid; animation: flashIn .35s ease; }
.flash-success { background:#f3f7f2; border-color:#c5d4bf; color:var(--forest); }
.flash-error { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
@keyframes flashIn { from { opacity:0; transform:translateY(-4px);} to { opacity:1; transform:none;} }

.auth-shell { min-height:calc(100vh - 5.5rem); display:grid; place-items:center; padding:2rem 1rem 3rem; background:var(--paper); }
@media (min-width:960px) {
  .auth-shell { background:var(--forest-login); padding:3.5rem 1.5rem 4rem; }
}
.auth-card-wrap { display:grid; place-items:center; width:100%; }
.auth-card {
  width:min(420px,100%);
  background: var(--glass-bg-strong);
  border:1px solid var(--glass-border);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:2rem 1.6rem 1.75rem;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
@media (min-width:960px) {
  .auth-card { border-color:transparent; }
}
.auth-card-logo { height:40px; width:auto; margin:0 auto 1.35rem; }
.auth-card h2,
h1, h2, h3,
.page-title,
.card-title,
.invoice-title,
table.data th {
  font-family: var(--display);
  letter-spacing: .02em;
  font-weight: 800;
}
.auth-card h2 { margin:0 0 .35rem; font-size:1.35rem; color:var(--forest); }
.page-title {
  margin:0 0 1.15rem; font-size:1.55rem; color:var(--forest);
  padding-bottom:.55rem; position:relative;
}
.page-title::after {
  content:""; display:block; width:3.2rem; height:2px; margin-top:.45rem;
  background: linear-gradient(90deg, var(--copper), transparent);
  border-radius:2px;
}
.card-title { margin:0 0 .75rem; font-size:1.1rem; color:var(--forest); }
.auth-card .sub { color:var(--muted); margin-bottom:1.35rem; font-size:.92rem; }
label { display:block; font-size:.9rem; margin-bottom:.35rem; color:var(--muted); }
input, select, textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:.75rem .9rem; font-family:inherit; font-size:1rem; background:var(--white); color:var(--ink); }
input:focus, select:focus, textarea:focus { outline:2px solid rgba(169,115,77,.35); border-color:var(--copper); }
.form-group { margin-bottom:1rem; }
.form-row { display:grid; gap:.75rem; }
@media (min-width:640px) { .form-row.two { grid-template-columns:1fr 1fr; } }
.page { padding:1.75rem 0 2.75rem; }
.card {
  background: var(--glass-bg);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:1.15rem;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
}
.table-wrap { overflow-x:auto; }
table.data { width:100%; border-collapse:collapse; min-width:640px; background:transparent; }
table.data th, table.data td { border-bottom:1px solid var(--line); padding:.8rem .65rem; text-align:right; vertical-align:middle; }
table.data th { font-size:.85rem; color:var(--muted); background:rgba(247,244,239,.85); }
.lot-name { font-weight:700; color:var(--forest); cursor:pointer; background:none; border:0; font-family:inherit; padding:0; text-align:right; }
.lot-name:hover { color:var(--copper); text-decoration:none; }
.muted { color:var(--muted); font-size:.9rem; }
.rate-bar {
  display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; align-items:center;
  background: rgba(247,244,239,.75);
  border:1px solid var(--glass-border);
  border-top:1px solid rgba(169,115,77,.55);
  border-radius:14px; padding:1rem 1.1rem; margin-bottom:1.15rem;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 8px 24px rgba(48,59,43,.04);
}
.badge { display:inline-block; padding:.2rem .55rem; border-radius:999px; font-size:.78rem; font-weight:700; }
.badge-pending { background:#fff7ed; color:#9a3412; }
.badge-awaiting { background:#eef6ff; color:#1d4ed8; }
.badge-paid { background:#f3f7f2; color:var(--forest); }
.badge-expired { background:#fef2f2; color:#b91c1c; }
.badge-rejected, .badge-cancelled { background:#f3f4f6; color:#374151; }
.badge-refunded { background:#eff6ff; color:#1d4ed8; }
.badge-delivered { background:#f3f7f2; color:var(--forest); }

.pulse-badge { display:inline-flex; align-items:center; gap:.35rem; font-size:.8rem; font-weight:700; }
.pulse-badge .eta { font-weight:500; color:var(--muted); margin-right:.25rem; }
.pulse-dot {
  width:10px; height:10px; border-radius:50%; background:var(--live);
  box-shadow:0 0 0 0 rgba(47,125,74,.55);
  animation: pulseLive 1.6s infinite;
}
.pulse-dot.amber {
  background:var(--transit);
  box-shadow:0 0 0 0 rgba(196,122,26,.55);
  animation: pulseAmber 1.6s infinite;
}
@keyframes pulseLive {
  0% { box-shadow:0 0 0 0 rgba(47,125,74,.55); }
  70% { box-shadow:0 0 0 8px rgba(47,125,74,0); }
  100% { box-shadow:0 0 0 0 rgba(47,125,74,0); }
}
@keyframes pulseAmber {
  0% { box-shadow:0 0 0 0 rgba(196,122,26,.55); }
  70% { box-shadow:0 0 0 8px rgba(196,122,26,0); }
  100% { box-shadow:0 0 0 0 rgba(196,122,26,0); }
}

.lot-filters .chip {
  background: rgba(253,253,253,.55);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lot-filters { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; }
.chip {
  padding:.4rem .9rem; border-radius:999px; border:1px solid var(--line);
  background:var(--white); color:var(--muted); font-weight:600; font-size:.9rem;
}
.chip.active, .chip:hover,
.lot-filters .chip.active, .lot-filters .chip:hover {
  background:var(--forest); color:var(--cream); border-color:var(--forest);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}

.lot-cards {
  display:grid; gap:1rem;
  grid-template-columns:1fr;
}
@media (min-width:640px) {
  .lot-cards { grid-template-columns:repeat(2, 1fr); }
}
@media (min-width:960px) {
  .lot-cards { grid-template-columns:repeat(3, 1fr); }
}
.lot-card-head { display:flex; justify-content:space-between; gap:.75rem; align-items:flex-start; margin-bottom:.35rem; }
.lot-card-meta { margin-bottom:.65rem; }
.lot-card-stats { display:flex; justify-content:space-between; gap:1rem; margin-bottom:.75rem; }
.lot-card-stats strong { display:block; font-size:1.05rem; }
.lot-card-preview { font-size:.95rem; padding-top:.35rem; border-top:1px dashed var(--line); }

/* Mobile: stacked cards; Desktop: clean table (no horizontal drag needed on either) */
.lot-table-desktop { display:none; }
@media (min-width:900px) {
  .lot-table-desktop { display:block; margin-bottom:1rem; }
  .lot-cards { display:none; }
}

.modal-backdrop { position:fixed; inset:0; background:rgba(48,59,43,.45); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); display:none; align-items:center; justify-content:center; z-index:100; padding:1rem; }
.modal-backdrop.open { display:flex; }
.modal { width:min(720px,100%); max-height:min(90vh,900px); overflow:auto; background:var(--white); border-radius:16px; box-shadow:0 20px 60px rgba(48,59,43,.22); }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:1rem 1.1rem; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--white); }
.modal-body { padding:1rem 1.1rem 1.4rem; }
.modal-close { width:36px; height:36px; border-radius:10px; border:1px solid var(--line); background:var(--white); cursor:pointer; font-size:1.2rem; color:var(--forest); }
.gallery { display:grid; gap:.75rem; }
@media (min-width:700px) { .gallery { grid-template-columns:1fr 1fr; } }
.gallery img { border-radius:12px; border:1px solid var(--line); width:100%; object-fit:cover; }
.invoice { background:var(--white); border:1px solid var(--line); border-radius:16px; padding:1.25rem; }
.invoice-head { display:grid; gap:.75rem; align-items:start; margin-bottom:1rem; padding-bottom:1rem; border-bottom:1px solid var(--copper); }
@media (min-width:800px) { .invoice-head { grid-template-columns:1fr auto 1fr; } }
.invoice-logo { height:40px; width:auto; }
.invoice-title { text-align:center; font-size:1.4rem; color:var(--forest); }
.party-grid { display:grid; gap:.75rem; margin-bottom:1rem; }
@media (min-width:800px) { .party-grid { grid-template-columns:1fr 1fr; } }
.party { border:1px solid var(--line); border-radius:12px; padding:.85rem; background:var(--paper); }
.party h3 { margin:0 0 .5rem; font-size:.95rem; color:var(--muted); }
.line-thumb { width:48px; height:48px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.bank-box { margin-top:1rem; border:1px dashed var(--copper); border-radius:12px; padding:1rem; background:var(--cream); }
.bank-box-prominent { border-width:2px; border-style:solid; box-shadow:0 8px 24px rgba(169,115,77,.12); }
.note-valid { font-size:.9rem; color:var(--warn); margin-top:.5rem; }
.status-expired-text { color:var(--danger); font-weight:800; }
.tabs { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; }
.tab { padding:.55rem 1rem; border-radius:999px; border:1px solid var(--line); background:var(--white); color:var(--muted); font-weight:600; }
.tab.active { background:var(--forest); color:var(--cream); border-color:var(--forest); }
.admin-nav { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; }
.stat-grid { display:grid; gap:.75rem; grid-template-columns:repeat(2,1fr); margin-bottom:1rem; }
@media (min-width:800px) { .stat-grid { grid-template-columns:repeat(4,1fr); } }
.stat { background:var(--white); border:1px solid var(--line); border-radius:12px; padding:1.1rem; }
.stat .n { font-size:1.6rem; font-weight:800; color:var(--forest); font-family:var(--display); }
.stat .l { color:var(--muted); font-size:.85rem; }
.site-footer { border-top:1px solid var(--line); margin-top:1rem; }
.site-footer::before { content:""; display:block; height:1px; background:var(--copper); opacity:.45; }
.footer-inner { display:flex; flex-direction:column; align-items:center; gap:.85rem; padding:1.6rem 1rem 2.2rem; }
.footer-logo { height:72px; width:auto; display:block; }
.footer-note { text-align:center; color:var(--muted); font-size:.85rem; padding:0; letter-spacing:.01em; margin:0; }
.footer-note a { color:var(--forest); }
.footer-note a:hover { color:var(--copper); }
.footer-sep { margin:0 .45rem; color:var(--copper); }
.footer-cta { margin:0; font-size:.9rem; font-weight:700; }
.footer-cta a { color:var(--copper); }
.footer-cta a:hover { color:var(--forest); }

.tg-chip {
  display:inline-flex; align-items:stretch; text-decoration:none;
  background: rgba(253,253,253,.58);
  color: var(--forest);
  border-radius: 14px; overflow:hidden;
  min-width:min(268px, 86vw);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 28px rgba(22,78,74,.14), inset 0 1px 0 rgba(255,255,255,.65);
  backdrop-filter: saturate(1.25) blur(16px);
  -webkit-backdrop-filter: saturate(1.25) blur(16px);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tg-chip:hover { color: var(--forest); transform:translateY(-1px); text-decoration:none;
  box-shadow: 0 14px 32px rgba(22,78,74,.18), inset 0 1px 0 rgba(255,255,255,.7); }
.tg-chip-icon { display:flex; align-items:center; padding:8px 4px 8px 10px; }
.tg-chip-icon svg {
  display:block; width:28px; height:28px; border-radius:50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 4px rgba(15,40,36,.12), inset 0 0 0 1px rgba(36,161,222,.25);
}
.tg-chip-text { display:flex; flex-direction:column; justify-content:center; gap:1px; padding:6px 8px 6px 4px; flex:1; text-align:left; }
.tg-chip-text strong { font-size:13.5px; font-weight:700; color:var(--forest); line-height:1.2; }
.tg-chip-text span { font-size:11px; color:var(--muted); font-weight:500; }
.tg-chip-mark {
  background: rgba(255,255,255,.72);
  width:58px; display:flex; align-items:center; justify-content:center;
  padding:6px 8px; border-inline-start:1px solid rgba(228,224,216,.55);
}
.tg-chip-mark img { height:32px; width:auto; display:block; }
.footer-cta { display:none; }

/* Control-center style guest nav pills */
.nav-pill {
  display:inline-flex; align-items:center; gap:.65rem;
  padding: .28rem .85rem .28rem .28rem;
  border-radius: 999px;
  text-decoration:none !important;
  color: var(--forest) !important;
  background: rgba(253,253,253,.55);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 18px rgba(22,78,74,.10), inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  max-width: 100%;
}
.nav-pill:hover {
  color: var(--forest) !important;
  transform: translateY(-1px);
  background: rgba(253,253,253,.78);
  box-shadow: 0 10px 24px rgba(22,78,74,.14), inset 0 1px 0 rgba(255,255,255,.8);
}
.nav-pill-icon {
  width: 34px; height: 34px; border-radius: 50%; flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.88);
  color: var(--forest-login, #164E4A);
  box-shadow: 0 1px 3px rgba(15,40,36,.12), inset 0 0 0 1px rgba(22,78,74,.08);
}
.nav-pill-copper .nav-pill-icon { color: var(--copper); box-shadow: 0 1px 3px rgba(169,115,77,.18), inset 0 0 0 1px rgba(169,115,77,.16); }
.nav-pill-copy { display:flex; flex-direction:column; align-items:flex-start; line-height:1.15; padding-inline-end:.15rem; min-width:0; }
.nav-pill-copy strong { font-size:.82rem; font-weight:800; letter-spacing:.01em; white-space:nowrap; }
.nav-pill-copy span { font-size:.68rem; color:var(--muted); font-weight:500; white-space:nowrap; }
@media (max-width:640px) {
  .nav { gap:.45rem; justify-content:flex-end; }
  .nav-pill { padding:.22rem .55rem .22rem .22rem; gap:.45rem; }
  .nav-pill-icon { width:30px; height:30px; }
  .nav-pill-copy strong { font-size:.75rem; }
  .nav-pill-copy span { display:none; }
}
@media (min-width:960px) {
  .auth-shell .nav-pill, body.auth-page .site-header .nav {
    /* guest on login: airy header pills */
  }
  body.auth-page .header-inner { padding:1.15rem 0; }
  body.auth-page .nav-pill {
    background: rgba(253,253,253,.22);
    border-color: rgba(255,255,255,.28);
    color: #F7F4EF !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.25);
  }
  body.auth-page .nav-pill:hover {
    background: rgba(253,253,253,.34);
    color: #fff !important;
  }
  body.auth-page .nav-pill-copy strong { color: #FDFDFD; }
  body.auth-page .nav-pill-copy span { color: rgba(247,244,239,.72); }
  body.auth-page .nav-pill-icon {
    background: rgba(255,255,255,.92);
  }
  body.auth-page .site-header {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.auth-page .site-header::after { opacity:.25; }
}

.address-map { height:260px; border-radius:12px; border:1px solid var(--line); z-index:1; }
.mini-map { height:140px; border-radius:10px; border:1px solid var(--line); margin-top:.5rem; z-index:1; }

.empty-state {
  text-align:center; padding:2.5rem 1.25rem; background:var(--white);
  border:1px dashed var(--line); border-radius:var(--radius); margin:1rem 0;
}
.empty-icon { font-size:2rem; margin-bottom:.5rem; }
.empty-msg { font-family:var(--display); font-weight:700; color:var(--forest); margin:.25rem 0; }

@media print {
  .site-header, .site-footer, .no-print, .footer-note { display:none !important; }
  body { background:#fff; }
  .invoice { box-shadow:none; border:0; }
}

/* v3 */
.wh-badge {
  display:inline-block; padding:.15rem .45rem; border-radius:999px;
  background:#eef2ff; color:#3730a3; font-size:.75rem; font-weight:700;
}
.partner-price { color: var(--forest, #303B2B); }
.qr-wrap { margin-top:.5rem; }
.qr-wrap img.qr-code { display:block; border:1px solid #e5e7eb; border-radius:8px; background:#fff; padding:4px; }
@media print {
  .qr-wrap img.qr-code { border:0; }
}


/* Mild Apple-style glass — keep solid fallbacks for older/Iran browsers */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header, .card, .rate-bar, .auth-card, .tg-chip, .nav-pill { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .rate-bar { background: var(--cream); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .card, .rate-bar, .auth-card, .lot-filters .chip {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--white);
  }
  .rate-bar { background: var(--cream); }
  body { background: var(--paper); background-attachment: scroll; }
}
@media (max-width: 640px) {
  /* lighter blur on phones */
  .site-header { --glass-blur: 10px; }
  .card, .rate-bar { backdrop-filter: blur(8px) saturate(1.05); -webkit-backdrop-filter: blur(8px) saturate(1.05); }
}


.ship-panel {
  border: 1px solid rgba(169,115,77,.45);
  border-right: 4px solid var(--copper);
  background: rgba(247,244,239,.9);
}
.ship-panel-badge {
  display:inline-block;
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.02em;
  color:var(--cream);
  background:var(--copper);
  border-radius:999px;
  padding:.2rem .7rem;
  margin-bottom:.65rem;
}


/* Invoice totals + seal */
.invoice-foot {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: end;
}
@media (max-width: 720px) {
  .invoice-foot { grid-template-columns: 1fr; }
}
.invoice-totals { margin: 0; }
.invoice-totals th {
  width: 38%;
  text-align: right;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
}
.invoice-totals td { text-align: left; }
.invoice-total-row th, .invoice-total-row td {
  color: var(--forest);
  font-size: 1.05rem;
  border-top: 2px solid var(--line);
}
.invoice-seal { text-align: center; min-width: 160px; }
.invoice-stamp {
  width: 148px; height: auto; margin: 0 auto;
  opacity: .92;
  filter: drop-shadow(0 2px 6px rgba(48,59,43,.12));
}
.invoice-seal-cap {
  margin-top: .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: .02em;
}
.invoice-seal-placeholder {
  width: 148px; height: 148px; margin: 0 auto;
  border: 1.5px dashed rgba(169,115,77,.45);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: .78rem; text-align: center; line-height: 1.35;
  background: rgba(253,253,253,.4);
}
.invoice-seal-placeholder span { font-size: .68rem; color: var(--copper); margin-top: .2rem; }


.invoice-sign-block { margin-bottom: .55rem; }
.invoice-sign-label { font-size: .72rem; color: var(--muted); margin-bottom: .25rem; }
.invoice-sign-line {
  width: 150px; height: 42px; margin: 0 auto;
  border-bottom: 1.5px solid rgba(48,59,43,.35);
}
.invoice-seal-logo {
  display: block; width: 168px; height: auto; margin: .35rem auto 0;
  opacity: .9;
  filter: drop-shadow(0 1px 3px rgba(48,59,43,.1));
}
.invoice-stamp { /* legacy circular stamp kept if referenced */ }

.invoice-seal-logo {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.invoice-seal-note {
  margin-top: .35rem;
  max-width: 210px;
  margin-inline: auto;
  font-size: .62rem;
  line-height: 1.35;
  color: var(--muted);
}

.map-search { position: relative; margin-bottom: .65rem; }
.map-search-row { display: flex; gap: .45rem; align-items: center; }
.map-search-row input[type="search"] {
  flex: 1; margin: 0; border-radius: 10px;
  border: 1px solid var(--line); padding: .65rem .85rem;
  font-family: inherit; background: var(--white);
}
.map-search-results {
  list-style: none; margin: .35rem 0 0; padding: 0;
  position: absolute; z-index: 500; left: 0; right: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  max-height: 220px; overflow: auto;
}
.map-search-results li button {
  display: block; width: 100%; text-align: right;
  background: none; border: 0; padding: .7rem .85rem;
  font-family: inherit; font-size: .86rem; color: var(--forest);
  cursor: pointer; border-bottom: 1px solid var(--line);
}
.map-search-results li:last-child button { border-bottom: 0; }
.map-search-results li button:hover { background: var(--cream); color: var(--copper); }
.map-search-empty { padding: .75rem .85rem; color: var(--muted); font-size: .85rem; }


/* Catalog affordance — make lot photos obviously tappable */
.lot-title-row { display:flex; flex-wrap:wrap; gap:.5rem .65rem; align-items:center; }
.lot-title-text { font-weight:700; color:var(--forest); line-height:1.35; }
.btn-catalog {
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  border:1.5px solid rgba(169,115,77,.55);
  background: linear-gradient(180deg, #fff, #f7f4ef);
  color: var(--forest);
  font-weight:800; font-size:.82rem; letter-spacing:.01em;
  padding:.4rem .9rem; border-radius:999px;
  cursor:pointer; font-family:inherit;
  box-shadow: 0 4px 14px rgba(48,59,43,.07);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-catalog::before { content:"◎"; color:var(--copper); font-size:.95em; }
.btn-catalog:hover, .btn-catalog:focus-visible {
  background: var(--forest); color:#f7f4ef; border-color:var(--forest);
  transform: translateY(-1px);
}
.btn-catalog:hover::before, .btn-catalog:focus-visible::before { color:#e8c4a8; }
.btn-catalog-block {
  width:100%; margin:.7rem 0 .35rem; padding:.75rem 1rem; font-size:.95rem;
}
.chip-catalog {
  border-color: rgba(169,115,77,.45) !important;
  color: var(--forest) !important;
  font-weight:800 !important;
}
.modal-kicker {
  font-size:.75rem; font-weight:800; color:var(--copper);
  letter-spacing:.04em; margin-bottom:.2rem;
}


/* —— Shamsi preferred ship date chips —— */
.ship-date-picker { margin-bottom:.85rem; }
.ship-date-chips {
  display:flex;
  gap:.45rem;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:.35rem .1rem .55rem;
  margin:0 -.15rem .55rem;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
}
.ship-date-chip {
  flex:0 0 auto;
  scroll-snap-align:start;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-width:4.4rem;
  padding:.45rem .65rem;
  border-radius:999px;
  border:1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: saturate(1.15) blur(10px);
  -webkit-backdrop-filter: saturate(1.15) blur(10px);
  color: var(--forest);
  font-family:inherit;
  font-weight:700;
  cursor:pointer;
  line-height:1.15;
  box-shadow: 0 1px 2px rgba(22,78,74,.06);
  transition: border-color .15s, background .15s, color .15s, transform .12s;
}
.ship-date-chip:hover {
  border-color: rgba(169,115,77,.55);
  transform: translateY(-1px);
}
.ship-date-chip.is-selected {
  background: linear-gradient(160deg, #1a5c57 0%, var(--forest) 100%);
  border-color: transparent;
  color: var(--cream);
  box-shadow: 0 6px 16px rgba(22,78,74,.22);
}
.ship-date-chip-wd {
  font-size:.68rem;
  font-weight:600;
  opacity:.78;
  white-space:nowrap;
}
.ship-date-chip.is-selected .ship-date-chip-wd { opacity:.9; color:#e8c4a8; }
.ship-date-chip-day {
  font-size:.92rem;
  font-weight:800;
  white-space:nowrap;
}
.ship-date-more { margin-bottom:.45rem; }
.ship-date-custom {
  margin:.35rem 0 .5rem;
  padding:.75rem;
  border-radius:12px;
  border:1px solid var(--glass-border);
  background: var(--glass-bg);
}
.ship-date-custom-row {
  display:grid;
  grid-template-columns:1fr 1.2fr 1fr;
  gap:.5rem;
}
.ship-date-custom-field {
  display:flex;
  flex-direction:column;
  gap:.25rem;
  font-size:.8rem;
  font-weight:600;
  color:var(--muted, #5a635c);
}
.ship-date-custom-field select { width:100%; }
.ship-date-hint { margin:.15rem 0 0; font-size:.8rem; }
.mini { font-size:.8rem; }
@media (max-width:480px) {
  .ship-date-chip { min-width:4rem; padding:.4rem .55rem; }
  .ship-date-custom-row { grid-template-columns:1fr; }
}

/* Partner ledger + settle form (admin) */
.ledger-owed { color: #b91c1c; font-weight: 700; }
.ledger-paid { color: #15803d; font-weight: 700; }
.ledger-zero { color: inherit; font-weight: 600; }
.ledger-balance-table {
  width: 100%;
  max-width: 28rem;
  border-collapse: collapse;
  margin: .5rem 0 .75rem;
  font-size: .92rem;
}
.ledger-balance-table caption {
  text-align: right;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: .35rem;
  caption-side: top;
}
.ledger-balance-table th,
.ledger-balance-table td {
  border-bottom: 1px solid var(--line);
  padding: .45rem .35rem;
  text-align: right;
  vertical-align: middle;
}
.ledger-balance-table th {
  font-weight: 500;
  color: var(--muted);
  width: 60%;
}
.ledger-balance-table td { font-variant-numeric: tabular-nums; }
.ledger-stat-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  margin: .5rem 0 .75rem;
}
@media (min-width: 640px) {
  .ledger-stat-strip { grid-template-columns: repeat(3, 1fr); }
}
.ledger-stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .7rem;
  background: rgba(247,244,239,.55);
}
.ledger-stat .muted { display: block; margin-bottom: .2rem; font-size: .8rem; }
.settle-form {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: .85rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247,244,239,.4);
}
.settle-form .form-group { margin-bottom: 0; }
.settle-form input[type="text"],
.settle-form input[type="file"],
.settle-form input:not([type]) {
  min-height: 2.75rem;
  height: auto;
  box-sizing: border-box;
}
.settle-form input[type="file"] {
  padding: .45rem .65rem;
  font-size: .88rem;
  background: var(--white);
  cursor: pointer;
}
.settle-form-actions {
  display: flex;
  justify-content: flex-start; /* RTL: start = right */
  margin-top: .15rem;
}
.partner-card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.settlement-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}


/* EARLD UX: mobile login visibility */
#mobile,
input.mobile-visible {
  direction: ltr;
  text-align: left;
  font-size: 1.45rem;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--forest);
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  font-weight: 700;
}
.mobile-echo {
  direction: ltr;
  text-align: left;
  display: block;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--forest);
  font-weight: 700;
  min-height: 1.4em;
  margin: 0.25rem 0 0.15rem;
}
.auth-card .sub .mobile-echo {
  display: inline;
  font-size: 1.15rem;
}
.mobile-hint {
  font-size: 0.82rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.badge-telegram {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(169, 115, 77, 0.16);
  color: var(--forest);
  border: 1px solid rgba(169, 115, 77, 0.45);
  margin-right: 0.35rem;
  vertical-align: middle;
}
