/* CMSAAS — main stylesheet (no build step needed) */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #64748b;
  --border: #e2e8f0;
  /* CODMOVE brand colors (from the logo) */
  --primary: #003ef2;
  --primary-dark: #0031c2;
  --primary-soft: #e6ecfe;
  --accent: #fe6301;
  --accent-dark: #d95300;
  --navy: #061239;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;
  --sidebar: #061239;
  --sidebar-text: #c5cde8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 36, .06), 0 1px 3px rgba(15, 27, 36, .08);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.icon { flex-shrink: 0; vertical-align: middle; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; word-break: break-all; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--sidebar); color: var(--sidebar-text);
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40;
  overflow-y: auto; transition: transform .2s;
}
.brand { display: flex; align-items: center; padding: 1.1rem 1.1rem .9rem; color: #fff; }
.brand img { height: 40px; width: auto; max-width: 100%; display: block; }
.brand-name { font-weight: 700; font-size: .8rem; color: var(--sidebar-text); display: block; margin-top: .25rem; }
.nav { padding: .25rem .6rem 1rem; flex: 1; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #7d89b3; padding: .9rem .6rem .3rem; }
.nav-link { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 7px; color: var(--sidebar-text); margin-bottom: 1px; }
.nav-link:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-foot { padding: .75rem 1.1rem; font-size: .75rem; color: #7d89b3; }
.sidebar-backdrop { display: none; }
.main { flex: 1; margin-left: 240px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 1.1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.content { padding: 1.25rem; max-width: 1500px; width: 100%; }
.icon-btn { background: none; border: 0; padding: .35rem; cursor: pointer; color: var(--text); display: inline-flex; }
.lang-switch { font-weight: 700; font-size: .8rem; border: 1px solid var(--border); border-radius: 6px; padding: .3rem .5rem; color: var(--text); }
.user-btn { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: .35rem .6rem; cursor: pointer; color: var(--text); font: inherit; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); min-width: 210px; padding: .35rem; z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 6px;
  color: var(--text); background: none; border: 0; font: inherit; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg); text-decoration: none; }
.dropdown-menu form { margin: 0; }
.dropdown-head { padding: .5rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; display: flex; flex-direction: column; }
.only-mobile { display: none; }

/* ---------- Components ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-body { padding: 1rem 1.1rem; }
.card-head { padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; flex: 1; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); } .text-success { color: var(--success); } .text-warning { color: var(--warning); }
.big { font-size: 1.35rem; font-weight: 700; }
.hidden { display: none !important; }

.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }
.stat-sub { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.stat.accent { border-left: 4px solid var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center; padding: .5rem .9rem; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; background: #f8fafc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; border-color: #b45309; color: #fff; }
.btn-primary:hover, .btn-danger:hover { color: #fff; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-lg { padding: .8rem 1.2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-teal { background: #ccfbf1; color: #115e59; }
.badge-gray { background: #e5e7eb; color: #374151; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-orange { background: #ffedd5; color: #9a3412; }

.alert { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .85rem; }
.field { margin-bottom: .85rem; }
.field small { display: block; margin-top: .25rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date],
input[type=datetime-local], input[type=url], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,62,242,.22); border-color: var(--primary); }
textarea { min-height: 80px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.checkbox input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; max-width: 220px; }
.filters .field-wide { max-width: 320px; flex: 2 1 220px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f8fafc; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: #fafcfd; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table .check { width: 34px; }
.table tfoot td { font-weight: 700; background: #f8fafc; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #eef2f6; display: inline-block; vertical-align: middle; }

.pagination { display: flex; gap: .3rem; justify-content: flex-end; padding: .75rem 1rem; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination span { padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { padding: .4rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .85rem; }
.tab:hover { text-decoration: none; background: #f8fafc; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab .count { opacity: .75; font-weight: 500; margin-left: .2rem; }

.bulkbar { display: none; position: sticky; bottom: 0; background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: 10px; margin-top: .75rem; gap: .5rem; align-items: center; flex-wrap: wrap; z-index: 20; }
.bulkbar.show { display: flex; }
.bulkbar select { width: auto; min-width: 160px; }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; font-weight: 500; word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .55rem 0 .55rem 1rem; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline small { display: block; }

/* ---------- Call desk ---------- */
.desk { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; }
.customer-phone { font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; }
.call-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.call-actions .btn { padding: .75rem; }
.item-row { display: grid; grid-template-columns: minmax(0, 3fr) 80px 120px 36px; gap: .5rem; margin-bottom: .5rem; align-items: center; }

/* ---------- Delivery (mobile first cards) ---------- */
.delivery-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
.delivery-card .amount { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.delivery-card .btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-top: .75rem; }
.delivery-card details { margin-top: .5rem; }

/* ---------- Guest pages ---------- */
body.guest { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; background: linear-gradient(135deg, #061239 0%, #0a2a9e 60%, #003ef2 100%); }
.guest-wrap { width: 100%; max-width: 420px; }
.guest-wrap.wide { max-width: 720px; }
.guest-brand { color: #fff; font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-bottom: 1.25rem; text-align: center; }
.guest-brand img { height: 46px; width: auto; max-width: 80%; }

.progress { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); }
.bar-row { display: grid; grid-template-columns: 140px 1fr 70px; gap: .6rem; align-items: center; margin-bottom: .4rem; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar, .desk { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .hide-mobile { display: none; }
  .content { padding: .9rem; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .filters .field { max-width: none; }
  .item-row { grid-template-columns: minmax(0, 1fr) 64px 96px 32px; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.2rem; }
  .call-actions { grid-template-columns: 1fr 1fr; }
}
.delivery-card .btns details[open] { grid-column: 1 / -1; }
.delivery-card .btns details > summary { list-style: none; }
.delivery-card .btns details > summary::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }

/* CODMOVE accent touches */
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.badge-teal { background: #e6ecfe; color: #0031c2; }
.tab.active { box-shadow: inset 0 -2px 0 var(--accent); }
.page-title { color: var(--navy); }
.big, .delivery-card .amount { color: var(--navy); }
.customer-phone a { color: var(--navy); }
.timeline li::before { background: var(--accent); }
.progress > span { background: linear-gradient(90deg, var(--primary), #3d6bff); }

/* =========================================================
   v1.1 — Seller experience
   ========================================================= */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hero h2 { font-size: 1.4rem; margin: 0 0 .15rem; color: var(--navy); }
.hero p { margin: 0; color: var(--muted); }

.period { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; position: relative; }
.segmented { display: inline-flex; background: #e9edf5; border-radius: 10px; padding: 3px; gap: 2px; }
.segmented a { padding: .38rem .75rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.segmented a:hover { color: var(--navy); text-decoration: none; }
.segmented a.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(6,18,57,.12); }
.period-custom > summary { list-style: none; }
.period-custom > summary::-webkit-details-marker { display: none; }
.period-custom.is-active > summary { border-color: var(--primary); color: var(--primary); }
.period-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .75rem; box-shadow: 0 12px 30px rgba(6,18,57,.15); display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.period-pop label { font-size: .75rem; margin: 0; }

.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.qa { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s; }
.qa:hover { text-decoration: none; transform: translateY(-1px); border-color: #c7d3fb; box-shadow: 0 6px 18px rgba(0,62,242,.08); }
.qa strong { display: block; font-size: .92rem; }
.qa small { color: var(--muted); font-size: .78rem; }
.qa-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.qa-primary { background: linear-gradient(135deg, var(--primary), #2a5cff); border-color: transparent; color: #fff; }
.qa-primary small { color: rgba(255,255,255,.8); }
.qa-primary .qa-icon { background: rgba(255,255,255,.18); color: #fff; }
.qa-primary:hover { border-color: transparent; box-shadow: 0 8px 22px rgba(0,62,242,.3); }

.onboarding { border-color: #fed7bd; background: linear-gradient(180deg, #fff8f3, #fff 60%); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; padding: .9rem 1.1rem 1.1rem; }
.step { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem; border-radius: 10px; border: 1px dashed #f3c4a4; background: #fff; color: var(--text); position: relative; }
.step:hover { text-decoration: none; border-color: var(--accent); }
.step-check { width: 24px; height: 24px; border-radius: 50%; background: #fff1e8; color: var(--accent); font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-text strong { display: block; font-size: .85rem; line-height: 1.25; }
.step-text small { color: var(--muted); font-size: .75rem; }
.step-go { margin-left: auto; color: var(--accent); }
.step.done { border-style: solid; border-color: #bbf7d0; background: #f6fef9; }
.step.done .step-check { background: var(--success); color: #fff; }
.step.done strong { color: #166534; }

.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.pipe { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .75rem .9rem; color: var(--text); box-shadow: var(--shadow); }
.pipe:hover { text-decoration: none; border-color: #c7d3fb; }
.pipe small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.2; }
.pipe strong { font-size: 1.35rem; color: var(--navy); }
.pipe-icon { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pi-blue { background: #e6ecfe; color: var(--primary); }
.pi-teal { background: #dcfce7; color: #15803d; }
.pi-orange { background: #fff1e8; color: var(--accent); }
.pi-red { background: #fee2e2; color: #b91c1c; }

.kpi { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; box-shadow: var(--shadow); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .45rem; }
.kpi-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.kpi-icon-accent { background: #fff1e8; color: var(--accent); }
.kpi-value { font-size: 1.55rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.kpi-label { color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.trend { font-size: .74rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; white-space: nowrap; }
.trend-up { background: #dcfce7; color: #166534; }
.trend-down { background: #fee2e2; color: #991b1b; }
.trend-flat { background: #eef2f6; color: var(--muted); }

.funnel { display: grid; gap: .65rem; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: .75rem; align-items: center; }
.funnel-label { font-weight: 600; font-size: .88rem; }
.funnel-bar { height: 26px; background: #f1f4f9; border-radius: 8px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 8px; transition: width .4s; }
.fb-blue { background: linear-gradient(90deg, #003ef2, #3d6bff); }
.fb-teal { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.fb-green { background: linear-gradient(90deg, #fe6301, #ff9a52); }
.funnel-val { text-align: right; }
.funnel-val small { color: var(--muted); }
.funnel-foot { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .9rem; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #f8faff; text-decoration: none; }
.list-main { min-width: 0; flex: 1; }
.list-main small { overflow-wrap: anywhere; }
.list-side { text-align: right; white-space: nowrap; }
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }

.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty-state .icon { color: #c3cde6; }
.empty-state p { margin: .5rem 0 1rem; }

.payout-card { background: linear-gradient(145deg, #061239 0%, #0a2a9e 65%, #003ef2 100%); color: #fff; border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: 0 10px 30px rgba(6,18,57,.25); position: relative; overflow: hidden; }
.payout-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(254,99,1,.25); }
.payout-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .9rem; position: relative; z-index: 1; }
.payout-top a { color: #c9d5ff; font-size: .8rem; }
.payout-amount { font-size: 2rem; font-weight: 800; margin-top: .5rem; letter-spacing: -.01em; position: relative; z-index: 1; }
.payout-sub { color: #c9d5ff; font-size: .82rem; }
.payout-lines { margin-top: .9rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: .6rem; display: grid; gap: .3rem; font-size: .85rem; }
.payout-lines div { display: flex; justify-content: space-between; gap: .5rem; }
.payout-wallet { margin-top: .75rem; background: rgba(255,255,255,.1); border-radius: 8px; padding: .45rem .6rem; font-size: .82rem; }
.payout-wallet a { color: #ffd2b5; font-weight: 600; }
.payout-foot { margin-top: .6rem; font-size: .76rem; color: #c9d5ff; }
.fee-note { display: flex; flex-direction: column; gap: .2rem; }

@media (max-width: 1100px) {
  .quick-actions, .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hero { align-items: flex-start; }
  .period, .segmented { width: 100%; }
  .segmented { overflow-x: auto; }
  .segmented a { flex: 1; text-align: center; padding: .38rem .4rem; }
  .period-pop { left: 0; right: auto; }
  .qa { padding: .7rem; gap: .55rem; }
  .qa small { display: none; }
  .qa-icon { width: 34px; height: 34px; }
  .steps { grid-template-columns: 1fr; }
  .pipe strong { font-size: 1.15rem; }
  .kpi-value { font-size: 1.2rem; }
  .funnel-row { grid-template-columns: 80px 1fr 80px; gap: .5rem; }
}
.mobile-only { display: none; }
@media (max-width: 1100px) { .mobile-only { display: block; } .desktop-only { display: none; } }

/* Orders list */
.list-toolbar { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; flex-wrap: wrap; }
.search-box { flex: 1; min-width: 220px; position: relative; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: .8rem; color: var(--muted); pointer-events: none; }
.search-box input { padding: .65rem .8rem .65rem 2.4rem; border-radius: 10px; background: #fff; font-size: .95rem; }
.btn-active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.tabs-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tabs-scroll .tab { flex-shrink: 0; }
tr.row-link { cursor: pointer; }
.order-cards { display: none; }
.order-card { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; border-bottom: 1px solid var(--border); }
.order-card:last-child { border-bottom: 0; }
.oc-check { margin-top: .3rem; width: 18px; height: 18px; }
.oc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; color: var(--text); }
.oc-body:hover { text-decoration: none; }
.oc-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.oc-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-items { font-size: .85rem; color: #334155; }
.oc-meta { font-size: .8rem; color: var(--muted); }
.oc-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: .15rem; }
.oc-bottom strong { color: var(--navy); }
.oc-note { font-size: .78rem; color: #6d28d9; background: #f5f3ff; padding: .15rem .45rem; border-radius: 6px; align-self: flex-start; }
@media (max-width: 760px) {
  .desktop-table { display: none; }
  .order-cards { display: block; }
  .list-toolbar .search-box { flex-basis: 100%; }
}

/* Order progress */
.order-steps-card { padding: 1.1rem 1.2rem .9rem; }
.order-steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.os-step { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: .3rem; }
.os-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 3px; border-radius: 3px; background: #e2e8f0; }
.os-step.os-done:not(:last-child)::after { background: var(--primary); }
.os-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef2f6; color: #94a3b8; border: 2px solid #e2e8f0; z-index: 1; }
.os-done .os-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.os-current .os-dot { background: #fff; border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px rgba(254,99,1,.15); }
.os-stopped .os-dot { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.is-returned .os-step:last-child .os-dot { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.os-label { font-weight: 700; font-size: .85rem; color: var(--navy); }
.os-todo .os-label { color: #94a3b8; font-weight: 600; }
.os-stopped .os-label { color: #b91c1c; }
.os-date { font-size: .75rem; color: var(--muted); min-height: 1em; }
.os-hint { margin-top: .8rem; padding: .55rem .8rem; border-radius: 8px; background: #f5f8ff; color: #1e3a8a; font-size: .88rem; text-align: center; }
@media (max-width: 520px) {
  .os-label { font-size: .72rem; }
  .os-date { font-size: .65rem; }
  .os-step:not(:last-child)::after { left: calc(50% + 17px); right: calc(-50% + 17px); }
}

/* Order form */
.step-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; align-items: center; justify-content: center; margin-right: .35rem; vertical-align: 1px; }
.input-prefix, .input-suffix { display: flex; align-items: stretch; }
.input-prefix span, .input-suffix span { display: inline-flex; align-items: center; padding: 0 .7rem; background: #f1f4f9; border: 1px solid #cbd5e1; color: var(--muted); font-weight: 600; font-size: .9rem; }
.input-prefix span { border-right: 0; border-radius: 8px 0 0 8px; }
.input-prefix input { border-radius: 0 8px 8px 0; }
.input-suffix span { border-left: 0; border-radius: 0 8px 8px 0; }
.input-suffix input { border-radius: 8px 0 0 8px; font-weight: 700; font-size: 1.05rem; }
.phone-hint { font-weight: 600; }
.phone-hint.ok { color: var(--success); }
.phone-hint.bad { color: var(--warning); }
.pick-search { max-width: 240px; padding: .4rem .65rem; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.pick { display: grid; grid-template-columns: 64px 1fr; gap: .6rem .75rem; padding: .7rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .12s, box-shadow .12s, background .12s; }
.pick.is-on { border-color: var(--primary); background: #f7f9ff; box-shadow: 0 0 0 3px rgba(0,62,242,.08); }
.pick[hidden] { display: none; }
.pick-media { width: 64px; height: 64px; border-radius: 10px; background: #f1f4f9; display: flex; align-items: center; justify-content: center; color: #a3b1cc; overflow: hidden; cursor: pointer; }
.pick-media img { width: 100%; height: 100%; object-fit: cover; }
.pick-info { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.pick-info strong { line-height: 1.25; overflow-wrap: anywhere; }
.pick-stock { font-size: .75rem; font-weight: 600; color: var(--success); }
.pick-stock.is-low { color: var(--warning); }
.pick-stock.is-out { color: var(--danger); }
.pick-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; }
.pick-price { margin: 0; font-weight: 500; font-size: .72rem; color: var(--muted); display: flex; flex-direction: column; gap: .15rem; max-width: 120px; }
.pick-price input { padding: .35rem .5rem; font-size: .9rem; }
.pick-price input:disabled { background: #f8fafc; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; background: #fff; }
.stepper button { width: 38px; height: 36px; border: 0; background: #f1f4f9; font-size: 1.2rem; font-weight: 700; color: var(--navy); cursor: pointer; }
.stepper button:hover { background: #e3e9f5; }
.stepper button[data-plus] { background: var(--primary); color: #fff; }
.stepper button[data-plus]:hover { background: var(--primary-dark); }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; }
.summary-card { position: sticky; top: 74px; }
.summary-lines { display: grid; gap: .4rem; margin-bottom: .75rem; }
.sl { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; }
.sl i { font-style: normal; }
.summary-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border); padding-top: .65rem; }
.summary-total strong { font-size: 1.15rem; color: var(--navy); }
@media (max-width: 1100px) { .summary-card { position: static; } }
@media (max-width: 600px) { .pick-grid { grid-template-columns: 1fr; } .pick-search { max-width: none; width: 100%; } }

/* Products grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.product-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6,18,57,.1); }
.product-card.is-off { opacity: .65; }
.pc-media { aspect-ratio: 4 / 3; background: #f1f4f9; display: flex; align-items: center; justify-content: center; color: #b3bfd8; position: relative; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-stock, .pc-off { position: absolute; left: .55rem; top: .55rem; font-size: .72rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; background: #dcfce7; color: #166534; }
.pc-stock.is-low { background: #fef3c7; color: #92400e; }
.pc-stock.is-out { background: #fee2e2; color: #991b1b; }
.pc-off { left: auto; right: .55rem; background: #e5e7eb; color: #374151; }
.pc-body { padding: .75rem .85rem .85rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.pc-foot { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.pc-price { font-weight: 800; color: var(--navy); }
.pc-add { align-items: center; justify-content: center; gap: .5rem; border: 2px dashed #c7d3fb; background: #f7f9ff; color: var(--primary); font-weight: 700; min-height: 220px; box-shadow: none; }
@media (max-width: 600px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .pc-body { padding: .6rem; } .pc-foot { flex-direction: column; gap: 0; } .pc-add { min-height: 160px; } }

/* Bottom navigation (phones) */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(6,18,57,.06); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--muted); font-size: .68rem; font-weight: 600; padding: .25rem 0; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .bn-main .bn-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: 0 6px 16px rgba(0,62,242,.35); border: 3px solid #fff; }
  body.role-seller .content { padding-bottom: 5.5rem; }
}

/* Toggle switch */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; font-weight: 400; }
.switch-row small { display: block; }
.switch { position: relative; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { display: block; width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid rgba(0,62,242,.35); outline-offset: 2px; }
.order-steps.steps-5 { grid-template-columns: repeat(5, 1fr); }

/* Breakdown donuts */
.breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.breakdowns .card { margin-bottom: 0; }
.bd-body { display: grid; grid-template-columns: 170px 1fr; gap: 1.25rem; align-items: center; }
.donut { position: relative; width: 170px; height: 170px; }
.donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.donut-seg { transition: stroke-width .15s; animation: donutIn .8s ease both; }
.donut-seg:hover { stroke-width: 7.5; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 1.6rem; color: var(--navy); line-height: 1; }
.donut-center small { color: var(--muted); font-size: .75rem; }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.bd-list a, .bd-row { display: grid; grid-template-columns: 12px 1fr auto 42px; gap: .55rem; align-items: center; padding: .32rem .45rem; border-radius: 7px; color: var(--text); font-size: .88rem; }
.bd-list a:hover { background: #f5f8ff; text-decoration: none; }
.bd-dot { width: 10px; height: 10px; border-radius: 50%; }
.bd-count { font-weight: 700; color: var(--navy); text-align: right; }
.bd-pct { color: var(--muted); font-size: .78rem; text-align: right; }
@keyframes donutIn { from { stroke-dasharray: 0 100; } }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1300px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bd-body { grid-template-columns: 1fr; justify-items: center; } .bd-list { width: 100%; } }
@media (max-width: 900px) { .breakdowns { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-5 { grid-template-columns: 1fr 1fr; } }
.product-filter { min-width: 180px; max-width: 240px; padding: .38rem .6rem; border-radius: 10px; }
.calls-pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: #e0e7ff; color: #3730a3; }
.calls-pill.is-zero { background: #f1f5f9; color: #94a3b8; }

/* Popup (dialog) */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: 640px; width: calc(100% - 2rem); overflow: visible; }
dialog.modal::backdrop { background: rgba(6,18,57,.45); backdrop-filter: blur(3px); animation: fadeIn .2s ease; }
dialog.modal[open] .modal-box { animation: popIn .25s cubic-bezier(.2,.9,.3,1.2); }
dialog.modal.closing .modal-box { animation: popOut .18s ease forwards; }
dialog.modal.closing::backdrop { opacity: 0; transition: opacity .18s; }
.modal-box { background: #fff; border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(6,18,57,.45); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 3rem); }
.modal-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; color: var(--navy); }
.modal-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-x { margin-left: auto; border: 0; background: #f1f5f9; border-radius: 10px; width: 36px; height: 36px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.modal-x:hover { background: #e2e8f0; color: var(--navy); }
.modal-body { padding: 1.1rem 1.2rem; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.2rem; border-top: 1px solid var(--border); background: #fafbfd; }
.modal-foot .btn-primary { min-width: 140px; }
.modal-foot .spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.modal-foot .is-loading .spin { display: inline-block; }
.modal-foot .is-loading .icon { display: none; }
.pm-grid { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; }
.pm-photo { position: relative; width: 140px; height: 140px; border-radius: 14px; border: 2px dashed #c7d3fb; background: #f7f9ff; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; margin: 0; transition: border-color .15s, background .15s; }
.pm-photo:hover { border-color: var(--primary); background: #eef3ff; }
.pm-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pm-photo img { width: 100%; height: 100%; object-fit: cover; }
.pm-photo-empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--primary); font-weight: 600; pointer-events: none; }
.pm-fields .field:last-child { margin-bottom: 0; }
.pc-edit { position: absolute; right: .55rem; bottom: .55rem; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.product-card:hover .pc-edit { opacity: 1; transform: none; }
.product-card.just-added { animation: cardFlash 1.6s ease; }
@keyframes cardFlash { 0% { box-shadow: 0 0 0 0 rgba(0,62,242,.5); transform: scale(.96); } 30% { box-shadow: 0 0 0 6px rgba(0,62,242,.25); transform: scale(1.02); } 100% { box-shadow: var(--shadow); transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes popOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: .7rem 1rem .7rem 2.3rem; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 30px rgba(6,18,57,.3); position: relative; animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2); max-width: 340px; }
.toast::before { content: "✓"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--success); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .35s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.95); } }

@media (max-width: 600px) {
  dialog.modal { width: 100%; max-width: none; margin: auto 0 0; }
  dialog.modal[open] .modal-box { animation: sheetUp .3s cubic-bezier(.2,.9,.3,1); }
  dialog.modal.closing .modal-box { animation: sheetDown .2s ease forwards; }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .pm-grid { grid-template-columns: 1fr; }
  .pm-photo { width: 100%; height: 150px; }
  .modal-foot { padding-bottom: calc(.85rem + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .toasts { left: 1rem; right: 1rem; bottom: 5.5rem; }
  .toast { max-width: none; }
  .pc-edit { opacity: 1; transform: none; }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { dialog.modal .modal-box, .toast, .product-card.just-added { animation: none !important; } }
tr.row-new td { animation: rowIn .6s ease; background: #f5f8ff; }
@keyframes rowIn { from { background: #dbe6ff; } }
.pm-photo-empty[hidden], .pm-photo img[hidden] { display: none; }
.pc-price { white-space: nowrap; }

/* Edit order popup */
dialog.modal.modal-wide { max-width: 860px; }
.order-form-modal .modal-body { background: #f7f8fb; }
.order-form-modal .modal-body > div > .card { box-shadow: none; }
.order-form-modal .summary-card { position: static; margin-bottom: 0; }
.order-form-modal .pick-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.order-form-modal .modal-foot .btn-primary { min-width: 170px; }

/* Out of stock in the order picker */
.pick.is-out { opacity: .55; background: #fafafa; }
.pick.is-out .pick-media { cursor: not-allowed; filter: grayscale(1); }
.stepper button[data-plus]:disabled { background: #cbd5e1; color: #fff; cursor: not-allowed; }
.shake-x { animation: shakeX .35s ease; }
@keyframes shakeX { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Menu badges */
.nav-link .nav-badge { margin-left: auto; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 6px rgba(254,99,1,.35); }
.nav-link.active .nav-badge { background: #fff; color: var(--primary); box-shadow: none; }
.bn-icon { position: relative; }
.bottom-nav .nav-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; font-size: .62rem; border: 2px solid #fff; }
.nav-badge.bump { animation: badgeBump .45s ease; }
@keyframes badgeBump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* Inbound shipment page (v1.5.0) */
.m-0 { margin: 0; }
.pt-0 { padding-top: 0; }
.ship-items .thumb { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #94a3b8; flex-shrink: 0; }
.ship-items .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ship-add td { background: #f7f9ff; }
.ship-add select { min-width: 200px; }
.grid-sidebar > * { min-width: 0; }
@media (max-width: 640px) { .ship-items input[type=number] { max-width: 72px !important; } .ship-add select { min-width: 0; max-width: 150px; } }

/* row action button (v1.5.1) */
.td-action { text-align: right; width: 1%; white-space: nowrap; }
.btn-view { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-view:hover { background: var(--primary); color: #fff; }
.table td.td-action, .table th.td-action { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 10px -8px rgba(6,18,57,.18); z-index: 1; }
.table thead th.td-action { background: #f8fafc; }
.ship-list td:nth-child(2) { min-width: 170px; }

/* Inbound shipments list (v1.5.2) */
.ship-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.sstat { display: flex; gap: .7rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .8rem .9rem; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.sstat:hover { text-decoration: none; border-color: #c7d3fb; box-shadow: 0 6px 18px -10px rgba(6,18,57,.35); transform: translateY(-1px); }
.sstat.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.sstat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sstat small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.sstat strong { font-size: 1.35rem; color: var(--navy); line-height: 1.2; white-space: nowrap; }
.sstat em { font-style: normal; font-size: .72rem; color: var(--muted); }
.sstat em.sstat-warn { color: #b45309; font-weight: 600; }
.sstat-icon { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sstat-blue .sstat-icon { background: var(--primary-soft); color: var(--primary); }
.sstat-navy .sstat-icon { background: #e8ebf3; color: var(--navy); }
.sstat-red .sstat-icon { background: #fee2e2; color: #b91c1c; }
.sstat-green .sstat-icon { background: #dcfce7; color: #15803d; }
.sstat-amber .sstat-icon { background: #fff1e6; color: var(--accent); }
.list-meta { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 600; }
.chip:hover { text-decoration: none; background: #d6e0fd; }
.chip-soft { background: #f1f5f9; color: var(--text); }
.chip-clear { font-size: .8rem; color: var(--danger); font-weight: 600; }
.date-quick { display: flex; gap: .3rem; align-items: center; padding-bottom: .45rem; }
.sort-form { display: flex; gap: .4rem; align-items: center; }
.sort-form select { width: auto; padding: .35rem 2rem .35rem .6rem; font-size: .85rem; }
.sort-form label { font-size: .8rem; margin: 0; }
.tab-alert .count { background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 0 .4rem; opacity: 1; }
.ship-list td { vertical-align: middle; }
.ship-list tr.row-hold td { background: #fffafa; }
.ship-list tr.row-hold td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.ship-prods { display: flex; gap: .55rem; align-items: center; min-width: 0; }
.ship-prods-text { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.thumbs { display: inline-flex; flex-shrink: 0; }
.thumb-sm { width: 32px; height: 32px; border-radius: 8px; background: #eef2f6; border: 2px solid #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #94a3b8; margin-left: -8px; font-size: .7rem; font-weight: 700; }
.thumb-sm:first-child { margin-left: 0; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thumb-more { background: var(--navy); color: #fff; }
.age { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 600; color: var(--muted); background: #f1f5f9; border-radius: 6px; padding: .05rem .35rem; margin-top: .2rem; }
.age-late { color: #b45309; background: #fef3c7; }
.hold-reason { color: #b91c1c; }
.hold-note { color: #b91c1c; background: #fef2f2; }
.seller-link { color: var(--text); font-weight: 600; }
.ship-list td:nth-child(2) { min-width: 0; }
@media (max-width: 1200px) { .ship-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ship-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .sstat { padding: .6rem .7rem; } .sstat-icon { width: 34px; height: 34px; } .sstat strong { font-size: 1.1rem; }
  .list-meta { flex-direction: column; align-items: stretch; }
  .order-card .ship-prods { margin: .15rem 0; }
}

/* Users security (v1.5.3) */
.security-card { border-color: #fecaca; }
.security-card .card-head { background: #fef2f2; }
.lock-list { display: flex; flex-direction: column; gap: .5rem; }
.lock-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.lock-icon { width: 36px; height: 36px; border-radius: 10px; background: #fee2e2; color: #b91c1c; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lock-icon.lock-ip { background: #fef3c7; color: #b45309; }
.lock-text { flex: 1; min-width: 200px; }
.lock-item form { margin: 0; }
.pw-row { display: flex; gap: .4rem; }
.pw-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.pw-note { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: #15803d; margin: .5rem 0 0; }
.badge .icon { vertical-align: -1px; }

/* Users list (v1.5.4) */
.user-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.role-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 4px; margin-bottom: .9rem; scrollbar-width: thin; }
.role-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem .45rem .45rem; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; flex-shrink: 0; transition: border-color .15s, background .15s; }
.role-tab:hover { text-decoration: none; border-color: #c7d3fb; }
.role-tab .count { background: #f1f5f9; color: var(--muted); border-radius: 999px; padding: 0 .45rem; font-size: .78rem; }
.role-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-tab.active .count { background: rgba(255,255,255,.18); color: #fff; }
.rt-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.role-tab.active .rt-icon { background: rgba(255,255,255,.15); color: #fff; }
.user-toolbar { align-items: stretch; }
.user-toolbar .search-box { margin: 0; }
.user-toolbar select { width: auto; min-width: 150px; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; letter-spacing: .02em; flex-shrink: 0; background: #e2e8f0; color: #334155; }
.avatar .online { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.av-super_admin, .rp-super_admin { background: #061239; color: #fff; }
.av-manager, .rp-manager { background: #ede9fe; color: #5b21b6; }
.av-agent, .rp-agent { background: #e0f2fe; color: #0369a1; }
.av-seller, .rp-seller { background: #fff1e6; color: #c2410c; }
.av-delivery, .rp-delivery { background: #dcfce7; color: #15803d; }
.user-cell { display: flex; align-items: center; gap: .65rem; }
.role-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.contact-cell a { display: flex; align-items: center; gap: .3rem; color: var(--text); font-size: .85rem; white-space: nowrap; }
.contact-cell a .icon { color: var(--muted); }
.contact-cell a:hover { color: var(--primary); }
.chip-xs { padding: .1rem .5rem; font-size: .75rem; }
.wallet-ok { display: inline-flex; align-items: center; gap: .25rem; color: #15803d; font-weight: 600; font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.user-table td { vertical-align: middle; }
.user-table tr.row-muted td { opacity: .6; }
.user-table tr.row-pending td { background: #fffbeb; }
.row-actions { display: inline-flex; gap: .35rem; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.row-actions form { margin: 0; }
.btn-icon { width: 34px; height: 32px; padding: 0; }
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 0 .75rem; border-top: 1px solid var(--border); }
.list-foot .pagination { border: 0; flex: 1; justify-content: flex-end; }
.user-card { align-items: flex-start; }
.user-card .row-actions { justify-content: flex-start; flex-wrap: wrap; }
@media (max-width: 760px) {
  .user-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-toolbar select { flex: 1; min-width: 0; }
}
.user-cell { min-width: 190px; }
.user-cell strong { white-space: nowrap; }
.user-table td:nth-child(2) small { display: block; max-width: 170px; }
.user-table .contact-cell a { font-size: .8rem; }
.user-table th, .user-table td { padding-left: .6rem; padding-right: .6rem; }
.user-cell { min-width: 170px; }
@media (max-width: 760px) {
  .user-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .user-toolbar .search-box { grid-column: 1 / -1; }
  .user-toolbar select { width: 100%; min-width: 0; }
  .user-toolbar .btn-primary { justify-content: center; }
}
.user-table td .badge { white-space: normal; text-align: center; }

/* User form & popup (v1.5.5) */
#user-modal { max-width: 780px; }
.modal-loading { display: flex; justify-content: center; padding: 3rem; }
.spin-dark { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: var(--primary); animation: spin .7s linear infinite; }
.modal-head .avatar { width: 42px; height: 42px; }
.modal-head h3 + small, .modal-head div > small { display: block; }
.uf-section { padding: .2rem 0 1rem; border-bottom: 1px dashed var(--border); margin-bottom: 1rem; }
.uf-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.uf-section h4 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.uf-section .form-grid { margin: 0; }
.role-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.role-option { margin: 0; cursor: pointer; }
.role-option input { position: absolute; opacity: 0; pointer-events: none; }
.ro-box { display: flex; gap: .6rem; align-items: center; padding: .6rem .7rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; height: 100%; }
.ro-box strong { display: block; font-size: .9rem; color: var(--navy); }
.ro-box small { display: block; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.ro-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.role-option:hover .ro-box { border-color: #c7d3fb; }
.role-option input:checked + .ro-box { border-color: var(--primary); background: #f5f8ff; box-shadow: 0 0 0 3px var(--primary-soft); }
.role-option input:focus-visible + .ro-box { outline: 2px solid var(--primary); outline-offset: 2px; }
.check-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.check-chip { margin: 0; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .75rem; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; font-weight: 600; font-size: .88rem; }
.check-chip span .icon { display: none; }
.check-chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.check-chip input:checked + span .icon { display: inline; }
.uf-note { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); margin: .4rem 0 0; }
.user-form .pw-row input { font-size: 1rem; }

/* My profile (v1.5.5) */
.profile-hero { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 1rem; }
.ph-banner { height: 96px; background: radial-gradient(circle at 85% 20%, rgba(254,99,1,.55), transparent 40%), linear-gradient(120deg, #061239 0%, #0b2a8f 55%, #003EF2 100%); }
.ph-body { display: flex; align-items: flex-end; gap: 1.1rem; padding: 0 1.4rem 1.2rem; flex-wrap: wrap; }
.avatar-xl { width: 92px; height: 92px; font-size: 1.9rem; border: 4px solid #fff; margin-top: -46px; box-shadow: 0 10px 25px -12px rgba(6,18,57,.5); }
.ph-main { flex: 1; min-width: 220px; padding-top: .6rem; }
.ph-main h2 { margin: 0 0 .35rem; color: var(--navy); font-size: 1.4rem; }
.ph-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; color: var(--muted); font-size: .88rem; }
.ph-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.ph-stats { display: flex; gap: .6rem; flex-wrap: wrap; }
.ph-stats > div { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: .5rem .8rem; min-width: 120px; }
.ph-stats small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ph-stats strong { color: var(--navy); font-size: .95rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.profile-col { display: flex; flex-direction: column; gap: 1rem; }
.profile-col .card { margin: 0; }
.card-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--border); background: #fafbfd; }
.lang-pick { display: flex; gap: .5rem; }
.lang-pick .check-chip span { padding: .5rem 1rem; }
.pw-field { position: relative; }
.pw-field input { padding-right: 2.6rem; }
.pw-eye { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pw-eye:hover, .pw-eye.on { color: var(--primary); background: var(--primary-soft); }
.pw-meter { height: 5px; border-radius: 5px; background: #eef2f6; margin: .45rem 0 .25rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .2s, background .2s; background: #ef4444; }
.pw-meter span[data-level="2"] { background: #f59e0b; }
.pw-meter span[data-level="3"] { background: #22c55e; }
.pw-meter span[data-level="4"] { background: #15803d; }
.signins { display: flex; flex-direction: column; gap: .65rem; }
.signin { display: flex; gap: .7rem; align-items: center; }
.signin-icon { width: 36px; height: 36px; border-radius: 10px; background: #f1f5f9; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.signin-icon.is-now { background: #dcfce7; color: #15803d; }
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .ph-body { align-items: flex-start; }
  .ph-stats > div { flex: 1; min-width: 0; }
}

/* Call desk v2 (v1.6.0) */
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 .3rem; border-radius: 5px; font: 600 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(15,23,42,.08); color: inherit; opacity: .8; }
.btn-primary kbd, .btn-whatsapp kbd { background: rgba(255,255,255,.22); }
.btn-whatsapp { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-whatsapp:hover { background: #15803d; color: #fff; }
.desk-strip { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: stretch; }
.ds-chip { display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--text); min-width: 150px; }
.ds-chip:hover { text-decoration: none; border-color: #c7d3fb; }
.ds-chip > span:last-child { display: flex; flex-direction: column; font-weight: 600; font-size: .85rem; line-height: 1.2; }
.ds-chip small { color: var(--muted); font-weight: 500; font-size: .74rem; }
.ds-n { font-size: 1.35rem; font-weight: 800; color: var(--navy); min-width: 28px; text-align: center; }
.ds-n small { font-size: .8rem; color: var(--muted); }
.ds-chip.is-hot { border-color: #fecaca; background: #fef2f2; }
.ds-chip.is-hot .ds-n { color: #b91c1c; }
.ds-today { background: var(--navy); border-color: var(--navy); color: #fff; }
.ds-today .ds-n, .ds-today small { color: #fff; }
.ds-today small { opacity: .75; }
.ds-timer { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 12px; background: #ecfdf5; color: #047857; font: 700 1.25rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid #a7f3d0; }
.ds-timer.is-long { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.desk-empty { text-align: center; padding: 2.5rem 1rem; }
.de-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 10px rgba(0,62,242,.06); }
.desk-empty h2 { color: var(--navy); margin: 0 0 .3rem; }
.de-callbacks { max-width: 560px; margin: 2rem auto 0; text-align: left; }
.de-callbacks h4 { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.de-cb { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; align-items: center; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .4rem; color: var(--text); }
.de-cb.is-due { border-color: #fecaca; background: #fef2f2; }
.de-cb:hover { text-decoration: none; border-color: var(--primary); }
.desk-v2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.desk-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.desk-main .card, .desk-side .card { margin: 0; }
.desk-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.dk-head { display: flex; justify-content: space-between; gap: .75rem; padding: 1rem 1.2rem .6rem; flex-wrap: wrap; }
.dk-head h2 { margin: 0; color: var(--navy); font-size: 1.15rem; }
.dk-badges { display: flex; gap: .3rem; flex-wrap: wrap; align-items: flex-start; }
.dk-phone { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; margin: 0 1.2rem; border-radius: 14px; background: linear-gradient(120deg, #f5f8ff, #eef3ff); border: 1px solid #dbe4fd; flex-wrap: wrap; }
.dk-number { display: flex; flex-direction: column; }
.dk-number strong { font-size: 1.75rem; letter-spacing: .03em; color: var(--navy); line-height: 1.1; }
.dk-call-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-icon-lg { width: 48px; padding: 0; }
.dk-alert { margin: .8rem 1.2rem 0; }
.dk-fields { padding: 1rem 1.2rem 1.1rem; margin: 0; }
.chip-input { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.chip-input input { flex: 1 1 200px; max-width: 280px; }
button.chip { border: 0; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; }
.chip.is-on { background: var(--primary); color: #fff; }
.dk-products .card-head { gap: .75rem; }
.dk-add { width: auto; max-width: 300px; }
.dk-lines { padding: .3rem 1.2rem; }
.dk-line { display: grid; grid-template-columns: 46px minmax(0, 1fr) 120px 118px 110px 30px; gap: .7rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.dk-line:last-child { border-bottom: 0; }
.dk-line.over-stock .dk-qty { box-shadow: 0 0 0 2px #fca5a5; }
.dk-img { width: 46px; height: 46px; border-radius: 10px; background: #eef2f6; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }
.dk-img img { width: 100%; height: 100%; object-fit: cover; }
.dk-name { display: flex; flex-direction: column; min-width: 0; }
.dk-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-name small { font-size: .76rem; }
.dk-price input { text-align: right; }
.dk-qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.dk-qty button { width: 34px; height: 38px; border: 0; background: #f1f5f9; cursor: pointer; font-size: 1.1rem; color: var(--navy); }
.dk-qty button:hover { background: var(--primary-soft); }
.dk-qty input { width: 48px; border: 0; text-align: center; padding: 0; height: 38px; -moz-appearance: textfield; }
.dk-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.dk-sub { text-align: right; color: var(--navy); white-space: nowrap; }
.dk-del { border: 0; background: transparent; color: #94a3b8; cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.dk-del:hover { background: #fee2e2; color: #b91c1c; }
.dk-total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.2rem; border-top: 1px solid var(--border); background: #fafbfd; flex-wrap: wrap; }
.dk-total label { display: flex; align-items: center; gap: .6rem; margin: 0; font-weight: 700; color: var(--navy); }
.dk-total input { width: 150px; font-size: 1.15rem; font-weight: 800; text-align: right; color: var(--navy); }
.outcomes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.outcome { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .4rem .7rem; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; font: inherit; font-weight: 600; font-size: .85rem; color: var(--text); transition: transform .1s, border-color .15s, background .15s, box-shadow .15s; }
.outcome:hover { transform: translateY(-1px); border-color: #c7d3fb; }
.outcome kbd { position: absolute; top: .35rem; right: .35rem; height: 17px; min-width: 17px; font-size: .62rem; }
.outcome .icon { width: 34px; height: 34px; padding: 8px; border-radius: 10px; box-sizing: border-box; }
.oc-green .icon { background: #dcfce7; color: #15803d; } .oc-green.is-on { border-color: #16a34a; background: #f0fdf4; box-shadow: 0 0 0 3px #bbf7d0; }
.oc-teal .icon { background: #ccfbf1; color: #0f766e; } .oc-teal.is-on { border-color: #0d9488; background: #f0fdfa; box-shadow: 0 0 0 3px #99f6e4; }
.oc-amber .icon { background: #fef3c7; color: #b45309; } .oc-amber.is-on { border-color: #d97706; background: #fffbeb; box-shadow: 0 0 0 3px #fde68a; }
.oc-purple .icon { background: #ede9fe; color: #6d28d9; } .oc-purple.is-on { border-color: #7c3aed; background: #f5f3ff; box-shadow: 0 0 0 3px #ddd6fe; }
.oc-red .icon { background: #fee2e2; color: #b91c1c; } .oc-red.is-on { border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 3px #fecaca; }
.oc-gray .icon { background: #f1f5f9; color: #475569; } .oc-gray.is-on { border-color: #475569; background: #f8fafc; box-shadow: 0 0 0 3px #e2e8f0; }
.oc-panel { margin-top: .9rem; padding: .8rem; border-radius: 12px; background: #f8fafc; border: 1px solid var(--border); animation: fadeIn .15s ease; }
.oc-panel > label { display: block; font-weight: 600; margin-bottom: .45rem; }
.quick-notes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.dk-save { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dk-chosen { font-weight: 600; }
.dk-save .btn { min-width: 220px; }
.dk-save .btn[disabled] { opacity: .45; }
.dk-save .btn.is-loading { opacity: .7; }
.dk-script .card-body { font-size: .9rem; background: #fffbeb; }
.dk-script p { margin: 0 0 .6rem; }
.dk-timeline { list-style: none; margin: 0; padding: 0; }
.dk-timeline li { display: flex; gap: .6rem; padding-bottom: .8rem; position: relative; }
.dk-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: #e2e8f0; }
.dk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex-shrink: 0; }
.dk-timeline p { margin: .2rem 0; font-size: .88rem; }
.dk-prev > div { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.dk-prev > div:last-child { border-bottom: 0; }
@media (max-width: 1100px) {
  .desk-v2 { grid-template-columns: 1fr; }
  .desk-side { position: static; max-height: none; }
}
@media (max-width: 700px) {
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome kbd, .btn kbd { display: none; }
  .dk-line { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name name del" "price qty sub"; row-gap: .45rem; }
  .dk-img { display: none; } .dk-name { grid-area: name; } .dk-del { grid-area: del; }
  .dk-price { grid-area: price; } .dk-qty { grid-area: qty; } .dk-sub { grid-area: sub; min-width: 80px; }
  .dk-number strong { font-size: 1.45rem; }
  .dk-call-btns { width: 100%; } .dk-call-btns .btn:not(.btn-icon-lg) { flex: 1; }
  .ds-chip { min-width: 0; flex: 1 1 45%; } .ds-timer { margin-left: 0; flex: 1 1 100%; justify-content: center; }
  .dk-save .btn { width: 100%; }
}

/* Agent stats & lists (v1.6.0) */
.start-calling { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem; border-radius: 16px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(254,99,1,.5), transparent 45%), linear-gradient(120deg, #061239, #003EF2); box-shadow: 0 14px 30px -18px rgba(0,62,242,.8); }
.start-calling:hover { text-decoration: none; transform: translateY(-1px); }
.sc-icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-12deg); } 92% { transform: rotate(12deg); } 96% { transform: rotate(-8deg); } }
.sc-text { flex: 1; display: flex; flex-direction: column; } .sc-text strong { font-size: 1.1rem; } .sc-text small { opacity: .8; }
.sc-go { font-weight: 700; background: #fff; color: var(--primary); padding: .5rem .9rem; border-radius: 10px; white-space: nowrap; }
.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; position: relative; }
.kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.kpi strong { font-size: 1.6rem; color: var(--navy); line-height: 1.15; }
.kpi em { font-style: normal; font-size: .74rem; color: var(--muted); }
.kpi-icon { position: absolute; top: .8rem; right: .8rem; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.ki-blue { background: var(--primary-soft); color: var(--primary); } .ki-navy { background: #e8ebf3; color: var(--navy); }
.ki-green { background: #dcfce7; color: #15803d; } .ki-orange { background: #fff1e6; color: var(--accent); }
.kpi-main { background: linear-gradient(135deg, #16a34a, #15803d); border-color: #15803d; }
.kpi-main small, .kpi-main em { color: rgba(255,255,255,.82); } .kpi-main strong { color: #fff; }
.ki-white { background: rgba(255,255,255,.2); color: #fff; }
.stats-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.stats-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1rem; align-items: start; }
.stats-2 .card, .stats-3 .card { margin: 0; }
.chart-total { color: var(--muted); font-size: .9rem; } .chart-total strong { color: var(--primary); font-size: 1.1rem; margin-left: .3rem; }
.legend { display: flex; gap: .8rem; font-size: .8rem; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.cs-list { display: flex; flex-direction: column; gap: .15rem; }
.cs-row { display: grid; grid-template-columns: 30px 1fr auto; gap: .6rem; align-items: center; padding: .4rem .3rem; border-radius: 8px; color: var(--text); }
.cs-row:hover { background: #f8fafc; text-decoration: none; }
.cs-row strong { color: var(--navy); font-size: 1.05rem; }
.cs-dot { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.ao-filters .filters { align-items: flex-end; }
.ao-filters .search-box { flex: 2 1 260px; margin: 0; }
.ao-table td { vertical-align: middle; }
.ao-note { max-width: 280px; font-size: .85rem; }
.fu-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.fu-tab { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; color: var(--text); }
.fu-tab:hover { text-decoration: none; border-color: #c7d3fb; }
.fu-tab.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fu-tab > span:last-child { display: flex; flex-direction: column; } .fu-tab small { color: var(--muted); } .fu-tab em { color: #b91c1c; font-style: normal; font-weight: 600; }
.fu-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.fu-list { display: flex; flex-direction: column; }
.fu-row { display: grid; grid-template-columns: 160px minmax(0, 1.2fr) minmax(0, 1.5fr) 120px auto; gap: .9rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.fu-row:last-child { border-bottom: 0; }
.fu-row:hover { background: #f8fafc; text-decoration: none; }
.fu-row.is-late { background: #fffafa; box-shadow: inset 3px 0 0 #ef4444; }
.fu-when { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .85rem; color: #6d28d9; }
.fu-row.is-late .fu-when { color: #b91c1c; }
.fu-who, .fu-items, .fu-meta { display: flex; flex-direction: column; min-width: 0; }
.fu-who small, .fu-meta small { color: var(--muted); }
.fu-items em { font-style: normal; font-size: .82rem; color: #6d28d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-meta { text-align: right; }
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats-3 { grid-template-columns: 1fr 1fr; } .stats-3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .kpi-row { grid-template-columns: 1fr 1fr; } .kpi-main { grid-column: 1 / -1; order: -1; }
  .stats-2, .stats-3 { grid-template-columns: 1fr; }
  .start-calling { flex-wrap: wrap; } .sc-go { width: 100%; text-align: center; }
  .fu-tabs { grid-template-columns: 1fr; gap: .4rem; }
  .fu-row { grid-template-columns: 1fr auto; gap: .3rem .7rem; }
  .fu-when { grid-column: 1 / -1; } .fu-items { grid-column: 1 / -1; order: 3; } .fu-row .btn { display: none; }
}
.line-svg { display: block; height: auto; max-height: 300px; }
/* agent: due call-backs in red, gently pulsing (v1.6.1) */
.nav-badge[data-badge="calls/followups"] { background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,.5); animation: badgePulse 2s ease-out infinite; }
.nav-link.active .nav-badge[data-badge="calls/followups"] { background: #fff; color: #dc2626; animation: none; }
@keyframes badgePulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 70% { box-shadow: 0 0 0 7px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }

/* Order delivery (v1.6.2) */
.dp-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.dp-step { display: flex; flex-direction: column; padding: .7rem .9rem; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; color: var(--text); position: relative; overflow: hidden; }
.dp-step::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.dp-step:hover { text-decoration: none; border-color: #c7d3fb; }
.dp-step strong { font-size: 1.5rem; color: var(--navy); line-height: 1.1; }
.dp-step span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.dp-step.is-on { box-shadow: 0 0 0 3px var(--primary-soft); border-color: var(--primary); }
.dp-amber::before { background: #f59e0b; } .dp-blue::before { background: #3b82f6; } .dp-indigo::before { background: #6366f1; }
.dp-purple::before { background: #8b5cf6; } .dp-red::before { background: #ef4444; } .dp-red strong { color: #b91c1c; }
.dp-dates { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.dp-dates select, .dp-dates input { width: auto; }
.dp-filters .search-box { margin: 0; }
.dp-bulk { position: sticky; top: 64px; z-index: 5; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; margin-bottom: .6rem; background: var(--navy); color: #fff; border-radius: 14px; box-shadow: 0 12px 28px -14px rgba(6,18,57,.6); animation: fadeIn .15s ease; }
.dp-sel { margin-right: .4rem; } .dp-sel strong { font-size: 1.1rem; }
.dp-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.2); margin: 0 .2rem; }
.dp-ship { display: inline-flex; gap: .35rem; } .dp-ship select { width: auto; min-width: 170px; }
.dp-bulk .btn:not(.btn-primary):not(.btn-success):not(.btn-info) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.dp-clear { margin-left: auto; }
.btn-info { background: #0ea5e9; border-color: #0ea5e9; color: #fff; } .btn-info:hover { background: #0284c7; color: #fff; }
.dp-table td { vertical-align: middle; }
.dp-check { width: 34px; } .dp-check input { width: 18px; height: 18px; }
.dp-items { max-width: 220px; font-size: .86rem; }
.dp-note { max-width: 200px; }
.dp-table tr.dp-late td { background: #fff5f5; } .dp-table tr.dp-late td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
.dp-table tr.is-selected td { background: #eef3ff; }
.order-card.dp-late { box-shadow: inset 4px 0 0 #ef4444; }
.dp-panel .order-steps-card, .dp-panel .card { box-shadow: none; border: 0; padding: 0 0 .8rem; margin: 0; }
.dp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.dp-sum > div { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.dp-sum small { color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.dp-items-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.dp-items-list span { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: .2rem .65rem; font-weight: 600; font-size: .85rem; }
.dp-actions { display: flex; flex-direction: column; gap: .6rem; }
.dp-act { margin: 0; }
.dp-box { padding: .7rem; border: 1px solid var(--border); border-radius: 12px; }
.dp-box label { font-weight: 600; display: block; margin-bottom: .35rem; }
.dp-row { display: flex; gap: .4rem; flex-wrap: wrap; } .dp-row > select, .dp-row > input { flex: 1 1 180px; width: auto; }
.dp-more { border: 1px solid var(--border); border-radius: 12px; padding: .1rem .8rem; }
.dp-more summary { cursor: pointer; padding: .6rem 0; font-weight: 600; display: flex; align-items: center; gap: .4rem; list-style: none; }
.dp-more summary::-webkit-details-marker { display: none; }
.dp-more[open] { padding-bottom: .7rem; background: #fafbfd; }
.dp-done { display: flex; align-items: center; gap: .4rem; color: #15803d; font-weight: 600; margin: 0; }
.dp-h { margin: 1.1rem 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 900px) { .dp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .dp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-bulk { top: 56px; } .dp-ship { width: 100%; } .dp-ship select { flex: 1; min-width: 0; } .dp-sep { display: none; }
  .order-card .oc-body { cursor: pointer; }
}

/* Call center team (v1.6.4) */
.mode-chip { display: inline-flex; align-items: center; gap: .3rem; background: #eef3ff; color: var(--primary); border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 600; }
.section-title { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: badgePulse 2s infinite; }
.live-queue { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.2rem; }
.lq { display: flex; flex-direction: column; padding: .8rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; color: var(--text); }
.lq:hover { text-decoration: none; border-color: #c7d3fb; }
.lq strong { font-size: 1.7rem; color: var(--navy); line-height: 1.1; }
.lq span { font-weight: 600; font-size: .85rem; } .lq small { color: var(--muted); font-size: .75rem; }
.lq-orange { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed, #fff); } .lq-orange strong { color: var(--accent); }
.lq-red { border-color: #fecaca; background: linear-gradient(135deg, #fef2f2, #fff); } .lq-red strong, .lq-red small { color: #b91c1c; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.agent-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; transition: box-shadow .15s, transform .15s; }
.agent-card:hover { box-shadow: 0 14px 30px -20px rgba(6,18,57,.45); transform: translateY(-1px); }
.agent-card.is-disabled { opacity: .6; }
.ac-head { display: flex; align-items: center; gap: .65rem; }
.ac-head .avatar { width: 44px; height: 44px; }
.avatar .online.st-on { background: #22c55e; } .avatar .online.st-idle { background: #f59e0b; } .avatar .online.st-off { background: #cbd5e1; }
.ac-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); }
.ac-name small { font-size: .76rem; color: var(--muted); } .ac-name .ac-on { color: #15803d; font-weight: 600; }
.ac-medal { font-size: 1.5rem; } .ac-rank { font-weight: 800; color: #94a3b8; }
.ac-rate { padding: .6rem .7rem; border-radius: 12px; background: #f8fafc; }
.ac-rate > div:first-child { display: flex; justify-content: space-between; align-items: baseline; }
.ac-rate small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.ac-rate strong { font-size: 1.5rem; }
.ac-bar { position: relative; height: 8px; border-radius: 8px; background: #e2e8f0; margin-top: .35rem; }
.ac-bar span { display: block; height: 100%; border-radius: 8px; }
.ac-bar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--navy); border-radius: 2px; }
.rate-good strong { color: #15803d; } .rate-good .ac-bar span, .rate-good .rc-bar i { background: #16a34a; }
.rate-mid strong { color: #b45309; } .rate-mid .ac-bar span, .rate-mid .rc-bar i { background: #f59e0b; }
.rate-low strong { color: #b91c1c; } .rate-low .ac-bar span, .rate-low .rc-bar i { background: #ef4444; }
.rate-na strong { color: #94a3b8; }
.ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem .3rem; text-align: center; }
.ac-stats div { display: flex; flex-direction: column; } .ac-stats strong { font-size: 1.05rem; color: var(--navy); } .ac-stats strong.text-success { color: #15803d; } .ac-stats strong.text-danger { color: #b91c1c; }
.ac-stats small { color: var(--muted); font-size: .72rem; }
.ac-spark { width: 100%; height: 34px; display: block; }
.ac-now { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); padding-top: .55rem; border-top: 1px dashed var(--border); }
.ac-now strong { color: var(--navy); }
.ac-foot { display: flex; gap: .4rem; }
.ac-foot .btn:first-child { flex: 1; }
.rate-cell { display: flex; align-items: center; gap: .5rem; min-width: 140px; }
.rc-bar { flex: 1; height: 7px; border-radius: 7px; background: #e2e8f0; overflow: hidden; } .rc-bar i { display: block; height: 100%; }
.cmp-table th[data-sort] { cursor: pointer; user-select: none; }
.cmp-table th[data-sort]:hover { color: var(--primary); }
.cmp-table th.sorted-asc::after { content: " ▲"; } .cmp-table th.sorted-desc::after { content: " ▼"; }
.cmp-table tfoot th { background: #f8fafc; color: var(--navy); font-size: .85rem; text-transform: none; }
.hero h2 .avatar { width: 38px; height: 38px; vertical-align: middle; margin-right: .3rem; }
@media (max-width: 900px) { .live-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* View an agent's account (v1.6.5) */
.imp-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .75rem; padding: .55rem 1.2rem; background: linear-gradient(90deg, #FE6301, #ff8a3d); color: #fff; box-shadow: 0 6px 18px -10px rgba(254,99,1,.8); }
.imp-eye { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; }
.imp-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; } .imp-text small { color: #fff; opacity: .92; }
.imp-bar form { margin: 0; } .imp-bar .btn { background: #fff; color: #c2410c; border-color: #fff; font-weight: 700; } .imp-bar .btn:hover { background: #fff7ed; color: #9a3412; }
body:has(.imp-bar) .topbar { top: 52px; }
.desk-viewonly fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.live-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 700; font-size: .85rem; border: 1px solid #a7f3d0; }
.live-pill .live-dot { width: 8px; height: 8px; }
.watch-note { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.btn-watch { background: #fff7ed; border-color: #fed7aa; color: #c2410c; } .btn-watch:hover { background: #ffedd5; color: #9a3412; }
@media (max-width: 600px) { .imp-bar { padding: .5rem .8rem; } .imp-text small { display: none; } body:has(.imp-bar) .topbar { top: 50px; } }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; } @media (max-width: 760px) { .hero-side { align-items: stretch; } }

/* Stock (v1.7.0) */
.wh-switch { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.wh-switch a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 9px; color: var(--text); font-weight: 600; font-size: .88rem; }
.wh-switch a:hover { text-decoration: none; background: #f1f5f9; }
.wh-switch a.active { background: var(--navy); color: #fff; }
.stk-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stk-card { display: flex; gap: .6rem; align-items: center; padding: .75rem .85rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; color: var(--text); min-width: 0; }
a.stk-card:hover { text-decoration: none; border-color: #c7d3fb; }
.stk-card.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.stk-card > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.stk-card small { color: var(--muted); font-size: .74rem; font-weight: 600; }
.stk-card strong { font-size: 1.25rem; color: var(--navy); white-space: nowrap; }
.stk-card em { font-style: normal; font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-card.is-warn { background: #fffbeb; border-color: #fde68a; } .stk-card.is-warn strong { color: #b45309; }
.stk-card.is-bad { background: #fef2f2; border-color: #fecaca; } .stk-card.is-bad strong { color: #b91c1c; }
.sc-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic-blue { background: var(--primary-soft); color: var(--primary); } .ic-navy { background: #e8ebf3; color: var(--navy); } .ic-teal { background: #ccfbf1; color: #0f766e; }
.ic-amber { background: #fef3c7; color: #b45309; } .ic-red { background: #fee2e2; color: #b91c1c; } .ic-green { background: #dcfce7; color: #15803d; }
.stk-toolbar select { width: auto; min-width: 150px; }
.stk-table td { vertical-align: middle; }
.stk-row { cursor: pointer; } .stk-row:hover td { background: #f8fafc; }
.stk-row.stk-out td:first-child { box-shadow: inset 4px 0 0 #ef4444; } .stk-row.stk-low td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.stk-prod { display: flex; align-items: center; gap: .6rem; min-width: 0; } .stk-prod > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.thumb-md { width: 42px; height: 42px; border-radius: 10px; background: #eef2f6; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; flex-shrink: 0; }
.thumb-md img { width: 100%; height: 100%; object-fit: cover; }
.avail { font-size: 1.05rem; } .avail-ok { color: #15803d; } .avail-low { color: #b45309; } .avail-out { color: #b91c1c; }
.days { font-size: .85rem; color: var(--muted); } .days-short { color: #b91c1c; font-weight: 700; }
.stk-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .35rem; text-align: center; }
.stk-mini span { display: flex; flex-direction: column; background: #f8fafc; border-radius: 8px; padding: .3rem; }
.stk-mini small { font-size: .68rem; color: var(--muted); }
.order-card.stk-out { box-shadow: inset 4px 0 0 #ef4444; } .order-card.stk-low { box-shadow: inset 4px 0 0 #f59e0b; }
.stk-panel .modal-head .thumb-md { width: 46px; height: 46px; }
.sp-whs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.sp-wh { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .75rem; display: flex; flex-direction: column; background: #f8fafc; }
.sp-wh.is-on { border-color: var(--primary); background: #f5f8ff; }
.sp-wh small { color: var(--muted); font-weight: 600; } .sp-wh strong { font-size: 1.5rem; color: var(--navy); line-height: 1.2; } .sp-wh span { font-size: .78rem; color: var(--muted); }
.sp-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: .9rem; }
.sp-tabs button { border: 0; background: none; padding: .55rem .8rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; display: inline-flex; align-items: center; gap: .35rem; }
.sp-tabs button.is-on { color: var(--primary); border-bottom-color: var(--primary); }
.sp-pane { margin: 0; }
.sp-diff { font-weight: 700; margin: .2rem 0 .7rem; color: var(--muted); } .sp-diff.is-in { color: #15803d; } .sp-diff.is-out { color: #b91c1c; }
.seg-radio { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; margin-bottom: .8rem; }
.seg-radio label { margin: 0; cursor: pointer; } .seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem 1rem; border-radius: 8px; font-weight: 700; color: var(--muted); }
.seg-radio input:checked + .seg-add { background: #16a34a; color: #fff; } .seg-radio input:checked + .seg-remove { background: #dc2626; color: #fff; }
.tr-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: end; }
.tr-route .field { margin: 0; } .tr-arrow { padding-bottom: .6rem; color: var(--primary); }
.sp-hist { display: flex; flex-direction: column; gap: .45rem; margin-top: .5rem; }
.sp-h { display: grid; grid-template-columns: 64px 1fr auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.sp-h:last-child { border-bottom: 0; }
.mv { display: inline-block; min-width: 52px; text-align: center; font-weight: 800; border-radius: 8px; padding: .15rem .45rem; }
.mv-in { background: #dcfce7; color: #15803d; } .mv-out { background: #fee2e2; color: #b91c1c; }
.tr-search { margin: .9rem 0 .5rem; }
.tr-list { max-height: 330px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.tr-row { display: grid; grid-template-columns: 34px 1fr auto; gap: .6rem; align-items: center; padding: .5rem .7rem; border-bottom: 1px solid var(--border); }
.tr-row:last-child { border-bottom: 0; } .tr-row .thumb-sm { margin: 0; }
.tr-name { display: flex; flex-direction: column; min-width: 0; } .tr-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-qty { display: inline-flex; gap: .3rem; align-items: center; } .tr-qty input { width: 80px; text-align: center; } .tr-qty input.over { border-color: #ef4444; background: #fef2f2; }
.tr-qty button { border: 1px solid var(--border); background: #f8fafc; border-radius: 8px; padding: .35rem .55rem; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.tr-empty { padding: 1.2rem; text-align: center; margin: 0; }
.tr-total { margin-right: auto; font-weight: 600; }
.mv-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.mv-sum > div { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .7rem .9rem; display: flex; flex-direction: column; }
.mv-sum small { color: var(--muted); font-weight: 600; font-size: .78rem; } .mv-sum strong { font-size: 1.4rem; color: var(--navy); }
.mv-sum .is-in strong { color: #15803d; } .mv-sum .is-out strong { color: #b91c1c; }
.mv-table td { vertical-align: middle; }
.mv-type { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.mt-blue { background: var(--primary-soft); color: var(--primary); } .mt-orange { background: #fff1e6; color: #c2410c; } .mt-teal { background: #ccfbf1; color: #0f766e; }
.mt-purple { background: #ede9fe; color: #6d28d9; } .mt-navy { background: #e8ebf3; color: var(--navy); } .mt-gray { background: #f1f5f9; color: #475569; }
.mv-note { max-width: 260px; } .mv-note small { color: var(--muted); }
@media (max-width: 1250px) { .stk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .stk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .stk-top { flex-direction: column; align-items: stretch; gap: .6rem; } .stk-top .actions { justify-content: stretch; } .stk-top .actions .btn { flex: 1; }
  .stk-toolbar { display: grid; grid-template-columns: 1fr 1fr; } .stk-toolbar .search-box { grid-column: 1 / -1; } .stk-toolbar select { min-width: 0; width: 100%; }
  .mv-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-route { grid-template-columns: 1fr; } .tr-arrow { display: none; }
}
.sp-cost { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.sp-cost > div { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: .5rem .7rem; display: flex; flex-direction: column; }
.sp-cost small { color: #9a3412; font-weight: 600; font-size: .74rem; } .sp-cost strong { font-size: 1.15rem; color: var(--navy); } .sp-cost span { font-size: .74rem; color: var(--muted); }
.sp-cost.is-missing { display: block; background: #f8fafc; border: 1px dashed var(--border); border-radius: 12px; padding: .6rem .8rem; color: var(--muted); font-size: .86rem; }
@media (max-width: 600px) { .sp-cost { grid-template-columns: 1fr; } }

/* Accounting: profit per order (v1.8.0) */
.acc-tabs { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 1rem; }
.acc-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 9px; color: var(--text); font-weight: 600; }
.acc-tabs a:hover { text-decoration: none; background: #f1f5f9; } .acc-tabs a.active { background: var(--navy); color: #fff; }
.acc-flow { display: flex; align-items: stretch; gap: .5rem; flex-wrap: wrap; }
.af { flex: 1 1 150px; display: flex; flex-direction: column; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; }
.af small { color: var(--muted); font-weight: 600; font-size: .78rem; } .af strong { font-size: 1.3rem; color: var(--navy); white-space: nowrap; } .af em { font-style: normal; font-size: .74rem; color: var(--muted); }
.af-main { background: var(--primary-soft); border-color: #c7d3fb; } .af-main strong { color: var(--primary); }
.af-op { align-self: center; font-size: 1.4rem; font-weight: 800; color: #94a3b8; }
.af-result.is-pos { background: linear-gradient(135deg, #16a34a, #15803d); border-color: #15803d; } .af-result.is-neg { background: linear-gradient(135deg, #dc2626, #b91c1c); border-color: #b91c1c; }
.af-result small, .af-result em, .af-result strong { color: #fff; }
.acc-warn { display: flex; gap: .4rem; align-items: center; margin: .8rem 0 0; padding: .55rem .8rem; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: .86rem; }
.acc-table td { vertical-align: middle; } .acc-prod { max-width: 240px; }
.acc-table tfoot th { background: #f8fafc; color: var(--navy); text-transform: none; font-size: .88rem; }
@media (max-width: 760px) { .af-op { display: none; } .af { flex-basis: 45%; } .af-result { flex-basis: 100%; } }

/* Weekly facture (v1.9.0) */
.fac-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding: .6rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.fac-week { display: flex; flex-direction: column; align-items: center; } .fac-week strong { color: var(--navy); font-size: 1.05rem; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.fac-tools { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.fac-tools select { width: auto; min-width: 200px; }
.facture { padding: 1.4rem; }
.fac-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 2px solid var(--navy); flex-wrap: wrap; }
.fac-logo { height: 34px; display: block; margin-bottom: .4rem; }
.fac-company { font-size: .85rem; color: var(--muted); } .fac-company strong { color: var(--navy); }
.fac-title { text-align: right; } .fac-title h2 { margin: 0; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
.fac-num { display: inline-block; margin-top: .3rem; padding: .15rem .6rem; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.fac-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1rem 0; }
.fac-info > div { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .7rem; display: flex; flex-direction: column; }
.fac-info small { color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 600; letter-spacing: .03em; } .fac-info strong { color: var(--navy); } .fac-info em { font-style: normal; font-size: .75rem; color: #b45309; }
.fac-table td { vertical-align: middle; font-size: .86rem; } .fac-prod { max-width: 220px; }
.fac-returned td { opacity: .5; text-decoration: line-through; } .fac-returned td a { text-decoration: line-through; }
.fac-bottom { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 1.5rem; margin-top: 1rem; align-items: start; }
.fac-notes p { font-size: .82rem; margin: 0 0 .4rem; }
.fac-strike { text-decoration: line-through; opacity: .55; font-weight: 700; }
.fac-totals { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ft { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .9rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.ft-strong { background: #f8fafc; } .ft-strong strong { color: var(--navy); }
.ft-net { border-bottom: 0; border-top: 2px solid var(--navy); background: #fafbfd; padding: .8rem .9rem; } .ft-net strong { font-size: 1.4rem; }
@media (max-width: 760px) { .fac-info { grid-template-columns: 1fr 1fr; } .fac-bottom { grid-template-columns: 1fr; } .fac-nav .btn { padding: .45rem .6rem; font-size: .85rem; } }
@media print {
  .sidebar, .topbar, .no-print, .imp-bar, .alert, .bottom-nav { display: none !important; }
  .main { margin: 0 !important; } .content { padding: 0 !important; }
  body { background: #fff !important; }
  .facture { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; } .fac-table { font-size: 10px; } .fac-table th, .fac-table td { padding: 4px 5px !important; }
  .fac-table a { color: inherit; text-decoration: none; }
  @page { size: A4 landscape; margin: 10mm; }
}
.fac-tools form { gap: .5rem; flex-wrap: wrap; } .fac-info em.fac-prod-filter { color: var(--primary); }

/* Returns after delivery (v1.10.0) */
.rt-search { display: flex; gap: .5rem; } .rt-search .search-box { flex: 1; margin: 0; }
.rt-preview { margin-top: 1rem; padding: 1rem; border: 1.5px solid #fecaca; border-radius: 14px; background: #fffafa; animation: fadeIn .15s ease; }
.rt-order { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: center; margin-bottom: .7rem; }
.rt-amount strong { font-size: 1.3rem; color: var(--navy); }
.rt-items { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; } .rt-items span { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .2rem .65rem; font-weight: 600; font-size: .85rem; }
.rt-restock { display: flex; gap: .45rem; align-items: center; margin: .4rem 0 .6rem; font-weight: 600; }
.rt-note { display: flex; gap: .35rem; align-items: center; font-size: .82rem; margin: 0 0 .8rem; }
.rt-table td { vertical-align: middle; } .rt-prod { max-width: 220px; }
@media (max-width: 700px) { .rt-order { grid-template-columns: 1fr; gap: .4rem; } }
.rt-refund-row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .rt-refund-row .input-suffix { max-width: 220px; }

/* Import orders (v1.13.0): upload → check → import */
.imp-steps { list-style: none; display: flex; gap: .5rem; margin: 0 0 1rem; padding: 0; flex-wrap: wrap; }
.imp-steps li { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .45rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .86rem; }
.imp-steps li span { width: 24px; height: 24px; border-radius: 50%; background: #eef2f7; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.imp-steps li.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.imp-steps li.active span { background: var(--primary); color: #fff; }
.imp-steps li.done { color: #15803d; } .imp-steps li.done span { background: #dcfce7; color: #15803d; }
.imp-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.imp-grid .card { margin: 0; }
.imp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 2rem 1rem; border: 2px dashed #c7d2fe; border-radius: 14px; background: #f8faff; cursor: pointer; transition: border-color .15s, background .15s; position: relative; margin: .25rem 0 1rem; }
.imp-drop:hover, .imp-drop.is-over { border-color: var(--primary); background: var(--primary-soft); }
.imp-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.imp-drop-icon { width: 54px; height: 54px; border-radius: 16px; background: #fff; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); margin-bottom: .3rem; }
.imp-drop strong { color: var(--navy); font-size: 1rem; }
.imp-drop.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.imp-drop.has-file .imp-drop-icon { color: #15803d; }
.imp-types { display: flex; gap: .3rem; margin-top: .3rem; }
.imp-types span { font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 6px; background: #fff; border: 1px solid var(--border); color: var(--muted); }
.imp-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.imp-actions.center { justify-content: center; }
.imp-tpl { display: flex; gap: .35rem; }
.imp-cols { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.imp-col { display: grid; grid-template-columns: 130px auto 1fr; gap: .5rem; align-items: center; padding: .5rem .7rem; border-bottom: 1px solid var(--border); font-size: .88rem; }
.imp-col:last-child { border-bottom: 0; }
.imp-col:nth-child(even) { background: #fafbfd; }
.imp-col code { font-size: .8rem; color: var(--navy); }
.imp-col div { display: flex; flex-direction: column; grid-column: 3; }
.imp-col small { font-size: .78rem; }
.imp-req { grid-column: 2; font-size: .68rem; font-weight: 700; color: #b91c1c; background: #fee2e2; padding: .08rem .4rem; border-radius: 6px; }
.imp-auto { display: flex; gap: .4rem; align-items: flex-start; margin: .8rem 0 .5rem; padding: .55rem .8rem; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: .86rem; }
.imp-file { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin-bottom: 1rem; }
.imp-file-icon { width: 44px; height: 44px; border-radius: 12px; background: #dcfce7; color: #15803d; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.imp-file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.imp-file-main > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); }
.imp-map .card-body { padding-top: .6rem; }
.imp-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.imp-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .65rem; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 1px solid; }
.imp-chip em { font-style: normal; font-weight: 500; opacity: .8; }
.imp-chip.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.imp-chip.off { background: #f8fafc; border-color: var(--border); color: var(--muted); text-decoration: line-through; text-decoration-color: #cbd5e1; }
.imp-chip.off em { text-decoration: none; display: inline-block; }
.imp-chip.bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.imp-chip.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.imp-block-icon { width: 60px; height: 60px; border-radius: 50%; background: #fef2f2; color: var(--danger); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .6rem; }
.imp-block p { max-width: 560px; margin-left: auto; margin-right: auto; }
.imp-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.imp-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .1rem; border-top: 4px solid #cbd5e1; }
.imp-kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.imp-kpi strong { font-size: 1.6rem; color: var(--navy); line-height: 1.15; }
.imp-kpi em { font-style: normal; font-size: .74rem; color: var(--muted); }
.imp-kpi.k-ok { border-top-color: var(--success); } .imp-kpi.k-ok strong { color: #15803d; }
.imp-kpi.k-warn { border-top-color: #f59e0b; } .imp-kpi.k-warn strong { color: #b45309; }
.imp-kpi.k-err { border-top-color: var(--danger); } .imp-kpi.k-err strong { color: var(--danger); }
.imp-kpi.k-skip { border-top-color: #94a3b8; }
.imp-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.imp-table td { vertical-align: top; }
.imp-row.is-error { background: #fffafa; }
.imp-row.is-skip { opacity: .7; }
.imp-st { width: 34px; }
.imp-dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.d-green { background: #dcfce7; color: #15803d; } .d-orange { background: #fef3c7; color: #b45309; }
.d-red { background: #fee2e2; color: #b91c1c; } .d-gray { background: #f1f5f9; color: #64748b; }
.imp-prod { min-width: 160px; font-size: .86rem; }
.imp-msg { font-size: .84rem; min-width: 190px; }
.imp-msg div + div { margin-top: .2rem; }
.t-green { color: #15803d; font-weight: 600; } .t-orange { color: #b45309; } .t-red { color: #b91c1c; font-weight: 600; } .t-gray { color: var(--muted); }
.ix-bar { position: sticky; bottom: .75rem; z-index: 15; display: flex; align-items: center; gap: .75rem; background: var(--navy); color: #fff; padding: .8rem 1rem; border-radius: 14px; box-shadow: 0 10px 30px rgba(6,18,57,.25); margin-top: 1rem; }
.ix-bar-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ix-bar-text span { color: #c5cde8; font-size: .85rem; }
.ix-bar .btn:not(.btn-success) { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.ix-bar .btn[disabled] { opacity: .5; cursor: not-allowed; }
.imp-done { padding: 2rem 1rem; }
.imp-done-top { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.imp-done-top h2 { margin: .3rem 0 0; color: var(--navy); }
.imp-done-top p { margin: 0; }
.imp-done-icon { width: 68px; height: 68px; border-radius: 50%; background: #dcfce7; color: #15803d; display: inline-flex; align-items: center; justify-content: center; }
.imp-done-icon.none { background: #fef3c7; color: #b45309; }
.imp-done-badges { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin: .3rem 0; }
.imp-done .imp-actions { margin-top: .6rem; }
.imp-done-errors { max-width: 760px; margin: 1.5rem auto 0; border: 1px solid #fecaca; background: #fef2f2; border-radius: 12px; padding: .9rem 1.1rem; }
.imp-done-errors h3 { color: #b91c1c; font-size: .95rem; }
.imp-done-errors ul { margin: 0; padding-left: 1.1rem; color: #7f1d1d; font-size: .88rem; }
@media (max-width: 960px) {
  .imp-grid { grid-template-columns: 1fr; }
  .imp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .imp-kpis .imp-kpi:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .imp-col { grid-template-columns: 1fr auto; }
  .imp-col div { grid-column: 1 / -1; }
  .imp-file { flex-wrap: wrap; }
  .ix-bar { flex-wrap: wrap; bottom: .5rem; }
  .ix-bar-text { flex-basis: 100%; }
  .ix-bar .btn { flex: 1; justify-content: center; }
  .imp-table thead { display: none; }
  .imp-table tr { display: grid; grid-template-columns: 34px 1fr auto; gap: .1rem .5rem; padding: .7rem .6rem; border-bottom: 1px solid var(--border); }
  .imp-table td { border: 0; padding: 0; }
  .imp-table td.imp-st { grid-row: span 3; }
  .imp-table td:nth-child(2) { grid-column: 2 / -1; font-size: .78rem; }
  .imp-table td:nth-child(3) { grid-column: 2; }
  .imp-table td:nth-child(6) { grid-column: 3; grid-row: 2; text-align: right; }
  .imp-table td:nth-child(4), .imp-table td:nth-child(5), .imp-table td:nth-child(7) { grid-column: 2 / -1; min-width: 0; }
}
.imp-table tr[hidden] { display: none !important; }
@media (max-width: 860px) { body:has(.bottom-nav) .ix-bar { bottom: calc(70px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px) { .imp-file .btn { width: 100%; justify-content: center; } .imp-file-main { flex-basis: calc(100% - 60px); } .imp-steps li { padding-right: .6rem; font-size: .8rem; } }

/* System update (v1.14.0) */
.su-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; padding: 1.2rem 1.3rem; margin-bottom: 1rem; background: linear-gradient(120deg, #061239 0%, #0b2a8a 70%, #003ef2 100%); color: #fff; border: 0; }
.su-hero-main { display: flex; gap: 1rem; align-items: flex-start; }
.su-hero-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.su-hero small { color: #c5cde8; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.su-version { font-size: 2.3rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.su-meta { color: #c5cde8; font-size: .88rem; margin-top: .15rem; }
.su-notes { margin: .6rem 0 0; font-size: .88rem; color: #e6ebfa; background: rgba(255,255,255,.08); border-radius: 10px; padding: .5rem .7rem; }
.su-health { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .55rem; align-self: start; }
.su-health .text-danger { color: #fecaca !important; }
.su-health-title { font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.su-health-title.ok .icon { color: #4ade80; } .su-health-title.bad .icon { color: #fca5a5; }
.su-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.su-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(255,255,255,.12); color: #fff; }
.su-chip.ok .icon { color: #4ade80; } .su-chip.bad { background: #fee2e2; color: #b91c1c; }
.su-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.su-grid .card { margin: 0; }
.su-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .8rem; margin: 1rem 0 .8rem; }
.su-or::before, .su-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.su-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; margin: .8rem 0; font-size: .9rem; }
.su-box p { margin: .25rem 0 0; color: var(--text); }
.su-online { background: #f0fdf4; border-color: #bbf7d0; }
.su-jump { display: flex; align-items: center; gap: .9rem; justify-content: center; padding: .9rem; border-radius: 14px; background: #f8faff; border: 1px solid #dbe4ff; }
.su-jump div { display: flex; flex-direction: column; align-items: center; }
.su-jump small { color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.su-jump strong { font-size: 1.5rem; color: var(--navy); }
.su-jump .new strong { color: var(--primary); } .su-jump .old strong { color: #b45309; }
.su-jump.small { margin-bottom: .9rem; } .su-jump.small strong { font-size: 1.25rem; }
.su-arrow { color: var(--muted); display: inline-flex; }
.su-facts { list-style: none; padding: 0; margin: .4rem 0 .8rem; display: grid; gap: .3rem; font-size: .87rem; color: var(--muted); }
.su-facts li { display: flex; align-items: center; gap: .4rem; }
.su-files { margin-bottom: 1rem; font-size: .85rem; } .su-files summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.su-files pre { white-space: pre-wrap; font-size: .76rem; max-height: 220px; overflow: auto; background: #f8fafc; border-radius: 8px; padding: .6rem; }
.su-go { width: 100%; justify-content: center; margin-bottom: .4rem; }
[data-su-install] small { display: block; text-align: center; }
.su-timeline { list-style: none; margin: 0; padding: 0 0 0 .3rem; }
.su-timeline li { position: relative; padding: 0 0 1.1rem 1.6rem; }
.su-timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; border-left: 2px solid var(--border); }
.su-timeline li:last-child { padding-bottom: .2rem; } .su-timeline li:last-child::before { display: none; }
.su-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #cbd5e1; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; }
.su-timeline li.is-current .su-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.su-timeline li.st-failed .su-dot { background: var(--danger); } .su-timeline li.st-rolled_back .su-dot { background: #f59e0b; }
.su-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; }
.su-timeline li.is-current .su-item { border-color: #c7d2fe; background: #f8faff; }
.su-item-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.su-v { font-size: 1.1rem; color: var(--navy); margin-right: .2rem; }
.su-item-notes { margin: .35rem 0 0; font-size: .85rem; }
.su-item-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .55rem; }
.btn-danger-soft { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.btn-danger-soft:hover { background: #fee2e2; color: #991b1b; }
.su-keep { display: flex; gap: .4rem; align-items: flex-start; margin: .9rem 0 0; font-size: .8rem; color: var(--muted); }
.su-log { white-space: pre-wrap; font-size: .78rem; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .8rem; margin: 0; max-height: 50vh; overflow: auto; }
.su-danger-icon { background: #fee2e2; color: #b91c1c; }
.su-warn { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: .7rem .9rem; margin-bottom: 1rem; color: #78350f; font-size: .88rem; }
.su-warn strong { display: flex; gap: .35rem; align-items: flex-start; }
.su-warn ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.check-line { display: flex; gap: .5rem; align-items: center; font-size: .9rem; cursor: pointer; }
.check-line input { width: auto; margin: 0; }
@media (max-width: 960px) { .su-hero, .su-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .su-version { font-size: 1.9rem; } .su-hero-icon { display: none; } }
.su-v.is-off { text-decoration: line-through; color: var(--muted); }

/* Confirmation popup (v1.14.3), replaces the browser confirm box */
dialog.cf-modal { max-width: 440px; }
.cf-body { padding: 1.6rem 1.4rem 1.1rem; text-align: center; }
.cf-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .7rem; }
.cf-modal.is-danger .cf-icon { background: #fee2e2; color: #dc2626; box-shadow: 0 0 0 8px #fef2f2; }
.cf-body h3 { margin: 0 0 .35rem; color: var(--navy); font-size: 1.15rem; }
.cf-msg { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.cf-extra:empty { display: none; }
.cf-extra { margin-top: 1rem; text-align: left; }
.cf-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cf-amount { font-size: 1.5rem; font-weight: 800; color: var(--navy); text-align: center; padding: .7rem; background: #f8fafc; border-bottom: 1px solid var(--border); }
.cf-modal.is-danger .cf-amount { color: #b91c1c; background: #fef2f2; }
.cf-card dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; padding: .75rem .9rem; font-size: .88rem; }
.cf-card dt { color: var(--muted); }
.cf-card dd { margin: 0; font-weight: 600; text-align: right; }
.cf-foot { justify-content: stretch; }
.cf-foot .btn { flex: 1; justify-content: center; }

/* Delivery cash (v1.15.0) */
.ch-done { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid #bbf7d0; background: #f0fdf4; }
.ch-done-icon { width: 46px; height: 46px; border-radius: 50%; background: #16a34a; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-done-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-done-text strong { color: #14532d; font-size: 1.05rem; } .ch-done-text span { color: #166534; font-size: .88rem; }
.ch-head { display: flex; gap: 1rem; align-items: stretch; margin-bottom: 1rem; flex-wrap: wrap; }
.ch-kpis { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .75rem; min-width: 280px; }
.ch-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; display: flex; flex-direction: column; gap: .1rem; }
.ch-kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.ch-kpi strong { font-size: 1.5rem; color: var(--navy); line-height: 1.15; }
.ch-kpi em { font-style: normal; font-size: .76rem; color: var(--muted); }
.ch-kpi.k-main { background: linear-gradient(135deg, #061239, #0b2a8a); border: 0; }
.ch-kpi.k-main small, .ch-kpi.k-main em { color: #c5cde8; } .ch-kpi.k-main strong { color: #fff; font-size: 1.7rem; }
.ch-head-actions { display: flex; flex-direction: column; gap: .5rem; justify-content: center; }
.ch-head-actions .btn { justify-content: center; }
.ch-search { max-width: 240px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .85rem; padding: 1rem; }
.ch-card { border: 1px solid var(--border); border-radius: 14px; padding: .9rem; display: flex; flex-direction: column; gap: .7rem; background: #fff; border-left: 4px solid #cbd5e1; }
.ch-card[hidden] { display: none; }
.ch-card.is-owe { border-left-color: #f59e0b; } .ch-card.is-credit { border-left-color: var(--danger); } .ch-card.is-clear { border-left-color: var(--success); }
.ch-card-top { display: flex; gap: .65rem; align-items: center; }
.ch-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.ch-avatar.lg { width: 54px; height: 54px; font-size: 1.1rem; }
.ch-who { display: flex; flex-direction: column; min-width: 0; } .ch-who strong { color: var(--navy); } .ch-who small { color: var(--muted); font-size: .78rem; }
.ch-due small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ch-due strong { font-size: 1.6rem; line-height: 1.15; color: var(--navy); }
.ch-card.is-owe .ch-due strong { color: #b45309; } .ch-card.is-credit .ch-due strong { color: var(--danger); } .ch-card.is-clear .ch-due strong { color: #15803d; }
.ch-break { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; background: #f8fafc; border-radius: 10px; padding: .5rem .6rem; font-size: .8rem; font-weight: 600; }
.ch-break span { display: flex; flex-direction: column; } .ch-break em { font-style: normal; color: var(--muted); font-weight: 500; font-size: .72rem; }
.ch-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .78rem; color: var(--muted); }
.ch-meta > * { display: inline-flex; align-items: center; gap: .25rem; }
.ch-actions { display: flex; gap: .4rem; margin-top: auto; }
.ch-actions .btn:first-child { flex: 1; justify-content: center; }
.ch-help { display: flex; gap: .4rem; align-items: center; margin: 0; padding: 0 1rem 1rem; font-size: .8rem; color: var(--muted); }
.ch-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-bottom: .4rem; }
.ch-filters select { width: auto; min-width: 150px; }
.ch-dates { display: flex; align-items: center; gap: .4rem; } .ch-dates input { width: auto; }
.ch-methods, .day-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; padding: .4rem 1rem 1rem; }
.day-methods { padding: 0; margin-bottom: .8rem; }
.ch-method { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--border); border-radius: 12px; padding: .6rem .75rem; background: #fff; }
.ch-method span { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: .86rem; } .ch-method small { color: var(--muted); font-weight: 500; font-size: .74rem; }
.ch-method strong { color: var(--navy); white-space: nowrap; }
.ch-method.is-zero { opacity: .55; }
.m-cash { --mc: #15803d; --mb: #dcfce7; } .m-mtn_momo { --mc: #a16207; --mb: #fef9c3; } .m-orange_money { --mc: #c2410c; --mb: #ffedd5; } .m-bank { --mc: #1d4ed8; --mb: #dbeafe; }
.ch-method { border-left: 4px solid var(--mc, #cbd5e1); } .ch-method > .icon { color: var(--mc); }
.ch-mbadge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--mb, #f1f5f9); color: var(--mc, #475569); }
.ch-table td { vertical-align: middle; }
.ch-inline { display: inline-block; }
.ch-owe { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .65rem .8rem; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: .9rem; }
.ch-owe span { display: flex; flex-direction: column; font-size: .8rem; color: #92400e; font-weight: 600; } .ch-owe strong { font-size: 1.25rem; color: #78350f; }
.ch-owe.is-credit { background: #f8fafc; border-color: var(--border); } .ch-owe.is-credit span, .ch-owe.is-credit strong { color: var(--muted); }
.ch-pay { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.ch-pay-opt { margin: 0; cursor: pointer; }
.ch-pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ch-pay-opt span { display: flex; align-items: center; gap: .45rem; padding: .6rem .7rem; border: 1.5px solid var(--border); border-radius: 10px; font-weight: 600; font-size: .88rem; transition: border-color .12s, background .12s; }
.ch-pay-opt span .icon { color: var(--mc); }
.ch-pay-opt input:checked + span { border-color: var(--mc); background: var(--mb); color: var(--mc); }
.ch-pay-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
/* statement + daily closing */
.st-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.st-head .st-who select, .day-nav input { width: auto; }
.day-nav { display: flex; gap: .4rem; align-items: center; margin-right: auto !important; }
.st-who { margin-right: auto !important; }
.st-hero, .day-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.st-person { display: flex; gap: .8rem; align-items: center; } .st-person h2 { margin: 0; color: var(--navy); }
.st-now, .day-total { text-align: right; display: flex; flex-direction: column; }
.st-now small, .day-total small, .day-hero small { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
.st-now strong, .day-total strong { font-size: 1.8rem; color: #15803d; line-height: 1.1; }
.st-now.owe strong { color: #b45309; } .st-now.credit strong { color: var(--danger); }
.day-total strong { color: var(--navy); }
.day-hero h2 { margin: .1rem 0; color: var(--navy); }
.st-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.st-tools { margin-left: auto; display: flex; gap: .4rem; }
.st-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin-bottom: 1rem; }
.st-sum div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .85rem; display: flex; flex-direction: column; }
.st-sum small { color: var(--muted); font-size: .76rem; font-weight: 600; } .st-sum strong { font-size: 1.15rem; color: var(--navy); }
.st-sum .st-close { background: var(--navy); border-color: var(--navy); } .st-sum .st-close small { color: #c5cde8; } .st-sum .st-close strong { color: #fff; }
.st-table .st-open td { background: #f8fafc; font-weight: 600; }
.st-table .st-payment td { background: #f0fdf4; } .st-paid { color: #15803d; font-weight: 600; }
.st-table tfoot td { font-weight: 700; border-top: 2px solid var(--navy); }
.day-check { display: flex; gap: .4rem; align-items: center; padding: .6rem .8rem; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: .88rem; margin: 0 0 1rem; }
.day-sign { display: none; }
@media print {
  .st-filters, .ch-head-actions, .day-nav { display: none !important; }
  .day-sign { display: flex; justify-content: space-between; margin-top: 2rem; }
  .day-sign div { width: 45%; border-top: 1px solid #000; padding-top: .3rem; }
  .card { box-shadow: none !important; break-inside: avoid; }
}
@media (max-width: 960px) { .st-sum { grid-template-columns: repeat(2, 1fr); } .st-sum .st-close { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .ch-kpis { grid-template-columns: 1fr 1fr; } .ch-kpis .k-main { grid-column: 1 / -1; }
  .ch-head-actions { flex-direction: row; width: 100%; } .ch-head-actions .btn { flex: 1; }
  .ch-grid { padding: .75rem; grid-template-columns: 1fr; }
  .ch-done { flex-wrap: wrap; } .ch-done .btn { width: 100%; justify-content: center; }
  .st-tools { margin-left: 0; }
}

/* Expenses (v1.16.0) */
.ex-top { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.ex-add { margin-left: auto; }
.ex-kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: .75rem; margin-bottom: 1rem; }
.ex-kpi { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.ex-kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.ex-kpi strong { font-size: 1.45rem; color: var(--navy); line-height: 1.2; }
.ex-kpi em { font-style: normal; font-size: .77rem; color: var(--muted); }
.ex-kpi.k-main { background: linear-gradient(135deg, #7f1d1d, #b91c1c); border: 0; }
.ex-kpi.k-main small, .ex-kpi.k-main em { color: #fecaca; } .ex-kpi.k-main strong { color: #fff; font-size: 1.7rem; }
.ex-trend { font-weight: 700; padding: .05rem .4rem; border-radius: 6px; background: rgba(255,255,255,.18); color: #fff; }
.ex-top-cat { display: flex; align-items: center; gap: .45rem; font-size: 1.05rem !important; }
.ex-cat-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); }
.ex-top-cat .ex-cat-icon { width: 28px; height: 28px; border-radius: 8px; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.ex-grid .card { margin: 0; }
.ex-filters { gap: .5rem; flex-wrap: wrap; }
.ex-filters .search-box { flex: 1; min-width: 180px; }
.ex-filters select { width: auto; min-width: 160px; }
.ex-active { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; padding: .6rem 1.2rem 0; font-size: .82rem; color: var(--muted); }
.ex-day { display: flex; justify-content: space-between; padding: .55rem 1.2rem; background: #f8fafc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: .6rem; }
.ex-day:first-of-type { margin-top: 0; }
.ex-day strong { color: var(--navy); }
.ex-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.2rem; border-bottom: 1px solid #f1f5f9; }
.ex-row:hover { background: #fafbfd; }
.ex-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-main strong { color: var(--navy); font-size: .93rem; }
.ex-main small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-note { color: var(--text); }
.ex-amount { font-weight: 700; color: #b91c1c; white-space: nowrap; }
.ex-actions { display: flex; gap: .3rem; min-width: 74px; justify-content: flex-end; }
.ex-lock { color: #cbd5e1; padding: .3rem; }
.ex-cat { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; padding: .55rem .6rem; border-radius: 12px; color: inherit; margin: 0 -.6rem; }
.ex-cat:hover { background: #f8fafc; text-decoration: none; }
.ex-cat.is-on { background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: inset 0 0 0 1.5px var(--c); }
.ex-cat-top { grid-column: 1 / -1; display: flex; align-items: center; gap: .55rem; }
.ex-cat-top .ex-cat-icon { width: 30px; height: 30px; border-radius: 9px; }
.ex-cat-name { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: .88rem; } .ex-cat-name small { color: var(--muted); font-weight: 500; font-size: .74rem; }
.ex-cat-top strong { font-size: .9rem; color: var(--navy); white-space: nowrap; }
.ex-bar { height: 7px; border-radius: 99px; background: #f1f5f9; overflow: hidden; align-self: center; }
.ex-bar span { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.ex-pct { font-size: .75rem; font-weight: 700; color: var(--muted); min-width: 34px; text-align: right; }
.ex-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; }
.ex-pick-opt { margin: 0; cursor: pointer; }
.ex-pick-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ex-pick-opt span { display: flex; align-items: center; gap: .45rem; padding: .5rem .65rem; border: 1.5px solid var(--border); border-radius: 10px; font-size: .84rem; font-weight: 600; transition: border-color .12s, background .12s; }
.ex-pick-opt span .icon { color: var(--c); flex-shrink: 0; }
.ex-pick-opt input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); }
.ex-pick-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ex-two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ex-amount-input { font-size: 1.15rem; font-weight: 700; }
@media (max-width: 1100px) { .ex-grid { grid-template-columns: 1fr; } .ex-cats { order: -1; } }
@media (max-width: 860px) { .ex-kpis { grid-template-columns: 1fr 1fr; } .ex-kpis .k-main { grid-column: 1 / -1; } .ex-add { width: 100%; margin-left: 0; justify-content: center; } }
@media (max-width: 560px) {
  .ex-row { padding: .65rem .8rem; gap: .6rem; flex-wrap: wrap; }
  .ex-main { flex-basis: calc(100% - 140px); }
  .ex-actions { min-width: 0; }
  .ex-pick, .ex-two { grid-template-columns: 1fr; }
  .ex-day { padding: .5rem .8rem; }
}
@media (max-width: 560px) {
  .ex-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .15rem .6rem; }
  .ex-row .ex-cat-icon { grid-row: span 2; align-self: start; }
  .ex-main { grid-column: 2; } .ex-amount { grid-column: 3; grid-row: 1; align-self: start; }
  .ex-actions { grid-column: 2 / -1; justify-content: flex-start; margin-top: .25rem; }
  .ex-top .ch-dates { width: 100%; } .ex-top .ch-dates input { flex: 1; min-width: 0; }
  .ex-top .segmented { max-width: 100%; overflow-x: auto; }
  .ex-kpis .ex-kpi:last-child { grid-column: 1 / -1; }
}

/* Products (v1.17.0) */
.pr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.pr-kpi { display: flex; gap: .75rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; color: inherit; min-width: 0; }
a.pr-kpi:hover { text-decoration: none; border-color: #c7d2fe; }
.pr-kpi > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.pr-kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.pr-kpi strong { font-size: 1.45rem; color: var(--navy); line-height: 1.15; }
.pr-kpi em { font-style: normal; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-kpi-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pr-kpi-icon.ki-red { background: #fee2e2; color: #dc2626; }
.pr-kpi.is-alert { border-color: #fecaca; background: #fffafa; } .pr-kpi.is-alert strong { color: #b91c1c; }
.pr-wrap { overflow: visible; }
.pr-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .9rem 1rem .5rem; }
.pr-search { flex: 1; min-width: 200px; margin: 0; } .pr-search .search-box { width: 100%; }
.pr-selects { display: flex; gap: .5rem; margin: 0; } .pr-selects select { width: auto; min-width: 150px; }
.pr-view { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pr-view .btn { border: 0; border-radius: 0; background: #fff; color: var(--muted); }
.pr-view .btn.is-on { background: var(--primary-soft); color: var(--primary); }
.pr-tabs { padding: 0 1rem; margin-bottom: .2rem; }
.tab.tab-warn:not(.active) .count { color: #b91c1c; font-weight: 700; opacity: 1; }
.pr-grid { padding: .8rem 1rem 1rem; }
.pr-table, .pr-wrap.is-list .pr-grid { display: none; }
.pr-wrap.is-list .pr-table { display: block; }
.pr-pages { padding: 0 1rem .5rem; }
/* card */
.product-card .pc-open { display: flex; flex-direction: column; color: inherit; flex: 1; }
.product-card .pc-open:hover { text-decoration: none; }
.product-card .pc-off { display: none; } .product-card.is-off .pc-off { display: inline-block; }
.product-card .pc-price { margin-top: .25rem; font-size: 1.02rem; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #f1f5f9; }
.pc-stats span { display: flex; flex-direction: column; align-items: center; padding: .45rem .2rem; font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.2; }
.pc-stats span + span { border-left: 1px solid #f1f5f9; }
.pc-stats b { font-size: .95rem; color: var(--navy); }
.pc-actions { display: flex; align-items: center; gap: .35rem; padding: .5rem .6rem; border-top: 1px solid #f1f5f9; background: #fafbfd; }
.pc-switch { display: flex; align-items: center; gap: .4rem; margin: 0 auto 0 0; cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--muted); }
.product-card:not(.is-off) .pc-switch-label { color: #15803d; }
.product-card.is-off .pc-media img, .product-card.is-off .pc-body { opacity: .55; }
.product-card.is-off { opacity: 1; }
/* list */
.pr-table .table td { vertical-align: middle; }
.pr-table tr.is-off td:not(:nth-last-child(-n+2)) { opacity: .5; }
.pr-prod { display: flex; align-items: center; gap: .65rem; min-width: 220px; }
.pr-prod > span:last-child { display: flex; flex-direction: column; }
.pr-thumb { width: 44px; height: 44px; border-radius: 10px; background: #f1f4f9; color: #b3bfd8; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-st { font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: #dcfce7; color: #166534; }
.pr-st.is-low { background: #fef3c7; color: #92400e; } .pr-st.is-out { background: #fee2e2; color: #991b1b; }
@media (max-width: 960px) { .pr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .pr-kpi { padding: .7rem; gap: .55rem; } .pr-kpi-icon { width: 34px; height: 34px; } .pr-kpi strong { font-size: 1.2rem; }
  .pr-toolbar { padding: .75rem .75rem .4rem; } .pr-selects { width: 100%; } .pr-selects select { flex: 1; min-width: 0; }
  .pr-grid { padding: .6rem .75rem .9rem; } .pr-tabs { padding: 0 .75rem; }
  .pc-stats span { font-size: .62rem; } .pc-stats b { font-size: .85rem; }
}
.pr-switch { display: inline-flex; margin: 0; cursor: pointer; }

/* Waiting for stock (v1.18.0) */
.tab-nostock { border-color: #fecaca; color: #b91c1c; display: inline-flex; align-items: center; gap: .3rem; }
.tab-nostock.active { background: #dc2626; border-color: #dc2626; color: #fff; }
.nostock-badge { margin-top: .25rem; display: inline-block; }
.dk-nostock { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: #fef2f2; border: 1.5px solid #fca5a5; color: #7f1d1d; }
.dk-nostock.hidden { display: none; }
.dk-nostock-icon { width: 40px; height: 40px; border-radius: 50%; background: #dc2626; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dk-nostock strong { display: block; color: #991b1b; font-size: 1rem; }
.dk-nostock span { display: block; font-weight: 600; margin: .15rem 0; }
.dk-nostock small { display: block; color: #9f1239; }
.outcome.is-blocked, .outcome:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.6); }
.ws-alert { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; margin-bottom: 1rem; border: 1.5px solid #fca5a5; background: linear-gradient(90deg, #fef2f2, #fff); }
.ws-icon { width: 48px; height: 48px; border-radius: 14px; background: #dc2626; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ws-text { flex: 1; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ws-text strong { color: #991b1b; font-size: 1.05rem; } .ws-text > span { color: #7f1d1d; font-size: .88rem; }
.ws-products { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; }
.ws-products .chip { background: #fee2e2; color: #991b1b; }
@media (max-width: 640px) { .ws-alert { flex-wrap: wrap; } .ws-alert .btn { width: 100%; justify-content: center; } }
.de-wait { display: inline-flex; gap: .4rem; align-items: center; padding: .5rem .8rem; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: .86rem; font-weight: 600; margin: .2rem auto .8rem; }
.toast.toast-error { background: #7f1d1d; } .toast.toast-error::before { content: "!"; background: #ef4444; }
.dk-skip { margin-left: auto; align-self: center; white-space: nowrap; background: #fff; border-color: #fca5a5; color: #b91c1c; font-weight: 700; } .dk-skip:hover { background: #fee2e2; } @media (max-width: 640px) { .dk-nostock { flex-wrap: wrap; } .dk-skip { width: 100%; justify-content: center; margin-left: 0; } }
/* Suivis: postponed deliveries (v1.19.0) */
.fu-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fu-acts { display: flex; gap: .3rem; }
.btn-wa { background: #16a34a; border-color: #16a34a; color: #fff; } .btn-wa:hover { background: #15803d; color: #fff; }
.fu-deliv .fu-when { color: #4338ca; }
.fu-deliv.is-late .fu-when { color: #b91c1c; }
@media (max-width: 1100px) { .fu-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .fu-deliv .fu-acts { grid-column: 1 / -1; order: 4; } .fu-deliv .fu-acts .btn { display: inline-flex; flex: 1; justify-content: center; } }
.dp-wait { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4; color: #115e59; font-size: .88rem; } .dp-wait span { display: flex; flex-direction: column; } .dp-wait strong { color: #0f766e; }
.dk-resched { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: #f0fdfa; border: 1.5px solid #5eead4; color: #115e59; } .dk-resched span { display: flex; flex-direction: column; } .dk-resched strong { color: #0f766e; }

/* Products locked for agents, change requests (v1.20.0) */
.dk-locked { display: flex; gap: .35rem; align-items: center; margin: 0; padding: .45rem 1.2rem; font-size: .8rem; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--border); }
.dk-products input[readonly] { background: #f8fafc; color: var(--navy); border-color: transparent; cursor: default; pointer-events: none; }
.dk-qty.is-locked { border: 0; background: transparent; justify-content: center; }
.dk-qty.is-locked input { width: 56px; text-align: center; font-weight: 700; }
.dk-req-btn { border-color: #c7d2fe; color: var(--primary); font-weight: 700; }
.dk-reqbox { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: #eef2ff; border: 1.5px solid #a5b4fc; color: #3730a3; }
.dk-reqbox span { display: flex; flex-direction: column; } .dk-reqbox strong { color: #312e81; }
.cr-banner { padding: .9rem 1rem; margin-bottom: 1rem; border: 1.5px solid #a5b4fc; background: #eef2ff; }
.cr-top { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.cr-top > div { flex: 1; display: flex; flex-direction: column; min-width: 200px; } .cr-top strong { color: #312e81; } .cr-top span { color: #3730a3; }
.cr-icon { width: 42px; height: 42px; border-radius: 12px; background: #4f46e5; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cr-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .7rem; }
.cr-form input[type=text] { flex: 1; min-width: 220px; }
.cr-help { display: flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); margin: 0 0 1rem; }
.cr-list { display: grid; gap: .75rem; }
.cr-item { padding: .9rem 1rem; margin: 0; }
.cr-item.is-open { border-left: 4px solid #6366f1; }
.cr-item-top { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.cr-msg { margin: .5rem 0 .3rem; font-size: 1.02rem; font-weight: 600; color: var(--navy); }
.cr-now { font-size: .85rem; color: var(--muted); } .cr-now span { font-weight: 600; }
.cr-done { margin-top: .5rem; font-size: .88rem; }

/* Dashboard work cards with icons (v1.20.1) */
.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.todo-card { --c: #64748b; --bg: #f1f5f9; display: flex; align-items: center; gap: .85rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .85rem 1rem; color: inherit; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s; position: relative; overflow: hidden; }
.todo-card:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(6,18,57,.08); border-color: var(--c); }
.todo-card.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.todo-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--bg); color: var(--c); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.todo-text { display: flex; flex-direction: column; min-width: 0; }
.todo-label { font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-value { font-size: 1.55rem; line-height: 1.15; color: var(--c); }
.todo-sub { font-size: .76rem; font-weight: 600; color: var(--c); opacity: .85; }
.todo-card.is-clear { box-shadow: none; }
.todo-card.is-clear .todo-icon { opacity: .75; }
.todo-card.is-clear .todo-value { color: #94a3b8; }
.todo-card.is-clear .todo-sub { color: #16a34a; opacity: 1; }
.todo-card.tone-orange { --c: #ea580c; --bg: #fff1e6; } .todo-card.tone-blue { --c: #2563eb; --bg: #e6ecfe; } .todo-card.tone-indigo { --c: #4f46e5; --bg: #eef2ff; }
.todo-card.tone-violet { --c: #7c3aed; --bg: #f3e8ff; } .todo-card.tone-green { --c: #15803d; --bg: #dcfce7; } .todo-card.tone-red { --c: #dc2626; --bg: #fee2e2; }
.todo-card.tone-purple { --c: #9333ea; --bg: #f3e8ff; } .todo-card.tone-teal { --c: #0d9488; --bg: #ccfbf1; } .todo-card.tone-navy { --c: #061239; --bg: #e8ebf3; }
@media (max-width: 1100px) { .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .todo-grid { grid-template-columns: 1fr 1fr; gap: .5rem; } .todo-card { padding: .7rem; gap: .55rem; flex-direction: column; align-items: flex-start; } .todo-icon { width: 36px; height: 36px; } .todo-label { white-space: normal; font-size: .68rem; } .todo-value { font-size: 1.25rem; } }
/* a table inside a grid card scrolls inside the card instead of widening the page (phones) */
.grid > *, .stats-2 > *, .stats-3 > *, .card { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .acc-tabs { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; -webkit-overflow-scrolling: touch; } .acc-tabs > * { flex-shrink: 0; } }

/* Super Admin: dashboard per seller (v1.21.0) */
.seller-filter.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sel-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; margin-bottom: 1rem; flex-wrap: wrap; border: 1.5px solid #c7d2fe; background: linear-gradient(90deg, #eef2ff, #fff 60%); }
.sel-avatar { width: 54px; height: 54px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sel-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
.sel-main small { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.sel-main h3 { margin: .1rem 0; color: var(--navy); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.sel-facts { display: flex; gap: 1.2rem; }
.sel-facts div { display: flex; flex-direction: column; align-items: center; } .sel-facts strong { font-size: 1.3rem; color: var(--navy); } .sel-facts small { color: var(--muted); font-size: .74rem; }
.sel-links { display: flex; gap: .35rem; flex-wrap: wrap; }
@media (max-width: 640px) { .sel-facts { width: 100%; justify-content: space-around; } .sel-links { width: 100%; } .sel-links .btn:not(.btn-icon) { flex: 1; justify-content: center; } }
/* v1.22 payouts */
.po-kpis { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.ch-kpi.k-warn { background: #fffbeb; border-color: #fde68a; } .ch-kpi.k-warn strong { color: #b45309; }
.po-rate { display: flex; flex-direction: column; gap: .1rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: .75rem 1rem; text-decoration: none; color: inherit; min-width: 180px; }
.po-rate small { color: var(--muted); font-weight: 600; font-size: .76rem; } .po-rate strong { color: var(--navy); } .po-rate em { font-style: normal; font-size: .76rem; color: var(--primary); }
.po-rate:hover { border-color: var(--primary); }
.po-step { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; font-weight: 700; margin-right: .2rem; }
.po-end { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; } .po-end label { margin: 0; font-size: .82rem; color: var(--muted); font-weight: 600; } .po-end input { width: auto; }
.po-table td { vertical-align: middle; }
.po-chk { width: 34px; } .po-chk input { width: 18px; height: 18px; }
.po-off { opacity: .6; }
.po-who { display: flex; gap: .55rem; align-items: center; } .po-who > span:last-child { display: flex; flex-direction: column; min-width: 0; } .po-who small { color: var(--muted); font-size: .76rem; }
.po-wallet { display: inline-flex; align-items: center; gap: .25rem; color: #15803d; font-size: .8rem; font-weight: 600; white-space: nowrap; } .po-wallet .mono { color: var(--muted); font-weight: 500; }
.po-nowallet { display: inline-flex; align-items: center; gap: .25rem; color: var(--danger); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.po-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.po-foot-txt { display: flex; gap: .35rem; align-items: center; color: var(--muted); font-size: .8rem; flex: 1; min-width: 220px; }
.po-count { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 .45rem; font-size: .8rem; }
.po-xaf { display: block; color: var(--muted); font-size: .8rem; }
a.po-card { text-decoration: none; color: inherit; } a.po-card:hover { border-color: var(--primary); }
.po-addr { display: flex; align-items: center; gap: .45rem; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .55rem; min-width: 0; }
.po-addr code { flex: 1; min-width: 0; font-size: .78rem; word-break: break-all; background: none; padding: 0; }
.po-net { display: inline-block; padding: .1rem .45rem; border-radius: 6px; background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 700; flex-shrink: 0; }
.po-warn { display: block; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: .5rem .65rem; font-size: .8rem; margin-top: .45rem; }
.po-warn code { word-break: break-all; }
.po-warn.is-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; margin-top: 0; }
.po-hist-filters { display: flex; flex-direction: column; gap: .6rem; padding-bottom: .4rem; }
.po-hero { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding: 1.1rem 1.3rem; flex-wrap: wrap; border-left: 5px solid #f59e0b; }
.po-hero.is-paid { border-left-color: var(--success); } .po-hero.is-cancelled { border-left-color: #94a3b8; }
.po-hero-main { display: flex; flex-direction: column; } .po-hero-main small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .74rem; letter-spacing: .04em; }
.po-hero-main strong { font-size: 2rem; color: var(--navy); line-height: 1.15; } .po-hero.is-paid .po-hero-main strong { color: #15803d; }
.po-hero-main em { font-style: normal; color: var(--muted); font-size: .85rem; }
.po-hero-facts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; } .po-hero-facts span { display: flex; flex-direction: column; font-weight: 600; font-size: .88rem; color: var(--navy); }
.po-hero-facts em { font-style: normal; color: var(--muted); font-weight: 500; font-size: .74rem; }
.po-calc { padding: .4rem 1rem .8rem; }
.po-line { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.po-line span small { color: var(--muted); margin-left: .3rem; } .po-line strong { white-space: nowrap; }
.po-line.is-minus strong { color: #475569; } .po-line.is-plus strong { color: #15803d; }
.po-line.is-total { border-bottom: 0; border-top: 2px solid var(--navy); font-size: 1rem; margin-top: .2rem; } .po-line.is-total strong { color: var(--navy); font-size: 1.1rem; }
.po-line.is-usdt { border: 0; background: var(--primary-soft); border-radius: 10px; padding: .6rem .75rem; } .po-line.is-usdt strong { color: var(--primary); font-size: 1.15rem; }
.po-proof { margin-top: .8rem; display: flex; flex-direction: column; gap: .35rem; } .po-proof small { color: var(--muted); font-weight: 600; font-size: .76rem; }
.po-proof code { word-break: break-all; font-size: .78rem; }
.po-side-acts { display: flex; flex-direction: column; gap: .5rem; }
.pp-send { text-align: center; background: linear-gradient(135deg, #061239, #0b2a8a); color: #fff; border-radius: 14px; padding: .9rem; margin-bottom: .8rem; }
.pp-send small { color: #c5cde8; font-weight: 600; } .pp-send em { font-style: normal; color: #c5cde8; font-size: .82rem; }
.pp-amount { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .2rem 0; }
.pp-amount strong { font-size: 1.8rem; } .pp-amount .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.pp-addr { margin-bottom: .9rem; } .pp-addr > small { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 600; font-size: .8rem; margin-bottom: .3rem; }
.pp-addr-row { display: flex; align-items: center; gap: .45rem; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .6rem; }
.pp-addr-row code { flex: 1; min-width: 0; word-break: break-all; font-size: .82rem; background: none; padding: 0; }
.pp-tip { display: block; color: #b45309; font-size: .76rem; margin-top: .35rem; }
.pp-check { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; margin: .2rem 0 0; } .pp-check input { width: 18px; height: 18px; }
@media (max-width: 900px) { .po-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .po-foot .btn { width: 100%; justify-content: center; } .po-rate { width: 100%; } .ch-head-actions { width: 100%; } }
/* v1.23 create payouts popup */
.cm-box { max-width: 680px; }
.cm-date { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cm-date label { margin: 0; font-weight: 600; font-size: .85rem; color: var(--muted); } .cm-date input { width: auto; }
.cm-list { display: flex; flex-direction: column; gap: .45rem; max-height: 52vh; overflow-y: auto; }
.cm-loading { padding: 1.2rem; text-align: center; color: var(--muted); }
.cm-empty { padding: 1rem; }
.cm-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: .65rem; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; padding: .6rem .75rem; margin: 0; cursor: pointer; }
.cm-row input { width: 18px; height: 18px; margin: 0; }
.cm-row:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.cm-row.is-off { cursor: default; opacity: .65; }
.cm-who { display: flex; flex-direction: column; min-width: 0; } .cm-who strong { color: var(--navy); } .cm-who small { color: var(--muted); font-size: .76rem; }
.cm-amt { display: flex; flex-direction: column; text-align: right; } .cm-amt small { color: var(--muted); font-size: .74rem; } .cm-amt strong { white-space: nowrap; }
.cm-foot { align-items: center; flex-wrap: wrap; }
.cm-all { display: flex; align-items: center; gap: .35rem; margin: 0 auto 0 0; font-weight: 600; font-size: .88rem; cursor: pointer; } .cm-all input { width: 17px; height: 17px; }
.cm-total { font-size: .88rem; color: var(--muted); }
.cm-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 1.6rem 1.2rem; }
.cm-done .ch-done-icon { width: 58px; height: 58px; } .cm-done strong { font-size: 1.15rem; color: var(--navy); } .cm-done span { color: var(--muted); max-width: 420px; }
@media (max-width: 560px) { .cm-row { grid-template-columns: 22px minmax(0, 1fr) auto; } .cm-wal { grid-column: 2 / -1; grid-row: 2; } .cm-total { width: 100%; order: -1; } }
/* v1.24 orders side panel (desktop) */
.peek { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; background: #fff; border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgba(15, 23, 42, .12); z-index: 60; display: flex; flex-direction: column; animation: peek-in .18s ease-out; }
.peek[hidden] { display: none; }
@keyframes peek-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.peek-inner { flex: 1; overflow-y: auto; padding: 1rem 1.1rem 1.5rem; transition: opacity .12s; }
.peek-inner.is-loading { opacity: .45; pointer-events: none; }
@media (min-width: 1100px) { body.peek-open .main { margin-right: 440px; } }
tr.row-link.is-peek > td { background: var(--primary-soft) !important; }
tr.row-link.is-peek > td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.pk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .7rem; }
.pk-title { display: flex; flex-direction: column; gap: .3rem; min-width: 0; } .pk-title > strong { font-size: 1.2rem; color: var(--navy); }
.pk-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.pk-nav { display: flex; gap: .3rem; flex-shrink: 0; } .pk-nav .btn { font-size: 1rem; min-width: 32px; justify-content: center; }
.pk-open { justify-content: center; margin-bottom: .9rem; }
.pk-amount { background: linear-gradient(135deg, #061239, #0b2a8a); color: #fff; border-radius: 14px; padding: .8rem 1rem; display: flex; flex-direction: column; margin-bottom: .9rem; }
.pk-amount small { color: #c5cde8; font-weight: 600; font-size: .76rem; } .pk-amount strong { font-size: 1.6rem; line-height: 1.2; } .pk-amount em { font-style: normal; color: #c5cde8; font-size: .8rem; }
.pk-sec { border-top: 1px solid var(--border); padding: .8rem 0; }
.pk-sec h4 { display: flex; align-items: center; gap: .35rem; margin: 0 0 .55rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pk-cust { display: flex; flex-direction: column; gap: .3rem; } .pk-cust > strong { color: var(--navy); font-size: 1.02rem; }
.pk-phone { display: flex; align-items: center; gap: .3rem; } .pk-phone span { font-weight: 600; margin-right: .2rem; }
.pk-wa { color: #16a34a; }
.pk-addr { display: flex; align-items: center; gap: .3rem; font-size: .88rem; }
.pk-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: .4rem .55rem; font-size: .84rem; color: #92400e; }
.pk-item { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.pk-item img, .pk-noimg { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: #f1f5f9; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.pk-iname { flex: 1; display: flex; flex-direction: column; min-width: 0; } .pk-iname small { color: var(--muted); font-size: .78rem; }
.pk-item > strong { white-space: nowrap; font-size: .9rem; }
.pk-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: 0; font-size: .86rem; }
.pk-dl dt { color: var(--muted); } .pk-dl dd { margin: 0; font-weight: 600; text-align: right; }
.pk-form { display: flex; flex-direction: column; gap: .45rem; }
.pk-noteform { display: flex; gap: .4rem; margin-bottom: .6rem; } .pk-noteform input { flex: 1; min-width: 0; }
.pk-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.pk-events li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .84rem; padding-bottom: .45rem; border-bottom: 1px dashed var(--border); }
.pk-events li small { width: 100%; color: var(--muted); font-size: .74rem; }
/* v1.25 offer price + product link */
.offer-badge { display: inline-block; padding: .08rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #dcfce7; color: #15803d; white-space: nowrap; vertical-align: middle; }
.offer-badge.is-extra { background: #fef3c7; color: #b45309; }
.offer-row td { color: var(--muted); font-weight: 500 !important; }
.offer-mini { margin-top: .2rem; display: flex; gap: .4rem; align-items: center; }
.offer-note { display: flex; gap: .55rem; align-items: flex-start; margin: .2rem 1rem .6rem; padding: .6rem .75rem; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.offer-note span { display: flex; flex-direction: column; } .offer-note small { color: #15803d; }
.offer-note.is-extra { background: #fffbeb; border-color: #fde68a; color: #92400e; } .offer-note.is-extra small { color: #92400e; }
.offer-live { margin: .35rem 0 .2rem; font-size: .82rem; color: #15803d; background: #f0fdf4; border-radius: 8px; padding: .35rem .55rem; }
.offer-live.is-extra { color: #b45309; background: #fffbeb; }
.pk-offer { display: flex; gap: .4rem; align-items: center; margin-top: .2rem; font-size: .82rem; color: #c5cde8; }
.dk-plink { display: inline-flex; align-items: center; gap: .2rem; font-size: .76rem; font-weight: 600; color: var(--primary); text-decoration: none; padding: .05rem .4rem; border-radius: 6px; background: var(--primary-soft); vertical-align: middle; }
.dk-plink:hover { background: var(--primary); color: #fff; }
.small { font-size: .78rem; }
/* v1.26 call desk "no order" popup */
dialog.modal#empty-modal { max-width: 460px; }
.em-box { align-items: center; text-align: center; padding: 1.6rem 1.4rem 1.3rem; position: relative; }
.em-x { position: absolute; top: .8rem; right: .8rem; }
.em-icon { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .6rem; }
.em-box h3 { margin: 0 0 .3rem; color: var(--navy); font-size: 1.25rem; }
.em-list { align-self: stretch; text-align: left; display: flex; flex-direction: column; gap: .45rem; margin: 1rem 0 .8rem; }
.em-list > small { color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.em-row { display: flex; gap: .6rem; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: .55rem .7rem; }
.em-row > span:last-child { display: flex; flex-direction: column; } .em-row small { color: var(--muted); font-size: .78rem; }
.em-ri { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.em-red .em-ri { background: #fee2e2; color: #dc2626; } .em-amber .em-ri { background: #fef3c7; color: #b45309; } .em-purple .em-ri { background: #ede9fe; color: #7c3aed; }
.em-blue .em-ri { background: #dbeafe; color: #2563eb; } .em-teal .em-ri { background: #ccfbf1; color: #0f766e; }
.em-live { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); margin: .3rem 0 1rem; }
.em-live .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: em-blink 1.6s infinite; }
@keyframes em-blink { 50% { opacity: .3; } }
.em-new { display: flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: .5rem; margin: .3rem 0 1rem; }
.em-acts { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; } .em-acts form { margin: 0; }
.btn.pulse { animation: em-pulse 1.2s infinite; } @keyframes em-pulse { 50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, .25); } }
.em-live, .em-new { align-self: stretch; justify-content: center; }
.em-live { display: flex; }
/* v1.27 new order page: simple layout */
.of-form:not(.modal-box) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; max-width: 1180px; }
.order-form-modal .modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.of-main, .of-side { min-width: 0; }
.of-card { padding: 1rem 1.1rem; }
.of-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.of-head h3 { margin: 0; font-size: 1.02rem; color: var(--navy); } .of-head small { font-size: .8rem; }
.of-head > div:not(.search-box) { flex: 1; min-width: 0; }
.of-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem .9rem; }
.of-grid .field { margin-bottom: .7rem; }
.of-more { border-top: 1px dashed var(--border); padding-top: .6rem; }
.of-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .3rem; font-size: .86rem; font-weight: 600; color: var(--primary); }
.of-more > summary::-webkit-details-marker { display: none; }
.of-more[open] > summary { margin-bottom: .7rem; }
.of-seller label { display: flex; align-items: center; gap: .35rem; }
.of-search { max-width: 220px; margin-left: auto; }
.of-list { display: flex; flex-direction: column; gap: .5rem; }
.of-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .65rem; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .12s, background .12s; }
.of-row[hidden] { display: none; }
.of-row.is-on { border-color: var(--primary); background: var(--primary-soft); }
.of-row.is-out { opacity: .55; }
.of-img { width: 48px; height: 48px; flex-shrink: 0; }
.of-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.of-info strong { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-meta { font-size: .8rem; color: var(--muted); }
.of-price { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #fff; }
.of-price input { width: 92px; border: 0; padding: .35rem .5rem; text-align: right; } .of-price span { font-size: .72rem; color: var(--muted); padding: 0 .45rem; background: #f8fafc; align-self: stretch; display: flex; align-items: center; }
.of-nomatch { margin: .6rem 0 0; }
.of-summary { position: sticky; top: 74px; padding: 1rem 1.1rem; }
.of-sum-body .summary-lines { min-height: 1.4rem; }
.of-total { margin-top: .8rem; } .of-total label { font-weight: 700; }
.of-total-in input { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.of-total small { display: block; margin-top: .3rem; font-size: .76rem; }
.order-form-modal .of-summary { position: static; }
.order-form-modal .of-card { box-shadow: none; }
@media (max-width: 980px) { .of-form:not(.modal-box), .order-form-modal .modal-body { grid-template-columns: 1fr; } .of-summary { position: static; } }
@media (max-width: 560px) { .of-grid { grid-template-columns: 1fr; } .of-card, .of-summary { padding: .9rem; } .of-head { flex-wrap: wrap; } .of-search { max-width: none; flex-basis: 100%; margin: .2rem 0 0; } .of-row { gap: .55rem; padding: .5rem; } .of-img { width: 42px; height: 42px; } .of-row .stepper button { width: 34px; height: 34px; } .of-row .stepper span { min-width: 26px; } .of-row:has(.of-price) { flex-wrap: wrap; } .of-row:has(.of-price) .of-info { flex-basis: calc(100% - 56px); } .of-row:has(.of-price) .of-price { margin-left: 50px; } .of-row:has(.of-price) .stepper { margin-left: auto; } }
/* v1.28 settings */
.set-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.2rem; align-items: start; max-width: 1180px; padding-bottom: 5rem; }
.set-nav { position: sticky; top: 74px; padding: .5rem; display: flex; flex-direction: column; gap: .15rem; margin: 0; }
.set-link { display: flex; gap: .65rem; align-items: center; padding: .6rem .65rem; border-radius: 10px; text-decoration: none; color: inherit; }
.set-link:hover { background: #f1f5f9; }
.set-link span:last-child { display: flex; flex-direction: column; min-width: 0; } .set-link strong { color: var(--navy); font-size: .92rem; } .set-link small { color: var(--muted); font-size: .74rem; }
.set-ic { width: 34px; height: 34px; border-radius: 10px; background: #f1f5f9; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.set-link.active { background: var(--primary-soft); } .set-link.active .set-ic { background: var(--primary); color: #fff; } .set-link.active strong { color: var(--primary); }
.set-panel[hidden] { display: none; }
.set-title { margin: .2rem 0 1rem; } .set-title h2 { margin: 0; color: var(--navy); font-size: 1.35rem; } .set-title p { margin: .2rem 0 0; }
.set-card { padding: 1.1rem 1.2rem; }
.set-card > h3 { margin: 0 0 .9rem; font-size: 1rem; color: var(--navy); display: flex; align-items: center; gap: .5rem; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1rem; }
.set-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.set-grid .full { grid-column: 1 / -1; }
.set-sub { margin: 1rem 0 .4rem; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.set-copy { display: flex; align-items: center; gap: .4rem; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .4rem .5rem; margin-bottom: .4rem; min-width: 0; }
.set-copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; padding: 0; font-size: .8rem; }
.set-preview { background: #f8fafc; border: 1px dashed var(--border); border-radius: 12px; padding: .7rem .8rem; margin: .4rem 0 .6rem; }
.set-preview .fee-note { margin-top: .3rem; display: flex; flex-direction: column; }
.set-rate { display: flex; flex-direction: column; justify-content: center; background: var(--primary-soft); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .9rem; } .set-rate strong { color: var(--primary); font-size: 1.15rem; }
.set-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.set-choice { margin: 0; cursor: pointer; }
.set-choice input { position: absolute; opacity: 0; pointer-events: none; }
.set-choice span { display: flex; flex-direction: column; gap: .15rem; height: 100%; border: 1.5px solid var(--border); border-radius: 12px; padding: .7rem .8rem; }
.set-choice small { color: var(--muted); font-size: .78rem; }
.set-choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); } .set-choice input:checked + span strong { color: var(--primary); }
.set-choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.set-brand { display: flex; gap: 1.1rem; align-items: center; }
.br-preview { width: 220px; height: 96px; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: .8rem; flex-shrink: 0; border: 1px solid var(--border); }
.br-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.br-preview.is-dark { background: #061239; } .br-preview.is-light { background: #fff; background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%, transparent 75%, #f1f5f9 75%), linear-gradient(45deg, #f1f5f9 25%, transparent 25%, transparent 75%, #f1f5f9 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.br-preview.is-fav { width: 96px; background: #f8fafc; } .br-preview.is-fav img { width: 56px; height: 56px; }
.br-info { flex: 1; min-width: 0; } .br-info h3 { margin: 0 0 .25rem; font-size: 1rem; color: var(--navy); display: flex; gap: .5rem; align-items: center; } .br-info p { margin: 0 0 .6rem; font-size: .84rem; }
.br-acts { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; } .br-acts .btn { cursor: pointer; margin: 0; } .br-name { font-size: .8rem; } .br-reset { margin: 0; font-size: .84rem; }
.br-demo-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
.br-demo-side { background: #061239; border-radius: 12px; padding: .8rem; display: flex; flex-direction: column; gap: .45rem; } .br-demo-side img { height: 26px; object-fit: contain; object-position: left; margin-bottom: .3rem; }
.br-demo-side span { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .15); } .br-demo-side span:nth-child(2) { background: #2563eb; width: 80%; }
.br-demo-tab { align-self: start; display: flex; align-items: center; gap: .5rem; background: #e2e8f0; border-radius: 12px 12px 0 0; padding: .5rem .8rem; font-size: .82rem; font-weight: 600; color: #334155; overflow: hidden; } .br-demo-tab img { width: 18px; height: 18px; } .br-demo-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-demo-paper { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .8rem; display: flex; flex-direction: column; gap: .45rem; } .br-demo-paper img { height: 24px; object-fit: contain; object-position: left; margin-bottom: .3rem; }
.br-demo-paper span { height: 8px; border-radius: 4px; background: #e2e8f0; } .br-demo-paper span:last-child { width: 60%; }
.set-bar { position: fixed; left: 240px; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: .7rem 1.5rem; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--border); }
.set-bar-txt { color: var(--muted); font-size: .86rem; } .set-bar.is-dirty { background: #fffbeb; border-top-color: #fde68a; } .set-bar.is-dirty .set-bar-txt { color: #92400e; font-weight: 600; }
@media (max-width: 1000px) { .set-wrap { grid-template-columns: 1fr; } .set-nav { position: static; flex-direction: row; overflow-x: auto; } .set-link { flex-shrink: 0; } .set-link small { display: none; } .set-bar { left: 0; } }
@media (max-width: 640px) { .set-grid, .set-grid-3, .set-choices, .br-demo-row { grid-template-columns: 1fr; } .set-brand { flex-direction: column; align-items: stretch; } .br-preview { width: 100%; } .br-preview.is-fav { width: 96px; } .set-bar { padding: .6rem 1rem; } .set-bar-txt { display: none; } .set-bar .btn { flex: 1; justify-content: center; } }
.set-link, .set-link:hover, .set-link:focus { text-decoration: none; }
.set-preview .fee-note { display: block; } .set-preview .fee-note small { display: block; margin-top: .15rem; }
/* v1.28.3 manager: fewer cards */
.pr-kpis.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1251px) { .stk-cards.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 960px) { .pr-kpis.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* v1.29 automatic weekly payouts */
.set-auto { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .6rem 0; font-size: .84rem; font-weight: 600; color: var(--navy); } .set-auto span { display: inline-flex; align-items: center; gap: .3rem; }
.po-auto { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--muted); background: #f1f5f9; border-radius: 999px; padding: .3rem .7rem; text-decoration: none; }
.po-auto.is-on { background: #dcfce7; color: #15803d; }
input.is-locked { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
