:root {
    --primary: #24475c;
    --accent: #367e9a;
    --background: #f3f6f9;
    --text: #243647;
    --border: #dce4eb;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

aside {
    position: fixed;
    width: 235px;
    height: 100vh;
    background: #163346;
    color: white;
    padding: 30px 20px;
}

.brand {
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand span { color: #78c7d6; }

.subtitle {
    color: #aac1cf;
    font-size: 12px;
    margin: 8px 0 35px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav button {
    text-align: left;
    background: transparent;
    padding: 15px;
}

nav button:hover,
nav button.active {
    background: #2c5368;
}

.sidebar-footer {
    position: absolute;
    bottom: 25px;
    font-size: 12px;
    line-height: 1.8;
    color: #abc0cb;
}

main {
    margin-left: 235px;
    padding: 30px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 15px;
}

h1 { margin: 0; font-size: 26px; }
h2 { font-size: 17px; margin-top: 0; }
p { color: #647789; line-height: 1.6; }

.status {
    background: #e1eef3;
    color: #315c70;
    padding: 9px 14px;
    border-radius: 6px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.metric, .panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
}

.metric span {
    color: #6e8290;
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    color: var(--primary);
}

.panel { margin-bottom: 20px; }

button {
    border: 0;
    background: var(--accent);
    color: white;
    padding: 11px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

button:hover { opacity: .85; }

input, select {
    padding: 11px;
    border: 1px solid #cbd7e0;
    border-radius: 5px;
    background: white;
    color: var(--text);
    min-width: 0;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-row input { flex: 1; }

.filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.checkbox {
    display: block;
    margin: 15px 0;
}

.table-wrap {
    overflow: auto;
    max-height: 650px;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th, td {
    text-align: left;
    padding: 11px;
    border-bottom: 1px solid #e4eaf0;
    overflow-wrap: anywhere;
}

th {
    background: #edf3f7;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

tbody tr:hover { background: #f2f7fa; }

.small {
    color: #6b7c89;
    font-size: 12px;
    margin: 12px 0;
}

#notice {
    margin: 12px 0;
    color: #a14035;
}

dialog {
    border: 1px solid var(--border);
    border-radius: 10px;
    width: min(1100px, 92vw);
    max-height: 85vh;
    overflow: auto;
}

dialog::backdrop {
    background: #102e4080;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 900px) {

    aside {
        position: static;
        width: auto;
        height: auto;
        padding: 15px;
    }

    nav { flex-direction: row; flex-wrap: wrap; }

    .sidebar-footer { display: none; }

    main {
        margin: 0;
        padding: 15px;
    }

    .metrics, .filters {
        grid-template-columns: repeat(2, 1fr);
    }
}
