:root {
    --purple: #260a43;
    --purple-dark: #180529;
    --yellow: #ffcc07;
    --red: #e21b2d;
    --white: #ffffff;
    --field: rgba(255, 255, 255, 0.93);
    --panel: rgba(255, 255, 255, 0.11);
    --panel-border: rgba(255, 255, 255, 0.18);
    --text-dark: #1d1228;
    --soft-text: rgba(255,255,255,0.82);
    --green: #9ff0b7;
    --warning: #ffd479;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Heebo, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255,204,7,0.13), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(226,27,45,0.18), transparent 32rem),
        linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    color: var(--white);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-bottom: 24px;
}

.logo {
    display: block;
    object-fit: contain;
}

.wlfd-logo {
    max-height: 82px;
}

.town-logo {
    max-height: 62px;
}

.title-block {
    text-align: center;
    margin-bottom: 28px;
}

.title-block h1 {
    margin: 0;
    color: var(--yellow);
    font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
    font-size: clamp(3rem, 8vw, 6.4rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.main-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 30px;
    padding: clamp(22px, 4vw, 42px);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}

.section {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 24px;
    padding: clamp(18px, 3vw, 28px);
    margin-bottom: 22px;
}

h2 {
    margin: 0 0 18px;
    color: var(--yellow);
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

p {
    color: var(--soft-text);
    line-height: 1.55;
}

.top-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.top-links a,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.20);
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
}

.top-links a.primary,
.button-link.primary {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.top-links a.yellow,
.button-link.yellow {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--text-dark);
    font-weight: 700;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 22px;
    padding: 20px;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--yellow);
    line-height: 1;
}

.stat-label {
    margin-top: 8px;
    color: rgba(255,255,255,0.88);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.14);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background: rgba(255,255,255,0.95);
    color: var(--text-dark);
}

th {
    background: var(--purple);
    color: var(--yellow);
    text-align: left;
    padding: 12px;
    font-size: 0.9rem;
}

td {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 12px;
    vertical-align: top;
    font-size: 0.94rem;
}

tr:hover td {
    background: #fff8df;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eee;
    color: var(--text-dark);
    font-size: 0.82rem;
}

.badge.warn {
    background: #fff3bf;
}

.badge.danger {
    background: #ffd8d8;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 18px;
}

label {
    color: rgba(255,255,255,0.88);
    font-weight: 400;
}

input,
select {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.32);
    background: var(--field);
    color: var(--text-dark);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 1rem;
}

button,
.submit-btn {
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: white;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.detail-card {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 16px;
}

.detail-card.current {
    border-color: rgba(255,204,7,0.45);
}

.detail-card h3 {
    margin: 0 0 12px;
    color: var(--yellow);
}

.detail-card p {
    margin: 8px 0;
}

@media (max-width: 900px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 640px) {
    .grid-cards,
    .filters {
        grid-template-columns: 1fr;
    }

    .header {
        flex-wrap: wrap;
    }

    .wlfd-logo {
        max-height: 72px;
    }

    .town-logo {
        max-height: 54px;
    }

    .main-card {
        border-radius: 24px;
    }
}

@media print {
    body {
        background: white;
        color: black;
    }

    .header,
    .top-links,
    .filters {
        display: none;
    }

    .main-card,
    .section,
    .detail-card {
        box-shadow: none;
        background: white;
        color: black;
        border: 1px solid #ccc;
    }

    h1,
    h2,
    h3,
    p {
        color: black !important;
    }
}
