/* MyCart Admin — vanilla CSS */
:root {
  --bg: #f4f5f7; --card: #fff; --text: #1d2129; --muted: #6b7280; --line: #e5e7eb;
  --brand: #fe2c55; --brand-dark: #e01e45; --side: #121418; --side-text: #c9ccd3;
  --ok: #16a34a; --warn: #d97706; --err: #dc2626; --info: #2563eb;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #f1f2f4; padding: 1px 6px; border-radius: 4px; font-size: .88em; word-break: break-all; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; margin-top: 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; padding: 22px 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; color: var(--side-text); padding: 10px 12px; border-radius: 8px; }
.sidebar nav a svg { width: 18px; height: 18px; fill: currentColor; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot a, .sidebar-foot .link { color: var(--side-text); }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 28px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 1.2rem; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; }
.content { padding: 24px 28px 60px; max-width: 1680px; }

/* Card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card.narrow { max-width: 480px; }
.card.sticky { position: sticky; top: 16px; }
.empty { text-align: center; color: var(--muted); padding: 32px; }

/* Form */
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 14px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 14px; }
label.danger { color: var(--err); }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(254, 44, 85, .25); border-color: var(--brand); }
label.inline input { width: auto; margin: 0; }
input[type="color"] { height: 44px; padding: 4px; }
textarea.code { font-family: ui-monospace, monospace; font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.checks { margin-bottom: 12px; }
.form-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }

