html:root,
html[data-theme="light"],
html[data-theme="dark"] {
    color-scheme: dark;

    --primary: #123457;
    --secondary: #102139;
    --accent: #22d3ee;
    --primary-fg: #f1f5f9;

    --body-bg: #080d17;
    --body-fg: #e2e8f0;
    --body-quiet-color: #94a3b8;
    --body-medium-color: #cbd5e1;
    --body-loud-color: #f8fafc;

    --header-color: #f1f5f9;
    --header-branding-color: #22d3ee;
    --header-bg: #0c1422;
    --header-link-color: #e2e8f0;

    --breadcrumbs-fg: #94a3b8;
    --breadcrumbs-link-fg: #e2e8f0;
    --breadcrumbs-bg: #111d30;

    --link-fg: #67e8f9;
    --link-hover-color: #ffffff;
    --link-selected-fg: #22d3ee;

    --hairline-color: #26364c;
    --border-color: #33465e;

    --darkened-bg: #0f1827;
    --selected-bg: #172941;
    --selected-row: #17314b;

    --button-fg: #ffffff;
    --button-bg: #174c80;
    --button-hover-bg: #2164a1;
    --default-button-bg: #1d4ed8;
    --default-button-hover-bg: #2563eb;

    --close-button-bg: #334155;
    --close-button-hover-bg: #475569;

    --delete-button-bg: #991b1b;
    --delete-button-hover-bg: #b91c1c;

    --error-fg: #fca5a5;
}

body {
    background: var(--body-bg);
    font-family: system-ui, -apple-system,
                 "Segoe UI", sans-serif;
    font-size: 14px;
}

#header {
    min-height: 84px;
    box-sizing: border-box;
    background: #0c1422;
    border-bottom: 1px solid #26364c;
    padding: 18px 35px;
}

.gz-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gz-brand strong {
    display: block;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #f1f5f9;
}

.gz-brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 4px;
    color: #94a3b8;
}

.gz-accent {
    color: #22d3ee;
}

#user-tools {
    font-size: 12px;
}

#user-tools a {
    color: #cbd5e1;
}

#user-tools a:hover {
    color: #22d3ee;
}

.theme-toggle {
    display: none !important;
}

#content {
    padding: 30px;
}

.module {
    background: #111b2b;
    border: 1px solid #26364c;
    border-radius: 9px;
}

.module h2,
.module caption,
.inline-group h2 {
    background: #142a45;
    color: #e0f2fe;
    padding: 13px;
    font-weight: 700;
}

#nav-sidebar {
    background: #0e1828;
    border-right: 1px solid #26364c;
}

input,
textarea,
select {
    border-radius: 5px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #22d3ee;
    outline-color: #22d3ee;
}

.button,
input[type=submit],
.submit-row input {
    border-radius: 6px;
    font-weight: 650;
}

.submit-row {
    background: #111b2b;
    border-color: #26364c;
}

.gz-dashboard #content {
    width: auto;
    max-width: none;
    padding: 0;
}

.gz-dashboard #content-main {
    float: none;
    width: 100%;
}

.gz-console {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 84px);
}

.gz-sidebar {
    background: #0d1625;
    padding: 25px 16px;
    border-right: 1px solid #26364c;
}

.gz-sidebar-label {
    color: #8293aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin: 28px 12px 12px;
}

.gz-sidebar-label:first-child {
    margin-top: 5px;
}

.gz-sidebar a,
.gz-disabled {
    display: block;
    padding: 12px;
    margin: 3px 0;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 13px;
}

.gz-sidebar a:hover,
.gz-sidebar .gz-menu-active {
    background: #173356;
    color: #67e8f9;
}

.gz-sidebar .gz-disabled {
    color: #74839a;
    cursor: default;
}

.gz-main {
    padding: clamp(20px, 3vw, 48px);
    min-width: 0;
}

.gz-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(
        110deg, #102139, #162e4e
    );
    padding: 32px;
    border: 1px solid #304762;
    border-radius: 12px;
    margin-bottom: 28px;
}

.gz-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #22d3ee;
}

