:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  color: #182d34;
  background: #eff4f5;
  --paper: #fff;
  --line: #d8e4e7;
  --muted: #536b74;
  --ink: #182d34;
  --accent: #235e65;
  --accent-deep: #19474d;
  --accent-soft: #e6f0f0;
  --rail: #172e35;
  --radius: 12px;
  --shadow: 0 2px 3px rgb(26 49 56 / 4%), 0 12px 26px rgb(26 49 56 / 3%);
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { min-width: 0; margin: 0; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 2.1vw, 2.15rem); line-height: 1.17; letter-spacing: -.045em; }
h2 { font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.3; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
:focus-visible, :is(input, select, textarea):focus {
  outline: 1px solid var(--focus-color, #528088);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px var(--focus-halo, rgb(57 121 130 / 13%));
}
.field :is(input, select, textarea):focus { outline-offset: -1px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; flex: 0 0 auto; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: fixed; z-index: 3; top: .75rem; left: 1rem; padding: .75rem 1rem; background: var(--paper); color: var(--accent-deep); border-radius: 6px; clip-path: inset(50%); }
.skip:focus-visible { clip-path: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.rail {
  --focus-color: #9ac8ce;
  --focus-halo: rgb(154 200 206 / 17%);
  min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 20px;
  padding: 26px 14px 20px; color: #d4e3e5; background: var(--rail);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; border-bottom: 1px solid #354d53; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; color: white; }
.brand span { color: #b4c8cd; font-size: .71rem; }
.brand-logo { display: block; width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain; }
.brand .brand-logo { padding: 4px; background: #f2f3f5; border-radius: 8px; }
.rail-nav { display: grid; gap: 5px; }
.nav-label { padding: 10px 10px 4px; color: #b2c8cc; font-size: .68rem; font-weight: 700; letter-spacing: .085em; text-transform: uppercase; }
.nav-button { display: flex; align-items: center; gap: 9px; min-height: 43px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; text-align: left; color: #e6eff1; background: transparent; font-size: .87rem; font-weight: 600; }
.nav-button:hover { background: #203c43; }
a.nav-button { text-decoration: none; }
.nav-button[aria-current] { color: #fff; background: #2b535c; border-color: #3c6670; }
.nav-button svg { color: #a1c5ca; }
.nav-button[aria-current] svg { color: #c9f0f0; }
.rail-footer { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 13px 8px 0; border-top: 1px solid #354d53; font-size: .77rem; color: #bdd0d4; }
.rail-footer span, .profile-pill span { width: 7px; height: 7px; border-radius: 50%; background: #6ab9b5; }

.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 8px clamp(16px, 2.6vw, 40px); background: var(--paper); border-bottom: 1px solid var(--line); }
.trail { color: var(--muted); font-size: .83rem; }
.trail span { margin: 0 .35rem; color: #80939a; }
.trail strong { color: var(--ink); font-weight: 650; }
.account { display: flex; align-items: center; gap: 9px; min-width: 0; }
.account-label { min-width: 0; font-size: .84rem; }
.account-label strong { display: block; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-label span { display: block; color: var(--muted); font-size: .72rem; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 50%; font-weight: 700; font-size: .73rem; }
#main { width: 100%; max-width: 1450px; margin-inline: auto; padding: 26px clamp(16px, 2.6vw, 40px) 48px; }
.view { display: grid; gap: 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 2px; }
.section-heading p:not(.eyebrow), .card-heading p, .login-heading p { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.eyebrow { margin-bottom: .45rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; font-weight: 750; color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.stat { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat span:not(.stat-icon) { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat strong { display: block; color: var(--ink); font-size: 1.42rem; line-height: 1.23; font-variant-numeric: tabular-nums; }
.stat-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 9px; color: var(--accent); background: var(--accent-soft); }
.stat-icon.pending { color: #77571d; background: #f8efd9; }
.stat-icon.published { color: #285e47; background: #e5f1e9; }

.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 19px 13px; }
.form-card { padding: 18px 19px; }
.form-card h2 { margin-bottom: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; min-height: 39px; padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; color: var(--ink); background: transparent; font-size: .88rem; font-weight: 650; line-height: 1.3; text-decoration: none; text-align: center; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.button.secondary { color: var(--accent-deep); background: #f7fafb; border-color: #cfdde0; }
.button.secondary:hover:not(:disabled), .button.quiet:hover { background: var(--accent-soft); }
.button.quiet { min-height: 35px; color: var(--accent-deep); }
.action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 4px 9px; border-radius: 99px; background: #eef4f5; color: #3d5a63; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.profile-pill { border: 1px solid #d5e4e6; background: #f7fbfb; }
.pill.ready { color: #715013; background: #f8efd9; }
.pill.published { color: #295c43; background: #e6f2eb; }
.pill.invalid { color: #8a3437; background: #f9eaea; }
.pill.review { color: #2e5967; background: #e7f0f5; }
.supplier-health-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.supplier-health-summary:empty { display: none; }
.supplier-health-stat { display: grid; gap: 4px; padding: 12px 16px; align-items: start; }
.supplier-health-stat strong { font-size: 1rem; }
.supplier-health-stat[data-state="ok"] { border-top: 3px solid #4a8565; }
.supplier-health-stat[data-state="warning"] { border-top: 3px solid #a77a29; }
.supplier-health-stat[data-state="error"] { border-top: 3px solid #a6494c; }
#supplier-status-table .pill { white-space: normal; }
#supplier-status-table td:first-child { min-width: 150px; }
#supplier-status-table td:nth-child(3) { min-width: 225px; }
#supplier-status-table td:nth-child(2), #supplier-status-table td:nth-child(4) { min-width: 145px; }

.upload-form { display: grid; grid-template-columns: minmax(155px, .75fr) minmax(170px, 1fr) auto; align-items: end; gap: 8px 12px; padding: 2px 19px 17px; }
.zhuk-source-settings { margin-bottom: 13px; }
.zhuk-preview-controls { margin: 0 19px 13px; }
.zhuk-preview-controls:last-child { margin-top: 13px; }
.zhuk-number-field { min-width: 125px; max-width: 185px; font-size: .74rem; }
.zhuk-number-field input { font-size: .84rem; }
.zhuk-number-field input[aria-invalid="true"] { border-color: #ad4149; }
.field { display: grid; gap: 5px; color: var(--ink); font-size: .82rem; font-weight: 650; min-width: 0; }
.field input, .field select, .field textarea, .static-field { min-width: 0; max-width: 100%; width: 100%; min-height: 40px; border: 1px solid #cbdadd; border-radius: 8px; padding: 7px 9px; background: var(--paper); color: var(--ink); font-size: .94rem; font-weight: 450; }
.field textarea { resize: vertical; }
.static-field { overflow-wrap: anywhere; background: #f6f9fa; }
.field input[type=file] { min-height: 40px; padding: 5px; }
.field input[type=file]::file-selector-button { margin-right: 8px; padding: 4px 7px; font: inherit; font-size: .8rem; font-weight: 600; border: 0; border-radius: 4px; color: var(--accent-deep); background: var(--accent-soft); cursor: pointer; }
.hint { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.hint code { color: var(--accent-deep); }
.stack { display: grid; gap: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.check { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; font-size: .88rem; }
.check input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
legend { padding-inline: 4px; font-weight: 650; font-size: .83rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 4px 8px; }
.supplier-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.supplier-section-heading h2 { margin: 0; overflow-wrap: anywhere; }
.supplier-form-fields { border: 0; padding: 0; }
.supplier-items:empty { display: none; }
.supplier-wide { grid-column: 1 / -1; }
.supplier-coordinate { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 3px 8px; }
.supplier-coordinate .hint { grid-column: 1 / -1; }
.supplier-coordinate [aria-disabled="true"] { opacity: .55; }
.supplier-address-lookup { grid-column: 1 / -1; }
.supplier-address-lookup .hint:empty { display: none; }
.supplier-item { background: #f7fafb; }
.supplier-point-contact { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.supplier-point-contact .field { flex: 1 1 250px; min-width: 0; }
#supplier-contact-dialog { width: min(calc(100% - 30px), 610px); max-height: calc(100% - 30px); overflow-y: auto; }
#supplier-contact-fields .action-group { justify-content: flex-start; }
#supplier-contact-feedback { margin: 0; }
.supplier-item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.supplier-item-row .form-grid { align-items: end; }
.supplier-requisites { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.supplier-requisites summary { cursor: pointer; font-size: .83rem; font-weight: 650; }
.supplier-requisites[open] summary { margin-bottom: 12px; }
#supplier-editor-row > td { padding: 0; }
#supplier-editor-row #supplier-editor { border: 0; border-radius: 0; box-shadow: none; background: #f7fafb; }
#supplier-feedback { margin: 0; }

.table-scroll { overflow-x: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: #91aeb2 #eff4f5; }
.table-scroll:focus-visible { outline-offset: -1px; }
.table-scroll:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.table-tip { display: none; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
#batch-list table { min-width: 690px; }
#batch-list .table-action { white-space: normal; overflow-wrap: anywhere; }
#batch-list th:nth-child(3) { min-width: 155px; }
#catalog-detail-body table { min-width: 480px; }
#detail-rows table { min-width: 710px; }
#detail-rows th:nth-child(2), #detail-rows th:nth-child(3), #offer-list th:first-child, #offer-list th:nth-child(4) { min-width: 84px; }
#detail-rows th:nth-child(4) { min-width: 144px; }
#detail-rows th:nth-child(5), #detail-rows th:nth-child(6) { min-width: 86px; }
#offer-list table { min-width: 710px; }
#supplier-list table { table-layout: fixed; }
#supplier-list th:first-child { width: 50%; }
#supplier-list th:last-child { width: 22%; }
#supplier-list th, #supplier-list .table-action { white-space: normal; overflow-wrap: anywhere; }
#user-list table { min-width: 490px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
th { color: #425f68; background: #f3f7f8; font-size: .77rem; font-weight: 650; white-space: nowrap; }
#detail-rows td:nth-child(2), #detail-rows td:nth-child(3),
#detail-rows td:nth-child(5), #detail-rows td:nth-child(6),
#offer-list td:first-child, #offer-list td:nth-child(4), #offer-list td:nth-child(5), #offer-list td:nth-child(6) {
  white-space: nowrap;
}
tbody tr:hover { background: #f8fafb; }
.table-action { padding: 0; border: 0; color: var(--accent-deep); background: transparent; font: inherit; font-weight: 650; text-align: left; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.table-secondary { display: block; margin-top: 1px; color: var(--muted); font-size: .77rem; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin: 0 19px 13px; font-size: .82rem; color: var(--muted); }
.row-error { color: #88363a; min-width: 110px; }
.empty { padding: 25px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.notice { margin-bottom: 13px; padding: 9px 12px; border: 1px solid #c7ddd8; border-radius: 8px; color: #24554d; background: #edf7f4; font-size: .87rem; }
.notice.is-error { color: #822f36; background: #fdf0f0; border-color: #ebced0; }
.notice.is-info { color: #234f5c; background: #e6f2f6; border-color: #c7dce3; }

.login-screen { display: grid; min-height: 100vh; padding: 22px 15px; place-items: center; background: radial-gradient(ellipse at 25% 0%, #dceced, transparent 60%), #eff4f5; }
.login-card { display: grid; gap: 21px; width: min(100%, 420px); padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.login-heading .brand-logo { width: 72px; height: 78px; margin-bottom: 14px; }
.login-heading h1 { font-size: 1.72rem; }
.login-shop-notice {
  padding: 10px 12px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-size: .9rem;
}
.login-shop-notice a {
  display: block;
  width: fit-content;
  margin-top: 2px;
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-underline-offset: 2px;
}
.login-card .notice { margin: 0; }
.login-card .button { margin-top: 3px; }
dialog { width: min(calc(100% - 30px), 460px); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: 20px; background: var(--paper); box-shadow: 0 14px 45px rgb(20 41 48 / 20%); }
dialog::backdrop { background: rgb(15 32 39 / 55%); }
dialog p { color: var(--muted); font-size: .9rem; }
dialog .action-group { justify-content: flex-end; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nail-mode .stats, .nail-mode .profile-pill, .nail-mode .rail-footer, .nail-mode .section-heading .eyebrow { display: none; }
.nail-mode .section-heading { margin-bottom: 3px; }
.nail-mode #batch-list table { min-width: 690px; }
.nail-mode #offer-list td { white-space: normal; }
.nail-mode #offer-list td:first-child, .nail-mode #offer-list td:nth-child(4), .nail-mode #offer-list td:nth-child(5) { white-space: nowrap; }
.nail-review-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 0; align-items: start; border-top: 1px solid var(--line); }
.nail-source { position: sticky; top: 16px; min-width: 0; padding: 18px; }
.nail-source header { margin-bottom: 12px; }
.nail-source h3, .nail-editor h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.nail-source p, .nail-editor-heading p { color: var(--muted); font-size: .8rem; margin-top: 4px; }
#nail-source-link { display: block; background: #f2f6f7; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
#nail-source-image { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.nail-source-note { display: grid; place-items: center; min-height: 170px; margin: 0; padding: 23px; border: 1px dashed #bfd1d6; border-radius: 8px; color: var(--muted); background: #f5f9fa; text-align: center; }
.nail-editor { min-width: 0; padding: 18px; border-left: 1px solid var(--line); }
.nail-editor > fieldset { border: 0; padding: 0; }
.nail-editor-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 13px; }
.nail-prepared { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 15px; overflow: hidden; }
.nail-prepared > summary { padding: 10px 12px; cursor: pointer; color: var(--accent-deep); font-size: .83rem; font-weight: 650; background: #f5f9fa; }
#nail-prepared-rows table { min-width: 520px; }
#nail-prepared-rows th:nth-child(2) { min-width: 190px; }
.nail-exceptions-caption { margin: 3px 0 9px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.nail-document-diagnostics { margin: 0 19px 15px; padding: 12px; border: 1px solid #e6d5af; border-radius: 8px; background: #fdf8ed; }
.nail-document-diagnostics h3 { margin: 0; color: #715320; font-size: .9rem; }
.nail-document-diagnostics ul { margin: 7px 0 0; padding-left: 18px; color: #674f29; font-size: .83rem; }
.nail-confirmation-groups { display: grid; gap: 15px; margin-top: 17px; }
.nail-absence-group { min-width: 0; border: 1px solid #cbdde0; border-radius: 9px; overflow: hidden; }
.nail-absence-group h3 { margin: 0; padding: 13px 12px 3px; font-size: .94rem; }
.nail-absence-group > .hint { padding: 0 12px 10px; }
.nail-absence-group table { min-width: 475px; }
.nail-absence-group th:first-child { min-width: 160px; }
.nail-blank-price { margin-top: 8px; max-width: 180px; font-size: .76rem; }
.nail-blank-price input { font-size: .85rem; }
.nail-blank-price input[aria-invalid="true"] { border-color: #ad4149; }
#nail-blank-price-actions { margin: 10px 12px 0; }
.nail-group-state { margin: 10px 12px; font-size: .8rem; color: var(--muted); }
.nail-absence-group > .button { margin: 0 12px 12px; max-width: calc(100% - 24px); }
.nail-row-verification { margin-top: 3px; font-size: .8rem; }
.nail-pipeline { margin: 0 18px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfb; min-width: 0; }
.nail-pipeline > summary { cursor: pointer; font-size: .86rem; font-weight: 650; }
.nail-pipeline[open] > .nail-stages { margin-top: 12px; }
.nail-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nail-stages h3 { margin: 0; font-size: .86rem; }
.nail-stages p { margin: 5px 0; color: var(--muted); font-size: .8rem; }
.nail-stages ul { margin: 5px 0 0; padding-left: 18px; font-size: .78rem; overflow-wrap: anywhere; }
.nail-pipeline > .action-group { margin-top: 11px; }
.nail-table-errors { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.nail-table-errors h3 { margin: 0; font-size: .9rem; }
.nail-table-errors > p { margin: 6px 0; font-size: .82rem; color: var(--muted); }
#nail-table-error-list { display: grid; gap: 8px; list-style: none; padding: 0; margin: 9px 0; }
#nail-table-error-list li { min-width: 0; padding: 10px 12px; border: 1px solid #dfd3bb; border-radius: 7px; background: #fffdf7; }
.nail-cell-error-link { white-space: normal; text-align: left; overflow-wrap: anywhere; }
.nail-cell-error-reason { margin: 4px 0 0; font-size: .82rem; }
.nail-cell-error-context { margin: 3px 0 0; overflow-wrap: anywhere; }
.nail-effective-cell-error { background: #fff5e4; }
.nail-effective-cell-marker { display: block; color: #805914; font-size: .72rem; font-weight: 650; margin-bottom: 3px; }
.nail-cell-highlight { outline: 1px solid #a77a38; outline-offset: -1px; background: #fff0cc !important; scroll-margin-block: 24px; }
#nail-table-preview { display: grid; gap: 15px; margin-top: 15px; min-width: 0; }
.nail-table-part { min-width: 0; }
.nail-table-part h4 { margin: 0 0 7px; font-size: .83rem; }
.nail-table-part table { min-width: 430px; }
.nail-table-part td { white-space: pre-wrap; }
.nail-table-part .nail-table-group td { background: #e7eff0; color: var(--accent-deep); font-weight: 650; }
#nail-review-rows { display: grid; gap: 11px; }
.nail-row { display: grid; gap: 7px; border: 1px solid var(--line); background: #fafcfc; border-radius: 8px; padding: 12px; }
.nail-row-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .79rem; }
.nail-row-code { color: var(--muted); font-variant-numeric: tabular-nums; }
.nail-row-remove { margin-left: auto; font-size: .77rem; font-weight: 500; color: #775059; }
.nail-row-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(105px, .45fr); gap: 9px; align-items: start; }
.nail-row-fields .field { font-size: .74rem; }
.nail-row-fields .field input, .nail-row-fields .field textarea { font-size: .86rem; }
.nail-row-match { margin: 0; font-size: .76rem; color: #466b65; overflow-wrap: anywhere; }
.nail-row .row-error { font-size: .78rem; }
.nail-review-footer { display: grid; gap: 8px; margin-top: 15px; }
.nail-complete-label { align-items: start; gap: 9px; font-size: .83rem; font-weight: 650; }
.nail-complete-label input { margin-top: 3px; }
.nail-review-footer .action-group { margin-top: 5px; }
.nail-mode #detail-heading { font-size: 1.13rem; }
.nail-photo-error { margin: 0 19px 15px; }
#sanya-preview { min-width: 0; }
.sanya-action-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 19px;
  background: var(--paper);
  border-block: 1px solid var(--line);
}
.sanya-action-status { flex: 1 1 240px; font-size: .85rem; color: var(--muted); }
.sanya-action-status p { margin: 0; }
.sanya-action-status p + p { margin-top: 3px; }
#sanya-save-state { color: var(--accent-deep); }
.sanya-action-bar + .sanya-preview-warnings { margin-top: 12px; }
.sanya-review-layout { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: start; border-top: 1px solid var(--line); }
.sanya-review-layout.without-photo { grid-template-columns: minmax(0, 1fr); }
.sanya-review-layout.without-photo .nail-editor { border-left: 0; }
#sanya-preview-photo { top: 96px; }
#sanya-source-link { display: block; background: #f2f6f7; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
#sanya-source-image { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
#sanya-review-fields { margin: 0; min-width: 0; }
#sanya-review-rows, #sanya-confirmations, #sanya-prepared-rows { display: grid; gap: 8px; }
#sanya-confirmations:not(:empty), #sanya-prepared:not([hidden]), #sanya-preview-exclusions:not([hidden]) { margin-top: 14px; }
#sanya-prepared-rows { padding: 8px; }
.sanya-review-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr); align-items: start; gap: 8px 12px; margin-top: 10px; }
.sanya-review-grid .check { grid-column: 1 / -1; }
.sanya-review-entry, .sanya-confirmation { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.sanya-review-entry > summary { cursor: pointer; }
.sanya-row-heading { display: inline-grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; width: calc(100% - 20px); vertical-align: top; }
.sanya-row-name { font-weight: 650; overflow-wrap: anywhere; }
.sanya-row-description { display: block; grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.sanya-row-price { grid-row: 1; grid-column: 2; font-weight: 650; font-variant-numeric: tabular-nums; }
.sanya-row-note { margin: 9px 0 0; color: var(--muted); font-size: .82rem; }
.sanya-review-entry > a { display: inline-block; margin-top: 9px; font-size: .82rem; }
.sanya-unreadable .sanya-row-description { margin-top: 3px; }
.sanya-confirmation > h3 { margin-bottom: 8px; }
.sanya-confirmation > .sanya-review-entry + .sanya-review-entry { margin-top: 8px; }
.sanya-confirmation > button { margin-top: 10px; }
@media (max-width: 520px) {
  .sanya-review-grid, .sanya-row-heading { grid-template-columns: minmax(0, 1fr); }
  .sanya-row-price { grid-row: auto; grid-column: 1; }
}
#sanya-source-actions { margin: 10px 12px; }
.sanya-preview-section { margin-top: 13px; border-top: 1px solid var(--line); }
.sanya-preview-section > h3, .sanya-preview-section > summary { margin: 10px 12px; font-size: .9rem; font-weight: 650; }
.sanya-preview-section > summary { cursor: pointer; }
.sanya-preview-warnings { margin: 0 12px 12px; padding: 8px 10px 8px 28px; color: #674f29; background: #fff7e7; border-radius: 7px; font-size: .83rem; }
.nail-resolution { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 3px; }
.nail-resolution summary { cursor: pointer; font-size: .8rem; color: var(--accent-deep); font-weight: 650; }
.nail-resolution > div { margin-top: 9px; }
.nail-resolution .button { justify-self: start; }

@media (max-width: 950px) {
  .shell { grid-template-columns: 182px minmax(0, 1fr); }
  .rail { padding-inline: 10px; }
  .stat { padding: 12px; gap: 8px; }
  .stat-icon { flex-basis: 33px; width: 33px; height: 33px; }
  .nail-review-layout, .sanya-review-layout { grid-template-columns: minmax(0, 1fr); }
  #sanya-source-image { max-height: min(45vh, 340px); }
  .nail-source { position: static; }
  .nail-editor { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .shell { display: block; }
  .rail { gap: 8px; padding: 11px 12px; }
  .brand { padding: 0 0 7px; }
  .brand .brand-logo { width: 38px; height: 38px; padding: 3px; }
  .rail-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-label, .rail-footer { display: none; }
  .nav-button { min-height: 36px; padding: 6px 7px; font-size: .79rem; }
  .nav-button svg { width: 15px; height: 15px; }
  .topbar { min-height: 52px; }
  .trail { display: none; }
  .account { width: 100%; }
  #logout { margin-left: auto; }
  #main { padding-top: 16px; }
  .view { gap: 12px; }
  #sanya-preview .table-tip { display: block; margin: 6px 12px; }
  .section-heading { align-items: flex-start; }
  .profile-pill { display: none; }
  .stats { gap: 5px; }
  .stat { display: block; padding: 8px; }
  .stat-icon { display: none; }
  .stat span:not(.stat-icon) { font-size: .72rem; }
  .stat strong { font-size: 1.22rem; }
  .upload-form { grid-template-columns: 1fr; padding: 1px 13px 13px; }
  .upload-form .button { justify-self: start; }
  .zhuk-preview-controls { margin-inline: 13px; }
  .card-heading { flex-wrap: wrap; padding: 13px; }
  .form-card { padding: 13px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .supplier-coordinate { grid-template-columns: minmax(0, 1fr); }
  .supplier-coordinate .button { justify-self: start; }
  .detail-meta { margin-inline: 13px; }
  #batch-list .table-tip, #detail-rows .table-tip, #offer-list .table-tip, #user-list .table-tip { display: block; margin: 0 13px 9px; }
  #supplier-list th:first-child { width: 2.5rem; }
  th, td { padding: 8px 9px; }
  th:first-child, td:first-child { padding-left: 13px; }
  th:last-child, td:last-child { padding-right: 13px; }
  .nail-source, .nail-editor { padding: 13px; }
  .nail-photo-error { margin-inline: 13px; }
  .nail-document-diagnostics { margin-inline: 13px; }
  .nail-pipeline { margin-inline: 13px; padding: 11px; }
  .nail-stages { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #nail-prepared-rows .table-tip, .nail-absence-group .table-tip { display: block; padding: 0 12px; margin: 6px 0; }
  .nail-editor-heading { flex-wrap: wrap; }
  .nail-row-fields { grid-template-columns: minmax(0, 1fr); }
  .nail-row-fields .field input { width: min(100%, 185px); }
  #nail-source-image { max-height: 420px; }
}

#export-preview-table table { width: max-content; min-width: 100%; }
#export-preview-table th { white-space: nowrap; }
#export-preview-table td { max-width: 28rem; overflow-wrap: anywhere; }
.export-scroll-top { min-height: 12px; overflow-y: hidden; }
.export-scroll-spacer { height: 1px; }
.export-scroll-edge {
  --edge-tint: rgb(31 92 99 / 14%);
  position: fixed; z-index: 2; display: grid; place-items: center; pointer-events: none;
  color: var(--accent); font-size: 30px; font-weight: 650; line-height: 1;
  text-shadow: 0 1px 2px var(--paper); user-select: none;
}
.export-scroll-edge.is-left { background: linear-gradient(to right, var(--edge-tint), transparent); }
.export-scroll-edge.is-right { background: linear-gradient(to left, var(--edge-tint), transparent); }
.export-scroll-edge.is-active { --edge-tint: rgb(31 92 99 / 27%); }
@media (hover: none) {
  .export-scroll-edge { display: none; }
}
.export-facet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: 7px; }
.export-facet { position: relative; display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.export-facet :is(.export-facet-toggle, .export-facet-hidden-label) { justify-content: space-between; width: 100%; text-align: start; }
.export-facet-hidden-label {
  padding-inline-end: calc(18px + .45rem); border-color: var(--line);
  color: var(--muted); overflow-wrap: anywhere;
}
.export-column-choice { justify-self: start; padding-inline: 8px; }
.export-top-controls { align-items: end; }
#export-columns-toggle { justify-self: start; }
#export-column-only-controls:not(:has(> :not([hidden]))),
#export-form:not(.export-configure-columns) #export-column-only-controls,
#export-form:not(.export-configure-columns) .export-column-choice,
#export-form:not(.export-configure-columns) .export-facet:not(:has(> .export-facet-toggle:not([hidden]))),
#export-form:not(.export-configure-columns) .export-facet-grid.export-has-main:not(.export-show-more) > .export-facet-more:not(.export-facet-active) { display: none; }
.export-facet-toolbar:has(.export-filter-selection:not([hidden]), .export-facet-actions > :not([hidden])) { margin-block-end: 6px; }
.export-filter-selection { min-width: 0; max-width: 100%; }
.export-filter-selection > #export-filter-chips { min-width: 0; max-width: 100%; }
.export-filter-chip.button { min-height: 32px; max-width: 100%; padding: 4px 9px; border-radius: 99px; }
.export-filter-chip > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#export-columns-toggle[aria-expanded="true"], .export-facet-active > .export-facet-toggle { background: var(--accent-soft); }
.export-facet .export-facet-toggle[aria-expanded="true"] { background: var(--accent-soft); }
:is(.export-facet-toggle, #export-facet-more)::after { content: ""; flex: 0 0 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
:is(.export-facet-toggle, #export-facet-more)[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.export-facet-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.export-facet-count { min-width: 1.5rem; padding-inline: 4px; border-radius: 1rem; background: var(--accent-soft); text-align: center; }
.export-facet-panel { position: absolute; z-index: 4; inset-block-start: calc(100% + 5px); inset-inline-start: var(--facet-shift, 0px); width: max(100%, 15rem); max-width: calc(100vw - 28px); padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.export-facet-values {
  display: grid; max-height: min(14rem, 45vh); margin-block: 6px;
  padding: 4px 6px; scroll-padding-block: 4px;
  overflow-y: auto; overflow-wrap: anywhere;
}
.export-facet-values::-webkit-scrollbar { width: 16px; }
.export-facet-values::-webkit-scrollbar-track { background: #eef4f5; border-radius: 8px; }
.export-facet-values::-webkit-scrollbar-thumb {
  min-height: 28px; border: 2px solid #eef4f5; border-radius: 8px; background: #68878d;
}
.export-facet-values::-webkit-scrollbar-thumb:hover,
.export-facet-values::-webkit-scrollbar-thumb:active { background: var(--accent-deep); }
.export-facet-actions { margin-inline-start: auto; }
.export-facet-actions:not(:has(> :not([hidden]))) { display: none; }
#export-preview-summary.is-error { color: #822f36; }
@media (min-width: 701px) {
  .form-grid.export-top-controls:has(#export-columns-toggle:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
.export-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--line); font-size: .84rem; }
.export-file-hint { padding: 12px 19px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .export-facet-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.25rem), 1fr)); }
  #export-preview-table .table-tip { display: block; margin: 0 13px 9px; }
  .export-pagination, .export-file-hint { padding-inline: 13px; }
}
