﻿@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Vazirmatn-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Vazirmatn-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Vazirmatn-Bold.woff2") format("woff2");
}

:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #10203a;
  --muted: #55657c;
  --line: #e3e8f0;
  --brand: #134e7f;
  --brand-2: #1d6fb8;
  --accent: #f39c12;
  --ok: #12805c;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 58, .06), 0 8px 24px rgba(16, 32, 58, .06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, "Iranian Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; padding-inline: clamp(24px, 5vw, 140px); margin-inline: auto; }

/* ---------- header ---------- */
.topbar {
  background: linear-gradient(135deg, #0d2f4f, #134e7f 55%, #1a639f);
  color: #fff;
  box-shadow: 0 2px 14px rgba(13, 47, 79, .25);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 74px; }

.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; white-space: nowrap; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, #ffb84d, var(--accent));
  color: #3a2400; font-weight: 800; display: grid; place-items: center; font-size: 19px;
}
.brand-text strong { font-weight: 800; color: #ffb84d; }

.search { flex: 1; display: flex; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; overflow: hidden; }
.search input { flex: 1; border: 0; background: transparent; color: #fff; padding: 11px 16px; font: inherit; outline: none; }
.search input::placeholder { color: rgba(255, 255, 255, .65); }
.search button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; padding: 0 16px; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: rgba(255, 255, 255, .24); }

.cart-link { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); white-space: nowrap; }
.cart-link:hover { background: rgba(255, 255, 255, .18); }
.badge { background: var(--accent); color: #2c1a00; border-radius: 999px; padding: 0 8px; font-size: 12px; }

/* ---------- layout ---------- */
.main { padding-block: 28px 60px; min-height: 60vh; }

.hero {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center;
  background: linear-gradient(120deg, #ffffff, #eef4fb);
  border: 1px solid var(--line); border-radius: 22px; padding: 34px 38px; margin-bottom: 34px;
  box-shadow: var(--shadow);
}
.pill { display: inline-block; background: #e8f1fb; color: var(--brand); border-radius: 999px; padding: 4px 14px; font-size: 12.5px; margin-bottom: 12px; }
.hero h1 { font-size: 34px; line-height: 1.45; margin: 0 0 12px; letter-spacing: -.3px; }
.hero p { color: var(--muted); margin: 0 0 22px; max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: grid; gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; align-items: baseline; justify-content: space-between; }
.stat b { font-size: 22px; color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; }

.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { font-size: 20px; margin: 0; }
.more { color: var(--brand-2); font-size: 13.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; display: flex; gap: 8px; align-items: center; font-size: 13.5px; transition: .15s; }
.chip b { color: var(--muted); font-size: 12px; font-weight: 400; }
.chip:hover { border-color: var(--brand-2); color: var(--brand-2); transform: translateY(-1px); }

/* ---------- grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .18s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #cdd9e8; }
.card-img { aspect-ratio: 4 / 3; background: #eef2f7; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.3em; }
.card-title:hover { color: var(--brand-2); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.code { color: var(--muted); font-size: 12px; direction: ltr; }
.stock { font-size: 11.5px; border-radius: 999px; padding: 2px 10px; }
.stock.in { background: #e7f6ef; color: var(--ok); }
.stock.out { background: #fdeaea; color: var(--danger); }
.stock.unknown { background: #eef2f7; color: #5b6b80; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 700; color: var(--brand); font-size: 15px; }
.unit { font-size: 11px; font-weight: 400; color: var(--muted); }
.price-date { font-size: 10.5px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 14px; cursor: pointer; transition: .15s; }
.btn:hover { border-color: #b9c7d8; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(19, 78, 127, .25); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: var(--brand-2); cursor: pointer; font: inherit; padding: 0; }
.link.danger { color: var(--danger); }

/* ---------- list page ---------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin: 6px 0; }
.breadcrumb { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.breadcrumb a:hover { color: var(--brand-2); }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.layout-cart { grid-template-columns: minmax(0, 1fr) 300px; }
.layout > * { min-width: 0; }
.layout .table { table-layout: fixed; }
.layout .table th:nth-child(2), .layout .table td:nth-child(2) { width: 120px; }
.layout .table th:nth-child(3), .layout .table td:nth-child(3) { width: 96px; }
.layout .table th:nth-child(4), .layout .table td:nth-child(4) { width: 120px; }
.layout .table th:nth-child(5), .layout .table td:nth-child(5) { width: 64px; }
.layout .table td:first-child { overflow-wrap: anywhere; }
.layout .table .qty { width: 100%; max-width: 90px; }
.sidebar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; position: sticky; top: 92px; }
.sidebar h3 { font-size: 14px; margin: 4px 6px 12px; color: var(--muted); font-weight: 600; }
.cat-list { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow: auto; }
.cat-list a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; }
.cat-list a:hover { background: #f1f5fa; }
.cat-list a.active { background: #e8f1fb; color: var(--brand); font-weight: 600; }
.cnt { color: var(--muted); font-size: 11.5px; }

.toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.toolbar label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
select, input[type="text"], input[type="tel"], input[type="number"], textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(29, 111, 184, .12); }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 26px; font-size: 13.5px; }.pager a { border: 1px solid var(--line); background: #fff; padding: 7px 16px; border-radius: 9px; }
.pager a:hover { border-color: var(--brand-2); color: var(--brand-2); }

.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 46px; text-align: center; color: var(--muted); }

/* ---------- list rows ---------- */
.items { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.items-head, .row { display: grid; grid-template-columns: minmax(0, 1fr) 112px 190px 225px; gap: 14px; align-items: center; }
.items-head { padding: 0 18px 8px; background: transparent; border: 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.row { padding: 16px 18px; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 32, 58, .04); transition: border-color .15s ease, box-shadow .15s ease; }
.row:last-child { margin-bottom: 0; }
.row:hover { border-color: #cfd9e6; box-shadow: var(--shadow); background: #fff; }
.row-main { min-width: 0; }
.row-title { font-size: 15.5px; font-weight: 700; line-height: 1.7; display: block; }
.row-title:hover { color: var(--brand-2); }
.row-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.row-cell { font-size: 14px; }
.row-price { font-weight: 700; color: var(--brand); font-size: 16.5px; }
.row-action form { margin: 0; }
.row-add { display: flex; gap: 8px; align-items: center; justify-content: flex-start; }
.stepper { display: flex; align-items: center; gap: 4px; }
.step { width: 30px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font: inherit; font-size: 17px; line-height: 1; color: var(--brand); display: grid; place-items: center; padding: 0; }
.step:hover { background: #eef4fb; border-color: #b9c7d8; }
.qty-input { width: 48px; height: 34px; padding: 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--ink); -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row-action .btn { flex: 0 0 auto; white-space: nowrap; }

.toast { position: fixed; top: 88px; left: 50%; transform: translate(-50%, -10px); background: var(--ok); color: #fff; padding: 13px 24px; border-radius: 12px; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(29, 111, 184, .5); outline-offset: 2px; border-radius: 8px; }

@media (max-width: 820px) {
  .items-head { display: none; }
  .row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .row-main { grid-column: 1; }
  .row-stock { grid-column: 1; }
  .row-price { grid-column: 1; }
  .row-action { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- product ---------- */
.product { display: grid; grid-template-columns: 1fr; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); margin: 14px 0 34px; }
.product-media { border-radius: 14px; overflow: hidden; background: #eef2f7; align-self: start; }
.product-info h1 { font-size: 24px; line-height: 1.6; margin: 0 0 12px; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.product-meta b { color: var(--ink); font-weight: 600; }

.buybox { background: #f8fafd; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.buybox-price { flex: 1 1 240px; }
.buybox-price .label { font-size: 12.5px; color: var(--muted); }
.amount { font-size: 26px; font-weight: 800; color: var(--brand); }
.add-form { display: flex; gap: 12px; align-items: flex-end; flex: 0 0 auto; }
.add-form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.add-form input { width: 90px; }
.add-form .btn { flex: 0 0 auto; min-width: 200px; }

.notes { margin-top: 18px; font-size: 13px; color: var(--muted); }
.notes p { margin: 4px 0; }

.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 13.5px; }
.alert.ok { background: #e7f6ef; color: #0c6b4c; }
.alert.warn { background: #fff7e8; color: var(--warn); }
.alert a { text-decoration: underline; }

/* ---------- cart / checkout ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 13px 14px; text-align: right; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
.table thead th { background: #f7f9fc; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { background: #f7f9fc; font-weight: 700; }
.qty { width: 76px; text-align: center; }

.cart-actions { display: flex; gap: 10px; margin-top: 16px; }

.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 92px; }
.summary h3 { margin: 0 0 14px; font-size: 16px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.summary .row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 14px; font-size: 15px; }
.summary .row.total b { color: var(--brand); font-size: 17px; }
.summary .btn { margin-top: 16px; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.form input, .form textarea { width: 100%; }
.form .btn { margin-top: 6px; }

/* ---------- order success ---------- */
.success { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 34px; text-align: center; box-shadow: var(--shadow); margin-bottom: 30px; }
.check { width: 62px; height: 62px; border-radius: 50%; background: #e7f6ef; color: var(--ok); font-size: 30px; display: grid; place-items: center; margin: 0 auto 14px; }
.success h1 { margin: 0 0 8px; font-size: 24px; }
.tracking { direction: ltr; display: inline-block; background: #eef4fb; color: var(--brand); padding: 3px 14px; border-radius: 8px; letter-spacing: .5px; }

.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 20px 0 24px; }
.order-meta div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: grid; gap: 4px; }
.order-meta span { font-size: 12px; color: var(--muted); }
.order-meta b { font-size: 13.5px; font-weight: 600; }

/* ---------- error ---------- */
.error-page { text-align: center; padding: 70px 20px; }
.error-page .code { font-size: 64px; font-weight: 800; color: #dbe4ef; line-height: 1; }
.error-page h1 { margin: 10px 0; }

/* ---------- footer ---------- */
.footer { background: #0d2338; color: #c9d6e5; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding-top: 30px; padding-bottom: 22px; }
.footer strong { color: #fff; font-size: 16px; }
.footer p { margin: 6px 0 0; font-size: 13px; color: #93a7bd; }
.footer-links { display: flex; gap: 20px; font-size: 13.5px; align-items: center; }
.footer-links a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; padding-bottom: 20px; font-size: 12px; color: #7d92aa; text-align: center; }

@media (max-width: 980px) {
  .hero, .product, .layout, .form-row { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .summary { position: static; }
  .hero h1 { font-size: 26px; }
  .topbar-inner { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .cart-link span { display: none; }
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { background: #e8f1fb; color: var(--brand); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; display: inline-flex; gap: 8px; align-items: center; }
.tag a { color: var(--brand); font-weight: 700; }

/* ---------- landing / auth ---------- */
.landing-hero { background: linear-gradient(120deg, #ffffff, #eef4fb); border: 1px solid var(--line); border-radius: 22px; padding: 34px 38px; margin-bottom: 26px; box-shadow: var(--shadow); }
.landing-hero h1 { font-size: 32px; margin: 10px 0 12px; }
.landing-hero p { color: var(--muted); max-width: 70ch; margin: 0; }

.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 26px; align-items: stretch; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.auth-card h2 { font-size: 18px; margin: 0 0 6px; min-height: 30px; }
.auth-card > p.muted { margin: 0 0 4px; }
.form-plain { display: grid; gap: 14px; margin-top: 14px; flex: 1; align-content: start; }
.form-plain label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form-plain input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.form-plain input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(29,111,184,.12); outline: none; }
.form-plain .btn { margin-top: auto; }
.auth-card .auth-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.auth-login .form-plain { margin-top: auto; margin-bottom: auto; }
.auth-login .auth-foot { margin-top: 18px; }

.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.step-card b { width: 30px; height: 30px; border-radius: 50%; background: #e8f1fb; color: var(--brand); display: grid; place-items: center; font-size: 14px; flex: 0 0 auto; }

/* ---------- header user ---------- */
.guest-actions { display: flex; gap: 8px; margin-inline-start: auto; }
.guest-actions .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.guest-actions .btn-primary { background: var(--accent); border-color: transparent; color: #2c1a00; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.link-btn { background: none; border: 0; color: #ffd08a; cursor: pointer; font: inherit; font-size: 12.5px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------- admin ---------- */
.admin-login { max-width: 420px; margin: 40px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.admin-login h1 { font-size: 20px; margin: 0 0 6px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.users-head, .users-row { display: grid; grid-template-columns: minmax(0,1fr) 150px 130px 190px; gap: 14px; align-items: center; }
.user-actions { display: flex; gap: 8px; }
.user-actions form { margin: 0; }

@media (max-width: 900px) {
  .auth-grid, .landing-steps { grid-template-columns: 1fr; }
  .users-head { display: none; }
  .users-row { grid-template-columns: 1fr auto; }
}

/* ---------- brand logo ---------- */
.brand-logo { height: 52px; width: auto; display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
@media (max-width: 520px) { .brand-logo { height: 28px; } }

.brand-mark-img { height: 34px; width: 34px; display: block; opacity: .95; }
.brand-name { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
/* ---------- landing background ---------- */
.landing-hero {
  position: relative;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  padding: 56px 48px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background-image:
    linear-gradient(to left, rgba(7,16,29,.95) 0%, rgba(7,16,29,.86) 42%, rgba(7,16,29,.30) 100%),
    url('/landing-bg.webp');
  background-size: cover;
  background-position: left center;
  box-shadow: 0 22px 55px rgba(7,16,29,.28);
}
.landing-hero h1 { color: #fff; font-size: 34px; line-height: 1.5; margin: 12px 0 14px; max-width: 24ch; }
.landing-hero p { color: rgba(255,255,255,.82); max-width: 58ch; line-height: 2; }
.landing-hero .pill { background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.2); }

@media (max-width: 760px) {
  .landing-hero { padding: 34px 22px; min-height: 340px; background-image: linear-gradient(to bottom, rgba(7,16,29,.72), rgba(7,16,29,.95)), url('/landing-bg.webp'); }
  .landing-hero h1 { font-size: 25px; }
}
/* ---------- admin entry on landing ---------- */
.admin-entry-wrap { display: flex; justify-content: center; margin: 2px 0 30px; }
.admin-entry { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; transition: .15s; }
.admin-entry svg { opacity: .8; }
.admin-entry:hover { color: var(--brand); border-color: #c4d3e4; background: #f8fbff; }
.admin-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: .15s; }
.admin-icon:hover { color: #fff; background: rgba(255,255,255,.16); }
/* ---------- admin roles ---------- */
.users-head, .users-row { grid-template-columns: minmax(0,1fr) 130px 110px 130px 250px; }
.user-actions { flex-wrap: wrap; row-gap: 6px; }
.promote-form { display: flex; gap: 6px; align-items: center; }
.mini-input { width: 110px; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
@media (max-width: 1100px) {
  .users-head { display: none; }
  .users-row { grid-template-columns: 1fr 1fr; }
}
/* ---------- roles ---------- */
.users-head, .users-row { grid-template-columns: minmax(0,1fr) 120px 100px 100px 330px; }
.role-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-select { padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.role-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.role-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 11.5px; color: var(--muted); }
.role-chip b { color: var(--brand); font-weight: 600; margin-inline-end: 4px; }
@media (max-width: 1180px) {
  .users-head { display: none; }
  .users-row { grid-template-columns: 1fr 1fr; }
}
/* ---------- price alert & settings ---------- */
.price-alert { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.price-alert b { color: #8a4b00; }
.settings-actions { display: flex; gap: 8px; align-items: center; }
.settings-actions form { margin: 0; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.settings-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.settings-row b { font-weight: 600; }
.text-warn { color: #b45309; }
.text-ok { color: #12805c; }
.settings-form { margin-top: 18px; max-width: 320px; }
/* ---------- user detail / admin powers ---------- */
.settings-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.settings-form input, .settings-form select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff; color: var(--ink); }
.settings-sep { border: 0; border-top: 1px dashed var(--line); margin: 18px 0; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c9c9; }
.btn-danger:hover { background: #fdf2f2; border-color: var(--danger); }
/* ---------- price status flags ---------- */
.price-flag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.price-flag.ok { background: #e7f6ef; color: #12805c; }
.price-flag.bad { background: #fdeaea; color: #b91c1c; animation: flagBlink 1.2s ease-in-out infinite; }
.price-flag.none { background: #eef2f7; color: #5b6b80; }
@keyframes flagBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .price-flag.bad { animation: none; } }
/* ---------- price status line ---------- */
.price-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.price-status .price-date { margin-top: 0; }
.step:disabled, .qty-input:disabled { opacity: .45; cursor: not-allowed; }
/* ---------- orders desk ---------- */
.orders-head, .orders-row { grid-template-columns: minmax(0,1fr) 90px 160px 130px 90px; }
.order-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }
.st-pending { background: #fff4e5; color: #a35f00; }
.st-approved { background: #e7f6ef; color: #12805c; }
.st-rejected { background: #fdeaea; color: #b91c1c; }
.st-invoiced { background: #e8f1fb; color: #1d4f8b; }
.active-tag { background: #e8f1fb; border-color: #b9d3ee; color: var(--brand); }
.order-edit-head, .order-edit-row { grid-template-columns: minmax(0,1fr) 100px 90px 80px 80px 130px; }
.order-edit-row .qty-input { width: 70px; }
.order-actions { display: flex; align-items: center; gap: 16px; margin: 16px 0 22px; }
.order-decision { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.reject-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.order-card { margin-bottom: 18px; }
@media (max-width: 900px) {
  .orders-head, .order-edit-head { display: none; }
  .orders-row, .order-edit-row { grid-template-columns: 1fr 1fr; }
}
/* ---------- account ---------- */
.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.account-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 6px; }
.account-card span { font-size: 12.5px; color: var(--muted); }
.account-card b { font-size: 19px; color: var(--brand); }
@media (max-width: 820px) { .account-grid { grid-template-columns: 1fr; } }
/* ---------- settings page ---------- */
.site-notice { background: #fff8e6; color: #7a5200; text-align: center; padding: 10px 16px; font-size: 13.5px; border-bottom: 1px solid #f0e0b8; }
.settings-page { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.settings-page .settings-card { margin: 0; }
.settings-page h2 { font-size: 16px; margin: 0 0 14px; color: var(--brand); }
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-size: 13px; color: #33465c; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid #cfe0f3; border-color: #9dc0e6; }
.field-wide { grid-column: 1 / -1; }
.field.checkbox { display: flex; align-items: center; gap: 10px; justify-content: flex-start; }
.field.checkbox span { font-size: 13.5px; }
.field.readonly b { font-size: 15px; color: var(--brand); }
.settings-save { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; grid-column: 1 / -1; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }
/* ---------- finance ---------- */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 26px; }
.fin-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.fin-card span { font-size: 12.5px; color: var(--muted); }
.fin-card b { font-size: 18px; color: var(--brand); }
.fin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.fin-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
.fin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fin-columns .section { margin: 0 0 20px; }
@media (max-width: 900px) { .fin-columns { grid-template-columns: 1fr; } }
/* ---------- voice typing ---------- */
.voice-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.mic-btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 14px; border: 1px solid var(--line); background: #f7fafd; color: var(--brand); font: inherit; font-size: 16px; cursor: pointer; transition: background .15s; }
.mic-btn:hover { background: #eef4fb; }
.mic-btn.on { background: #fdeaea; border-color: #f3b4b4; color: #b91c1c; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(185,28,28,.18); } 50% { box-shadow: 0 0 0 12px rgba(185,28,28,0); } }
.voice-text { width: 100%; margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font: inherit; line-height: 2; resize: vertical; background: #fbfdff; color: var(--ink); }
.voice-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- CRM ---------- */
.crm-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.crm-nav a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #33465c; font-size: 13.5px; }
.crm-nav a:hover { background: #eef4fb; }
.crm-nav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.crm-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.crm-stage { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.crm-stage span { font-size: 12.5px; color: var(--muted); }
.crm-stage b { font-size: 20px; color: var(--brand); }
.inline-form { display: inline-block; margin: 0; }
.inline-form select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
.crm-actions { display: flex; gap: 6px; }
.row-done b, .row-done .muted { opacity: .55; text-decoration: line-through; }
/* ---------- ERP ---------- */
.search-bar { display: flex; gap: 10px; margin: 0 0 20px; }
.search-bar input { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; direction: ltr; text-align: left; }
/* صفحه‌های محتوایی */
.content-page { display: grid; gap: 1rem; max-width: 900px; margin: 0 auto; }
.content-page .card { padding: 1.25rem 1.5rem; }
.content-page h2 { margin-top: 0; font-size: 1.1rem; }
.content-page p { line-height: 2; margin: .5rem 0; }
.content-page ul { line-height: 2; padding-inline-start: 1.2rem; margin: .5rem 0; }
.content-page li { margin-bottom: .35rem; }

/* داشبورد مدیریتی */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi-label { color: var(--muted); font-size: 12.5px; }
.kpi-value { font-size: 20px; color: var(--brand); }
.kpi-sub { color: var(--muted); font-size: 12px; }
.dash-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }
.dash-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.dash-panel h2 { font-size: 15px; margin: 0 0 12px; }
.dash-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 8px; }
.dash-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.dash-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #3aa0ff, #1e63b8); border-radius: 6px 6px 0 0; min-height: 3px; }
.dash-bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dash-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dash-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.dash-list li:last-child { border-bottom: 0; }
.dash-rank { padding-inline-start: 1.1rem; display: grid; gap: 8px; font-size: 13.5px; margin: 0; }
.dash-rank li span { font-weight: 600; }
.dash-rank li b { color: var(--brand); margin-inline-start: 8px; }
.dash-rank li i { color: var(--muted); font-style: normal; font-size: 12px; margin-inline-start: 8px; }


/* داشبورد — نسخهٔ کامل */
.dash-tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-export { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.dash-export a { text-decoration: underline; }
.delta { font-style: normal; font-size: 11.5px; margin-inline-start: 6px; }
.delta.up { color: #0c6b4c; }
.delta.down { color: #b3261e; }
.dash-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dash-queue a { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; }
.dash-queue a b { font-size: 20px; color: var(--brand); }
.dash-queue a span { font-size: 12.5px; color: var(--muted); }
.dash-funnel { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dash-funnel li { display: grid; grid-template-columns: 1fr 90px 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.funnel-bar { background: #eef2f7; border-radius: 6px; height: 10px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3aa0ff, #1e63b8); }
.usage { background: #eef2f7; border-radius: 6px; height: 8px; overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-inline-end: 6px; }
.usage i { display: block; height: 100%; background: #f0a02a; }
.dash-activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 12.5px; }
.dash-activity li { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.dash-activity i { grid-column: 1 / -1; color: var(--muted); font-style: normal; font-size: 11.5px; }

/* مکاتبه و وظایف داخلی */
.section-title { font-size: 15px; margin: 22px 0 10px; }
.thread { display: grid; gap: 10px; margin-bottom: 18px; }
.msg { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.msg.mine { background: #eef6ff; border-color: #cfe3f8; }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg-body { white-space: pre-wrap; line-height: 1.9; font-size: 14px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px; }
.form-card label { display: grid; gap: 6px; font-size: 13px; }
.form-card input, .form-card select, .form-card textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; }
.badge-new, .badge-done, .badge-late, .badge-open { font-size: 11px; border-radius: 999px; padding: 3px 9px; }
.badge-new { background: #1e63b8; color: #fff; }
.badge-done { background: #e7f6ef; color: #0c6b4c; }
.badge-late { background: #fdecea; color: #b3261e; }
.badge-open { background: #fff7e8; color: #a76a00; }
.inbox-row, .task-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
.dash-target { display: flex; flex-direction: column; gap: 8px; }
.dash-target .bar { height: 12px; background: #eef2f7; border-radius: 8px; overflow: hidden; }
.dash-target .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3aa0ff, #1e63b8); }

/* نشان نمایندگی ایساکو */
.dealer-badge { width: fit-content; display: inline-flex; align-items: center; gap: 10px; background: #f4f7fb; border: 1px solid #e2eaf3; color: #3f5063; border-radius: 999px; padding: 9px 16px; font-size: 14.5px; margin: 12px 0 0; text-decoration: none; }
.dealer-badge img { width: 26px; height: 26px; opacity: .9; }
.dealer-badge b { font-weight: 700; color: #1f3f66; letter-spacing: .5px; }

.isaco-mark { font: 700 10px/1 Arial, sans-serif; letter-spacing: .6px; background: #0b4ea2; color: #fff; padding: 4px 6px; border-radius: 5px; }

.isaco-shield { height: 26px; width: auto; border-radius: 5px; }


/* شبکه‌های اجتماعی */
.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.social-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: #2a3a4a; background: #fff; text-decoration: none; }
.social-btn:hover { border-color: #cdd9e8; box-shadow: var(--shadow); }
.social-btn.instagram svg { color: #c13584; }
.social-btn.telegram svg { color: #229ed9; }
.social-btn.rubika svg { color: #0b4ea2; }

/* پیوند نقشه */
.map-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }
.map-link:hover { color: var(--brand-2); }
.map-link svg { flex: 0 0 auto; }

/* دسترسی‌ها */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: #fbfcfe; cursor: pointer; }
.perm-item input { width: 16px; height: 16px; }

/* منوی یکپارچهٔ مدیر */
.topnav { display: flex; flex-wrap: wrap; gap: 2px; margin-inline-start: 10px; }
.topnav-link { padding: 7px 11px; border-radius: 8px; font-size: 13px; color: #dbe7f7; text-decoration: none; white-space: nowrap; }
.topnav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.topnav-link.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }
.topnav-exit { color: #ffd9a8; }

/* زیرمنو */
.nav-group { position: relative; display: inline-block; }
.nav-toggle { background: transparent; border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }
.nav-menu { display: none; position: absolute; top: 100%; inset-inline-start: 0; min-width: 185px; background: #fff; border: 1px solid #dde6f2; border-radius: 10px; box-shadow: 0 14px 32px rgba(16,42,80,.18); padding: 6px; z-index: 60; }
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { display: block; }
.nav-menu a { display: block; padding: 8px 10px; border-radius: 7px; color: #22354d; font-size: 13px; text-decoration: none; white-space: nowrap; }
.nav-menu a:hover { background: #eef4fc; color: #0b4ea2; }
@media (max-width: 980px) {
  .topnav { width: 100%; }
  .nav-menu { position: static; box-shadow: none; border: 0; padding: 2px 0 6px 0; background: transparent; }
  .nav-menu a { color: #dbe7f7; }
  .nav-menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
}

/* ---- موبایل ---- */
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .container { padding-left: 12px; padding-right: 12px; }
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .brand-logo { height: 34px; }
  .topnav { width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding-bottom: 4px; }
  .topnav-link { white-space: nowrap; font-size: 12.5px; }
  .nav-menu { position: static; display: none; box-shadow: none; border: 0; background: transparent; }
  .nav-group:focus-within .nav-menu { display: block; }
  .guest-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .page-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .page-head h1 { font-size: 20px; }
  .settings-actions { flex-wrap: wrap; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash-cols { grid-template-columns: 1fr; }
  .dash-kpi { min-width: 0; padding: 10px; }
  .dash-kpi .kpi-value { font-size: 16px; }
  .table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .table th, .table td { padding: 8px 10px; }
  .inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .inline-form .search-input { max-width: 100% !important; width: auto; }
  .perm-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row input, .form-row select, .form-row textarea { width: 100%; }
  .dash-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .filters { flex-wrap: wrap; }
  .search-input { max-width: 100%; }
}

/* ---- اصلاح جدول و منو در موبایل ---- */
@media (max-width: 760px) {
  .topnav { flex-direction: row !important; flex-wrap: nowrap !important; overflow-x: auto !important; align-items: center; }
  .topnav-link, .nav-group, .nav-toggle { flex: 0 0 auto; white-space: nowrap; }
  .table { display: block; overflow-x: auto; white-space: normal; border: 1px solid var(--line); border-radius: 10px; }
  .table thead, .table tbody { display: table; width: 100%; min-width: 640px; }
  .table th, .table td { white-space: normal; vertical-align: middle; }
  .table td form { margin: 2px 0; }
  .inline-form { display: flex; flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 760px) {
  .fin-columns { display: block !important; }
  .fin-columns .section { width: 100%; margin-bottom: 16px; }
  .section-head { flex-wrap: wrap; }
}

/* جدول‌های کارت‌شونده در موبایل */
@media (max-width: 760px) {
  .table-stack { display: block; border: 0; overflow: visible; }
  .table-stack thead { display: none; }
  .table-stack tbody { display: block; min-width: 0; }
  .table-stack tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 10px; }
  .table-stack td { display: block; width: auto; border: 0; padding: 5px 4px; }
  .table-stack td:first-child { font-size: 15px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; padding-bottom: 8px; }
  .table-stack td form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .table-stack .row-side { display: flex; flex-wrap: wrap; gap: 8px; }
}

/* نشان آنلاین */
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-inline-start: 6px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.online-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; background: #fff; margin: 0 0 6px 6px; }
.login-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 12px; }
.login-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.login-bar { width: 100%; max-width: 26px; display: flex; flex-direction: column; justify-content: flex-end; background: #eef3fb; border-radius: 5px; overflow: hidden; }
.login-ok { background: #22c55e; display: block; }
.login-fail { background: #f59e0b; display: block; }
.login-day { font-size: 10px; color: var(--muted); }

/* مسیر سفارش */
.order-flow { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0 16px; }
.flow-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 12px; flex-wrap: wrap; gap: 6px; }
.flow-steps { display: flex; align-items: flex-start; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.flow-step { display: flex; gap: 8px; align-items: flex-start; min-width: 132px; }
.flow-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #eef3fb; color: #5b6b82; flex: 0 0 auto; }
.flow-step.done .flow-dot { background: #22c55e; color: #fff; }
.flow-step.current .flow-dot { background: #0b4ea2; color: #fff; box-shadow: 0 0 0 4px rgba(11,78,162,.15); }
.flow-step.rejected .flow-dot { background: #ef4444; color: #fff; }
.flow-line { flex: 1 1 auto; height: 2px; background: #e6eefb; margin-top: 11px; min-width: 14px; }
.flow-line.done { background: #22c55e; }
.flow-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.flow-rejected { border-color: #fecaca; }

/* راهنما */
.help-list { display: grid; gap: 12px; margin-top: 14px; }
.help-item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.help-index { width: 28px; height: 28px; border-radius: 8px; background: #eef4fc; color: #0b4ea2; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.help-body h2 { font-size: 15px; margin: 0 0 4px; color: #22354d; }
.help-body p { margin: 3px 0; font-size: 13px; }
.help-foot { margin-top: 16px; }

/* کاتالوگ عمومی */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.catalog-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.catalog-name { font-size: 14px; line-height: 1.7; }
.catalog-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.catalog-price { font-size: 12.5px; color: #0b4ea2; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 18px 0; }
/* وضعیت سامانه */
.status-summary { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.status-pill { display:flex; align-items:center; gap:8px; padding:10px 16px; border-radius:12px; background:#fff; border:1px solid #e5e7eb; }
.status-pill b { font-size:20px; }
.status-pill.ok b { color:#15803d; }
.status-pill.warn b { color:#b45309; }
.status-pill.bad b { color:#b91c1c; }
.status-list { list-style:none; margin:0; padding:0; }
.status-row { display:grid; grid-template-columns:14px 220px 1fr; align-items:center; gap:10px; padding:10px 4px; border-bottom:1px solid #f1f5f9; }
.status-row:last-child { border-bottom:0; }
.status-dot { width:10px; height:10px; border-radius:50%; background:#cbd5e1; }
.status-row.ok .status-dot { background:#22c55e; }
.status-row.warn .status-dot { background:#f59e0b; }
.status-row.bad .status-dot { background:#ef4444; }
.status-name { font-weight:600; }
.status-detail { color:#475569; font-size:13px; }
@media (max-width: 640px) {
  .status-row { grid-template-columns:14px 1fr; }
  .status-detail { grid-column:2; }
}
.inline-form { display:inline; margin:0; }
.fix-list { margin:8px 0 0; padding-inline-start:18px; }
.fix-list li.ok { color:#15803d; }
.fix-list li.warn { color:#b45309; }
/* تقویم کاری */
.cal-title { font-size:20px; font-weight:700; margin:6px 0 12px; }
.cal-grid { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:10px; }
.cal-dow { text-align:center; font-size:12px; font-weight:700; color:#64748b; padding:6px 2px; }
.cal-cell { min-height:92px; border:1px solid #f1f5f9; border-radius:10px; padding:6px; background:#fcfdff; }
.cal-cell.empty { background:transparent; border:0; }
.cal-cell.has { background:#f8fbff; border-color:#dbeafe; }
.cal-day { font-size:12px; font-weight:700; color:#334155; margin-bottom:4px; }
.cal-chip { display:block; font-size:10.5px; line-height:1.5; border-radius:6px; padding:1px 5px; margin-bottom:2px; background:#eef2f7; color:#334155; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-chip.reminder { background:#ede9fe; color:#5b21b6; }
.cal-chip.cheque { background:#dcfce7; color:#166534; }
.cal-chip.payable { background:#fee2e2; color:#991b1b; }
.cal-chip.receivable { background:#e0f2fe; color:#075985; }
.cal-chip.task { background:#fef3c7; color:#92400e; }
.cal-chip.task-done { background:#e5e7eb; color:#6b7280; text-decoration:line-through; }
.cal-more { font-size:10px; color:#64748b; }
.cal-legend { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.cal-list { list-style:none; margin:0; padding:0; }
.cal-list li { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 2px; border-bottom:1px solid #f1f5f9; }
.cal-list li:last-child { border-bottom:0; }
@media (max-width: 760px) {
  .cal-grid { gap:3px; padding:6px; }
  .cal-cell { min-height:64px; padding:3px; }
  .cal-chip { font-size:9px; padding:0 3px; }
  .cal-dow { font-size:10px; }
}
/* فیلتر فاکتورهای خرید */
.filter-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:10px; margin-bottom:14px; }
.filter-bar input, .filter-bar select { padding:8px 10px; border:1px solid #d7dde6; border-radius:9px; font:inherit; font-size:13px; background:#fff; }
.filter-bar input[type=search] { flex:1 1 260px; min-width:200px; }
.filter-bar input[name=min], .filter-bar input[name=max], .filter-bar input[name=from], .filter-bar input[name=to] { width:130px; }
.table-scroll { overflow-x:auto; background:#fff; border:1px solid #e5e7eb; border-radius:14px; }
.pager { display:flex; align-items:center; gap:10px; margin:14px 0; }
/* منابع سرور */
.res-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px; }
.res-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; }
.res-card h3 { margin:0 0 10px; font-size:15px; }
.gauges { display:flex; gap:14px; flex-wrap:wrap; }
.gauge { --p:0; width:92px; height:92px; border-radius:50%; display:grid; place-items:center; position:relative;
  background: conic-gradient(#22c55e calc(var(--p) * 1%), #eef2f7 0); }
.gauge::before { content:''; position:absolute; inset:9px; background:#fff; border-radius:50%; }
.gauge span { position:relative; font-weight:700; font-size:16px; }
.gauge small { position:absolute; bottom:16px; font-size:10px; color:#64748b; }
.gauge.net { background: conic-gradient(#3b82f6 calc(var(--p) * 1%), #eef2f7 0); }
.status-help { grid-column: 2 / -1; background:#f8fafc; border:1px solid #eef2f7; border-radius:10px; padding:8px 10px; margin-top:4px; font-size:12.5px; color:#475569; }
.status-help p { margin:3px 0; }
.status-help b { color:#334155; }
/* نشان فاکتور نهایی‌شده */
.inv-badge { display:inline-flex; align-items:center; gap:5px; background:#dcfce7; color:#166534; border-radius:999px; padding:2px 9px; font-size:12px; font-weight:600; }
.inv-icon { display:inline-grid; place-items:center; width:16px; height:16px; border-radius:50%; background:#16a34a; color:#fff; font-size:11px; line-height:1; }
.sepidar-stamp { text-align:center; font-size:12px; color:#94a3b8; padding:6px 0 0; }
.source-note { font-size:12px; color:#64748b; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:8px; padding:4px 10px; display:inline-block; margin-top:6px; }
.online-dot.off { background:#cbd5e1; box-shadow:none; }
.online-dot.idle { background:#f59e0b; box-shadow:0 0 0 3px rgba(245,158,11,.15); }
.last-page { margin-inline-start:6px; }
.last-page a { color:#1d4ed8; text-decoration:none; }
.last-page a:hover { text-decoration:underline; }
.perm-yes { border-color:#bbf7d0; background:#f0fdf4; }
.perm-no { border-color:#fecaca; background:#fef2f2; opacity:.85; }
.perm-mark { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; color:#fff; font-size:11px; }
.perm-yes .perm-mark { background:#16a34a; }
.perm-no .perm-mark { background:#dc2626; }
.footer-social { display:flex; gap:8px; margin-top:8px; }
.footer-social .soc { width:30px; height:30px; border-radius:50%; display:inline-grid; place-items:center; background:rgba(255,255,255,.1); color:#e2e8f0; text-decoration:none; font-size:12px; }
.footer-social .soc:hover { background:rgba(255,255,255,.2); }
.footer-social .soc-instagram:hover { background:#e1306c; }
.footer-social .soc-telegram:hover { background:#229ed9; }
.footer-social .soc-whatsapp:hover { background:#25d366; }
.footer-social .soc-rubika:hover { background:#6d28d9; }
.footer-social-hint { margin-top:6px; font-size:11px; }
.footer-social-hint a { color:#93c5fd; }
/* ---------- نشانگر امنیت ---------- */
.sec-gauge-wrap { display:flex; flex-direction:column; align-items:center; gap:6px; }
.sec-gauge { width:132px; height:132px; }
.sec-track { fill:none; stroke:#e2e8f0; stroke-width:12; }
.sec-fill { fill:none; stroke-width:12; stroke-linecap:round; transition:stroke-dasharray .5s ease; }
.sec-fill.sec-ok { stroke:#16a34a; }
.sec-fill.sec-warn { stroke:#f59e0b; }
.sec-fill.sec-bad { stroke:#dc2626; }
.sec-score { text-anchor:middle; font-size:26px; font-weight:700; fill:#0f172a; }
.sec-of { text-anchor:middle; font-size:10px; fill:#64748b; }
.sec-grade { font-size:12px; font-weight:700; padding:2px 10px; border-radius:999px; }
.sec-grade.sec-ok { background:#dcfce7; color:#166534; }
.sec-grade.sec-warn { background:#fef3c7; color:#92400e; }
.sec-grade.sec-bad { background:#fee2e2; color:#991b1b; }
.sec-cats { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:8px; }
.sec-chip { font-size:11px; padding:3px 8px; border-radius:999px; background:#f1f5f9; color:#0f172a; }
.sec-chip b { font-size:11px; }
.sec-chip.sec-ok { background:#dcfce7; color:#166534; }
.sec-chip.sec-warn { background:#fef3c7; color:#92400e; }
.sec-chip.sec-bad { background:#fee2e2; color:#991b1b; }
.sec-list h3 { font-size:12px; margin:14px 0 6px; color:#475569; }
.sec-row { display:flex; align-items:center; gap:8px; padding:6px 8px; border-bottom:1px solid #eef2f7; font-size:12px; flex-wrap:wrap; }
.sec-mark { width:18px; height:18px; border-radius:50%; display:inline-grid; place-items:center; color:#fff; font-size:11px; flex:0 0 auto; }
.sec-row.ok .sec-mark { background:#16a34a; }
.sec-row.warn .sec-mark { background:#f59e0b; }
.sec-row.bad .sec-mark { background:#dc2626; }
.sec-name { font-weight:600; min-width:150px; }
.sec-detail { color:#475569; }
.sec-fix { color:#b45309; font-size:11px; }
/* ---------- جست‌وجوی سراسری ---------- */
.global-search { display:flex; align-items:center; gap:4px; background:#f1f5f9; border:1px solid #e2e8f0; border-radius:999px; padding:2px 6px; margin:0 8px 0 4px; }
.global-search input { border:0; background:transparent; outline:none; font:inherit; font-size:12px; width:130px; padding:4px 2px; }
.global-search button { border:0; background:transparent; cursor:pointer; font-size:15px; color:#475569; padding:2px 4px; }
.global-search:focus-within { border-color:#93c5fd; background:#fff; }
.search-list { display:flex; flex-direction:column; }
.search-row { display:flex; align-items:center; gap:10px; padding:8px 6px; border-bottom:1px solid #eef2f7; text-decoration:none; color:inherit; flex-wrap:wrap; }
.search-row:hover { background:#f8fafc; }
.search-title { font-weight:600; font-size:13px; }
.search-sub { color:#64748b; font-size:12px; }
.search-meta { margin-inline-start:auto; font-size:12px; color:#0f172a; background:#f1f5f9; border-radius:999px; padding:2px 8px; }
@media (max-width: 760px) { .global-search { display:none; } }
.topnav-exit { font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.4; padding: 7px 11px; border-radius: 8px; background: transparent; color: #ffd9a8; text-decoration: none; }
.topnav-exit:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.guest-actions form { display:inline-flex; margin:0; }
/* ---------- بسته‌بندی کالا ---------- */
.pack-badge { display:inline-block; background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe; border-radius:999px; padding:1px 8px; font-size:11px; }
.buybox-pack { margin:6px 0 10px; font-size:12px; color:#92400e; background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:6px 10px; }
/* ---------- تقویم شمسی ---------- */
.date-wrap { position:relative; display:inline-flex; align-items:center; gap:4px; }
.date-pick { border:1px solid #cbd5e1; background:#f8fafc; border-radius:8px; width:32px; height:34px; display:inline-grid; place-items:center; cursor:pointer; color:#334155; }
.date-pick:hover { background:#eef2f7; }
.dp-pop { position:absolute; z-index:9999; width:250px; background:#fff; border:1px solid #cbd5e1; border-radius:12px; box-shadow:0 12px 30px rgba(15,23,42,.18); padding:8px; font-size:12px; }
.dp-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.dp-head button { border:0; background:#f1f5f9; border-radius:8px; width:28px; height:28px; cursor:pointer; font-size:16px; }
.dp-head b { font-size:12px; }
.dp-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; text-align:center; }
.dp-dow { color:#64748b; font-size:10px; padding:2px 0; }
.dp-empty { height:26px; }
.dp-grid button { border:0; background:transparent; border-radius:8px; height:26px; cursor:pointer; font-size:12px; }
.dp-grid button:hover { background:#eef2f7; }
.dp-grid .dp-today { outline:1px solid #93c5fd; }
.dp-grid .dp-sel { background:#2563eb; color:#fff; }
/* نمونهٔ کالا با قیمت در صفحهٔ اصلی */
.landing-sample { max-width:1100px; margin:24px auto 0; padding:18px 16px; }
.landing-sample-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.landing-sample-head h2 { margin:0; font-size:17px; }
.landing-sample-grid { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:10px; }
.landing-sample-card { display:flex; flex-direction:column; gap:6px; padding:12px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; color:inherit; text-decoration:none; }
.landing-sample-link { display:flex; flex-direction:column; gap:6px; color:inherit; text-decoration:none; }
.landing-sample-add { margin-top:auto; }
.landing-sample-add .btn { width:100%; }
.landing-sample-card b { font-size:13px; line-height:1.7; }
.landing-sample-price { font-weight:700; color:#0f766e; font-size:14px; }
@media (max-width:900px){ .landing-sample-grid { grid-template-columns:repeat(2, minmax(0,1fr)); } }
/* ورودی تاریخ شمسی */
.date-input { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.date-input::placeholder { direction: rtl; text-align: right; }

/* جست‌وجوی مشتری */
.party-picker { position: relative; }
.party-search { width: 100%; }
.party-search.invalid { border-color: #b42318; }
.party-list { position: absolute; z-index: 40; inset-inline: 0; top: calc(100% + 4px); max-height: 240px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #d9e0ea; border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 35, 64, .12); }
.party-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.party-item:hover, .party-item.active { background: #eef4ff; }

/* کادر تاریخ با آیکون تقویم داخل کادر */
.date-field { position: relative; display: block; }
.date-field input { width: 100%; box-sizing: border-box; padding-left: 40px; }
.date-field .date-pick { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: transparent; color: #64748b; display: grid; place-items: center; border-radius: 8px; }
.date-field .date-pick:hover { background: #eef2f7; color: #0f172a; }
/* کادر مشتری هم‌اندازهٔ فیلدهای دیگر */
.party-picker { width: 100%; }
.party-search { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #fff; line-height: 1.6; }
.party-list { width: 100%; box-sizing: border-box; max-height: 240px; overflow-y: auto; }
.party-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.party-item b { font-weight: 600; }
/* امروز در تقویم با رنگ جدا */
.dp-grid .dp-today { background: #fff7e6; color: #b45309; font-weight: 700; box-shadow: inset 0 0 0 1px #f59e0b; }
.dp-grid .dp-today.dp-sel { background: #2563eb; color: #fff; box-shadow: none; }
/* جست‌وجو در همهٔ کلمات نام و برجسته‌سازی حرف‌های تایپ‌شده */
.party-item .hit { font-weight: 800; color: #0b4f9c; background: #eaf2ff; border-radius: 4px; padding: 0 2px; }
/* خوانایی تقویم گرافیکی */
.dp-pop { width: 272px; font-size: 14px; }
.dp-head b { font-size: 14px; font-weight: 700; }
.dp-head button { width: 30px; height: 30px; font-size: 18px; }
.dp-dow { font-size: 11.5px; }
.dp-empty { height: 30px; }
.dp-grid button { height: 30px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
#amountWords { display:block; margin-top:4px; font-size:12.5px; color:#475569; }

.acc-totals { display:flex; gap:18px; font-size:13.5px; color:#334155; flex-wrap:wrap; }
.acc-totals b { color:#0f172a; }

/* ---------- استاندارد تایپوگرافی و نگارش (بومی‌سازی‌شده) ---------- */
:root {
  --font-fa: "Vazirmatn", "Segoe UI", Tahoma, "Iranian Sans", sans-serif;
  --font-latin: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-body: 16px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-body: 1.8;
  --leading-ui: 1.6;
  --leading-heading: 1.3;
}

body { font-family: var(--font-fa); line-height: var(--leading-body); }
h1, h2, h3, .page-head h1, .card-title { line-height: var(--leading-heading); }
button, .btn, input, select, textarea { font-family: inherit; }
.btn { font-weight: var(--weight-bold); line-height: var(--leading-ui); }
input, select, textarea { font-size: 16px; line-height: var(--leading-ui); }

.code, [dir="ltr"] { font-family: var(--font-latin); }
.code { direction: ltr; unicode-bidi: isolate; }

.stock, .order-status, .role-chip, .cnt, .unit, .delta,
.flow-meta, .footer-social-hint, .sec-chip,
.badge-new, .badge-done, .badge-late, .badge-open,
.inv-icon, .perm-mark { font-size: var(--text-xs); }

/* ---------- هدر صفحهٔ اصلی (نسخهٔ حرفه‌ای) ---------- */
.landing-hero { position: relative; overflow: hidden; padding: 46px 42px; background-image: linear-gradient(120deg, rgba(7,16,29,.92) 0%, rgba(13,47,79,.8) 55%, rgba(19,78,127,.62) 100%), url('/landing-bg.webp'); background-size: cover; background-position: center; }
.landing-hero-inner { max-width: 660px; }
.landing-hero .dealer-badge { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #eaf2fb; padding: 8px 14px 8px 10px; gap: 10px; }
.landing-hero .dealer-logo { display: inline-flex; background: #fff; border-radius: 8px; padding: 4px 7px; }
.landing-hero .dealer-logo img { width: 66px; height: auto; display: block; }
.landing-hero .dealer-badge b { color: #fff; }
.landing-hero h1 { font-size: 38px; line-height: 1.3; margin: 18px 0 12px; max-width: 24ch; }
.landing-hero p { font-size: 16.5px; line-height: 1.95; max-width: 54ch; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-cta .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 20px 0 0; padding: 0; }
.hero-points li { font-size: 13px; color: rgba(255,255,255,.86); padding-inline-start: 14px; position: relative; }
.hero-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 640px) {
  .landing-hero { padding: 28px 20px; }
  .landing-hero h1 { font-size: 27px; }
  .landing-hero p { font-size: 15px; }
  .landing-hero .dealer-logo img { width: 54px; }
  .hero-cta .btn { flex: 1; }
}

/* ---------- هدر رسمی صفحهٔ اصلی ---------- */
.landing-hero {
  background: #fff;
  background-image: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 38px;
  box-shadow: none;
  overflow: visible;
}
.landing-hero-inner { max-width: 760px; }
.official-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.official-logo { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; background: #fff; }
.official-logo img { width: 76px; height: auto; display: block; }
.official-title { display: flex; flex-direction: column; gap: 3px; }
.official-kicker { font-size: 13px; color: var(--muted); }
.official-code { font-size: 13px; color: var(--ink); font-weight: 500; }
.landing-hero h1 { font-size: 34px; line-height: 1.35; color: var(--ink); margin: 0 0 10px; max-width: none; }
.landing-hero p { color: var(--muted); font-size: 16px; line-height: 1.95; max-width: 64ch; margin: 0; }
.official-meta { display: flex; gap: 18px; list-style: none; margin: 18px 0 0; padding: 0; flex-wrap: wrap; }
.official-meta li { font-size: 13px; color: var(--muted); }
.official-meta li + li { border-inline-start: 1px solid var(--line); padding-inline-start: 18px; }
.landing-hero .hero-cta { margin-top: 22px; }
.landing-hero .btn-primary { background: var(--brand); color: #fff; }
.landing-hero .btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.landing-hero .btn-outline:hover { background: #f2f7fc; }
@media (max-width: 640px) {
  .landing-hero { padding: 24px 18px; }
  .landing-hero h1 { font-size: 26px; }
  .landing-hero p { font-size: 15px; }
  .official-logo img { width: 62px; }
  .hero-cta .btn { flex: 1; }
}

/* ---------- نظام طراحی: توکن‌ها و دسترس‌پذیری ---------- */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(16, 32, 58, .06);
  --shadow-md: 0 8px 24px rgba(16, 32, 58, .08);
  --focus-ring: 0 0 0 3px rgba(29, 111, 184, .35);
}

html, body { max-width: 100%; overflow-x: hidden; }

:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.btn { min-height: 44px; border-radius: var(--radius-sm); }
input, select, textarea { min-height: 44px; border-radius: var(--radius-sm); }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { box-shadow: var(--focus-ring); }

.card, .product-card, .landing-sample-card { border-radius: var(--radius-md); }



/* سربرگ در عرض موبایل: شکستن منظم به‌جای سرریز افقی */
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .brand-logo { height: 30px; }
  .topbar-inner .search { order: 9; flex: 1 1 100%; }
  .topnav { margin-inline-start: 0; }
}

/* ---------- حفظ پس‌زمینهٔ بالای صفحه با محتوای رسمی ---------- */
.landing-hero {
  background-color: #0b1a2b;
  background-image: linear-gradient(120deg, rgba(7,16,29,.93) 0%, rgba(13,47,79,.84) 55%, rgba(19,78,127,.70) 100%), url('/landing-bg.webp');
  background-size: cover;
  background-position: center;
  border-color: rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  color: #fff;
}
.landing-hero h1 { color: #fff; }
.landing-hero p { color: rgba(255,255,255,.84); }
.official-head { border-bottom-color: rgba(255,255,255,.22); }
.official-kicker { color: rgba(255,255,255,.76); }
.official-code { color: #fff; }
.official-logo { background: #fff; border-color: rgba(255,255,255,.5); }
.official-meta li { color: rgba(255,255,255,.86); }
.official-meta li + li { border-inline-start-color: rgba(255,255,255,.24); }
.landing-hero .btn-primary { background: var(--accent); color: #231400; }
.landing-hero .btn-primary:hover { background: #ffb02e; }
.landing-hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.landing-hero .btn-outline:hover { background: rgba(255,255,255,.12); }

/* ---------- لوگوی بزرگ‌تر در کادر سفید ---------- */
.official-logo { padding: 4px 7px; }
.official-logo img { width: 112px; height: auto; display: block; }
@media (max-width: 640px) {
  .official-logo img { width: 92px; }
}

/* ---------- اندازهٔ نهایی لوگو مطابق استاندارد ---------- */
.official-logo img { width: 120px; }
@media (max-width: 640px) { .official-logo img { width: 96px; } }

/* ---------- کادر متن و لوگوی بیرون کادر ---------- */
.official-head { gap: 18px; align-items: center; }
.official-title { background: #fff; border-radius: 10px; padding: 10px 16px; display: flex; flex-direction: column; gap: 3px; }
.official-kicker { color: var(--muted); font-size: 13px; }
.official-code { color: var(--brand); font-size: 14px; font-weight: 700; }
.official-logo { background: transparent; border: 0; padding: 0; }
.official-logo img { width: 150px; height: auto; }
@media (max-width: 640px) {
  .official-title { padding: 8px 12px; }
  .official-kicker { font-size: 12px; }
  .official-code { font-size: 13px; }
  .official-logo img { width: 112px; }
}

/* ---------- روشن‌تر شدن نقشهٔ گرافیکی سمت چپ ---------- */
.landing-hero {
  background-image: linear-gradient(to left, rgba(7,16,29,.34) 0%, rgba(7,16,29,.70) 45%, rgba(9,26,45,.95) 100%), url('/landing-bg.webp');
  background-position: center, left center;
}

/* ---------- لوگوی برداری رسمی ایساکو ---------- */
.official-logo img { width: 190px; filter: brightness(0) invert(1); opacity: .96; }
@media (max-width: 640px) { .official-logo img { width: 132px; } }

/* ---------- لوگوی برداری سفید روی زمینهٔ تیره ---------- */
.official-logo img { width: 200px; filter: none; opacity: 1; }
@media (max-width: 640px) { .official-logo img { width: 142px; } }

/* ---------- پس‌زمینهٔ واضح‌تر سمت چپ ---------- */
.landing-hero {
  background-image: linear-gradient(to left, rgba(7,16,29,.28) 0%, rgba(7,16,29,.58) 42%, rgba(9,26,45,.93) 100%), url('/landing-bg-clear.webp');
  background-position: center, left center;
  background-size: cover, cover;
}

/* ---------- محو شدن تیرگی از راست به چپ ---------- */
.landing-hero {
  background-image: linear-gradient(to left, rgba(7,16,29,.96) 0%, rgba(7,16,29,.72) 40%, rgba(7,16,29,.18) 78%, rgba(7,16,29,0) 100%), url('/landing-bg-clear.webp');
}

/* ---------- تصویر سمت چپ با محو شدن نرم به سمت راست ---------- */
.landing-hero {
  position: relative;
  overflow: hidden;
  background-color: #0a1a2c;
  background-image: none;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/landing-bg-clear.webp') left center / cover no-repeat;
  opacity: .95;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 38%, rgba(0,0,0,.55) 62%, transparent 88%);
  mask-image: linear-gradient(to right, #000 0%, #000 38%, rgba(0,0,0,.55) 62%, transparent 88%);
  pointer-events: none;
  z-index: 0;
}
.landing-hero > * { position: relative; z-index: 1; }

/* ---------- تصویر قطعات ملایم‌تر ---------- */
.landing-hero::before {
  opacity: .58;
  filter: saturate(.8) brightness(.9);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 32%, rgba(0,0,0,.45) 58%, transparent 82%);
  mask-image: linear-gradient(to right, #000 0%, #000 32%, rgba(0,0,0,.45) 58%, transparent 82%);
}

/* ---------- نمایش کامل تصویر قطعات بدون برش ---------- */
.landing-hero::before {
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
  opacity: .62;
}

/* ---------- محو شدن کامل پیش از لبهٔ تصویر ---------- */
.landing-hero::before {
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 26%, rgba(0,0,0,.5) 44%, transparent 60%);
  mask-image: linear-gradient(to right, #000 0%, #000 26%, rgba(0,0,0,.5) 44%, transparent 60%);
}

/* ---------- تصویر کامل و گذار یکدست تیره از راست به چپ ---------- */
.landing-hero {
  background-color: #0a1a2c;
  background-image: none;
}
.landing-hero::before {
  background: url('/landing-bg-final.webp') left center / contain no-repeat;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,26,44,0) 0%, rgba(10,26,44,.18) 42%, rgba(10,26,44,.72) 68%, rgba(10,26,44,.96) 86%, #0a1a2c 100%);
  pointer-events: none;
  z-index: 0;
}
.landing-hero > * { position: relative; z-index: 1; }

/* ---------- یکدست شدن گذار و پنهان شدن لبهٔ تصویر ---------- */
.landing-hero::after {
  background: linear-gradient(to right, rgba(10,26,44,0) 0%, rgba(10,26,44,.10) 34%, rgba(10,26,44,.45) 50%, rgba(10,26,44,.88) 61%, #0a1a2c 68%, #0a1a2c 100%);
}

/* ---------- پنهان‌کردن کامل لبهٔ راست تصویر ---------- */
.landing-hero::after {
  background: linear-gradient(to right, rgba(10,26,44,0) 0%, rgba(10,26,44,.12) 22%, rgba(10,26,44,.42) 40%, rgba(10,26,44,.78) 51%, rgba(10,26,44,.97) 57%, #0a1a2c 60%, #0a1a2c 100%);
}

/* ---------- گذار یکنواخت تیره تا روشن در کل باکس ---------- */
.landing-hero {
  background-color: #0a1a2c;
  background-image: none;
}
.landing-hero::before {
  background: url('/landing-bg-wide.webp') left center / cover no-repeat;
  opacity: 1;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.landing-hero::after {
  background: linear-gradient(to right, rgba(10,26,44,0) 0%, rgba(10,26,44,.22) 32%, rgba(10,26,44,.52) 55%, rgba(10,26,44,.82) 76%, rgba(10,26,44,.97) 92%, #0a1a2c 100%);
}

/* ---------- لوگو بالا و نوشته‌های هم‌رنگ زیر آن ---------- */
.official-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.official-title {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 3px;
  align-items: flex-start;
  text-align: right;
}
.official-kicker { color: rgba(255,255,255,.92); font-size: 14px; }
.official-code { color: #ffffff; font-size: 14px; font-weight: 500; }
@media (max-width: 640px) {
  .official-logo img { width: 150px; }
  .official-kicker, .official-code { font-size: 13px; }
}

/* ---------- لوگوی اصلی ایساکو با متن وسط‌چین زیر آن ---------- */
.official-head {
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 16px;
}
.official-logo img { width: 230px; }
.official-title { align-items: center; text-align: center; gap: 2px; }
.official-kicker { color: rgba(255,255,255,.92); font-size: 14px; }
.official-code { color: #ffffff; font-size: 14px; font-weight: 500; }
@media (max-width: 640px) {
  .official-logo img { width: 168px; }
  .official-kicker, .official-code { font-size: 13px; }
}

/* ---------- بالاتر بردن بلوک و خط جداکننده زیر لوگو ---------- */
.official-head { margin-top: -12px; gap: 0; }
.official-title {
  width: 100%;
  max-width: 230px;
  padding-top: 9px;
  margin-top: 7px;
  border-top: 1px solid rgba(255,255,255,.28);
}
@media (max-width: 640px) {
  .official-title { max-width: 168px; }
}

/* ---------- بالاتر بردن بیشتر بلوک لوگو ---------- */
.landing-hero { padding-top: 22px; }
.official-head { margin-top: -16px; }

/* ---------- نزدیک‌تر به لبهٔ بالای باکس ---------- */
.landing-hero { padding-top: 10px; }
.official-head { margin-top: -6px; }

/* ---------- کمی بالاتر و رنگ‌های ملایم‌تر ---------- */
.landing-hero { padding-top: 4px; }
.official-head { margin-top: -10px; }

:root {
  --ink: #1c2b3f;
  --muted: #5c6c80;
  --brand: #155a8c;
  --brand-2: #2b7cb8;
  --line: #e6ebf2;
  --bg: #f5f7fb;
}
.topbar { background: linear-gradient(135deg, #164a74, #1d6296 55%, #2b7cb8); }
.landing-hero { background-color: #12283e; }
.landing-hero::after {
  background: linear-gradient(to right, rgba(18,40,62,0) 0%, rgba(18,40,62,.22) 32%, rgba(18,40,62,.52) 55%, rgba(18,40,62,.82) 76%, rgba(18,40,62,.97) 92%, #12283e 100%);
}

/* ---------- چیدمان بالای باکس: لوگو در لبهٔ بالا ---------- */
.landing-hero { display: block; min-height: 0; padding-top: 14px; }
.official-head { margin-top: 0; }

/* ---------- نگه‌داشتن ارتفاع باکس تا تصویر بریده نشود ---------- */
.landing-hero { min-height: 420px; }

/* ---------- پایین آوردن تیتر و دکمه‌ها ---------- */
.landing-hero h1 { margin-top: 64px; }

/* ---------- جستجوی زندهٔ کالا و مشتری ---------- */
.ac-wrap { position: relative; margin: 4px 0 10px; }
.ac-list { position: absolute; z-index: 60; inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.ac-item { padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f1f4f8; }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: #f2f7fc; }

/* ---------- ستون موجودی در نتایج جستجوی کالا ---------- */
.ac-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.ac-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-stock { font-size: 12px; color: var(--ink); white-space: nowrap; }
.ac-price { white-space: nowrap; }
@media (max-width: 640px) {
  .ac-item { grid-template-columns: minmax(0, 1fr) auto; }
  .ac-price { display: none; }
}

/* ---------- هویت بصری فرم‌های پنل ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.panel .field { display: grid; gap: 6px; align-content: start; }
.panel .field > span { font-size: 13px; color: #33465c; }
.panel .field input, .panel .field select, .panel .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); min-height: 44px; }
.panel .field input:focus, .panel .field select:focus, .panel .field textarea:focus { outline: 2px solid #cfe0f3; border-color: #9dc0e6; }
.panel .table .mini-input { width: 100%; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.notice-box { padding: 10px 14px; border-radius: 10px; border: 1px solid #f1c7c7; background: #fdf2f2; color: #9b1c1c; font-size: 13px; margin-bottom: 14px; }
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}

/* ---------- کشوی پیشنهاد زیر کادر، نه روی آن ---------- */
.ac-wrap { position: relative; }
.ac-list {
  top: calc(100% + 6px);
  bottom: auto;
  inset-inline: 0;
  z-index: 90;
}
.panel .field.ac-wrap { position: relative; }

/* ---------- فیلد شمارهٔ همراه در تکمیل سفارش ---------- */
.form input[type="tel"] { direction: ltr; text-align: left; }

/* ---------- فرایند سفارش: فشرده و مطابق هویت بصری ---------- */
.order-flow { padding: 12px 14px; border-radius: var(--radius); }
.flow-head { margin-bottom: 10px; font-size: 13px; }
.flow-step { min-width: 106px; gap: 6px; }
.flow-dot { width: 20px; height: 20px; font-size: 10.5px; }
.flow-step b { font-size: 11.5px; line-height: 1.45; }
.flow-meta { font-size: 10px; margin-top: 1px; }
.flow-line { min-width: 8px; height: 1.5px; margin-top: 9px; }
@media (max-width: 760px) { .flow-step { min-width: 96px; } }

/* ---------- دکمه‌های مثبت و منفی در ردیف سفارش ---------- */
.order-edit-row .stepper { display: flex; align-items: center; gap: 2px; }
.order-edit-row .stepper .step { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--brand); font-size: 15px; line-height: 1; cursor: pointer; }
.order-edit-row .stepper .step:hover { background: #f2f7fc; }
.order-edit-row .stepper .qty-input { width: 56px; text-align: center; }

/* ---------- تناسب ستون‌ها و دکمه‌های ردیف سفارش ---------- */
.order-edit-head, .order-edit-row { grid-template-columns: minmax(0, 1fr) 86px 118px 112px 112px 120px; align-items: center; }
.order-edit-row .stepper { justify-content: center; gap: 3px; }
.order-edit-row .stepper .step { width: 30px; height: 34px; border-radius: 8px; font-size: 16px; }
.order-edit-row .stepper .qty-input { width: 46px; height: 34px; border-radius: 8px; font-size: 13.5px; }
@media (max-width: 1100px) {
  .order-edit-head, .order-edit-row { grid-template-columns: minmax(0, 1fr) 70px 112px 106px 106px 110px; }
  .order-edit-row .stepper .step { width: 26px; }
  .order-edit-row .stepper .qty-input { width: 42px; }
}

/* ---------- دکمه‌های عمودی بالا/پایین کنار فیلد ---------- */
.order-edit-row .stepper.vstep { display: flex; align-items: stretch; gap: 4px; justify-content: center; }
.vstep-buttons { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.vstep-buttons .step { width: 24px; height: 16px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--brand); display: grid; place-items: center; cursor: pointer; line-height: 0; }
.vstep-buttons .step:hover { background: #f2f7fc; }
.vstep .qty-input { width: 52px; height: 34px; }

/* ---------- ستون مالیات بر ارزش افزوده ---------- */
.order-edit-head, .order-edit-row { grid-template-columns: minmax(0, 1fr) 76px 116px 96px 96px 82px 118px; }
.order-edit-row .row-vat { display: flex; justify-content: center; align-items: center; }
.order-edit-row .row-vat input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
@media (max-width: 1100px) {
  .order-edit-head, .order-edit-row { grid-template-columns: minmax(0, 1fr) 64px 108px 88px 88px 74px 108px; }
}

/* ---------- اندازهٔ نشان اعتماد ---------- */
.enamad-trust img { width: 200px; height: auto; }

/* ---------- وسط‌چین کردن نشان اعتماد ---------- */
.enamad-trust { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.enamad-trust a { display: inline-block; }
.enamad-trust img { display: block; margin: 0 auto; }

/* نشان اعتماد: اندازهٔ اصلی تصویر رسمی حفظ شود */
.enamad-trust img { width: auto; height: auto; }

/* ============================================================
   یکسان‌سازی هویت بصری در همهٔ صفحات (مشتری، کارمند، مدیر، مهمان)
   ============================================================ */
body { background: var(--bg); color: var(--ink); }

h1, h2, h3, h4 { color: var(--ink); letter-spacing: 0; }
.page-head h1 { font-size: 24px; line-height: 1.35; }
.page-head { margin-bottom: 18px; }

.card, .panel, .form-card, .settings-card, .order-card, .account-card, .item-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.btn {
  border-radius: 10px;
  min-height: 40px;
  font-weight: 500;
  border: 1px solid transparent;
}
.btn-sm { min-height: 32px; border-radius: 8px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }

input, select, textarea, .mini-input, .qty-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #cfe0f3; border-color: #9dc0e6; }

.table { border-color: var(--line); border-radius: var(--radius); }
.table th { color: var(--muted); font-weight: 600; background: #f7f9fc; }
.table td { border-color: var(--line); }

.alert { border-radius: 10px; border: 1px solid var(--line); }
.alert.warn { background: #fff8e8; border-color: #f3d9a4; }
.alert.ok { background: #eefaf3; border-color: #bfe6d1; }

.tag, .pack-badge, .order-status, .badge { border-radius: 999px; }

.filters { gap: 8px; flex-wrap: wrap; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.footer, .site-footer { border-color: rgba(255,255,255,.12); }
@media (max-width: 760px) {
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head h1 { font-size: 21px; }
}

/* ---------- دکمهٔ بررسی با کادر مشخص ---------- */
.btn-outline {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  padding-inline: 14px;
}
.btn-outline:hover { background: #eef4fb; color: var(--brand); }
.btn-outline:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* ---------- نظم چیدمان کلیدها و نوار اقدام ---------- */
.order-page-head { align-items: center; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.order-actions-info { font-size: 14px; }
.order-actions-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.order-flow .flow-steps { overflow-x: auto; padding-bottom: 6px; }
.alert { margin: 8px 0; padding: 10px 14px; }
@media (max-width: 900px) {
  .order-page-head { align-items: flex-start; }
  .page-actions { width: 100%; justify-content: space-between; }
  .order-actions { flex-direction: column; align-items: stretch; }
  .order-actions-buttons { width: 100%; }
  .order-actions-buttons .btn { flex: 1; }
}

/* ---------- نوارهای اقدام و پیام‌های مرتب ---------- */
.alert { text-align: right; display: block; }
.order-actions {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
}
.order-decision {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.order-decision form { margin: 0; }
@media (max-width: 900px) {
  .order-decision { flex-direction: column; align-items: stretch; }
  .order-decision .btn { width: 100%; }
}

/* ---------- یادداشت مشتری برای مدیر فروش ---------- */
.comment-list { list-style: none; padding: 0; margin: 10px 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.comment-list li:last-child { border-bottom: 0; }
.comment-list p { margin: 4px 0 0; font-size: 13.5px; }
.comment-form { display: grid; gap: 8px; margin-top: 10px; }
.comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.comment-form .btn { justify-self: start; }

/* ---------- عنوان بخش تصمیم مالی ---------- */
.decision-title { width: 100%; font-weight: 700; font-size: 14px; margin-bottom: 4px; }

/* ---------- اولویت نمایش در صفحهٔ سفارش مشتری ---------- */
.order-top .order-status-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  background: #eef4fb;
  color: #0b4ea2;
  margin: 6px 0 12px;
}
.order-status-big .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st-top-awaiting_payment .order-status-big { background: #fff4e2; color: #b45309; }
.st-top-awaiting_finance .order-status-big { background: #e8f0fc; color: #134e7f; }
.st-top-awaiting_customer .order-status-big { background: #fff4e2; color: #b45309; }
.st-top-invoiced .order-status-big,
.st-top-warehouse .order-status-big,
.st-top-shipped .order-status-big { background: #e9f7f0; color: #12805c; }
.st-top-rejected .order-status-big { background: #fdecec; color: #b91c1c; }

.order-top .order-next { font-size: 15px; color: var(--ink); max-width: 62ch; margin: 0 auto; }

.order-payment {
  max-width: 720px;
  margin: 16px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
}
.order-payment h3 { margin: 0 0 4px; font-size: 15px; }
.order-payment .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.order-payment .row:last-child { border-bottom: 0; }

/* ---------- گفت‌وگوی یادداشت مشتری و کارشناس ---------- */
.comment-staff { background: #f2f7fc; border-radius: 10px; padding: 8px 12px; border-bottom: 0; margin: 4px 0; }
.comment-form .btn { justify-self: end; }

/* ---------- دکمهٔ به‌روزرسانی وضعیت سفارش ---------- */
.order-refresh-wrap { margin: 4px 0 12px; }
.order-refresh { padding-inline: 16px; }

/* ---------- تاریخچهٔ سفارش با اسکرول ---------- */
.history-scroll { max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.history-scroll h3 { position: sticky; top: 0; background: var(--card); padding-bottom: 8px; z-index: 1; }

/* ---------- شمارهٔ ردیف تاریخچه ---------- */
.history-row { align-items: center; }
.history-no { font-style: normal; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: #eef4fb; color: var(--brand); font-size: 12px; display: grid; place-items: center; }

/* ---------- نوار گرافیکی وضعیت سفارش: چیدمان و هویت بصری ---------- */
.order-flow { padding: 16px 18px; }
.flow-head { font-size: 14px; }
.flow-steps { gap: 0; align-items: flex-start; }
.flow-step { flex: 1 1 0; min-width: 132px; gap: 8px; align-items: flex-start; }
.flow-body b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.7; color: var(--ink); }
.flow-meta { display: block; font-size: 10.5px; line-height: 1.7; color: var(--muted); margin-top: 1px; }
.flow-dot { width: 24px; height: 24px; font-size: 11.5px; font-weight: 700; }
.flow-step.done .flow-dot { background: #16a34a; }
.flow-line { margin-top: 12px; height: 2px; background: #e2e8f0; }
.flow-line.done { background: #16a34a; }
.flow-step.current .flow-dot { background: var(--brand); box-shadow: 0 0 0 4px rgba(21,90,140,.16); }
.flow-step.todo .flow-dot { background: #eef3fb; color: #64748b; }

@media (max-width: 1100px) {
  .flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; overflow: visible; }
  .flow-line { display: none; }
  .flow-step { min-width: 0; }
}
@media (max-width: 620px) {
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-body b { font-size: 11.5px; }
}

/* ---------- تقویم: آیکون خواناتر و تاریخ پیش‌فرض امروز ---------- */
.date-pick { border: 1px solid #cfe0f3; background: #eef4fb; color: var(--brand); border-radius: 10px; width: 34px; height: 34px; }
.date-pick:hover { background: #dce9f8; color: #0b4ea2; }
.date-field .date-pick { border: 1px solid #cfe0f3; background: #eef4fb; color: var(--brand); }
.date-field .date-pick:hover { background: #dce9f8; color: #0b4ea2; }
.date-pick svg { width: 18px; height: 18px; stroke-width: 2.2; }
.date-input.is-default { color: #9aa8ba; }
.date-input.is-default:focus,
.date-input.is-default:hover { color: var(--ink); }

/* ---------- اصلاح فاصلهٔ تاریخ و آیکون ---------- */
.date-field input.date-input { padding-left: 44px; box-sizing: border-box; }

/* ---------- باکس شمارهٔ حواله انبار ---------- */
.wh-number-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 12px; padding: 12px 16px; margin: 4px 0 8px; }
.wh-number-box span { font-size: 13px; color: var(--muted); }
.wh-number-box b { font-size: 20px; color: var(--brand); letter-spacing: .04em; }

/* ---------- نشانگر اتصال سپیدار ---------- */
.sepidar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf7f0;
  color: #12805c;
  border: 1px solid #bfe6d1;
  white-space: nowrap;
}
.sepidar-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; display: inline-block; }
.sepidar-badge.off { background: #fdecec; color: #b91c1c; border-color: #f5c2c2; }
.sepidar-badge.off .dot { background: #dc2626; }
.sepidar-badge.checking { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.sepidar-badge.checking .dot { background: #94a3b8; }
@media (max-width: 760px) {
  .sepidar-badge { font-size: 10.5px; padding: 4px 8px; }
}

/* نشانگر سپیدار داخل گزارش آخرین خوانش */
.source-note .sepidar-badge { margin-right: 8px; }

/* ---------- جایگزین تصویر برای کالاهای بدون عکس ---------- */
.prod-noimg { width: 100%; aspect-ratio: 1/1; border-radius: 12px; margin-bottom: 8px; background: #f2f6fb; color: #94a3b8; display: grid; place-items: center; }

/* نشانگر قابل کلیک با زمان بررسی */
.sepidar-badge { cursor: pointer; font-family: inherit; }
.sepidar-badge:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.sepidar-time { font-size: 10px; opacity: .75; margin-right: 2px; }

/* ---------- ویرایش و حذف مشتری ---------- */
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-actions .inline-form { display: inline; margin: 0; }
.btn-danger { color: #b91c1c; border-color: #f5c2c2; background: #fff; }
.btn-danger:hover { background: #fdecec; color: #991b1b; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .field-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- قاعدهٔ سراسری: هر دکمهٔ ثانویه کادر داشته باشد ---------- */
.btn:not(.btn-primary):not(.btn-outline):not(.btn-danger) {
  background: #fff;
  border: 1px solid #cfe0f3;
  color: var(--brand);
}
.btn:not(.btn-primary):not(.btn-outline):not(.btn-danger):hover {
  background: #eef4fb;
  color: #0b4ea2;
}

/* ---------- نظم جدول کارمندان ---------- */
.staff-table td { vertical-align: middle; }
.staff-table .row-actions { gap: 8px; }
.staff-table .row-actions .btn { min-height: 32px; }

/* ============================================================
   الزام سند هویت بصری در همهٔ صفحه‌ها و نقش‌ها
   ============================================================ */
:root { --field-h: 38px; --action-gap: 8px; }

.page-head { align-items: center; gap: 12px; }
.page-head .page-actions { display: flex; align-items: center; gap: var(--action-gap); flex-wrap: wrap; }

.section { margin-top: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { font-size: 16px; margin: 0; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 10px 12px; vertical-align: middle; }
.table th { font-size: 12.5px; font-weight: 600; }
.table td { font-size: 13.5px; }
.table tr:hover td { background: #fafcff; }

/* فرم‌های داخل جدول: افقی، هم‌ارتفاع و هم‌تراز */
.table form.inline-form,
.settings-row form,
.row-actions form { display: flex; align-items: center; gap: 6px; margin: 0; flex-wrap: wrap; }
.table form.inline-form input,
.table form.inline-form select,
.row-actions form input,
.row-actions form select { min-height: 32px; height: 32px; }
.table form.inline-form .btn,
.row-actions form .btn { min-height: 32px; }

/* ورودی‌ها و انتخاب‌ها: ارتفاع و گردی یکسان */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea { min-height: var(--field-h); border-radius: 10px; }
select { padding-inline: 10px; }

/* نوارهای فیلتر و اقدام */
.filters, .action-bar, .settings-actions { display: flex; align-items: center; gap: var(--action-gap); flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: var(--action-gap); flex-wrap: wrap; }

/* برچسب‌ها و وضعیت‌ها */
.stock, .badge, .badge-ok, .badge-warn { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; }

/* کارت‌ها و پنل‌ها */
.dash-panel, .form-card, .settings-card, .order-card, .account-card, .item-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

/* جدول‌های پهن در موبایل */
@media (max-width: 760px) {
  .section { overflow-x: auto; }
  .table { min-width: 640px; }
  .table-stack { min-width: 0; }
  .page-head { align-items: flex-start; }
  .page-head .page-actions { width: 100%; }
}

/* استثنای ورودی‌های فشرده */
.mini-input, .qty-input, .search-input, .mini-select { min-height: 32px; height: 32px; }

/* ---------- چیدمان صفحهٔ وضعیت سامانه ---------- */
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.res-grid .res-card { height: 100%; }
.res-grid .sec-card { grid-column: auto; }
@media (max-width: 760px) {
  .res-grid { grid-template-columns: 1fr; }
}

/* هم‌اندازه بودن دکمه‌های نوار اقدام */
.settings-actions .btn,
.page-actions .btn,
.page-head .btn { min-height: 40px; border-radius: 10px; padding-inline: 16px; }
.settings-actions form,
.page-actions form { margin: 0; display: flex; }

/* دکمهٔ متنی بدون کادر */
.btn-link { border: 0; background: transparent; color: var(--brand); padding-inline: 8px; }
.btn-link:hover { background: transparent; color: #0b4ea2; text-decoration: underline; }

/* اولویت دکمهٔ متنی بر قاعدهٔ سراسری دکمه‌ها */
.btn.btn-link { border: 0 !important; background: transparent !important; box-shadow: none; }

/* ---------- چیدمان فشردهٔ بالای صفحهٔ خانه پس از حذف متن‌ها ---------- */
.hero { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero-text { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats .stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 120px; display: flex; flex-direction: column; }
.hero-stats .stat b { font-size: 18px; }
.hero-stats .stat span { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .hero, .hero-text, .hero-stats { width: 100%; } }

/* نشان ایساکو در بالای صفحهٔ خانه مانند صفحهٔ اول */
.hero .official-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero .official-logo img { width: 230px; height: auto; display: block; }
.hero .official-title { display: flex; flex-direction: column; gap: 4px; }
.hero .official-kicker { font-size: 14px; color: var(--ink); }
.hero .official-code { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .hero .official-logo img { width: 180px; } }

/* اصلاح چیدمان نشان ایساکو در صفحهٔ خانه */
.hero .official-head { flex-wrap: nowrap; border: 0; padding: 0; margin: 0; }
.hero .official-logo { border: 0; padding: 0; background: transparent; }
.hero .official-logo img { width: 200px; }
.hero .official-title { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
@media (max-width: 760px) {
  .hero .official-head { flex-wrap: wrap; }
  .hero .official-logo img { width: 160px; }
}

/* ردیف افقی لوگو و عنوان در صفحهٔ خانه */
.hero .official-head { flex-direction: row; align-items: center; }

/* هم‌اندازه با لوگوی صفحهٔ اول */
.hero .official-logo img { width: 230px; }
@media (max-width: 760px) { .hero .official-logo img { width: 170px; } }

/* فاصلهٔ وزین لوگو از لبهٔ کادر */
.hero .official-head { margin-inline-start: 24px; margin-inline-end: 4px; }
@media (max-width: 760px) { .hero .official-head { margin-inline-start: 0; } }

/* ردیف پایین صفحهٔ تایپ صوتی */
.voice-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-actions .mic-btn { width: auto; min-height: 40px; padding: 0 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.voice-actions .mic-btn svg { width: 20px; height: 20px; }
.voice-actions .btn { min-height: 40px; }
@media (max-width: 760px) { .voice-actions { width: 100%; } .voice-actions .btn, .voice-actions .mic-btn { flex: 1; justify-content: center; } }

/* ---------- سرصفحهٔ صفحهٔ مدیریت کاربران ---------- */
.manage-head { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.manage-head .page-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.manage-head .page-actions form { margin: 0; display: inline-flex; }
.manage-head .btn { min-height: 34px; }
.role-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0 16px; }
.role-chip { background: transparent; border: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.role-chip b { color: var(--ink); margin-inline-end: 4px; }

/* حالت مشاهده در نمای کارمند */
.preview-exit-form { position: fixed; bottom: 18px; left: 18px; z-index: 9999; margin: 0; }
.preview-exit-form .btn { box-shadow: 0 8px 22px rgba(15, 42, 68, .28); min-height: 42px; padding-inline: 18px; }

/* هایلایت واژه‌های جستجو */
mark.search-hit { background: #fff1c2; color: var(--brand); border-radius: 3px; padding: 0 2px; }

/* نشان سپیدار در فوتر: کوچک و هم‌تراز */
.footer-inner .sepidar-badge { flex: 0 0 auto; width: max-content; max-width: 100%; height: auto; align-self: flex-start; margin-top: 8px; }

/* هم‌رنگ با هایلایت جستجوی مشتری: پس‌زمینهٔ آبی روشن */
mark.search-hit { background: #eaf2ff; color: #0b4f9c; border-radius: 4px; padding: 0 2px; }

/* چیدمان مرتب نتایج جستجو: هر نتیجه یک ردیف متنی */
.search-list { gap: 8px; }
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  flex-wrap: nowrap;
}
.search-row:hover { background: #f8fafc; }
.search-title { grid-column: 1 / -1; font-weight: 600; font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.search-sub { font-size: 12px; color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
.search-meta { grid-column: 2; grid-row: 2; justify-self: end; white-space: nowrap; background: #eef4fb; color: var(--brand); border-radius: 999px; padding: 3px 10px; font-size: 12px; }


/* چیدمان نتایج جستجوی مشتری در فهرست کشویی */
.ac-item.ac-customer { grid-template-columns: minmax(0, 1fr) auto; }
.ac-item.ac-customer .ac-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item.ac-customer .ac-mobile { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- نمای گرافیکی وظایف ---------- */
.tg-list { display: flex; flex-direction: column; gap: 14px; }
.tg-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tg-title { font-size: 15px; }
.tg-status { font-size: 12px; border-radius: 999px; padding: 3px 12px; background: #eef4fb; color: var(--brand); }
.tg-status.ok { background: #e9f7f0; color: #12805c; }
.tg-status.late, .tg-status.overdue { background: #fdecec; color: #b91c1c; }
.tg-status.open { background: #fff4e2; color: #b45309; }
.tg-desc { margin: 6px 0 0; }
.tg-flow { display: flex; align-items: stretch; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.tg-node { flex: 1 1 0; min-width: 150px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.tg-node small { font-size: 11px; color: var(--muted); }
.tg-node b { font-size: 13px; }
.tg-state { background: #eef4fb; border-color: #cfe0f3; }
.tg-arrow { align-self: center; color: var(--brand); font-size: 18px; }
.tg-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tg-timeline { list-style: none; margin: 8px 0 0; padding: 0 14px 0 0; border-right: 2px solid #e6eef7; }
.tg-timeline li { position: relative; padding: 6px 14px 6px 0; }
.tg-timeline .tg-dot { position: absolute; right: -7px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.tg-timeline b { display: block; font-size: 12.5px; font-weight: 600; }
.tg-timeline small { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) { .tg-flow { flex-direction: column; } .tg-arrow { transform: rotate(-90deg); } }

/* عنوان بخش ورود یا ثبت‌نام */
.auth-title { font-size: 18px; margin: 18px 0 12px; }
.auth-card a { color: var(--brand); text-decoration: underline; }

/* ---------- کادر واحد ورود یا ثبت‌نام ---------- */
.auth-single { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 22px 24px; max-width: 720px; margin: 0 auto 26px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab { border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 999px; padding: 8px 18px; cursor: pointer; font: inherit; font-size: 13.5px; }
.auth-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-panel h3 { font-size: 16px; margin: 0 0 10px; }
.auth-help { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .auth-single { padding: 18px; } }

/* نشان درگاه پرداخت در سبد خرید */
.gateway-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 8px 10px; background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 10px; color: var(--brand); font-size: 12.5px; }
.gateway-note svg { flex: 0 0 auto; }

/* لوگوی رسمی زیبال در سبد خرید */
.gateway-note .zibal-logo { height: 18px; width: auto; display: block; }

/* لوگوی سرصفحه: واضح‌تر روی زمینهٔ آبی */
.brand-logo { filter: drop-shadow(0 1px 1px rgba(0,0,0,.28)); image-rendering: auto; }

/* جداکنندهٔ عمودی در دکمهٔ ورود یا ثبت‌نام */
.cta-auth { display: inline-flex; align-items: center; gap: 10px; }
.cta-auth .cta-sep { display: inline-block; width: 1px; height: 14px; background: rgba(255,255,255,.7); }
/* لوگوی شارپ‌تر */
.brand-logo { height: 54px; }

/* سرصفحه: نشان و نام بازرگانی به‌صورت متنی واضح */
.brand.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark-img { height: 46px; width: auto; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; color: #fff; }
.brand-text b { font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand-text small { font-size: 9.5px; letter-spacing: .16em; opacity: .95; white-space: nowrap; }
@media (max-width: 520px) {
  .brand-mark-img { height: 36px; }
  .brand-text b { font-size: 15px; }
  .brand-text small { font-size: 8px; letter-spacing: .1em; }
}
/* خط جداکننده هم‌رنگ متن دکمه */
.cta-auth .cta-sep { background: currentColor; opacity: .85; }

/* نام انگلیسی درشت‌تر و بولد */
.brand .brand-logo { height: 58px; }
.brand-text small { font-weight: 700; }

/* بازگشت به اندازهٔ قبلی لوگو */
.brand .brand-logo { height: 54px; }

/* حرکت نرم و زوم ملایم روی کادرهای قابل انتخاب */
select,
.mini-select,
.ac-item,
.item-card,
.product-card,
.landing-sample-card,
.dash-kpi,
.tag,
.filter-bar a,
.role-chip,
.pager a,
.topnav-link,
.flow-step {
  transition: transform 1s ease-in-out, box-shadow 1.5s ease, background-color 1.5s ease;
  transform-origin: center;
}
select:hover,
.mini-select:hover,
.ac-item:hover,
.item-card:hover,
.product-card:hover,
.landing-sample-card:hover,
.dash-kpi:hover,
.tag:hover,
.filter-bar a:hover,
.role-chip:hover,
.pager a:hover,
.flow-step:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(16, 42, 67, .12);
  z-index: 2;
}
select:focus-visible,
.mini-select:focus-visible {
  transform: scale(1.01);
}

/* زوم ملایم روی بقیهٔ اجزای قابل انتخاب */
.btn,
.link-btn,
.cart-link,
.admin-icon,
.nav-menu a,
.party-item,
.soc,
.more,
.cal-day,
.dash-tab,
.admin-head .btn,
.topnav-help,
.order-decision .btn,
.cart-actions .btn,
.row-actions .btn {
  transition: transform 1s ease-in-out, box-shadow 1.5s ease, background-color 1.5s ease;
  transform-origin: center;
}
.btn:hover,
.link-btn:hover,
.cart-link:hover,
.admin-icon:hover,
.nav-menu a:hover,
.party-item:hover,
.soc:hover,
.more:hover,
.cal-day:hover,
.dash-tab:hover,
.topnav-help:hover,
.row-actions .btn:hover {
  transform: scale(1.025);
  box-shadow: 0 6px 18px rgba(16, 42, 67, .14);
  z-index: 2;
}

/* بزرگ‌ترکردن لوگو برای خوانایی نام انگلیسی */
.brand .brand-logo { height: 74px; }
.topbar-inner { min-height: 84px; }
@media (max-width: 520px) { .brand .brand-logo { height: 44px; } }

/* لوگو بدون تغییر + نام انگلیسی درشت‌تر زیر آن */
.brand.brand-stacked { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.brand.brand-stacked .brand-logo { height: 54px; }
.brand-en { color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; white-space: nowrap; }
@media (max-width: 520px) { .brand.brand-stacked .brand-logo { height: 40px; } .brand-en { font-size: 8.5px; } }

/* بازگشت سرصفحه به حالت اول */
.brand .brand-logo { height: 54px; }
.topbar-inner { min-height: 74px; }
.brand-en { display: none !important; }

/* کارت‌های دارای عکس: به‌جای زوم، بالا آمدن نرم تا تصویر تار نشود */
.landing-sample-card,
.catalog-card,
.product-card,
.item-card,
.card {
  transition: transform 1s ease-in-out, box-shadow 1s ease, border-color 1s ease;
}
.landing-sample-card:hover,
.catalog-card:hover,
.product-card:hover,
.item-card:hover,
.card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px rgba(16, 42, 67, .14);
}
/* تصاویر در حالت عادی شارپ بمانند */
.landing-sample-card img,
.product-card img,
.item-card img,
.card img {
  image-rendering: auto;
  backface-visibility: hidden;
}

/* رفتن مستقیم به کادر ورود بدون دیدن تصویر بالای صفحه */
#auth { scroll-margin-top: 90px; }

/* نشان هر دو درگاه پرداخت */
.gateway-notes { display: grid; gap: 6px; margin: 10px 0 12px; }
.gateway-note { margin: 0; justify-content: space-between; }
.gateway-note span { font-weight: 600; }
.gateway-note .beh-logo { height: 18px; width: auto; display: block; }
.gateway-logos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gateway-logos img { height: 16px; width: auto; display: block; }
.gateway-logos img[alt="به‌پرداخت ملت"] { height: 22px; }

/* بزرگ‌ترکردن نشان به‌پرداخت برای خوانایی */
.gateway-note .beh-logo { height: 34px; }
.gateway-logos img[alt="به‌پرداخت ملت"] { height: 34px; }

/* نشان به‌پرداخت بزرگ‌تر و خوانا */
.gateway-note .beh-logo { height: 48px; }
.gateway-logos img[alt="به‌پرداخت ملت"] { height: 48px; }