.gz-welcome h1 {
    color: #f1f5f9;
    font-size: clamp(23px, 3vw, 35px);
    font-weight: 800;
    margin: 14px 0;
}

.gz-welcome p {
    color: #a3b4ca;
    margin-bottom: 0;
}

.gz-role {
    background: #123650;
    border: 1px solid #247a9a;
    color: #67e8f9;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
}

.gz-cards {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 20px;
}

.gz-module,
.gz-panel {
    background: #111b2b;
    border: 1px solid #26364c;
    border-radius: 12px;
    padding: 25px;
}

.gz-module {
    transition: border-color .2s, transform .2s;
}

.gz-module:hover {
    border-color: #22d3ee;
    transform: translateY(-3px);
}

.gz-module-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: #153453;
    border: 1px solid #28547c;
    color: #22d3ee;
    border-radius: 10px;
    font-size: 23px;
    font-weight: 900;
}

.gz-module h2,
.gz-panel h2 {
    color: #f1f5f9;
    font-size: 19px;
    font-weight: 750;
    margin: 20px 0;
}

.gz-model {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #26364c;
}

.gz-model:last-child {
    border-bottom: 0;
}

.gz-add {
    padding: 6px 10px;
    background: #14324e;
    border-radius: 5px;
    font-size: 11px;
}

.gz-panel {
    margin-top: 25px;
}

.gz-muted {
    color: #94a3b8;
}

.gz-log-entry {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 0;
    border-bottom: 1px solid #26364c;
}

.gz-log-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: #163853;
    color: #67e8f9;
    border-radius: 6px;
}

.gz-log-entry small {
    display: block;
    color: #94a3b8;
    margin-top: 5px;
}

.gz-roadmap {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.gz-roadmap div {
    padding: 16px;
    background: #0c1524;
    border: 1px solid #26364c;
    border-radius: 7px;
}

.gz-roadmap span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 8px;
}

.gz-footer {
    margin-top: 35px;
    text-align: center;
    color: #8293aa;
    font-size: 12px;
}

/* Profesionální přihlašovací stránka */

body.login {
    background:
        radial-gradient(
            ellipse at 50% 20%,
            #153764, transparent 60%
        ),
        #080d17;
}

.login #container {
    width: min(460px, 92vw);
    background: #111b2b;
    border: 1px solid #304762;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 80px #0007;
    margin: 10vh auto 30px;
}

.login #header {
    padding: 30px;
    justify-content: center;
    background: #0d1829;
}

.login #content {
    padding: 30px;
}

.login .form-row input {
    background: #0c1422;
    border: 1px solid #33465e;
    color: #f1f5f9;
    min-height: 45px;
    box-sizing: border-box;
}

.login .submit-row {
    padding: 20px 0 0;
    background: transparent;
    border: 0;
}

.login .submit-row input {
    width: 100%;
    padding: 14px;
    background: linear-gradient(
        110deg, #0369a1, #1d4ed8
    );
    border: 1px solid #38bdf8;
    font-weight: 800;
}

@media (max-width: 900px) {

    .gz-console {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .gz-welcome {
        flex-wrap: wrap;
    }
}

@media (max-width: 650px) {

    .gz-console {
        grid-template-columns: 1fr;
    }

    .gz-sidebar {
        border-right: 0;
        border-bottom: 1px solid #26364c;
    }

    .gz-sidebar .gz-disabled {
        display: none;
    }

    .gz-main {
        padding: 16px;
    }

    .gz-module,
    .gz-panel,
    .gz-welcome {
        padding: 20px;
    }

    .gz-brand strong {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gz-module {
        transition: none;
    }

    .gz-module:hover {
        transform: none;
    }
}


/* GAME-ZONE 19D/2 */

/* Puvodni Django navigace pouze mimo dashboard. */

.gz-dashboard #nav-sidebar,
.gz-dashboard #toggle-nav-sidebar {
    display: none !important;
}

.gz-dashboard #main {
    display: block;
}

.gz-dashboard #main > .content {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
}

.gz-dashboard #content {
    width: auto;
    max-width: none;
}

