:root {
  --bg: #1d242c;
  --panel: #26303a;
  --line: #3a4654;
  --text: #ebe6d8;
  --muted: #9aa5b1;
  --accent: #e2a93b;
  --tank: #8bb174;
  --air: #6fa8dc;
  --missile: #e07a5f;
  --mixed: #b9a0d6;
  --radius: 6px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Barlow, system-ui, sans-serif; }
h1, h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .02em; margin: 0; }
h2 { font-size: 1.4rem; margin: 1.75rem 0 .75rem; }
h2:first-child { margin-top: 0; }

.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
       padding: .75rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 1.7rem; }
#status { flex: 1; color: var(--muted); font-size: .9rem; }
#status.dirty { color: var(--accent); }
#status.error { color: var(--missile); }
.actions { display: flex; gap: .5rem; }

button, .btn { font: inherit; border-radius: var(--radius); padding: .45rem .9rem; cursor: pointer;
               border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
:is(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#tabs { display: flex; gap: .25rem; overflow-x: auto; padding: 0 1.25rem; border-bottom: 1px solid var(--line); }
#tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted);
               padding: .7rem .8rem; white-space: nowrap; font-family: "Barlow Condensed", sans-serif; font-size: 1.15rem; }
#tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.intro { color: var(--muted); max-width: 65ch; margin: 0 0 1.25rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem 1rem; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line);
                          border-radius: var(--radius); padding: .45rem .6rem; width: 100%; }
textarea { min-height: 7rem; resize: vertical; }

/* Hero- en squadrijen: de gekleurde rand toont het type */
.row { border-left: 5px solid var(--line); background: var(--panel); padding: .9rem 1rem; margin-bottom: .75rem;
       border-radius: 0 var(--radius) var(--radius) 0; }
.row[data-type="Tank"] { border-left-color: var(--tank); }
.row[data-type="Air"] { border-left-color: var(--air); }
.row[data-type="Missile"] { border-left-color: var(--missile); }
.row[data-type="Gemengd"] { border-left-color: var(--mixed); }
.row .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); align-items: end; }
.row input, .row select { background: var(--bg); }
.del { background: none; color: var(--muted); border-color: transparent; justify-self: start; }
.del:hover { color: var(--missile); }

.counts { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0 0 1rem; color: var(--muted); }
.counts span::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%;
                       margin-right: .4rem; background: var(--c); }
.c-Tank { --c: var(--tank); } .c-Air { --c: var(--air); } .c-Missile { --c: var(--missile); }
.counts strong { color: var(--text); }

pre { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
      padding: 1rem; font-size: .85rem; max-height: 60vh; overflow: auto; }
.btnrow { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }

body.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(360px, 100%); display: grid; gap: 1rem; background: var(--panel); padding: 2rem;
              border-top: 5px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); }
.login-card .intro { margin: 0; }
.login-card input { background: var(--bg); }
.error { color: var(--missile); margin: 0; min-height: 1.2em; font-size: .9rem; }
