:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: #d8dee8;
    --accent: #146c5a;
    --accent-dark: #0f5144;
    --warn: #8a4b00;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a {
    color: var(--accent-dark);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: #17202a;
    color: #fff;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

.brand {
    font-weight: 700;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
}

.panel,
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel {
    padding: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.card {
    padding: 16px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.search-form {
    margin: 0 0 18px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}

button,
.button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    background: #fff;
    color: var(--accent-dark);
}

label {
    display: block;
    margin: 12px 0 5px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

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

.flash {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #b9dfd4;
    border-radius: 6px;
    background: #e9f7f3;
}

.warning {
    color: var(--warn);
    font-weight: 700;
}

.print-only {
    display: none;
}

@media print {
    .topbar,
    .actions,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
    }

    .layout {
        width: 100%;
        margin: 0;
    }

    .panel,
    .card {
        border: 0;
        padding: 0;
    }

    .print-only {
        display: block;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    table {
        page-break-inside: avoid;
    }
}

@media (max-width: 680px) {
    .search-row {
        grid-template-columns: 1fr;
    }
}
