/* Staff area. Spreadsheet look; theme colours when the 2nd Armored theme is active, neutral otherwise. */
.ad2s {
	--s-paper: var(--wp--preset--color--sheet, #f7f4ec);
	--s-ground: var(--wp--preset--color--khaki, #ece6d6);
	--s-ink: var(--wp--preset--color--ink, #23261d);
	--s-muted: var(--wp--preset--color--muted, #5d6150);
	--s-rule: var(--wp--preset--color--rule, #c9bf9f);
	--s-accent: var(--wp--preset--color--red, #a3241c);
	--s-olive: var(--wp--preset--color--olive, #4b5236);
	--s-olive-ink: var(--wp--preset--color--olive-ink, #eef0e4);
	--s-gold: var(--wp--preset--color--gold, #e3b22b);
	--s-label: var(--wp--preset--font-family--condensed, "Arial Narrow", sans-serif);
	--s-type: var(--wp--preset--font-family--typewriter, "Courier New", monospace);
	--s-grid: "Segoe UI", Calibri, Roboto, system-ui, sans-serif;
	color: var(--s-ink);
}
.ad2s, .ad2s *, .ad2s *::before, .ad2s *::after, .ad2s-panel *, .ad2s-panel *::before { box-sizing: border-box; }
.ad2s-app { max-width: 1400px !important; width: 100%; margin: clamp(20px, 4vw, 40px) auto !important; }
.ad2s-eyebrow { font-family: var(--s-type); font-size: .85rem; color: var(--s-muted); margin: 0 0 4px; }
.ad2s-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.ad2s-small { font-size: .85rem; color: var(--s-muted); }

/* Login */
.ad2s-login { max-width: 460px; margin: clamp(32px, 8vw, 80px) auto; background: var(--s-paper); border: 1px solid var(--s-rule); border-top: 6px solid var(--s-olive); padding: clamp(20px, 5vw, 36px); }
.ad2s-login form p { margin: 0 0 14px; }
.ad2s-login label { display: block; font-family: var(--s-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin-bottom: 6px; }
.ad2s-login .login-remember label { display: inline; text-transform: none; letter-spacing: 0; font-weight: 400; font-family: inherit; }
.ad2s-login input[type=text], .ad2s-login input[type=password] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); color: var(--s-ink); }
.ad2s-login input[type=submit] { font-family: var(--s-label); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--s-accent); color: #fff7ec; border: 0; padding: 12px 22px; cursor: pointer; }

/* Header and toolbar */
.ad2s-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; border-bottom: 4px solid var(--s-gold); padding-bottom: 12px; margin-bottom: 16px; }
.ad2s-user { margin: 0; font-size: .9rem; }
.ad2s-forms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ad2s-forms a { padding: 6px 12px; border: 1px solid var(--s-rule); text-decoration: none; color: inherit; }
.ad2s-forms a[aria-current] { background: var(--s-olive); color: var(--s-olive-ink); border-color: var(--s-olive); }
.ad2s-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ad2s-chips, .ad2s-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ad2s-chip { font: inherit; font-size: .85rem; padding: 6px 10px; border: 1px solid var(--s-rule); background: var(--s-paper); color: var(--s-ink); cursor: pointer; }
.ad2s-chip b { font-variant-numeric: tabular-nums; }
.ad2s-chip[aria-pressed="true"] { background: var(--s-ink); color: var(--s-paper); border-color: var(--s-ink); }
.ad2s-tools input[type=search] { font: inherit; padding: 7px 10px; border: 1px solid var(--s-rule); background: #fff; color: #1d2327; min-width: 220px; }
.ad2s-check { font-size: .85rem; display: flex; gap: 6px; align-items: center; }
.ad2s-btn { font-family: var(--s-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--s-accent); color: #fff7ec; border: 0; padding: 9px 14px; cursor: pointer; }
.ad2s-btn--excel { background: #1d6f42; }
.ad2s-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ad2s-info { margin: 4px 0 8px; }
.ad2s :focus-visible, .ad2s-panel :focus-visible { outline: 3px solid var(--s-gold); outline-offset: 1px; }

/* The sheet: spreadsheet look, always light for legibility */
.ad2s-sheet { overflow: auto; max-height: 72vh; border: 1px solid #b7b7b7; background: #fff; font-family: var(--s-grid); font-size: 13px; color: #1d2327; }
.ad2s-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.ad2s-grid th, .ad2s-grid td { border-right: 1px solid #d4d4d4; border-bottom: 1px solid #d4d4d4; padding: 4px 8px; text-align: left; vertical-align: top; white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.ad2s-grid td.is-long { min-width: 200px; max-width: 260px; }
.ad2s-grid td.is-num { font-variant-numeric: tabular-nums; }
.ad2s-grid thead th { position: sticky; z-index: 2; }
.ad2s-letters th { top: 0; height: 22px; background: #efefef; color: #555; font-weight: 400; text-align: center; font-size: 12px; }
.ad2s-grid thead tr:nth-child(2) th { top: 22px; background: var(--s-olive); color: #fff; font-weight: 600; white-space: normal; min-width: 110px; vertical-align: bottom; }
.ad2s-grid thead tr:nth-child(2) th.is-sensitive { background: #7d4b1a; }
.ad2s-filters th { top: 64px; background: #f6f6f6; padding: 3px 4px; }
.ad2s-filters input { width: 100%; min-width: 80px; font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid #ccc; background: #fff; color: #1d2327; }
.ad2s-sort { all: unset; cursor: pointer; display: block; width: 100%; }
.ad2s-sort:focus-visible { outline: 2px solid var(--s-gold); }
.ad2s-rownum, .ad2s-corner { position: sticky; left: 0; z-index: 1; background: #efefef !important; color: #555; text-align: center !important; font-weight: 400 !important; min-width: 40px; width: 40px; font-variant-numeric: tabular-nums; }
.ad2s-grid thead .ad2s-corner { z-index: 4; }
.ad2s-grid thead tr:nth-child(2) .ad2s-corner { background: #e2e2e2 !important; }
.ad2s-stick1 { position: sticky; left: 40px; z-index: 1; box-shadow: 2px 0 0 #b7b7b7; min-width: 150px; }
.ad2s-grid thead .ad2s-stick1 { z-index: 3; }
.ad2s-grid tbody tr:hover td, .ad2s-grid tbody tr:hover .ad2s-rownum { background: #fff7d6 !important; }
.ad2s-grid tbody tr.is-open td { background: #e8f0e0 !important; }
.ad2s-ref { all: unset; cursor: pointer; font-weight: 700; color: #135e96; text-decoration: underline; }
.ad2s-dup { display: inline-block; margin-left: 6px; padding: 0 5px; background: #f4d9d7; color: #7d1a14; font-size: 11px; font-weight: 600; border-radius: 2px; }
.ad2s-status, .ad2s-status-select { font: inherit; font-size: 12px; font-weight: 600; padding: 2px 6px; border: 1px solid transparent; border-radius: 2px; }
.ad2s-status-select { cursor: pointer; border-color: #ccc; }
.ad2s-status--new { background: #fcf0d0; color: #6e4a00; }
.ad2s-status--deposit_paid { background: #dbe8f7; color: #163d6b; }
.ad2s-status--paid { background: #d7ead9; color: #1e4620; }
.ad2s-status--waitlist { background: #ece4f5; color: #4a2a6e; }
.ad2s-status--cancelled { background: #f4d9d7; color: #7d1a14; }
.ad2s-empty { border: 1px dashed var(--s-rule); padding: 20px; margin-top: 10px; background: var(--s-paper); }

/* Detail panel */
.ad2s-shade { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 9998; }
aside.ad2s-panel {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 9999;
	width: min(560px, 100vw);
	overflow-y: auto;
	background: var(--wp--preset--color--sheet, #f7f4ec);
	color: var(--wp--preset--color--ink, #23261d);
	box-shadow: -10px 0 30px rgba(0, 0, 0, .25);
	padding: calc(18px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 22px;
	font-size: .95rem;
}
.ad2s-panel__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; border-bottom: 4px solid var(--wp--preset--color--gold, #e3b22b); padding-bottom: 10px; }
.ad2s-panel__head h2 { margin: 0; font-size: 1.6rem; }
.ad2s-close { font-size: 2rem; line-height: 1; background: none; border: 0; cursor: pointer; color: inherit; padding: 0 4px; }
.ad2s-panel__sec { padding: 14px 0; border-bottom: 1px dashed var(--wp--preset--color--rule, #c9bf9f); }
.ad2s-panel__sec h3 { margin: 0 0 8px; font-size: 1rem; }
.ad2s-panel__sec dl { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.ad2s-panel__sec dt { font-weight: 600; color: var(--wp--preset--color--muted, #5d6150); font-size: .85rem; }
.ad2s-panel__sec dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.ad2s-panel__sec dd.is-empty { color: #8c8f94; font-style: italic; }
.ad2s-panel__follow { display: grid; gap: 6px; justify-items: start; }
.ad2s-panel__follow label { font-weight: 600; font-size: .85rem; margin-top: 6px; }
.ad2s-panel__follow textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--wp--preset--color--rule, #c9bf9f); background: #fff; color: #1d2327; }
body.ad2s-panel-open { overflow: hidden; }

.ad2s-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: #1e4620; color: #fff; padding: 10px 18px; z-index: 10000; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; font-size: .95rem; }
.ad2s-toast.is-bad { background: #7d1a14; }
.ad2s-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .ad2s-toast { transition: none; } }
@media (max-width: 600px) {
	.ad2s-tools input[type=search] { min-width: 0; flex: 1 1 100%; }
	.ad2s-sheet { max-height: 65vh; }
}

/* ---------- Portal (v1.2) ---------- */
.ad2s-stamp {
	display: inline-block;
	font-family: var(--s-type);
	font-size: .85rem;
	line-height: 1;
	color: var(--s-accent);
	border: 2px solid currentColor;
	padding: 5px 8px;
	transform: rotate(-3deg);
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 12px;
}
.ad2s-stamp--small { font-size: .7rem; padding: 3px 6px; margin: 0 6px 0 0; }
.ad2s-eyebrow a { color: inherit; }
.ad2s-lede { max-width: 65ch; margin: 0 0 24px; }
.ad2s-h2 { font-size: 1.35rem; margin: 0 0 12px; }
.ad2s-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.ad2s-card { background: var(--s-paper); border: 1px solid var(--s-rule); border-top: 6px solid var(--s-accent); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ad2s-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad2s-code { font-family: var(--wp--preset--font-family--stencil, Impact, sans-serif); font-size: 1.9rem; line-height: 1; color: var(--s-accent); }
.ad2s-pill { font-size: .78rem; font-weight: 600; padding: 3px 9px; background: #dcdcde; color: #1d2327; }
.ad2s-pill.is-open { background: #d7ead9; color: #1e4620; }
.ad2s-card__title { margin: 0; font-size: 1.25rem; }
.ad2s-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--s-rule); border: 1px solid var(--s-rule); margin: 0; }
.ad2s-stats > div { background: var(--s-ground); padding: 8px 10px; min-width: 0; }
.ad2s-stats dt { font-family: var(--s-label); font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--s-muted); }
.ad2s-stats dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ad2s-stats .is-total dd { color: var(--s-accent); }
.ad2s-card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ad2s-card__actions .ad2s-btn { text-decoration: none; display: inline-block; }
.ad2s-link { font-size: .9rem; color: inherit; }

/* ---------- Import (v1.3) ---------- */
.ad2s-forms__action { margin-left: auto; font-weight: 600; border-style: dashed !important; }
.ad2s-import { display: grid; gap: 16px; }
.ad2s-import .ad2s-card { border-top-color: var(--s-olive); }
.ad2s-steps { display: flex; flex-wrap: wrap; gap: 0; margin: 0; font-family: var(--s-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.ad2s-steps span { padding: 6px 12px; border: 1px solid var(--s-rule); margin-right: -1px; color: var(--s-muted); background: var(--s-paper); }
.ad2s-steps span[aria-current] { background: var(--s-olive); color: var(--s-olive-ink); border-color: var(--s-olive); }
.ad2s-h3 { font-size: 1.1rem; margin: 8px 0 0; }
.ad2s-upload { display: grid; gap: 8px; justify-items: start; }
.ad2s-upload label { font-weight: 600; }
.ad2s-upload input[type=file] { font: inherit; padding: 10px; border: 1px dashed var(--s-olive); background: var(--s-ground); max-width: 100%; }
.ad2s-alert { background: #fbeceb; color: #7d1a14; border-left: 4px solid var(--s-accent); padding: 12px 16px; }
.ad2s-sheet--map { max-height: none; }
.ad2s-map td:first-child { min-width: 260px; max-width: 420px; }
.ad2s-map select { font: inherit; font-size: 13px; padding: 3px 4px; max-width: 280px; }
.ad2s-map tr.is-ignored td { color: #8c8f94; }
.ad2s-rem { white-space: normal !important; min-width: 280px; }
.ad2s-import__options p { margin: 0 0 10px; }
.ad2s-import__options select { font: inherit; padding: 4px 6px; }

/* ---------- Full screen (v1.4) ---------- */
.ad2s-btn--ghost { background: transparent; color: var(--s-ink); border: 2px solid var(--s-ink); padding: 7px 12px; }
.ad2s-full::before { content: "⤢ "; }
.ad2s-full[aria-pressed="true"]::before { content: "⤡ "; }
.ad2s-app:fullscreen, .ad2s-app:-webkit-full-screen, .ad2s-app.is-expanded {
	max-width: none !important;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	overflow: auto;
	background: var(--wp--preset--color--khaki, #ece6d6);
	padding: max(14px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
.ad2s-app.is-expanded { position: fixed; inset: 0; z-index: 9990; }
html.ad2s-expanded, html.ad2s-expanded body { overflow: hidden; }
.ad2s-app:fullscreen .ad2s-top, .ad2s-app.is-expanded .ad2s-top { padding-bottom: 6px; margin-bottom: 10px; }
.ad2s-app:fullscreen .ad2s-title, .ad2s-app.is-expanded .ad2s-title { font-size: 1.4rem; }
.ad2s-app:fullscreen .ad2s-sheet, .ad2s-app.is-expanded .ad2s-sheet { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }

/* ---------- Log in / request an account (v1.4) ---------- */
.ad2s-tabs { display: flex; border-bottom: 2px solid var(--s-olive); margin: 18px 0 16px; }
.ad2s-tabs a { padding: 9px 14px; text-decoration: none; color: var(--s-muted); font-family: var(--s-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }
.ad2s-tabs a[aria-selected="true"] { background: var(--s-olive); color: var(--s-olive-ink); }
.ad2s-auth p { margin: 0 0 14px; }
.ad2s-auth label { display: block; font-family: var(--s-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin-bottom: 6px; }
.ad2s-auth .ad2s-remember label { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-weight: 400; font-family: inherit; font-size: .95rem; }
.ad2s-auth input[type=text], .ad2s-auth input[type=email], .ad2s-auth input[type=password], .ad2s-auth textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); color: var(--s-ink); }
.ad2s-auth [aria-invalid="true"] { border-color: var(--s-accent); }
.ad2s-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.ad2s-hint, .ad2s-field-error { display: block; font-size: .85rem; margin-top: 4px; }
.ad2s-hint { color: var(--s-muted); }
.ad2s-field-error { color: var(--s-accent); font-weight: 600; }
.ad2s-ok { background: #e3efe0; border-left: 4px solid #1e4620; padding: 12px 16px; margin: 16px 0; }
.ad2s-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ad2s-notice { background: #fcf0d0; border-left: 4px solid var(--s-gold); padding: 10px 14px; margin: 0 0 18px; }
.ad2s-login .ad2s-alert { margin: 0 0 14px; }

/* ---------- Troop roster (v1.5) ---------- */
.ad2s-h2--gap { margin-top: 28px; }
.ad2s-card--olive { border-top-color: var(--s-olive); }
.ad2s-card--olive .ad2s-code { color: var(--s-olive); }
.ad2s-roster { display: grid; gap: 14px; }
.ad2s-roster__forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.ad2s-roster__forms .ad2s-card { border-top-color: var(--s-olive); gap: 8px; }
.ad2s-roster__forms p { margin: 0; }
.ad2s-roster__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 12px; }
.ad2s-roster label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.ad2s-roster .ad2s-check { display: flex; font-weight: 400; }
.ad2s-roster input:not([type=checkbox]):not([type=file]) { width: 100%; font: inherit; padding: 7px 10px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); color: var(--s-ink); }
.ad2s-linkbtn { all: unset; cursor: pointer; color: #b32d2e; text-decoration: underline; font-size: 12px; }
.ad2s-linkbtn:focus-visible { outline: 2px solid var(--s-gold); }
a.ad2s-btn { text-decoration: none; display: inline-block; }

/* ---------- Money and logistics (v1.6) ---------- */
.ad2s-forms__tab { font-weight: 600; }
.ad2s-grid td.is-due { color: #8a3b00; font-weight: 600; }
.ad2s-grid td.is-clear { color: #1e4620; }
.ad2s-pay__sum { margin: 0 0 8px; }
.ad2s-pay__sum .is-due { color: #8a3b00; }
.ad2s-pay__sum .is-clear { color: #1e4620; }
.ad2s-pays { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--s-rule); }
.ad2s-pay { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--s-rule); }
.ad2s-pay__amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.ad2s-pay__amt.is-neg, .ad2s-grid td.is-neg { color: #b32d2e; }
.ad2s-pay__meta { font-size: .85rem; color: var(--s-muted); overflow-wrap: anywhere; }
.ad2s-pay__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 6px; }
.ad2s-pay__form p { margin: 0; }
.ad2s-pay__form .is-wide { grid-column: 1 / -1; }
.ad2s-pay__form label { display: block; font-weight: 600; font-size: .8rem; margin-bottom: 3px; }
.ad2s-pay__form input, .ad2s-pay__form select { width: 100%; font: inherit; font-size: .9rem; padding: 6px 8px; border: 1px solid var(--s-rule); background: #fff; color: #1d2327; }
.ad2s-panel__sec dl { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 6px 12px; margin: 0; }

.ad2s-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1px; background: var(--s-rule); border: 1px solid var(--s-rule); margin: 8px 0 18px; }
.ad2s-kpi { background: var(--s-paper); padding: 14px 16px; min-width: 0; border-top: 4px solid transparent; }
.ad2s-kpi.is-warn { border-top-color: var(--s-gold); }
.ad2s-kpi.is-bad { border-top-color: var(--s-accent); }
.ad2s-kpi.is-good { border-top-color: #1e4620; }
.ad2s-kpi__label { margin: 0; font-family: var(--s-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; color: var(--s-muted); }
.ad2s-kpi__value { margin: 4px 0 2px; font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ad2s-kpi__value small { font-size: .8rem; font-weight: 400; color: var(--s-muted); }
.ad2s-kpi__sub { margin: 0; font-size: .82rem; color: var(--s-muted); }
.ad2s-kpi.is-bad .ad2s-kpi__value { color: var(--s-accent); }
.ad2s-fin__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 860px) { .ad2s-fin__grid { grid-template-columns: minmax(0, 1fr); } }
.ad2s-fin__fee p, .ad2s-fin__add p { margin: 0 0 10px; }
.ad2s-fin label, .ad2s-fin__add label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.ad2s-fin input:not([type=checkbox]), .ad2s-fin select { width: 100%; font: inherit; padding: 7px 10px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); color: var(--s-ink); }
.ad2s-fin__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; }
.ad2s-fin__fields .is-wide { grid-column: span 2; }
@media (max-width: 500px) { .ad2s-fin__fields .is-wide { grid-column: auto; } }
.ad2s-grid .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.ad2s-fin__cats tr.is-income td:first-child::before, .ad2s-fin__lines tr.is-income td:first-child::before { content: "+ "; color: #1e4620; font-weight: 700; }
.ad2s-fin__cats tr.is-expense td:first-child::before { content: "− "; color: #b32d2e; font-weight: 700; }
.ad2s-fin__actions details { position: relative; }
.ad2s-fin__actions summary { cursor: pointer; color: #135e96; text-decoration: underline; }
.ad2s-fin__actions details[open] form:first-of-type { display: grid; gap: 6px; min-width: 240px; padding: 8px 0; white-space: normal; }
.ad2s-fin__actions details[open] { white-space: normal; }
.ad2s-card__money { margin: 0; }

/* iPhone: 16px text in every staff field so Safari does not zoom on tap. */
@media (max-width: 1024px) {
	.ad2s input, .ad2s select, .ad2s textarea, aside.ad2s-panel input, aside.ad2s-panel select, aside.ad2s-panel textarea { font-size: 16px !important; }
}
.ad2s input[type=date] { -webkit-appearance: none; appearance: none; min-height: 2.4em; }

/* Editing answers, confirmation pop-up, history, edit log (v1.7) */
.ad2s-confirm-shade { position: fixed; inset: 0; background: rgba(20, 22, 15, .6); z-index: 10001; }
.ad2s-confirm { position: fixed; z-index: 10002; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--s-paper); border-top: 6px solid var(--s-accent); padding: 20px clamp(16px, 4vw, 26px); box-shadow: 0 16px 48px rgba(0,0,0,.4); font-family: var(--s-grid); }
.ad2s-confirm h2 { margin: 0 0 6px; font-size: 1.3rem; }
.ad2s-confirm__list { list-style: none; margin: 10px 0 14px; padding: 0; border: 1px solid var(--s-rule); background: #fff; max-height: 45vh; overflow: auto; }
.ad2s-confirm__list li { padding: 8px 10px; }
.ad2s-confirm__list li + li { border-top: 1px solid #eee; }
.ad2s-confirm__diff { overflow-wrap: anywhere; margin-top: 2px; }
.ad2s-confirm label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.ad2s-confirm input[type=text] { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--s-rule); background: #fff; color: #1d2327; }
.ad2s-confirm__bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ad2s-confirm del, .ad2s-history del, .ad2s-logtable del { color: #8a2424; background: #fbeaea; }
.ad2s-confirm ins, .ad2s-history ins, .ad2s-logtable ins { color: #1e4620; background: #e6f2e7; text-decoration: none; }

.ad2s-panel__answers { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad2s-panel__answers h3 { margin: 0; }
.ad2s-edit__row { margin: 0 0 12px; }
.ad2s-edit__row > label, .ad2s-edit__group legend { display: block; font-size: .85rem; font-weight: 600; color: var(--s-muted); margin-bottom: 4px; padding: 0; }
.ad2s-edit__row input:not([type=checkbox]), .ad2s-edit__row select, .ad2s-edit__row textarea { width: 100%; max-width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: #fff; color: #1d2327; -webkit-appearance: none; appearance: none; min-height: 40px; }
.ad2s-edit__row select { -webkit-appearance: menulist; appearance: auto; }
.ad2s-edit__group { border: 0; margin: 0; padding: 0; }
.ad2s-edit__group .ad2s-check { margin: 4px 0; }
.ad2s-edit__row.is-sensitive > label::after { content: " · ID / medical"; color: var(--s-accent); font-weight: 400; }
.ad2s-editbar { position: sticky; bottom: 0; z-index: 2; background: var(--s-olive); color: var(--s-olive-ink); padding: 12px 16px; margin: 0 -1px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.ad2s-editbar .ad2s-small { color: var(--s-olive-ink); margin: 0; flex: 1 1 220px; }
.ad2s-editbar > div { display: flex; gap: 8px; }
.ad2s-editbar .ad2s-btn--ghost { color: var(--s-olive-ink); border-color: var(--s-olive-ink); }

.ad2s-history__list { list-style: none; margin: 8px 0 0; padding: 0; }
.ad2s-history__list > li { padding: 8px 0; border-top: 1px solid var(--s-rule); font-size: .9rem; }
.ad2s-history__head { margin: 0 0 4px; }
.ad2s-history__list ul { margin: 0; padding-left: 18px; }
.ad2s-history__list li li { overflow-wrap: anywhere; }

.ad2s-logsearch { display: flex; gap: 6px; }
.ad2s-logtable { border-collapse: collapse; width: 100%; font-family: var(--s-grid); font-size: 13px; background: #fff; }
.ad2s-logtable th { background: var(--s-olive); color: var(--s-olive-ink); text-align: left; padding: 7px 10px; position: sticky; top: 0; }
.ad2s-logtable td { padding: 7px 10px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.ad2s-logtable ul { margin: 0; padding-left: 16px; }
.ad2s-logtable li { overflow-wrap: anywhere; max-width: 520px; }
.ad2s-logtable .is-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad2s-pager { margin-top: 10px; }
@media (max-width: 1024px) { .ad2s-confirm input { font-size: 16px !important; } }

/* ---------- Troop roster: country, sort and filter (v1.10) ---------- */
.ad2s-roster select { width: 100%; font: inherit; padding: 7px 10px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); color: var(--s-ink); }
.ad2s-roster__forms .ad2s-card.is-editing { outline: 3px solid var(--s-gold); outline-offset: 2px; transition: outline-color .4s; }
.ad2s-rtools { flex-wrap: wrap; gap: 8px 16px; }
.ad2s-rtools .ad2s-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ad2s-cfilter { position: relative; }
.ad2s-cfilter summary { list-style: none; cursor: pointer; padding: 7px 12px; border: 1px solid var(--s-rule); border-bottom: 2px solid var(--s-olive); background: var(--s-ground); white-space: nowrap; }
.ad2s-cfilter summary::-webkit-details-marker { display: none; }
.ad2s-cfilter summary::after { content: " ▾"; color: var(--s-muted); }
.ad2s-cfilter[open] summary::after { content: " ▴"; }
.ad2s-cfilter summary:focus-visible { outline: 2px solid var(--s-gold); }
.ad2s-cfilter__pop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(300px, calc(100vw - 32px)); max-height: 360px; overflow: auto; background: var(--s-paper, #fff); border: 1px solid var(--s-rule); box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 10px 12px; }
.ad2s-cfilter__bar { display: flex; gap: 14px; margin: 0 0 8px; }
.ad2s-roster .ad2s-cfilter__q { margin: 0 0 8px; }
.ad2s-cfilter__list { list-style: none; margin: 0; padding: 0; }
.ad2s-cfilter__list li { padding: 3px 0; }
.ad2s-roster .ad2s-cfilter__list label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: .92rem; cursor: pointer; }
.ad2s-cfilter__list span { flex: 1; }
.ad2s-cfilter__list small { color: var(--s-muted); font-variant-numeric: tabular-nums; }
.ad2s-linkbtn--plain { color: inherit; }
.ad2s-rsort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; width: 100%; }
.ad2s-rsort:focus-visible { outline: 2px solid var(--s-gold); }
.ad2s-rsort__i::after { content: "↕"; opacity: .45; font-size: .85em; }
th[aria-sort="ascending"] .ad2s-rsort__i::after { content: "▲"; opacity: 1; }
th[aria-sort="descending"] .ad2s-rsort__i::after { content: "▼"; opacity: 1; }
.ad2s-roster-table td.is-unknown { color: #8a3b00; font-style: italic; }
.ad2s-ractions { display: flex; gap: 12px; align-items: baseline; }
.ad2s-ractions form { margin: 0; }
.ad2s-roster .ad2s-rtools #ad2s-r-q { width: min(100%, 320px); }
.ad2s-rtools > .ad2s-tools:first-child { flex: 1 1 520px; }

/* Event Logistics summary: registered fleet, selected fleet, capacity and weapons. */
.ad2s .ad2s-kpis--logistics{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:700px){.ad2s .ad2s-kpis--logistics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.ad2s-status--pending{background:#fff1c6;color:#74510d}
.ad2s-status--vetted{background:#dfebdf;color:#27522d}
.ad2s-status--rejected{background:#f1d5d2;color:#802b23}