.gz-console {
    grid-template-columns: 245px minmax(0, 1fr);
}

.gz-main {
    padding: clamp(24px, 3vw, 48px);
}

.gz-sidebar {
    padding: 26px 15px;
}

.gz-sidebar a,
.gz-sidebar .gz-disabled {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    box-sizing: border-box;
    font-size: 13px;
}

.gz-sidebar a::before,
.gz-sidebar .gz-disabled::before {
    content: "";
    display: inline-block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border: 1px solid #617b98;
    border-radius: 2px;
    transform: rotate(45deg);
}

.gz-sidebar .gz-menu-active::before {
    background: #22d3ee;
    border-color: #22d3ee;
    box-shadow: 0 0 12px #22d3ee88;
}

.gz-sidebar .gz-menu-active {
    box-shadow: inset 3px 0 #22d3ee;
    font-weight: 700;
}

.gz-sidebar .gz-disabled {
    color: #94a3b8;
}

.gz-sidebar .gz-disabled::before {
    border-radius: 50%;
    opacity: .5;
}

.gz-sidebar-label {
    color: #9fb3cc;
    font-size: 11px;
    letter-spacing: 1.4px;
}

.gz-welcome {
    min-height: 155px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 95% 0%,
            #1e40af44,
            transparent 60%
        ),
        linear-gradient(
            110deg, #102139, #162e4e
        );
}

.gz-module,
.gz-panel {
    box-shadow: 0 8px 25px #00000018;
}

.gz-module-icon {
    background: linear-gradient(
        135deg, #17466c, #10263e
    );
    box-shadow: 0 0 18px #22d3ee12;
}

.gz-model {
    min-height: 25px;
}

.gz-model a {
    font-size: 14px;
}

.gz-model .gz-add {
    font-size: 11px;
}

.gz-add:hover {
    background: #22527c;
}

.gz-welcome p,
.gz-panel p {
    font-size: 14px;
}

#user-tools {
    font-size: 13px;
}

.gz-sidebar a:focus-visible,
.gz-model a:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .gz-console {
        grid-template-columns:
            210px minmax(0, 1fr);
    }
}

@media (max-width: 650px) {
    .gz-console {
        grid-template-columns: 1fr;
    }

    .gz-main {
        padding: 16px;
    }

    .gz-sidebar .gz-disabled {
        display: none;
    }

    .gz-sidebar {
        padding: 18px;
    }
}


/* GAME-ZONE 19D/3 */

.gz-stats-section {
    margin-bottom: 30px;
}

.gz-stats-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.gz-stats-heading h2 {
    color: #f1f5f9;
    font-size: 23px;
    font-weight: 750;
    margin: 10px 0 0;
}

.gz-stats-source {
    color: #94a3b8;
    font-size: 12px;
}

.gz-stats-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(175px, 100%), 1fr));
    gap: 15px;
}

.gz-stat {
    --stat-color: #22d3ee;

    background: linear-gradient(
        135deg, #142236, #101827
    );
    border: 1px solid #26364c;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.gz-stat::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--stat-color);
    opacity: .65;
}

.gz-stat-green {
    --stat-color: #4ade80;
}

.gz-stat-red {
    --stat-color: #f87171;
}

.gz-stat-purple {
    --stat-color: #a78bfa;
}

.gz-stat-gold {
    --stat-color: #fbbf24;
}

.gz-stat-blue {
    --stat-color: #38bdf8;
}

.gz-stat-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gz-stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid #33465e;
    border-radius: 8px;
    color: var(--stat-color);
    background: #0c1524;
}

.gz-stat-label {
    color: #b6c5d9;
    font-size: 12px;
    font-weight: 600;
}

.gz-stat-value {
    font-size: 36px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    color: var(--stat-color);
    margin-top: 20px;
    overflow-wrap: anywhere;
}

@media (max-width: 650px) {
    .gz-stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gz-stat {
        padding: 15px;
    }

    .gz-stat-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .gz-stats-heading {
        flex-wrap: wrap;
    }
}

@media (max-width: 340px) {
    .gz-stats-grid {
        grid-template-columns: 1fr;
    }
}
