/* CBNeusApp admin web: the club's colors (navy #1D4F9F, gold #E8A93A), like the emails. No external resources:
   the Content-Security-Policy of /admin only allows this site (the font is served from /admin/fonts).
   Themes (#413): light by default, dark when the system asks for it, and the data-theme attribute on <html>
   (set by theme.js from the switch in the header) overrides the system either way. */

/* ---------- Font: Barlow Semi Condensed (SIL Open Font License), latin and latin-ext ---------- */

@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-500.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-semi-condensed-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Colors ---------- */

:root {
    --bg: #f2f4f8;
    --panel: #ffffff;
    --panel-alt: #f6f8fb;
    --text: #1b2333;
    --title: #12306a;
    --muted: #667089;
    --border: #dde2ea;
    --border-soft: #edf0f5;
    --brand: #1d4f9f;
    --brand-strong: #163e7e;
    --brand-soft: #e8eef9;
    --brand-text: #ffffff;
    --link: #1d4f9f;
    --gold: #e8a93a;
    --gold-soft: #fdf3e1;
    --header: #1d4f9f;
    --header-end: #163e7e;
    --row-hover: #f4f7fd;
    --button-line: #b9c7e2;
    --btn-bg: #ffffff;
    --btn-text: #163e7e;
    --btn-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    --error-bg: #fdecee;
    --error-text: #b3202f;
    --ok-bg: #e6f5ec;
    --ok-text: #1d7a43;
    --warn-bg: #fdf3e1;
    --warn-text: #9a6200;
    --switch-off: #c4cde0;
    --switch-on: #2fa866;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.06);
    --radius: 14px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0e1422;
    --panel: #172036;
    --panel-alt: #1b2540;
    --text: #e8ecf4;
    --title: #ffffff;
    --muted: #9ba6bb;
    --border: #2b3651;
    --border-soft: #222d48;
    --brand: #3d6fc4;
    --brand-strong: #5583d4;
    --brand-soft: #1f2d4f;
    --link: #93b4ef;
    --gold-soft: #3a2f17;
    --header: #1a447f;
    --header-end: #122f5c;
    --row-hover: #1b2742;
    --button-line: #3d5a93;
    --btn-bg: transparent;
    --btn-text: #a9c4f5;
    --btn-shadow: none;
    --error-bg: #3b1a22;
    --error-text: #ff9aa9;
    --ok-bg: #143224;
    --ok-text: #6ff0b0;
    --warn-bg: #3a2f17;
    --warn-text: #ffd27a;
    --switch-off: #2d3a58;
    --switch-on: #2fa866;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e1422;
        --panel: #172036;
        --panel-alt: #1b2540;
        --text: #e8ecf4;
        --title: #ffffff;
        --muted: #9ba6bb;
        --border: #2b3651;
        --border-soft: #222d48;
        --brand: #3d6fc4;
        --brand-strong: #5583d4;
        --brand-soft: #1f2d4f;
        --link: #93b4ef;
        --gold-soft: #3a2f17;
        --header: #1a447f;
        --header-end: #122f5c;
        --row-hover: #1b2742;
        --button-line: #3d5a93;
        --btn-bg: transparent;
        --btn-text: #a9c4f5;
        --btn-shadow: none;
    --btn-bg: transparent;
    --btn-text: #a9c4f5;
    --btn-shadow: none;
        --error-bg: #3b1a22;
        --error-text: #ff9aa9;
        --ok-bg: #143224;
        --ok-text: #6ff0b0;
        --warn-bg: #3a2f17;
        --warn-text: #ffd27a;
        --switch-off: #2d3a58;
        --switch-on: #2fa866;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: 17px/1.5 "Barlow Semi Condensed", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header (signed in) ---------- */

.site-header {
    background: linear-gradient(180deg, var(--header), var(--header-end));
    color: #ffffff;
    border-bottom: 4px solid var(--gold);
}

.site-header .inner {
    max-width: 68rem;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem 0.9rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff;
    text-decoration: none;
    margin-right: auto;
}

.brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    padding: 3px;
    flex: none;
    box-shadow: 0 0 0 2px var(--gold);
}

