/* Палитра, размеры полей и оформление таблиц по брендбуку DP_Reports. */
:root {
    color-scheme: light;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --border: #e5e5ea;
    --control-border: #ced4da;
    --accent: #0071e3;
    --control-height: 34px;
    --control-radius: 12px;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f5f5f7;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(92%, 1360px); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--border); }
.bar, .account, .page-title, .actions, .pagination { display: flex; align-items: center; gap: .75rem; }
.bar { min-height: 56px; justify-content: space-between; }
.brand { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.account { color: var(--muted); }
main { padding: 1.75rem 0 3rem; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.22; margin: 0; letter-spacing: -.025em; }
h2 { margin: 0 0 1rem; font-size: 1.18rem; }
.page-title { flex-wrap: wrap; justify-content: space-between; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.panel { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 2px 10px rgb(0 0 0 / .035); overflow: hidden; }
.padded, .filters { padding: 1.2rem; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: .7rem; }
.filters .search { flex: 1 1 19rem; }
label, .fields p { display: grid; gap: .35rem; font-weight: 600; }
input:not([type=checkbox]), select, textarea, button, .button { font: inherit; border-radius: var(--control-radius); }
input:not([type=checkbox]), select, textarea { border: 1px solid var(--control-border); background: #fff; color: var(--ink); min-width: 0; width: 100%; padding: .3rem .65rem; min-height: var(--control-height); }
textarea { resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-height); padding: .25rem .85rem; background: #fff; color: var(--ink); border: 1px solid var(--border); cursor: pointer; white-space: nowrap; font-weight: 600; }
button:hover, .button:hover { background: #f2f2f7; text-decoration: none; }
.primary { color: white; border-color: var(--accent); background: var(--accent); }
.primary:hover { background: #005fbe; }
.quiet { color: #0066cc; border-color: transparent; padding-inline: .35rem; }
.danger { color: #ae2018; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .68rem .85rem; border-bottom: 1px solid var(--border); }
th { background: #f2f2f7; color: #3a3a3c; font-size: .86rem; }
tbody tr:nth-child(even) { background: #fafafc; }
tbody tr:hover { background: #eaf3ff; }
tbody tr:last-child td { border-bottom: 0; }
.item-link { font-weight: 600; }
.code, .numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.numeric { text-align: center; }
.status { display: inline-block; border-radius: 999px; padding: .2rem .62rem; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.available { background: #e5f7eb; color: #176435; }
.unavailable { background: #f2f2f7; color: #505057; }
.pagination { justify-content: center; padding: .8rem; border-top: 1px solid var(--border); }
.empty { text-align: center; padding: 2rem; color: var(--muted); }
.back { display: inline-block; margin-bottom: .8rem; }
.summary { margin: -.45rem 0 1.15rem; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tabs a { color: var(--muted); font-weight: 600; padding: .55rem .9rem; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a[aria-current=page] { color: #0066cc; border-bottom-color: var(--accent); background: #eaf3ff; border-radius: 9px 9px 0 0; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.specs { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.specs dt, .specs dd { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.specs dt { padding-right: .6rem; color: var(--muted); }
.description { overflow-wrap: anywhere; }
.fields p { margin: 0 0 .85rem; }
.fields > label { margin-bottom: .75rem; }
.fields p:has(input[type=checkbox]) { display: flex; }
.helptext { color: var(--muted); font-weight: 400; }
.errorlist { color: #ae2018; margin: .35rem 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: .8rem; }
.photo { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f2f2f7; }
.photo-info { padding: .65rem; }
.actions { flex-wrap: wrap; }
.documents { list-style: none; margin: 0; padding: 0; }
.documents li { padding: .65rem 0; border-bottom: 1px solid var(--border); }
.documents li:last-child { border-bottom: 0; }
.documents p { margin: .2rem 0; }
.notice { padding: .65rem 1rem; border: 1px solid #bce4c9; background: #e5f7eb; border-radius: 12px; }
.login { max-width: 420px; padding: 1.5rem; margin: 3vh auto; }
.login h1 { margin-bottom: 1rem; }
@media (max-width: 760px) {
    .cards { grid-template-columns: 1fr; }
    .catalog-list table { min-width: 660px; }
    .filters .search { flex-basis: 100%; }
    main { padding-top: 1rem; }
}

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1rem; }
.metric { display: grid; gap: .5rem; color: var(--ink); }
.metric span { color: var(--muted); }
.metric strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.metric:hover { border-color: var(--accent); text-decoration: none; }
.report-panel { margin-top: 1rem; }
.report-panel > h2 { margin: 0; padding: 1rem 1.2rem; }
.row-title { color: var(--ink); background: inherit; font-size: inherit; }
.coverage { white-space: nowrap; }
.coverage progress { width: clamp(3rem, 12vw, 9rem); accent-color: var(--accent); }
.filter-summary { margin: 0 1.2rem .85rem; color: var(--muted); }

.sync-action { margin-top: 1rem; }
.notice.error { border-color: #f5c2c0; background: #fff1f0; }

.top .bar { justify-content: flex-start; column-gap: 1.4rem; }
.bar .brand { flex-shrink: 0; }
.bar .account { margin-inline-start: auto; min-width: 0; }
.account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .service-nav { margin: 0; border-bottom: 0; min-width: 0; }
.service-nav a { border-radius: 9px; border-bottom: 0; }
.service-nav a[aria-current=page] { border-radius: 9px; }
@media (max-width: 760px) {
    .top .bar { flex-wrap: wrap; column-gap: .65rem; row-gap: .25rem; padding-block: .55rem; }
    .bar .account { max-width: 49%; }
    .bar .service-nav { order: 1; flex-basis: 100%; }
    .service-nav a { padding-inline: .65rem; }
}
