@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,560;9..144,700&family=Outfit:wght@400;500;700&display=swap');

:root {
    --ink: #10204a;
    --ink-2: #24356b;
    --gold: #f5b942;
    --gold-2: #ffe3a3;
    --emerald: #12a37a;
    --sapphire: #3b6cff;
    --rose: #e23b7a;
    --violet: #6d4aff;
    --paper: #f3f6ff;
    --card: #ffffff;
    --line: #d9e2f5;
    --bad: #c42356;
    --ok: #0d8a68;
    --muted: #5d6b8a;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Outfit, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(720px 280px at 110% -40px, rgba(109, 74, 255, 0.18), transparent 62%),
        radial-gradient(560px 240px at -80px 0, rgba(18, 163, 122, 0.16), transparent 58%),
        var(--paper);
}
button, input, select { font: inherit; }
a { color: inherit; }

.loginBody {
    min-height: 100vh;
    background:
        radial-gradient(700px 320px at 8% 0%, rgba(245, 185, 66, 0.35), transparent 60%),
        radial-gradient(640px 360px at 100% 20%, rgba(226, 59, 122, 0.32), transparent 55%),
        linear-gradient(155deg, #10204a 0%, #24356b 42%, #6d4aff 100%);
    color: #f7f4ff;
}
.loginStage {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 28px;
}
.loginKicker {
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--gold-2);
    margin: 0 0 18px;
}
.loginMark {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(56px, 8vw, 92px);
    line-height: 0.9;
    font-weight: 560;
    margin: 0;
}
.loginMark span { display: block; font-size: 0.46em; letter-spacing: -0.03em; }
.loginLead { max-width: 420px; color: #e4e0ff; font-size: 18px; line-height: 1.5; }
.loginCard {
    background: var(--card);
    color: var(--ink);
    padding: 32px 28px 28px;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.loginCard h2 {
    font-family: Fraunces, Georgia, serif;
    margin: 0 0 18px;
    font-size: 32px;
}
.loginCard label, .field { display: block; font-weight: 700; font-size: 13px; margin: 14px 0 6px; }
.loginCard input, .input {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 12px 12px;
    color: var(--ink);
}
.btnGold, .btnInk {
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btnGold { background: linear-gradient(180deg, #ffd36a, var(--gold)); color: #10204a; }
.btnInk { background: linear-gradient(180deg, #5b86ff, var(--sapphire)); color: #fff; }
.loginCard .btnGold { width: 100%; margin-top: 18px; }
.btnGold:disabled, .btnInk:disabled, .btnStatus:disabled { opacity: 0.45; cursor: not-allowed; }

.topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 22px;
    background: linear-gradient(90deg, #10204a 0%, #24356b 58%, #4b3cc4 100%);
    color: #f7f4ff;
    position: sticky;
    top: 0;
    z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: Fraunces, Georgia, serif;
    font-size: 20px;
    white-space: nowrap;
}
.brandBadge {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #ffe08a, var(--gold) 45%, #f08a3c);
    color: #10204a;
    font-weight: 700;
    font-size: 16px;
}
.topnav {
    display: flex;
    gap: 2px;
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 3px;
    min-width: 0;
}
.topnav a {
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 999px;
    color: #efeaff;
    white-space: nowrap;
}
.topnav a.isOn { background: linear-gradient(180deg, #ffe08a, var(--gold)); color: #10204a; }
.navShort, .daysShort, .logoutShort, .barTitle { display: none; }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.whoName { font-weight: 700; }
.whoDays {
    background: var(--emerald);
    color: #f3fff9;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 700;
}
.whoDays.isExpired { background: #6d2424; color: #ffe1e1; }
.logout { color: var(--gold-2); font-size: 14px; }
.whoPass { display: none; text-decoration: none; font-weight: 700; }
.dock { display: none; }
.siteFoot {
    max-width: 720px;
    margin: 12px auto 28px;
    padding: 0 18px;
}
.siteFootCard {
    background: #fffdf8;
    color: #10204a;
    border: 1px solid #eadfce;
    border-radius: 16px;
    padding: 14px 16px 12px;
    box-shadow: 0 8px 18px rgba(16, 32, 74, 0.06);
}
.siteFootLine {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #10204a;
}
.siteFootNote {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #5c6b8a;
}
.siteFootPills {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.siteFootPills span {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #10204a;
    background: #fff6e4;
    border: 1px solid #ead3a2;
    border-radius: 10px;
    padding: 7px 6px;
}

.pass {
    margin-top: 4px;
    background:
        radial-gradient(280px 160px at 100% 0%, rgba(245, 185, 66, 0.35), transparent 60%),
        linear-gradient(145deg, #10204a 0%, #3b2f9a 55%, #6d4aff 100%);
    color: #f7f4ff;
    border-radius: 16px;
    padding: 12px 12px 12px 16px;
    position: relative;
    overflow: hidden;
}
.pass::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #ffe08a, #f08a3c);
}
.pass.isGreen {
    background:
        radial-gradient(280px 160px at 100% 0%, rgba(190, 255, 210, 0.4), transparent 60%),
        linear-gradient(145deg, #0c3d2e 0%, #12824e 55%, #1fa86a 100%);
}
.pass.isGreen::before { background: linear-gradient(180deg, #e7ffe8, #3ddc84); }
.pass.isGreen .passState { color: #083222; background: #d8ffe8; }
.pass.isRed {
    background:
        radial-gradient(280px 160px at 100% 0%, rgba(255, 190, 190, 0.4), transparent 60%),
        linear-gradient(145deg, #4a1020 0%, #9a2438 58%, #d6455d 100%);
}
.pass.isRed::before { background: #ffd0d6; }
.pass.isRed .passState { color: #fff; background: #8d2033; }
.pass.isExpired::before { background: #ffd0d6; }
.passTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.passHead { display: flex; align-items: center; gap: 8px; }
.passMark {
    font-family: Fraunces, Georgia, serif;
    font-size: 20px;
}
.passState {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #10204a;
    background: var(--gold-2);
    border-radius: 999px;
    padding: 3px 8px;
    font-weight: 700;
}
.pass.isExpired .passState { color: #fff; background: #c42356; }
.passCount {
    font-family: Fraunces, Georgia, serif;
    font-size: 40px;
    line-height: 0.85;
    margin: 0;
    text-align: right;
}
.passCount span {
    display: block;
    font-family: Outfit, "Segoe UI", sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d9dcff;
    margin-top: 4px;
}
.passUntil { margin: 6px 0 0; color: #d9dcff; font-size: 13px; }
.passFoot { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-top: 12px; }
.passChip {
    flex: 1 1 120px;
    min-width: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 227, 163, 0.28);
    border-radius: 10px;
    padding: 6px 8px;
}
.passChip small {
    display: block;
    color: #d9dcff;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.passChip b { display: block; font-size: 13px; margin-top: 2px; word-break: break-word; }
textarea.input { min-height: 110px; resize: vertical; }

.desk { max-width: 1100px; margin: 0 auto; padding: 28px 18px 60px; }
.pageHead h1, .validityHero h1, .locked h1 {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(36px, 5vw, 56px);
    margin: 0;
    line-height: 1;
}
.eyebrow {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--gold);
    margin: 0 0 8px;
    font-weight: 700;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    margin-top: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 18px; }
.narrow { max-width: 480px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.filterRow, .formRow { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; }
.declare .filterRow { flex-wrap: nowrap; }
.declare .filterRow .field { flex: 1 1 0; min-width: 0; max-width: 280px; }
.declare .filterRow .input { width: 100%; height: 40px; box-sizing: border-box; }
.declare .toolRow { display: flex; flex-wrap: wrap; align-items: start; gap: 16px 24px; margin-top: 16px; }
.field { min-width: 180px; flex: 1; }
.statusBox { flex: 0 0 auto; }
.statusBox p { margin: 0 0 8px; color: var(--muted); }
.statusBtns { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.declare .lineMsgBox {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 1 1 220px;
    width: min(100%, 280px);
    max-width: 100%;
    min-width: 0;
    margin-top: 0;
}
.declare .lineMsgBox label { min-width: 0; margin: 0; }
.declare .lineMsgBox .input,
.declare .lineMsgBox select.input { width: 100%; height: 40px; box-sizing: border-box; }
.declare .lineMsgBox .lineMsgActions { display: flex; flex-wrap: wrap; gap: 8px; }
.declare .lineMsgBox .btnInk { height: 40px; }
.declare .lineMsgBox .btnRemove { background: #9b1230; }
.declare .lineMsgText { grid-column: 1 / -1; min-height: 52px; min-width: 0; width: 100%; }
.declare .sessionPick {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.declare .sessionItem {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 64px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.declare .sessionDot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #374151;
    background: #fff;
    box-sizing: border-box;
}
.declare .sessionItem.on .sessionDot {
    background: #111827;
    border-color: #111827;
    box-shadow: inset 0 0 0 3px #fff;
}
.declare .sessionItem:disabled { opacity: 0.45; cursor: not-allowed; }
.btnStatus {
    border: 0;
    color: #fff;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.55;
}
.btnStatus.isLoad { background: var(--emerald); }
.btnStatus.isLine { background: var(--sapphire); }
.btnStatus.isOff { background: var(--rose); }
.btnStatus.on {
    opacity: 1;
    outline: 3px solid #fff;
    box-shadow: 0 8px 16px rgba(16, 32, 74, 0.22);
}
.hint, .empty { color: var(--muted); }
.alert { padding: 10px 12px; border-radius: 10px; }
.alertBad { background: #fde8e8; color: var(--bad); }
.alertOk { background: #e7f6ee; color: var(--ok); }
.currentTime { font-weight: 700; margin: 0 0 10px; }
.timeStatus { font-weight: 700; margin: 0 0 10px; }
.timeStatus.isPending { color: #b45309; }
.timeStatus.isApproved { color: #0d8a68; }
.requestHead { font-size: 15px; margin: 18px 0 8px; }
.requestList { list-style: none; margin: 0; padding: 0; }
.requestList li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.requestList span { color: var(--muted); }
.sentNote {
    background: #12a37a;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 0 0 12px;
}
.resultLine { font-size: 18px; }
.pannaBox { position: relative; }
.pannaList {
    position: absolute;
    z-index: 6;
    left: 0;
    right: 0;
    max-height: 220px;
    overflow: auto;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.pannaList li { padding: 8px 12px; cursor: pointer; }
.pannaList li:hover { background: #f6efe0; }
.tableWrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.xBtn { border: 0; background: transparent; color: var(--bad); font-size: 18px; cursor: pointer; }

.validityHero, .locked {
    padding: 8px 0 4px;
}
.validityHero.isExpired h1 { color: var(--bad); }
.validitySub { font-size: 18px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0; }
.facts div { margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.gameList { list-style: none; padding: 0; margin: 0 0 16px; }
.gameList li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.gameList span { color: var(--sapphire); font-weight: 700; }

@media (max-width: 800px) {
    .loginStage {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 22px;
        padding: 28px 16px 32px;
    }
    .loginMark { font-size: 64px; }
    .topbar {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 12px;
        min-height: 48px;
        background: #fff;
        color: var(--ink);
        border-bottom: 3px solid transparent;
        border-image: linear-gradient(90deg, var(--emerald), var(--sapphire), var(--violet), var(--gold)) 1;
    }
    .brandText, .whoName, .navFull, .daysFull, .logoutFull, .pageHead, .topnav { display: none; }
    .navShort, .daysShort, .logoutShort { display: inline; }
    .barTitle {
        display: block;
        position: static;
        left: auto;
        transform: none;
        flex: 1;
        min-width: 0;
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.01em;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
    }
    .brandBadge {
        width: 30px;
        height: 30px;
        font-size: 13px;
        border-radius: 7px;
        background: linear-gradient(160deg, #3b6cff, #6d4aff);
        color: #fff;
    }
    .whoDays {
        background: var(--emerald);
        color: #fff;
        border: 0;
        padding: 3px 8px;
        font-size: 12px;
    }
    .whoDays.isExpired { background: transparent; color: var(--bad); border-color: var(--bad); }
    .logout {
        color: var(--muted);
        border: 0;
        padding: 0;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
    .whoPass {
        display: inline;
        color: var(--ink);
        font-size: 13px;
    }
    .dock {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        background: linear-gradient(90deg, #10204a, #4b3cc4);
        padding: 4px;
        border-radius: 16px;
        z-index: 30;
        box-shadow: 0 12px 28px rgba(16, 32, 74, 0.32);
    }
    .dock a {
        text-align: center;
        text-decoration: none;
        color: #efeaff;
        font-weight: 700;
        padding: 12px 4px;
        font-size: 13px;
        border-radius: 12px;
    }
    .dock.dockOne { grid-template-columns: 1fr; }
    .dock a.isOn { background: linear-gradient(180deg, #ffe08a, var(--gold)); color: #10204a; }
    .desk { padding: 12px 12px 120px; }
    .siteFoot { margin: 12px 12px 96px; padding: 0; }
    .siteFootLine { font-size: 15px; }
    .card { margin-top: 12px; padding: 14px; }
    .passCount { font-size: 36px; }
    .statusBtns { display: grid; grid-template-columns: 1fr 1fr; }
    .btnStatus { width: 100%; padding: 11px 6px; }
    .field { min-width: 0; }
    .facts { grid-template-columns: 1fr; }
}
