/* ================= themes (accent colors) ================= */
:root, [data-theme="indigo"] { --primary: #4f46e5; --primary-d: #4338ca; --accent: #db2777; }
[data-theme="emerald"] { --primary: #059669; --primary-d: #047857; --accent: #0d9488; }
[data-theme="rose"]    { --primary: #e11d48; --primary-d: #be123c; --accent: #f97316; }
[data-theme="sunset"]  { --primary: #ea580c; --primary-d: #c2410c; --accent: #eab308; }
[data-theme="ocean"]   { --primary: #0284c7; --primary-d: #0369a1; --accent: #06b6d4; }
[data-theme="luxe"]    { --primary: #b8860b; --primary-d: #8f6a09; --accent: #1f2937; }
[data-theme="violet"]  { --primary: #9333ea; --primary-d: #7e22ce; --accent: #ec4899; }

/* ================= light / dark surfaces ================= */
:root {
  --wa: #25d366; --wa-d: #1ebe5a; --danger: #dc2626; --success: #16a34a;
  --text: #1f2937; --muted: #6b7280; --bg: #f6f7fb; --card: #ffffff; --soft: #f1f2f6;
  --input: #ffffff; --border: #e5e7eb; --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --hero: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent)) 55%, var(--accent));
  --primary-soft: color-mix(in srgb, var(--primary) 12%, transparent);
  color-scheme: light;
}
[data-mode="dark"] {
  --text: #e5e7eb; --muted: #9ca3af; --bg: #0d1017; --card: #161a23; --soft: #1e2330;
  --input: #10131a; --border: #2a303d;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 18px rgba(0,0,0,.35);
  --primary-soft: color-mix(in srgb, var(--primary) 22%, transparent);
  color-scheme: dark;
}
[data-mode="dark"][data-theme="luxe"] { --accent: #000000; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Cairo", Tahoma, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.ltr-fix { text-align: start; unicode-bidi: plaintext; }
[hidden] { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
code { background: var(--primary-soft); padding: 1px 6px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer; font-weight: 700; transition: .15s; background: var(--soft); white-space: nowrap; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.92); }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-light { background: #fff; color: var(--primary); }
.btn-wa { background: color-mix(in srgb, var(--wa) 15%, transparent); color: #128c4b; padding: 9px 12px; }
[data-mode="dark"] .btn-wa { color: #4ade80; }
.btn-wa:hover { background: var(--wa); color: #fff; }
.btn-wa-solid { background: var(--wa); color: #fff; }
.btn-wa-solid:hover { background: var(--wa-d); }
.btn-danger { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
[data-mode="dark"] .btn-danger { color: #f87171; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--soft); cursor: pointer; font-weight: 800; font-size: .9rem; }
.icon-btn:hover { border-color: var(--primary); }
.mode-toggle .sun, [data-mode="dark"] .mode-toggle .moon { display: none; }
[data-mode="dark"] .mode-toggle .sun { display: inline; }

/* ---------- header ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; gap: 14px; height: 66px; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--primary); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.logo img { height: 44px; width: auto; max-width: 120px; object-fit: contain; }
.search { flex: 1; display: flex; max-width: 520px; margin-inline-start: auto; background: var(--soft); border-radius: 999px; border: 1px solid var(--border); overflow: hidden; }
.search input { flex: 1; border: 0; background: transparent; padding: 9px 16px; outline: none; min-width: 0; }
.search button { border: 0; background: transparent; padding: 0 14px; cursor: pointer; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.cart-link { display: flex; align-items: center; gap: 6px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.badge { background: #9ca3af; color: #fff; border-radius: 999px; font-size: .75rem; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; }
.badge.show { background: var(--danger); }

/* ---------- hero ---------- */
.hero { background: var(--hero); color: #fff; padding: 56px 0; margin-bottom: 28px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
.hero p { font-size: 1.15rem; opacity: .92; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 8px; scrollbar-width: thin; }
.chip { padding: 7px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); white-space: nowrap; font-weight: 600; cursor: pointer; }
.chip small { color: var(--muted); margin-inline-start: 4px; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.active small { color: rgba(255,255,255,.75); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.list-head h2 { margin: 0; }
.sort select { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-bottom: 40px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; border: 1px solid var(--border); }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.card-img { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .2s; }
.card:hover .card-img img { transform: scale(1.05); }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag.sale { background: var(--danger); }
.tag.inline { position: static; font-size: .8rem; vertical-align: middle; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body h3 a:hover { color: var(--primary); }
.price { font-weight: 800; color: var(--primary); font-size: 1.15rem; }
.price small { font-size: .8rem; font-weight: 600; }
.price del { color: var(--muted); font-weight: 400; font-size: .9rem; margin-inline-start: 6px; }
.price.big { font-size: 1.8rem; margin-bottom: 14px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid rgba(128,128,128,.5); box-shadow: inset 0 0 0 2px var(--card); cursor: pointer; transition: transform .15s; }
.dot:hover { transform: scale(1.2); }
.dot.active { outline: 2px solid var(--primary); outline-offset: 1px; }
.sizes-mini { display: flex; gap: 4px; flex-wrap: wrap; }
.sizes-mini span { font-size: .75rem; border: 1px solid var(--border); border-radius: 6px; padding: 0 7px; color: var(--muted); }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-actions .btn-primary { flex: 1; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--card); border-radius: var(--radius); }

/* ---------- product page ---------- */
.crumbs { padding: 18px 0; color: var(--muted); font-size: .9rem; }
.crumbs a:hover { color: var(--primary); }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 36px; }
.main-img { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); }
.main-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.main-img img.fade { opacity: 0; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { width: 74px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--primary); }
.info h1 { font-size: 1.8rem; }
.opt { margin-bottom: 18px; }
.opt-label { margin-bottom: 8px; color: var(--muted); }
.opt-label b { color: var(--text); }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch input, .size-btn input, .pay-opt input, .status-opt input, .theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(128,128,128,.5); cursor: pointer; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--border); transition: .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--primary); }
.swatch input:focus-visible + span, .size-btn input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 4px; }
.size-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn span { display: inline-block; min-width: 48px; text-align: center; padding: 7px 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 700; }
.size-btn input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.qty { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); }
.qty button { width: 40px; border: 0; background: var(--soft); cursor: pointer; font-size: 1.2rem; }
.qty input { width: 56px; text-align: center; border: 0; padding: 8px 0; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.size-btn .size-price { display: block; font-size: .75rem; font-weight: 600; opacity: .75; }
.specs { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.specs th, .specs td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.specs th { width: 38%; color: var(--muted); font-weight: 600; background: var(--soft); }
.buy { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.buy .btn { flex: 1 1 160px; }
.desc { border-top: 1px solid var(--border); padding-top: 16px; }
.desc p { white-space: pre-line; }
.perks { list-style: none; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.section-title { margin: 10px 0 16px; }

/* ---------- cart / checkout ---------- */
.page-title { margin: 22px 0 18px; font-size: 1.6rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start; margin-bottom: 40px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto auto auto; align-items: center; gap: 14px; background: var(--card); padding: 12px; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.ci-name { font-weight: 700; }
.ci-total { font-weight: 800; min-width: 90px; text-align: center; }
.ci-remove { border: 0; background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.small-qty button { width: 32px; }
.small-qty input { width: 40px; padding: 5px 0; }
.checkout { background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 84px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin-bottom: 12px; font-size: .95rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--input); font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pay-methods { border: 0; padding: 0; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.pay-methods legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.pay-opt { margin: 0; position: relative; }
.pay-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: .15s; }
.pay-card b { display: block; }
.pay-icon { font-size: 1.4rem; line-height: 1.2; }
.pay-hint { display: none; font-weight: 400; }
.pay-opt input:checked + .pay-card { border-color: var(--primary); background: var(--primary-soft); }
.pay-opt input:checked + .pay-card .pay-hint { display: block; }
.pay-opt input:focus-visible + .pay-card { outline: 2px solid var(--primary); }
.summary { border-top: 1px dashed var(--border); margin: 8px 0 10px; padding-top: 10px; }
.summary div { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .total { font-size: 1.2rem; color: var(--primary); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.alert { display: block; padding: 10px 14px; border-radius: 10px; margin: 10px 0; background: var(--primary-soft); color: var(--text); }
.alert.error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: #b91c1c; }
.alert.success { background: color-mix(in srgb, var(--success) 15%, transparent); color: #15803d; }
[data-mode="dark"] .alert.error { color: #fca5a5; }
[data-mode="dark"] .alert.success { color: #86efac; }
.big-alert { font-size: 1.1rem; font-weight: 700; text-align: center; padding: 16px; }
.done { text-align: center; background: var(--card); border-radius: var(--radius); padding: 50px 20px; margin: 30px auto; max-width: 620px; box-shadow: var(--shadow); }
.done-icon { width: 80px; height: 80px; border-radius: 50%; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); font-size: 2.6rem; display: grid; place-items: center; margin: 0 auto 16px; }

/* ---------- customer order page ---------- */
.order-page { margin: 24px 0 40px; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-head h1 { margin: 0; font-size: 1.5rem; }
.progress { list-style: none; padding: 0; margin: 20px 0; display: flex; counter-reset: step; }
.progress li { flex: 1; text-align: center; font-size: .82rem; color: var(--muted); position: relative; }
.progress li span { display: block; width: 18px; height: 18px; margin: 0 auto 6px; border-radius: 50%; background: var(--border); position: relative; z-index: 1; }
.progress li::before { content: ""; position: absolute; top: 8px; inset-inline-end: 50%; width: 100%; height: 3px; background: var(--border); }
.progress li:first-child::before { display: none; }
.progress li.done { color: var(--text); font-weight: 700; }
.progress li.done span, .progress li.done::before { background: var(--primary); }
.respond { background: var(--soft); border-radius: 12px; padding: 16px; margin: 16px 0 22px; }
.respond h2 { font-size: 1.1rem; }
.respond-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.respond-btns form { margin: 0; }
.postpone { margin-top: 14px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.day-chips .chip { font-size: .85rem; padding: 5px 12px; }
.order-items { display: flex; flex-direction: column; gap: 10px; }
.order-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.order-item img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.pay-box { border: 1.5px dashed var(--primary); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.copy-row code { font-size: 1.1rem; padding: 4px 10px; }

/* ---------- footer / floating ---------- */
.footer { background: #111827; color: #d1d5db; padding: 28px 0; text-align: center; margin-top: 30px; }
[data-mode="dark"] .footer { background: #07090d; border-top: 1px solid var(--border); }
.footer-muted { color: #9ca3af; }
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(37,211,102,.45); z-index: 60; transition: transform .2s; }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 32px; height: 32px; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 120px); background: #111827; color: #fff; padding: 12px 22px;
  border-radius: 999px; transition: transform .3s; z-index: 100; font-weight: 600; }
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

/* ================= admin ================= */
body.admin { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #111827; color: #e5e7eb; padding: 20px 14px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
[data-mode="dark"] .sidebar { background: #07090d; border-inline-end: 1px solid var(--border); }
.side-logo { font-weight: 800; font-size: 1.15rem; padding: 0 8px 10px; border-bottom: 1px solid #374151; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar .icon-btn { background: #1f2937; border-color: #374151; color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a { padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.sidebar nav a:hover { background: #1f2937; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar .btn-ghost { color: #e5e7eb; border-color: #374151; }
.side-badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 8px; margin-inline-start: 6px; }
.admin-main { flex: 1; padding: 10px 28px 40px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; border: 1px solid var(--border); }
.panel h2 { font-size: 1.15rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--border); }
.stat span { color: var(--muted); font-weight: 600; }
.stat b { font-size: 1.7rem; }
.stat.hl { background: var(--hero); color: #fff; border: 0; }
.stat.hl span { color: rgba(255,255,255,.8); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 20px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: .88rem; }
.table tfoot td { font-weight: 700; }
.table tfoot .total td { color: var(--primary); font-size: 1.1rem; }
.thumb-sm { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.status { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--soft); border: 0; white-space: nowrap; }
.status.as-btn { cursor: pointer; }
.st-new { background: #dbeafe; color: #1d4ed8; }
.st-awaiting { background: #e0f2fe; color: #0369a1; }
.st-confirmed { background: #ede9fe; color: #6d28d9; }
.st-postponed { background: #fce7f3; color: #be185d; }
.st-shipped { background: #fef3c7; color: #b45309; }
.st-delivered { background: #dcfce7; color: #15803d; }
.st-cancelled { background: #fee2e2; color: #b91c1c; }
.order-banner { font-weight: 700; font-size: 1.05rem; animation: pulse 1.2s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.015); } }
.status-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.status-opt { margin: 0; position: relative; }
.status-opt .status { padding: 7px 14px; font-size: .9rem; cursor: pointer; border: 2px solid transparent; opacity: .65; transition: .15s; }
.status-opt input:checked + .status { opacity: 1; border-color: currentColor; transform: scale(1.04); }
.status-opt input:focus-visible + .status { outline: 2px solid var(--primary); }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline-form .grow { flex: 1; min-width: 200px; }
.row-form { display: flex; gap: 8px; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; gap: 20px; flex-wrap: wrap; }
.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; margin: 0; }
.check.danger { color: var(--danger); }
.color-block { border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: var(--soft); }
.color-row { display: grid; grid-template-columns: 46px 1fr 1fr auto auto; gap: 6px; align-items: center; }
.color-row input[type=color] { width: 46px; height: 42px; padding: 2px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--input); }
.file-btn { margin: 0; flex-direction: row; cursor: pointer; }
.file-btn input { display: none; }
.file-btn.has-files { border-color: var(--success); color: var(--success); }
.color-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.color-preview:not(:empty) { margin-top: 8px; }
.color-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.size-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 6px; margin-bottom: 6px; }
.zones input { padding: 6px 8px !important; }
.zones .z-fee { max-width: 120px; }
.presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.preset { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(128,128,128,.5); cursor: pointer; }
.img-manage { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.img-item { width: 150px; background: var(--soft); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.img-item select { padding: 4px 6px; font-size: .82rem; }
.img-item .check { font-size: .85rem; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--primary) 45%, transparent); background: var(--primary-soft); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; color: var(--primary); }
.dropzone input { display: none; }
.form-actions { display: flex; gap: 12px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px; margin: 0 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.logo-field { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.logo-preview { width: 84px; height: 84px; border-radius: 12px; background: var(--soft); border: 1px solid var(--border); display: grid; place-items: center; font-size: 2.4rem; flex-shrink: 0; overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.theme-opt { margin: 0; position: relative; }
.theme-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; font-size: .88rem; text-align: center; }
.theme-swatch { height: 44px; border-radius: 8px; }
.theme-opt input:checked + .theme-card { border-color: var(--primary); background: var(--primary-soft); }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; }
.ph { border: 1px solid var(--border); background: var(--soft); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: .82rem; }
.ph:hover { border-color: var(--primary); }
.ph span { color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--hero); }
.login-box { width: min(380px, 92vw); text-align: center; }
.login-box label { text-align: start; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  body.admin { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .side-logo { border: 0; padding: 0 8px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav a { padding: 6px 10px; font-size: .9rem; }
  .admin-main { padding: 10px 14px 30px; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .nav { gap: 8px; }
  .logo { font-size: 1.05rem; }
  .logo span { display: none; }
  .icon-btn { min-width: 36px; height: 36px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px; }
  .card-body h3 { font-size: .95rem; }
  .cart-item { grid-template-columns: 64px 1fr auto; }
  .cart-item img { width: 64px; height: 64px; }
  .ci-total { grid-column: 2; text-align: start; min-width: 0; }
  .two { grid-template-columns: 1fr; }
  .respond-btns { grid-template-columns: 1fr; }
  .color-row { grid-template-columns: 46px 1fr auto; }
  .color-row .cn-en { grid-column: 2; }
}

/* ================= searchable select (select2-style) ================= */
.ss { position: relative; width: 100%; font-weight: 400; }
.ss-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; z-index: -1; }
.ss-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; min-height: 44px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--input); cursor: pointer; text-align: start; font-weight: 400; }
.ss-btn:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.ss-btn:focus-visible, .ss-open .ss-btn { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ss-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-placeholder .ss-text { color: var(--muted); }
.ss-arrow { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex-shrink: 0; }
.ss-open .ss-arrow { transform: rotate(-135deg) translateY(-2px); }
.ss-invalid .ss-btn { border-color: var(--danger); }
.ss-disabled .ss-btn { opacity: .6; cursor: not-allowed; }
.ss-drop { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 80; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; min-width: 180px; animation: ssIn .12s ease-out; }
.ss-up .ss-drop { top: auto; bottom: calc(100% + 6px); }
@keyframes ssIn { from { opacity: 0; transform: translateY(-4px); } }
.ss-search-wrap { padding: 8px; border-bottom: 1px solid var(--border); }
.ss-search-wrap input.ss-search { padding: 8px 10px 8px 10px; padding-inline-start: 34px; border-radius: 8px;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3 3'/%3E%3C/svg%3E") no-repeat; }
[dir="rtl"] .ss-search-wrap input.ss-search { background-position: right 10px center; }
[dir="ltr"] .ss-search-wrap input.ss-search { background-position: left 10px center; }
.ss-list { list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow-y: auto; }
.ss-opt { padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.ss-opt.ss-active { background: var(--primary-soft); }
.ss-opt.ss-selected { background: var(--primary); color: #fff; font-weight: 700; }
.ss-opt-empty { color: var(--muted); }
.ss-opt.ss-selected.ss-opt-empty { color: #fff; }
.ss-opt-disabled { opacity: .45; cursor: not-allowed; }
.ss-none { padding: 12px; text-align: center; color: var(--muted); }
.sort .ss { min-width: 190px; }
.sort .ss-btn, .img-item .ss-btn { min-height: 36px; padding: 6px 10px; }
.img-item .ss-btn { font-size: .82rem; }
.img-item .ss-drop { min-width: 160px; }

/* ================= accounts / call button ================= */
.call-float { position: fixed; bottom: 92px; inset-inline-end: 26px; width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 45%, transparent); z-index: 60; transition: transform .2s; }
.call-float:hover { transform: scale(1.1); }
.account-btn { gap: 6px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; padding: 0 12px; }
.auth-box { max-width: 460px; margin: 30px auto; text-align: center; }
.auth-box label { text-align: start; }
.auth-box p { margin: 14px 0 6px; }
.link { color: var(--primary); }
.link:hover { text-decoration: underline; }
.account-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; margin-bottom: 40px; }
.my-orders { display: flex; flex-direction: column; gap: 10px; }
.my-order { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; transition: .15s; }
.my-order:hover { border-color: var(--primary); background: var(--primary-soft); }
.my-order img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
details summary { cursor: pointer; margin-top: 6px; }
.user-new { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr auto; gap: 10px; align-items: end; }
.user-new label { margin: 0; }
.user-row { flex-wrap: wrap; }
.user-row input:not([type=checkbox]) { max-width: 170px; }
.user-row .ss { width: 110px; }
@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .user-new { grid-template-columns: 1fr 1fr; }
}
.side-tools { display: flex; gap: 6px; }

/* ================= recolor / proofs / finance ================= */
.main-img { position: relative; }
.recolor-badge { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(17,24,39,.75); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
img.recoloring { filter: blur(2px) saturate(.6); transition: filter .2s; }
.deposit-note { background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; margin: -4px 0 16px; font-weight: 600; font-size: .92rem; }
.proof-box { border: 1.5px dashed var(--border); border-radius: 12px; padding: 14px; margin: 0 0 16px; }
.proof-box h2 { font-size: 1.05rem; }
.proof-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.proof-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.proof-thumbs.big img { width: 180px; height: 240px; object-fit: contain; background: var(--soft); }
.proof-item { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.proof-drop { padding: 16px; display: grid; place-items: center; gap: 8px; margin-bottom: 8px; }
.proof-drop img { max-height: 220px; border-radius: 8px; }
.pay-opt.no-dep .pay-hint { display: none !important; }
.stat small { color: var(--muted); font-size: .78rem; }
.stat.hl small { color: rgba(255,255,255,.8); }
.stat-good b { color: var(--success); }
.stat-bad b { color: var(--danger); }
.period-bar { display: flex; flex-direction: column; gap: 10px; }
.expense-form { display: grid; grid-template-columns: 110px 1fr 150px; gap: 8px; align-items: end; margin-bottom: 12px; }
.expense-form label { margin: 0; }
.expense-form .grow { grid-column: 1 / 3; }
.cat-sum { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-sum .chip { cursor: default; font-size: .85rem; }
.kind-switch { grid-column: 1 / -1; display: flex; gap: 8px; }
.kind-opt { margin: 0; position: relative; flex: 1; }
.kind-opt input { position: absolute; opacity: 0; }
.kind-opt span { display: block; text-align: center; padding: 8px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 700; }
.kind-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--primary); }
.amt-in { color: var(--success); }
.amt-out { color: var(--danger); }

.orders-search { display: grid; grid-template-columns: 1fr 170px 170px auto; gap: 10px; align-items: end; }
.orders-search label { margin: 0; }
.search-actions { display: flex; gap: 6px; }
.quick-dates { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.quick-dates .chip { font-size: .82rem; padding: 4px 12px; }
@media (max-width: 900px) { .orders-search { grid-template-columns: 1fr 1fr; } .orders-search .grow, .search-actions { grid-column: 1 / -1; } }
