/* Shared look for the website's working copies of Endler screens (products, sales, deliveries). Same colours, fonts and
   pieces as the real back office (apps/admin styles/tokens.css), drawn at 1280 x 800 without the side menu. */
@font-face { font-family: "Manrope"; font-weight: 500 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 400 600; font-display: swap; src: url("../fonts/work-sans-latin.woff2") format("woff2"); }
:root {
  --bg-page: #0d1210; --bg-panel: #161c19; --bg-inset: #121613; --card-border: #232b27; --divider: #1e2521;
  --text: #eef2f0; --muted: #93a099; --accent: #34d399; --accent-soft: #1c2521; --warning: #f59e0b; --error: #f87171; --blue: #60a5fa;
  --heading: "Manrope", sans-serif; --body: "Work Sans", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 1280px; height: 800px; background: var(--bg-page); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.top { flex: none; height: 77px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--divider); background: #111714; }
.top h1 { margin: 0 auto 0 0; font: 700 20px var(--heading); }
.top .note { color: var(--muted); font-size: 13.5px; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 28px; display: flex; flex-direction: column; gap: 24px; scrollbar-width: thin; scrollbar-color: #2a332e transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--bg-panel); font: 700 14px var(--heading); white-space: nowrap; }
.btn:hover { border-color: #33403a; }
.btn.primary { background: var(--accent); color: #0b1410; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { background: #1e2723; color: #5d6a63; cursor: default; filter: none; }
.btn.small { height: 34px; padding: 0 11px; font-size: 13px; }
.btn.danger { color: var(--error); }
.btn.green { color: var(--accent); }

.card { background: var(--bg-panel); border: 1px solid var(--card-border); border-radius: 16px; }
.label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sub { color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font: 700 13px var(--heading); }
.field > span small { color: var(--muted); font: 400 12px var(--body); }
.input, select.input { height: 40px; border-radius: 9px; border: 1px solid var(--card-border); background: var(--bg-inset); padding: 0 12px; outline: 0; width: 100%; font-size: 14.5px; }
.input:focus { border-color: var(--accent); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.money { position: relative; }
.money::before { content: "£"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.money .input { padding-left: 26px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; }

.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.green { background: rgba(52, 211, 153, 0.14); color: var(--accent); }
.chip.amber { background: rgba(245, 158, 11, 0.16); color: var(--warning); }
.chip.blue { background: rgba(96, 165, 250, 0.16); color: var(--blue); }
.chip.red { background: rgba(248, 113, 113, 0.15); color: var(--error); }
.chip.grey { background: #1f2623; color: #c9d1cd; font-weight: 600; }

.toggle { width: 38px; height: 22px; border-radius: 999px; border: 0; background: #2a332e; position: relative; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #eef2f0; transition: left 0.15s; }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { left: 19px; }
.check { width: 22px; height: 22px; border-radius: 6px; border: 1px solid #33403a; background: var(--bg-inset); display: flex; align-items: center; justify-content: center; padding: 0; color: #0b1410; }
.check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.check svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.check[aria-checked="true"] svg { opacity: 1; }

.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(5, 8, 7, 0.62); display: flex; align-items: center; justify-content: center; animation: fade 0.15s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #171d1a; border: 1px solid #2a332e; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); animation: rise 0.18s ease-out; display: flex; flex-direction: column; max-height: 740px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--card-border); font: 700 19px var(--heading); }
.m-body { padding: 20px 24px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--card-border); }
.iconbtn { width: 30px; height: 30px; border: 0; background: none; color: var(--muted); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0; }
.iconbtn:hover { color: var(--text); background: var(--bg-panel); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; background: #1d2a24; border: 1px solid #2d5a45; color: var(--text); padding: 12px 18px; border-radius: 12px; font: 600 14px var(--heading); display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); animation: rise 0.18s ease-out; }
.toast svg { color: var(--accent); }
