:root {
    color-scheme: dark;
    --bg: #0b1016;
    --bg-soft: #111923;
    --panel: #151f2a;
    --panel-strong: #1b2734;
    --line: rgba(255, 255, 255, 0.11);
    --text: #f4f7fb;
    --muted: #9fb0c2;
    --gold: #f7b733;
    --gold-dark: #b97612;
    --red: #e24a3b;
    --green: #32c779;
    --yellow: #f1c247;
    --blue: #53a5ff;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 14% 12%, rgba(247, 183, 51, 0.14), transparent 28rem),
        radial-gradient(circle at 86% 8%, rgba(83, 165, 255, 0.12), transparent 24rem),
        linear-gradient(180deg, #0b1016 0%, #0e141c 42%, #090d12 100%);
}

button,
input {
    font: inherit;
}

.app-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 42px;
}

.hero {
    min-height: 310px;
    display: flex;
    align-items: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(7, 10, 14, 0.18) 0%, rgba(7, 10, 14, 0.6) 48%, rgba(7, 10, 14, 0.92) 100%),
        linear-gradient(0deg, rgba(7, 10, 14, 0.86), rgba(7, 10, 14, 0.12) 52%),
        url("../img/war-banner.png") center / cover no-repeat;
    box-shadow: var(--shadow);
}

.hero__content {
    width: 100%;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    padding: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand__mark {
    width: 58px;
    height: 58px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid rgba(247, 183, 51, 0.72);
    border-radius: 8px;
    color: #120d05;
    background: linear-gradient(145deg, #ffe08a, #f7b733 58%, #b97612);
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 14px 26px rgba(247, 183, 51, 0.2);
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2.1rem, 4vw, 4.8rem);
    line-height: 0.95;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.58);
}

h2 {
    font-size: 1.28rem;
    line-height: 1.2;
}

.toolbar {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.month-control {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.month-control input {
    height: 42px;
    min-width: 156px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text);
    background: rgba(12, 17, 24, 0.82);
}

.button {
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(18, 28, 39, 0.86);
    cursor: pointer;
    font-weight: 800;
}

.button:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(28, 42, 58, 0.94);
}

.button--gold {
    color: #1b1203;
    border-color: rgba(247, 183, 51, 0.76);
    background: linear-gradient(180deg, #ffd66e, #f7b733 64%, #d28b1d);
}

.button--gold:hover {
    background: linear-gradient(180deg, #ffe08a, #f7b733 64%, #c77f15);
}

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

.metric {
    min-height: 108px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(27, 39, 52, 0.96), rgba(18, 27, 37, 0.96));
}

.metric span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric strong {
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1;
}

.notice {
    margin: 16px 0;
    border: 1px solid rgba(247, 183, 51, 0.35);
    border-radius: 8px;
    padding: 14px 16px;
    color: #ffe9a8;
    background: rgba(111, 68, 8, 0.26);
}

.notice--error {
    border-color: rgba(226, 74, 59, 0.5);
    color: #ffd1cc;
    background: rgba(110, 25, 18, 0.36);
}

.panel {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(17, 25, 35, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    padding: 4px 11px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

th,
td {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #d8e4ef;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

td {
    color: #ecf3f9;
}

tr:last-child td {
    border-bottom: 0;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.member {
    display: grid;
    gap: 3px;
    min-width: 190px;
}

.member strong {
    font-size: 0.98rem;
}

.member span {
    color: var(--muted);
    font-size: 0.78rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.status--titular,
.status--all {
    color: #dcffed;
    background: rgba(50, 199, 121, 0.16);
}

.status--reserva,
.status--pending {
    color: #fff1ba;
    background: rgba(241, 194, 71, 0.16);
}

.status--inativo,
.status--none {
    color: #ffd3ce;
    background: rgba(226, 74, 59, 0.16);
}

.status--waiting {
    color: #d9e7f5;
    background: rgba(159, 176, 194, 0.16);
}

.status--highlight {
    color: #fff1ba;
    background: rgba(247, 183, 51, 0.2);
}

.performance {
    display: grid;
    gap: 4px;
    justify-items: start;
}

.performance small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.empty {
    height: 92px;
    color: var(--muted);
    text-align: center;
}

.logs {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.log-line {
    display: grid;
    grid-template-columns: 104px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
}

.log-line strong {
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.log-line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-line time {
    color: #c3d0dd;
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .hero {
        min-height: 360px;
        align-items: stretch;
        background-position: 34% center;
    }

    .hero__content {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-end;
        padding: 20px;
    }

    .toolbar {
        justify-content: stretch;
    }

    .toolbar > * {
        flex: 1 1 150px;
    }

    .button,
    .month-control input {
        width: 100%;
    }

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

@media (max-width: 560px) {
    .app-shell {
        width: min(100% - 18px, 1180px);
        padding-top: 9px;
    }

    .brand {
        align-items: flex-start;
    }

    .brand__mark {
        width: 48px;
        height: 48px;
    }

    h1 {
        font-size: 2.35rem;
    }

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .log-line {
        grid-template-columns: 1fr;
    }
}
