/* لوحة التحكم (التاجر ومدير المنصة) */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  background: #0f1d1c; color: #d6e2e0; padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.side .logo-mark { color: #fff; padding: 4px 8px 14px; }
.side-store { padding: 10px; margin: 0 0 8px; background: rgba(255,255,255,.06); border-radius: 10px; }
.side-store b { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-store a { color: #7fd3c7; font-size: .82rem; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: #c5d3d1; text-decoration: none !important; font-weight: 500; font-size: .94rem;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; }
.nav a .count { margin-inline-start: auto; background: #f59e0b; color: #111; border-radius: 20px; font-size: .72rem; padding: 0 7px; font-weight: 700; }
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 8px 4px; }
.side-foot { margin-top: auto; padding-top: 12px; }
.side-foot button { width: 100%; justify-content: flex-start; background: transparent; color: #c5d3d1; border: 0; }
.side-foot button:hover { background: rgba(255,255,255,.06); }

.main { min-width: 0; }
.topbar {
  display: none; position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 8px 12px; align-items: center; justify-content: space-between; gap: 8px;
}
.content { padding: 24px; max-width: 1180px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 1.4rem; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; margin-bottom: 6px; }

.sub-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.auth-page { background: linear-gradient(160deg, #e6f4f2, #f6f7f9 50%); }
.auth-title { margin: 18px 0 6px; font-size: 1.35rem; }
.auth-links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 16px; font-size: .92rem; }
#auth-form { margin-top: 16px; }
#auth-form .btn { margin-top: 6px; }

.setup-list { list-style: none; padding: 0; margin: 0; }
.setup-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.setup-list li:last-child { border-bottom: 0; }
.setup-list .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.setup-list li.done .dot { background: var(--ok); color: #fff; }
.setup-list li.done span { color: var(--muted); text-decoration: line-through; }
.setup-list a { margin-inline-start: auto; font-size: .88rem; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.bars .bar:hover { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; margin-top: 6px; }

.prod-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.prod-cell img, .prod-cell .noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }

.order-items { width: 100%; border-collapse: collapse; }
.order-items td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.order-items td:last-child { text-align: end; white-space: nowrap; }
.order-items img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.totals { margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }

.opt-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.acct-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }

.plans-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--surface); display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.plan-card .price { font-size: 1.6rem; font-weight: 800; margin: 6px 0; }
.plan-card .price small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.plan-card ul { padding: 0; margin: 10px 0 16px; list-style: none; font-size: .9rem; flex: 1; }
.plan-card li { padding: 3px 0; display: flex; gap: 6px; align-items: flex-start; }
.plan-card li .ic { color: var(--ok); flex: none; margin-top: 3px; }

.theme-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.theme-pick label { border: 2px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; position: relative; }
.theme-pick input { position: absolute; opacity: 0; }
.theme-pick input:checked + div { color: var(--brand); }
.theme-pick label:has(input:checked) { border-color: var(--brand); }
.theme-pick label.locked { opacity: .55; cursor: not-allowed; }
.theme-prev { height: 70px; border-radius: 6px; margin-bottom: 8px; background: var(--surface-2); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 6px; }
.theme-prev i { background: #fff; border-radius: 3px; }
.theme-prev.modern { background: #f3f0ea; }
.theme-prev.modern i { border-radius: 10px; }
.theme-prev.bold { background: #111; }
.theme-prev.bold i { background: #333; }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.color-row button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-row input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-pick .preview { width: 84px; height: 84px; border-radius: 12px; background: var(--surface-2) center/cover; border: 1px solid var(--line); flex: none; }
.img-pick .preview.cover { width: 160px; height: 70px; }

.lock-card { text-align: center; padding: 30px 16px; }
.lock-card .ic { color: var(--muted); margin: 0 auto 8px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 0 0 auto; width: 270px; z-index: 50;
    transform: translateX(100%); transition: transform .2s;
  }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .topbar { display: flex; }
  .content { padding: 16px 12px 40px; }
  .acct-row { grid-template-columns: 1fr 1fr; }
  .opt-row { grid-template-columns: 1fr; }
}
@media print {
  .side, .topbar, .page-head .row { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}
