:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172936;
    background: #f3f6f7;
    line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #176f70; }
.topbar { background: #12363b; color: white; }
.topbar-inner { margin: auto; min-height: 76px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: white; font-size: 1.2rem; font-weight: 750; text-decoration: none; }
.brand span { display: block; font-size: .62rem; letter-spacing: .16em; color: #b6d5d0; }
.topbar .button-quiet { color: white; border-color: #6a9290; }
.container { width: 100%; margin: 0 auto; padding: 36px 28px 80px; }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -.03em; }
.eyebrow { color: #347b79; font-size: .7rem; font-weight: 800; letter-spacing: .15em; margin: 0 0 8px; }
.muted { color: #63777c; margin: 8px 0 0; }
.card { background: #fff; border: 1px solid #dfe9e8; border-radius: 12px; box-shadow: 0 5px 25px #183d3b0a; padding: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd9d8; border-radius: 7px; background: white; color: #264b4b; padding: 10px 16px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { background: #eff7f5; }
.button.primary { border-color: #176d67; background: #176d67; color: white; }
.button.primary:hover { background: #105b56; }
.button-quiet { background: transparent; }
.danger { color: #a13838; border-color: #e9c9c9; }
.danger:hover { background: #fff2f2; }
label { display: flex; flex-direction: column; gap: 7px; color: #40595c; font-size: .85rem; font-weight: 650; }
input, select { width: 100%; min-width: 0; border: 1px solid #cbd9d8; border-radius: 7px; padding: 10px 12px; background: white; color: #172936; font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #91cfc2; outline-offset: 2px; }
.login { max-width: 420px; margin: 7vh auto; padding: 34px; }
.login-form { display: grid; gap: 18px; margin-top: 24px; }
.alert { border-radius: 7px; padding: 12px 15px; margin: 0 0 20px; }
.login .alert { margin-top: 20px; }
.success { color: #155e4b; background: #e2f5ec; }
.error { color: #8c2828; background: #fff0ef; }
.search-row { display: flex; align-items: end; gap: 10px; }
.search-row label { width: min(100%, 560px); }
.page-size { display: flex; align-items: end; gap: 10px; margin-top: 18px; }
.page-size select { min-width: 120px; }
.filters, .column-chooser, .bulk-editor { margin-top: 18px; }
.filters summary, .column-chooser summary, .bulk-editor summary { color: #176f70; font-weight: 650; cursor: pointer; }
.filter-help, .table-hint { color: #63777c; font-size: .8rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.filter-grid label { font-size: .78rem; }
.filter-grid input { padding: 7px 9px; }
.column-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 16px 0; max-width: 320px; max-height: 360px; overflow-y: auto; }
.column-grid label { flex-direction: row; align-items: center; font-size: .8rem; }
.column-grid input { width: auto; margin: 0; }
.bulk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; }
.bulk-toggle { flex-direction: row; align-items: center; margin-bottom: 6px; }
.bulk-toggle input, .selection-cell input { width: auto; margin: 0; }
.bulk-field > input { padding: 7px 9px; }
.list-meta { display: flex; justify-content: space-between; color: #6d8083; font-size: .85rem; margin: 22px 0 8px; }
.list-meta strong { color: #344f53; }
.table-hint { margin: 0 0 10px; }
.table-wrap { overflow-x: auto; border: 1px solid #e8efee; }
.table-wrap:focus-visible { outline: 3px solid #91cfc2; outline-offset: 2px; }
.product-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; text-align: left; font-size: .8rem; }
.product-table th { color: #52696d; font-size: .72rem; background: #f3f7f6; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: #176f70; text-decoration: underline; }
.product-table td, .product-table th { padding: 7px 9px; border-bottom: 1px solid #e8efee; min-width: 105px; max-width: 200px; overflow-wrap: anywhere; vertical-align: top; }
.product-table .selection-cell { position: sticky; left: 0; z-index: 2; min-width: 42px; width: 42px; max-width: 42px; text-align: center; background: white; }
.product-table th.selection-cell { z-index: 3; background: #f3f7f6; }
.product-table td:nth-child(2), .product-table th:nth-child(2) { position: sticky; left: 42px; z-index: 1; background: white; box-shadow: 2px 0 4px #183d3b18; }
.product-table th:nth-child(2) { z-index: 2; background: #f3f7f6; }
.product-table .name-cell { min-width: 200px; }
.article-link { font-weight: 700; text-decoration: none; }
.empty { padding: 25px 0; color: #718286; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.pagination:empty { display: none; }
.back { display: inline-block; margin-bottom: 24px; font-size: .9rem; text-decoration: none; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.form-actions { display: flex; gap: 10px; border-top: 1px solid #e8efee; margin-top: 30px; padding-top: 24px; }
.delete-form { margin-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 800px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) {
    .container { padding: 28px 16px 60px; }
    .topbar-inner { padding: 14px 16px; }
    .heading { align-items: start; flex-direction: column; }
    .card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .search-row { flex-wrap: wrap; }
    .search-row label { flex-basis: 100%; }
}
