/* ==========================================================================
   Aptaim admin skin. Loaded after the SB Admin 2 stylesheet and restyles it;
   the colours match the storefront (public/aptaim/css/app.css).
   ========================================================================== */

:root {
  --brand: #0b7a6b;
  --brand-dark: #075e53;
  --brand-soft: #e7f5f2;
  --accent: #f4511e;
  --accent-dark: #d63f0f;
  --ink: #101418;
  --ink-2: #3b4350;
  --muted: #6b7482;
  --line: #e6e8ec;
  --surface: #f5f6f8;
  --danger: #d92d20;
  --ok: #1f8a3b;
  --warn: #b7791f;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--surface); font-size: 14.5px; -webkit-font-smoothing: antialiased; }
#wrapper #content-wrapper { background: var(--surface); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); font-weight: 800; letter-spacing: -.2px; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.text-gray-800, .text-gray-900 { color: var(--ink) !important; }
.text-gray-600, .text-gray-500, .text-gray-400 { color: var(--muted) !important; }
.text-primary { color: var(--brand) !important; }
.text-success { color: var(--ok) !important; }
.text-danger { color: var(--danger) !important; }
.container-fluid { padding-left: 26px; padding-right: 26px; }

/* ---------- Sidebar ---------- */
.sidebar.ap-side { background: #fff; border-right: 1px solid var(--line); width: 15.5rem !important; min-height: 100vh; padding-bottom: 20px; }
.ap-side .ap-brand { display: flex; align-items: center; gap: 8px; height: 68px; padding: 0 20px; text-decoration: none; }
.ap-side .ap-brand__word { font-size: 25px; font-weight: 800; letter-spacing: -1px; color: var(--brand); line-height: 1; }
.ap-side .ap-brand__word span { color: var(--accent); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.ap-side .ap-brand__tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--brand-dark); background: var(--brand-soft); padding: 3px 7px; border-radius: 20px; }
.ap-side .ap-group { padding: 16px 20px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); }
.ap-side .nav-item .nav-link { display: flex; align-items: center; gap: 11px; width: auto !important; margin: 1px 10px; padding: 9px 11px !important; border-radius: 10px; color: var(--ink-2) !important; font-weight: 600; font-size: 14px; transition: background .18s, color .18s; text-align: left !important; }
.ap-side .nav-item .nav-link i { width: 18px; text-align: center; font-size: 14px !important; color: var(--muted) !important; margin: 0 !important; transition: color .18s; }
.ap-side .nav-item .nav-link span { font-size: 14px !important; display: inline !important; }
.ap-side .nav-item .nav-link:hover { background: var(--surface); color: var(--ink) !important; }
.ap-side .nav-item.active .nav-link { background: var(--brand-soft); color: var(--brand-dark) !important; }
.ap-side .nav-item.active .nav-link i { color: var(--brand) !important; }
.ap-side .ap-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
/* collapsed (icon-only) sidebar: desktop only; phones and tablets use the drawer below */
@media (min-width: 992px) {
  .sidebar.ap-side.toggled { width: 4.6rem !important; }
  .sidebar.ap-side.toggled .ap-brand__word, .sidebar.ap-side.toggled .ap-brand__tag, .sidebar.ap-side.toggled .ap-group, .sidebar.ap-side.toggled .nav-link span, .sidebar.ap-side.toggled .ap-count { display: none !important; }
  .sidebar.ap-side.toggled .ap-brand::before { content: "a"; font-size: 26px; font-weight: 800; color: var(--brand); }
  .sidebar.ap-side.toggled .nav-item .nav-link { justify-content: center; }
}
/* phones and tablets: the sidebar slides in over the page from the menu button */
.ap-backdrop { display: none; }
@media (max-width: 991px) {
  .sidebar.ap-side, .sidebar.ap-side.toggled { position: fixed; top: 0; left: 0; bottom: 0; z-index: 1050; width: 272px !important; min-height: 0; overflow-y: auto !important; overflow-x: hidden; transform: translateX(-100%); transition: transform .28s var(--ease), box-shadow .28s; display: flex !important; }
  .sidebar.ap-side > * { flex-shrink: 0; }
  body.ap-nav-open .sidebar.ap-side { transform: none; box-shadow: 0 0 48px rgba(16, 20, 24, .22); }
  .ap-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(16, 20, 24, .45); opacity: 0; pointer-events: none; transition: opacity .28s; }
  body.ap-nav-open .ap-backdrop { opacity: 1; pointer-events: auto; }
  body.ap-nav-open { overflow: hidden; }
  .ap-side .ap-close { display: grid !important; }
  .container-fluid { padding-left: 14px; padding-right: 14px; }
}
.ap-side .ap-close { display: none; position: absolute; top: 16px; right: 12px; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 15px; }

