/* Fonty servírované lokálně z /fonts (dřív Google Fonts CDN) - appka je
   interní nástroj pro uzavřený okruh skautů, ať prohlížeč při každém
   načtení stránky neposílá IP adresu uživatele Googlu. */
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v20-latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v20-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v20-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-v20-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Bebas Neue";
    src: url("/fonts/bebas-neue-v16-latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0d0d0f;
    --panel: #17171b;
    --panel-2: #1f1f25;
    --line: #2a2a31;
    --text: #ece9e2;
    --muted: #9a978f;
    --accent: #b8860b;
    --accent-hi: #daa520;
    --ok: #2f9e5f;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.view {
    min-height: 100vh;
}

[hidden] {
    display: none !important;
}

/* ---------- Brand (logo image) ---------- */
.brand {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 60px;
}

    .brand.small {
        max-height: 48px;
    }

/* ---------- Login ---------- */
.login-view {
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(1200px 500px at 50% -10%, rgba(183, 45, 72, 0.18), transparent 70%), var(--bg);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .login-card .brand {
        align-self: center;
        /* necha logo mirne prekrocit bocni padding karty, at vyuzije vic
           sirky (logo ma "hutny" pomer stran ~3.45:1, takze sirka je
           castejsi limit nez vyska), ale porad si necha cistou mezeru
           od kraje karty - ne uplne "na dorez" */
        margin: 0 -8px;
        max-width: calc(100% + 16px);
        max-height: 112px;
    }

.login-sub {
    margin: -8px 0 8px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* ---------- Fields ---------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field > span {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--muted);
        font-weight: 600;
    }

input, select {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s;
}

    input:focus, select:focus {
        outline: none;
        border-color: var(--accent);
    }

select {
    appearance: none;
    cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--accent-hi);
    }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
}

    .btn-ghost:hover {
        color: var(--text);
        border-color: var(--muted);
    }

.btn-danger {
    color: #e08a8a;
    border-color: rgba(163, 45, 45, 0.5);
    background: rgba(163, 45, 45, 0.12);
}

    .btn-danger:hover {
        color: #fff;
        background: #a32d2d;
        border-color: #a32d2d;
    }

.mrh-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

    .mrh-actions .btn {
        white-space: nowrap;
    }

.btn-block {
    width: 100%;
}

/* ---------- Topbar ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.who {
    color: var(--muted);
    font-size: 0.85rem;
}

/* kompaktní odznak s iniciálami - na desktopu schovaný, ukáže se místo
   plného jména na úzkých obrazovkách (viz @media max-width: 640px) */
.who-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--accent-hi);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ---------- Match scoreboard bar ---------- */
.match-bar {
    background: linear-gradient(180deg, rgba(183, 45, 72, 0.14), transparent);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.score {
    font-family: "Bebas Neue", sans-serif;
    font-size: 2rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 16px;
}

    .score .vs {
        color: var(--accent);
        font-size: 1.2rem;
    }

.match-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- Content / panels ---------- */
.content {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.panel-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.7rem;
    letter-spacing: 1px;
    margin: 0 0 4px;
}

.panel-hint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 18px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

#custom-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 18px 0;
}

    #custom-fields .field {
        gap: 8px;
    }

/* ---------- Rating 1–10 ---------- */
.rating {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

    .rating button {
        width: 40px;
        height: 40px;
        border: 1px solid var(--line);
        background: var(--panel-2);
        color: var(--text);
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
    }

        .rating button.active {
            background: var(--accent);
            border-color: var(--accent);
            color: #fff;
        }

/* ---------- Club / option buttons ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

    .chip.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

.already-reported-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-static {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.85rem;
}

    .chip-static b {
        color: var(--accent-hi);
        font-weight: 700;
        margin-left: 4px;
    }

/* ---------- Messages / toast ---------- */
.error-msg {
    color: var(--accent-hi);
    font-size: 0.85rem;
    margin: 12px 0 0;
    min-height: 1em;
}

.req {
    color: var(--accent);
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ok);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 520px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .score {
        font-size: 1.5rem;
    }
}