.brand .name { display: flex; flex-direction: column; line-height: 1.1; }
.brand .name strong { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.2px; }
.brand .name span { font-size: 0.72rem; font-weight: 600; color: var(--gold); letter-spacing: 0.09em; text-transform: uppercase; }

.site-nav { display: flex; gap: 0; flex-wrap: wrap; }

.site-nav a {
    color: #d6e2f8;
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    font-size: 0.94rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 -3px 0 var(--gold); color: #ffffff; font-weight: 600; }

.session { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.session .who { font-size: 0.95rem; color: #d6e2f8; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session a.who { text-decoration: none; }
.session a.who:hover { text-decoration: underline; color: #ffffff; }
.session button {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: transparent;
    color: #ffffff;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
}
.session button:hover { background: rgba(255, 255, 255, 0.14); }

/* Theme switch (automatic / light / dark): three round buttons in a pill. */
.theme-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); }
.theme-toggle button {
    width: 30px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #d6e2f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle button:hover { background: rgba(255, 255, 255, 0.14); }
.theme-toggle button[aria-pressed="true"] { background: #ffffff; color: var(--brand-strong); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), 0 0 10px rgba(232, 169, 58, 0.55); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* On the signed-out pages the switch floats in the top right corner. */
.auth .theme-toggle { position: absolute; top: 1rem; right: 1rem; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth .theme-toggle button { color: var(--muted); }
.auth .theme-toggle button:hover { background: var(--brand-soft); }
.auth .theme-toggle button[aria-pressed="true"] { background: var(--brand); color: #ffffff; box-shadow: 0 0 10px rgba(61, 111, 196, 0.5); }

/* ---------- Content ---------- */

main { width: 100%; max-width: 36rem; margin: 2rem auto; padding: 0 1rem; flex: 1; }
main.wide { max-width: none; }
/* Keep the header aligned with the content on the wide (listing) pages. */
body:has(main.wide) .site-header .inner { max-width: none; }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 1.25rem; color: var(--title); }
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin: 1.75rem 0 0.4rem; color: var(--title); }
h3 { font-weight: 700; color: var(--title); }
p { margin: 0 0 1rem; }
p.hint, .hint { color: var(--muted); font-size: 0.95rem; font-weight: 400; }
h2 + p.hint { margin-top: 0; }

/* ---------- Signed-out pages: centred card with the logo ---------- */

.auth { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(circle at 50% 0%, var(--brand-soft), transparent 60%); }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.25rem; }
.auth-brand .logo {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 0 0 4px var(--gold), 0 0 28px rgba(232, 169, 58, 0.45), var(--shadow);
}
.auth-brand strong { margin-top: 1rem; font-size: 1.7rem; font-weight: 700; color: var(--title); }
.auth-brand span { color: var(--muted); font-size: 1rem; }
.auth main { margin: 0; flex: none; max-width: 26rem; padding: 0; }
.auth .links { text-align: center; margin: 1.25rem 0 0; font-size: 1rem; }

/* ---------- Forms ---------- */

label { display: block; font-weight: 600; font-size: 1rem; margin: 1.1rem 0 0.35rem; color: var(--text); }

input[type=email], input[type=password], input[type=search], input[type=text], input[type=number], input[type=date], input[type=file], textarea, select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font: inherit;
    color: var(--text);
    background: var(--panel-alt);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { resize: vertical; min-height: 5rem; }

input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

input[type=radio], input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); margin: 0; }

fieldset { border: 1px solid var(--border); border-radius: 10px; margin: 1.25rem 0 0; padding: 0.5rem 1rem 0.9rem; }
legend { font-weight: 600; font-size: 1rem; padding: 0 0.35rem; }
label.choice { display: flex; gap: 0.6rem; align-items: center; font-weight: 400; margin: 0.55rem 0 0; cursor: pointer; }

/* ---------- Buttons ---------- */

button { font: inherit; cursor: pointer; }

button.primary, .button.primary {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #ffffff), var(--brand));
    color: var(--brand-text);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px color-mix(in srgb, var(--brand) 45%, transparent);
    transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}

button.primary { width: 100%; margin-top: 1.5rem; }
button.primary:hover, .button.primary:hover { filter: brightness(1.08); }
button.primary:active, .button.primary:active { transform: translateY(1px); }

button.secondary, .button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--button-line);
    background: var(--btn-bg);
    color: var(--btn-text);
    box-shadow: var(--btn-shadow);
    transition: border-color 0.15s, background 0.15s;
}

