/* Back office (admin.html). Same design language as the shop (styles.css): Anek Latin + Poppins, navy gradient,
   white cards, pill buttons. Sidebar layout; ≤900px the sidebar becomes a slide-in menu. */
:root {
  --ink: #131315;
  --ink2: #343842;
  --muted: #5b6270;
  --line: rgba(19, 19, 21, .09);
  --line2: rgba(19, 19, 21, .14);
  --bg: #f3f4f8;
  --navy: #0a1930;
  --black: #0b0b0d;
  --lav: #e8e5ff; --sky: #cbe5fc; --mint: #e9fce6;
  --green: #15803d;
  --amber: #b45309;
  --red: #d7262e;
  --bar: #2a4a9b;
  --navy-grad: radial-gradient(120% 140% at 12% -20%, #2a3f86 0%, rgba(42, 63, 134, 0) 55%), radial-gradient(90% 120% at 92% 120%, #4b2f8f 0%, rgba(75, 47, 143, 0) 60%), linear-gradient(#0d1f3f, #0a1930);
  --card-sh: 0 0 0 .5px rgba(28, 40, 84, .14), 0 1px 2px rgba(28, 40, 84, .04), 0 14px 30px -18px rgba(28, 40, 84, .22);
  --chip-sh: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 1.5px 1px #fff, 0 0 0 .5px rgba(28, 40, 84, .16), 0 4px 10px -3px rgba(28, 40, 84, .22);
  --head: "Anek Latin", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ui: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --side-w: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--head); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); line-height: 1.2; }
p { margin: 0; }
svg { width: 18px; height: 18px; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; }
code { background: rgba(19, 19, 21, .06); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 13px; }
.neg { color: var(--red) !important; }
.warn { color: var(--amber) !important; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px;
  font: 500 14px/1 var(--ui); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s, opacity .15s; }