/* ===== added: tabs, players list, profile ===== */
.tabs {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}

.tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 10px;
    cursor: pointer;
}

    .tab:hover {
        color: var(--text);
    }

    .tab.active {
        color: var(--text);
        border-bottom-color: var(--accent);
    }

.list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.search {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
}

/* wrapper okolo vyhledávacího pole v seznamu (Hráči/Zápasy) - dřív měl
   flex/šířku přímo input, teď je to na wrapperu, ať input může být 100% */
.search-field-list {
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.05s;
}

    .player-row:hover {
        border-color: var(--accent);
    }

    .player-row:active {
        transform: scale(0.995);
    }

    .player-row .p-name {
        font-weight: 600;
    }

    .player-row .p-facr {
        color: var(--muted);
        font-size: 0.82rem;
    }

    .player-row .chevron {
        color: var(--accent);
        font-size: 1.2rem;
    }

/* ===== added: scouts overview row (chip + chevron together on the right) ===== */
.row-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    margin-bottom: 18px;
}

.profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.panel-title.big {
    font-size: 2.4rem;
}

.profile-stats {
    display: flex;
    gap: 26px;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--accent);
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.reports {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
}

    .report-card .rc-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

.rc-rating {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.5rem;
    color: var(--accent);
}

.rc-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.rc-scout {
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.rc-delete, .mr-delete {
    margin-left: 8px;
    background: rgba(163, 45, 45, 0.12);
    border: 1px solid rgba(163, 45, 45, 0.5);
    color: #e08a8a;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

    .rc-delete:hover, .mr-delete:hover {
        color: #fff;
        background: #a32d2d;
        border-color: #a32d2d;
    }

.rc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rc-tag {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

    .rc-tag b {
        color: var(--muted);
        font-weight: 500;
        margin-right: 4px;
    }

/* ===== added: expandable report cards ===== */
.report-card {
    cursor: pointer;
}

    .report-card .rc-head {
        margin-bottom: 0;
    }

    .report-card.expanded .rc-head {
        margin-bottom: 14px;
    }

.rc-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rc-chevron {
    color: var(--muted);
    transition: transform 0.18s;
    font-size: 1.1rem;
    line-height: 1;
}

.report-card.expanded .rc-chevron {
    transform: rotate(90deg);
    color: var(--accent);
}

/* collapsed preview tags (compact) shown only when NOT expanded */
.rc-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.report-card.expanded .rc-preview {
    display: none;
}

/* expanded structured blocks (stacked) */
.rc-detail {
    display: none;
    flex-direction: column;
    gap: 2px;
}

.report-card.expanded .rc-detail {
    display: flex;
}

.rc-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.rc-block-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 600;
}

.rc-block-value {
    font-size: 0.98rem;
}

/* ===== added: responsive / mobile ===== */
@media (max-width: 640px) {
    .topbar {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: 12px 14px;
    }

        .topbar .brand.small {
            order: 1;
        }

    .topbar-right {
        order: 2;
        margin-left: auto;
    }

    .tabs {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    .tab {
        flex: 1;
        text-align: center;
        padding: 10px 6px;
    }

    .who {
        display: none;
    }

    .who-mobile {
        display: flex;
    }

    .content {
        padding: 18px 14px 90px;
    }

    .panel {
        padding: 18px 16px;
    }

    .panel-title.big {
        font-size: 2rem;
    }

    .match-bar {
        padding: 14px;
    }

    .score {
        font-size: 1.5rem;
        gap: 10px;
    }

    .profile-head {
        gap: 14px;
    }

    .profile-stats {
        gap: 20px;
    }

    .stat-num {
        font-size: 2rem;
    }

    /* bigger tap targets for phone use */
    .rating button {
        width: 44px;
        height: 44px;
    }

    .chip {
        padding: 11px 18px;
    }

    input, select {
        padding: 13px 12px;
        font-size: 16px;
    }
    /* 16px stops iOS zoom */
    .btn {
        padding: 13px 18px;
    }
}

@media (max-width: 380px) {
    .grid-2 {
        gap: 12px;
    }

    .login-card .brand {
        max-height: 86px;
    }
}

/* ===== added: match report (teams grouped) ===== */
.match-report-head {
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.mrh-score {
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.2rem;
    letter-spacing: 1px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

    .mrh-score .vs {
        color: var(--accent);
        font-size: 1.2rem;
    }

.mrh-tournament {
    display: block;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 2px;
}

.teams-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.team-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

    .team-title.muted-title {
        border-bottom-color: var(--line);
        color: var(--muted);
    }

.team-reports {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#tc-other-wrap {
    margin-top: 24px;
}

.mr-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
}

    .mr-card:hover {
        border-color: var(--accent);
    }

    .mr-card .mr-top {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
    }

.mr-name {
    font-weight: 600;
}

.mr-rating {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.35rem;
    color: var(--accent);
}

.mr-facr {
    color: var(--muted);
    font-size: 0.78rem;
}

.mr-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mr-card.expanded .mr-tags {
    display: none;
}

.mr-detail {
    display: none;
    flex-direction: column;
    margin-top: 8px;
}

.mr-card.expanded .mr-detail {
    display: flex;
}

.empty-col {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 8px 0;
}

@media (max-width: 640px) {
    .teams-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .mrh-score {
        font-size: 1.6rem;
    }

    .match-report-head {
        flex-direction: column;
        align-items: stretch;
    }

    /* mřížka 2x2 misto flex-wrap - tlačítka jsou stejně velká a rovná v páru;
       u lichého počtu (bez "Smazat zápas" u non-adminů) JS (layoutMatchActions
       v app.js) přidá poslednímu třídu "span-2", ať roztáhne přes celý řádek
       místo aby zůstalo osamocené v půlce. */
    .mrh-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .mrh-actions .btn {
            width: 100%;
        }

        .mrh-actions .btn.span-2 {
            grid-column: 1 / -1;
        }
}

/* ===== added: print toolbar (screen) ===== */
.match-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.print-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.pt-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 4px;
}

.pt-chip {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

    .pt-chip.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }

.pt-count {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0 4px 0 auto;
}

.pt-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

    .pt-custom input[type="date"] {
        padding: 7px 8px;
        font-size: 0.85rem;
        width: auto;
    }

/* report checkbox for manual selection */
.report-card .rc-select {
    display: none;
    margin-right: 10px;
}

.selecting .report-card .rc-select {
    display: inline-block;
}

.selecting .report-card {
    cursor: default;
}

.rc-select input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* print area is hidden on screen, revealed only when printing */
#print-area {
    display: none;
}

/* ===== added: PRINT layout ===== */
@media print {
    /* remove the app from layout entirely so it adds no blank pages */
    #view-login, #view-app {
        display: none !important;
    }

    .no-print {
        display: none !important;
    }

    #print-area {
        display: block !important;
        padding: 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* force light, ink-friendly output */
    html, body {
        background: #fff !important;
        color: #000 !important;
        height: auto !important;
    }

    #print-area * {
        color: #000 !important;
    }

    .print-doc {
        font-family: "Inter", sans-serif;
    }

    .print-head {
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
        margin-bottom: 14px;
    }

    .print-title {
        font-family: "Bebas Neue", sans-serif;
        font-size: 26pt;
        letter-spacing: 1px;
        margin: 0;
    }

    .print-sub {
        font-size: 10pt;
        color: #444 !important;
    }

    .print-tournament {
        font-size: 8pt;
        font-style: italic;
        color: #555 !important;
        margin: 2px 0 4px;
    }

    .print-team-title {
        font-family: "Bebas Neue", sans-serif;
        font-size: 15pt;
        border-bottom: 1.5pt solid #000;
        margin: 16px 0 8px;
    }

    .print-table {
        width: 100%;
        /* separate + 0 mezera místo collapse - Chromium při tisku/PDF exportu
           u "collapse" tabulek nespolehlivě vynechává některé vnitřní čáry */
        border-collapse: separate;
        border-spacing: 0;
        font-size: 7.5pt;
        table-layout: auto;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

        .print-table, .print-table tr, .print-table th, .print-table td {
            border-color: #000 !important;
        }

            /* border-width v px (ne pt) - pt hodnoty se při tisku/PDF exportu
               někdy zaokrouhlí na zlomky pixelu a čára pak na některých místech
               nekonzistentně zmizí; px je stabilní. */
            .print-table th, .print-table td {
                border: 1px solid #000 !important;
                padding: 3px 5px;
                text-align: left;
                vertical-align: top;
            }

            .print-table th {
                background: #e6e6e6 !important;
                font-weight: 700;
                text-transform: uppercase;
                font-size: 6.5pt;
                letter-spacing: 0.2px;
                white-space: nowrap;
            }

                .print-table td.num, .print-table th.num {
                    text-align: center;
                    white-space: nowrap;
                }

            /* tmavší zlatá (ne světlá/žlutá) - světlé/žluté odstíny mají vysokou
               vnímanou jasnost a na černobílé tiskárně se převedou skoro na bílou,
               takže by text zmizel. Tmavší tón + bílý text zůstane čitelný i tak. */
            #print-area .print-table tr.team-row td {
                background: #b8860b !important;
                color: #ffffff !important;
                font-family: "Bebas Neue", sans-serif;
                font-size: 10pt;
                letter-spacing: 0.5px;
            }

            /* zebrování: bílá / šedá. Třídu "stripe" přiděluje JS podle pozice
               v rámci vlastní skupiny (ne globálně) - vždy tak začíná bílou. */
            .print-table tbody tr.stripe td {
                background: #d9d9d9 !important;
            }

            .print-table tr {
                break-inside: avoid;
            }

    .print-foot {
        margin-top: 10px;
        font-size: 8pt;
        color: #555 !important;
    }

    /* orientaci nevynucujeme (bez "landscape") - mobilní tiskové dialogy (Android)
       vlastní volbu na výšku/na šířku v UI často neberou v potaz "size: landscape"
       v CSS a když ji uživatel v dialogu přepne ručně, obě vynucení se sejdou a
       výstup se rozbije (otočí/oříznu). Tabulka je width:100% a v pt jednotkách,
       takže se sama přizpůsobí, ať uživatel zvolí v tiskovém dialogu cokoli. */
    @page {
        size: A4;
        margin: 10mm;
    }
}