button.secondary:hover, .button:hover { border-color: var(--brand); background: var(--brand-soft); }

button.danger {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: 1.5px solid color-mix(in srgb, var(--error-text) 60%, transparent);
    background: transparent;
    color: var(--error-text);
}

button.danger:hover { background: var(--error-bg); }

button.link { border: 0; background: none; color: var(--link); padding: 0; }

/* ---------- Switches: the state of a setting, one click to change it ---------- */

.switch-form { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.switch-form .switch-label { color: var(--muted); font-size: 0.95rem; }

button.switch {
    position: relative;
    flex: none;
    width: 48px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--switch-off);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, box-shadow 0.2s;
}

button.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}

button.switch[aria-checked="true"] { background: var(--switch-on); box-shadow: 0 0 14px rgba(47, 168, 102, 0.55); }
button.switch[aria-checked="true"]::after { transform: translateX(20px); }
button.switch:hover { filter: brightness(1.08); }

/* ---------- Messages ---------- */

.errors, .message { border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-size: 1rem; }
.errors { background: var(--error-bg); color: var(--error-text); border-left: 4px solid var(--error-text); }
.errors ul { margin: 0; padding-left: 1.1rem; }
.message { background: var(--ok-bg); color: var(--ok-text); border-left: 4px solid var(--ok-text); }

.secret {
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    font-size: 1.3rem;
    letter-spacing: 1px;
    padding: 0.8rem 1rem;
    background: var(--gold-soft);
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    margin: 0.5rem 0 1rem;
    word-break: break-all;
}

/* ---------- Dashboard ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }

.card {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    color: var(--text);
    text-decoration: none;
    border-top: 4px solid var(--brand);
    transition: transform 0.15s, box-shadow 0.15s;
}

a.card:hover { transform: translateY(-2px); }
.card h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .number { font-size: 2.2rem; font-weight: 700; color: var(--link); line-height: 1.1; margin: 0.25rem 0; font-variant-numeric: tabular-nums; }
.card.gold { border-top-color: var(--gold); }

.card .icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    background: var(--brand-soft);
    color: var(--link);
}
.card.gold .icon { background: var(--gold-soft); color: var(--warn-text); }
.card .icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Users ---------- */

.toolbar { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar form { display: flex; gap: 0.5rem; flex: 1 1 18rem; }
.toolbar input[type=search] { flex: 1; }

.table-wrap { overflow-x: auto; margin: 0 -0.25rem; }
table.users { width: 100%; border-collapse: collapse; font-size: 1rem; }
table.users th, table.users td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.users th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 2px solid var(--border); }
table.users tbody tr:hover { background: var(--row-hover); }
table.users td a { font-weight: 600; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.5px; white-space: nowrap; }
.team-label { display: block; font-size: 0.92rem; line-height: 1.3; }
.team-label + .team-label { margin-top: 0.45rem; }
.code + .team-label { margin-top: 0.2rem; }
.team-label .category { display: block; color: var(--muted); font-size: 0.8rem; }

/* Colored label with a status dot and a soft glow of its own color. */
.badge {
    --c: var(--link);
    --b: var(--brand-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.05rem 0.7rem 0.05rem 0.6rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--b);
    color: var(--c);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent), 0 0 12px color-mix(in srgb, var(--c) 22%, transparent);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.badge.ok { --c: var(--ok-text); --b: var(--ok-bg); }
