/* Neon Digital — admin + merchant panels (RTL, CSS only) */
:root {
  --ink: #251228;            /* sidebar / dark surfaces */
  --ink-2: #33193a;
  --ink-line: rgba(255,255,255,.08);
  --brand: #fc542b;          /* electric violet */
  --brand-2: #e5431b;
  --brand-ink: #fff;
  --brand-soft: #fff0ea;
  --brand-text: #c23c17;     /* orange dark enough for text on white */
  --neon: #ffb23e;           /* signature glow, used sparingly */
  --bg: #faf6f4;
  --surface: #fff;
  --surface-2: #fdfaf8;
  --text: #241626;
  --muted: #76677a;
  --faint: #ab9cad;
  --line: #eee6e4;
  --line-2: #e4d8d6;
  --ok: #0e9f76; --ok-soft: #e4f7f0;
  --warn: #b26b00; --warn-soft: #fff4e0;
  --bad: #d92d4b; --bad-soft: #fdebee;
  --info: #2160e6; --info-soft: #e9f0ff;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(37,18,40,.04), 0 6px 20px -12px rgba(37,18,40,.18);
  --side: 264px;
  --font: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.65 var(--font); direction: rtl; font-feature-settings: "tnum" 1; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
code, .ltr { direction: ltr; unicode-bidi: embed; }
code { background: #f6f0ee; padding: 1px 6px; border-radius: 6px; font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::selection { background: #ffd0c0; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); background: var(--ink); color: #e6cfc7; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background-image: radial-gradient(420px 260px at 100% -40px, rgba(255,122,77,.35), transparent 70%); scrollbar-width: thin; scrollbar-color: #4a2a4a transparent; }
.side .brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.side .brand .mark, .auth .mark, .mark { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
  background: linear-gradient(140deg, #ff7a4d, var(--brand) 55%, #b8360f); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 6px 18px -4px rgba(255,178,62,.55); position: relative; }
.mark::after { content: ""; position: absolute; inset: auto 6px 5px auto; width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.side .brand small { display: block; color: #9a8a98; font-weight: 400; font-size: .74rem; margin-top: 1px; }
.side nav { padding: 6px 12px 28px; flex: 1; }
.side .grp { margin: 18px 12px 6px; font-size: .74rem; color: #8f7d8f; font-weight: 500; }
.side a.nl { display: flex; align-items: center; gap: 11px; color: #e8d0c8; padding: 8px 12px; border-radius: 10px; font-size: .92rem; position: relative; }
.side a.nl .ic { width: 18px; height: 18px; color: #9a8a98; }
.side a.nl:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.side a.nl:hover .ic { color: #fff; }
.side a.nl.on { background: linear-gradient(270deg, rgba(255,122,77,.32), rgba(255,122,77,.08)); color: #fff; }
.side a.nl.on .ic { color: #fff; }
.side a.nl.on::before { content: ""; position: absolute; right: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px 0 0 3px; background: linear-gradient(var(--neon), #ff9470); box-shadow: 0 0 12px var(--neon); }
.side .side-foot { padding: 14px 16px 18px; border-top: 1px solid var(--ink-line); font-size: .8rem; color: #9a8a98; }
.side .side-foot a { color: #f3d8cf; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { background: rgba(250,246,244,.85); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
  padding: 10px 28px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; min-height: 62px; }
.top .grow { flex: 1; }
.top form { margin: 0; }
.top .store-chip { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.top .store-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.top .store-chip .dot.off { background: var(--faint); box-shadow: 0 0 0 3px #f3eeec; }
.user-chip { display: inline-flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .85rem; color: var(--brand-text);
  background: var(--brand-soft); border: 1px solid #ffd3c4; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: #dccdc9; text-decoration: none; }
.content { padding: 26px 28px 60px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.page-head p, .page-head .sub { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
#navtoggle { display: none; }
.burger { display: none; }
@media (max-width: 960px) {
  .side { position: fixed; right: 0; z-index: 30; transform: translateX(105%); transition: transform .22s ease; box-shadow: none; }
  #navtoggle:checked ~ .shell .side { transform: none; box-shadow: -18px 0 60px rgba(37,18,40,.45); }
  #navtoggle:checked ~ .shell .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(37,18,40,.35); z-index: 25; }
  .burger { display: inline-grid; }
  .content { padding: 18px 16px 50px; }
  .top { padding: 10px 14px; gap: 8px; }
  .top .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card .card-head h2, .card .card-head h3 { margin: 0; font-size: 1rem; }
.card.flush > h2:first-child, .card.flush > h3:first-child { padding: 16px 20px 0; }
.card.tint { background: linear-gradient(160deg, #fff, var(--surface-2)); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1080px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-size: .84rem; display: flex; align-items: center; gap: 8px; }
.stat .label .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-text); }
.stat:nth-child(4n+2) .label .ic { background: #fff0e8; color: #d9431c; }
.stat:nth-child(4n+3) .label .ic { background: var(--ok-soft); color: var(--ok); }
.stat:nth-child(4n+4) .label .ic { background: #fff1db; color: #b26b00; }
.stat .value { font-size: 1.6rem; font-weight: 600; margin-top: 10px; letter-spacing: -.01em; direction: rtl; }
.stat .hint { font-size: .8rem; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.right { text-align: left; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.tbl th { text-align: right; font-weight: 500; color: var(--muted); font-size: .8rem; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fdf9f7; }
.tbl td a:not(.btn) { font-weight: 500; }
.tbl .num { direction: ltr; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .acts { white-space: nowrap; text-align: left; }
.tbl .acts form { display: inline; }
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty::before { content: ""; display: block; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c23c17' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20.5 7.5v9L12 21l-8.5-4.5v-9L12 3Z'/%3E%3Cpath d='m3.5 7.5 8.5 4.5 8.5-4.5M12 12v9'/%3E%3C/svg%3E") center/26px no-repeat; }
.thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #f5efed; vertical-align: middle; border: 1px solid var(--line); }

/* ---------- forms ---------- */
form.inline { display: inline; }
.field { margin-bottom: 16px; }
.field label, .lbl { display: block; font-weight: 500; font-size: .87rem; margin-bottom: 6px; color: #3f2c41; }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.field .err, .err { color: var(--bad); font-size: .82rem; margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date],
input[type=datetime-local], input[type=time], input[type=search], input[type=color], input[type=file], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #b3a6b0; }
input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
input[type=file] { padding: 8px; background: var(--surface-2); border-style: dashed; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; border: 0; background: var(--brand-soft); color: var(--brand-text); padding: 6px 12px; border-radius: 8px; margin-left: 10px; cursor: pointer; font-weight: 500; }
select { appearance: none; -webkit-appearance: none; padding-left: 34px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6889' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") left 11px center/15px no-repeat; }
input:hover, select:hover, textarea:hover { border-color: #dcccc8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(252,84,43,.12); }
textarea { min-height: 100px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; margin: 7px 0; cursor: pointer; }
.check input, input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
.form-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters .field { margin: 0; min-width: 150px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; background: var(--surface-2); }
legend { font-weight: 600; padding: 0 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); padding: 9px 17px;
  border-radius: 11px; font: inherit; font-weight: 500; font-size: .9rem; cursor: pointer; text-decoration: none; line-height: 1.4; transition: background .15s, box-shadow .15s, transform .05s;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 14px -8px rgba(252,84,43,.9); }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.light { background: #fff; color: var(--text); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(37,18,40,.05); }
.btn.light:hover { background: var(--surface-2); border-color: #dccdc9; }
.btn.ghost { background: transparent; color: var(--brand-text); border-color: transparent; padding: 6px 9px; box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--bad); box-shadow: 0 6px 14px -8px rgba(217,45,75,.9); }
.btn.danger.light { background: #fff; color: var(--bad); border-color: #f3c3cc; box-shadow: none; }
.btn.ok { background: var(--ok); box-shadow: 0 6px 14px -8px rgba(14,159,118,.9); }
.btn.dark { background: var(--ink); box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 9px; }
.btn.block { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- badges & alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 500; background: #f6eeec; color: #5b4a5c; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.alert { padding: 12px 16px 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-size: .92rem; border-right-width: 4px; }
.alert.ok { background: var(--ok-soft); border-color: #bfe9da; border-right-color: var(--ok); color: #0a6a4f; }
.alert.bad { background: var(--bad-soft); border-color: #f6c6cf; border-right-color: var(--bad); color: #a3213a; }
.alert.warn { background: var(--warn-soft); border-color: #f6dcae; border-right-color: #e09200; color: #7c4b00; }
.alert.info { background: var(--info-soft); border-color: #cbdafc; border-right-color: var(--info); color: #1d4dbb; }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 4px; background: #f3ebe8; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs a { padding: 7px 15px; color: var(--muted); border-radius: 9px; white-space: nowrap; font-weight: 500; font-size: .88rem; }
.tabs a.on { color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(37,18,40,.12); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- details panels ---------- */
details.box { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 12px; }
details.box > summary { cursor: pointer; padding: 13px 16px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
details.box[open] > summary::before { content: "–"; }
details.box > div { padding: 4px 16px 16px; }

/* ---------- pager ---------- */
.pager { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin: 18px 0 4px; }
.pager .pg { min-width: 36px; text-align: center; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font-size: .87rem; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .disabled { opacity: .45; }

/* ---------- charts (CSS only) ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 10px 2px 22px;
  background: repeating-linear-gradient(to top, transparent 0 39px, #f5efed 39px 40px); }
.bars .b { flex: 1; background: linear-gradient(180deg, #ff8a63, var(--brand)); border-radius: 7px 7px 2px 2px; min-height: 3px; position: relative; opacity: .9; }
.bars .b:hover { opacity: 1; box-shadow: 0 0 0 3px rgba(252,84,43,.15); }
.bars .b span { position: absolute; bottom: -21px; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--faint); white-space: nowrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 8px 42px 8px 0; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; right: 0; top: 6px; width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-text); text-align: center; font-weight: 600; font-size: .85rem; line-height: 28px; }
.steps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.progress { height: 8px; border-radius: 99px; background: #f3ebe8; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(270deg, var(--neon), var(--brand)); }

/* ---------- welcome banner (dashboards) ---------- */
.hello { position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; color: #fff; background: var(--ink);
  background-image: radial-gradient(520px 240px at 0% 0%, rgba(255,178,62,.35), transparent 70%), radial-gradient(600px 300px at 100% 120%, rgba(255,122,77,.65), transparent 70%); }
.hello h1 { color: #fff; margin: 0 0 6px; font-size: 1.55rem; }
.hello p { color: #ecd2c9; margin: 0; }
.hello .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.hello .btn.light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); box-shadow: none; }
.hello .btn.light:hover { background: rgba(255,255,255,.18); }
.hello .btn { background: #fff; color: var(--ink); box-shadow: none; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--bg); }
.auth .pane { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth .card { width: 100%; max-width: 430px; padding: 32px; margin: 0; border-radius: 20px; }
.auth.wide .card { max-width: 640px; }
.auth h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth .lead { color: var(--muted); margin-bottom: 22px; }
.auth .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-weight: 600; }
.auth .art { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(520px 320px at 20% 10%, rgba(255,178,62,.38), transparent 70%), radial-gradient(700px 420px at 90% 100%, rgba(255,122,77,.7), transparent 70%); }
.auth .art h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.35; max-width: 460px; font-weight: 600; }
.auth .art p { color: #ecd2c9; max-width: 420px; }
.auth .art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth .art li { display: flex; gap: 10px; align-items: center; color: #ffe2d8; }
.auth .art li .ic { color: var(--neon); }
.auth .art .ticket { margin-top: 30px; width: min(360px, 100%); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 16px 18px; backdrop-filter: blur(6px); }
.auth .art .ticket b { font-size: 1.5rem; display: block; margin-top: 4px; }
.auth .art .ticket small { color: #e9c9bf; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .art { display: none; } }
.qr { display: block; margin: 10px auto; width: 200px; height: 200px; }

/* ---------- misc used by pages ---------- */
.sticky-actions { position: sticky; bottom: 0; background: rgba(250,246,244,.92); backdrop-filter: blur(8px); padding: 12px 0; z-index: 5; border-top: 1px solid var(--line); margin-top: 8px; }
.section-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; background: #fff; }
.section-box > summary { cursor: pointer; padding: 4px 0; font-weight: 500; }
.thumb-wide { max-width: 100%; max-height: 120px; border-radius: 10px; display: block; margin-bottom: 8px; object-fit: cover; border: 1px solid var(--line); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slide-row { border-bottom: 1px dashed var(--line-2); padding-bottom: 12px; margin-bottom: 12px; }
.default-submit { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; margin: 8px 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; direction: ltr; text-align: left; min-height: 220px; background: #fdfaf8; }

/* design sections list */
.section-box > summary, details > summary { cursor: pointer; }
.tbl input, .tbl select { padding: 7px 10px; }

/* ---------- ready-made store designs (presets) ---------- */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.preset { position: relative; display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; margin: 0; }
.preset:hover { border-color: #dccdc9; }
.preset:has(input:checked), .preset.on { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(252,84,43,.12); }
.preset input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.preset .mini { height: 108px; border-radius: 10px; background: var(--pb, #fff); border: 1px solid rgba(0,0,0,.06); padding: 8px; display: grid; grid-template-rows: 12px 34px 1fr; gap: 6px; overflow: hidden; }
.preset .mini .h { display: flex; justify-content: space-between; align-items: center; }
.preset .mini .h i { width: 34px; height: 7px; border-radius: 4px; background: var(--p); }
.preset .mini .h b { width: 52px; height: 7px; border-radius: 4px; background: rgba(127,127,127,.25); }
.preset .mini .hero { border-radius: var(--pr, 8px); background: linear-gradient(135deg, var(--p), color-mix(in srgb, var(--p) 60%, var(--a))); }
.preset .mini .g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.preset .mini .g span { border-radius: calc(var(--pr, 8px) * .6); background: color-mix(in srgb, var(--p) 12%, var(--pb, #fff)); border: 1px solid rgba(127,127,127,.15); }
.preset strong { font-size: .9rem; }
.preset small { color: var(--muted); font-size: .76rem; display: flex; align-items: center; gap: 6px; }
.preset small i { width: 12px; height: 12px; border-radius: 50%; background: var(--p); display: inline-block; box-shadow: 14px 0 0 var(--a); margin-left: 16px; }
.wizard-steps { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: w; }
.wizard-steps li { flex: 1; font-size: .76rem; color: var(--muted); text-align: center; position: relative; padding-top: 34px; }
.wizard-steps li::before { counter-increment: w; content: counter(w); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: #f3ebe8; color: var(--muted); line-height: 28px; font-weight: 600; z-index: 1; }
.wizard-steps li::after { content: ""; position: absolute; top: 13px; left: 50%; width: calc(100% + 6px); height: 2px; background: #f3ebe8; }
.wizard-steps li:first-child::after { display: none; }
.wizard-steps li.done, .wizard-steps li.on { color: var(--text); font-weight: 500; }
.wizard-steps li.done::before { content: "✓"; background: var(--ok); color: #fff; }
.wizard-steps li.on::before { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(252,84,43,.15); }
.wizard-steps li.done::after, .wizard-steps li.on::after { background: var(--brand); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; margin: 0; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.side a.nl .cnt { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--neon); color: #fff; font-size: .74rem; font-weight: 600; line-height: 22px; text-align: center; box-shadow: 0 0 12px rgba(255,178,62,.5); }

/* ---------- v1.2: shared bits ---------- */
.nowrap { white-space: nowrap; }
.small { font-size: .8rem; }
.bad-text { color: var(--bad); }
.back { display: inline-block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.split.wide-first { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.card.soft { background: var(--surface-2); box-shadow: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn.lg { padding: 12px 24px; font-size: .98rem; border-radius: 12px; }
.row.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tbl td.acts { white-space: nowrap; }

/* restriction / update ribbon at the top of a page */
.restrict { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 14px;
  background: linear-gradient(90deg, #fff5f7, #fff); border: 1px solid #f6c6cf; border-right: 4px solid var(--bad); }
.restrict > .ic { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--bad-soft); color: var(--bad); }
.restrict div { flex: 1; display: flex; flex-direction: column; }
.restrict strong { font-weight: 600; } .restrict span { color: var(--muted); font-size: .88rem; }
@media (max-width: 640px) { .restrict { flex-wrap: wrap; } }

/* admin dashboard: task tiles */
.tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-2); }
.task:hover { text-decoration: none; border-color: var(--line-2); background: #fff; }
.task .ic { color: var(--faint); }
.task span { flex: 1; font-size: .88rem; }
.task b { font-size: 1.05rem; font-weight: 600; color: var(--faint); min-width: 26px; text-align: center; }
.task.due { background: #fff; border-color: #f2d49c; box-shadow: 0 6px 16px -12px rgba(178,107,0,.6); }
.task.due .ic, .task.due b { color: var(--warn); }
@media (max-width: 640px) { .tasks { grid-template-columns: 1fr; } }

/* sign-up */
.signup .field { margin-bottom: 18px; }
.pw { position: relative; }
.pw input { padding-left: 74px; }
.pw-toggle { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--brand-soft); color: var(--brand-text); font: inherit; font-size: .8rem; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.link-input { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; background: #fff; }
.link-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(252,84,43,.12); }
.link-input span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); color: var(--muted); font-size: .82rem; border-right: 1px solid var(--line); white-space: nowrap; max-width: 58%; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.link-input input { border: 0 !important; box-shadow: none !important; border-radius: 0; flex: 1; min-width: 0; }
.link-state { font-size: .8rem; color: var(--muted); margin-top: 6px; min-height: 1.3em; }
.link-state.ok { color: var(--ok); } .link-state.bad { color: var(--bad); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 96px; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px 8px; border: 1px solid var(--line-2); border-radius: 11px; font-size: .86rem; background: #fff; transition: border-color .12s, background .12s; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.seg.stack { flex-direction: column; margin-bottom: 14px; }
.plans-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plan-opt { cursor: pointer; margin: 0; }
.plan-opt input { position: absolute; opacity: 0; pointer-events: none; }
.plan-opt > span { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line-2); border-radius: 13px; background: #fff; height: 100%; }
.plan-opt strong { font-size: .98rem; } .plan-opt em { font-style: normal; color: var(--text); font-weight: 600; } .plan-opt small { color: var(--ok); }
.plan-opt input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(252,84,43,.14); }
input.otp { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 600; }

/* domains */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.flow-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.flow-step > b { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-size: .85rem; }
.flow-step strong { display: block; font-size: .92rem; } .flow-step span { color: var(--muted); font-size: .82rem; }
@media (max-width: 1080px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr; } }
.steps-list { margin: 0; padding-right: 20px; } .steps-list li { margin-bottom: 10px; } .steps-list li::marker { color: var(--brand-text); font-weight: 600; }
.domain-card .card-head { padding: 0 0 14px; border: 0; }
.domain-card .wizard-steps { max-width: 560px; }
.tbl.dns td, .tbl.dns th { padding: 10px 12px; }
.copy { cursor: copy; padding: 3px 8px; border-radius: 7px; background: var(--brand-soft); color: var(--brand-text); font-weight: 500; }
.copy.copied { background: var(--ok-soft); color: var(--ok); }
.copy.copied::after { content: " ✓"; }
details.hint { margin: 10px 0 14px; } details.hint summary { cursor: pointer; color: var(--brand-text); font-size: .88rem; } details.hint ul { margin: 10px 0 0; padding-right: 18px; color: #3f2c41; font-size: .88rem; }

/* complaint conversation */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.thread li { max-width: 86%; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.thread li .who { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.thread li .who strong { color: var(--text); font-weight: 600; }
.thread li .msg { white-space: normal; line-height: 1.8; }
.thread li.from-customer { align-self: flex-start; }
.thread li.from-merchant { align-self: flex-end; background: var(--brand-soft); border-color: #ffd5c7; }
.thread li.from-platform { align-self: center; max-width: 94%; background: #fff8e9; border-color: #f3dfb4; }
.thread li.from-system { align-self: center; max-width: 94%; background: transparent; border-style: dashed; color: var(--muted); font-size: .86rem; text-align: center; }
.thread .atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.thread .atts a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: .8rem; }
.card.decide { border-color: #cfe9df; }
.hello.link-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hello .big-link { color: #fff; font-size: 1.3rem; font-weight: 600; word-break: break-all; }
.hello .big-link:hover { color: #ffd9c9; }
.ktpl td { vertical-align: top; }
.ktpl input { min-width: 170px; }
.ktpl .ktext { display: block; line-height: 1.8; font-weight: 400; font-size: .85rem; }

/* ---------- v1.3: support tickets + inbox ---------- */
.badge.muted { background: #f6eeec; color: var(--muted); }
.mailbox { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.boxes { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.boxes a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--text); font-size: .9rem; }
.boxes a:hover { background: var(--surface); text-decoration: none; }
.boxes a.on { background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 8px 20px -16px rgba(37,18,40,.4); font-weight: 600; color: var(--brand-text); }
.boxes .cnt { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; line-height: 1.6; }
@media (max-width: 900px) { .mailbox { grid-template-columns: 1fr; } .boxes { position: static; flex-direction: row; flex-wrap: wrap; } }
.mail-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; border-bottom: 1px solid var(--line); }
.mail-filter input { flex: 1; min-width: 180px; } .mail-filter select { width: auto; }
.inbox { display: flex; flex-direction: column; }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text); position: relative; }
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--surface-2); text-decoration: none; }
.inbox-row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-row .line1 { display: flex; gap: 8px; align-items: center; }
.inbox-row .num { color: var(--faint); font-size: .8rem; }
.inbox-row .subj, .inbox-row .snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .snip { font-size: .84rem; }
.inbox-row .ir-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.inbox-row .ir-side .ic { width: 14px; height: 14px; vertical-align: -2px; }
.inbox-row.unread { background: #fdfaf8; }
.inbox-row.unread::before { content: ""; position: absolute; right: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--brand); }
.inbox-row.unread strong, .inbox-row.unread .subj { font-weight: 700; }
.inbox-row > .num { min-width: 52px; }
@media (max-width: 640px) { .inbox-row { flex-wrap: wrap; } .inbox-row .ir-side { flex-direction: row; align-items: center; width: 100%; } }
.thread li.from-staff { align-self: flex-start; background: #fff; border-color: #ffd5c7; border-right: 3px solid var(--brand); }
.thread li.internal { background: #fffbea !important; border: 1px dashed #e9cf7a !important; }
.flow-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn.ok-line { border-color: #bfe9da; color: var(--ok); }
.ticket-steps { max-width: 640px; margin: 0 auto; }
.reply-opts { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin: 4px 0 12px; font-size: .88rem; }
.reply-opts select { width: auto; margin-right: 6px; }
.decide-box form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.decide-box form textarea, .decide-box form input:not([type=radio]) { width: 100%; }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 1.6rem; color: #e8dcd9; cursor: pointer; line-height: 1; margin: 0; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #f5a623; }
.stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; color: var(--muted); }
.legend-list b { color: var(--text); margin-left: 6px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.plain-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.seg.wrap-seg label { flex: 0 1 auto; min-width: 0; }
.seg.wrap-seg span { padding: 8px 14px; }
.narrow-form { max-width: 760px; }

/* ---------- brand identity: logo ---------- */
.side .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.side .brand .brand-logo { height: 34px; width: auto; display: block; }
.side .brand small { margin: 0; padding-right: 2px; }
.auth .logo .brand-logo { height: 40px; width: auto; display: block; }
.marks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.mark-slot { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.mark-prev { height: 54px; display: grid; place-items: center; background: #fff; border-radius: 9px; border: 1px dashed var(--line-2); }
.mark-prev img { max-height: 34px; max-width: 120px; object-fit: contain; }
.mark-prev span { color: var(--faint); font-weight: 600; font-size: .85rem; }
.mark-slot input[type=file] { font-size: .78rem; }

/* filter bars (form.card.inline): a real flex row that wraps cleanly on phones */
form.card.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; }
form.card.inline > input, form.card.inline > select { flex: 1 1 200px; width: auto; min-width: 0; }
@media (max-width: 640px) {
  form.card.inline > input, form.card.inline > select { flex-basis: 100%; max-width: none !important; }
  form.card.inline > .btn { flex: 1 1 100%; }
}
.audit-kv { display: flex; flex-direction: column; gap: 2px; font-size: .78rem; }
.audit-kv span { color: var(--muted); }
.audit-kv b { font-weight: 500; color: var(--text); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.cron-help { display: flex; flex-direction: column; gap: 6px; }
.cron-help code { display: block; padding: 8px 10px; border-radius: 8px; background: #fff; color: var(--text); font-size: .8rem; word-break: break-all; text-align: left; }
