
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --brand: #0d9488;
  --brand-600: #0f766e;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --accent: #f97316;
  --accent-50: #fff7ed;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --success: #16a34a;
  --success-50: #f0fdf4;
  --warning: #d97706;
  --warning-50: #fffbeb;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06);
  --shadow: 0 1px 3px rgb(15 23 42 / .06), 0 8px 24px -12px rgb(15 23 42 / .12);
  --shadow-lg: 0 20px 50px -20px rgb(15 23 42 / .35);
  --r: 14px;
  --r-sm: 10px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-50: #0b2a28; --brand-100: #134e4a;
    --accent-50: #3a2212;
    --bg: #0b1120; --surface: #111827; --surface-2: #0f172a;
    --text: #e5e7eb; --text-2: #cbd5e1; --muted: #94a3b8; --border: #1f2a3c;
    --danger-50: #3b1212; --success-50: #0f2a19; --warning-50: #33240b;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.75;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: embed; text-align: left; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 28px; height: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--brand); color: #fff; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: var(--brand-600); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-600); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #ea580c; }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }
form.inline { display: inline; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text-2); }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field .error { font-size: 13px; color: var(--danger); margin-top: 5px; }
.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 13px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgb(13 148 136 / .15); }
textarea.input { resize: vertical; min-height: 96px; }
input[type="color"].input { padding: 4px; height: 44px; width: 90px; cursor: pointer; }
.field.has-error .input { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.field-check { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); }
.field-check label { margin: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px;
  background: #cbd5e1; position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(-18px); }

.upload { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1.5px dashed var(--border);
  border-radius: var(--r); background: var(--surface-2); }
.upload .preview { width: 84px; height: 84px; border-radius: var(--r-sm); background: var(--surface) center/cover no-repeat;
  border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.upload .preview.wide { width: 160px; max-width: 100%; height: 64px; }
.upload .preview img { width: 100%; height: 100%; object-fit: cover; }
.upload { flex-wrap: wrap; }
.upload > div:last-child { flex: 1; min-width: min(180px, 100%); }
.upload .file-input { width: 100%; }
.upload .file-input { font: inherit; font-size: 13px; max-width: 100%; }
.upload .clear { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.upload .clear input { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 5px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge-success { background: var(--success-50); color: var(--success); border-color: transparent; }
.badge-danger { background: var(--danger-50); color: var(--danger); border-color: transparent; }
.badge-warning { background: var(--warning-50); color: var(--warning); border-color: transparent; }
.badge-brand { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.badge-accent { background: var(--accent-50); color: var(--accent); border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 11px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.thumb { display: block; flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); }
.table td.actions { text-align: left; white-space: nowrap; }
.table td.actions > * + * { margin-right: 6px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--brand-50); color: var(--brand-600); margin-bottom: 14px; font-size: 14px; }
.alert-success { background: var(--success-50); color: var(--success); }
.alert-error, .alert-danger { background: var(--danger-50); color: var(--danger); }
.alert-warning { background: var(--warning-50); color: var(--warning); }
.alert .i { margin-top: 3px; }
.toasts { position: fixed; z-index: 100; top: 16px; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 32px)); }
.toasts .alert { box-shadow: var(--shadow-lg); animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .i { width: 44px; height: 44px; margin: 0 auto 10px; stroke-width: 1.4; color: var(--border); }

.copy-box { display: flex; gap: 8px; align-items: stretch; }
.copy-box input { flex: 1; min-width: 0; direction: ltr; text-align: left; font-size: 13.5px; background: var(--surface-2); }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0 0; }

.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand .ltr { letter-spacing: -.2px; }
.brand b { color: var(--brand); font-weight: 800; }

.hero { position: relative; overflow: hidden; padding: 64px 0 44px; text-align: center;
  background: radial-gradient(1000px 380px at 50% -10%, var(--brand-100), transparent 70%),
              radial-gradient(800px 300px at 0% 0%, var(--accent-50), transparent 60%); }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); font-weight: 900; letter-spacing: -.5px; margin-bottom: 10px; }