.badge.off { --c: var(--error-text); --b: var(--error-bg); }
.badge.warn { --c: var(--warn-text); --b: var(--warn-bg); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.25rem; margin: 0 0 1.25rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.facts code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; background: var(--panel-alt); padding: 0.05rem 0.35rem; border-radius: 4px; }

.actions { display: flex; flex-direction: column; gap: 0; margin-top: 1.75rem; }
.actions form { border-top: 1px solid var(--border); padding: 1.1rem 0; }
.actions p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.98rem; }
.actions label.choice { margin: 0 0 0.75rem; }

.back { margin: 1.25rem 0 0; font-size: 1rem; }
/* Configuración: one section per option. */
.setting { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.setting:first-of-type { margin-top: 1rem; }
.setting h2 { margin-top: 0; }
form.inline button { width: auto; }
form.inline button.switch { width: 48px; }
/* Forms one after another (a switch and then a button, two buttons): some air between them. */
form.inline + form.inline { margin-top: 1rem; }

/* App versions: the actions of a row side by side. */
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.row-actions form { margin: 0; }
/* The buttons of a row that must stay on one line (the table scrolls sideways before it breaks them). */
.row-actions.nowrap { flex-wrap: nowrap; }

/* Invitation codes: each group (club or team) indented under its heading, with the club colour on the left. */
.code-group { margin: 1.25rem 0 0; padding-left: 1rem; border-left: 3px solid var(--brand); }
.code-group h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.code-group h3 .hint { font-weight: 400; }

/* ---------- Activity ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { display: flex; flex-direction: column; }
.filters .field.grow { flex: 1 1 14rem; }
.filters label { margin: 0 0 0.3rem; font-size: 0.9rem; }

select, input[type=date] {
    padding: 0.5rem 0.7rem;
    font: inherit;
    color: var(--text);
    background: var(--panel-alt);
    border: 1.5px solid var(--border);
    border-radius: 10px;
}

table.activity td { font-size: 0.95rem; }
.nowrap { white-space: nowrap; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }

.recent { margin-top: 1.75rem; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; font-size: 1rem; }
.recent li .when { color: var(--muted); white-space: nowrap; min-width: 8.5rem; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */

.site-footer { text-align: center; color: var(--muted); font-size: 0.88rem; padding: 1.25rem 1rem 1.5rem; }
.site-footer a { color: var(--muted); }
.site-footer code { font-family: ui-monospace, Consolas, monospace; }

@media (max-width: 40rem) {
    main { margin: 1.25rem auto; }

    /* The users table becomes one card per user. */
    .table-wrap { overflow: visible; margin: 0; }
    table.users thead { display: none; }
    table.users, table.users tbody, table.users tr, table.users td { display: block; width: 100%; }
    table.users tr { border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.85rem; margin-bottom: 0.75rem; }
    table.users tbody tr:hover { background: none; }
    table.users td { border: 0; padding: 0.15rem 0; }
    table.users td.empty { display: none; }
    table.users td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.9rem; }
    .panel { padding: 1.25rem; }
    .session .who { display: none; }
    dl.facts { grid-template-columns: 1fr; gap: 0.1rem; }
    dl.facts dd { margin-bottom: 0.6rem; }
}

/* Two-factor authentication (#185): the QR code always on white (scanners need contrast, also in dark mode). */
.qr { margin: 0.75rem 0; }
.qr svg { display: block; width: 220px; height: 220px; max-width: 100%; padding: 8px; background: #fff; border-radius: 6px; }
ol.steps { padding-left: 1.25rem; }
ol.steps li { margin-bottom: 0.75rem; }
ul.recovery-codes { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.35rem 1rem; padding-left: 1rem; }

/* Juego: the forms inside the rows of the rounds and leagues. */
.row-actions select, .row-actions input[type=text] { width: auto; flex: 1 1 9rem; }
.row-actions button, td form button { width: auto; }
td form label.choice { margin: 0 0 0.4rem; font-size: 0.95rem; }
