/* Nems — platform site, merchant dashboard and owner panel */
:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --ink: #0b1020;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e6e8ef;
  --line-2: #d0d5dd;
  --accent: #5b5bf6;
  --accent-dark: #4646e0;
  --accent-soft: #eef0ff;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --danger: #d92d20;
  --ok: #079455;
  --warn: #dc6803;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --side: #0b1020;
  --side-ink: #c7cbe0;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.center { text-align: center; }
code { padding: 1px 6px; border-radius: 6px; background: #f2f4f7; font-size: 13px; word-break: break-all; }
.icon { flex: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 17px; font-weight: 800; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .7); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: #f9fafb; }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecdca; }
.btn-danger:hover { background: #fef3f2; }
.btn-danger-ghost { background: #fff; color: var(--danger); border-color: #fecdca; }
.btn-danger-ghost:hover { background: #fef3f2; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn.is-static { cursor: default; color: var(--muted); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.link-button:hover { color: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); border: 1px solid var(--line); background: #fff; }

/* Forms */
.field { margin-bottom: 16px; flex: 1; min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=search], .field input[type=url], .field input[type=tel], .field select, .field textarea,
.search input[type=search], table input[type=number] {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 10px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; box-shadow: var(--shadow-sm);
}
@media (min-width: 821px) {
  .field input, .field select, .field textarea, .search input[type=search], table input[type=number] { font-size: 15px !important; }
}
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus, table input:focus {
  outline: none; border-color: #a4a6fb; box-shadow: 0 0 0 4px rgba(91, 91, 246, .14);
}
.field input[type=color] { width: 64px; height: 42px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.field input[type=file] { font: inherit; max-width: 100%; }
.field textarea { resize: vertical; }
.field textarea.code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px !important; line-height: 1.5; min-height: 320px; tab-size: 2; background: #0b1020; color: #e4e7ff; border-color: #0b1020; }
.field .help, p.help { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.field .error { margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.check label { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.field.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.field-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 200px; }
.field-row > .btn { margin-bottom: 16px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 12px; background: #f9fafb; color: var(--muted); border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; }
.input-prefix input { border-radius: 0 10px 10px 0 !important; }
.form-actions { margin: 4px 0 24px; }
.form-actions.sticky { position: sticky; bottom: 0; z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.danger-zone { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; background: var(--accent-soft); color: #3538cd; border: 1px solid #dfe1ff; font-weight: 500; }
.alert-success { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.alert-error { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.alert-warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }

/* ------------------------------------------------------------- site */
.site { background: #fff; }
.site-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 0 auto; padding: 14px 20px; background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px); }
.site-nav nav { display: flex; align-items: center; gap: 18px; }
.site-nav .link { color: var(--ink-2); font-weight: 600; }

.hero { position: relative; max-width: 940px; margin: 0 auto; padding: 64px 20px 40px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -40px 0 auto; height: 520px; z-index: -1; background: radial-gradient(600px 300px at 50% 0%, rgba(99, 102, 241, .18), transparent 70%), radial-gradient(400px 260px at 85% 30%, rgba(139, 92, 246, .14), transparent 70%); }
.eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.hero h1 { font-size: clamp(34px, 6.4vw, 62px); letter-spacing: -0.04em; line-height: 1.05; margin: 18px 0 18px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 14px; font-weight: 500; }
.trust span::before { content: "✓ "; color: var(--ok); font-weight: 800; }

.hero-preview { margin: 52px auto 0; max-width: 760px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -32px rgba(16, 24, 40, .35); text-align: left; background: #fff; }
.preview-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #f9fafb; border-bottom: 1px solid var(--line); }
.preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d0d5dd; }
.preview-bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: var(--muted); }
.preview-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px; }
.preview-photo { border-radius: 14px; min-height: 200px; background: linear-gradient(135deg, #c7d2fe, #fbcfe8 60%, #fde68a); }
.preview-form { display: flex; flex-direction: column; gap: 10px; direction: rtl; }
.preview-form strong { font-size: 15px; }
.preview-form i { display: block; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fcfcfd; }
.preview-form b { margin-top: 4px; padding: 11px; border-radius: 9px; background: var(--ink); color: #fff; text-align: center; font-size: 14px; }

.features, .steps, .pricing { max-width: 1160px; margin: 0 auto; padding: 72px 20px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2, .features > h2, .steps > h2, .pricing > h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.03em; text-align: center; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: box-shadow .2s, transform .2s; }
.feature-grid article:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-grid .f-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); }
.feature-grid h3 { font-size: 16px; margin-bottom: 6px; }
.feature-grid p { margin: 0; color: var(--muted); }
.steps { text-align: center; background: var(--bg); max-width: none; }
.steps ol { list-style: none; margin: 0 auto 32px; padding: 0; max-width: 960px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; text-align: left; }
.steps li { display: flex; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.steps li span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }
.steps h3 { font-size: 16px; margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--muted); }
.pricing > p { text-align: center; margin-bottom: 36px; }
.contact-band { margin: 0 20px 40px; border-radius: 24px; background: var(--side); background-image: radial-gradient(500px 220px at 20% 0%, rgba(99, 102, 241, .35), transparent 70%); color: #fff; text-align: center; padding: 56px 20px; }
.contact-band h2 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 10px; }
.contact-band p { color: #c7cbe0; }
.contact-band .hero-actions { margin-top: 22px; }
.contact-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.site-footer { padding: 28px 20px 36px; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); }

/* ------------------------------------------------------------- auth */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--bg); background-image: radial-gradient(700px 360px at 50% -10%, rgba(99, 102, 241, .16), transparent 70%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 20px 0 6px; font-size: 24px; }
.auth-card form { margin: 22px 0 16px; }

/* -------------------------------------------------------- app shell */
.dash { display: flex; min-height: 100vh; }
.sidebar { flex: none; width: 248px; padding: 20px 14px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand-light { color: #fff; padding: 0 8px; }
.context-name { margin: 14px 8px 18px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-tag { display: inline-flex; align-items: center; gap: 6px; color: #fbbf24; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-ink); font-weight: 600; font-size: 14px; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side-nav a.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.side-nav a .icon { opacity: .9; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.nav-owner { margin-top: 8px; color: #fbbf24 !important; }
.plan-chip { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #f2f4f7; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.side-nav .plan-chip { background: rgba(255, 255, 255, .1); color: var(--side-ink); }
.plan-chip-paid, .side-nav .plan-chip-paid { background: #fef0c7; color: #93370d; }
.sidebar-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.btn-sidebar { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .12); margin-bottom: 8px; }
.btn-sidebar:hover { background: rgba(255, 255, 255, .14); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; color: #98a0bf; font: inherit; font-size: 13px; cursor: pointer; text-align: left; width: 100%; }
.side-link:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .05); }
.sidebar-foot form { margin: 0; }
.topbar, .bottom-nav { display: none; }

.dash-main { flex: 1; min-width: 0; padding: 30px 36px 56px; max-width: 1200px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs span { margin: 0 6px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card > h2 { margin-bottom: 14px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .table-wrap { margin: 0; padding: 0; }
.card-flush .pager { padding: 14px; }
.card-pad { padding: 18px 22px 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state h2 { margin-bottom: 8px; }
.share { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--side); background-image: radial-gradient(400px 160px at 0% 0%, rgba(99, 102, 241, .45), transparent 70%); color: #fff; border: 0; }
.share h2 { margin-bottom: 4px; font-size: 13px; color: #c7cbe0; font-weight: 600; }
.share a { color: #fff; font-weight: 700; word-break: break-all; }
.share .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stats .card { margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
a.stat:hover { text-decoration: none; border-color: #c7c9fd; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat strong { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.stat small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-alert { border-color: #fedf89; background: #fffcf5; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: var(--grad); }
.bar em { font-style: normal; font-size: 13px; font-weight: 700; }
.bar span { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 11px 14px; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #eef0f4; vertical-align: middle; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; transition: background .1s; }
tr[data-href]:hover td { background: #f8f9ff; }
tr.selected td { background: #f2f3ff; }
td.check, th.check { width: 44px; padding-right: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.thumb-cell { width: 60px; }
.thumb { display: block; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #f2f4f7; border: 1px solid var(--line); }
.row-actions { text-align: right; }
.row-actions a { margin-left: 12px; font-weight: 600; }
table.rates input[type=number] { max-width: 130px; padding: 7px 10px; }
table.rates input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.inline-table input { width: 100%; min-width: 90px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; }
.inline-table input[type=checkbox] { width: 18px; min-width: 0; height: 18px; }
.inline-table td { vertical-align: top; }

.bulk-bar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--side); color: #fff; }
.bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bulk-bar .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); box-shadow: none; }
.bulk-bar .btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.bulk-bar .btn-danger-ghost { background: transparent; color: #fda29b; border-color: rgba(253, 162, 155, .4); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f2f4f7; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-new { background: #eff4ff; color: #155eef; }
.badge-no_answer { background: #fdf2fa; color: #c11574; }
.badge-confirmed { background: #f4f3ff; color: #5925dc; }
.badge-processing { background: #fffaeb; color: #b54708; }
.badge-shipped { background: #f0f9ff; color: #026aa2; }
.badge-delivered { background: #ecfdf3; color: #067647; }
.badge-paid { background: #067647; color: #fff; }
.badge-returned { background: #fef6ee; color: #b93815; }
.badge-cancelled { background: #f2f4f7; color: #667085; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; border-color: var(--line-2); }
.tabs a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs span { opacity: .6; font-weight: 500; margin-left: 3px; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; min-width: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; padding-top: 14px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.details .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 17px; color: var(--ink); font-weight: 800; }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.actions form { display: inline; }

.gallery-edit { display: flex; gap: 12px; flex-wrap: wrap; }
.gallery-edit label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; cursor: pointer; }
.gallery-edit img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.gallery-edit span { display: flex; align-items: center; gap: 6px; }

.locked { color: var(--muted); font-weight: 600; }

/* Usage meter */
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.usage-grid span { display: block; color: var(--muted); font-size: 14px; }
.usage-grid strong { font-size: 22px; }
.usage-grid small { font-size: 13px; color: var(--muted); font-weight: 600; }
.meter { height: 8px; border-radius: 999px; background: #f2f4f7; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.meter i.warn { background: #f79009; }

/* Order status picker */
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-picker label { cursor: pointer; padding: 7px 12px; font-size: 13px; border: 2px solid transparent; }
.status-picker input { margin: 0 4px 0 0; vertical-align: -2px; }
.status-picker label:has(input:checked) { border-color: currentColor; }
.status-picker .badge::before { display: none; }

/* Settings hub */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.setting { display: flex; gap: 14px; align-items: flex-start; margin: 0; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.setting:hover { text-decoration: none; border-color: #c7c9fd; box-shadow: var(--shadow); }
.setting h2 { font-size: 15px; margin-bottom: 4px; }
.setting p { margin: 0; color: var(--muted); font-size: 13px; }
.setting-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); position: relative; }
.setting-icon::after { content: ""; position: absolute; inset: 12px; border-radius: 4px; background: var(--accent); opacity: .85; }
.setting-billing { background: #fef0c7; } .setting-billing::after { background: #dc6803; border-radius: 50%; }
.setting-blocked { background: #fee4e2; } .setting-blocked::after { background: #d92d20; border-radius: 50%; }
.setting-shipping { background: #dcfae6; } .setting-shipping::after { background: #079455; }
.setting-pixels { background: #e0f2fe; } .setting-pixels::after { background: #0086c9; border-radius: 50%; }
.setting-yalidine { background: #fdead7; } .setting-yalidine::after { background: #e62e05; border-radius: 2px; inset: 13px 10px; }
.ticket { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ticket code { font-size: 14px; padding: 4px 8px; border-radius: 6px; background: #f2f4f7; }
.yal-tag { font-size: 11px; color: #079455; font-weight: 600; }
.ticket-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ticket-periods { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { width: 100%; }
.kv th, .kv td { background: none; padding: 9px 0; font-size: 14px; border-bottom: 1px solid #eef0f4; white-space: normal; }
.kv th { color: var(--ink-2); font-weight: 500; }
.kv td { text-align: right; font-weight: 600; }
.kv tr.muted th, .kv tr.muted td { color: var(--muted); font-weight: 400; font-size: 13px; padding: 5px 0; }
.kv-total th, .kv-total td { font-weight: 700; font-size: 16px; border-bottom: 0; }
.ship-state { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; color: #344054; }
.ship-delivered { background: #dcfae6; color: #067647; }
.ship-returned, .ship-returning, .ship-cancelled { background: #fee4e2; color: #b42318; }
.ship-out, .ship-ready { background: #fef0c7; color: #93370d; }
.ship-in_transit { background: #e0f2fe; color: #026aa2; }
.ship-failed { background: #ffead5; color: #c4320a; }
fieldset.card { min-width: 0; }
fieldset[disabled] { opacity: .6; }
.upsell { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #eef0ff, #f7f0ff); border-color: #dfe1ff; }
.upsell h2 { margin-bottom: 4px; }
.upsell p { margin: 0; }
.howto { margin-top: 8px; padding: 14px 16px; border-radius: 12px; background: #f9fafb; border: 1px dashed var(--line-2); }
.howto h3 { font-size: 14px; margin-bottom: 6px; }
.howto ol, .howto ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.seo-preview { margin-top: 8px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); }
.seo-preview .seo-url { display: block; color: #067647; font-size: 13px; }
.seo-preview strong { display: block; color: #1a0dab; font-size: 18px; font-weight: 500; }
.seo-preview p { margin: 2px 0 0; color: #4d5156; font-size: 14px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; margin: 0; padding: 26px; }
.plan h2 { font-size: 18px; }
.plan-tag { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.plan-price { margin: 14px 0 18px; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan-highlight { border: 2px solid var(--accent); box-shadow: 0 24px 48px -24px rgba(91, 91, 246, .45); }
.plan-dark { background: var(--side); color: #fff; border-color: var(--side); }
.plan-dark .plan-price small, .plan-dark .plan-tag { color: #98a0bf; }
.plan-dark li { color: #e4e7ff; }
.plan-dark .btn-ghost { background: #fff; color: var(--ink); }
.plan-current { outline: 2px solid var(--ok); outline-offset: -2px; }
.plan-ribbon { position: absolute; top: -12px; right: 18px; padding: 3px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-method { display: flex !important; align-items: center; gap: 8px; padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; font-weight: 600 !important; margin: 0 !important; }
.pay-method.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.amount-box { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--accent-soft); }
.amount-box span { color: #3538cd; font-weight: 600; }
.amount-box strong { font-size: 24px; }
.amount-box em { font-style: normal; color: var(--muted); font-weight: 600; }
.pay-info { padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--line); background: #fcfcfd; }
.pay-info h3 { font-size: 15px; margin-bottom: 8px; }

/* Owner panel payments */
.pay-list { display: flex; flex-direction: column; }
.pay-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pay-item:last-child { border-bottom: 0; }
.pay-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-item-actions { display: flex; gap: 8px; }

/* Landing page editor */
.editor-tabs { display: flex; gap: 8px; margin: 14px 0 12px; }
.howto summary { cursor: pointer; }
.howto .prompt-box { margin: 10px 0; }
.editor-preview { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prompt-box { position: relative; padding: 14px 16px; border-radius: 12px; background: #f9fafb; border: 1px solid var(--line); font-size: 13px; white-space: pre-wrap; color: var(--ink-2); max-height: 240px; overflow: auto; }

/* ----------------------------------------------------------- mobile */
@media (max-width: 820px) {
  body.dash { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .brand { font-size: 16px; min-width: 0; }
  .topbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
  .topbar-actions { display: flex; gap: 8px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .bottom-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav a.active .icon { stroke-width: 2.2; }
  .bottom-nav em { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
  .dash-main { padding: 18px 14px 32px; }
  h1 { font-size: 22px; }
  .card { padding: 16px; border-radius: 14px; }
  .card-pad { padding: 14px 16px 0; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat strong { font-size: 22px; }
  .two-col { grid-template-columns: 1fr; }
  .page-head { margin-bottom: 14px; }
  .form-actions.sticky { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .form-actions.sticky .btn { width: 100%; }
  .preview-body { grid-template-columns: 1fr; }
  .preview-photo { min-height: 130px; }
  .site-nav .link { display: none; }
  .hero { padding-top: 40px; }
  .editor-preview { height: 420px; }

  /* Tables become cards on phones */
  table.orders-table thead, table.cards-on-mobile thead { display: none; }
  table.orders-table, table.orders-table tbody, table.cards-on-mobile, table.cards-on-mobile tbody { display: block; }
  table.orders-table tr, table.cards-on-mobile tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
  table.orders-table td, table.cards-on-mobile td { display: block; padding: 0; border: 0; white-space: normal; }
  table.orders-table tr { grid-template-columns: 28px 1fr auto; }
  table.orders-table td.check { grid-row: span 3; padding-top: 2px; }
  table.orders-table td[data-label="Date"], table.orders-table td[data-label="Wilaya"] { color: var(--muted); font-size: 13px; }
  table.orders-table td[data-label="Statut"], table.orders-table td[data-label="Total"] { text-align: right; }
  table.orders-table td[data-label="Produit"] { grid-column: 2 / 4; color: var(--ink-2); font-size: 14px; }
  table.orders-table td[data-label="Téléphone"] { font-size: 14px; }
  .orders-table td[data-label="N°"] { order: 1; } .orders-table td[data-label="Statut"] { order: 2; }
  .orders-table td[data-label="Client"] { order: 3; } .orders-table td[data-label="Total"] { order: 4; }
  .orders-table td[data-label="Téléphone"] { order: 5; } .orders-table td[data-label="Wilaya"] { order: 6; }
  .orders-table td[data-label="Produit"] { order: 7; } .orders-table td[data-label="Date"] { order: 8; grid-column: 2 / 4; }
  .orders-table td.check { order: 0; }
  tr[data-href]:hover td { background: transparent; }
  tr[data-href]:active { background: #f8f9ff; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---- Arabic dashboard (right to left) ---- */
.lang-form { margin: 0; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.settings-actions form { margin: 0; }
.lang-label { font: inherit; background: none; padding: 0; color: inherit; }
.lang-btn { width: auto; padding: 0 10px; font-size: 13px; font-weight: 700; }
.auth-lang { position: absolute; top: 16px; inset-inline-end: 16px; }
[dir="rtl"] { --font: "Cairo", "Inter", system-ui, sans-serif; }
[dir="rtl"] body { font-family: "Cairo", "Inter", system-ui, sans-serif; }
[dir="rtl"] th, [dir="rtl"] .side-link, [dir="rtl"] .hero-preview, [dir="rtl"] .steps ol { text-align: right; }
[dir="rtl"] .row-actions, [dir="rtl"] .details dd, [dir="rtl"] .kv td,
[dir="rtl"] table.orders-table td[data-label="Statut"], [dir="rtl"] table.orders-table td[data-label="Total"] { text-align: left; }
[dir="rtl"] .nav-count, [dir="rtl"] .plan-chip { margin-left: 0; margin-right: auto; }
[dir="rtl"] .row-actions a { margin-left: 0; margin-right: 12px; }
[dir="rtl"] .tabs span { margin-left: 0; margin-right: 3px; }
[dir="rtl"] .preview-bar em { margin-left: 0; margin-right: 10px; }
[dir="rtl"] td.check, [dir="rtl"] th.check { padding-right: 14px; padding-left: 0; }
[dir="rtl"] .howto ol, [dir="rtl"] .howto ul { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .plan li { padding: 6px 26px 6px 0; }
[dir="rtl"] .plan li::before { left: auto; right: 2px; }
[dir="rtl"] .plan-ribbon { right: auto; left: 18px; }
[dir="rtl"] .input-prefix span { border-right: 1px solid var(--line-2); border-left: 0; border-radius: 0 10px 10px 0; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="tel"], [dir="rtl"] .field textarea.code, [dir="rtl"] code { direction: ltr; }
.auth-card { position: relative; }

/* AI credit packs */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; border: 1.5px solid var(--line, #e5e7eb); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 93, 252, .18); }
.pack-credits { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.pack-credits em { font-style: normal; font-size: 12px; font-weight: 700; color: #16a34a; background: #dcfce7; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.pack-price { margin-top: 6px; font-size: 16px; }

/* sign-up: honeypot hidden from people, code input */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.code-input { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 700; }
.link-btn { background: none; border: 0; padding: 6px; cursor: pointer; text-decoration: underline; font: inherit; }

.trial-over { border: 1.5px solid #f59e0b; background: #fffbeb; margin-bottom: 16px; }
.trial-over h2 { margin: 0 0 6px; color: #b45309; }
.trial-over p { margin: 0; }

/* plan cards: the numbers first, then what is included */
.plan-limits { margin: 0 0 16px; padding: 12px 0; display: grid; gap: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-limits div { display: flex; align-items: baseline; gap: 8px; }
.plan-limits dt { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; min-width: 0; }
.plan-limits dd { margin: 0; font-size: 14px; color: var(--muted); }
.plan-inc { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.plan-dark .plan-limits dd, .plan-dark .plan-inc { color: #98a0bf; }
.plan-dark .plan-limits { border-color: rgba(255,255,255,.12); }
.plan-badge { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; align-self: center; }
[dir="rtl"] .plan-badge { margin-left: 0; margin-right: auto; }

/* Phones: nothing may push the page sideways (it made the page wobble when scrolling).
   html hidden + body clip: no sideways pan, and sticky headers keep working. */
html { overflow-x: hidden; }
body { overflow-x: clip; max-width: 100%; }
img, video, iframe, svg, canvas { max-width: 100%; }

.captcha { margin: 4px 0 14px; min-height: 65px; display: flex; justify-content: center; }

/* Settings > Pixels: one box per pixel ID */
.px-list { display: flex; flex-direction: column; gap: 8px; }
.px-row { display: flex; gap: 8px; align-items: center; }
.px-row input { flex: 1; min-width: 0; }
.px-del { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line, #e5e7eb); background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.px-del:hover { border-color: #ef4444; color: #ef4444; }
.px-add { align-self: flex-start; }

/* Mobile: Commandes / Abandonnées switch (the sidebar link is hidden on phones) */
.order-switch { display: none; }
@media (max-width: 820px) {
  .order-switch { display: flex; gap: 6px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .order-switch a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
  .order-switch a:hover { text-decoration: none; }
  .order-switch a.on { background: var(--accent); color: #fff; }
  .order-switch span { min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 12px; line-height: 18px; text-align: center; }
  .order-switch a.on span { background: rgba(255,255,255,.25); }
}

/* App install banner (PWA) + iPhone instructions sheet */
.app-inst { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.app-inst[hidden], .ios-sheet[hidden] { display: none; }
.app-inst .brand-mark { flex: none; width: 42px; height: 42px; border-radius: 12px; font-size: 21px; }
.app-inst-txt { flex: 1; min-width: 0; }
.app-inst-txt b { display: block; font-size: 15px; }
.app-inst-txt small { display: block; color: var(--muted); font-size: 13px; }
.app-inst .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.app-inst-big { flex-direction: column; text-align: center; border: 0; padding: 0; background: none; }
.app-inst-big .brand-mark, .app-inst-big .app-inst-txt { display: none; }
.app-inst-big .btn { width: 100%; justify-content: center; padding: 15px; font-size: 17px; }
@media (min-width: 821px) { .dx .app-inst { display: none; } }
.ios-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; background: rgba(6, 8, 20, .55); }
.ios-sheet-card { position: relative; width: 100%; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #fff; color: #10131f; text-align: center; animation: sheetUp .25s ease-out; }
.ios-sheet-card .brand-mark { margin: 0 auto 8px; width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
.ios-sheet-card h2 { margin: 0 0 14px; font-size: 19px; }
.ios-sheet-card ol { list-style: none; margin: 0 0 18px; padding: 0; text-align: left; }
.ios-sheet-card li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ios-sheet-card li > span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; }
.ios-sheet-card li .icon { color: #0a84ff; }
.ios-sheet-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.ios-sheet-arrow { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%) rotate(90deg); color: #fff; animation: sheetNudge 1s ease-in-out infinite alternate; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetNudge { to { bottom: -38px; } }
.app-page-mark { margin: 0 auto 10px; width: 72px; height: 72px; font-size: 36px; border-radius: 20px; }
.app-page h1 { margin: 0 0 6px; }
.app-page .app-inst, .app-page .btn-ghost { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .ios-sheet-card, .ios-sheet-arrow { animation: none; } }
.ios-sheet-card li p { margin: 0; line-height: 1.5; }
.ios-sheet-card li p .icon { vertical-align: -4px; }

/* Download the app: Android / iPhone cards with their own 3-step guide (landing + /app/) */
.app-dl-sec { max-width: 980px; margin: 0 auto; padding: 90px 20px; }
.app-dl-sec .section-head p { max-width: 560px; margin: 8px auto 0; text-align: center; }
.app-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 28px; text-align: left; }
.app-os { position: relative; padding: 22px; border: 1px solid var(--line, #e6e8ef); border-radius: 20px; background: var(--glass, #fff); }
.app-os.is-mine { border-color: var(--accent, #6d28d9); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.app-os-mine { display: none; position: absolute; top: -11px; right: 18px; padding: 3px 10px; border-radius: 999px; background: var(--accent, #6d28d9); color: #fff; font-size: 12px; font-weight: 700; }
.app-os.is-mine .app-os-mine { display: block; }
.app-os-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.app-os-head h3 { margin: 0; font-size: 20px; }
.app-os-head small { color: var(--muted, #676d92); }
.app-os-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.app-os-android { background: #34a853; }
.app-os-apple { background: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.app-os .btn-block { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; font-size: 16px; }
.app-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.app-steps li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line, #e6e8ef); font-size: 14px; }
.app-steps li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent, #6d28d9); color: #fff; font-size: 12px; font-weight: 700; }
.app-steps p { margin: 0; line-height: 1.5; }
.app-steps .icon { vertical-align: -4px; color: #0a84ff; }
.app-os-help { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(52, 168, 83, .12); font-size: 14px; line-height: 1.5; }
.app-os-help[hidden], .app-done-msg[hidden] { display: none; }
.app-done-msg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; color: #16a34a; font-weight: 600; }
.app-dl-main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; text-align: center; }
.app-dl-main > .brand { display: inline-flex; margin-bottom: 30px; }
.app-dl-main h1 { margin: 0 0 8px; font-size: clamp(26px, 6vw, 38px); letter-spacing: -.02em; }
.app-dl-main > .btn-ghost { margin-top: 22px; }
.app-os.is-mine { order: -1; }

/* ---- Phones: landing "Application" button, product and recent-order cards ---- */
.nav-app { display: none; }
@media (max-width: 820px) {
  .site-nav { padding-inline: 14px; }
  .site-nav nav { gap: 8px; }
  .nav-app { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); white-space: nowrap; }
  .nav-app:hover { text-decoration: none; }
  [data-theme="light"] .nav-app { color: var(--ink); background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.25); }

  .dx-grid, .dx-side { min-width: 0; }

  table.prod-table tr { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb title title" "thumb price state" "thumb stock orders" "actions actions actions"; gap: 4px 12px; align-items: center; }
  .prod-table .thumb-cell { grid-area: thumb; width: auto; align-self: start; }
  .prod-table .thumb { width: 56px; height: 56px; border-radius: 12px; }
  .prod-table .p-title { grid-area: title; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .prod-table .p-title a { color: var(--ink); }
  .prod-table .p-price { grid-area: price; font-weight: 800; color: var(--accent); white-space: nowrap; }
  .prod-table .p-state { grid-area: state; justify-self: end; }
  .prod-table .p-stock { grid-area: stock; }
  .prod-table .p-orders { grid-area: orders; justify-self: end; }
  .prod-table .p-stock, .prod-table .p-orders { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .prod-table .row-actions { grid-area: actions; display: flex; gap: 8px; margin-top: 6px; text-align: center; }
  .prod-table .row-actions a { flex: 1; display: flex; align-items: center; justify-content: center; height: 36px; margin: 0; border-radius: 10px; font-size: 14px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.18); }
  .prod-table .row-actions a:hover { text-decoration: none; }
  [dir="rtl"] .prod-table .row-actions a { margin: 0; }

  table.recent-table tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num status" "name total" "wil total"; gap: 2px 12px; padding: 12px 16px; }
  .recent-table .o-num { grid-area: num; font-weight: 700; }
  .recent-table .o-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .recent-table .o-wil { grid-area: wil; font-size: 13px; color: var(--muted); }
  .recent-table .o-total { grid-area: total; align-self: center; font-weight: 800; white-space: nowrap; }
  .recent-table .o-status { grid-area: status; justify-self: end; }
  .table-wrap:has(> table.cards-on-mobile) { margin: 0 -16px; padding: 0; overflow: visible; }
}

/* Réglages: real icons instead of plain shapes */
.setting-icon { display: grid; place-items: center; color: var(--accent); }
.setting-icon::after { content: none !important; }
.setting-shipping { color: #079455; } .setting-pixels { color: #0086c9; } .setting-blocked { color: #d92d20; }
.setting-billing { color: #dc6803; } .setting-domain { background: #ede9fe; color: #7c3aed; } .setting-account { background: #f2f4f7; color: #344054; }
.setting-appearance { background: #fce7f6; color: #c11574; } .setting-checkout { background: #e0eaff; color: #3538cd; }
@media (max-width: 820px) {
  table.ab-table tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who total" "prod prod" "wil when" "act act"; gap: 4px 12px; }
  .ab-table .ab-who { grid-area: who; } .ab-table .ab-total { grid-area: total; font-weight: 800; white-space: nowrap; }
  .ab-table .ab-prod { grid-area: prod; font-size: 14px; color: var(--ink-2); }
  .ab-table .ab-wil { grid-area: wil; font-size: 13px; color: var(--muted); } .ab-table .ab-wil br { display: none; } .ab-table .ab-wil small::before { content: " · "; }
  .ab-table .ab-when { grid-area: when; justify-self: end; }
  .ab-table .row-actions { grid-area: act; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; text-align: start; }
  .ab-table .row-actions > a { flex: 1; margin: 0; justify-content: center; }
  .ab-table .row-actions form { display: flex; gap: 8px; width: 100%; margin: 0; }
  .ab-table .row-actions form .btn-ghost { flex: 1; }
}
@media (max-width: 480px) {
  .site .site-nav .brand { font-size: 15px; gap: 6px; }
  .site .site-nav .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .site-nav nav { gap: 4px; }
  .site .site-nav { padding-inline: 10px; }
  .site-nav .theme-toggle { width: 30px; height: 30px; border-radius: 10px; }
  .site-nav .site-lang { padding: 0 6px; min-width: 30px; height: 30px; }
  .site-nav .site-lang .ll-full { display: none; }
  .site-nav .site-lang .ll-short { display: inline !important; }
  .site-nav .nav-app { height: 30px; width: 30px; padding: 0; gap: 0; justify-content: center; }
  .site-nav .nav-app span { display: none; }
  .site .site-nav .btn-primary { height: 32px; padding: 0 9px; font-size: 12.5px; min-width: 0; }
  .site .site-nav { gap: 8px; }
}

@media (max-width: 370px) {
  .site .site-nav .brand { font-size: 13.5px; gap: 5px; }
  .site .site-nav { gap: 6px; padding-inline: 8px; }
  .site-nav nav { gap: 3px; }
  .site .site-nav .btn-primary { padding: 0 7px; font-size: 12px; }
}

.m-lbl { display: none; }
@media (max-width: 820px) { .prod-table .m-lbl { display: inline; } }

/* iPhone steps: Safari (share at the bottom) vs Chrome / Firefox / Edge (share at the top) */
[data-ios="other"] { display: none !important; }
.ios-other [data-ios="other"] { display: flex !important; }
.ios-other [data-ios="safari"] { display: none !important; }
.ios-other .ios-sheet-arrow { position: fixed; top: calc(6px + env(safe-area-inset-top)); bottom: auto; left: auto; right: 64px; transform: rotate(-90deg) scale(1.5); color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); animation: sheetNudgeUp 1s ease-in-out infinite alternate; }
@keyframes sheetNudgeUp { to { top: calc(-2px + env(safe-area-inset-top)); } }

/* Installed app (no browser bar): back arrow before the brand in the top bar */
.back-btn { flex: none; width: 36px; height: 36px; margin-inline-end: -2px; }
.back-btn .icon { transform: rotate(180deg); }
[dir="rtl"] .back-btn .icon { transform: none; }
.topbar .back-btn:not([hidden]) + .brand { margin-inline-end: auto; }
.back-btn[hidden] { display: none !important; }

/* Order notifications (Réglages card + in-app toast) */
.push-card { margin: 0 0 18px; padding: 18px; }
.push-head { display: flex; gap: 14px; align-items: flex-start; }
.push-head h2 { font-size: 16px; margin: 0 0 4px; }
.push-head p { margin: 0; color: var(--muted, #6b7280); font-size: 14px; }
.setting-push { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.push-status { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: #059669; min-height: 0; }
.push-status:empty { display: none; }
.push-status.push-bad { color: #b45309; font-weight: 500; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.order-toast { position: fixed; z-index: 9999; inset-inline: 12px; top: calc(env(safe-area-inset-top, 0px) + 12px); max-width: 420px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  background: #111827; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.28); animation: toast-in .35s ease-out; transition: opacity .5s, transform .5s; }
.order-toast strong { font-size: 15px; }
.order-toast span { font-size: 13px; opacity: .85; }
.order-toast.out { opacity: 0; transform: translateY(-12px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.push-apk { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 12px; background: rgba(116, 97, 240, .08); border: 1px solid rgba(116, 97, 240, .3); color: inherit; text-decoration: none; }
.push-apk[hidden] { display: none; }
.push-apk svg { flex: none; color: #7461F0; }
.push-apk span { font-size: 13.5px; line-height: 1.45; }
.push-apk strong { display: block; font-size: 14.5px; }

/* AI product: short busy label, the wait hint under the button (no huge text on phones) */
.ain-wait { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ain-actions .btn { max-width: 100%; white-space: normal; }
@media (max-width: 600px) { .ain-actions .btn-lg { font-size: 15px; padding: 12px 18px; } }
