/* Retribution Returns — Apple-style interface in the Retribution palette.
   Lotus Ivory #FFFFFA · Nile Sand #EEEBE3 · River Aoi #2C73BA · Retribution Blue #004A98 · Ink Night #000 */
:root {
  --ivory: #fffffa; --sand: #eeebe3; --aoi: #2c73ba; --blue: #004a98; --ink: #000;
  --bg: #f6f4ee;                       /* grouped background, a lighter Nile Sand */
  --card: #fff;
  --label2: rgba(40, 38, 32, .62);     /* secondary text */
  --sep: rgba(60, 56, 46, .14);        /* hairlines */
  --fill: rgba(120, 114, 98, .11);     /* fields, segmented track */
  --tint: rgba(0, 74, 152, .09);       /* tinted blue surfaces */
  --ok: #1d7a43; --ok-bg: rgba(29, 122, 67, .11);
  --warn: #9a5b00; --warn-bg: rgba(214, 142, 0, .14);
  --bad: #c4201b; --bad-bg: rgba(196, 32, 27, .09);
  --r-card: 18px; --r-ctl: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(60, 50, 20, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
  font: 16px/1.5 Helvetica, Arial, sans-serif; letter-spacing: 0; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 6px; }
h2 { font-size: 19px; line-height: 1.2; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 12px; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; margin: 0 0 2px; }
p { margin: 0 0 12px; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
.muted { color: var(--label2); } .small { font-size: 15px; } .foot { font-size: 13px; color: var(--label2); line-height: 1.4; }
.right { margin-inline-start: auto; } .hidden { display: none !important; } .center { text-align: center; }
.sec { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--label2); margin: 28px 4px 8px; }

/* Navigation bar */
.nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 20px;
  background: rgba(255, 255, 250, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; display: block; }
.brand small { font-size: 13px; font-weight: 500; color: var(--label2); margin-inline-start: 12px; padding-inline-start: 12px; border-inline-start: .5px solid var(--sep); line-height: 20px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 28px 16px 96px; }

/* Cards and grouped lists */
.card { background: var(--card); border-radius: var(--r-card); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; background: transparent; padding: 0; }
.card.tinted { background: var(--sand); box-shadow: none; }
.rows > * + * { border-top: .5px solid var(--sep); }
.kv { display: grid; grid-template-columns: 124px 1fr; gap: 8px 14px; margin: 0; font-size: 15px; }
.kv dt { color: var(--label2); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.sum { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 16px; }
.sum.total { border-top: .5px solid var(--sep); margin-top: 6px; padding-top: 12px; font-weight: 600; font-size: 17px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--label2); margin: 14px 2px 6px; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; font: inherit; font-size: 17px; color: inherit; background: var(--fill); border: 0; border-radius: var(--r-ctl); -webkit-appearance: none; appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23004a98' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea { min-height: 84px; resize: vertical; }
::placeholder { color: rgba(40, 38, 32, .38); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--aoi); outline-offset: 0; background: #fff; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--aoi); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; font-weight: 400; color: var(--ink); margin: 14px 0 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
.hint { font-size: 13px; color: var(--label2); margin: 5px 2px 0; }

/* Buttons */
.btn { text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; font: inherit; font-weight: 600; color: #fff; background: var(--blue);
  border: 0; border-radius: 14px; cursor: pointer; text-decoration: none !important; transition: opacity .15s, transform .1s; }
.btn:hover { opacity: .9; } .btn:active { transform: scale(.98); } .btn[disabled] { opacity: .4; cursor: default; }
.btn.tint { background: var(--tint); color: var(--blue); }
.btn.plain { background: transparent; color: var(--blue); padding: 0 8px; }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 16px; font-size: 13px; border-radius: 18px; }
.btn.full { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; background: var(--fill); border-radius: 10px; }
.seg button { font: inherit; font-size: 15px; font-weight: 500; min-height: 34px; padding: 0 16px; background: transparent; color: var(--ink); border: 0; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed=true], .seg button[aria-selected=true] { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.seg.accent button[aria-pressed=true] { background: var(--blue); color: #fff; }

/* Capsule tags */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; font-size: 13px; font-weight: 600; border-radius: 999px; background: var(--fill); color: var(--label2); white-space: nowrap; }
.tag.pending, .tag.due { background: var(--warn-bg); color: var(--warn); }
.tag.approved, .tag.received, .tag.stage { background: var(--tint); color: var(--blue); }
.tag.completed { background: var(--ok-bg); color: var(--ok); }
.tag.declined { background: var(--bad-bg); color: var(--bad); }

/* Notices */
.notice { border-radius: 14px; background: var(--tint); padding: 12px 16px; margin: 12px 0; font-size: 15px; }
.notice.bad { background: var(--bad-bg); color: #7d1410; } .notice.ok { background: var(--ok-bg); color: #12502c; } .notice.warn { background: var(--warn-bg); color: #5f3900; }

/* Order items */
.item { display: flex; gap: 14px; align-items: flex-start; }
.item img, .item .ph { width: 64px; height: 80px; object-fit: cover; background: var(--sand); border-radius: 10px; flex: none; }
.item .body { flex: 1; min-width: 0; }
.panel { margin-top: 16px; padding-top: 2px; border-top: .5px solid var(--sep); }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos .thumb { position: relative; width: 72px; height: 72px; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; }
.photos .thumb button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(60, 60, 67, .78); color: #fff; cursor: pointer; line-height: 1; padding: 0; }
.addphoto { position: relative; width: 72px; height: 72px; border-radius: 12px; display: grid; place-items: center; color: var(--blue); cursor: pointer; font-size: 28px; font-weight: 300; background: var(--tint); margin: 0; }
.addphoto input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Progress */
.steps { display: flex; gap: 4px; margin: 14px 0 6px; }
.steps span { flex: 1; height: 4px; background: var(--fill); border-radius: 2px; } .steps span.on { background: var(--blue); }
ol.track { list-style: none; margin: 12px 0 4px; padding: 0; font-size: 15px; }
ol.track li { position: relative; padding: 5px 0 5px 28px; color: var(--label2); }
ol.track li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--fill); }
ol.track li + li::after { content: ""; position: absolute; left: 9.5px; top: -12px; width: 1.5px; height: 20px; background: var(--fill); }
ol.track li.done { color: var(--ink); } ol.track li.done::before, ol.track li.done + li.done::after, ol.track li.done::after { background: var(--blue); }

/* Sheet (modal) */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .32); display: grid; place-items: start center; padding: 5vh 12px; overflow: auto; }
.sheet { width: 100%; max-width: 620px; background: var(--bg); border-radius: 22px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 26px; } .card { padding: 16px; } .kv { grid-template-columns: 104px 1fr; } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---- Gate pages (customer start + admin sign-in): glass card on a Retribution blue background ---- */
body.gate { min-height: 100vh; color: var(--ivory);
  background: radial-gradient(1100px 720px at 28% 38%, #2c73ba 0%, #004a98 34%, #00285a 72%, #00132e 100%) fixed; }
body.gate .nav { position: static; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; }
body.gate .brand img, .gate-logo { filter: brightness(0) invert(1); }
body.gate .nav .adminlink { color: var(--ivory) !important; opacity: .75 !important; }
body.gate .sec { color: rgba(255, 255, 250, .72); }
body.gate .wrap > .muted, body.gate .wrap > .foot, body.gate .wrap > .row .muted { color: rgba(255, 255, 250, .78); }
body.gate .wrap > .row .btn.plain { color: var(--ivory); }
body.gate .wrap > .row h1 { color: var(--ivory); }

.gate-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 72px; max-width: 1000px; margin: 0 auto; padding: 7vh 24px 80px; align-items: center; }
.gate-brand .gate-logo { height: 54px; width: auto; display: block; margin-bottom: 26px; }
.gate-brand h1 { font-size: 34px; margin: 0 0 10px; }
.gate-brand .lead { color: rgba(255, 255, 250, .8); font-size: 16px; margin: 0 0 28px; max-width: 460px; }
.feat { display: flex; gap: 14px; margin: 0 0 20px; max-width: 460px; }
.feat svg { flex: none; width: 22px; height: 22px; margin-top: 2px; stroke: var(--ivory); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.feat strong { display: block; font-weight: 600; font-size: 15px; }
.feat span { display: block; color: rgba(255, 255, 250, .72); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.rules { list-style: none; margin: 0; padding: 0; max-width: 460px; }
.rules li { position: relative; padding: 7px 0 7px 26px; font-size: 15px; color: rgba(255, 255, 250, .88); border-top: 1px solid rgba(255, 255, 250, .12); }
.rules li:first-child { border-top: 0; }
.rules li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--ivory); opacity: .85; }
.rules b { font-weight: 600; color: var(--ivory); }
.rules-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 250, .6); margin: 8px 0 6px; font-weight: 600; }

