:root {
    color-scheme: light;
    font-family: "DM Sans", Inter, system-ui, sans-serif;
    background: #f4f7f5;
    color: #172922;
    --ink: #172922;
    --muted: #4d6258;
    --green: #175c46;
    --line: #dce5df;
    --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #0d3d2d; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, audio:focus-visible {
    outline: 3px solid #51a789;
    outline-offset: 3px;
}
p { color: var(--muted); line-height: 1.5; margin: 0; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(1.85rem, 4.5vw, 2.8rem); line-height: 1.1; }
h2 { font-size: 1.22rem; }
.topbar { background: #142f27; color: white; }
.topbar-content, .container { width: min(100% - 3rem, 1152px); margin-inline: auto; }
.topbar-content { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: white; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 1.04rem; font-weight: 800; letter-spacing: -.02em; }
.brand:hover { color: #dbf3e8; }
.brand-icon { display: flex; align-items: center; justify-content: center; gap: 2px; width: 31px; height: 31px; background: #d8f2e3; border-radius: 9px; }
.brand-icon i { width: 2px; height: 8px; background: #1e654d; border-radius: 3px; }
.brand-icon i:nth-child(2n) { height: 13px; }
.brand-icon i:nth-child(3) { height: 18px; }
.account { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.account .subtle { color: white; border-color: #6b837a; }
.account .subtle:hover { background: #24493c; }
.container { padding-block: 42px 54px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.heading p { margin-top: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 13px; min-height: 40px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: .87rem; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.primary { color: white; background: var(--green); }
.primary:hover { color: white; background: #114c3a; }
.secondary, .subtle { color: var(--green); background: transparent; border-color: #a9bfb3; }
.secondary:hover, .subtle:hover { background: #eaf4ed; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.metric { display: grid; gap: 9px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 13px; padding: 17px 19px; text-decoration: none; }
.metric:hover { border-color: #8eb4a4; }
.metric span { font-size: .82rem; font-weight: 700; color: var(--muted); }
.metric strong { font-size: 1.85rem; line-height: 1; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.filters, .upload-fields { display: grid; align-items: end; grid-template-columns: minmax(160px, 1.45fr) repeat(4, minmax(95px, 1fr)) auto; gap: 10px; padding: 18px; }
label { display: grid; gap: 6px; min-width: 0; font-size: .82rem; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; min-height: 40px; border: 1px solid #b9cbc1; border-radius: 7px; padding: 8px 9px; color: var(--ink); background: white; font: inherit; font-size: .9rem; font-weight: 450; }
textarea { resize: vertical; line-height: 1.5; }
input[type=file] { font-size: .8rem; }
input[type=file]::file-selector-button { border: 0; background: #e9f2ed; border-radius: 4px; color: var(--green); padding: 4px; cursor: pointer; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; border-top: 1px solid var(--line); }
.list-heading a { font-size: .83rem; }
.total { background: #eaf3ee; color: #315e4e; border-radius: 20px; font-size: .8rem; padding: 3px 8px; vertical-align: 2px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f1f6f3; color: var(--muted); font-size: .77rem; padding: 12px 18px; }
td { padding: 14px 18px; border-top: 1px solid var(--line); font-size: .88rem; }
tr:hover td { background: #fbfdfc; }
td:first-child { width: 47%; }
.row-title { font-weight: 750; text-decoration: none; color: var(--ink); }
.row-title:hover { text-decoration: underline; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.badge { display: inline-block; width: fit-content; white-space: nowrap; font-size: .76rem; padding: 4px 9px; border-radius: 20px; background: #eaf0ed; color: #40584e; font-weight: 700; }
.badge.review { background: #e9eefb; color: #314b82; }
.badge.missing { background: #fff0d3; color: #784c00; }
.badge.approved { background: #ddf3e6; color: #165a3c; }
.badge.failed { background: #fae8e5; color: #8c3328; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.pagination, .actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }
.pagination { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.upload { margin-top: 22px; padding: 18px; scroll-margin: 20px; }
.upload p { margin: 5px 0 14px; font-size: .88rem; }
.upload-fields { padding: 0; grid-template-columns: minmax(200px, 1.35fr) 1fr 1fr auto; }
.optional { color: var(--muted); font-size: .75rem; font-weight: 500; }
.notice { margin: 0 0 18px; background: #e3f2e8; color: #154e3b; padding: 12px 15px; border-radius: 8px; font-size: .9rem; }
ul.notice { padding-left: 32px; }
.notice.error { background: #fbece9; color: #7e3028; }
.notice-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back { display: inline-block; margin-bottom: 18px; font-size: .9rem; }
.detail { padding: 18px; margin-bottom: 16px; }
.detail audio { margin-top: 10px; width: min(100%, 480px); }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.detail-grid .detail { margin-bottom: 0; }
.details-side p { font-size: .85rem; overflow-wrap: anywhere; }
.stack { display: grid; gap: 14px; }
.login-wrap { width: min(100% - 2rem, 430px); margin: 8vh auto 2rem; }
.login { padding: 25px; }
.login h1 { font-size: 1.9rem; }
.login p { margin: 10px 0 20px; }
@media (max-width: 840px) {
    .filters { grid-template-columns: repeat(3, 1fr); }
    .upload-fields { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 610px) {
    .topbar-content, .container { width: calc(100% - 1.5rem); }
    .container { padding-top: 26px; }
    .heading { align-items: flex-start; flex-direction: column; }
    .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .metric { padding: 13px; }
    .filters { padding: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters .search { grid-column: span 2; }
    .account span { display: none; }
    .table-wrap { overflow: auto; }
    table { min-width: 495px; }
    th, td { padding-inline: 12px; }
    .upload-fields, .detail-grid { grid-template-columns: 1fr; }
}
