body {
    margin: 0;
    font-family: Arial;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    color: white;
    padding: 10px;
}

.topbar input {
    width: 300px;
    padding: 5px;
}

.actions button {
    margin-left: 5px;
}

.content {
    display: flex;
}

.sidebar {
    width: 200px;
    background: #2c3e50;
    color: white;
    min-height: 100vh;   /* 👈 natáhne přes celou obrazovku */
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 4px 6px;
    cursor: pointer;
}

.sidebar li:hover {
    background: #bdc3c7;
}

.main {
    flex: 1;
    padding: 20px;
    display: block;   /* 👈 důležité */
}

table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 8px;
}

.sidebar a {
    color: white !important;
}

.sidebar a:hover {
    background: #34495e;
    border-radius: 5px;
}

.sidebar a.active {
    background: #1abc9c;
    border-radius: 5px;
    color: white !important;
}

form input, form select {
    width: 300px;
    padding: 5px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.topbar span {
    color: white;
}

.actions i {
    font-size: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

th {
    background: #34495e;
    color: white;
    text-align: left;
}

tr:nth-child(even) {
    background: #f2f2f2;
}

tr:hover {
    background: #e6f2ff;
    transition: 0.2s;
}
.topbar {
    background: linear-gradient(90deg, #2c3e50, #34495e);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar a {
    color: white;
    padding: 6px 8px;
    display: block;
    border-radius: 5px;
    line-height: 1.2;
}

.sidebar a:hover {
    background: #1abc9c;
    color: white;
}

.sidebar .active {
    background: #16a085;
}
.main {
    background: #ecf0f1;
}

.main table {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
td:last-child, th:last-child {
    text-align: center;
    white-space: nowrap;
}

.actions-cell {
    display: flex;
    justify-content: center;
    gap: 5px;
}
.actions-cell .btn {
    padding: 4px 6px;
}

.card {
    border-radius: 10px;
}

.table > :not(caption) > * > * {
    padding: 4px 8px;
    line-height: 1.2;
    vertical-align: middle;
}

:root {
    --app-shell: #2c3e50;
    --app-shell-accent: #34495e;
    --app-accent: #16a085;
    --app-bg: #ecf0f1;
    --app-card: #ffffff;
    --app-border: #d6dee6;
}

html, body {
    min-height: 100%;
    background: var(--app-bg);
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
}

.topbar {
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.content {
    min-height: calc(100vh - 60px);
}

.sidebar {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main {
    min-width: 0;
}

.main .card,
.auth-card {
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 24px rgba(44, 62, 80, 0.08);
}

.form-control,
.form-select,
.btn {
    min-height: 44px;
}

.form-check-input.fs-4 {
    width: 1.6rem;
    height: 1.6rem;
}

.mobile-nav-toggle {
    display: none;
}

.mobile-nav-toggle i {
    pointer-events: none;
}

.sync-status {
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    border: 1px solid var(--app-border);
    background: #f8fbfc;
}

.sync-status.is-online {
    background: #eaf8f4;
    border-color: #9fd8c6;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(26, 188, 156, 0.18), transparent 32%),
        linear-gradient(160deg, #ecf3f6 0%, #dfe8ed 100%);
    padding: 16px;
}

.auth-card {
    width: min(380px, 100%);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
}

.auth-card .form-control,
.auth-card .btn {
    min-height: 48px;
}

@media (max-width: 991.98px) {
    .content {
        flex-direction: column;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 10px !important;
        transform-origin: top center;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar li {
        padding: 0;
        flex: 1 1 160px;
    }

    .sidebar.sidebar-collapsed {
        display: none;
    }

    .main {
        padding: 14px;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .header .btn,
    .header .btn-group,
    .header .d-flex {
        width: 100%;
    }

    .header .d-flex {
        flex-wrap: wrap;
    }

    .topbar {
        flex-wrap: wrap;
        align-items: stretch !important;
        padding: 12px !important;
    }

    .topbar .actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .topbar .actions .btn,
    .topbar .actions > span {
        flex: 1 1 auto;
    }

    .player-row {
        padding: 16px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    .main {
        padding: 12px;
    }

    .topbar .actions {
        gap: 8px !important;
    }

    .topbar .actions > span {
        width: 100%;
        justify-content: center;
        order: -1;
    }

    .sidebar ul {
        flex-direction: column;
    }

    .sidebar li {
        flex: 1 1 auto;
    }

    .actions-cell {
        flex-wrap: wrap;
    }

    .table > :not(caption) > * > * {
        padding: 6px;
        line-height: 1.25;
    }
}

/* Product polish for phone-first use. */
:root {
    --app-shell: #1f2937;
    --app-shell-accent: #374151;
    --app-accent: #0f766e;
    --app-accent-strong: #0d9488;
    --app-warning: #f59e0b;
    --app-bg: #f3f6f8;
    --app-card: #ffffff;
    --app-border: #d7dee7;
    --app-text: #111827;
    --app-muted: #667085;
}

body {
    color: var(--app-text);
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

.container-fluid {
    padding: 0;
}

.topbar {
    min-height: 60px;
    background: var(--app-shell);
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    font-size: 1.05rem;
    letter-spacing: 0;
}

.logo::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--app-warning);
    box-shadow: 16px 0 0 var(--app-accent-strong);
}

.btn {
    border-radius: 8px;
    font-weight: 650;
}

.btn-success,
.btn-primary {
    border-color: var(--app-accent);
    background: var(--app-accent);
}

.btn-success:hover,
.btn-primary:hover {
    border-color: var(--app-accent-strong);
    background: var(--app-accent-strong);
}

.btn-outline-primary {
    border-color: var(--app-accent);
    color: var(--app-accent);
}

.btn-outline-primary:hover {
    border-color: var(--app-accent);
    background: var(--app-accent);
}

.content {
    background: var(--app-bg);
}

.sidebar {
    background: var(--app-shell);
}

.sidebar ul {
    margin: 0;
}

.sidebar a {
    border-radius: 8px;
    font-weight: 650;
}

.sidebar a:hover,
.sidebar a.active,
.sidebar .active {
    background: var(--app-accent);
}

.main {
    background: transparent;
}

.main .card,
.auth-card,
.session-card,
.player-row,
.calendar-day,
.sync-status,
.main .card,
.auth-card {
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
}

.header h2,
.header h3 {
    margin: 0;
    line-height: 1.15;
}

.form-label {
    color: var(--app-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--app-border);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-accent-strong);
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.16);
}

.attendance-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.player-row {
    border: 1px solid var(--app-border);
    box-shadow: none;
}

.player-row:has(input:checked) {
    border-color: rgba(13, 148, 136, 0.45);
    background: #eefaf8;
}

.calendar-day {
    box-shadow: none;
}

.calendar-day:hover,
.session-card:hover {
    border-color: rgba(13, 148, 136, 0.5);
}

.auth-page {
    background: linear-gradient(145deg, #f8fafc 0%, #eef3f7 58%, #dde7ec 100%);
}

.auth-card h3 {
    color: var(--app-text);
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .content {
        min-height: calc(100vh - 60px);
    }

    .sidebar {
        box-shadow: 0 14px 24px rgba(17, 24, 39, 0.16);
    }

    .sidebar ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar li {
        min-width: 0;
    }

    .sidebar a {
        min-height: 46px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .attendance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        min-height: auto;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .topbar .actions .btn {
        min-width: 44px;
    }

    .main .card,
    .auth-card {
        box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    }

    .mobile-stack {
        grid-template-columns: 1fr;
    }

    .player-row {
        min-height: 58px;
    }

    .calendar-grid {
        gap: 5px;
    }

    .calendar-day {
        min-height: 54px;
        padding: 7px;
    }

    .calendar-day-count {
        font-size: 0.72rem;
    }
}

/* Rugby Club Vyskov theme. */
:root {
    --club-blue: #0b3b83;
    --club-blue-dark: #061b3f;
    --club-red: #e31837;
    --club-red-dark: #be1230;
    --club-ink: #071326;
    --club-muted: #647085;
    --club-surface: #ffffff;
    --club-panel: #eef3fb;
    --club-border: #d7e1ef;
    --app-shell: var(--club-blue-dark);
    --app-shell-accent: var(--club-blue);
    --app-accent: var(--club-blue);
    --app-accent-strong: var(--club-red);
    --app-warning: var(--club-red);
    --app-bg: #f7f8fc;
    --app-border: var(--club-border);
    --app-text: var(--club-ink);
    --app-muted: var(--club-muted);
}

body {
    background:
        linear-gradient(180deg, #f7f9fd 0%, #f5f3f6 100%);
}

.topbar {
    background: linear-gradient(90deg, var(--club-blue-dark) 0%, var(--club-blue) 58%, var(--club-red) 100%);
}

.logo::before {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: url("club-logo.png") center / cover no-repeat;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.sidebar {
    background: var(--club-blue-dark);
}

.sidebar a:hover,
.sidebar a.active,
.sidebar .active {
    background: var(--club-red);
}

.btn-success,
.btn-primary {
    border-color: var(--club-blue);
    background: var(--club-blue);
}

.btn-success:hover,
.btn-primary:hover {
    border-color: var(--club-red);
    background: var(--club-red);
}

.btn-outline-primary {
    border-color: var(--club-blue);
    color: var(--club-blue);
}

.btn-outline-primary:hover {
    border-color: var(--club-blue);
    background: var(--club-blue);
}

.main .card,
.auth-card,
.session-card,
.calendar-day,
.player-row {
    border-color: var(--club-border);
}

.main .card,
.auth-card {
    box-shadow: 0 14px 34px rgba(7, 19, 38, 0.08);
}

.header h2,
.header h3,
.auth-card h3 {
    color: var(--club-ink);
    font-weight: 800;
}

.sync-status.is-online,
.calendar-day.has-session,
.session-card.active,
.player-row:has(input:checked) {
    border-color: rgba(11, 59, 131, 0.24);
    background: #eef4ff;
}

.calendar-day.selected {
    outline-color: var(--club-red);
}

.calendar-day-count,
.session-card.active span {
    color: var(--club-red);
}

.auth-page.club-login-page {
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(circle at 12% 18%, rgba(11, 59, 131, 0.14), transparent 34%),
        radial-gradient(circle at 82% 20%, rgba(227, 24, 55, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #f1f4fa 100%);
}

.club-login-shell {
    width: min(1120px, 100%);
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    align-items: center;
    gap: 28px;
}

.club-login-brand {
    min-width: 0;
}

.club-login-panel {
    min-height: 520px;
    border-radius: 34px;
    padding: clamp(28px, 5vw, 58px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(105deg, var(--club-blue-dark) 0%, var(--club-blue) 54%, var(--club-red) 100%);
    box-shadow: 0 24px 48px rgba(7, 19, 38, 0.18);
}

.club-kicker {
    margin: 0 0 30px;
    font-size: clamp(2rem, 5vw, 4.1rem);
    font-weight: 500;
    line-height: 1.05;
}

.club-login-logo {
    width: min(260px, 48vw);
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22));
}

.club-login-subtitle {
    margin: 28px 0 0;
    font-size: clamp(1.25rem, 2.4vw, 1.9rem);
    color: rgba(255, 255, 255, 0.86);
}

.club-login-card {
    width: 100%;
    max-width: 430px;
    justify-self: end;
    border-radius: 22px;
    padding: clamp(24px, 4vw, 38px) !important;
}

.club-login-card .form-control,
.club-login-card .btn {
    min-height: 52px;
}

.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-stat-card {
    min-height: 120px;
    border: 1px solid var(--club-border);
    border-radius: 18px;
    padding: 20px;
    background: #eef4ff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 24px rgba(7, 19, 38, 0.06);
}

.report-stat-card span {
    color: var(--club-muted);
    font-size: 1rem;
    font-weight: 700;
}

.report-stat-card strong {
    color: var(--club-blue);
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
}

.report-percent {
    position: relative;
    min-width: 118px;
    height: 34px;
    overflow: hidden;
    border: 1px solid var(--club-border);
    border-radius: 999px;
    background: #f5f7fb;
}

.report-percent span {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--club-red);
    opacity: 0.18;
}

.report-percent strong {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--club-ink);
    font-size: 0.9rem;
}

.report-percent.is-good span {
    background: #0f766e;
}

.report-percent.is-warning span {
    background: #f59e0b;
}

.report-percent.is-danger span {
    background: var(--club-red);
}

.report-list {
    display: grid;
    gap: 10px;
}

.report-list-item {
    border: 1px solid var(--club-border);
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
}

.report-list-item strong,
.report-list-item span {
    display: block;
}

.report-list-item span {
    margin-top: 4px;
    color: var(--club-muted);
    font-size: 0.92rem;
}

@media (max-width: 900px) {
    .auth-page.club-login-page {
        padding: 18px;
    }

    .club-login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .club-login-panel {
        min-height: auto;
        border-radius: 28px;
        padding: 28px 22px;
    }

    .club-kicker {
        margin-bottom: 18px;
        font-size: clamp(2rem, 9vw, 3.2rem);
    }

    .club-login-logo {
        width: min(190px, 52vw);
    }

    .club-login-subtitle {
        margin-top: 18px;
    }

    .club-login-card {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 991.98px) {
    .report-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .auth-page.club-login-page {
        padding: 14px;
    }

    .club-login-shell {
        gap: 16px;
    }

    .club-login-panel {
        border-radius: 22px;
    }

    .club-login-card {
        border-radius: 18px;
    }

    .report-stat-grid {
        grid-template-columns: 1fr;
    }

    .report-stat-card {
        min-height: 96px;
    }
}