.glass { background: rgba(255, 255, 250, .09); border: 1px solid rgba(255, 255, 250, .24); border-radius: 20px; padding: 28px;
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 20px 60px rgba(0, 12, 40, .35); margin: 0; }
.glass h2 { font-size: 22px; margin: 0 0 6px; color: var(--ivory); }
.glass .sub { color: rgba(255, 255, 250, .7); font-size: 14px; margin: 0 0 8px; }
.glass label { color: rgba(255, 255, 250, .88); }
.glass input[type=text], .glass input[type=password] { background: rgba(255, 255, 250, .1); color: var(--ivory); border: 1px solid rgba(255, 255, 250, .26); }
.glass input:focus-visible { background: rgba(255, 255, 250, .16); outline: 2px solid rgba(255, 255, 250, .7); }
.glass ::placeholder { color: rgba(255, 255, 250, .45); }
.glass .btn { background: var(--ivory); color: var(--blue); }
.glass .btn:disabled { opacity: .6; }
.glass .notice.bad { background: rgba(255, 90, 80, .22); color: #ffe3e0; }
.pwbox { position: relative; } .pwbox input { padding-right: 46px; }
.pwbox button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: rgba(255, 255, 250, .75); cursor: pointer; display: grid; place-items: center; }
.pwbox svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) { .gate-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; } .gate-brand h1 { font-size: 28px; } .glass { order: -1; } }
body.hidebrand .nav .brand { visibility: hidden; }
.glass input:-webkit-autofill, .glass input:-webkit-autofill:focus { -webkit-text-fill-color: #fffffa; caret-color: #fffffa; box-shadow: 0 0 0 100px #12509f inset; transition: background-color 9999s; }
body.gate .nav .adminlink { margin-inline-start: auto; }

/* ---- Theme: the whole portal and dashboard in the same glass-on-blue style ---- */
body.theme { color: var(--ivory); min-height: 100vh;
  background: radial-gradient(1100px 720px at 28% 38%, #2c73ba 0%, #004a98 34%, #00285a 72%, #00132e 100%) fixed;
  --ink: #fffffa; --label2: rgba(255, 255, 250, .68); --sep: rgba(255, 255, 250, .16); --fill: rgba(255, 255, 250, .1);
  --tint: rgba(255, 255, 250, .12); --card: rgba(255, 255, 250, .09); --bg: transparent; --sand: rgba(255, 255, 250, .1);
  --blue: #fffffa; --aoi: #8fc0f5; --ok: #8be9b0; --ok-bg: rgba(60, 200, 120, .18); --warn: #ffd98a; --warn-bg: rgba(255, 190, 60, .18);
  --bad: #ffa8a1; --bad-bg: rgba(255, 90, 80, .2); --shadow: 0 12px 40px rgba(0, 12, 40, .3); }
body.theme .nav { background: rgba(0, 24, 58, .35); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255, 255, 250, .14); }
body.theme .nav .brand img { filter: brightness(0) invert(1); }
body.theme .card { background: var(--card); border: 1px solid rgba(255, 255, 250, .2); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
body.theme .card.flat { border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.theme .card.tinted { background: var(--fill); }
body.theme .btn { color: #004a98; }
body.theme .btn.tint, body.theme .btn.plain { color: var(--ivory); }
body.theme .btn.danger { color: var(--bad); }
body.theme .seg button[aria-pressed=true], body.theme .seg button[aria-selected=true] { background: rgba(255, 255, 250, .92); color: #004a98; }
body.theme .seg.accent button[aria-pressed=true] { background: var(--ivory); color: #004a98; }
body.theme input[type=text], body.theme input[type=password], body.theme input[type=number], body.theme input[type=search], body.theme select, body.theme textarea { background-color: rgba(255, 255, 250, .1); color: var(--ivory); border: 1px solid rgba(255, 255, 250, .24); }
body.theme input:focus-visible, body.theme select:focus-visible, body.theme textarea:focus-visible { background-color: rgba(255, 255, 250, .16); outline: 2px solid rgba(255, 255, 250, .7); }
body.theme ::placeholder { color: rgba(255, 255, 250, .45); }
body.theme select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fffffa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body.theme option { color: #000; background: #fff; }
body.theme input[type=checkbox] { accent-color: #fffffa; }
body.theme .notice.bad { color: #ffe3e0; } body.theme .notice.ok { color: #d2f7e0; } body.theme .notice.warn { color: #ffeabd; }
body.theme .sheet-bg { background: rgba(0, 10, 30, .55); }
body.theme .sheet { background: rgba(8, 50, 110, .92); border: 1px solid rgba(255, 255, 250, .2); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
body.theme a { color: var(--ivory); }
body.theme .gallery .d, body.theme .photos .thumb button { color: #fff; }
body.theme pre { color: var(--ivory); }
body.theme .photos .thumb button { border-color: rgba(255, 255, 250, .7); }

/* Scrollbars in the same glass style */
html { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 250, .38) rgba(0, 20, 50, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 20, 50, .35); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 250, .34); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 250, .55); background-clip: padding-box; border: 2px solid transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 250, .38) transparent; }
#tabs button { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }

/* Confirm dialog + ghost button */
.dlg-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 10, 30, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg { width: 100%; max-width: 380px; padding: 26px; border-radius: 20px; color: var(--ivory); background: rgba(8, 50, 110, .9); border: 1px solid rgba(255, 255, 250, .24); box-shadow: 0 20px 60px rgba(0, 12, 40, .5); }
.dlg h2 { margin: 0 0 8px; font-size: 20px; color: var(--ivory); }
.dlg p { margin: 0 0 20px; color: rgba(255, 255, 250, .82); }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg .btn { background: var(--ivory); color: #004a98; }
.dlg .btn.tint { background: rgba(255, 255, 250, .14); color: var(--ivory); }
.glass .btn.ghost { background: transparent; color: var(--ivory); border: 1px solid rgba(255, 255, 250, .32); min-height: 44px; }
.brand, .gate-logo { cursor: pointer; }

/* Smooth page changes: no white flash, no half-drawn page, soft cross-fade between pages */
html { background: #00132e; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#app { animation: pageIn .45s ease both; }
@media (prefers-reduced-motion: reduce) { #app { animation: none; } ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* Premium fade-in: slow ease-out, staggered, only during the first moments of a page load */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; } to { opacity: 1; } }
#app { animation: none; }
::view-transition-old(root) { animation: vtOut .28s ease both; }
::view-transition-new(root) { animation: vtIn .7s var(--ease-out) both; }
body.intro .nav { animation: fadeIn 1s ease both; }
body.intro .gate-brand > * { animation: riseIn 1.1s var(--ease-out) both; }
body.intro .gate-brand > :nth-child(1) { animation-delay: .05s; }
body.intro .gate-brand > :nth-child(2) { animation-delay: .15s; }
body.intro .gate-brand > :nth-child(3) { animation-delay: .25s; }
body.intro .gate-brand > :nth-child(4) { animation-delay: .35s; }
body.intro .gate-brand > :nth-child(5) { animation-delay: .45s; }
body.intro .gate-brand > :nth-child(6) { animation-delay: .55s; }
body.intro .gate-brand > :nth-child(n+7) { animation-delay: .65s; }
body.intro .gate-grid > .glass { animation: riseIn 1.2s var(--ease-out) .3s both; }
body.intro #app.wrap > * { animation: riseIn .9s var(--ease-out) both; }
body.intro #app.wrap > :nth-child(2) { animation-delay: .08s; }
body.intro #app.wrap > :nth-child(3) { animation-delay: .16s; }
body.intro #app.wrap > :nth-child(n+4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { body.intro * { animation: none !important; } }

.brand[data-noleave] { cursor: default; }

/* Phone: the logo lives in the header on the sign-in and returns pages, not in the content */
@media (max-width: 820px) {
  body.hidebrand .nav .brand { visibility: visible; }
  body.gate .nav .brand img { height: 34px; }
  .gate-brand .gate-logo { display: none; }
  .gate-grid { padding-top: 12px; }
}

/* Phone: header wraps (logo + sign out on top, menu below) and nothing may push the page wider than the screen */
body.theme { overflow-x: hidden; }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; row-gap: 8px; padding: 8px 14px; }
  .nav #logout { order: 2; margin-inline-start: auto; }
  .nav #tabs { order: 3; width: 100%; margin: 0; display: flex; }
  .nav #tabs.hidden { display: none; }
  .nav #tabs button { flex: 1; padding: 0 6px; font-size: 12px; letter-spacing: .04em; }
}

/* Checkboxes: drawn by us so the tick is always visible (cream box, blue tick) */
body.theme input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; min-height: 0; padding: 0; margin: 1px 0 0; flex: none; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 250, .72); border-radius: 7px; background: rgba(255, 255, 250, .08) center / 16px no-repeat; transition: background-color .15s, border-color .15s; }
body.theme input[type=checkbox]:checked { background-color: #fffffa; border-color: #fffffa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23004a98' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body.theme input[type=checkbox]:focus-visible { outline: 2px solid rgba(255, 255, 250, .8); outline-offset: 2px; }
/* The select arrow must survive focus (the base focus rule resets the background) */
body.theme select:focus-visible { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fffffa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* Phones: no blur layers and no fixed backgrounds (they glitch on mobile browsers and can paint over form fields) */
@media (max-width: 820px) {
  body.theme { background: radial-gradient(900px 600px at 30% 18%, #2c73ba 0%, #004a98 38%, #00285a 74%, #00132e 100%) scroll; background-color: #00132e; }
  body.theme .card, body.theme .glass, body.theme .list { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(8, 58, 122, .55); }
  body.theme .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 24, 58, .55); }
  body.theme .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.theme select, body.theme input[type=text], body.theme input[type=number], body.theme textarea { font-size: 16px; }
}

/* Insights filters */
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
body.theme input[type=date] { width: 100%; min-height: 46px; padding: 11px 14px; font: inherit; font-size: 16px; border-radius: var(--r-ctl); -webkit-appearance: none; appearance: none; background-color: rgba(255, 255, 250, .1); color: var(--ivory); border: 1px solid rgba(255, 255, 250, .24); color-scheme: dark; }
body.theme input[type=date]:focus-visible { background-color: rgba(255, 255, 250, .16); outline: 2px solid rgba(255, 255, 250, .7); }
