:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --ink: #172033;
    --muted: #5b677a;
    --line: #d9e2ef;
    --brand: #0b5cab;
    --brand-dark: #084987;
    --yes: #0f7b4a;
    --yes-bg: #e7f7ef;
    --blank: #94a3b8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(11, 92, 171, 0.10), transparent 35%),
        linear-gradient(180deg, #eef3f9 0%, var(--bg) 40%);
    min-height: 100vh;
}

.wrap {
    width: min(1440px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.hero h1 {
    margin: 0 0 0.35rem;
    font-size: 1.7rem;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #e8f1fb;
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 600;
}

.cards {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.04);
}

.card .label {
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.card .value {
    font-size: 1.35rem;
    font-weight: 700;
}

.filters {
    display: grid;
    grid-template-columns: 1.5fr 0.55fr 0.7fr 1.35fr 0.55fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

input[type="text"],
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    font: inherit;
    background: #fff;
}

button,
.btn {
    border: 0;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover { background: var(--brand-dark); }

.btn-light {
    background: #eef2f7;
    color: var(--ink);
}

.btn-export {
    background: var(--yes);
    color: #fff;
}

.btn-export:hover { background: #0c6840; }

.table-card {
    overflow: auto;
}

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

th, td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 0.92rem;
}

th {
    background: #f7fafc;
    color: #334155;
    position: sticky;
    top: 0;
}

tr:hover td { background: #f8fbff; }

.yes {
    display: inline-block;
    min-width: 2.5rem;
    text-align: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--yes-bg);
    color: var(--yes);
    font-weight: 700;
    font-size: 0.82rem;
}

.blank {
    color: var(--blank);
}

.meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.pager {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pager a {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    background: #eef2f7;
    color: var(--ink);
    text-decoration: none;
}

.pager a.active {
    background: var(--brand);
    color: #fff;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.note {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 1100px) {
    .cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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