.hero p.lead { font-size: clamp(15px, 1.6vw, 18px); color: var(--text-2); max-width: 640px; margin-inline: auto; }
.search { display: flex; gap: 8px; margin: 26px auto 0; max-width: 640px; text-align: right; background: var(--surface);
  padding: 7px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.search .input { border: 0; box-shadow: none !important; font-size: 16px; }
.search select.input { max-width: 150px; background: var(--surface-2); }
@media (max-width: 560px) {
  .search { flex-wrap: wrap; }
  .search input.input { flex-basis: 100%; }
  .search select.input { max-width: none; flex: 1; }
}
.hero-stats { display: flex; gap: 28px; margin-top: 26px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 22px; color: var(--text); font-weight: 800; }

.section { padding: 32px 0; }
.section-head { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; }

.banners { display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 86%); gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.banner-card { position: relative; scroll-snap-align: start; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 7;
  color: #fff; box-shadow: var(--shadow); background: #0f172a; }
.banner-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.banner-card:hover img.bg { transform: scale(1.04); }
.banner-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .7), transparent 60%); }
.banner-card .info { position: absolute; inset: auto 0 0 0; z-index: 1; display: flex; gap: 12px; align-items: center; padding: 18px; }
.banner-card .info img { width: 54px; height: 54px; border-radius: 14px; border: 2px solid rgb(255 255 255 / .8); object-fit: cover; background: #fff; }
.banner-card h3 { margin: 0; font-size: 19px; color: #fff; }
.banner-card p { margin: 0; font-size: 13.5px; opacity: .9; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.shop-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  color: var(--text); transition: transform .2s, box-shadow .2s; }
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.shop-card .cover { aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--brand-100), var(--accent-50)); position: relative; }
.shop-card .cover .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-card .logo { position: absolute; bottom: -26px; right: 16px; width: 60px; height: 60px; border-radius: 16px;
  border: 3px solid var(--surface); background: var(--surface); object-fit: cover; box-shadow: var(--shadow-sm); }
