:root {
    color-scheme: light;
    --ink: #15332f;
    --muted: #6c7c78;
    --accent: #166b56;
    --line: #e1e9e4;
    --danger: #ac3939;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f3f6f2;
    color: var(--ink);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}
button, input, select {
    font: inherit;
}
button, .sidebar a {
    cursor: pointer;
}
button {
    background: var(--accent);
    color: white;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: bold;
    margin: 4px 4px 4px 0;
}
button:hover {
    filter: brightness(.94);
}
button:disabled {
    opacity: .45;
    cursor: default;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #9ebc51;
    outline-offset: 3px;
}
.secondary {
    background: white;
    color: var(--ink);
    border-color: var(--line);
}
.danger-button {
    background: var(--danger);
}
input, select {
    display: block;
    border: 1px solid #cbd9d0;
    border-radius: 9px;
    padding: 10px 12px;
    width: 100%;
    background: white;
    color: var(--ink);
    margin: 6px 0 14px;
}
label {
    display: block;
}
h1, h2, h3, p {
    margin-top: 0;
}
h1 {
    font-size: 32px;
    line-height: 1.45;
    letter-spacing: -.7px;
    margin-bottom: 10px;
}
h2 {
    font-size: 21px;
    margin-bottom: 8px;
}
h3 {
    margin-top: 24px;
    font-size: 17px;
}
small, td small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.brand, .eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 16px;
}
.eyebrow {
    color: var(--accent);
    margin-bottom: 6px;
}
.muted {
    color: var(--muted);
    font-size: 13px;
}
.sidebar {
    width: 248px;
    background: #123a32;
    color: #eff5ec;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 34px 24px;
    display: flex;
    flex-direction: column;
}
.sidebar h2 {
    font-size: 24px;
}
.sidebar p {
    color: #abc5b9;
    font-size: 12px;
    margin-bottom: 38px;
}
.sidebar a {
    display: block;
    padding: 13px 10px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid #31564b;
}
.sidebar button {
    margin-top: 20px;
}
.side-bottom {
    margin-top: auto;
    padding-top: 30px;
    font-size: 12px;
}
.dashboard {
    margin-left: 248px;
    padding: 38px 42px;
    max-width: 1800px;
}
header, .section-head, footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 26px 0 18px;
}
.metric, .panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.metric {
    padding: 24px;
}
.metric span {
    color: var(--muted);
    font-size: 13px;
}
.metric strong {
    display: block;
    font-size: 28px;
    letter-spacing: -.5px;
    margin: 12px 0;
}
.metric.warning {
    background: #fff1ea;
    border-color: #edba9b;
    color: #9d3e20;
}
.panel {
    padding: 25px;
    margin-top: 25px;
}
.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}
th {
    padding: 13px 10px;
    color: var(--muted);
    font-weight: normal;
    background: #f7faf7;
    white-space: nowrap;
}
td {
    padding: 16px 10px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}
.badge {
    display: inline-block;
    background: #edf4e9;
    color: #46704b;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
}
.notice {
    border: 1px solid #d8dfb1;
    background: #f8fae9;
    border-radius: 10px;
    padding: 13px 17px;
    margin: 15px 0;
    overflow-wrap: anywhere;
}
.notice.danger {
    border-color: #edc7be;
    background: #fff1ed;
    color: #9d3e2f;
}
.filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}
.filters label {
    flex: 1;
    min-width: 150px;
}
.filters button {
    margin-bottom: 14px;
}
footer {
    margin-top: 24px;
    color: var(--muted);
    font-size: 12px;
}
dialog {
    width: min(980px, 94vw);
    max-height: 90vh;
    border: 0;
    border-radius: 18px;
    padding: 25px;
    color: var(--ink);
}
dialog::backdrop {
    background: #122d26a8;
}
pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    background: #f3f6f2;
    padding: 18px;
    border-radius: 10px;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin: 15px 0;
}
.image-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    overflow-wrap: anywhere;
    font-size: 12px;
}
.image-card input {
    width: auto;
}
.image-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: #f3f6f2;
    display: block;
    margin-bottom: 10px;
}
.login {
    max-width: 480px;
    margin: 8vh auto;
    padding: 38px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
}
.login form {
    margin-top: 28px;
}
.login button {
    width: 100%;
}
@media (max-width: 1200px) {
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard {
        padding: 28px;
    }
}
@media (max-width: 760px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 20px;
    }
    .sidebar p, .sidebar a, .side-bottom span {
        display: none;
    }
    .side-bottom {
        padding-top: 0;
    }
    .sidebar button {
        margin-top: 5px;
    }
    .dashboard {
        margin-left: 0;
        padding: 20px 14px;
    }
    h1 {
        font-size: 26px;
    }
    .metric {
        padding: 18px;
    }
    .metric strong {
        font-size: 22px;
    }
    .panel {
        padding: 16px;
    }
    header, .section-head, footer {
        flex-wrap: wrap;
    }
    .login {
        margin: 5vh 14px;
        padding: 26px;
    }
}
