/* The Accounts page: one centered column of cards (app.css has the colors and the sign-in screen). */
body.adminPage { display: block; overflow-y: auto; height: auto; min-height: 100%; }
#adminMain { max-width: 760px; margin: 0 auto; padding: 18px 16px 48px; }
.adminHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adminHead h1 { margin: 0; font-size: 22px; letter-spacing: 0.04em; }
.adminLinks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adminLinks #who { margin: 0; }
.adminCard { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.adminCard h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.adminCard .count { font-weight: 400; }
#newForm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
#newForm label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
#newForm label.check, #newForm .adminActions { grid-column: 1 / -1; }
#newForm label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.adminPage input:not([type=checkbox]), .adminPage select { height: 38px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--text); font: inherit; font-size: 15px; min-width: 0; }
.adminPage input:focus, .adminPage select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.adminPage button { height: 38px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--field); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.adminPage button:hover:not(:disabled) { border-color: var(--accent); }
.adminPage button:disabled { opacity: 0.45; cursor: default; }
.adminPage button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.pwRow { display: flex; gap: 8px; } .pwRow input { flex: 1; }
.adminActions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 13px; margin: 0; } .note.bad { color: #ff8a80; } .note.good { color: #8bd48b; }

.acRow { border-top: 1px solid var(--edge); padding: 10px 0; }
.acRow:first-child { border-top: 0; }
.acTop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acName { flex: 1 1 180px; min-width: 0; }
.acName b { font-size: 16px; } .acName span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; vertical-align: 2px; background: var(--field); border: 1px solid var(--edge); color: var(--muted); }
.badge.off { color: #ffb86b; border-color: #ffb86b; } .badge.you { color: var(--accent); border-color: var(--accent); }
.acControls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acReset { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 10px; background: var(--field); border-radius: 10px; }
.acReset input[type=text] { flex: 1 1 200px; font-family: ui-monospace, Menlo, monospace; }
.acReset label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
@media (max-width: 560px) { #newForm { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 0; margin-bottom: 14px; border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; background: var(--field); width: max-content; max-width: 100%; }
.adminPage .tabs button { border: 0; border-radius: 0; height: 36px; padding: 0 18px; background: none; color: var(--muted); font-weight: 600; }
.adminPage .tabs button.on { background: var(--accent); color: var(--on-accent); }
.sgBar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sgBar input { width: 150px; } .sgBar select { min-width: 0; }
.sgCounts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; } .sgCounts b { color: var(--text); font-variant-numeric: tabular-nums; }
.sgScroll { overflow-x: auto; }
#sgTable { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
#sgTable th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--edge); }
#sgTable td { padding: 7px 8px; border-bottom: 1px solid rgba(86, 104, 122, 0.35); }
#sgTable .num { text-align: right; font-variant-numeric: tabular-nums; }
#sgTable .mono { font-family: ui-monospace, Menlo, monospace; }
.kind { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid var(--edge); }
.kind.origin { color: #8bd48b; border-color: #8bd48b; } .kind.destination { color: #ffb86b; border-color: #ffb86b; } .kind.ground { color: var(--muted); }
#sgMore { margin-top: 10px; }
.sgEmpty { padding: 14px 8px; color: var(--muted); }

/* Opened over the map (js/panel.js): the page without its own heading and links, filling the frame. */
body.embedded .adminHead { display: none; }
body.embedded #adminMain { max-width: none; padding: 16px 20px 40px; }

.acInfo { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; font-size: 15px; }
.acInfo dt { color: var(--muted); } .acInfo dd { margin: 0; }
.devRow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(86, 104, 122, 0.35); }
.devRow:last-child { border-bottom: 0; }
.devName { flex: 1; font-weight: 600; } .devSeen { font-size: 13px; color: var(--muted); }

/* The Antennas page: a card for each receiver. */
.anCard { padding: 12px 0 14px; border-bottom: 1px solid rgba(86, 104, 122, 0.35); }
.anCard:last-child { border-bottom: 0; }
.anTop { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.anTop input { flex: 1; min-width: 0; font-weight: 600; }
.anDot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.anDot.live { background: var(--c, #5ad88a); } .anDot.gone { background: transparent; border: 2px solid var(--c, var(--muted)); }
.anMeta { font-size: 13px; color: var(--muted); line-height: 1.5; padding-left: 21px; }
.anCard.off .anMeta { opacity: 0.85; }
.anActions { display: flex; gap: 8px; padding: 8px 0 0 21px; }
.adminPage .anActions button.rangeBtn::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--c, #FFA726); vertical-align: middle; }
.adminPage .anActions button.rangeBtn.off { color: var(--muted); }
.adminPage .anActions button.rangeBtn.off::before { background: transparent; border: 1.5px solid var(--c, var(--muted)); }
.adminPage .anTop button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* The Account page's password form: the current password on its own line, the new one twice side by side, the button and its note under them. */
#pwForm { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-width: 560px; }
#pwForm label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
#pwForm .full { grid-column: 1 / -1; }
#pwForm label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; cursor: pointer; }
#pwForm input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
#pwForm .adminActions { margin-top: 2px; }
#pwForm .note { font-size: 13px; }
@media (max-width: 560px) { #pwForm { grid-template-columns: 1fr; } }

/* The Accounts page, tidied: the list first, with a button that opens the new-account form above it; each account a rounded row with an initial, its name and details, and its controls to the right. */
.cardHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cardHead h2 { margin: 0; }
.subCard { background: var(--field); border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px 16px; margin-bottom: 14px; }
.subCard h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.subCard .adminActions { margin-top: 4px; }
.adminPage .subCard input:not([type=checkbox]), .adminPage .subCard select { background: var(--panel); }
#accounts { display: flex; flex-direction: column; gap: 8px; }
.acRow { border: 1px solid var(--edge); border-top: 1px solid var(--edge); border-radius: 12px; padding: 12px 14px; background: var(--field); }
.acRow:first-child { border-top: 1px solid var(--edge); }
.acTop { gap: 14px; }
.acAvatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; background: var(--panel); border: 1px solid var(--edge); color: var(--text); }
.acAvatar.admin { background: var(--chosen); border-color: var(--accent); color: var(--accent); }
.acName b { font-size: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.acName b .badge { margin-left: 0; vertical-align: 0; }
.acName span { margin-top: 2px; }
.acControls { gap: 8px; }
.acControls select { min-width: 110px; }
.acReset { background: var(--panel); border: 1px solid var(--edge); }
@media (max-width: 640px) { .acTop { align-items: flex-start; } .acControls { width: 100%; } }

/* The Routes tab: the route as two airport codes, and how it was recorded as a small label. */
.rtRoute { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; } .rtRoute b { font-weight: 700; }
.kind.rt-observed { color: #8bd48b; border-color: #8bd48b; } .kind.rt-inferred { color: #7ec8ff; border-color: #7ec8ff; } .kind.rt-person { color: #ffb86b; border-color: #ffb86b; }
#rtTable { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
#rtTable th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px; }
#rtTable td { padding: 7px 8px; border-bottom: 1px solid rgba(86, 104, 122, 0.35); }
#rtTable .mono { font-family: ui-monospace, Menlo, monospace; }
#rtMore { margin-top: 10px; }
