/* etsy-pod panel - direction B "woven label / packing slip" (KARARLAR 113.1).
   One token block; every component reads the tokens. Fonts are served by the
   panel itself (CSP font-src 'self'), IBM Plex under the SIL OFL (fonts/OFL-IBM-Plex.txt). */

@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1E9F; }

:root {
  /* identity */
  --ice: #edf5f4;      /* page */
  --surface: #ffffff;  /* sheets */
  --petrol: #173b40;   /* text, top bar */
  --sea: #236c73;      /* the one action colour */
  --lilac: #dcd6ec;    /* the woven label */
  --soft: #4d6568;     /* secondary text, 6:1 on white */
  --rule: #cddfdd;
  /* state - never the identity colours */
  --ok: #1f7a4a;   --ok-bg: #e3f1ea;
  --warn: #9a5b00; --warn-bg: #fbeee0;
  --bad: #c0241b;  --bad-bg: #fbe7e5;
  /* type + space */
  --font: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --radius: 8px;
  --focus: 0 0 0 3px #7fb3b8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ice); color: var(--petrol); font: 15px/1.5 var(--font); }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.45rem; font-weight: 600; }
h2 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--sea); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .86em; word-break: break-all; }
.muted { color: var(--soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar ---- */
.top { background: var(--petrol); color: #e9f3f2; }
.top-in { max-width: 1120px; margin: 0 auto; padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.brand { font-weight: 600; letter-spacing: .01em; }
.nav { display: flex; gap: var(--s4); flex: 1; flex-wrap: wrap; }
.nav a { color: #a9c8c6; text-decoration: none; padding: 6px 0; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--lilac); }
.who { display: flex; align-items: center; gap: var(--s3); color: #a9c8c6; margin: 0; }
@media (max-width: 560px) { .nav { order: 3; flex-basis: 100%; } .who { margin-left: auto; } }
.who button { font: inherit; background: none; border: 0; color: #fff; padding: 6px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- page ---- */
.page { max-width: 1120px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); display: grid; gap: var(--s5); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.stamp { color: var(--soft); font-size: .85rem; }
.sheet { background: var(--surface); border-radius: var(--radius); padding: var(--s4) var(--s5); }
.sheet > h2 { margin-bottom: var(--s2); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---- buttons ---- */
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 10px 18px; border-radius: var(--radius); border: 0; cursor: pointer; background: var(--sea); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--sea); box-shadow: inset 0 0 0 1.5px var(--sea); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-line { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.btn.wide { width: 100%; min-height: 52px; font-size: 1.02rem; }

/* ---- the two hand switches ---- */
.switches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 560px) { .switches { grid-template-columns: 1fr; } }
.switch { display: grid; gap: var(--s2); align-content: start; }
.switch small { color: var(--soft); }
.switch.engaged { background: var(--bad-bg); border-radius: var(--radius); padding: var(--s4); box-shadow: inset 0 0 0 2px var(--bad); }
.switch.engaged .state { color: var(--bad); font-weight: 600; }
.release { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: flex-end; }
.release label { flex: 1; min-width: 180px; display: grid; gap: 4px; font-size: .85rem; color: var(--soft); }

/* ---- status rows (the slip) ---- */
.rows { display: grid; }
.row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s3) 0; }
.row + .row { border-top: 1px dashed var(--rule); }
.row .ico { width: 18px; height: 18px; margin-top: 2px; }
.row .t { font-weight: 600; }
.row .d { display: block; color: var(--soft); font-size: .88rem; }
.row .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-ok { color: var(--ok); } .is-warn { color: var(--warn); } .is-bad { color: var(--bad); }

/* ---- tags ---- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

/* ---- the woven label: product | colour | size ---- */
.label { display: inline-flex; align-items: stretch; background: var(--lilac); color: var(--petrol); border-radius: 3px; position: relative; max-width: 100%; }
.label::before { content: ""; position: absolute; inset: 4px; border: 1px dashed rgba(23, 59, 64, .45); border-radius: 2px; pointer-events: none; }
.label span { padding: 9px 14px; font-weight: 600; letter-spacing: .02em; }
.label span + span { border-left: 1px solid rgba(23, 59, 64, .2); }
.label .size { font-size: 1.12rem; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px dashed var(--rule); }
th { color: var(--soft); font-weight: 500; font-size: .85rem; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--soft); padding: var(--s2) 0; }

/* ---- forms ---- */
input::placeholder { color: #7d9194; }
input, select { font: inherit; color: var(--petrol); background: var(--ice); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; width: 100%; }
label.field { display: grid; gap: 6px; font-size: .88rem; color: var(--soft); }

/* ---- sign-in ---- */
.signin { max-width: 380px; margin: 12vh auto var(--s6); padding: 0 var(--s4); }
.signin .sheet { display: grid; gap: var(--s4); padding: var(--s5); }
.signin .brandline { display: flex; align-items: center; gap: var(--s3); }
.signin .brandline .label span { padding: 6px 10px; font-size: .85rem; }
.public { max-width: 720px; margin: var(--s6) auto; padding: 0 var(--s4); }
.public .sheet { display: grid; gap: var(--s3); padding: var(--s5); line-height: 1.55; }
.public h2 { margin-top: var(--s3); }
.public ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s2); }
.public a { color: var(--sea); }
.alert { background: var(--bad-bg); color: var(--bad); padding: var(--s3); border-radius: var(--radius); }

/* ---- orders ---- */
.small { font-size: .85rem; }
.tag .ico { width: 14px; height: 14px; }
.back { font-size: .88rem; text-decoration: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.notice { display: flex; gap: var(--s2); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--radius); font-weight: 500; }
.notice .ico { width: 18px; height: 18px; flex: none; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.tabs { display: flex; gap: var(--s2); flex-wrap: wrap; }
.tabs a { text-decoration: none; color: var(--petrol); background: var(--surface); padding: 8px 14px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; gap: var(--s2); }
.tabs a[aria-current="page"] { background: var(--petrol); color: #fff; }
.tabs .count { font-size: .8rem; opacity: .75; }
.orders { list-style: none; margin: 0; padding: 0; }
.orders li + li { border-top: 1px dashed var(--rule); }
.order { display: grid; gap: var(--s2); padding: var(--s4) var(--s2); color: inherit; text-decoration: none; border-radius: var(--radius); }
.order:hover { background: var(--ice); }
.order-top { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.order-top .tag { margin-left: auto; }
.order-label { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.qty { font-weight: 600; }
.more { color: var(--soft); font-size: .88rem; }
.order-title, .line-title { color: var(--soft); font-size: .9rem; }
.money { display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; font-size: .9rem; color: var(--soft); }
.money .net { color: var(--petrol); font-weight: 600; }
.flags { display: flex; gap: var(--s2); flex-wrap: wrap; }
.pager { display: flex; gap: var(--s4); justify-content: center; align-items: center; padding-top: var(--s3); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.line { display: flex; gap: var(--s4); align-items: flex-start; }
.line + .line { border-top: 1px dashed var(--rule); padding-top: var(--s4); }
.thumb { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); background: var(--ice); flex: none; }
.line-body { display: grid; gap: var(--s2); min-width: 0; flex: 1; }
.line-top { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s2) var(--s4); margin: 0; }
.facts dt { color: var(--soft); font-size: .8rem; }
.facts dd { margin: 0; }
.facts dd.mono { word-break: normal; overflow-wrap: anywhere; }
.line-body .btn { justify-self: start; text-decoration: none; display: inline-flex; align-items: center; }
.inline { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.linkish { font: inherit; background: none; border: 0; color: var(--sea); text-decoration: underline; cursor: pointer; padding: 8px 2px; min-height: 44px; }
.buyer { font-weight: 600; margin-top: var(--s2); }
.address { font: 1rem/1.5 var(--font); white-space: pre-wrap; background: var(--ice); padding: var(--s3) var(--s4); border-radius: var(--radius); margin: var(--s2) 0 var(--s3); }
.sheet a.btn { display: inline-flex; align-items: center; text-decoration: none; margin-top: var(--s3); }
.note { margin-top: var(--s4); padding: var(--s3) var(--s4); border-left: 3px solid var(--lilac); background: var(--ice); border-radius: 0 var(--radius) var(--radius) 0; }
.sums { display: grid; gap: 0; margin: 0 0 var(--s4); }
.sums div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px dashed var(--rule); }
.sums dt { color: var(--soft); }
.sums dd { margin: 0; }
.sums .net dt, .sums .net dd { color: var(--petrol); font-weight: 600; }
.amounts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: end; }
.amounts .wide { grid-column: 1 / -1; }
.amounts .btn { grid-column: 1 / -1; }
@media (max-width: 460px) { .amounts { grid-template-columns: 1fr; } .line { flex-direction: column; } }
.history { margin-top: var(--s4); }
.history summary { cursor: pointer; color: var(--sea); padding: var(--s2) 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