/* ===== added: obecný našeptávač (report/zápas/hráči), viz app.js ===== */
.search-field {
    position: relative;
}

.suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    max-height: 280px;
    overflow-y: auto;
    z-index: 30;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
}

    .suggestion-item:last-child {
        border-bottom: none;
    }

    .suggestion-item:hover,
    .suggestion-item.active {
        background: var(--panel);
    }

.suggestion-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.suggestion-meta {
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

/* ===== added: modál pro editaci uloženého reportu ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

    .modal-head .panel-title {
        margin: 0;
    }

/* tlačítko "Upravit" u report karty - vedle "Smazat" */
.rc-edit, .mr-edit {
    margin-left: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

    .rc-edit:hover, .mr-edit:hover {
        border-color: var(--accent);
        color: var(--accent-hi);
    }

/* "už zapsaní hráči" chip je teď klikatelný (otevírá editaci) */
.chip-static.clickable {
    cursor: pointer;
}

    .chip-static.clickable:hover {
        border-color: var(--accent);
    }

/* ===== added: pozvánkové odkazy pro samoregistraci skautů (admin sekce) ===== */
.invite-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.invite-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .invite-link-row .search {
        width: auto;
        flex: 1;
    }

#invite-result {
    margin-bottom: 18px;
}

#invite-role-hint {
    color: var(--muted);
    font-weight: 400;
}

.password-field {
    position: relative;
}

    .password-field input {
        width: 100%;
        padding-right: 42px;
    }

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.05rem;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    color: var(--muted);
    border-radius: 6px;
}

    .password-toggle:hover {
        color: var(--text);
    }

    .password-toggle.active {
        color: var(--accent-hi);
    }