/* Button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: 1px solid #d1d5db; background: #fff; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f9fafb; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-danger { color: var(--err); border-color: #fecaca; }
.btn-sm { padding: 6px 10px; font-size: .85rem; }
.btn-block { width: 100%; margin-top: 8px; }

/* Alert & badge */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef0f3; color: #374151; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped { background: #ede9fe; color: #5b21b6; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-failed, .badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { display: block; font-size: 1.5rem; margin-top: 4px; }
.stat-accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat-accent span { color: rgba(255,255,255,.85); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar i { display: block; width: 100%; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar small { color: var(--muted); font-size: .7rem; }

/* Table */
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #fafafa; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.table tr:last-child td { border-bottom: 0; }
.table input[type="checkbox"] { width: auto; margin: 0; }
.kv { width: 100%; font-size: .92rem; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 12px 6px 0; width: 140px; vertical-align: top; }
.kv td { padding: 6px 0; }
.log { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.log li { padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* Toolbar, tabs, pager */
.toolbar, .bulkbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .bulkbar select { width: auto; flex: 1; min-width: 200px; margin: 0; }
.bulkbar select { flex: 0 1 280px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-color: var(--brand); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); }
.pager a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Produk */
.product-row { display: flex; align-items: center; gap: 16px; padding: 14px; }
.product-row .thumb { width: 64px; height: 64px; border-radius: 8px; background: #f1f2f4; overflow: hidden; flex-shrink: 0; }
.product-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-row .info { flex: 1; min-width: 0; }
.product-row .title { font-weight: 600; color: var(--text); }
.product-row .meta { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.product-row .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.product-row form { margin: 0; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-bottom: 16px; }
.img-item { border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: .8rem; }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 4px; }
.img-item label { margin: 2px 0; }
.tpl-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tpl-opt { margin: 0; text-align: center; font-size: .78rem; font-weight: 500; cursor: pointer; }
.tpl-opt input { position: absolute; opacity: 0; width: 1px; }
.tpl-opt span { display: block; height: 64px; border: 2px solid var(--line); border-radius: 8px; margin-bottom: 4px; background: linear-gradient(#f1f2f4 45%, #fff 45%); }
.tpl-opt .tpl-tiktok { background: linear-gradient(#222 55%, #fff 55%, #fff 80%, var(--brand) 80%); }
.tpl-opt .tpl-minimal { background: linear-gradient(90deg, #eee 50%, #fff 50%); }
.tpl-opt .tpl-longform { background: repeating-linear-gradient(#fff 0 8px, #e5e7eb 8px 10px); }
.tpl-opt input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(254,44,85,.15); }
.tpl-opt input:focus-visible + span { outline: 2px solid var(--brand); }

/* Auth / installer */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; background: linear-gradient(160deg, #121418, #2a1520); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.install-card { max-width: 560px; }
.auth-card h1 { font-size: 1.3rem; }
.auth-card h2 { margin-top: 24px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.auth-logo { font-weight: 800; font-size: 1.4rem; color: var(--brand); margin-bottom: 16px; }
.checklist { list-style: none; padding: 12px 16px; margin: 0 0 16px; background: #fafafa; border-radius: 8px; columns: 2; font-size: .85rem; }
.checklist .ok { color: var(--ok); }
.checklist .bad { color: var(--err); font-weight: 600; }

@media (max-width: 1000px) {
  .form-cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .card.sticky { position: static; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: -240px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-btn { display: block; }
  .topbar { padding: 14px 16px; }
  .content { padding: 16px 16px 60px; }
  .product-row { flex-wrap: wrap; }
  .product-row .actions { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
}
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.toolbar .btn { margin: 0; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.auth-links { display: flex; gap: 8px; margin-top: 12px; }
.auth-links form { margin: 0; flex: 1; }
.auth-links .link, .btn-ghost { display: block; width: 100%; text-align: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.auth-links .link:hover, .btn-ghost:hover { background: #f6f7f9; border-color: #cfd3da; text-decoration: none; }
.auth-foot { text-align: center; margin-top: 16px; font-size: .9rem; color: var(--muted); display: flex; justify-content: center; gap: 6px 14px; flex-wrap: wrap; }
.auth-foot a { color: var(--info); }
.auth-sub { color: var(--muted); margin: -8px 0 16px; font-size: .92rem; }
.captcha-row input { max-width: 120px; }
.video-preview { margin-bottom: 14px; }
.video-preview video { width: 100%; max-width: 320px; max-height: 320px; border-radius: 8px; background: #000; display: block; margin-bottom: 6px; }
.item-line { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.card-highlight { border-color: #fde68a; background: #fffdf5; }
.receipt-thumb { width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 8px; }
.badge-verifying { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.nav-count { margin-left: auto; background: var(--brand); color: #fff; font-size: .72rem; padding: 0 7px; border-radius: 999px; }
.pay-tag { font-size: .72rem; color: var(--muted); }
/* Tetapan */
.settings-tabs { position: sticky; top: 0; background: var(--bg); z-index: 5; }
.card.narrow-lg { max-width: 760px; }
.card .card-head .switch { margin: 0; }
.grid-3 { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 0 14px; }
.save-bar { position: sticky; bottom: 0; max-width: 760px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; margin-bottom: 12px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { flex: 0 0 40px; height: 22px; border-radius: 22px; background: #d1d5db; position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.qr-field { display: flex; gap: 16px; align-items: flex-start; }
.qr-field img { width: 110px; height: 110px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qr-field > div { flex: 1; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
/* Pratonton butang */
.btn-preview { background: #f4f5f7; border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.pv-btn { --btn: #fe2c55; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 16px; border-radius: 10px; background: var(--btn); color: #fff; font-weight: 700; text-align: center; }
.pv-btn .pv-price { font-size: .78rem; font-weight: 500; }
.pv-btn s { opacity: .75; margin-left: 4px; }
.pv-inline { flex-direction: row; gap: 10px; }
.pv-inline .pv-price { font-size: .95rem; font-weight: 700; }
.pv-gradient { background: linear-gradient(100deg, var(--btn), color-mix(in srgb, var(--btn) 60%, #ff9a3c)); }
.pv-outline { background: #fff; color: var(--btn); box-shadow: inset 0 0 0 2px var(--btn); }
.pv-glow { box-shadow: 0 0 0 4px color-mix(in srgb, var(--btn) 25%, transparent), 0 8px 20px color-mix(in srgb, var(--btn) 40%, transparent); }
.pv-pill { border-radius: 999px; }
.review-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.review-card form { margin: 0; }
.review-body { margin: 10px 0 14px; }
.stars-admin { color: #f5a524; letter-spacing: 1px; }
.update-list { padding-left: 20px; margin: 12px 0 16px; }
.update-list li { margin-bottom: 6px; }
.sidebar-foot .ver { font-size: .78rem; opacity: .6; }
/* Editor variasi */
.vtable { display: grid; gap: 8px; }
[data-vrows] { display: grid; gap: 8px; }
[data-vrows]:empty { display: none; }
.vhead, .vline { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, .6fr) minmax(0, .8fr) 76px; gap: 8px; align-items: center; }
.vtable-don .vhead, .vtable-don .vline { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 76px; }
.sku-in { text-transform: uppercase; font-family: ui-monospace, monospace; font-size: .85rem; }
.vhead { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.vtable.is-empty .vhead { display: none; }
.vline input { margin: 0; }
.vbtns { display: flex; gap: 4px; }
.icon-btn { width: 34px; height: 38px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; cursor: pointer; font-size: .95rem; color: var(--text); }
.icon-btn:hover:not(:disabled) { background: #f9fafb; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--err); border-color: #fecaca; }
.vadd { justify-self: start; margin-top: 4px; }
@media (max-width: 560px) {
  .vhead { display: none; }
  .vline { grid-template-columns: 1fr 1fr 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
  .vline input[name="v_name[]"] { grid-column: 1 / -1; }
  .vline .vbtns { grid-column: 1 / -1; justify-content: flex-end; }
}
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 12px; }
.channel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.channel input { width: auto; margin: 0; accent-color: var(--brand); }
.channel .ch-ico { font-size: 1.2rem; width: 24px; text-align: center; }
.channel b { display: block; font-size: .9rem; }
.channel small { display: block; color: var(--muted); font-size: .76rem; }
.channel:has(input:checked) { border-color: var(--brand); background: #fff5f7; }
.channel.is-off small { color: var(--err); }

/* Senarai order lebar penuh */
.table .col-addr { min-width: 220px; max-width: 340px; font-size: .86rem; line-height: 1.4; }
.table td { line-height: 1.4; }
.table td small { font-size: .8rem; }
.badge { white-space: nowrap; }
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.courier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; margin-bottom: 14px; }
.courier-grid label { margin: 0; }
.test-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #f8f9fb; border-radius: 10px; padding: 12px; }
.test-box input { width: 90px; margin: 0; }
.test-box .btn { margin: 0; }
.inline-form { display: inline; margin-left: 8px; } .inline-form .link { color: var(--info); text-decoration: underline; }

@media (max-width: 560px) {
  .vline { grid-template-columns: 1fr 1fr; }
  .vline input[name="v_name[]"] { grid-column: 1 / -1; }
}
.sku-tag { display: inline-block; font-family: ui-monospace, monospace; font-size: .74rem; background: #f1f2f4; color: #374151; padding: 1px 6px; border-radius: 4px; margin: 1px 2px 1px 0; }
.awb-preview { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 8px; background: #525659; }
.badge-warn { background: #fef3c7; color: #92400e; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; margin: 0; font-weight: 400; }
.mode-opt input { width: auto; margin: 3px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.mode-opt b { display: block; }
.mode-opt small { display: block; }
.mode-opt:has(input:checked) { border-color: var(--brand); background: #fff5f7; }
@media (max-width: 600px) { .mode-pick { grid-template-columns: 1fr; } }

/* Template baru + editor Mini Site */
.tpl-opt .tpl-shopee { background: linear-gradient(#f5f5f5 40%, #fff 40%, #fff 62%, #f5f5f5 62%, #f5f5f5 80%, #ee4d2d 80%); }
.tpl-opt .tpl-minisite { background: linear-gradient(135deg, #6366f1, #ec4899 70%); position: relative; }
.tpl-opt .tpl-minisite::after { content: "</>"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; }
.tpl-opt.is-locked { opacity: .5; cursor: not-allowed; }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.5; tab-size: 2; white-space: pre; overflow: auto; background: #0f172a; color: #e2e8f0; border-color: #0f172a; min-height: 320px; }
.ms-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ms-help { margin-top: 10px; }
.ms-help summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.ms-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.ms-dialog { width: min(1100px, 96vw); height: 92vh; padding: 0; border: 0; border-radius: 12px; display: none; flex-direction: column; overflow: hidden; }
.ms-dialog[open] { display: flex; }
.ms-dialog::backdrop { background: rgba(15, 23, 42, .6); }
.ms-dialog-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ms-dialog-bar b { margin-right: auto; }
.ms-dev { display: flex; gap: 4px; }
.ms-dialog-body { flex: 1; min-height: 0; background: #e5e7eb; display: flex; justify-content: center; }
.ms-dialog-body iframe { width: 390px; max-width: 100%; height: 100%; border: 0; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.ms-note { margin: 0; padding: 6px 14px; }
[hidden] { display: none !important; }
.remember-row { display: flex !important; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: .88rem; color: var(--muted); font-weight: 400; } .remember-row input { width: auto; margin: 0; accent-color: var(--brand); }

/* ================= Sidebar panel ================= */
:root {
  --ps-w: 248px; --ps-w-mini: 72px;
  --ps-bg: #ffffff; --ps-text: #3b3f47; --ps-muted: #9aa0aa; --ps-line: #eceef1;
  --ps-hover: #f3f4f6; --ps-on-bg: #111318; --ps-on-text: #ffffff; --ps-cta: var(--brand);
}
.ps-dark {
  --ps-bg: #1c1d21; --ps-text: #c9ccd3; --ps-muted: #6f747e; --ps-line: #2b2d33;
  --ps-hover: #26282d; --ps-on-bg: #ffffff; --ps-on-text: #111318;
}
.ps-has-side { padding-left: var(--ps-w); transition: padding-left .2s; }
.ps-side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--ps-w); display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 14px; background: var(--ps-bg); color: var(--ps-text); border-right: 1px solid var(--ps-line);
  transition: width .2s, transform .25s; overflow: hidden; }
.ps-side svg { width: 20px; height: 20px; flex: 0 0 20px; }
.ps-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 10px; }
.ps-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; font-weight: 700; font-size: .95rem; }
.ps-brand:hover { text-decoration: none; }
.ps-brand .ps-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-logo { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand); color: #fff; }
.ps-logo svg { width: 18px; height: 18px; flex-basis: 18px; }
.ps-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 9px; background: none; color: var(--ps-muted); cursor: pointer; }
.ps-icon-btn:hover { background: var(--ps-hover); color: var(--ps-text); text-decoration: none; }
.ps-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 8px; padding: 11px 12px; border-radius: 999px;
  background: var(--ps-cta); color: #fff; font-weight: 600; font-size: .88rem; letter-spacing: .02em; white-space: nowrap; }
.ps-cta:hover { text-decoration: none; filter: brightness(1.05); }
.ps-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; }
.ps-group { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ps-muted); padding: 14px 12px 6px; white-space: nowrap; height: 34px; }
.ps-group:first-child { padding-top: 4px; height: 24px; }
.ps-nav a, .ps-row-btn { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ps-text);
  font-size: .92rem; white-space: nowrap; border: 0; background: none; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.ps-nav a:hover, .ps-row-btn:hover { background: var(--ps-hover); text-decoration: none; }
.ps-nav a.on { background: var(--ps-on-bg); color: var(--ps-on-text); font-weight: 600; }
.ps-dot { position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; }
.ps-dot-warn { background: #f59e0b; } .ps-dot-err { background: #dc2626; }
.ps-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--ps-line); display: flex; flex-direction: column; gap: 8px; }
.ps-switch { margin-left: auto; width: 32px; height: 18px; border-radius: 9px; background: var(--ps-line); position: relative; flex: 0 0 32px; }
.ps-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .2s; }
.ps-dark .ps-switch { background: var(--brand); } .ps-dark .ps-switch::after { left: 16px; }
.ps-user { display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--ps-line); border-radius: 999px; }
.ps-user.on { border-color: var(--brand); }
.ps-user-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; }
.ps-user-main:hover { text-decoration: none; }
.ps-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #ff8a4c); color: #fff; font-weight: 700; }
.ps-user-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ps-user-txt b { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-user-txt small { font-size: .74rem; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mod kecil (ikon sahaja) — desktop sahaja */
@media (min-width: 901px) {
.ps-mini .ps-has-side { padding-left: var(--ps-w-mini); }
.ps-mini .ps-side { width: var(--ps-w-mini); padding-left: 12px; padding-right: 12px; }
.ps-mini .ps-side .ps-txt { display: none; }
.ps-mini .ps-head { flex-direction: column; padding: 0 0 10px; }
.ps-mini .ps-brand { flex: 0 0 auto; }
.ps-mini .ps-collapse svg { transform: scaleX(-1); }
.ps-mini .ps-cta { padding: 11px 0; }
.ps-mini .ps-group { height: 14px; padding: 6px 0; margin: 6px 8px; border-top: 1px solid var(--ps-line); }
.ps-mini .ps-group:first-child { border-top: 0; margin-top: 0; }
.ps-mini .ps-nav a, .ps-mini .ps-row-btn { justify-content: center; padding: 10px 0; }
.ps-mini .ps-dot { right: 6px; top: 8px; margin: 0; }
.ps-mini .ps-user { border: 0; padding: 0; flex-direction: column; gap: 6px; }
.ps-mini .ps-user-main { flex: 0 0 auto; }

}

/* Telefon: sidebar keluar dari kiri */
.ps-mtop { display: none; }
.ps-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(15,17,21,.45); }
@media (max-width: 900px) {
  .ps-has-side, .ps-mini .ps-has-side { padding-left: 0; }
  .ps-side { transform: translateX(-100%); }
  .ps-open .ps-side { box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  .ps-open .ps-side { transform: none; }
  .ps-collapse { display: none; }
  .ps-mtop { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
  .ps-mtop .ps-brand { font-size: .95rem; color: var(--text); }
  .ps-mtop .ps-icon-btn { color: var(--text); }
  .ps-mtop svg { width: 22px; height: 22px; }
}
@media print { .ps-side, .ps-mtop { display: none !important; } .ps-has-side { padding-left: 0 !important; } }

/* Sidebar admin kedai */
.ps-shop { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 0 4px; border: 1px solid var(--ps-line); border-radius: 12px; color: var(--ps-text); }
.ps-shop:hover { background: var(--ps-hover); text-decoration: none; }
.ps-shop-ico { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 8px; background: var(--ps-hover); }
.ps-shop-ico svg { width: 18px; height: 18px; flex-basis: 18px; }
.ps-shop-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ps-shop-txt b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-shop-txt small { font-size: .72rem; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; }
.ps-on-dark .ps-badge, .ps-nav a.on .ps-badge { background: #fff; color: var(--brand); }
.ps-logout { margin: 0; }
.seller-admin .main { min-width: 0; }
.seller-admin .menu-btn { display: none; }
@media (min-width: 901px) {
  .ps-mini .ps-shop { justify-content: center; padding: 6px 0; border: 0; }
  .ps-mini .ps-badge { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: .6rem; padding: 0 4px; }
}
@media (max-width: 900px) {
  .seller-admin .menu-btn { display: grid; color: var(--text); margin-left: -6px; }
  .seller-admin .topbar { position: sticky; top: 0; z-index: 30; padding: 12px 16px; }
}
.product-form select[name=status] + .switch { margin-top: 16px; }

/* Media */
.media-head { display: grid; gap: 12px; }
.media-usage .db-bar { height: 8px; background: var(--line, #eef0f3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.media-usage .db-bar i { display: block; height: 100%; background: #16a34a; }
.media-usage .db-bar i.near { background: #f59e0b; } .media-usage .db-bar i.full { background: #dc2626; }
.media-upload { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.media-upload input[type=file] { flex: 1; min-width: 200px; margin: 0; }
.media-convert { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.media-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media-item { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.media-item.unused { border-style: dashed; }
.media-thumb { position: relative; display: block; aspect-ratio: 1; background: repeating-conic-gradient(#f1f2f4 0 25%, #fafafa 0 50%) 0 0/16px 16px; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tag { position: absolute; left: 6px; top: 6px; background: rgba(17,24,39,.75); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.media-tag.ok { background: #16a34a; }
.media-meta { padding: 8px 10px 10px; display: grid; gap: 6px; }
.media-used { font-size: .78rem; color: #166534; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-used.none { color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
.media-used.none input { width: auto; margin: 0; }

/* Penyunting templat emel (dikongsi panel & admin kedai) */
.mtpl textarea { font: inherit; font-weight: 400; line-height: 1.5; }
.mtpl-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.mtpl-chip { border: 1px solid var(--line); background: var(--card, #fff); color: var(--text); border-radius: 999px; padding: 3px 10px; font: 600 .78rem ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.mtpl-chip:hover { border-color: var(--brand); color: var(--brand); }
.mtpl-help { margin: 4px 0 12px; }
.mtpl-card + .mtpl-card { margin-top: 16px; }

/* Bar had pelan */
.limit-bars { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.limit-bar { flex: 1 1 200px; min-width: 180px; }
.lb-top { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.lb-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.lb-track { height: 7px; background: var(--line, #eef0f3); border-radius: 4px; overflow: hidden; }
.lb-track i { display: block; height: 100%; background: #16a34a; border-radius: 4px; }
.limit-bar.near .lb-track i { background: #f59e0b; } .limit-bar.full .lb-track i { background: #dc2626; }
.limit-bar.full .lb-top b { color: #dc2626; }
.lb-up { font-size: .85rem; font-weight: 600; white-space: nowrap; }

/* Pilih jenis produk */
.type-pick-card { max-width: 760px; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.type-opt { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 2px solid var(--line); border-radius: 14px; color: var(--text); background: var(--card, #fff); transition: border-color .15s, transform .15s; }
.type-opt:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.type-opt b { font-size: 1.1rem; }
.type-opt small { color: var(--muted); line-height: 1.5; }
.type-opt .type-ico { font-size: 2rem; line-height: 1; }
.type-opt.is-locked { opacity: .65; cursor: default; }
.type-opt.is-locked:hover { border-color: var(--line); transform: none; }
.type-badge { display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px; background: var(--card, #fff); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; }
@media (max-width: 640px) { .type-pick { grid-template-columns: 1fr; } }

/* Derma */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.camp-card { display: grid; gap: 8px; color: var(--text); text-decoration: none; border: 1.5px solid var(--line); margin: 0; }
.camp-card:hover { text-decoration: none; border-color: var(--brand); }
.camp-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.camp-top { display: flex; gap: 10px; align-items: center; }
.camp-top img, .camp-ico { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.camp-ico { display: grid; place-items: center; background: #fdf2f8; font-size: 1.3rem; }
.camp-top b { display: block; line-height: 1.3; }
.camp-top small { display: block; }
.camp-wait { color: #b45309; font-weight: 600; }
.camp-raised b { font-size: 1.25rem; }
.camp-card .lb-track i { background: var(--brand); }
.donor-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.don-amount { font-size: 2rem; font-weight: 800; margin: 4px 0 12px; }
.col-msg { max-width: 260px; font-size: .88rem; }
.log-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; display: grid; gap: 6px; }
.badge-paid { white-space: nowrap; }
@media (max-width: 860px) { .donor-detail { grid-template-columns: 1fr; } }
.badge-don { background: #fdf2f8; color: #be185d; }

/* Notis kedai ditutup & mod super admin */
.closed-notice { display: grid; gap: 8px; }
.cn-note { background: rgba(255,255,255,.6); border-radius: 8px; padding: 8px 10px; }
.cn-note small { display: block; font-weight: 600; opacity: .8; margin-bottom: 2px; }
.cn-act { display: flex; gap: 8px; flex-wrap: wrap; }
.cn-act:empty { display: none; }
.imp-bar { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* Staf */
.staff-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.staff-layout > .card, .staff-layout > div > .card { margin-top: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { width: auto; margin: 0; padding: 6px 8px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.role-pick { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.role-pick legend { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.radio-card { display: flex !important; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; margin: 0 !important; }
.radio-card input { width: auto; margin-top: 3px; }
.radio-card small { display: block; color: var(--muted); font-weight: 400; }
.radio-card:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, transparent); }
@media (max-width: 960px) { .staff-layout { grid-template-columns: 1fr; } }
.banner-prev { display: grid; gap: 6px; margin-bottom: 12px; } .banner-prev img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; }
.ps-switch-shop { display: flex; align-items: center; gap: 8px; margin: -4px 12px 10px; padding: 6px 10px; border-radius: 8px; font-size: .8rem; color: var(--side-muted, #6b7280); text-decoration: none; } .ps-switch-shop:hover { background: rgba(0,0,0,.04); text-decoration: none; } .ps-switch-shop svg { width: 16px; height: 16px; } .ps-mini .ps-switch-shop { justify-content: center; } .ps-mini .ps-switch-shop .ps-txt { display: none; }

/* Log masuk: jenama di luar kotak, pautan lupa kata laluan, pembahagi */
.auth-stack { flex-direction: column; gap: 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.35rem; text-decoration: none; letter-spacing: -.01em; }
.auth-brand:hover { text-decoration: none; color: #fff; }
.auth-brand small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.14); }
.auth-brand-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.auth-brand-logo svg { width: 20px; height: 20px; }
.pw-label .pw-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pw-forgot { font-size: .82rem; font-weight: 500; color: var(--info); }
.auth-hint { font-size: .8rem; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: var(--muted); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-plat { background: linear-gradient(160deg, #0b1220, #172554); }

/* ===== Warna sidebar ikut kawasan: Super admin (biru gelap) · Akaun seller (ungu) · Admin kedai (putih) ===== */
.ps-brand-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ps-area { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ps-muted); }
html:not(.ps-dark) body.plat-body {
  --ps-bg: #0f172a; --ps-text: #cbd5e1; --ps-muted: #7c8aa5; --ps-line: #1e293b;
  --ps-hover: #1e293b; --ps-on-bg: #3b82f6; --ps-on-text: #ffffff;
}
html:not(.ps-dark) body.acct-body {
  --ps-bg: #1e1b4b; --ps-text: #ddd6fe; --ps-muted: #a5b4fc; --ps-line: #312e81;
  --ps-hover: #312e81; --ps-on-bg: #ffffff; --ps-on-text: #1e1b4b;
}
body.plat-body .ps-area { color: #60a5fa; }
body.acct-body .ps-area { color: #c4b5fd; }
body.seller-admin .ps-area { color: var(--brand); }
html:not(.ps-dark) body.plat-body .ps-side, html:not(.ps-dark) body.acct-body .ps-side { border-right-color: transparent; }
body.plat-body .ps-user, body.acct-body .ps-user { border-color: var(--ps-line); }
body.plat-body .ps-mtop, body.acct-body .ps-mtop { background: var(--ps-bg); border-bottom-color: var(--ps-line); }
body.plat-body .ps-mtop .ps-brand, body.plat-body .ps-mtop .ps-icon-btn, body.acct-body .ps-mtop .ps-brand, body.acct-body .ps-mtop .ps-icon-btn { color: #fff; }
.acct-main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }
.channel .ch-txt { flex: 1; min-width: 0; } .channel .ch-switch { margin: 0; flex: 0 0 auto; } .channel .ch-switch span { display: block; } .channel.is-off small { color: #b45309; }

/* Laporan kedai */
.rpt-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rpt-tabs { margin-bottom: 0; border-bottom: 0; }
.rpt-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rpt-custom input { width: auto; margin: 0; padding: 6px 8px; }
.rpt-kpis .stat { display: grid; gap: 2px; }
.delta { font-size: .78rem; font-weight: 700; } .delta.up { color: #16a34a; } .delta.down { color: #dc2626; }
.rpt-chart { height: 200px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.rpt-chart .rc { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.rpt-chart .rc:hover .rc-bar { filter: brightness(.9); }
.rc-bar { width: 100%; max-width: 34px; background: var(--brand); border-radius: 4px 4px 1px 1px; }
.rpt-axis { display: flex; gap: 3px; margin-top: 4px; } .rpt-axis small { flex: 1; text-align: center; font-size: .66rem; color: var(--muted); white-space: nowrap; overflow: visible; }
.rpt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.rpt-grid .card { margin: 0; }
.rpt-grid .lb-track { margin-top: 4px; height: 5px; } .rpt-grid .lb-track i { background: var(--brand); }
@media (max-width: 900px) { .rpt-grid { grid-template-columns: 1fr; } }
.rpt-kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* v0.17 — Notifikasi Telegram */
.tg-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tg-card .card-head h2 { margin: 0; }
.tg-connect { display: flex; gap: 20px; align-items: center; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 12px; padding: 16px; margin-top: 8px; }
.tg-steps-box { flex: 1; min-width: 0; }
.tg-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.8; }
.tg-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tg-btn { background: #229ed9 !important; border-color: #229ed9 !important; color: #fff !important; }
.tg-qr { text-align: center; flex: 0 0 150px; }
.tg-qr [data-qr] { width: 150px; height: 150px; background: #fff; border-radius: 10px; padding: 4px; border: 1px solid #e2e8f0; }
.tg-qr [data-qr] svg { width: 100%; height: 100%; display: block; }
.tg-chats { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.tg-chats li { display: flex; align-items: center; gap: 10px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.tg-ico { font-size: 1.3rem; }
.tg-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tg-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-more { margin-top: 12px; }
.tg-more summary { cursor: pointer; font-weight: 600; color: var(--brand, #fe2c55); }
.tg-nudge { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-nudge.alert-info { background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e; }
.tg-nudge .btn { background: #229ed9; border-color: #229ed9; color: #fff; }
.tg-nudge > span { flex: 1; min-width: 220px; }
@media (max-width: 640px) {
  .tg-connect { flex-direction: column-reverse; align-items: stretch; }
  .tg-qr { display: none; }
  .tg-btn { width: 100%; justify-content: center; }
}
@media (max-width: 640px) { .tg-qr-hint { display: none; } }
.switch .sw-txt small { display: block; font-size: .8rem; }

/* v0.18 — 2FA Telegram */
.tg2fa-wait { display: flex; gap: 12px; align-items: center; background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; text-align: left; }
.tg2fa-wait .tg2fa-t { display: block; }
.tg2fa-wait small { display: block; font-size: .82rem; line-height: 1.45; margin-top: 2px; }
.tg2fa-spin { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #bae6fd; border-top-color: #229ed9; animation: tg2spin .9s linear infinite; }
.tg2fa-wait.is-ok .tg2fa-spin { animation: none; border-color: #16a34a; background: #16a34a; }
.tg2fa-wait.is-expired { opacity: .6; }
.tg2fa-wait.is-expired .tg2fa-spin { animation: none; }
@keyframes tg2spin { to { transform: rotate(360deg); } }
.tg-login-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tg-login-card .card-head h2 { margin: 0; }
.tg-login-card .tg-btn { display: inline-flex; }
.auth-alt { text-align: center; font-size: .85rem; margin-top: 10px; }

/* v0.19 — Popup setup kedai */
.onb-fab { margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: inherit; box-shadow: 0 2px 10px rgba(15,23,42,.08); transition: transform .15s, box-shadow .15s; }
.onb-fab:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.onb-ring { width: 34px; height: 34px; transform: rotate(-90deg); position: absolute; left: 6px; top: 50%; margin-top: -17px; }
.onb-ring circle { fill: none; stroke-width: 3.2; }
.onb-ring-bg { stroke: #e5e7eb; }
.onb-ring-fg { stroke: var(--brand, #fe2c55); stroke-linecap: round; transition: stroke-dasharray .4s; }
.onb-fab-ico { width: 34px; height: 34px; display: grid; place-items: center; font-size: 1rem; position: relative; animation: onbBob 2.4s ease-in-out infinite; }
.onb-fab-txt { font-size: .88rem; white-space: nowrap; }
.onb-fab.onb-pop { animation: onbPop .6s cubic-bezier(.3,1.6,.5,1); }
.onb-fab.onb-pop::after { content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid var(--brand, #fe2c55); animation: onbRing .9s ease-out forwards; pointer-events: none; }
@keyframes onbBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes onbPop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes onbRing { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.35); } }
.onb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.onb[hidden] { display: none; }
.onb-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.5); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.onb.is-open .onb-backdrop { opacity: 1; }
.onb-card { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card, #fff); border-radius: 18px; padding: 28px; box-shadow: 0 30px 80px rgba(15,23,42,.35); transform: translateY(16px) scale(.97); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .25s; }
.onb.is-open .onb-card { transform: none; opacity: 1; }
.onb-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f5f9; font-size: 1.3rem; line-height: 1; cursor: pointer; color: #475569; }
.onb-x:hover { background: #e2e8f0; }
.onb-hero { text-align: center; margin-bottom: 18px; }
.onb-emoji { font-size: 2.6rem; display: block; animation: onbWave 1.6s ease-in-out 2; transform-origin: 70% 70%; }
@keyframes onbWave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(14deg); } 80% { transform: rotate(-4deg); } }
.onb-hero h2 { margin: 8px 0 6px; font-size: 1.35rem; }
.onb-hero p { margin: 0; color: var(--muted, #64748b); font-size: .92rem; line-height: 1.55; }
.onb-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .85rem; color: var(--muted, #64748b); }
.onb-prog-bar { flex: 1; height: 8px; border-radius: 8px; background: #eef2f7; overflow: hidden; }
.onb-prog-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand, #fe2c55), #fb923c); border-radius: 8px; transition: width .5s; }
.onb-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.onb-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; transition: background .2s; }
.onb-steps li.is-next { border-color: var(--brand, #fe2c55); background: #fff5f7; box-shadow: 0 0 0 3px rgba(254,44,85,.08); }
.onb-steps li.is-done { background: #f8fafc; }
.onb-steps li.is-done .onb-step-txt b { color: #94a3b8; text-decoration: line-through; }
.onb-check { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: #eef2f7; color: #475569; }
.onb-steps li.is-done .onb-check { background: #16a34a; color: #fff; }
.onb-steps li.is-next .onb-check { background: var(--brand, #fe2c55); color: #fff; }
.onb-step-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.onb-step-txt b { font-size: .95rem; }
.onb-step-txt small { color: var(--muted, #64748b); font-size: .8rem; line-height: 1.4; }
.onb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.onb-foot .link { background: none; border: 0; color: var(--muted, #64748b); cursor: pointer; font: inherit; text-decoration: underline; }
.onb-share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.onb-share code { background: #f1f5f9; padding: 8px 12px; border-radius: 8px; font-size: .85rem; word-break: break-all; }
body.onb-lock { overflow: hidden; }
@media (max-width: 640px) {
  .onb-card { padding: 22px 18px; }
  .onb-fab-txt { display: none; }
  .onb-fab { padding: 4px; }
  .onb-ring { left: 4px; }
  .onb-steps li { flex-wrap: wrap; }
  .onb-steps li .btn { margin-left: 40px; }
  .onb-foot { flex-direction: column-reverse; align-items: stretch; }
  .onb-foot .btn { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .onb-fab-ico, .onb-emoji { animation: none; } }

/* v0.20 — Penghantaran ringkas */
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand, #fe2c55); color: #fff; font-size: .85rem; margin-right: 6px; vertical-align: 2px; }
.mode-pick-3 { grid-template-columns: repeat(3, 1fr); }
.mode-opt.is-disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) { .mode-pick-3 { grid-template-columns: 1fr; } }
.ship-form .live-only { display: none; }
.ship-form:has(input[name=ship_mode][value=live]:checked) .live-only { display: block; }
.ship-form:has(input[name=ship_mode][value=free]:checked) .ship-flat,
.ship-form:has(input[name=ship_mode][value=free]:checked) .ship-freemin { display: none; }
.courier-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.courier-box .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.courier-box h3 { margin: 0; }
.seg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-pick label { margin: 0; cursor: pointer; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 400; }
.seg-pick span small { display: block; color: var(--muted); font-size: .8rem; }
.seg-pick input:checked + span { border-color: var(--brand); background: #fff5f7; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-pick label { margin: 0; cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 500; background: #fff; }
.chip-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-pick input:focus-visible + span, .seg-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.adv-box > summary { cursor: pointer; list-style: none; }
.adv-box > summary::-webkit-details-marker { display: none; }
.adv-box[open] > summary { margin-bottom: 14px; }

/* v0.20 — Kupon */
.coupon-form .cp-pct, .coupon-form .cp-fixed { display: none; }
.coupon-form:has(input[name=type][value=pct]:checked) .cp-pct { display: grid; }
.coupon-form:has(input[name=type][value=fixed]:checked) .cp-fixed { display: grid; }
.coupon-form .cp-products { display: none; margin-top: 10px; }
.coupon-form:has(input[name=scope][value=some]:checked) .cp-products { display: flex; }
.coupon-form .seg-pick span { text-align: center; }
.code-up { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.cp-code { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .05em; background: #fff5f7; border: 1.5px dashed var(--brand, #fe2c55); color: var(--brand, #fe2c55); padding: 3px 8px; border-radius: 6px; }
.coupon-table tr.is-off td { opacity: .55; }
.coupon-table .row-actions { white-space: nowrap; }
.coupon-table .row-actions form { display: inline; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.coupon-form .cp-days, .coupon-form .cp-n { display: none; }
.coupon-form:has(input[name=type][value=trial_days]:checked) .cp-days { display: grid; }
.coupon-form:has(input[name=type][value=trial_days]:checked) .cp-repeat { display: none; }
.coupon-form:has(input[name=repeat_mode][value=n]:checked) .cp-n { display: block; margin-top: 10px; }
.seg-pick.seg-3 { grid-template-columns: repeat(3, 1fr); }

/* v0.21 — sub-tab & tab tepi */
.subtab-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; scrollbar-width: thin; }
.subtab-nav button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .88rem; cursor: pointer; color: inherit; white-space: nowrap; }
.subtab-nav button.on { background: #111827; color: #fff; border-color: #111827; }
.subtab-nav .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.subtab-nav .dot.is-on { background: #16a34a; }
.switch.is-disabled { opacity: .55; cursor: not-allowed; }
.tg-opts.is-locked .switch { opacity: .55; }
.shipx { display: grid; grid-template-columns: 230px minmax(0, 720px); gap: 18px; align-items: start; }
.shipx-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 6px; }
.shipx-hint { margin: 0 0 2px; font-size: .82rem; color: var(--muted); }
.shipx-opt { margin: 0; cursor: pointer; }
.shipx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.shipx-opt > span { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 400; transition: border-color .15s, background .15s; }
.shipx-opt b { display: block; font-size: .93rem; }
.shipx-opt small { display: block; color: var(--muted); font-size: .76rem; }
.shipx-ico { font-size: 1.25rem; width: 28px; text-align: center; }
.shipx-opt input:checked + span { border-color: var(--brand); background: #fff5f7; box-shadow: inset 3px 0 0 var(--brand); }
.shipx-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.shipx-opt.is-locked { opacity: .55; cursor: not-allowed; }
.shipx-body .card { margin-bottom: 14px; }
.shipx .sx { display: none; }
/* paparan ikut pilihan */
.shipx:has(input[name=ship_mode][value=flat]:checked) :is(.sx-flat, .sx-freemin),
.shipx:has(input[name=ship_mode][value=per_item]:checked) :is(.sx-peritem, .sx-freemin),
.shipx:has(input[name=ship_mode][value=myparcel]:checked) :is(.sx-myparcel, .sx-provider, .sx-flat, .sx-freemin),
.shipx:has(input[name=ship_mode][value=easyparcel]:checked) :is(.sx-easyparcel, .sx-provider, .sx-flat, .sx-freemin),
.shipx:has(input[name=ship_mode][value=free]:checked) .sx-free { display: block; }
.shipx:has(input[name=ship_mode][value=myparcel]:checked):has(input[name=ship_rate_mode][value=live]:checked) .sx-markup,
.shipx:has(input[name=ship_mode][value=easyparcel]:checked):has(input[name=ship_rate_mode][value=live]:checked) .sx-markup { display: block; }
.sx-flat .t-flat, .sx-flat .t-awb, .sx-flat .t-live { display: none; }
.shipx:has(input[name=ship_mode][value=flat]:checked) .sx-flat .t-flat { display: inline; }
.shipx:has(input[name=ship_rate_mode][value=awb]:checked):has(input[name=ship_mode][value=myparcel]:checked) .sx-flat .t-awb,
.shipx:has(input[name=ship_rate_mode][value=awb]:checked):has(input[name=ship_mode][value=easyparcel]:checked) .sx-flat .t-awb { display: inline; }
.shipx:has(input[name=ship_rate_mode][value=live]:checked):has(input[name=ship_mode][value=myparcel]:checked) .sx-flat .t-live,
.shipx:has(input[name=ship_rate_mode][value=live]:checked):has(input[name=ship_mode][value=easyparcel]:checked) .sx-flat .t-live { display: inline; }
.shipx:has(input[name=ship_rate_mode][value=live]:checked):has(input[name=ship_mode][value=myparcel]:checked) .sx-flat p.t-live,
.shipx:has(input[name=ship_rate_mode][value=live]:checked):has(input[name=ship_mode][value=easyparcel]:checked) .sx-flat p.t-live { display: block; }
.sx-provider .seg-pick span small { line-height: 1.4; margin-top: 2px; }
@media (max-width: 820px) {
  .shipx { grid-template-columns: 1fr; }
  .shipx-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .shipx-hint { display: none; }
  .shipx-opt > span { white-space: nowrap; padding: 8px 12px; }
  .shipx-opt small { display: none; }
  .seg-pick { grid-template-columns: 1fr; }
}

/* v0.22 — tab tepi (Penghantaran / Pembayaran) */
.sidetabs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 980px; }
.sidetabs-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 80px; }
.st-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #f3f4f6; color: #6b7280; font: inherit; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.st-item .st-ico { font-size: 1.2rem; width: 26px; text-align: center; filter: grayscale(1); opacity: .6; }
.st-item b { display: block; font-size: .92rem; }
.st-item small { display: block; font-size: .74rem; }
.st-item i { font-style: normal; }
.st-item .st-on { display: none; color: #16a34a; font-weight: 600; }
.st-item.is-on, .st-item.st-plain { background: var(--card); color: var(--text, #111827); }
.st-item.is-on .st-ico, .st-item.st-plain .st-ico { filter: none; opacity: 1; }
.st-item.is-on .st-on { display: inline; }
.st-item.is-on .st-off { display: none; }
.st-item.on { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.st-item.is-locked { opacity: .55; }
.sidetabs-body { min-width: 0; }
.sidetabs-body .card { margin: 0 0 14px; }
.st-pane .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-pane .card-head h2 { margin: 0; }
.st-pane .card-head .switch { margin: 0; font-weight: 600; }
.check-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-pick label { margin: 0; cursor: pointer; }
.check-pick input { position: absolute; opacity: 0; pointer-events: none; }
.check-pick span { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px 10px 36px; font-weight: 400; position: relative; height: 100%; }
.check-pick span::before { content: ""; position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; border-radius: 4px; border: 2px solid #cbd5e1; background: #fff; }
.check-pick span small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.check-pick input:checked + span { border-color: var(--brand); background: #fff5f7; }
.check-pick input:checked + span::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 2px #fff; }
.check-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.pi-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px 10px; align-items: center; margin: 6px 0 10px; }
.pi-grid b { font-size: .82rem; color: var(--muted); font-weight: 600; }
.pi-grid input { margin: 0; }
.pi-grid span { font-size: .9rem; font-weight: 600; }
.chip-pick { max-width: 100%; }
@media (max-width: 820px) {
  .sidetabs { grid-template-columns: 1fr; }
  .sidetabs-nav { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .st-item { padding: 8px 10px; }
  .check-pick, .seg-pick { grid-template-columns: 1fr; }
  .pi-grid { grid-template-columns: 1fr 1fr; }
  .pi-grid b:first-child { display: none; }
  .pi-grid span { grid-column: 1 / -1; margin-top: 4px; }
}
/* input tersembunyi dalam pilihan kad/chip — jangan tolak halaman ke tepi */
.chip-pick label, .seg-pick label, .check-pick label, .shipx-opt { position: relative; }
.chip-pick input, .seg-pick input, .check-pick input, .shipx-opt input { left: 0; top: 0; width: 1px !important; height: 1px; margin: 0; }

/* v0.23 — caj tambahan (dropdown) & pratonton AWB */
.mk-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.mk-box > label { margin-bottom: 8px; }
.mk-box .mk-rm, .mk-box .mk-pct, .mk-box .mk-eg { display: none; }
.mk-box:has(option[value=rm]:checked) .mk-rm, .mk-box:has(option[value=both]:checked) .mk-rm,
.mk-box:has(option[value=pct]:checked) .mk-pct, .mk-box:has(option[value=both]:checked) .mk-pct { display: block; }
.mk-box:not(:has(option[value=none]:checked)) .mk-eg { display: block; margin: 0; }
.st-pane:has(input[name=myparcel_live]:not(:checked)) .mk-myparcel,
.st-pane:has(input[name=easyparcel_live]:not(:checked)) .mk-easyparcel { display: none; }
.awb-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.awb-pick-2 { grid-template-columns: repeat(2, minmax(0, 220px)); }
.awb-pick label { margin: 0; cursor: pointer; position: relative; }
.awb-pick input { position: absolute; opacity: 0; left: 0; top: 0; width: 1px !important; height: 1px; }
.awb-pick > label > span { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border: 2px solid var(--line); border-radius: 12px; padding: 12px 10px; font-weight: 400; height: 100%; }
.awb-pick b { font-size: .9rem; }
.awb-pick small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.awb-pick input:checked + span { border-color: var(--brand); background: #fff5f7; }
.awb-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.awb-mock, .awb-mock i { display: block; font-style: normal; }
.awb-mock { width: 62px; min-height: 84px; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 4px; padding: 5px; margin-bottom: 6px; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.am-label { border: 1.5px dashed #94a3b8; border-radius: 2px; padding: 3px; }
.am-label > i:not(.am-bar) { height: 3px; background: #cbd5e1; border-radius: 2px; margin-bottom: 3px; }
.am-label > i:nth-child(2) { width: 70%; }
.am-label > i:nth-child(3) { width: 50%; }
.am-bar { height: 10px; background: repeating-linear-gradient(90deg, #334155 0 1.5px, transparent 1.5px 3px); margin-top: 2px; }
.am-short > i:not(.am-bar) { margin-bottom: 2px; }
.am-short .am-bar { height: 7px; }
.am-table { margin-top: 4px; border: 1px solid #fda4af; border-radius: 2px; padding: 2px; background: #fff5f7; }
.am-table > i { height: 3px; background: #fb7185; border-radius: 2px; margin: 2px 0; opacity: .7; }
.am-inv { margin-top: 4px; border-top: 1.5px solid #94a3b8; padding-top: 3px; }
.am-inv > i { height: 3px; background: #94a3b8; border-radius: 2px; margin: 2px 0; }
.am-inv > i:nth-child(odd) { width: 60%; }
.awb-off { min-height: 60px; }
.awb-2page { display: flex !important; gap: 4px; width: 92px; background: none; border: 0; box-shadow: none; padding: 0; }
.awb-2page .am-sheet { flex: 1; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 4px; padding: 4px; min-height: 84px; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.st-pane:has(input[name=awb_items_mode][value=mycart]:not(:checked)) .awb-layout { display: none; }
@media (max-width: 640px) { .awb-pick { grid-template-columns: 1fr 1fr; } .awb-pick-2 { grid-template-columns: 1fr 1fr; } }
.awb-layout .switch { margin-top: 14px; }

/* Senarai produk (jadual) */
.prod-table td { vertical-align: middle; }
.pt-cell { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.pt-thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: #f1f2f4; display: block; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-block { display: block; }
.pt-acts > div { display: flex; gap: 4px; justify-content: flex-end; }
.pt-acts .btn { margin: 0; min-width: 34px; padding-left: 9px; padding-right: 9px; }
/* Gambar produk: ikon padam */
.img-item { position: relative; }
.img-item.is-busy { opacity: .45; pointer-events: none; }
.img-del { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(17, 24, 39, .72); color: #fff; font-size: .8rem; line-height: 26px; padding: 0; cursor: pointer; z-index: 1; }
.img-del:hover { background: var(--err); }
input:disabled { background: #f3f4f6; color: var(--muted); cursor: not-allowed; }
/* Jenama (logo / favicon) */
.auth-brand-img { height: 46px; width: auto; max-width: 240px; object-fit: contain; background: #fff; padding: 7px 14px; border-radius: 12px; box-sizing: border-box; }
.ps-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; background: #fff; }
.ps-logo:has(img) { background: #fff; overflow: hidden; }
.ps-shop-ico img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.plat-brand-img { height: 28px; width: auto; vertical-align: middle; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.brand-slot { display: grid; gap: 8px; align-content: start; margin-bottom: 8px; }
.brand-slot .btn { justify-self: start; }
.brand-prev { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px; background: repeating-conic-gradient(#f3f4f6 0% 25%, #fff 0% 50%) 50% / 16px 16px; min-height: 92px; padding: 12px; }
.brand-prev img { max-height: 64px; max-width: 100%; width: auto; }
.brand-prev-icon img { width: 64px; height: 64px; border-radius: 14px; }
.brand-prev-og { padding: 0; overflow: hidden; }
.brand-prev-og img { max-height: none; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.seo-preview { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 4px 0 14px; background: #fff; font-family: Arial, sans-serif; }
.seo-url { font-size: .8rem; color: #202124; }
.seo-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-desc { color: #4d5156; font-size: .86rem; line-height: 1.45; }
.seo-count { display: block; text-align: right; font-size: .74rem; color: var(--muted); margin-top: -6px; }
.seo-count.over { color: var(--err); font-weight: 600; }
.order-topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand-prev-og { max-width: 420px; }