/* ---------- Top bar ---------- */
.topbar { height: 68px; border-bottom: 1px solid var(--line); box-shadow: none !important; margin-bottom: 24px !important; padding: 0 22px; }
.topbar #sidebarToggleTop { color: var(--ink-2); width: 40px; height: 40px; display: grid !important; place-items: center; border-radius: 10px !important; }
.topbar #sidebarToggleTop:hover { background: var(--surface); }
.topbar .ap-store { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: border-color .2s, color .2s; }
.topbar .ap-store:hover { border-color: var(--brand); color: var(--brand); }
.topbar .nav-item .nav-link { height: 68px; color: var(--ink-2); }
.topbar .nav-item .nav-link .fa-fw { font-size: 17px; color: var(--ink-2); }
.topbar .nav-item .nav-link .badge-counter { background: var(--accent); top: 16px; right: 2px; border-radius: 10px; font-weight: 700; transform: none; font-size: 10.5px; padding: 2px 5px; }
.topbar .topbar-divider { border-right-color: var(--line); height: 28px; }
.topbar .img-profile { width: 36px; height: 36px; border: 2px solid var(--brand-soft); object-fit: cover; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(16, 20, 24, .12) !important; padding: 8px; font-size: 14px; }
.dropdown-item { border-radius: 9px; padding: 9px 12px; color: var(--ink-2); font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface); color: var(--ink); }
.dropdown-item:active { background: var(--brand-soft); color: var(--brand-dark); }
.dropdown-header { color: var(--muted) !important; background: transparent !important; border: 0 !important; font-size: 11px !important; letter-spacing: 1px; padding: 8px 12px !important; }
.topbar .dropdown-list { border-radius: 14px; overflow: hidden; }
.topbar .dropdown-list .dropdown-item { border: 0; white-space: normal; }
.icon-circle { background: var(--brand) !important; }
.dropdown-divider { border-top-color: var(--line); }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: 16px; box-shadow: none !important; overflow: hidden; }
.card.shadow { box-shadow: 0 1px 2px rgba(16, 20, 24, .04) !important; }
.card-header { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 20px !important; }
.card-header::after { content: ""; display: table; clear: both; }
.card-header h5, .card-header h6, h5.card-header { font-size: 16.5px; font-weight: 800; color: var(--ink) !important; letter-spacing: -.2px; }
h5.card-header { padding: 18px 20px !important; }
.card-body { padding: 20px; }
[class*="border-left-"] { border-left: 1px solid var(--line) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 700; font-size: 14px; transition: transform .15s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn-sm { border-radius: 9px; font-size: 13px; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: none; }
.btn-success { background: var(--accent); border-color: var(--accent); }
.btn-success:hover, .btn-success:focus, .btn-success:not(:disabled):not(.disabled):active { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: none; }
.btn-warning { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-warning:hover, .btn-warning:focus, .btn-warning:not(:disabled):not(.disabled):active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: none; }
.btn-danger { background: #fff; border-color: var(--line); color: var(--danger); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:not(:disabled):not(.disabled):active { background: #fdecea; border-color: var(--danger); color: var(--danger); box-shadow: none; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-secondary:hover { background: var(--surface); border-color: var(--ink-2); color: var(--ink); }
.btn-outline-warning, .btn-outline-danger { border-color: var(--line); color: var(--ink-2); }
.btn-outline-warning:hover, .btn-outline-danger:hover { background: var(--surface); border-color: var(--ink-2); color: var(--ink); }
/* small round row actions (view / edit / delete) */
td .btn-sm[style*="border-radius:50%"], td .btn-sm[style*="border-radius: 50%"] { border-radius: 9px !important; width: 32px !important; height: 32px !important; display: inline-grid; place-items: center; padding: 0; }
td .btn-primary.btn-sm[style*="border-radius"] { background: #fff; border-color: var(--line); color: var(--brand); }
td .btn-primary.btn-sm[style*="border-radius"]:hover { background: var(--brand-soft); border-color: var(--brand); }

/* ---------- Tables ---------- */
.table { color: var(--ink); margin-bottom: 0; }
.table thead th { border: 0 !important; border-bottom: 1px solid var(--line) !important; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 14px; white-space: nowrap; background: #fff; }
.table tfoot { display: none; }
.table td { border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 13px 14px; vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbfc; }
.table tbody tr:last-child td { border-bottom: 0 !important; }
.table-bordered { border: 0; }
.table img.img-fluid, .table td img { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); object-fit: cover; }
.table-responsive { border-radius: 12px; }

/* ---------- Badges ---------- */
.badge { border-radius: 20px; padding: 5px 10px; font-weight: 700; font-size: 11.5px; text-transform: capitalize; letter-spacing: .1px; }
.badge-success { background: var(--brand-soft); color: var(--brand-dark); }
.badge-primary { background: #eef2ff; color: #3538cd; }
.badge-warning { background: #fff6e5; color: #8a5a00; }
.badge-danger { background: #fdecea; color: var(--danger); }
.badge-info, .badge-secondary { background: var(--surface); color: var(--ink-2); }
.badge-counter.badge-danger { background: var(--accent); color: #fff; }

/* ---------- Forms ---------- */
.form-control, .custom-select { border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 14.5px; height: calc(1.5em + 1rem + 2px); transition: border-color .2s, box-shadow .2s; }
textarea.form-control { height: auto; }
.form-control:focus, .custom-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
/* A shopper's saved addresses on their admin page */
.ap-addr { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ap-addr:first-child { padding-top: 0; }
.ap-addr > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.ap-addr__actions { display: flex; gap: 4px; flex: none; }
.ap-addr__actions .btn { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; }
/* Password field with its show/hide button (added by password.js) */
.pw { position: relative; display: block; }
.pw .form-control { padding-right: 46px; }
.pw .form-control.is-invalid { padding-right: 76px; background-position: right 46px center; }
.pw .form-control::-ms-reveal, .pw .form-control::-ms-clear { display: none; }
.pw:has(> .is-invalid) ~ .invalid-feedback { display: block; }
.pw__btn { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; display: grid; place-items: center; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.pw__btn:hover { color: var(--ink); background: var(--surface); }
.pw__btn[aria-pressed="true"] { color: var(--brand); }
.pw__btn:focus { outline: 0; }
.pw__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label, .col-form-label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.form-group { margin-bottom: 1.1rem; }
.input-group-btn .btn, .input-group-prepend .btn { border-radius: 10px 0 0 10px; }
.input-group > .form-control:not(:first-child) { border-radius: 0 10px 10px 0; }
.note-editor.note-frame { border: 1px solid var(--line) !important; border-radius: 12px; overflow: hidden; }
.note-toolbar { background: var(--surface) !important; border-bottom: 1px solid var(--line) !important; }
.bootstrap-select > .dropdown-toggle { border: 1px solid var(--line) !important; border-radius: 10px; background: #fff !important; color: var(--ink) !important; font-weight: 500; }

/* ---------- DataTables ---------- */
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { margin-bottom: 14px; color: var(--muted); font-size: 13.5px; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--line); border-radius: 10px; height: 38px; padding: 0 12px; margin: 0 6px; outline: 0; }
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.dataTables_wrapper .dataTables_info { color: var(--muted); font-size: 13.5px; padding-top: 16px; }
.dataTables_wrapper .dataTables_paginate { padding-top: 12px; }
.page-link { border: 1px solid var(--line); color: var(--ink-2); border-radius: 9px !important; margin: 0 3px; font-weight: 600; font-size: 13.5px; }
.page-link:hover { color: var(--brand); border-color: var(--brand); background: #fff; }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-item.disabled .page-link { color: #c3c8d0; border-color: var(--line); }
table.dataTable thead .sorting::before, table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after { opacity: .35; }

/* ---------- Alerts, footer, misc ---------- */
.alert { border: 0; border-radius: 12px; font-weight: 600; font-size: 14px; margin: 0 0 16px; }
.alert-success { background: var(--brand-soft); color: var(--brand-dark); }
.alert-danger { background: #fdecea; color: var(--danger); }
footer.sticky-footer { background: transparent !important; padding: 22px 0; color: var(--muted); font-size: 13px; }
.scroll-to-top { background: var(--brand); border-radius: 12px !important; }
.modal-content { border: 0; border-radius: 18px; }

/* ---------- Dashboard ---------- */
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.ap-head h1 { font-size: 25px; margin: 0; letter-spacing: -.5px; }
.ap-head p { margin: 2px 0 0; color: var(--muted); }
.ap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.ap-stat { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-decoration: none !important; transition: transform .2s var(--ease), box-shadow .2s; }
.ap-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(16, 20, 24, .08); }
.ap-stat__ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 18px; flex: none; }
.ap-stat--accent .ap-stat__ico { background: #fff1ec; color: var(--accent); }
.ap-stat b { display: block; font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.5px; }
.ap-stat small { color: var(--muted); font-size: 13px; font-weight: 500; }
.ap-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.ap-list { margin: 0; padding: 0; list-style: none; }
.ap-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.ap-list li:first-child { border-top: 0; padding-top: 0; }
.ap-list img { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; background: var(--surface); }
.ap-list b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.ap-list small { color: var(--muted); }
.ap-list .badge { margin-left: auto; }
.ap-empty { color: var(--muted); text-align: center; padding: 26px 10px; }
.chart-area { height: 300px; }
.chart-pie { height: 240px; }
@media (max-width: 1100px) { .ap-stats { grid-template-columns: repeat(2, 1fr); } .ap-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ap-stats { grid-template-columns: 1fr; } }

/* ---------- Admin login ---------- */
body.ap-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(150deg, #e7f5f2 0%, #f5f6f8 55%, #fff1ec 100%); }
.ap-login__box { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 34px 32px; box-shadow: 0 20px 50px rgba(16, 20, 24, .08); }
.ap-login__logo { font-size: 30px; font-weight: 800; letter-spacing: -1.2px; color: var(--brand); line-height: 1; }
.ap-login__logo span { color: var(--accent); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.ap-login__box h1 { font-size: 22px; margin: 18px 0 4px; }
.ap-login__box p { color: var(--muted); margin-bottom: 20px; }
.ap-login__box .btn-block { height: 46px; }
.ap-login__box .invalid-feedback { font-weight: 600; }

/* ---------- Page spacing: most admin pages put a card straight into the content area ---------- */
#content > .card, #content > .container, #content > .row { margin: 0 26px 24px; width: auto; max-width: none; }
#content > .card > .row { margin: 0; }
#content > .card > .row > [class*="col-"] { padding: 0; }
#content > .card > .row .alert { margin: 16px 20px 0; }
@media (max-width: 767px) { #content > .card, #content > .container, #content > .row { margin: 0 14px 20px; } }

/* ---------- Order page ---------- */
.ap-order { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ap-kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; margin: 0; font-size: 14px; }
.ap-kv dt { color: var(--muted); font-weight: 500; }
.ap-kv dd { margin: 0; font-weight: 600; }
.ap-totals { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); }
.ap-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.ap-totals .is-total { font-weight: 800; font-size: 16.5px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.ap-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ap-inline .form-control { width: auto; min-width: 170px; }
@media (max-width: 1100px) { .ap-order { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bulk import ---------- */
.imp-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0 0 20px; }
.imp-steps li { counter-increment: step; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 16px 62px; }
.imp-steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; display: grid; place-items: center; }
.imp-steps b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.imp-steps span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 20px; }
.imp-grid > .card, #content .container-fluid > .card { margin-bottom: 20px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: center; transition: border-color .2s, background .2s; margin-bottom: 16px; }
.imp-drop:hover, .imp-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.imp-drop i { font-size: 30px; color: var(--brand); margin-bottom: 6px; }
.imp-drop.is-set { border-style: solid; border-color: var(--brand); background: #fff; }
.imp-drop__title { font-weight: 700; color: var(--ink); font-size: 15px; word-break: break-all; }
.imp-drop__hint { color: var(--muted); font-size: 13px; }
.imp-photos { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.imp-photos b { display: block; font-size: 14.5px; }
.imp-photos small { color: var(--muted); }
.imp-photos__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-options { display: grid; gap: 6px; margin-bottom: 16px; }
.imp-options label { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.imp-options input { width: 17px; height: 17px; accent-color: var(--brand); }
.imp-error { background: #fdecea; color: var(--danger); border-radius: 12px; padding: 11px 14px; font-weight: 600; margin-bottom: 14px; }
.imp-muted { color: var(--muted); font-weight: 500; }
.imp-warn { color: var(--warn); font-weight: 600; }
.imp-guide .card-body { font-size: 13.5px; }
.imp-cols { display: grid; grid-template-columns: 128px 1fr; gap: 8px 12px; margin: 0 0 14px; }
.imp-cols dt { font-weight: 700; color: var(--ink); }
.imp-cols dt .badge { font-size: 10px; padding: 2px 7px; margin-left: 2px; }
.imp-cols dd { margin: 0; color: var(--ink-2); line-height: 1.45; }
.imp-cats summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.imp-cats ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); line-height: 1.6; }
.imp-review__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.imp-review__head h6 small { font-size: 13px; font-weight: 500; }
.imp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-chip { font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 20px; }
.imp-chip--ok { background: var(--brand-soft); color: var(--brand-dark); }
.imp-chip--info { background: #eef2ff; color: #3538cd; }
.imp-chip--err { background: #fdecea; color: var(--danger); }
.imp-chip--warn { background: #fff6e5; color: #8a5a00; }
.imp-chip--muted { background: var(--surface); color: var(--ink-2); }
.imp-note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink); margin-bottom: 10px; font-size: 13.5px; }
.imp-note > i { color: var(--brand); margin-top: 3px; }
.imp-note ul { margin: 4px 0 0; padding-left: 18px; }
.imp-note--muted { background: var(--surface); }
.imp-note--muted > i { color: var(--muted); }
.imp-note--err { background: #fdecea; }
.imp-note--err > i { color: var(--danger); }
.imp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.imp-tabs button { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 20px; padding: 5px 13px; font-weight: 600; font-size: 13px; cursor: pointer; }
.imp-tabs button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.imp-table td { vertical-align: top !important; }
.imp-table tr.is-error { background: #fffafa; }
.imp-thumb { width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain !important; background: #fff !important; display: grid; place-items: center; }
.imp-thumb--none { color: #c3c8d0; background: var(--surface) !important; }
.imp-more { display: block; color: var(--muted); font-size: 11px; text-align: center; }
.imp-meta { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.imp-table s { color: var(--muted); font-size: 12.5px; }
.imp-msgs { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); max-width: 420px; }
.imp-msgs .is-err { color: var(--danger); }
.imp-msgs .is-warn { color: #8a5a00; }
.imp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; position: sticky; bottom: 0; }
.imp-bar .imp-muted { font-size: 13px; max-width: 520px; }
.imp-meter { height: 10px; border-radius: 10px; background: var(--surface); overflow: hidden; margin: 12px 0 8px; }
.imp-meter span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 10px; transition: width .3s var(--ease); }
@media (max-width: 1100px) { .imp-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .imp-steps { grid-template-columns: 1fr; } .imp-cols { grid-template-columns: 1fr; gap: 2px; } .imp-cols dd { margin-bottom: 8px; } }

/* ---------- Drag-and-drop photo box (components/admin/photo-field) ---------- */
.pf { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; transition: border-color .2s, background .2s; }
.pf.is-over { border-color: var(--brand); background: var(--brand-soft); }
.pf__tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.pf.has-photos .pf__tiles { margin-bottom: 12px; }
.pf__tile { position: relative; width: 112px; height: 112px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; cursor: grab; }
.pf[data-wide="1"] .pf__tile { width: 200px; }
.pf[data-multiple="0"] .pf__tile { cursor: default; }
.pf__tile img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.pf__tile.is-uploading img { opacity: .45; }
.pf__progress { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .85); overflow: hidden; }
.pf__progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.pf__main { position: absolute; left: 6px; bottom: 6px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 10px; }
.pf__btn { position: absolute; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 11.5px; cursor: pointer; box-shadow: 0 1px 4px rgba(16, 20, 24, .18); transition: transform .15s; }
.pf__btn:hover { transform: scale(1.08); }
.pf__btn--remove { right: 6px; background: #fff; color: var(--danger); }
.pf__btn--main { right: 38px; background: #fff; color: var(--warn); }
.pf__warn { position: absolute; left: 6px; top: 6px; color: var(--warn); background: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; }
.pf__drop { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 18px 12px; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: center; transition: border-color .2s, background .2s; font-weight: 500; }
.pf__drop:hover, .pf.is-over .pf__drop { border-color: var(--brand); background: var(--brand-soft); }
.pf__drop i { font-size: 24px; color: var(--brand); margin-bottom: 4px; }
.pf__drop b { color: var(--ink); font-size: 14.5px; }
.pf__drop span { color: var(--muted); font-size: 13px; }
.pf__drop u { color: var(--brand); text-decoration: none; font-weight: 700; }
.pf__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pf__drop:focus-within { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.pf__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pf__foot small { color: var(--muted); flex: 1 1 260px; line-height: 1.45; }
.pf__error { margin-top: 10px; background: #fdecea; color: var(--danger); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
@media (max-width: 520px) { .pf__tile { width: calc(50% - 5px); height: auto; aspect-ratio: 1; } .pf[data-wide="1"] .pf__tile { width: 100%; aspect-ratio: 16 / 9; } }

/* ---------- Wallets ---------- */
.wl-credit { color: var(--ok); }
.wl-debit { color: var(--danger); }
.wl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wl-head::after { display: none; }
.wl-search { display: flex; gap: 6px; }
.wl-search .form-control { min-width: 230px; }
.wl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wl-tabs a { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 20px; padding: 5px 13px; font-weight: 600; font-size: 13px; text-decoration: none; }
.wl-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.wl-tabs a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.wl-feed { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.card-header + .wl-feed { border-top: 0; }
.wl-feed__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 13px; }
.wl-feed__ico.is-credit { background: var(--brand-soft); color: var(--ok); }
.wl-feed__ico.is-debit { background: #fdecea; color: var(--danger); }
.wl-feed__main { flex: 1; min-width: 0; }
.wl-feed__main b { display: block; font-size: 14px; }
.wl-feed__main small { color: var(--muted); }
.wl-feed > b { white-space: nowrap; }
.wl-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface); border-radius: 12px; margin-bottom: 6px; }
.wl-toggle label { position: relative; margin: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.wl-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.wl-toggle label.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16, 20, 24, .1); }
.wl-toggle label:focus-within { outline: 2px solid var(--brand); }
.wl-table td { vertical-align: top !important; }
.ap-refund { margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); font-size: 13.5px; }
.ap-inline > .ap-refund { flex: 1 1 100%; margin-top: 0; }
.ap-refund[hidden] { display: none; }
.ap-refund label { display: flex; gap: 9px; align-items: flex-start; margin: 0; font-weight: 600; cursor: pointer; }
.ap-refund input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }
.ap-refund small { display: block; color: var(--muted); font-weight: 500; }
@media (max-width: 575px) { .wl-search, .wl-search .form-control { width: 100%; min-width: 0; } }

/* ---------- Phones and tablets (up to 991px) ---------- */
@media (max-width: 991px) {
  /* top bar */
  .topbar { height: 60px; padding: 0 10px; margin-bottom: 16px !important; }
  .topbar #sidebarToggleTop { margin-right: 6px !important; }
  .topbar .nav-item .nav-link { height: 60px; padding: 0 9px; }
  .topbar .nav-item.mx-1 { margin: 0 !important; }
  .topbar .topbar-divider { display: none !important; }

  /* card headers: title on its own line, buttons wrap underneath */
  .card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .card-header::after { display: none; }
  .card-header > h5, .card-header > h6 { flex: 1 1 100%; margin: 0 !important; }
  .card-header .float-left, .card-header .float-right { float: none !important; margin: 0 !important; }
  .ap-head h1 { font-size: 22px; }

  /* lists: each table row becomes a labelled card (labels come from admin.js) */
  table.ap-stack, table.ap-stack tbody { display: block; width: 100% !important; min-width: 0 !important; }
  table.ap-stack thead, table.ap-stack tfoot { display: none; }
  table.ap-stack tr { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-bottom: 12px; background: #fff; }
  table.ap-stack tbody tr:hover { background: #fff; }
  table.ap-stack tbody tr:last-child td { border-bottom: 0 !important; }
  table.ap-stack td { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100% !important; min-height: 34px; padding: 5px 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important; text-align: right; overflow-wrap: anywhere; font-size: 14px; box-sizing: border-box !important; }
  table.ap-stack td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
  table.ap-stack td[data-label=""]::before { display: none; }
  table.ap-stack td.ap-cell-primary { order: -1; display: block; border-top: 0 !important; text-align: left; font-size: 15px; font-weight: 700; padding-top: 10px !important; }
  table.ap-stack td.ap-cell-primary::before { display: none; }
  table.ap-stack td.ap-cell-primary + td, table.ap-stack tr > td:first-child { border-top: 0 !important; }
  table.ap-stack td.ap-cell-minor, table.ap-stack td.ap-cell-empty { display: none; }
  table.ap-stack td.ap-cell-actions { justify-content: flex-end; flex-wrap: wrap; }
  table.ap-stack td.ap-cell-actions::before { display: none; }
  table.ap-stack td.ap-cell-actions > *, table.ap-stack td.ap-cell-actions form { float: none !important; display: inline-flex; margin: 0 0 0 6px !important; }
  table.ap-stack td img { max-width: 64px !important; max-height: 64px; }
  /* the row's photo sits top-right, beside the name */
  table.ap-stack td.ap-cell-media { position: absolute; top: 10px; right: 14px; width: auto !important; min-height: 0; padding: 0 !important; border: 0 !important; }
  table.ap-stack td.ap-cell-media::before { display: none; }
  table.ap-stack td.ap-cell-media img { width: 56px !important; height: 56px !important; object-fit: contain; }
  table.ap-stack tr.ap-has-media td.ap-cell-primary { padding-right: 70px !important; min-height: 72px; }
  table.ap-stack td[colspan] { justify-content: center; text-align: center; }
  table.ap-stack td[colspan]::before { display: none; }
  .table-responsive { overflow: visible; }
  .zoom:hover { transform: none !important; }

  /* DataTables search and page size */
  .dataTables_wrapper .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { text-align: left !important; }
  .dataTables_wrapper .dataTables_filter label { display: block; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { display: block !important; width: 100% !important; margin: 6px 0 0 !important; }
  .dataTables_wrapper .dataTables_info { padding-top: 4px; }

  /* forms */
  .ap-inline .form-control { width: 100%; min-width: 0; }
  .card-body { padding: 16px; }
  .note-editor .note-toolbar { padding: 4px; }
}
@media (max-width: 575px) {
  .ap-head > .ap-inline, .ap-head > .btn { width: 100%; }
  .ap-head > .ap-inline .btn { flex: 1 1 auto; }
  .topbar .ap-store { width: 40px; padding: 0; justify-content: center; }
  .topbar .ap-store__text { display: none; }
  .topbar .dropdown-list { width: calc(100vw - 20px) !important; }
}

/* ---------- Member network ---------- */
.nw-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nw-filters .form-control { width: auto; min-width: 140px; height: 36px; font-size: 13.5px; }
.nw-filters input[type="search"], .nw-filters input[name="q"] { min-width: 220px; }
.nw-status { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; background: #fff6e5; color: var(--warn); }
.nw-status--active, .nw-status--verified, .nw-status--paid, .nw-status--credited, .nw-status--done, .nw-status--delivered { background: var(--brand-soft); color: var(--brand-dark); }
.nw-status--blocked, .nw-status--rejected, .nw-status--reversed, .nw-status--failed, .nw-status--cancelled { background: #fdecea; color: var(--danger); }
.nw-status--none, .nw-status--lapsed { background: var(--surface); color: var(--muted); }
.nw-status--held { background: #e8f1fd; color: #1d5fbf; }
.nw-code { font-weight: 800; letter-spacing: .3px; }
.nw-sub { display: block; color: var(--muted); font-size: 12.5px; }
.nw-money { font-weight: 700; white-space: nowrap; }
.nw-legs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nw-leg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; position: relative; text-decoration: none !important; color: var(--ink); display: block; min-height: 72px; }
a.nw-leg:hover { border-color: var(--brand); }
.nw-leg b { display: block; font-size: 13.5px; padding-right: 24px; }
.nw-leg__l { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.nw-leg--empty { border-style: dashed; background: var(--surface); color: var(--muted); }
.nw-section { padding: 18px 20px; border-top: 1px solid var(--line); }
.nw-section:first-child { border-top: 0; }
.nw-section h6 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.nw-plan .form-group { margin-bottom: 18px; }
.nw-plan label.col-form-label { font-weight: 700; padding-bottom: 2px; }
.nw-plan small.form-text { color: var(--muted); }
.nw-switch { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; margin: 0; }
.nw-switch input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.nw-switch small { display: block; font-weight: 500; color: var(--muted); }
.nw-price td { vertical-align: middle !important; }
.nw-price .form-control { height: 34px; font-size: 13.5px; min-width: 90px; }
.nw-price .nw-sub { white-space: nowrap; }
.nw-perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nw-perm { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; }
.nw-perm:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.nw-perm input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.nw-perm b { display: block; }
.nw-perm small { color: var(--muted); }
.nw-inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nw-inline-form .form-control { height: 32px; font-size: 13px; width: auto; min-width: 120px; flex: 1; }
.nw-bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding: 10px 0 0; }
.nw-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 11.5px; color: var(--muted); }
.nw-bars span { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #18b79f, var(--brand)); min-height: 3px; }
.nw-bars b { font-size: 11.5px; color: var(--ink); font-weight: 700; }
.nw-steps { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.nw-steps li { margin-bottom: 6px; }
.nw-tree-card { overflow-x: auto; }
.nw-tree-card .card-body { min-width: 640px; }
@media (max-width: 767px) { .nw-legs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nw-perms { grid-template-columns: 1fr; } .nw-tree-card .card-body { min-width: 0; } }

/* ---------- Category tree (Catalog > Categories): main > sub-categories > products ---------- */
.ct-card { overflow: hidden; }
.ct-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ct-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.ct-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.ct-search .form-control { padding-left: 36px; height: 40px; }
.ct-summary { color: var(--muted); font-size: 13px; flex: 1 1 auto; }
.ct-head { padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink-2); font-size: 14px; }
.ct-head i { color: var(--muted); margin-right: 10px; font-size: 12px; }
.ct, .ct-subs, .ct-plist { list-style: none; margin: 0; padding: 0; }
.ct-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; position: relative; }
.ct-row:hover { background: #fafbfc; }
.ct-plus { border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 17px; line-height: 1; width: 20px; flex: none; cursor: pointer; }
.ct-tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 19px; flex: none; box-shadow: 0 4px 10px rgba(16, 20, 24, .12); }
.ct-tile--sm { width: 40px; height: 40px; border-radius: 11px; font-size: 16px; }
.ct-name { flex: 1; min-width: 0; }
.ct-name b { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ct-name small { color: var(--muted); font-size: 12.5px; }
.ct-chev { font-size: 11px; color: var(--ok); margin-left: 6px; transition: transform .2s; transform: rotate(-90deg); opacity: .8; }
.is-open > .ct-row .ct-chev { transform: none; }
.ct-actions { display: flex; gap: 6px; flex: none; }
.ct-actions .btn { white-space: nowrap; }
.ct-switch { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 20px; padding: 3px 11px; font-size: 12px; font-weight: 700; flex: none; cursor: pointer; transition: all .15s; }
.ct-switch.is-on { border-color: #bfe3d6; background: var(--brand-soft); color: var(--brand-dark); }
.ct-switch:hover { border-color: var(--ink-2); }
.ct-main.is-off > .ct-row .ct-name b, .ct-sub.is-off > .ct-row .ct-name b, .ct-prod.is-off .ct-pname a { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(107, 116, 130, .5); }
.ct-main.is-off > .ct-row .ct-tile, .ct-sub.is-off > .ct-row .ct-tile, .ct-prod.is-off .ct-thumb { filter: grayscale(1); opacity: .6; }
.ct-main.is-open > .ct-row--main { background: #fbfcff; }

/* Sub-categories hang off a vertical line with small arrows */
.ct-subs { position: relative; }
.ct-subs::before { content: ""; position: absolute; left: 32px; top: 0; bottom: 34px; border-left: 2px solid #c9d6f5; }
.ct-row--sub { padding-left: 46px; }
.ct-arrow { position: absolute; left: 32px; top: 50%; width: 12px; border-top: 2px solid #c9d6f5; }
.ct-arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 4px solid transparent; border-left: 6px solid #c9d6f5; }
.ct-sub.is-open > .ct-row--sub { background: #f7fbf9; }

/* Products under an open sub-category: green line with dots */
.ct-products { position: relative; padding: 4px 0 10px; background: #fcfdfc; border-bottom: 1px solid var(--line); }
.ct-plist { position: relative; }
.ct-products .ct-plist::before { content: ""; position: absolute; left: 76px; top: 0; bottom: 18px; border-left: 2px solid #b7e1c8; }
.ct-prod { display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 70px; border-bottom: 1px solid #eef0f3; position: relative; }
.ct-prod:last-child { border-bottom: 0; }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; background: #4cb782; flex: none; position: relative; z-index: 1; box-shadow: 0 0 0 3px #fcfdfc; }
.ct-thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.ct-thumb--none { display: grid; place-items: center; color: #c3c8d0; font-size: 16px; }
.ct-pname { flex: 1; min-width: 0; }
.ct-pname a { display: block; font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-pname a:hover { color: var(--brand); }
.ct-pname small { color: var(--muted); font-size: 12px; }
.ct-price { text-align: right; flex: none; min-width: 110px; font-size: 13.5px; }
.ct-price s { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ct-price small { display: block; color: var(--brand); font-size: 11.5px; font-weight: 600; }
.ct-stock { flex: none; font-size: 12px; font-weight: 600; color: var(--ok); min-width: 92px; text-align: right; }
.ct-stock.is-low { color: var(--warn); }
.ct-stock.is-out { color: var(--danger); }
.ct-more { margin: 8px 0 0 100px; }
.ct-empty { padding: 12px 20px 12px 100px; color: var(--muted); font-size: 13px; }
.ct-subs > .ct-empty { padding-left: 56px; border-bottom: 1px solid var(--line); }
.ct-results { border-bottom: 2px solid var(--line); background: #fffdf7; }
.ct-results__head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ct-results .ct-prod { padding-left: 20px; }
.ct-results .ct-dot { display: none; }
@keyframes ct-flash { from { background: #fff6d6; } to { background: transparent; } }
.ct-sub.is-flash > .ct-row, .ct-main.is-flash > .ct-row { animation: ct-flash 2.4s ease-out; }
@media (max-width: 991px) {
  .ct-actions .btn span { display: none; }
  .ct-price { min-width: 0; }
  .ct-stock { display: none; }
}
@media (max-width: 640px) {
  .ct-row { flex-wrap: wrap; padding: 12px 14px; }
  .ct-row--sub { padding-left: 40px; }
  .ct-name { flex: 1 1 calc(100% - 120px); }
  .ct-actions, .ct-switch { margin-left: 32px; }
  .ct-subs::before { left: 24px; }
  .ct-arrow { left: 24px; }
  .ct-prod { flex-wrap: wrap; padding-left: 52px; }
  .ct-products .ct-plist::before { left: 58px; }
  .ct-price { text-align: left; }
  .ct-actions .btn { padding: 4px 9px; }
  .ct-empty, .ct-more { padding-left: 52px; margin-left: 52px; }
}

/* ---------- Cashback offers ---------- */
.cb-budget { height: 6px; border-radius: 6px; background: var(--surface); overflow: hidden; margin-top: 6px; max-width: 260px; }
.cb-budget span { display: block; height: 100%; background: linear-gradient(90deg, #f59f2b, var(--accent)); }
.cb-cats { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cb-cats summary { cursor: pointer; }
.cb-cats__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.cb-cat { display: flex; gap: 7px; align-items: center; margin: 0 0 4px 16px; font-size: 13.5px; cursor: pointer; }
.cb-cat input { accent-color: var(--brand); }
.cb-cat--main { margin-left: 0; font-weight: 700; }
.cb-offer { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fff7ed; border: 1px dashed #f5b26b; }
.cb-offer > i { color: var(--accent); margin-top: 3px; }
.cb-offer b { display: block; }
.cb-offer span { color: var(--ink-2); font-size: 13.5px; }
.ap-order .card + .cb-preview { position: sticky; top: 90px; }
.sw-rules { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto; gap: 14px 18px; align-items: end; }
.sw-rules__switch { align-self: center; }
.sw-rules__field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.sw-rules__unit { display: flex; align-items: center; gap: 8px; }
.sw-rules__unit .form-control { width: 100%; min-width: 0; }
.sw-rules__unit span { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .sw-rules { grid-template-columns: 1fr 1fr; } .sw-rules__switch { grid-column: 1 / -1; } }
@media (max-width: 575px) { .sw-rules { grid-template-columns: 1fr; } }

/* ---------- Orders by buyer type ---------- */
.ob-type { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.ob-type--member { background: #f1ecfe; color: #5b34c7; }
.ob-type--distributor { background: #e8f1fd; color: #1d5fbf; }
.ob-type .nw-code { margin-left: 3px; }
.ob-buyer { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.ap-stat.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ob-filter-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; }
.ob-filter-note a { margin-left: auto; }
.pr-save { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.pr-save.is-none { color: var(--muted); font-weight: 500; }
.ap-round { width: 30px; height: 30px; border-radius: 50%; padding: 0; display: inline-grid; place-items: center; }
.nw-filters small.ml-auto { white-space: nowrap; }
.ap-stars { color: #f59f2b; white-space: nowrap; letter-spacing: 1px; }