.b:active { transform: scale(.97); }
.b:disabled { opacity: .5; cursor: default; transform: none; }
.b svg { width: 16px; height: 16px; }
.b.sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.b-dark { background: var(--black); color: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }
.b-dark:hover:not(:disabled) { background: #26272c; }
.b-glass { background: linear-gradient(rgba(255, 255, 255, .96), rgba(255, 255, 255, .8)); color: var(--ink); box-shadow: var(--chip-sh); }
.b-glass:hover:not(:disabled) { background: #fff; }
.b-red { background: var(--red); color: #fff; }
.b-wide { width: 100%; }
.busy { opacity: .7; pointer-events: none; }
.ib { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink); flex: none; }
.ib:hover { background: rgba(19, 19, 21, .06); }
.link { font: 500 13px var(--ui); color: var(--bar); text-decoration: none; }
.link:hover { text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }

/* Form fields */
label { display: grid; gap: 5px; font: 500 12.5px var(--ui); color: var(--ink2); }
label small { font: 400 12px var(--head); color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 11px; background: #fff;
  font: 400 14.5px var(--head); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: #4a63b8; box-shadow: 0 0 0 3px rgba(74, 99, 184, .16); }
input[readonly] { background: #f6f7fa; color: var(--muted); }
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%235b6270' stroke-width='2' d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row .wide { grid-column: 1 / -1; }
.form-row .btn-row { margin-top: 0; align-self: end; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font: 500 13px var(--ui); color: var(--ink2); }
.toggle input { appearance: none; width: 36px; height: 21px; margin: 0; border-radius: 99px; background: #cfd3dc; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { transform: translateX(15px); }
.toggle input:focus-visible { outline: 2px solid #4a63b8; outline-offset: 2px; }
.money-in { display: flex; align-items: center; position: relative; min-width: 104px; }
.money-in i { position: absolute; left: 10px; font-style: normal; color: var(--muted); font-size: 13.5px; pointer-events: none; }
.money-in input:not([type]) , .money-in input { min-height: 34px !important; padding: 5px 8px 5px 22px !important; border-radius: 9px !important; font-variant-numeric: tabular-nums; }
.search { display: flex; align-items: center; position: relative; }
.search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 36px !important; min-width: 240px; border-radius: 999px !important; }

/* Sign in */
.lg { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--navy-grad); }
.lg-card { width: min(440px, 100%); background: #fff; border-radius: 26px; padding: 30px 30px 26px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6); }
.lg-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.lg-logo { width: 84px; height: 28px; color: var(--navy); }
.lg-brand span, .side-brand span { font: 600 11px var(--ui); letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--lav); color: #3b2f8f; }
.lg-pane { display: grid; gap: 14px; }
.lg-pane h1 { font-size: 28px; font-weight: 600; }
.lg-sub { color: var(--muted); margin-top: -8px; }
.lg-err { min-height: 1px; font-size: 14px; color: var(--red); }
.lg-err:empty { display: none; }
.lg-err.ok { color: var(--green); }
.lg-err a { color: inherit; font-weight: 600; }
.lg-foot { font-size: 13.5px; color: var(--muted); text-align: center; }
.lg-foot a { color: var(--ink); }
.lg-demo { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: #f4f2ff; font-size: 13.5px; color: var(--ink2); }
.lg-demo div { display: flex; flex-wrap: wrap; gap: 6px; }

/* Layout */
.app { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--navy-grad); color: #fff; z-index: 40; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; }
.side-logo { width: 72px; height: 24px; color: #fff; }
.side-brand span { background: rgba(255, 255, 255, .14); color: #fff; }
.side-x { display: none; margin-left: auto; color: #fff; }
.side-nav { display: grid; gap: 2px; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font: 500 14px var(--ui); color: rgba(255, 255, 255, .78); transition: background .15s, color .15s; }
.nav-i:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-i.on { background: rgba(255, 255, 255, .95); color: var(--navy); }
.nav-i span { flex: 1; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 600 11px var(--ui); }
.side-me { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 2px; }
.me-who { padding: 4px 12px 8px; display: grid; }
.me-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who span { font-size: 12.5px; color: rgba(255, 255, 255, .64); }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .8); text-decoration: none; font: 500 13px var(--ui); cursor: pointer; text-align: left; }
.side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-link svg { width: 16px; height: 16px; }
.scrim { display: none; }
.main { margin-left: var(--side-w); min-width: 0; padding: 0 28px 60px; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; background: linear-gradient(var(--bg) 78%, rgba(243, 244, 248, 0)); }
.top-menu { display: none; }
.top-t { flex: 1; min-width: 0; }
.top-t h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.top-t p { color: var(--muted); font-size: 14px; }
.top-acts { display: flex; gap: 8px; }
.demo-bar { margin: 0 0 16px; padding: 10px 16px; border-radius: 14px; background: #fff7e6; box-shadow: inset 0 0 0 1px #f5d9a3; font-size: 13.5px; color: #6b4a0f; }
.demo-bar a { font-weight: 600; }
.sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.empty { display: grid; gap: 4px; padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { color: var(--ink); font-size: 15px; }
.foot-note { font-size: 13px; color: var(--muted); }

/* Cards, tiles */
.card { background: #fff; border-radius: 20px; padding: 20px; box-shadow: var(--card-sh); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-h h2 { font-size: 18px; font-weight: 600; }
.card-h h2 small { color: var(--muted); font-weight: 500; font-size: 14px; }
.card-h .muted { font-size: 13px; }
.card > .muted { font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cards, .fgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { display: grid; gap: 2px; align-content: start; padding: 16px 18px; border-radius: 20px; background: #fff; box-shadow: var(--card-sh); }
.tile span { font: 500 12.5px var(--ui); color: var(--muted); }
.tile b { font: 600 28px/1.15 var(--head); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile small { font-size: 12.5px; color: var(--muted); }
.tile i { font-style: normal; font-weight: 600; }
.tile i.up { color: var(--green); }
.tile i.down { color: var(--red); }
.tile.dark { background: var(--navy-grad); color: #fff; }
.tile.dark span, .tile.dark small { color: rgba(255, 255, 255, .7); }
.tile.dark i.up { color: #7ee2a8; }
.tile.dark i.down { color: #ff9a9e; }
.hero-card { padding: 32px; background: var(--navy-grad); color: #fff; display: grid; gap: 12px; justify-items: start; }
.hero-card h2 { font-size: 24px; }
.hero-card p { max-width: 620px; color: rgba(255, 255, 255, .8); }
.hero-card .b-dark { background: #fff; color: var(--ink); }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #eef2ff; box-shadow: inset 0 0 0 1px #d4dcfb; font-size: 14px; }

/* Pills */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font: 500 11.5px/1.5 var(--ui); white-space: nowrap; vertical-align: middle; background: #eef0f4; color: var(--ink2); }
.os-submitted, .st-pending, .tu-requested { background: #fff1d6; color: #8a5300; }
.os-approved, .tu-invoiced { background: #e2ecff; color: #1d4ab8; }
.os-processing { background: var(--lav); color: #4a35a8; }
.os-shipped { background: #dff3ff; color: #0b6896; }
.os-delivered, .st-approved, .tu-paid { background: #dcf7e3; color: #13693a; }
.os-cancelled, .st-rejected, .tu-cancelled { background: #fde2e3; color: #a3161d; }
.st-suspended { background: #eceef2; color: #4b5160; }
.tag { display: inline-block; padding: 1px 7px; margin-left: 4px; border-radius: 6px; background: var(--lav); color: #4a35a8; font: 500 10.5px/1.6 var(--ui); vertical-align: middle; }

/* Chips and filter bars */
.bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bar-row h3 { font-size: 16px; }
.bar-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar-tools select { width: auto; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 99px; background: #fff; box-shadow: var(--chip-sh); font: 500 13px var(--ui); cursor: pointer; }
.chip small { font-size: 11.5px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--black); color: #fff; box-shadow: none; }
.chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: #e6e8ef; width: max-content; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 16px; border: 0; border-radius: 99px; background: none; font: 500 13.5px var(--ui); cursor: pointer; color: var(--ink2); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(28, 40, 84, .14); }

/* Tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 12px var(--ui); color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
.card:not(.flush) .tbl th { background: none; }
.tbl th small { display: block; font-weight: 400; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td small { display: block; color: var(--muted); font-size: 12.5px; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.r small.neg, .tbl td.r small.warn { font-weight: 600; }
.card:not(.flush) .tbl th:first-child, .card:not(.flush) .tbl td:first-child { padding-left: 0; }
.card:not(.flush) .tbl th:last-child, .card:not(.flush) .tbl td:last-child { padding-right: 0; }
.tbl-click tbody tr { cursor: pointer; transition: background .12s; }
.tbl-click tbody tr:hover, .tbl-click tbody tr:focus-visible { background: #f6f7fb; outline: none; }
.tbl td select { min-height: 34px; padding-top: 4px; padding-bottom: 4px; width: auto; }
.prices td { padding-top: 8px; padding-bottom: 8px; }
.prices td b { font-weight: 600; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: rgba(19, 19, 21, .07); stroke-width: 1; }
.ch-base { stroke: rgba(19, 19, 21, .25); stroke-width: 1; }
.ch-ax { font: 400 11px var(--ui); fill: var(--muted); }
.ch-bar path { fill: var(--bar); transition: fill .12s; }
.ch-bar:hover path { fill: #16306f; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; font-size: 14px; }
.hbars li span { grid-row: 1 / 3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars li i { height: 8px; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, var(--bar) var(--w), #eceef4 var(--w)); grid-row: 1 / 3; }
.hbars li b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.hbars li small { color: var(--muted); font-size: 12px; text-align: right; }
.hbars.small li { font-size: 13px; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.todo a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 12px 14px; border-radius: 14px; background: #f6f7fb; text-decoration: none; transition: background .15s; }
.todo a:hover { background: #eceffa; }
.todo b { font-weight: 600; }
.todo span { color: var(--muted); font-size: 14px; }
.todo i { font-style: normal; color: var(--muted); font-size: 18px; }

/* Order drawer */
.drawer, .modal { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 18, 36, .42); backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 100%); overflow-y: auto; background: var(--bg); padding: 22px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .4); animation: slideIn .22s ease-out; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.dr-h { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.dr-h h2 { font-size: 24px; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.dr-h p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.dr-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dr-box { background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: var(--card-sh); min-width: 0; }
.dr-box h3 { font: 600 12px var(--ui); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.dr-box p { font-size: 14.5px; }
.dr-box p + p { margin-top: 6px; }
.dr-box .tbl th:first-child, .dr-box .tbl td:first-child { padding-left: 0; }
.dr-box .tbl th:last-child, .dr-box .tbl td:last-child { padding-right: 0; }
.dr-box .tbl th { background: none; }
.sums { margin: 12px 0 0; display: grid; gap: 4px; font-size: 14px; }
.sums div { display: flex; justify-content: space-between; gap: 12px; }
.sums dt { color: var(--muted); }
.sums dd { margin: 0; font-variant-numeric: tabular-nums; }
.sums .tot { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; }
.sums .tot dt { color: var(--ink); }
.sums small { color: var(--muted); font-weight: 400; }
.cancelled { padding: 10px 14px; border-radius: 12px; background: #fde2e3; color: #a3161d; font-weight: 500; }
.track { list-style: none; margin: 0; padding: 14px 6px 4px; display: grid; grid-template-columns: repeat(5, 1fr); }
.track li { position: relative; display: grid; justify-items: center; text-align: center; gap: 3px; font-size: 12.5px; }
.track li::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: #d8dbe4; z-index: 0; }
.track li:first-child::before { display: none; }
.track li.done::before, .track li.now::before { background: var(--green); }
.track i { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #d8dbe4; }
.track i svg { width: 13px; height: 13px; color: #fff; }
.track .done i, .track .now i { background: var(--green); box-shadow: none; }
.track .now i { box-shadow: 0 0 0 4px rgba(21, 128, 61, .18); }
.track b { font: 500 12px var(--ui); }
.track span { color: var(--muted); font-size: 11.5px; min-height: 1em; }
.ship-form { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr auto; gap: 10px; align-items: end; }

/* Fulfillment cards */
.fgroup { display: grid; gap: 10px; }
.fg-h h2 { font-size: 20px; font-weight: 600; }
.fg-h h2 small { font-size: 14px; color: var(--muted); font-weight: 500; }
.fg-h p { color: var(--muted); font-size: 14px; }
.fcard { background: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: var(--card-sh); display: grid; gap: 14px; }
.card .fcard { box-shadow: inset 0 0 0 1px var(--line); margin-top: 10px; }
.fcard header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fcard h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fcard header span { font-size: 13.5px; color: var(--muted); }
.fc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-body { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; font-size: 14.5px; }
.fc-body h4 { font: 600 11.5px var(--ui); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.fc-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.fc-note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #fff7e6; font-size: 13.5px; }

/* Accounts, payments, partners */
.acc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.acc-top h3 { font-size: 17px; font-weight: 600; }
.acc-top h3 small { color: var(--muted); font-weight: 500; font-size: 14px; }
.acc-top a, .acc-top .muted { font-size: 13.5px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 14px 0 0; }
.facts dt { font: 500 11.5px var(--ui); color: var(--muted); }
.facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.note { margin-top: 14px; }
.card.row { padding: 16px 18px; }
.card.row .btn-row { margin-top: 10px; }
.bal { font: 600 22px var(--head); font-variant-numeric: tabular-nums; }
.adj { display: grid; grid-template-columns: 1fr auto 1.4fr auto; gap: 8px; margin-top: 12px; }
.adj select { width: auto; }
.vgrid { grid-template-columns: 2fr 1fr 1fr 1fr; }
.vgrid .v-note { grid-column: 1 / -1; }
.code-in { display: flex; gap: 6px; }
.code-in input { font-family: ui-monospace, Consolas, monospace !important; letter-spacing: .04em; }
.roles { display: grid; gap: 12px; margin: 0; }
.roles dt { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.roles dd { margin: 2px 0 0; color: var(--ink2); font-size: 14px; }
.tier-rows { display: grid; gap: 8px; margin-top: 12px; }
.tier-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 38px; gap: 8px; align-items: end; }
.tier-row + .tier-row label { font-size: 0; gap: 0; }
.tier-row + .tier-row label input { font-size: 14.5px; }

/* Resellers */
.res-num { text-align: right; display: grid; }
.res-num b { font: 600 22px var(--head); }
.res-num span { font-size: 12.5px; color: var(--muted); }
.res.open { box-shadow: var(--card-sh), inset 0 0 0 2px #c9d2f5; }
.res-detail { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.res-detail .form-row { margin-top: 0; }
.docs p { font-size: 14.5px; margin-bottom: 10px; }
.docs .roles { margin: 6px 0 14px; }
.docs .roles dt { font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 600; color: #1d4ab8; }
.code { margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--navy); color: #dbe5ff; overflow-x: auto; font-size: 12.5px; line-height: 1.55; }
.code-box { width: 100%; min-height: 70px !important; font-family: ui-monospace, Consolas, monospace !important; font-size: 13.5px !important; background: #f6f7fa !important; resize: none; overflow-wrap: anywhere; }

/* Order map */
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.map-card { position: relative; border-radius: 24px; overflow: hidden; background: radial-gradient(120% 100% at 50% 0%, #142a57 0%, #08132a 70%); box-shadow: var(--card-sh); min-height: 420px; }
#globe { display: block; width: 100%; height: min(70vh, 640px); min-height: 420px; touch-action: none; cursor: grab; }
.map-legend { position: absolute; left: 16px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; border-radius: 12px; background: rgba(8, 19, 42, .7); backdrop-filter: blur(6px); font: 500 12px var(--ui); color: rgba(255, 255, 255, .85); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .muted { color: rgba(255, 255, 255, .6); }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; }
.lg-open { background: #ffb547; }
.lg-done { background: #4fd1a5; }
.lg-new { background: transparent; box-shadow: 0 0 0 2px #fff; }
.map-hint { position: absolute; top: 14px; left: 16px; font-size: 12.5px; color: rgba(255, 255, 255, .6); pointer-events: none; }
.map-side { background: #fff; border-radius: 20px; padding: 18px; box-shadow: var(--card-sh); display: grid; gap: 12px; align-content: start; max-height: min(70vh, 640px); overflow-y: auto; }
.map-side h3 { font: 600 12px var(--ui); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ms-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ms-tiles div { padding: 10px 12px; border-radius: 14px; background: #f4f5f9; display: grid; }
.ms-tiles b { font: 600 20px var(--head); font-variant-numeric: tabular-nums; }
.ms-tiles span { font-size: 12px; color: var(--muted); }
.map-set .toggle { margin: 12px 0 6px; }

/* Pop-up window, toasts, tooltip */
.modal { display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55); display: grid; gap: 14px; animation: pop .18s ease-out; }
.modal-card.wide { width: min(620px, 100%); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal-card h2 { font-size: 22px; font-weight: 600; padding-right: 36px; }
.modal-x { position: absolute; top: 14px; right: 14px; }
.m-text { color: var(--ink2); font-size: 14.5px; }
.m-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; width: min(520px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; background: var(--black); color: #fff; font-size: 14px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); pointer-events: auto; animation: pop .18s ease-out; transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 99px; padding: 5px 12px; font: 500 12.5px var(--ui); cursor: pointer; white-space: nowrap; }
.tip { position: fixed; z-index: 95; max-width: 300px; padding: 7px 11px; border-radius: 10px; background: var(--black); color: #fff; font: 500 12.5px/1.4 var(--ui); pointer-events: none; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }

/* Responsive */
@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-grid { grid-template-columns: 1fr; }
  .map-side { max-height: none; }
}
@media (max-width: 1000px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
  .side-x, .top-menu { display: inline-grid; }
  .menu-open .side { transform: none; visibility: visible; transition: transform .25s ease; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 18, 36, .42); }
  .main { margin-left: 0; padding: 0 16px 50px; }
  .top { padding: 12px 0 10px; }
  .top-t h1 { font-size: 22px; }
  .top-t p { font-size: 13px; }
  .ship-form { grid-template-columns: 1fr 1fr; }
  .ship-form .b { grid-column: 1 / -1; }
  .fc-body, .dr-cols { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: 1fr 1fr; }
  .vgrid .v-code { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; border-radius: 16px; }
  .tile b { font-size: 22px; }
  .card { padding: 16px; border-radius: 18px; }
  .top-acts { display: none; }
  .bar-row, .bar-tools { width: 100%; }
  .bar-tools > * { flex: 1; }
  .search input { min-width: 0; }
  .form-row.three { grid-template-columns: 1fr; }
  .adj { grid-template-columns: 1fr 1fr; }
  .adj input[name="note"] { grid-column: 1 / -1; }
  .tier-row { grid-template-columns: 1.3fr 1fr 1fr 34px; }
  .drawer-panel { padding: 16px 14px 32px; }
  .track b { font-size: 10.5px; }
  .track span { font-size: 10px; }
  #globe { height: 380px; min-height: 380px; }
  .map-card { min-height: 380px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .chip { flex: none; }
  .modal-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .side, .top, .demo-bar, .toasts { display: none !important; }
  .main { margin: 0; padding: 0; }
}