.shop-card .logo.ph { display: grid; place-items: center; font-weight: 900; font-size: 22px; color: #fff; }
.shop-card .body { padding: 34px 16px 16px; }
.shop-card h3 { font-size: 17px; margin: 0 0 2px; }
.shop-card .meta { display: flex; gap: 12px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.shop-card .meta span { display: inline-flex; gap: 4px; align-items: center; }

.cta { border-radius: 24px; padding: 32px; background: linear-gradient(135deg, var(--brand), #115e59); color: #fff;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cta h2 { margin: 0 0 4px; font-size: 22px; }
.cta p { margin: 0; opacity: .85; }
.cta .btn { background: #fff; color: var(--brand-600); }

.site-footer { position: relative; margin-top: 56px; padding: 44px 0 22px; color: var(--muted); font-size: 14px; text-align: center;
  background: radial-gradient(700px 220px at 50% 0%, var(--brand-50), transparent 70%), var(--surface); border-top: 1px solid var(--border); }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 120px; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.site-footer .container { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.foot-brand .brand { justify-content: center; font-size: 20px; margin-bottom: 8px; }
.foot-brand .brand img { width: 44px; height: 44px; }
.foot-brand p { margin: 0 auto; max-width: 460px; }
.foot-links { display: flex; gap: 8px 26px; flex-wrap: wrap; justify-content: center; }
.foot-links a { color: var(--text-2); font-weight: 600; }
.foot-links a:hover { color: var(--brand); }
.foot-support { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 26px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); text-align: right; }
.foot-support:hover { border-color: var(--brand); color: var(--text); }
.foot-support .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.foot-support small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.foot-support b { font-size: 16px; }
.foot-bottom { width: 100%; padding-top: 18px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 24px;
  justify-content: center; font-size: 13px; }
.funmig { font-weight: 800; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.funmig:hover { color: transparent; opacity: .8; }

.shop-hero { position: relative; background: var(--shop, var(--brand)); }
.shop-hero .cover { height: clamp(160px, 28vw, 320px); overflow: hidden; background: linear-gradient(135deg, var(--shop), #0f172a); }
.shop-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-head { position: relative; margin-top: -56px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 18px; box-shadow: var(--shadow); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.shop-head .logo { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; border: 4px solid var(--surface);
  margin-top: -48px; background: var(--surface); box-shadow: var(--shadow); }
.shop-head .logo.ph { display: grid; place-items: center; font-weight: 900; font-size: 34px; color: #fff; background: var(--shop); }
.shop-head h1 { font-size: 24px; margin: 0; }
.shop-head .tagline { margin: 0; color: var(--muted); }
.shop-info { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); margin-top: 14px; }
.shop-info span, .shop-info a { display: inline-flex; gap: 6px; align-items: center; color: inherit; }
.shop-info .i { color: var(--shop); width: 17px; height: 17px; }

.cat-bar { position: sticky; top: 64px; z-index: 20; background: var(--bg); padding: 12px 0; margin-top: 10px; }
.cat-bar .scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.cat-bar .scroll::-webkit-scrollbar { display: none; }
.cat-bar .scroll > :first-child { margin-inline-start: auto; }
.cat-bar .scroll > :last-child { margin-inline-end: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; font-family: inherit; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.active { background: var(--shop, var(--brand)); color: #fff; border-color: transparent; }
.catalog-search { margin: 10px auto 0; position: relative; max-width: 560px; }
.catalog-search .i { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); color: var(--muted); }
.catalog-search .input { padding-right: 42px; border-radius: 99px; }

.cat-section { scroll-margin-top: 170px; margin-top: 26px; }
.cat-section h2 { font-size: 19px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.cat-section h2 .count { font-size: 13px; color: var(--muted); font-weight: 500; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 210px)); justify-content: center; gap: 14px; }
@media (max-width: 520px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.product { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer;
  text-align: right; padding: 0; font: inherit; color: inherit; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.product:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product .img { aspect-ratio: 1; background: var(--surface-2); position: relative; }
.product .img img { width: 100%; height: 100%; object-fit: cover; }
.product .img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--border); }
.product .img .ph .i { width: 48px; height: 48px; stroke-width: 1.3; }
.product .badges { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.product .p-body { padding: 11px 12px 13px; }
.product h3 { font-size: 14.5px; font-weight: 700; margin: 0; line-height: 1.6; }
.product .brand-name { font-size: 12.5px; color: var(--muted); }
.product.unavailable .img img { filter: grayscale(.85); opacity: .7; }

.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-end; justify-content: center; background: rgb(15 23 42 / .55); }
.modal.open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: var(--surface); width: min(560px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0;
  animation: up .25s ease-out; position: relative; }
@keyframes up { from { transform: translateY(40px); } }
@media (min-width: 640px) { .modal { align-items: center; } .modal-box { border-radius: 24px; } }
.modal-box .m-img { aspect-ratio: 4 / 3; background: var(--surface-2); }
.modal-box .m-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-box .m-body { padding: 20px 22px 26px; }
.modal-close { position: absolute; top: 12px; left: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgb(255 255 255 / .92); color: #0f172a; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }

.manager-bar { background: #0f172a; color: #e2e8f0; font-size: 13.5px; }
.manager-bar .container { display: flex; gap: 12px; align-items: center; min-height: 44px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.manager-bar a { color: #5eead4; }

.cat-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--shop, var(--brand)) 13%, transparent); color: var(--shop, var(--brand)); }
.cat-ic .i { width: 21px; height: 21px; }
.cat-tag { display: inline-flex; align-items: center; gap: 8px; }
.cat-tag > .i { color: var(--brand); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.icon-picker .icon-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0;
  padding: 10px 4px 8px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer;
  color: var(--text-2); font-size: 11.5px; font-weight: 500; text-align: center; line-height: 1.4; transition: border-color .15s, background .15s; }
.icon-opt:hover { border-color: var(--muted); }
.icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.icon-opt .i { width: 28px; height: 28px; }
.icon-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.icon-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px rgb(13 148 136 / .2); }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 400px at 100% 0%, var(--brand-100), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; font-size: 20px; }
.auth-card .brand img { width: 48px; height: 48px; }

.dash { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-left: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { padding: 4px 8px 18px; }
.side-shop { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface-2);
  border: 1px solid var(--border); margin-bottom: 16px; }
.side-shop img, .side-shop .ph { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex: none; }
.side-shop .ph { display: grid; place-items: center; color: #fff; font-weight: 800; }
.side-shop b { display: block; font-size: 14px; line-height: 1.4; }
.nav-label { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 14px 12px 6px; letter-spacing: .3px; }
.nav a { display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text-2);
  font-weight: 500; font-size: 14.5px; margin-bottom: 2px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.nav a .count { margin-right: auto; background: var(--accent); color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 7px; font-weight: 700; }
.sidebar .bottom { margin-top: auto; padding-top: 16px; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 19px; margin: 0; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar .menu-btn { display: none; }
.content { padding: 26px 28px 48px; max-width: 1240px; }
.acting-bar { background: var(--accent); color: #fff; font-size: 13.5px; padding: 8px 28px; display: flex; gap: 10px; align-items: center; }
.acting-bar a { color: #fff; font-weight: 700; text-decoration: underline; }

@media (max-width: 960px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 0 0 auto; width: 280px; z-index: 60; transform: translateX(100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .dash.nav-open .sidebar { transform: none; }
  .dash.nav-open::after { content: ""; position: fixed; inset: 0; background: rgb(15 23 42 / .45); z-index: 50; }
  .topbar { padding: 12px 16px; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar h1 { flex: 1; min-width: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .spacer { display: none; }
  .top-actions { flex-basis: 100%; }
  .top-actions:empty { display: none; }
  .top-actions .btn { flex: 1; padding-inline: 10px; }
  .content { padding: 18px 16px 40px; }
  .acting-bar { padding: 8px 16px; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 45%), 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.stat .ic.orange { background: var(--accent-50); color: var(--accent); }
.stat .ic.blue { background: color-mix(in srgb, #3b82f6 14%, transparent); color: #3b82f6; }
.stat .ic.purple { background: color-mix(in srgb, #8b5cf6 14%, transparent); color: #8b5cf6; }
.stat .v { font-size: 24px; font-weight: 800; line-height: 1.2; }
.stat .l { font-size: 13px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1060px) { .grid-2, .grid-2-even { grid-template-columns: minmax(0, 1fr); } }

.sub-card { border-radius: var(--r); padding: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), #134e4a); position: relative; overflow: hidden; }
.sub-card.expired { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.sub-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgb(255 255 255 / .08); left: -50px; top: -60px; }
.sub-card .big { font-size: 34px; font-weight: 900; line-height: 1.2; }
.sub-card .btn { background: #fff; color: var(--brand-600); position: relative; z-index: 1; }
.sub-card.expired .btn { color: var(--danger); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); flex: none; }
.checklist .done .tick { background: var(--success); border-color: var(--success); color: #fff; }
.checklist .done span { color: var(--muted); text-decoration: line-through; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { background: var(--surface); border: 1.5px solid var(--border); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; position: relative; }
.plan.popular { border-color: var(--brand); box-shadow: 0 10px 30px -12px rgb(13 148 136 / .45); }
.plan .tag { position: absolute; top: -12px; right: 18px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.plan h3 { font-size: 18px; margin: 0; }
.plan .price { font-size: 28px; font-weight: 900; margin: 10px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.plan form { margin-top: 16px; }

.bars { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 10px 4px 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar span.b { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top, var(--brand), #2dd4bf); min-height: 4px; }
.bars .bar small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bars .bar em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--text-2); }

.qr-show { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.qr-show img { width: 240px; height: 240px; border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 6px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input { width: auto; min-width: min(180px, 100%); flex: 1; max-width: 320px; }
.filters select.input { flex: 0 1 auto; }
.tabs { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
.tabs a { white-space: nowrap; flex: none; padding: 6px 14px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

.creds { background: var(--warning-50); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); border-radius: var(--r); padding: 18px; margin-bottom: 20px; }
.creds code { font-size: 15px; font-weight: 700; background: var(--surface); padding: 2px 8px; border-radius: 6px; }

.map-picker { height: 320px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); margin-bottom: 10px; }
.map-locate { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.map-coords { font-size: 12.5px; color: var(--muted); direction: ltr; text-align: left; }

.map-page { height: calc(100vh - 64px); }
.map-full { height: 100%; width: 100%; }
.map-popup { text-align: center; min-width: 160px; }
.map-popup img.logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; margin: 0 auto 6px; }
.map-popup .ph { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; margin: 0 auto 6px; }
.map-popup h4 { margin: 0 0 2px; font-size: 14px; }
.map-popup a.btn { margin-top: 8px; display: inline-flex; }
.shop-marker { background: transparent; border: 0; }
.shop-marker-pin { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--brand); border: 3px solid #fff; border-radius: 50% 50% 50% 4px; box-shadow: 0 2px 8px #0f172a55; transform: rotate(-45deg); }
.shop-marker-pin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(45deg); }
.near-me-box { position: absolute; z-index: 15; top: 14px; inset-inline-start: 14px; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 28px); }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 2px #2563eb, var(--shadow); }
.shop-map { height: 220px; border-top: 1px solid var(--border); }
.card > .shop-map:last-child { border-radius: 0 0 var(--r) var(--r); overflow: hidden; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
}
