/* Gas Plant Stock. System fonts only. No inline styles anywhere (the site's CSP forbids them). */
:root {
  --night: #0B1B2B; --panel: #12283D; --panel-2: #0F2236; --edge: #24415C;
  --paper: #F3F6F9; --card: #FFFFFF; --ink: #10202F; --dim: #4C5D6E; --dim-dark: #9FB3C8;
  --flame: #FF6B1A; --flame-deep: #C2410C; --line: #D5DEE7;
  --teal: #14B8A6; --sky: #38BDF8; --violet: #A78BFA; --rose: #F43F5E;
  --ok: #2ECC71; --ok-deep: #17794A; --amber: #FFC400; --amber-deep: #7A4F00; --red: #FF4D4F; --red-deep: #B42318;
  --head: "Bahnschrift", "Segoe UI Variable Display", "Arial Narrow", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 18px;
  --maxw: 1320px;
  --lift: 0 1px 2px rgba(16,32,47,.07), 0 10px 28px rgba(16,32,47,.09);
}
* { box-sizing: border-box; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: radial-gradient(1200px 500px at 80% -10%, #E3EDF7 0%, transparent 60%), var(--paper); line-height: 1.45; font-variant-numeric: tabular-nums; min-height: 100vh; }
body.dark { background: radial-gradient(1000px 520px at 85% -5%, #16355A 0%, transparent 60%), radial-gradient(800px 400px at 0% 40%, #0F2B3A 0%, transparent 60%), var(--night); color: #EAF2FA; }
h1, h2, h3, .num { font-family: var(--head); letter-spacing: .01em; }
h1 { font-size: 2rem; margin: .3em 0 .5em; line-height: 1.15; }
h2 { font-size: 1.3rem; margin: 1.1em 0 .5em; }
p { margin: .4em 0 .8em; }
.boot { padding: 2rem; color: var(--dim); }
.dim { color: var(--dim); } body.dark .dim { color: var(--dim-dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--flame-deep); outline-offset: 2px; }
body.dark :focus-visible, .topbar :focus-visible, .bottombar :focus-visible { outline-color: var(--flame); }
.hidden { display: none !important; }
.glyph { width: 1.15em; height: 1.15em; flex: none; }
.glyph.big { width: 56px; height: 56px; opacity: .8; }
main > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- top bar and tabs ---------- */
.topbar { background: linear-gradient(180deg, #0E2236, var(--night)); color: #fff; display: flex; align-items: stretch; gap: 1rem; padding: 0 max(1rem, calc((100vw - var(--maxw)) / 2 + 1rem)) 0 0; position: sticky; top: 0; z-index: 20; min-height: 66px; box-shadow: 0 2px 14px rgba(0,0,0,.3); }
.brand { display: flex; align-items: center; gap: .6rem; background: var(--flame-deep); color: #fff; padding: 0 1.6rem 0 1.1rem; margin-left: max(0px, calc((100vw - var(--maxw)) / 2)); clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%); font-family: var(--head); font-weight: 700; font-size: 1.35rem; letter-spacing: .12em; text-decoration: none; }
.brand small { font-family: var(--body); letter-spacing: 0; font-weight: 600; font-size: .9rem; display: block; }
.tabs { display: flex; align-items: flex-end; gap: 2px; flex: 1; }
.tab { white-space: nowrap; font: inherit; font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; color: #CFE0F0; background: var(--panel); border: 0; padding: .7rem 1.5rem .7rem 1.1rem; min-height: 48px; text-decoration: none; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%); cursor: pointer; display: inline-flex; align-items: center; transition: background .15s; }
.tab[aria-current="page"] { background: var(--flame-deep); color: #fff; min-height: 58px; font-weight: 700; }
.tab:hover { background: var(--edge); } .tab[aria-current="page"]:hover { background: var(--flame-deep); }
.who { display: flex; align-items: center; gap: .8rem; font-size: .9rem; white-space: nowrap; }
.who button { font: inherit; background: none; border: 1px solid #3A5B7A; color: #fff; padding: .4rem 1rem; border-radius: 10px; min-height: 44px; min-width: 44px; cursor: pointer; white-space: nowrap; }
.who button:hover { background: var(--panel); }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; border: 0; cursor: pointer; min-height: 44px; max-width: 18rem; text-align: left; line-height: 1.2; }
.badge .short { display: none; }
.badge.ok { background: rgba(46,204,113,.16); color: #5FE39A; }
.badge.amber { background: var(--amber); color: #3a2a00; }
.badge.red { background: var(--red); color: #1c0000; }
.badge.flash { animation: pop .6s ease 2; }
@keyframes pop { 50% { transform: scale(1.08); background: var(--ok); color: #04210f; } }
.live { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46,204,113,.6); animation: pulse 2s infinite; display: inline-block; flex: none; }
.live.off { background: var(--amber); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }
.ribbon { background: var(--rose); color: #1c0008; text-align: center; font-weight: 700; padding: .3rem; letter-spacing: .15em; }
.banner { background: var(--amber); color: #3a2a00; padding: .7rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; font-weight: 600; text-align: center; }
.banner.red { background: var(--red); color: #1c0000; }
.banner button { font: inherit; padding: .4rem 1rem; min-height: 44px; border-radius: 10px; border: 2px solid currentColor; background: transparent; color: inherit; cursor: pointer; font-weight: 700; }

main { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1rem 6rem; }
.narrow { max-width: 760px; }

/* bottom bar on phones */
.bottombar { display: none; }
@media (max-width: 1100px) {
  html { font-size: 18px; }
  .tabs { display: none; }
  .who .name { display: none; }
  .topbar { min-height: 60px; padding-right: .6rem; gap: .5rem; }
  .brand { margin-left: 0; padding: 0 1.3rem 0 .9rem; font-size: 1.2rem; }
  .who { margin-left: auto; gap: .5rem; }
  .who button { padding: .4rem .8rem; }
  .badge { padding: .3rem .75rem; }
  .badge .full { display: none; } .badge .short { display: inline; }
  .bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--night); z-index: 30; padding-bottom: env(safe-area-inset-bottom); gap: 2px; box-shadow: 0 -4px 16px rgba(0,0,0,.25); }
  .bottombar a { flex: 1; min-height: 66px; color: #CFE0F0; background: var(--panel); text-decoration: none; text-align: center; font-size: .85rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; clip-path: polygon(0 12px, 12px 0, 100% 0, 100% 100%, 0 100%); }
  .bottombar a[aria-current="page"] { background: var(--flame-deep); color: #fff; font-weight: 700; }
  .bottombar svg { width: 24px; height: 24px; }
}
@media (max-width: 380px) { .brand small { display: none; } .badge { max-width: 8rem; } }

/* ---------- forms and buttons ---------- */
label, .lbl { display: block; font-weight: 600; margin: 0 0 .3rem; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea, input:not([type]) {
  font: inherit; width: 100%; min-height: 58px; padding: .6rem .9rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--flame-deep); outline: none; box-shadow: 0 0 0 4px rgba(194,65,12,.18); }
textarea { min-height: 90px; }
input.bad, textarea.bad { border-color: var(--red-deep); background: #FFF4F3; }
input[type=checkbox] { width: 28px; height: 28px; accent-color: var(--flame-deep); flex: none; margin: 0; cursor: pointer; }
.check { display: flex; align-items: center; gap: .7rem; min-height: 48px; cursor: pointer; font-weight: 600; margin: 0; }
.err { color: var(--red-deep); font-weight: 600; margin: .3rem 0 0; }
.field { margin-bottom: 1.1rem; }
.btn { font: inherit; font-weight: 700; min-height: 66px; padding: .6rem 1.6rem; border-radius: 14px; border: 2px solid var(--flame-deep); background: linear-gradient(180deg, #D4490E, var(--flame-deep)); color: #fff; cursor: pointer; width: 100%; font-size: 1.15rem; box-shadow: 0 6px 16px rgba(194,65,12,.28); transition: transform .1s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn:hover:not(:disabled) { box-shadow: 0 8px 20px rgba(194,65,12,.4); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 6px rgba(194,65,12,.3); }
.btn.small { min-height: 48px; width: auto; font-size: .95rem; padding: .3rem 1.1rem; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--flame-deep); box-shadow: none; }
.btn.danger { background: var(--red-deep); border-color: var(--red-deep); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.inline { width: auto; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 11rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--lift); margin-bottom: 1.2rem; border: 1px solid rgba(16,32,47,.05); }
.msg { padding: .8rem 1rem; border-radius: 12px; margin: .8rem 0; font-weight: 600; border-left: 5px solid transparent; }
.msg.good { background: #E4F8EC; color: var(--ok-deep); border-color: var(--ok-deep); }
.msg.warn { background: #FFF3CC; color: var(--amber-deep); border-color: #D69A00; }
.msg.bad { background: #FDE8E7; color: var(--red-deep); border-color: var(--red-deep); }

/* Entry page */
.entrypage { max-width: 900px; margin: 0 auto; }
.stephead { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.stephead h2 { margin: 0; font-size: 1.25rem; }
.stephead p { margin: .1rem 0 0; font-size: .9rem; }
.stepno { width: 40px; height: 40px; border-radius: 50%; background: var(--flame-deep); color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.card.step { padding: 1.4rem; }
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .3rem 1.4rem; margin-top: 1.2rem; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .7rem; }
.size { font: inherit; font-family: var(--head); font-size: 1.25rem; font-weight: 700; min-height: 66px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: transform .1s, border-color .15s; }
.size:hover { border-color: var(--flame-deep); }
.size:active { transform: scale(.97); }
.size[aria-checked="true"] { background: var(--night); color: #fff; border-color: var(--night); box-shadow: inset 0 -6px 0 var(--flame); }
@media (max-width: 600px) { .sizes { grid-template-columns: 1fr 1fr; } }
i.dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .5em; vertical-align: baseline; flex: none; }
.size { display: inline-flex; align-items: center; justify-content: center; }
/* the stock strip sits beside the form on wide screens */
@media (min-width: 1366px) {
  .entrypage { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 0 1.5rem; align-items: start; }
  .entrypage > h1 { grid-column: 1 / -1; }
  .entrypage > .entryform, .entrypage > .sales { grid-column: 1; }
  .entrypage > .strip { grid-column: 2; grid-row: 2 / span 2; position: sticky; top: 1rem; flex-direction: column; flex-wrap: nowrap; }
}
.stepper { display: flex; gap: .5rem; }
.stepper button { font: inherit; font-size: 1.7rem; font-weight: 700; width: 64px; min-height: 58px; border-radius: 12px; border: 2px solid var(--line); background: #EEF3F8; color: var(--ink); cursor: pointer; flex: none; }
.stepper button:last-child { background: var(--night); border-color: var(--night); color: #fff; }
.stepper button:active { transform: scale(.95); }
.stepper input { text-align: center; font-size: 1.5rem; font-weight: 700; font-family: var(--head); }
.strip { background: linear-gradient(135deg, var(--night), #17324D); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; margin-bottom: 1.2rem; box-shadow: var(--lift); border-bottom: 5px solid var(--flame); }
.strip b { font-family: var(--head); font-size: 1.8rem; display: block; line-height: 1.15; }
.strip span { font-size: .85rem; color: var(--dim-dark); text-transform: uppercase; letter-spacing: .06em; }
.cols { display: grid; gap: 0 1.4rem; }
@media (min-width: 760px) { .cols.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.sales summary { list-style: none; display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.1rem; cursor: pointer; min-height: 48px; }
.sales summary::-webkit-details-marker { display: none; }
.sales summary::after { content: '+'; margin-left: auto; font-size: 1.6rem; color: var(--flame-deep); }
.sales[open] summary::after { content: '-'; }
.sales[open] summary { margin-bottom: 1rem; }

/* the "Saved" confirmation */
.saved { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; border-radius: 16px; margin: 1rem 0 .2rem; animation: pop-in .35s cubic-bezier(.2,1.3,.4,1) both; }
.saved.ok { background: linear-gradient(135deg, #E4F8EC, #CFF1DC); color: #0E5A35; border: 2px solid #8BD6AE; }
.saved.device { background: linear-gradient(135deg, #FFF3CC, #FFE9A3); color: var(--amber-deep); border: 2px solid #E9B93A; }
.saved .txt b { display: block; font-family: var(--head); font-size: 1.5rem; line-height: 1.15; }
.saved .txt span { font-weight: 600; }
.bigmark { width: 64px; height: 64px; flex: none; }
.bigmark .ring { stroke: currentColor; opacity: .35; stroke-dasharray: 145; }
.bigmark .check { stroke: currentColor; stroke-dasharray: 50; animation: draw .45s .3s ease both; }
.saved.ok .ring { opacity: 1; animation: ring .5s ease both; }
@keyframes ring { from { stroke-dashoffset: 145; } }
@keyframes draw { from { stroke-dashoffset: 50; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }

/* dialogs */
.overlay { position: fixed; inset: 0; background: rgba(11,27,43,.72); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fade .15s ease both; }
@keyframes fade { from { opacity: 0; } }
.dialog { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1.5rem; max-width: 36rem; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.4); animation: pop-in .2s ease both; }
.dialog h2 { margin-top: 0; }
.dialog .btns { display: grid; gap: .8rem; margin-top: 1rem; }
@media (min-width: 560px) { .dialog .btns { grid-template-columns: 1fr 1fr; } }
.bigpw { font-family: ui-monospace, Consolas, monospace; font-size: 1.8rem; background: #FFF3CC; padding: .8rem; border-radius: 10px; text-align: center; letter-spacing: .08em; user-select: all; }
.sentences { list-style: none; padding: 0; margin: 0; }
.sentences li, .sentences p { padding: .75rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.sentences .when { color: var(--dim); font-weight: 600; }

/* tables */
.tablewrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--lift); margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { padding: .75rem .8rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
th { background: var(--night); color: #fff; font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
td.n, th.n { text-align: right; }
td.date { white-space: nowrap; }
tbody tr:hover td { background: #F6F9FC; }
tr.cancelled td { color: var(--dim); text-decoration: line-through; background: #F1F3F5; }
tr.cancelled td.act { text-decoration: none; }
tr.total td { font-weight: 700; background: #EAF0F6; }
.neg { color: var(--red-deep); font-weight: 700; }
.flag { display: inline-block; font-size: .85rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; background: var(--amber); color: #3a2a00; margin-right: .3rem; }
.flag.edit { background: #DCE8F4; color: #17405F; }
.acts { display: flex; gap: .5rem; flex-wrap: wrap; }
.acts button { font: inherit; font-size: .9rem; min-height: 44px; padding: .2rem .9rem; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; color: var(--ink); }
.acts button:hover:not(:disabled) { border-color: var(--flame-deep); }
.acts button:disabled { color: #6B7A89; cursor: not-allowed; }
.note { font-size: .9rem; color: var(--dim); }
.note.lock { display: inline-flex; gap: .4rem; align-items: center; max-width: 16rem; white-space: normal; overflow-wrap: anywhere; }
.pager { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.pager .count { color: var(--dim); font-weight: 600; }
a.linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; border-radius: 10px; border: 2px solid var(--line); font-weight: 600; color: var(--flame-deep); text-decoration: none; background: #fff; white-space: nowrap; }
a.linkbtn:hover { border-color: var(--flame-deep); }
.filterbtn { display: none; }
@media (max-width: 760px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { margin-bottom: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .4rem 0; box-shadow: var(--lift); }
  table.stack td { border: 0; padding: .3rem .9rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; font-size: 1rem; }
  table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--dim); text-align: left; flex: none; }
  table.stack td.n { text-align: right; }
  table.stack td.act { display: block; text-align: left; } table.stack td.act::before { content: none; }
  tr.total { padding: .5rem 0; }
  .tablewrap:has(table.stack) { box-shadow: none; overflow: visible; }
  .filterbtn { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
  .filters.closed { display: none; }
}
.seg { display: inline-flex; gap: 2px; margin-bottom: 1rem; flex-wrap: wrap; }
.seg button { font: inherit; font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; padding: .6rem 1.4rem; min-height: 48px; border: 0; background: #DCE5EE; color: var(--ink); cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
.seg button[aria-pressed="true"] { background: var(--night); color: #fff; box-shadow: inset 0 -4px 0 var(--flame); }

/* empty states */
.empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: 2.6rem 1rem; color: var(--dim); font-size: 1.05rem; }
.empty b { font-family: var(--head); font-size: 1.35rem; color: var(--ink); }
.dark .empty { color: var(--dim-dark); } .dark .empty b { color: #fff; }

/* ---------- login ---------- */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(800px 500px at 20% 10%, #1D4066 0%, transparent 60%), linear-gradient(160deg, var(--night), #17324D); }
.login { background: #fff; border-radius: 22px; padding: 2rem; max-width: 27rem; width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,.4); animation: pop-in .3s ease both; }
.login .brand { display: inline-flex; margin: 0 0 1.2rem; padding: .6rem 1.8rem .6rem 1.1rem; }
.pwrow { display: flex; gap: .5rem; }
.pwrow button { flex: none; min-width: 5.5rem; min-height: 58px; font: inherit; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; color: var(--ink); }

/* ---------- dashboard (dark control room) ---------- */
.dark main { max-width: var(--maxw); }
.dark h1, .dark h2 { color: #fff; }
.livebar { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.tiles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: .8rem; }
.tile { font: inherit; font-family: var(--head); background: var(--panel); color: #CFE0F0; border: 1px solid var(--edge); padding: .6rem 1.2rem; min-height: 48px; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%); transition: background .15s; }
.tile:hover:not(:disabled) { background: var(--edge); }
.tile[aria-pressed="true"] { background: var(--flame-deep); color: #fff; border-color: var(--flame-deep); font-weight: 700; }
.tile:disabled { color: #8FA6BF; background: var(--panel-2); border-style: dashed; cursor: default; }
.hero { display: grid; gap: 1.2rem; grid-template-columns: 1fr; background: radial-gradient(500px 260px at 15% 0%, rgba(20,184,166,.22), transparent 70%), linear-gradient(145deg, #15304A, #0E2236); border: 1px solid var(--edge); border-radius: 24px; padding: 1.4rem; margin: 1rem 0; box-shadow: 0 20px 44px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.07); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 1.8rem 2rem; } }
.herolbl { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--dim-dark); font-size: .95rem; }
.herovalue { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.hugenum { font-size: clamp(3.2rem, 11vw, 5.6rem); font-weight: 700; line-height: 1.05; color: #fff; text-shadow: 0 0 40px rgba(20,184,166,.35); }
.herovalue .unit { font-family: var(--head); font-size: 1.6rem; color: var(--teal); font-weight: 700; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1rem; }
.mini { background: rgba(255,255,255,.05); border-radius: 14px; padding: .7rem .9rem; border-top: 4px solid var(--c); }
.mini.sky { --c: var(--sky); } .mini.violet { --c: var(--violet); } .mini.rose { --c: var(--rose); }
.mini b { display: block; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.1; }
.mini span { font-size: .9rem; color: var(--dim-dark); }
.herogauge { text-align: center; }
.herogauge .gauge { width: 100%; max-width: 300px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.section { margin: 1.6rem 0 .2rem; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim-dark) !important; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.kpi { background: linear-gradient(160deg, #16314B, var(--panel)); border: 1px solid var(--edge); border-radius: var(--radius); padding: 1rem 1.2rem; border-top: 5px solid var(--c, var(--edge)); box-shadow: 0 10px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05); }
.kpi .lbl { color: var(--dim-dark); font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; margin: 0 0 .2rem; }
.kpi .num { font-size: clamp(1.7rem, 6vw, 2.5rem); font-weight: 700; line-height: 1.1; display: block; color: #fff; }
.kpi .unit { font-size: .95rem; color: var(--c, var(--dim-dark)); font-weight: 600; }
.kpi.teal { --c: var(--teal); } .kpi.sky { --c: var(--sky); } .kpi.violet { --c: var(--violet); } .kpi.rose { --c: var(--rose); } .kpi.flame { --c: var(--flame); } .kpi.amber { --c: var(--amber); }
.dgrid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .dgrid { grid-template-columns: 1fr 1fr; } .dgrid .wide { grid-column: 1 / -1; } .dgrid > :first-child { grid-column: 1 / -1; } }
.panelbox { background: linear-gradient(160deg, #15304A, var(--panel)); border: 1px solid var(--edge); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: 0 10px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05); }
.panelbox h2 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim-dark); }
.chartbox { position: relative; height: 340px; }
.chartbox.small { height: 260px; }
@media (max-width: 700px) { .chartbox { height: 280px; } .chartbox.small { height: 230px; } }
.gauge text { font-family: var(--head); }
.funnel { width: 100%; max-width: 520px; display: block; margin: 0 auto; }
.funnel text { font-family: var(--head); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .95rem; color: var(--dim-dark); margin-top: .6rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: .4rem; vertical-align: -2px; }
.top3 { list-style: none; padding: 0; margin: 0; }
.top3 li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--edge); font-size: 1.15rem; }
.top3 .rank { width: 34px; height: 34px; border-radius: 50%; background: var(--flame-deep); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; flex: none; }
.top3 .sname { flex: 1; }
.top3 b { font-size: 1.5rem; }
.look { list-style: none; padding: 0; margin: 0; }
.look li { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--edge); font-size: 1rem; }
.amberglyph { color: var(--amber); margin-top: .2rem; }
.okglyph { color: var(--ok); }
.allgood { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
a.amberlink { color: var(--amber); font-weight: 700; }
.dark table { background: var(--panel); color: #EAF2FA; } .dark td { border-color: var(--edge); }
.plantmap { min-height: 0; } /* reserved row for a future plant map */

/* mini bars on Daily sales */
.bars { display: flex; flex-direction: column; gap: 4px; min-width: 9rem; }
.bar { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.bar i { display: block; height: 14px; border-radius: 4px; background: var(--sky); min-width: 3px; }
.bar b { font-weight: 600; white-space: nowrap; }

.lg-sky { background: var(--sky); } .lg-flame { background: var(--flame); }
.sw0 { background: #38BDF8; } .sw1 { background: #14B8A6; } .sw2 { background: #A78BFA; } .sw3 { background: #FF6B1A; }
.sw4 { background: #FFC400; } .sw5 { background: #F43F5E; } .sw6 { background: #2ECC71; } .sw7 { background: #94A3B8; }

/* people who asked for less motion get none (every number and tick just appears) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* medium screens: keep the whole top bar on one line */
@media (min-width: 1101px) and (max-width: 1500px) {
  .tab { padding: .7rem 1.3rem .7rem .9rem; letter-spacing: .05em; }
  .badge .full { display: none; } .badge .short { display: inline; }
  .topbar { gap: .6rem; }
  .who .name { display: none; }
}

/* ---------- round 2: compact data tables, People menu, one look ---------- */
table.data td, table.data th { padding: .6rem .7rem; }
table.data td.what { min-width: 13rem; font-weight: 600; }
table.data td.notes { min-width: 8rem; overflow-wrap: anywhere; }
table.data td.by small { display: block; color: var(--dim); font-weight: 400; }
table.data td.act { white-space: nowrap; width: 1%; } table.data td.sz { white-space: nowrap; font-weight: 600; }
table.data .acts { flex-wrap: nowrap; }
table.data .note.lock { width: 14rem; }

table.data td.date { min-width: 6.5rem; white-space: normal; }
td:empty { padding: 0; }
.more { position: relative; display: inline-block; }
.more summary { list-style: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; min-height: 44px; padding: .2rem .9rem; border-radius: 10px; border: 2px solid var(--line); background: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '\25BE'; }
.more[open] summary { border-color: var(--flame-deep); }
.more .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(16,32,47,.25); border: 1px solid var(--line); padding: .4rem; display: flex; flex-direction: column; gap: .3rem; min-width: 13rem; }
.more .menu button { width: 100%; text-align: left; }
.acts button.main { background: var(--night); border-color: var(--night); color: #fff; }
.acts button.main:hover:not(:disabled) { background: var(--panel); border-color: var(--panel); }
.acts button.hot { background: var(--flame-deep); border-color: var(--flame-deep); }
.acts button.redbtn { color: var(--red-deep); border-color: #F2B8B4; }
table.people .acts { flex-wrap: nowrap; }
/* light pages get the same navy title band and orange edge as the dashboard's cards */
body:not(.dark) main > h1, body:not(.dark) .entrypage > h1 { background: linear-gradient(135deg, var(--night), #17324D); color: #fff; padding: .6rem 1.2rem; border-radius: var(--radius); border-left: 8px solid var(--flame); box-shadow: var(--lift); font-size: 1.6rem; }
@media (max-width: 760px) {
  table.data tr { display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; padding: .7rem .9rem; }
  table.data td { grid-column: 1 / -1; display: block; padding: .15rem 0; text-align: left; }
  table.data td::before { display: none; }
  table.data td.date { grid-column: 1; font-weight: 700; font-size: 1.1rem; }
  table.data td.sz { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; color: var(--flame-deep); }
  table.data td.what { font-size: 1.05rem; }
  table.data td.notes { color: var(--dim); }
  table.data td.by { color: var(--dim); font-size: .9rem; }
  table.data td.by small { display: inline; margin-left: .4rem; }
  table.data td.by::before { display: inline; content: 'by '; font-weight: 400; }
  table.data td.act { padding-top: .5rem; white-space: normal; width: auto; }
  table.data .note.lock { max-width: 100%; width: auto; }
  table.data .acts { flex-direction: row; flex-wrap: wrap; }
  table.data .acts button { width: auto; }
  table.people tr { padding: .6rem .9rem; }
  table.people td { padding: .2rem 0; }
  .more .menu { position: static; box-shadow: none; margin-top: .4rem; }
}
.bottombar a { font-size: .9rem; }
.tablewrap:has(table.people) { overflow: visible; }
table.people { overflow: visible; }
table.people th:first-child { border-top-left-radius: var(--radius); } table.people th:last-child { border-top-right-radius: var(--radius); }
@media (max-width: 760px) {
  table.people tr { display: flex; flex-wrap: wrap; gap: 0 1rem; }
  table.people td { display: block; width: auto; padding: .1rem 0; text-align: left; font-size: 1rem; }
  table.people td::before { display: none; }
  table.people td:first-child { width: 100%; font-size: 1.1rem; }
  table.people td.act { width: 100%; padding-top: .5rem; }
  table.people .acts { flex-wrap: wrap; }
}
table.data td.by small { font-size: .9rem; } @media (max-width: 760px) { table.data td.by small { font-size: 1em; } }
