@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --falken-blue: #004583;
    --falken-blue-dark: #002b54;
    --falken-blue-soft: #eaf3fb;
    --falken-red: #e3000d;
    --falken-red-dark: #b9000a;
    --ice: #f4f7fa;
    --white: #ffffff;
    --ink: #152231;
    --muted: #667587;
    --line: #d9e2ea;
    --shadow: 0 12px 35px rgba(0, 43, 84, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    background:
        linear-gradient(180deg, rgba(0,69,131,.97) 0 178px, transparent 178px),
        linear-gradient(180deg, #edf3f8 0%, #f7f9fb 42%, #eef2f5 100%);
}

body::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--falken-red) 0 35%, var(--white) 35% 65%, var(--falken-blue) 65% 100%);
}

h1, h2, h3, .brand {
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: .025em;
}

.page {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1.25rem;
}

.top {
    min-height: 138px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    padding: 1rem 1.25rem 1.25rem;
    color: var(--white);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: grid;
    place-items: center;
    width: 78px;
    height: 92px;
    flex: 0 0 78px;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,.22));
}

.club-logo {
    display: block;
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.tag {
    display: inline-block;
    margin: 0 0 .2rem;
    color: #d8e8f6;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.brand {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 3.35rem);
    line-height: .9;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.brand-sub {
    margin: .45rem 0 0;
    color: #c9d9e7;
    font-size: .88rem;
}

.userline {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .45rem;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(0,31,62,.35);
    border-radius: 10px;
}

.userline strong { padding: .25rem .5rem; }

.userline a {
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    padding: .45rem .65rem;
    border-radius: 7px;
    transition: background .15s ease, transform .15s ease;
}

.userline a:hover {
    background: rgba(255,255,255,.13);
    transform: translateY(-1px);
}

.grid {
    display: grid;
    gap: 1rem;
}

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

.card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--falken-red) 0 28%, var(--falken-blue) 28% 100%);
}

.card h2 {
    margin: .25rem 0 .9rem;
    color: var(--falken-blue);
    font-size: 1.65rem;
    text-transform: uppercase;
}

.card h3 {
    color: var(--falken-blue-dark);
    font-size: 1.3rem;
    text-transform: uppercase;
}

.score-table, .match-table, .reveal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.score-table th, .score-table td,
.match-table th, .match-table td,
.reveal-table th, .reveal-table td {
    border-bottom: 1px solid var(--line);
    padding: .65rem .55rem;
    text-align: left;
    vertical-align: middle;
}

.score-table th, .match-table th, .reveal-table th {
    color: var(--falken-blue-dark);
    background: #f2f6f9;
    font-size: .76rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.score-table tbody tr:hover,
.match-table tbody tr:hover,
.reveal-table tbody tr:hover {
    background: #f8fafc;
}

.place {
    font-weight: 800;
    color: var(--falken-red);
}

.points {
    font-weight: 800;
    color: var(--falken-blue);
}

.status {
    display: inline-block;
    border-radius: 999px;
    padding: .24rem .62rem;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border: 1px solid transparent;
}

.status.open {
    color: #0b6339;
    background: #e4f7ed;
    border-color: #b9e6ce;
}

.status.closed {
    color: #8a4f00;
    background: #fff0d9;
    border-color: #f2d19f;
}

.status.done {
    color: var(--falken-blue-dark);
    background: var(--falken-blue-soft);
    border-color: #bfd5e8;
}

input, button {
    border-radius: 7px;
    border: 1px solid #cbd6df;
    padding: .62rem .72rem;
    font-size: .96rem;
    font-family: inherit;
}

input { background: #fff; }

input:focus {
    outline: 3px solid rgba(0,69,131,.16);
    border-color: var(--falken-blue);
}

input[readonly] {
    background: #eef2f5;
    color: #748292;
}

button {
    border: 0;
    background: linear-gradient(135deg, var(--falken-red), var(--falken-red-dark));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .03em;
    box-shadow: 0 7px 18px rgba(227,0,13,.22);
    transition: transform .12s ease, filter .12s ease;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.tight { width: 5rem; }

.save-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.save-row button {
    min-width: 190px;
    padding: .78rem 1rem;
}

.flash, .warn {
    margin: 0 0 .9rem;
    border-radius: 8px;
    padding: .75rem .9rem;
    font-weight: 600;
}

.flash {
    border: 1px solid #a7dfc1;
    background: #e8fff2;
    color: #0c6c3a;
}

.warn {
    border: 1px solid #f0cf9f;
    background: #fff4e5;
    color: #8a4f00;
}

.reveal-title {
    margin: 1.25rem 0 .45rem;
    padding-left: .65rem;
    border-left: 4px solid var(--falken-red);
}

.inline-form-grid {
    display: grid;
    gap: .55rem;
}

.inline-form-grid input,
.inline-form-grid button { width: 100%; }

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1.2rem;
}

.login-shell { width: min(520px, 100%); }

.login-card {
    background: var(--white);
    border-top: 5px solid var(--falken-red);
    border-bottom: 5px solid var(--falken-blue);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.alert {
    background: #ffe7e7;
    border: 1px solid #ffc3c3;
    color: #9b2020;
    padding: .65rem .8rem;
    border-radius: 8px;
}

.hint, .lead { color: var(--muted); }

@media (max-width: 760px) {
    body {
        background:
            linear-gradient(180deg, rgba(0,69,131,.97) 0 208px, transparent 208px),
            linear-gradient(180deg, #edf3f8 0%, #f7f9fb 42%, #eef2f5 100%);
    }

    .page { padding: .7rem; }

    .top {
        align-items: flex-start;
        padding: .8rem .5rem 1rem;
    }

    .brand-wrap { gap: .75rem; }

    .logo-link, .club-logo {
        width: 62px;
        height: 72px;
    }

    .brand { font-size: 2.25rem; }

    .userline { width: 100%; }

    .match-table, .reveal-table, .score-table {
        font-size: .8rem;
    }

    .match-table th, .match-table td,
    .reveal-table th, .reveal-table td,
    .score-table th, .score-table td {
        padding: .48rem .38rem;
    }

    input.tight { width: 4.1rem; }

    .card { padding: .75rem; }
}
