/* GribnikОФ operational UI. Deliberate light theme, including OS dark mode. */
:root, html[data-theme="dark"], html[data-theme="light"] {
  color-scheme: light;
  --forest: #7b1e3c; --forest-deep: #5a1229; --forest-soft: #f5e4ea;
  --paper: #f5f3ed; --surface: #fffefa; --ink: #24352b; --muted: #5c6a5e;
  --line: #dedfd5; --gold: #d9c594; --danger: #a3352c; --focus: #9b620e; --focus-on-dark: #e6c97e;
  --primary: #7b1e3c; --secondary: #5a1229; --accent: #f6e8be;
  --primary-fg: #ffffff; --body-fg: #24352b; --body-bg: #f5f3ed;
  --body-quiet-color: #5c6a5e; --body-medium-color: #4e6055; --body-loud-color: #173b2e;
  --header-color: #fffefa; --header-branding-color: #fffefa; --header-bg: #5a1229; --header-link-color: #fffefa;
  --breadcrumbs-fg: #526458; --breadcrumbs-link-fg: #7b1e3c; --breadcrumbs-bg: #f5f3ed;
  --link-fg: #7b1e3c; --link-hover-color: #5a1229; --link-selected-fg: #5a1229;
  --hairline-color: #e5e6df; --border-color: #dedfd5;
  --error-fg: #a3352c; --message-success-bg: #e7f1e8; --message-warning-bg: #fff1d0; --message-error-bg: #fae9e5;
  --darkened-bg: #efefe7; --selected-bg: #f5e4ea; --selected-row: #f7edf0;
  --button-fg: #fff; --button-bg: #7b1e3c; --button-hover-bg: #5a1229;
  --default-button-bg: #7b1e3c; --default-button-hover-bg: #5a1229;
  --close-button-bg: #59685f; --close-button-hover-bg: #34473b;
  --delete-button-bg: #a3352c; --delete-button-hover-bg: #84271f;
  --object-tools-fg: #7b1e3c; --object-tools-bg: #f5e4ea; --object-tools-hover-bg: #efd4dd;
  --font-family-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-family-monospace: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
body { font-family: var(--font-family-primary); font-size: 14px; line-height: 1.5; background: var(--paper); }
a:link, a:visited { color: var(--link-fg); }
a:hover { color: var(--forest-deep); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
/* C02: the amber ring is >=4:1 on every light surface; on the forest header it
   becomes light gold. Full-bleed or clipped-container controls draw it inset. */
#header :focus-visible { outline-color: var(--focus-on-dark); }
.store-table-scroll:focus-visible, .store-navigation summary:focus-visible,
.store-filter-disclosure > summary:focus-visible, .store-actions-disclosure > summary:focus-visible,
.module summary:focus-visible { outline-offset: -3px; }
#container { min-width: 0; width: 100%; }
#header { min-height: 88px; padding: 16px 32px; align-items: center; gap: 20px; background: var(--forest-deep); }
#branding { float: none; min-width: 0; }
#header .store-brand { display: flex; gap: 12px; align-items: center; color: #fff9e9; text-decoration: none; font: 600 27px/1.1 Georgia, serif; letter-spacing: -.4px; }
.store-brand small { display: block; margin-top: 7px; color: #c2d3c6; font: 11px/1.4 var(--font-family-primary); letter-spacing: 1.3px; text-transform: uppercase; }
.store-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #7f9d88; border-radius: 12px; color: #e2d2a8; }
.store-mark svg { width: 30px; height: 30px; }
#user-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 20px; margin: 0; padding: 0; font-size: 12px; line-height: 1.4; letter-spacing: 0; text-transform: none; }
#user-tools a, #user-tools button { display: inline-flex; align-items: center; min-height: 36px; color: #f7f6ed; border: 0; font: inherit; padding: 4px 0; }
#logout-form { margin: 0; }
#logout-form button { cursor: pointer; }
#user-tools a:hover, #user-tools button:hover { color: #ead6a1; }
.store-account { position: relative; }
.store-account > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; cursor: pointer; border: 1px solid transparent; border-radius: 6px; list-style: none; }
.store-account > summary::-webkit-details-marker { display: none; }
.store-account > summary::after { content: '⌄'; content: '⌄' / ''; font-size: 16px; }
.store-account[open] > summary { border-color: #7f9d88; background: #ffffff0c; }
.store-account-short { display: none; }
.store-account-menu { position: absolute; z-index: 300; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 32px)); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; box-shadow: 0 12px 32px #102c2530; }
.store-account-menu p { margin: 0 0 10px; padding: 6px 8px 12px; border-bottom: 1px solid var(--line); line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.store-account-menu strong { color: var(--forest-deep); }
#user-tools .store-account-menu a, #user-tools .store-account-menu button { display: flex; width: 100%; min-height: 44px; padding: 8px; color: var(--forest); text-decoration: none; text-transform: none; text-align: left; }
#user-tools .store-account-menu a:hover, #user-tools .store-account-menu button:hover { background: var(--forest-soft); }
#header .store-account-menu :focus-visible { outline-color: var(--focus); }
.store-stage-label { display: inline-block; padding: 6px 10px; border: 1px solid #75917d; color: #e5eddf; border-radius: 5px; font-size: 11px; }
.store-stage-notice { display: flex; flex-wrap: wrap; gap: 0 5px; align-items: center; min-height: 42px; padding: 10px 32px; background: #ece8d8; color: #595c3c; font-size: 12px; border-bottom: 1px solid #ddd9c8; }
.store-stage-dot { width: 7px; height: 7px; background: #8a7136; border-radius: 50%; margin-right: 5px; flex: 0 0 auto; }
div.breadcrumbs { padding: 14px 32px; font-size: 12px; line-height: 1.6; border-bottom: 1px solid var(--line); }
.main, .main.shifted { display: flex; align-items: stretch; margin: 0; min-width: 0; }
.main > .content, .main.shifted > .content { flex: 1 1 0; max-width: none; min-width: 0; padding: 0; width: auto; }
#content { padding: 32px; width: auto; min-width: 0; max-width: none; }
#content > h1 { margin: 0 0 24px; font-size: 28px; font-weight: 650; color: var(--forest-deep); line-height: 1.25; letter-spacing: -.6px; overflow-wrap: anywhere; }
#content > h2 { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
#content-main { width: 100%; min-width: 0; float: none; }
.store-navigation { flex: 0 0 238px; width: 238px; background: #eeeee5; border-right: 1px solid var(--line); padding: 26px 16px 32px; }
.store-navigation details { border: 0; padding: 0; margin: 0; }
.store-navigation summary { display: none; }
.store-navigation details::details-content { content-visibility: visible; display: block; }
.store-navigation details > .store-navigation-inner { display: block; }
.store-navigation a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 9px 12px; border-radius: 6px; color: #415748; text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.store-navigation a:hover { background: #e1e7db; color: var(--forest-deep); }
.store-navigation a.is-current { background: var(--forest); color: #fffefa; }
.store-navigation .store-nav-home { justify-content: flex-start; gap: 10px; font-weight: 650; margin-bottom: 24px; }
.store-nav-home > span { font-size: 22px; line-height: 1; }
.store-nav-group { margin-bottom: 22px; }
.store-nav-group h2 { padding: 0 12px; margin: 0 0 6px; color: #5d665a; font-size: 10px; line-height: 1.5; letter-spacing: .9px; text-transform: uppercase; font-weight: 650; background: transparent; }
.store-nav-group a > span { font-size: 20px; font-weight: 400; opacity: .6; }
.store-nav-foot { border-top: 1px solid #d3d9cc; padding: 20px 12px 0; margin-top: 32px; color: #536a55; font-size: 11px; }
.store-nav-foot small { display: block; color: #5e6a5f; margin-top: 8px; line-height: 1.5; }
.store-nav-foot-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; background: #4b7550; }
.store-nav-empty { color: var(--muted); padding: 12px; font-size: 12px; }
.store-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.store-eyebrow { margin: 0 0 9px; color: #5f6a52; font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: 1.3px; text-transform: uppercase; }
.store-page-heading h1 { font-size: 32px; line-height: 1.15; font-weight: 650; letter-spacing: -.9px; margin: 0 0 10px; color: var(--forest-deep); }
.store-page-heading p:not(.store-eyebrow) { color: var(--muted); margin: 0; font-size: 13px; }
.store-date { color: var(--muted); white-space: nowrap; font-size: 12px; padding-top: 4px; }
.store-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
a.store-stat { display: flex; flex-direction: column; min-height: 154px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 2px 3px #213e2410; }
a.store-stat:hover { border-color: #6b886e; }
.store-stat > span { font-size: 12px; font-weight: 550; color: #5e6c5f; }
.store-stat > strong { margin: 9px 0 7px; font-size: 37px; line-height: 1.1; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.store-stat > strong.store-stat-word { font-size: 24px; line-height: 1.7; letter-spacing: -.5px; }
.store-stat > small { color: var(--muted); font-size: 11px; margin-top: auto; display: flex; justify-content: space-between; gap: 4px; }
a.store-stat-primary { background: var(--forest); border-color: var(--forest); color: #fffbea; }
.store-stat-primary > span, .store-stat-primary > small { color: #d3e0ce; }
.store-work-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, .9fr); gap: 24px; align-items: start; }
.store-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 2px 3px #213e2408; min-width: 0; }
.store-panel h2 { margin: 0 0 12px; color: var(--forest-deep); font-size: 18px; font-weight: 600; line-height: 1.35; }
.store-panel p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.store-panel .store-eyebrow { font-size: 10px; line-height: 1.5; margin-top: 0; color: #5f6a52; }
.store-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.store-panel-heading h2 { margin-bottom: 0; }
.store-panel-heading > a { font-size: 12px; white-space: nowrap; }
.store-orders-panel { padding: 24px 0 8px; overflow: hidden; }
.store-orders-panel .store-panel-heading { padding: 0 24px 22px; }
.store-side-panels { display: grid; gap: 20px; min-width: 0; }
.store-panel-link { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; font-size: 12px; font-weight: 600; }
.store-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 13px; font-weight: 550; }
.store-shortcut small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.store-help-panel { background: #ebefe3; border-color: #d4ddca; box-shadow: none; }
.store-help-panel h2 { font-size: 16px; }
.store-help-panel p:last-child { border-top: 1px solid #d0dac5; padding-top: 12px; margin-bottom: 0; font-size: 11px; }
.store-table-scroll { overflow-x: auto; max-width: 100%; scrollbar-color: #8d9e86 #eeeee5; }
.store-order-table { width: 100%; min-width: 560px; }
.store-order-table th { background: #f4f5ee; color: #657366; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; padding: 12px 20px; font-weight: 600; }
.store-order-table td { padding: 18px 20px; font-size: 12px; border-bottom: 1px solid #e8e9e1; vertical-align: middle; }
.store-order-table tr:last-child td { border-bottom: 0; }
.store-order-table td small { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.store-order-table .store-order-id { font-weight: 650; white-space: nowrap; }
.store-number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.store-badge { display: inline-block; padding: 4px 8px; border: 1px solid #dce2d4; border-radius: 5px; color: #466346; background: #edf1e8; font-size: 10px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.store-status-new { background: #f8edd3; color: #7b5716; border-color: #e9d9af; }
.store-status-awaiting_payment { background: #f8efdc; color: #7d5b24; border-color: #eadbb9; }
.store-status-paid, .store-status-packing { background: #e9f0df; color: #3f5e31; border-color: #d5dfc6; }
.store-status-shipped { background: #e7eeef; color: #375b66; border-color: #cbdce1; }
.store-status-completed { background: #e5f0e7; color: #315f3d; border-color: #c9dfcd; }
.store-status-cancelled { background: #f0edeb; color: #6c5f57; border-color: #ddd6d0; }
.store-empty { padding: 44px 24px; text-align: center; }
.store-empty h3 { font-size: 18px; color: var(--forest-deep); margin: 12px 0; }
.store-empty p { max-width: 340px; margin: 0 auto 24px; }
.store-empty-symbol { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: #edf1e7; border-radius: 12px; font-size: 28px; color: #6d8263; }
.store-button, a.store-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 6px; background: var(--forest); color: white; font-size: 12px; text-decoration: none; }
/* Native Django lists, filters, actions and forms retain their contracts. */
.module { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 24px; }
.module h2, .module caption, .inline-group h2 { background: #e9ede2; color: var(--forest-deep); font-size: 13px; font-weight: 600; padding: 14px 18px; }
.module caption a:link, .module caption a:visited { color: var(--forest-deep); }
#changelist { display: flex; align-items: flex-start; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
#changelist .changelist-form-container { flex: 1 1 0; min-width: 0; width: auto; }
#changelist .results { overflow-x: auto; }
#changelist table { min-width: 600px; width: 100%; }
#changelist table thead th { background: #eff2e9; color: #4e6552; border-bottom: 1px solid var(--line); padding: 14px 12px; font-size: 11px; text-transform: none; }
#changelist table thead th a { color: #4e6552; }
#changelist table tbody td, #changelist table tbody th { padding: 16px 12px; vertical-align: middle; line-height: 1.5; font-size: 12px; border-bottom: 1px solid #e5e8df; }
#changelist table tbody tr:nth-child(odd), #changelist table tbody tr:nth-child(even) { background: var(--surface); }
#changelist table tbody tr:hover { background: #f1f5eb; }
#changelist table tbody tr.selected { background: #e5eedf; }
#changelist table td.field-title, #changelist table th.field-title { min-width: 220px; max-width: 350px; white-space: normal; overflow-wrap: anywhere; }
#changelist .field-total, #changelist .field-price, #changelist .field-stock, #changelist .field-reserved { font-variant-numeric: tabular-nums; white-space: nowrap; }
#changelist #toolbar { background: var(--surface); padding: 18px; border: 0; border-bottom: 1px solid var(--line); }
#changelist #toolbar form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#changelist #toolbar form input[type="text"] { min-height: 40px; padding: 10px 12px; border-radius: 6px; width: min(320px, 70vw); }
#changelist #toolbar form input[type="submit"] { padding: 8px 14px; min-height: 40px; border-radius: 6px; background: #edf2e8; color: var(--forest); border: 1px solid #cbd8c7; }
#changelist .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 18px; background: #f8f9f3; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); }
#changelist .actions label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
#changelist .actions select { max-width: 340px; height: auto; min-height: 38px; padding: 8px; font-size: 12px; }
#changelist .actions .button { min-height: 38px; border: 1px solid #bdcfb8; background: #e5eedf; color: var(--forest-deep); border-radius: 5px; padding: 8px 12px; }
#changelist .actions span.all, #changelist .actions span.action-counter, #changelist .actions span.clear, #changelist .actions span.question { font-size: 11px; }
#changelist-filter { position: static; flex: 0 0 200px; width: 200px; min-width: 0; max-height: none; margin: 0; border: 0; border-left: 1px solid var(--line); background: #f3f5ec; align-self: stretch; }
#changelist-filter h2 { padding: 18px; background: #e9ede2; color: var(--forest-deep); margin: 0; font-size: 13px; }
#changelist-filter h3 { color: #546b53; font-size: 12px; padding: 12px 18px 6px; margin: 0; }
#changelist-filter details { padding: 14px 18px; border-bottom: 1px solid #e0e6d6; }
#changelist-filter summary { font-size: 12px; font-weight: 600; color: var(--forest-deep); cursor: pointer; }
#changelist-filter ul { padding: 8px 0 0; margin: 0; }
#changelist-filter li { margin: 0; padding: 1px 0; }
#changelist-filter li a { display: block; padding: 8px; font-size: 11px; color: #52654d; border-radius: 4px; white-space: normal; }
#changelist-filter li.selected { border-left: 0; }
#changelist-filter li.selected a { background: #dfe9d6; color: var(--forest-deep); font-weight: 650; }
#changelist .paginator { background: #fffefa; padding: 18px; border: 0; font-size: 12px; }
.object-tools { margin-top: -58px; margin-bottom: 18px; }
.object-tools a, .object-tools a:link, .object-tools a:visited { border-radius: 6px; padding: 11px 16px; background-color: #e3ecdb; color: var(--forest-deep); font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.object-tools a.addlink { padding-right: 28px; }
fieldset.module { border: 1px solid var(--line); }
.app-shop fieldset .fieldset-heading { border: 0; border-bottom: 1px solid var(--line); }
fieldset .form-row { padding: 20px; border-color: #e6e8df; }
.form-row label, .store-field label { color: var(--forest-deep); font-weight: 600; font-size: 13px; }
input, textarea, select, .form-row p, form .button { font-family: var(--font-family-primary); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="search"], textarea, select { background: #fff; border: 1px solid #b8c5b5; border-radius: 6px; color: var(--ink); min-height: 42px; padding: 10px 12px; font-size: 14px; line-height: 1.4; max-width: 100%; }
input:focus, textarea:focus, select:focus { border-color: #507c50; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--forest); width: 18px; height: 18px; vertical-align: middle; }
textarea { width: min(660px, 100%); min-height: 120px; }
.vTextField, .vURLField { width: min(520px, 100%); }
.vLargeTextField, .vXMLLargeTextField { width: min(680px, 100%); }
form .aligned ul { margin-left: 170px; }
.aligned .form-row div.readonly { padding-top: 2px; color: #354c3b; font-size: 14px; overflow-wrap: anywhere; max-width: 850px; }
.aligned .form-row .flex-container { min-width: 0; }
.aligned .form-row label { padding-top: 10px; }
.aligned .form-row .readonly { line-height: 1.6; }
form .help { color: var(--muted); font-size: 12px; line-height: 1.55; }
.submit-row { background: #e9eee2; border: 1px solid #d4dfcc; border-radius: 8px; padding: 18px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.submit-row input, .button, input[type="submit"], input[type="button"], .submit-row a.closelink { border-radius: 6px; padding: 12px 18px; min-height: 42px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.submit-row input.default { float: none; text-transform: none; }
.errornote { background: #f9ebe6; border: 1px solid #d59986; border-radius: 6px; padding: 14px 18px; color: #912c24; font-size: 13px; }
ul.errorlist { color: #a3352c; padding: 8px 0; margin: 0; font-size: 12px; list-style: none; }
.errorlist li { list-style: none; }
ul.messagelist { padding: 16px 32px 0; }
ul.messagelist li { border: 1px solid #cbddc7; border-radius: 6px; padding: 14px 18px 14px 40px; font-size: 13px; }
.store-operation-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(230px, 1fr); gap: 24px; align-items: start; }
.store-field { margin-bottom: 24px; }
.store-field label { display: block; margin-bottom: 8px; }
.store-field input[type="checkbox"] { margin-top: 6px; }
.store-field textarea { width: 100%; }
.store-field input[type="number"] { width: 180px; }
.store-field.errors input, .store-field.errors textarea { border-color: var(--danger); }
.store-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.store-form-actions > a { font-size: 12px; }
.store-operation-help { background: #ecefe4; }
.store-operation-safety { padding-top: 16px; border-top: 1px solid #d2ddc9; font-size: 11px !important; }
.store-operation-context { margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.store-operation-context p:last-child { margin-bottom: 0; }
.store-draft-table { width: 100%; min-width: 400px; }
.store-draft-table th { background: #f0f3e9; color: var(--forest); padding: 14px 10px; }
.store-draft-table td { padding: 16px 10px; }
.store-draft-table td:first-child { width: 75%; }
.store-draft-table select { width: 100%; }
.store-draft-table input[type="number"] { width: 90px; }
.inline-group .tabular { overflow-x: auto; }
.inline-group .tabular table { min-width: 600px; }
.inline-group .tabular td, .inline-group .tabular th { padding: 14px 12px; }
.inline-group .tabular td.original p { position: static; height: auto; padding: 0; }
.inline-group .tabular tr.has_original td { padding-top: 16px; }
#footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 20px 32px; border-top: 1px solid var(--line); color: #5d6958; font-size: 10px; }
/* Login uses the same palette and a quiet, bounded form. */
body.login { background: var(--paper); min-height: 100vh; display: grid; align-items: center; padding: 32px 16px; }
.login #container { width: min(460px, 100%); margin: 0 auto; border: 1px solid #d6ddce; border-radius: 14px; background: var(--surface); box-shadow: 0 12px 40px #213d2110; overflow: hidden; }
.login #header { padding: 28px; justify-content: center; }
.login #branding { width: auto; }
.login #content { padding: 32px; }
.login #content-main { min-width: 0; }
.login .form-row { padding: 0; margin-bottom: 22px; border: 0; }
.login .form-row label { display: block; float: none; width: auto; margin-bottom: 8px; line-height: 1.5; }
.login .form-row #id_username, .login .form-row #id_password { width: 100%; }
.login .submit-row { padding: 0; border: 0; background: none; margin: 8px 0 0; }
.login .submit-row input { width: 100%; padding: 14px; }
.login #footer { padding: 16px 24px; justify-content: center; text-align: center; }
.login #footer span:first-child { display: none; }
.login .errornote { margin-bottom: 24px; }
@media (max-width: 1250px) {
  .store-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-work-grid { grid-template-columns: minmax(0, 1fr); }
  .store-side-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-side-panels .store-help-panel { grid-column: 1 / -1; }
  #changelist-filter { flex-basis: 180px; width: 180px; }
}
@media (max-width: 1024px) {
  #header { padding: 18px 24px; }
  .store-navigation { flex-basis: 210px; width: 210px; padding: 20px 12px; }
  #content { padding: 26px 24px; }
  #changelist { flex-direction: column; }
  #changelist .changelist-form-container { width: 100%; }
  #changelist-filter { order: -1; width: 100%; flex: auto; border-left: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0; }
  #changelist-filter h2 { width: 100%; padding: 12px 18px; }
  #changelist-filter details { flex: 1 1 160px; border-bottom: 0; padding: 12px 18px; }
  #changelist-filter-extra-actions { width: 100%; }
  .store-operation-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  #header { padding: 18px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  #header .store-brand { font-size: 26px; }
  #user-tools { width: 100%; justify-content: flex-start; gap: 6px 18px; font-size: 12px; }
  #user-tools a, #user-tools button { min-height: 40px; }
  .store-stage-label { padding: 6px 8px; }
  .store-stage-notice { padding: 12px 20px; font-size: 11px; line-height: 1.65; }
  div.breadcrumbs { padding: 12px 20px; }
  .main, .main.shifted { display: block; }
  .store-navigation { width: 100%; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .store-navigation summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; min-height: 48px; cursor: pointer; color: var(--forest-deep); font-weight: 600; font-size: 13px; list-style: none; }
  .store-navigation summary::-webkit-details-marker { display: none; }
  .store-navigation summary::after { content: '+'; font-size: 20px; }
  .store-navigation details[open] summary::after { content: '−'; }
  .store-navigation details:not([open])::details-content { content-visibility: hidden; display: none; }
  .store-navigation details:not([open]) > .store-navigation-inner { display: none; }
  .store-navigation details[open] > .store-navigation-inner { display: block; padding: 0 16px 20px; }
  .store-nav-group { margin-bottom: 18px; }
  .store-navigation .store-nav-home { margin-bottom: 16px; }
  .store-navigation a { min-height: 44px; }
  .store-nav-foot { margin-top: 18px; }
  #content { padding: 26px 20px; }
  #content > h1 { font-size: 25px; margin-bottom: 22px; }
  .store-page-heading { display: block; margin-bottom: 22px; }
  .store-page-heading h1 { font-size: 29px; }
  .store-page-heading p:not(.store-eyebrow) { font-size: 12px; max-width: 290px; }
  .store-date { display: block; padding-top: 12px; font-size: 11px; }
  .store-stat-grid { gap: 12px; margin-bottom: 20px; }
  a.store-stat { padding: 16px; min-height: 142px; border-radius: 9px; }
  .store-stat > span { font-size: 11px; }
  .store-stat > strong { font-size: 32px; margin: 10px 0; }
  .store-stat > strong.store-stat-word { font-size: 19px; line-height: 1.8; letter-spacing: -.6px; }
  .store-stat > small { font-size: 10px; line-height: 1.6; }
  .store-work-grid { gap: 20px; }
  .store-panel { padding: 20px; border-radius: 9px; }
  .store-orders-panel { padding: 20px 0 4px; }
  .store-orders-panel .store-panel-heading { padding: 0 20px 20px; align-items: flex-start; gap: 8px; }
  .store-panel h2 { font-size: 17px; }
  .store-panel-heading > a { font-size: 11px; padding-top: 24px; }
  .store-order-table th, .store-order-table td { padding-left: 18px; padding-right: 18px; }
  .store-side-panels { grid-template-columns: minmax(0, 1fr); }
  .store-side-panels .store-help-panel { grid-column: auto; }
  .object-tools { margin: 0 0 20px; float: none; display: flex; gap: 8px; flex-wrap: wrap; }
  .object-tools li { margin: 0; padding: 0; }
  .object-tools a { display: inline-flex; align-items: center; min-height: 44px; }
  #changelist-filter details { flex-basis: 50%; }
  #changelist-filter li a { min-height: 40px; font-size: 12px; }
  #changelist #toolbar { padding: 16px; }
  #changelist #toolbar form { display: flex; align-items: center; }
  #changelist #toolbar form input[type="text"] { width: 100%; font-size: 16px; }
  #changelist #toolbar form > div { width: 100%; }
  #changelist .actions { padding: 12px 16px; }
  #changelist .actions label { display: flex; flex-wrap: wrap; width: 100%; }
  #changelist .actions select { width: 100%; max-width: 100%; font-size: 16px; min-height: 44px; }
  #changelist .actions .button { min-height: 44px; }
  #changelist .paginator { padding: 16px; }
  fieldset .form-row { padding: 18px 16px; }
  .aligned .form-row label { padding-top: 0; margin-bottom: 8px; width: auto; float: none; }
  .aligned .form-row .flex-container { display: block; }
  .aligned .form-row .readonly { padding: 0; }
  .aligned .form-row .related-widget-wrapper { float: none; min-width: 0; width: 100%; }
  .aligned .form-row input, .aligned .form-row textarea, .aligned .form-row select { max-width: 100%; }
  input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="search"], textarea, select { font-size: 16px; min-height: 44px; }
  form .aligned ul, form .aligned p.help, form .aligned div.help { margin-left: 0; padding-left: 0; }
  .submit-row { padding: 16px; justify-content: stretch; }
  .submit-row input, .submit-row a.closelink { width: 100%; margin: 0; min-height: 46px; }
  .store-operation-layout { gap: 18px; }
  .store-form-actions { gap: 20px; }
  .store-form-actions > input { width: 100%; min-height: 46px; }
  .store-form-actions > a { min-height: 44px; display: inline-flex; align-items: center; }
  ul.messagelist { padding: 18px 20px 0; }
  #footer { padding: 18px 20px; font-size: 10px; }
  body.login { padding: 20px 16px; }
  .login #header { align-items: center; padding: 28px 20px; }
  .login #content { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
.store-login-heading { margin-bottom: 28px; }
.store-login-heading h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.6px; color: var(--forest-deep); margin: 0 0 12px; }
.store-login-heading > p:last-child { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.store-list-empty { padding: 36px 24px; text-align: center; border-bottom: 1px solid var(--line); }
.store-list-empty h2 { background: none; padding: 0; margin: 0 0 10px; color: var(--forest-deep); font-size: 18px; }
.store-list-empty p { margin: 0 auto 20px; max-width: 380px; color: var(--muted); font-size: 13px; }
#changelist table td.field-value, #changelist table td.field-text { max-width: 520px; min-width: 240px; white-space: normal; overflow-wrap: anywhere; }
/* Override Django base.css `.dashboard #content { width: 600px; }`.
   The operational dashboard must fill the flex work area beside navigation. */
.store-dashboard #content { width: 100%; max-width: none; }
#changelist .field-number, #changelist .field-number a, .store-order-number { white-space: nowrap; }
#changelist .field-number a { display: inline-flex; align-items: center; min-height: 32px; }
#changelist .field-created_display time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.store-lines-help { padding: 4px 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.store-order-lines-table { min-width: 700px; width: 100%; }
.store-order-lines-table th { background: #f0f3e9; color: var(--forest-deep); padding: 14px 16px; font-size: 12px; }
.store-order-lines-table td { padding: 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.store-order-lines-table td:nth-child(-n+2) { width: 30%; overflow-wrap: anywhere; }
@media (max-width: 767px) { #changelist .field-number a { min-height: 44px; } }
/* Mobile shell must outrank Django's #container > .main flex layout.
   Let the page grow: a viewport-height flex column otherwise shrinks the
   multi-row header and stage notice while the main region refuses to shrink. */
@media (max-width: 767px) {
  body:not(.login) #container { height: auto; min-height: 100vh; }
  #container > #header, #container > .store-stage-notice, #container > nav, #container > #footer { flex-shrink: 0; }
  #container > .main, #container > .main.shifted { display: block; width: 100%; min-width: 0; }
  #container > .main > .content, #container > .main > .store-navigation { width: 100%; max-width: 100%; min-width: 0; }
  #header { height: auto; max-width: 100%; }
  #branding, #user-tools { max-width: 100%; min-width: 0; flex-shrink: 0; }
  .store-stage-notice, div.breadcrumbs, .store-page-heading h1 { overflow-wrap: anywhere; }
  #content { width: 100%; max-width: 100%; }
  .aligned .form-row > div { width: 100%; max-width: 100%; }
  #changelist-filter { max-width: 100%; min-width: 0; }
  #changelist-filter details { min-width: 0; max-width: 100%; padding: 12px; }
  #changelist-filter details summary { min-height: 44px; margin: 0; padding: 0; overflow-wrap: anywhere; }
  #changelist-filter li a { overflow-wrap: anywhere; }
  #changelist #toolbar #changelist-search > div { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
  #changelist #toolbar #searchbar { flex: 1 1 140px; width: 0; min-width: 0; margin: 0; }
  #changelist #toolbar input[type="submit"] { flex: 0 0 auto; }
  #changelist-search .quiet { flex: 1 1 100%; width: auto; max-width: 100%; margin: 0; }
  #changelist .actions label { min-width: 0; }
  #changelist .actions select { flex: 1 1 100%; min-width: 0; margin-left: 0; }
}
/* Order-card commands are separate POST forms, outside the read-only form. */
.store-order-actions { margin-bottom: 26px; }
.store-order-utilities { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: -12px 0 20px; }
.store-order-utilities a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.store-order-review .store-order-lines { margin-bottom: 20px; }
.store-order-customer { margin-bottom: 20px; }
.store-order-customer .form-row { padding: 10px 16px; }
.store-order-customer .flex-container { display: block; }
.store-order-customer .form-row label { float: none; width: auto; padding: 0; margin: 0 0 4px; font-size: 11px; color: var(--muted); }
.store-order-customer .form-row div.readonly { margin: 0; padding: 0; overflow-wrap: anywhere; }
.store-order-customer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.store-order-customer > h2 { grid-column: 1 / -1; }
.store-order-customer .field-comment { grid-column: 1 / -1; }
body.change-form.model-order .object-tools { float: none; display: flex; justify-content: flex-end; margin: 0 0 18px; }
.store-order-actions-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.store-order-actions-heading p:last-child { margin: 0 0 12px; font-size: 12px; }
.store-order-action-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.store-order-action-list .button { min-height: 44px; cursor: pointer; white-space: normal; line-height: 1.5; }
.store-order-cancel { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.store-order-cancel > summary { padding: 8px 0; color: var(--danger); cursor: pointer; font-weight: 600; }
.store-order-cancel form { max-width: 580px; }
.store-order-cancel label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; }
.store-order-cancel input[type="checkbox"] { flex-shrink: 0; }
.store-cancel-button { display: block; margin-top: 12px; min-height: 44px; padding: 10px 16px; border: 1px solid #b97065; border-radius: 6px; background: #fae9e5; color: #8b2c24; font: 600 13px/1.5 var(--font-family-primary); cursor: pointer; }
.store-draft-items { display: grid; gap: 18px; min-width: 0; }
.store-draft-item { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf5; }
.store-draft-item legend { padding: 0 7px; font-weight: 600; color: var(--forest); font-size: 12px; }
.store-draft-item > div { min-width: 0; }
.store-draft-item label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; color: var(--forest-deep); }
.store-draft-item select { width: 100%; min-width: 0; max-width: 100%; }
.store-draft-item input[type="number"] { width: 100%; max-width: 130px; }
.store-draft-item > .errorlist { grid-column: 1 / -1; }
.store-draft-additions { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; }
.store-draft-additions > summary { min-height: 48px; padding: 12px 0; cursor: pointer; font-weight: 600; color: var(--forest); }
.store-draft-additions > summary span { margin-left: 8px; color: var(--muted); font-weight: 400; }
.store-draft-additions[open] { padding-bottom: 16px; }
.store-draft-additions > .help { margin: 0 0 16px; }
.store-toggle { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.store-toggle > label { margin: 0; cursor: pointer; }
.store-field .store-toggle > input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.app-shop .aligned .checkbox-row { display: flex; align-items: center; gap: 10px; }
.app-shop .aligned .checkbox-row > input[type="checkbox"] { flex-shrink: 0; margin: 0; }
.app-shop .aligned .checkbox-row > label.vCheckboxLabel { display: flex; align-items: center; min-height: 44px; padding: 0; margin: 0; width: auto; cursor: pointer; }
.app-shop .related-widget-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.app-shop .related-widget-wrapper-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.app-shop .related-widget-wrapper-link img { width: 18px; height: 18px; }
.app-shop .file-upload { display: grid; gap: 6px; min-width: 0; }
.app-shop .file-upload > a { overflow-wrap: anywhere; }
.app-shop .file-upload > br { display: none; }
.app-shop .file-upload .clearable-file-input { display: flex; align-items: center; gap: 10px; }
.app-shop .aligned .clearable-file-input > label { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0; width: auto; cursor: pointer; }
.app-shop .submit-row input:not(.default) { background: var(--surface); color: var(--forest); border: 1px solid #b8c5b5; }
.app-shop .submit-row input:not(.default):hover { background: var(--forest-soft); }
.app-shop .submit-row a.deletelink { display: inline-flex; align-items: center; justify-content: center; height: auto; min-height: 44px; padding: 10px 18px; margin: 0; line-height: 1.5; white-space: normal; }
.app-shop .submit-row > :is(p.deletelink-box, a.deletelink) { order: -1; margin-right: auto; }
.aligned input[type="password"] { width: min(520px, 100%); }
@media (max-width: 767px) {
  .store-order-customer { grid-template-columns: minmax(0, 1fr); }
  .store-order-customer .form-row { display: grid; grid-template-columns: minmax(80px, .4fr) minmax(0, 1fr); gap: 12px; }
  .store-order-customer .form-row > div { display: contents; }
  .store-order-customer .form-row .flex-container { display: contents; }
  .store-order-customer .form-row label { margin: 2px 0 0; }
  .app-shop .related-widget-wrapper > select { flex: 1 1 100%; width: 100%; }
  .store-order-action-list, .store-order-action-list form, .store-order-action-list .button { width: 100%; }
  .store-order-cancel > summary { min-height: 44px; }
  .store-cancel-button { width: 100%; }
  .store-draft-item { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .store-draft-item select { display: block; text-overflow: ellipsis; }
  .store-draft-item input[type="number"] { max-width: 140px; }
}
/* Native controls stay reachable without JavaScript. Filters never reserve a
   second side column; bulk actions retain the familiar desktop presentation. */
#changelist .store-actions-disclosure { width: 100%; margin: 0; padding: 0; border: 0; }
.store-actions-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#changelist-filter > .store-filter-disclosure { width: 100%; padding: 0; border: 0; }
#changelist-filter > .store-filter-disclosure > summary { padding: 16px 18px; background: #e9ede2; }
.store-actions-disclosure > summary { display: none; }
@media (min-width: 1025px) {
  .store-actions-disclosure::details-content { content-visibility: visible; display: block; }
  .store-actions-disclosure > .store-actions-fields { display: flex; }
}
#changelist .field-id { color: var(--muted); font-size: 11px; }
.store-photo-preview { max-width: 300px; }
.store-photo-preview img { display: block; max-width: 100%; width: 240px; height: 180px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.store-photo-preview p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 767px) {
  body:not(.login) #header { min-height: 0; padding: 10px 16px 4px; gap: 2px; }
  body:not(.login) #header { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; padding-bottom: 10px; }
  body:not(.login) #user-tools { width: auto; gap: 10px; }
  .store-account-full { display: none; }
  .store-account-short { display: inline; }
  body:not(.login) #header .store-brand { font-size: 22px; gap: 9px; }
  body:not(.login) .store-brand small { display: none; }
  body:not(.login) .store-mark { width: 32px; height: 32px; border-radius: 8px; }
  body:not(.login) .store-mark svg { width: 24px; height: 24px; }
  body:not(.login) #user-tools { gap: 0 18px; font-size: 11px; }
  body:not(.login) #user-tools a, body:not(.login) #user-tools button { min-height: 44px; padding: 4px 0; }
  div.breadcrumbs { padding: 8px 16px; }
  .store-navigation summary { padding: 8px 16px; min-height: 44px; }
  #content { padding: 18px 16px; }
  #content > h1 { font-size: 23px; margin-bottom: 16px; }
  .object-tools { margin-bottom: 12px; }
  #changelist #toolbar { padding: 10px 12px; }
  #changelist-filter { display: block; }
}
/* Bulk actions become compact at the tablet boundary. */
@media (max-width: 1024px) {
  #changelist-filter { display: block; }
  #changelist-filter > .store-filter-disclosure > summary,
  #changelist .store-actions-disclosure > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; margin: 0; font-size: 12px; font-weight: 600; color: var(--forest-deep); cursor: pointer; list-style: none; }
  .store-filter-disclosure > summary::-webkit-details-marker,
  .store-actions-disclosure > summary::-webkit-details-marker { display: none; }
  .store-filter-disclosure > summary::after,
  .store-actions-disclosure > summary::after { content: '+'; font-size: 20px; }
  .store-filter-disclosure[open] > summary::after,
  .store-actions-disclosure[open] > summary::after { content: '−'; }
  .store-filter-disclosure:not([open])::details-content,
  .store-actions-disclosure:not([open])::details-content { content-visibility: hidden; display: none; }
  .store-filter-disclosure:not([open]) > .store-filter-fields,
  .store-actions-disclosure:not([open]) > .store-actions-fields { display: none; }
  #changelist .actions { padding: 0; }
  .store-actions-fields { padding: 8px 12px 12px; }
  .store-actions-fields > label { width: 100%; }
}
@media (max-width: 767px) {
  #changelist table thead th { padding-top: 10px; padding-bottom: 10px; }
  .store-order-customer .form-row { padding: 10px 16px; }
}
/* A01 mobile manager context. Below 768px the dashboard queue, order lines and
   the order/product change lists render each row as a card; desktop keeps the
   table layout above. Templates add explicit table roles so assistive tech keeps
   row/column semantics, and data-label copies of the column headers become
   visual-only captions ("label / ''" hides the generated text from the
   accessibility tree where supported; the header association remains). */
@media (max-width: 767px) {
  .store-order-table, .store-order-lines-table,
  body.change-list.model-order #result_list, body.change-list.model-product #result_list { display: block; width: 100%; min-width: 0; }
  .store-order-table tbody, .store-order-lines-table tbody,
  body.change-list.model-order #result_list > thead, body.change-list.model-order #result_list > tbody,
  body.change-list.model-product #result_list > thead, body.change-list.model-product #result_list > tbody { display: block; }
  .store-order-table thead, .store-order-lines-table thead,
  body.change-list.model-order #result_list thead th:not(.sortable):not(.action-checkbox-column),
  body.change-list.model-product #result_list thead th:not(.sortable):not(.action-checkbox-column) {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .store-order-table td[data-label]::before, .store-order-lines-table td[data-label]::before,
  body.change-list.model-order #result_list tbody td[data-label]::before,
  body.change-list.model-product #result_list tbody td[data-label]::before {
    content: attr(data-label); content: attr(data-label) / "";
    display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.4; white-space: normal;
  }

  /* Dashboard queue: number+time | delivery, status | total. */
  .store-order-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; padding: 14px 18px; border-bottom: 1px solid #e8e9e1; }
  .store-order-table tr:last-child { border-bottom: 0; }
  .store-order-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .store-order-table td.store-queue-order::before, .store-order-table td.store-queue-status::before { display: none; }
  .store-order-table .store-queue-order { align-self: start; }
  .store-order-table .store-order-id { font-size: 13px; }
  .store-order-table .store-queue-delivery, .store-order-table .store-queue-total { text-align: right; }
  .store-order-table .store-queue-total { font-size: 13px; font-weight: 650; }

  /* Order lines: catalog item and saved title, then price | quantity | subtotal. */
  .store-order-lines-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .store-order-lines-table tr:last-child { border-bottom: 0; }
  .store-order-lines-table td, .store-order-lines-table td:nth-child(-n+2) { display: block; width: auto; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .store-order-lines-table .store-line-text, .store-order-lines-table .store-line-empty { grid-column: 1 / -1; }
  .store-order-lines-table .store-line-quantity, .store-order-lines-table .store-line-subtotal { font-weight: 650; }

  /* Order/product change lists. Sortable headers stay as a wrapping bar of
     links (with Django's sort toggles); the select-all checkbox leads it. */
  body.change-list.model-order #result_list thead tr, body.change-list.model-product #result_list thead tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; background: #eff2e9; border-bottom: 1px solid var(--line);
  }
  body.change-list.model-order #result_list thead tr::before, body.change-list.model-product #result_list thead tr::before {
    content: "Сортировка:"; content: "Сортировка:" / ""; color: var(--muted); font-size: 11px; font-weight: 600;
  }
  body.change-list.model-order #result_list thead th, body.change-list.model-product #result_list thead th {
    display: flex; align-items: center; gap: 4px; width: auto; padding: 0; border: 0; background: transparent; font-size: 12px; line-height: 1.4;
  }
  body.change-list.model-order #result_list thead th.action-checkbox-column, body.change-list.model-product #result_list thead th.action-checkbox-column { order: -1; min-height: 40px; padding-right: 4px; }
  body.change-list.model-order #result_list thead th .text, body.change-list.model-product #result_list thead th .text { padding: 0; }
  body.change-list.model-order #result_list thead th .text a, body.change-list.model-product #result_list thead th .text a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 6px 10px; border: 1px solid #cfdac9; border-radius: 6px; background: var(--surface);
  }
  body.change-list.model-order #result_list thead th.sorted .text a, body.change-list.model-product #result_list thead th.sorted .text a { background: #dfe9d6; color: var(--forest-deep); font-weight: 650; }
  body.change-list.model-order #result_list thead th .sortoptions, body.change-list.model-product #result_list thead th .sortoptions { order: 1; float: none; display: flex; align-items: center; gap: 6px; padding: 0 2px; }
  body.change-list.model-order #result_list thead th .clear, body.change-list.model-product #result_list thead th .clear { display: none; }
  body.change-list.model-order #result_list tbody tr, body.change-list.model-product #result_list tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; align-items: start; padding: 12px 0 4px 12px; border-bottom: 1px solid #e5e8df;
  }
  body.change-list.model-order #result_list tbody td, body.change-list.model-order #result_list tbody th,
  body.change-list.model-product #result_list tbody td, body.change-list.model-product #result_list tbody th {
    display: block; min-width: 0; max-width: none; padding: 0 12px 10px 0; border: 0; text-align: left; overflow-wrap: anywhere;
  }
  body.change-list.model-order #result_list tbody th, body.change-list.model-product #result_list tbody th { grid-column: 1 / -1; font-size: 14px; font-weight: 650; }
  /* With bulk actions, the selection checkbox keeps its own leading column. */
  body.change-list.model-order #result_list tbody tr:has(> td.action-checkbox), body.change-list.model-product #result_list tbody tr:has(> td.action-checkbox) { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
  body.change-list.model-order #result_list tbody tr:has(> td.action-checkbox) > th, body.change-list.model-product #result_list tbody tr:has(> td.action-checkbox) > th { grid-column: 2 / -1; }
  body.change-list.model-order #result_list tbody tr:has(> td.action-checkbox) > td.action-checkbox, body.change-list.model-product #result_list tbody tr:has(> td.action-checkbox) > td.action-checkbox { grid-column: 1; grid-row: 1 / span 20; padding-top: 2px; }
  body.change-list.model-order #result_list tbody td[colspan], body.change-list.model-product #result_list tbody td[colspan] { grid-column: 1 / -1; }
  body.change-list.model-order #result_list input.action-select, body.change-list.model-order #result_list #action-toggle,
  body.change-list.model-product #result_list input.action-select, body.change-list.model-product #result_list #action-toggle { width: 24px; height: 24px; margin: 0; }
}

/* Queue and catalog tables get the full content width, including at 1280px.
   A filter summary makes the applied state visible without squeezing columns. */
#changelist { flex-direction: column; }
#changelist .changelist-form-container { width: 100%; }
#changelist-filter { order: -1; display: block; flex: 0 0 auto; width: 100%; border-left: 0; border-bottom: 1px solid var(--line); }
#changelist-filter > .store-filter-disclosure > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; margin: 0; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.store-filter-disclosure > summary::-webkit-details-marker { display: none; }
.store-filter-disclosure > summary::after { content: '+'; font-size: 20px; }
.store-filter-disclosure[open] > summary::after { content: '−'; }
.store-filter-fields { display: flex; flex-direction: row; flex-wrap: wrap; }
.store-filter-context { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.store-mode-note { display: inline-flex; margin: -6px 0 18px; padding: 5px 10px; border: 1px solid #ccd9c5; border-radius: 6px; background: var(--forest-soft); color: var(--forest); font-size: 12px; font-weight: 600; }
.store-filter-return { margin: 8px 12px 14px; padding: 10px 16px; min-height: 44px; border: 1px solid #b8c5b5; border-radius: 6px; background: var(--surface); color: var(--forest); cursor: pointer; }
.store-required-hint { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.app-shop .aligned label.required::after { content: " *"; content: " *" / ""; color: var(--danger); }
#changelist .field-stock_link a { display: inline-flex; align-items: center; min-height: 44px; }
#changelist-filter .store-filter-fields > details { flex: 1 1 160px; min-width: 0; border-bottom: 0; }
#changelist-filter-extra-actions { width: 100%; }
.store-filter-disclosure:not([open])::details-content { content-visibility: hidden; display: none; }
.store-filter-disclosure:not([open]) > .store-filter-fields { display: none; }
#changelist .field-customer_name { white-space: normal; overflow-wrap: anywhere; min-width: 100px; }
#changelist .field-queue_details { width: 145px; white-space: normal; }
.store-queue-details { min-width: 120px; }
.store-queue-details > summary { display: list-item; min-height: 32px; padding: 6px 0; cursor: pointer; color: var(--forest); font-size: 12px; }
.store-queue-details > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.store-queue-secondary { display: grid; gap: 8px; padding: 6px 0; }
.store-queue-secondary > div { overflow-wrap: anywhere; }
.store-queue-secondary a { display: inline-flex; align-items: center; min-height: 40px; }
.store-content-label { display: block; overflow-wrap: anywhere; }
.store-content-key { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.store-content-preview { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
/* Read-only histories use the same labelled-card convention as the queues.
   Keep real table/header/row roles and ordinary sortable Django links. */
@media (max-width: 767px) {
  #changelist-filter .store-filter-fields > details { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list,
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list > thead,
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list > tbody { display: block; width: 100%; min-width: 0; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead th:not(.sortable) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: #eff2e9; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead tr::before { content: "Сортировка:"; content: "Сортировка:" / ""; align-self: center; color: var(--muted); font-size: 11px; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead th { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; width: auto; font-size: 12px; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead .text { padding: 0; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead .text a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; border: 1px solid #cfdac9; border-radius: 6px; background: var(--surface); }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead th.sorted .text a { background: #dfe9d6; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead .sortoptions { float: none; display: flex; padding: 0 2px; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead .clear { display: none; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list tbody :is(td, th) { display: block; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list tbody th { grid-column: 1 / -1; font-size: 14px; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list tbody th a { display: inline-flex; align-items: center; min-height: 44px; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list tbody td[data-label]::before { content: attr(data-label); content: attr(data-label) / ""; display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.4; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list .field-event_kind,
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list .field-delivery_state { grid-column: 1 / -1; }
}
body.change-list.model-sitecontent #result_list { min-width: 0; table-layout: fixed; }
body.change-list.model-sitecontent #result_list .column-content_label { width: 28%; }
body.change-list.model-sitecontent #result_list td, body.change-list.model-sitecontent #result_list th { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  body.change-list.model-order #result_list tbody td.field-status_badge { order: 1; }
  body.change-list.model-order #result_list tbody td.field-created_display { order: 2; }
  body.change-list.model-order #result_list tbody td.field-customer_name { order: 3; }
  body.change-list.model-order #result_list tbody td.field-total { order: 4; }
  body.change-list.model-order #result_list tbody td.field-queue_details { order: 5; grid-column: 1 / -1; width: auto; padding-bottom: 4px; }
  body.change-list.model-order #result_list tbody td.field-queue_details::before { display: none; }
  .store-queue-details > summary { min-height: 44px; padding: 10px 0; }
  body.change-list.model-order #result_list tbody td.field-customer_name { min-width: 0; }
  body.change-list.model-order #result_list tbody td.field-total { font-size: 14px; font-weight: 650; }
  body.change-list.model-sitecontent #result_list .column-content_label { width: 38%; }
  body.change-list.model-sitecontent #result_list tbody td, body.change-list.model-sitecontent #result_list tbody th { padding: 12px 10px; }
  .app-shop #changelist-filter .store-filter-fields > details { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  .app-shop .submit-row > :is(p.deletelink-box, a.deletelink) { order: 1; width: 100%; margin: 10px 0 0; }
  .app-shop .submit-row p.deletelink-box { padding-top: 12px; border-top: 1px solid var(--line); }
  .app-shop .submit-row > a.deletelink { margin-top: 22px; }
  .app-shop .submit-row p.deletelink-box a { width: 100%; }
}

/* Preserve native controls while making compact forms comfortable to use. */
.app-shop .aligned label.required::after { display: inline; height: auto; max-height: none; vertical-align: baseline; }
.app-shop .aligned .clearable-file-input > input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; }
.app-shop input[type="file"] { box-sizing: border-box; min-height: 44px; max-width: 100%; font: inherit; }
.app-shop input[type="file"]::file-selector-button { min-height: 44px; padding: 8px 12px; margin-right: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--forest); font: inherit; cursor: pointer; }
#changelist-filter > .store-filter-disclosure > summary::before { content: none; }
.store-operation-layout--draft { grid-template-columns: minmax(0, 760px); }
.store-selected-product { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

/* Saved configuration is not a transport/delivery success indicator. */
.store-delivery-state { display: block; max-width: 44ch; line-height: 1.6; overflow-wrap: anywhere; }
.store-delivery-state--warning { padding: 10px 12px; border-left: 3px solid #a9690c; border-radius: 4px; background: #fff1d0; color: #5d3b0b; }
.store-password-form .errornote p { margin: 0 0 8px; font-weight: 600; }
.store-password-form .errornote ul { margin: 0; padding-left: 20px; }
.store-password-form .errornote a { color: var(--danger); text-decoration: underline; }
.store-password-form .store-field-errors { margin: 8px 0 0 200px; padding: 8px 12px; border-left: 3px solid var(--danger); border-radius: 4px; background: var(--message-error-bg); }
.store-password-form .store-field-errors .errorlist { padding: 0; margin: 0; }
.store-password-form input[aria-invalid="true"] { border-color: var(--danger); }
.store-password-form .help ul { padding-left: 18px; list-style: disc; }
@media (max-width: 767px) {
  .store-password-form .store-field-errors { margin-left: 0; }
  .store-password-form .form-row input[type="password"] { min-height: 44px; }
  /* Keep real column headers for assistive technology; no fake sort chips for a singleton. */
  body.change-list.model-notificationsettings #result_list > thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body.change-list.model-notificationsettings #result_list thead tr::before { content: none; }
}
.app-shop.delete-confirmation #content form > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.app-shop.delete-confirmation #content form :is(input[type="submit"], .cancel-link) { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; }
@media (max-width: 767px) {
  .store-actions-fields, .store-actions-fields > .actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
  .store-actions-fields > .actions > label, .store-actions-fields > .actions select, .store-actions-fields > .actions > button { box-sizing: border-box; width: 100%; max-width: 100%; margin: 0; }
  .store-actions-fields > .actions > label { display: block; }
  body.change-list:is(.model-auditevent, .model-outbox, .model-notificationsettings) #result_list thead .sortoptions { order: 1; }
  .app-shop.delete-confirmation #content form :is(input[type="submit"], .cancel-link) { width: 100%; }
}

@media (max-width: 767px) {
  #changelist .store-actions-fields > label, #changelist .store-actions-fields select,
  #changelist .actions .store-actions-fields > button { box-sizing: border-box; display: block; width: 100%; max-width: 100%; margin: 0; }
  body.change-list.model-notificationsettings #result_list :is(.field-recipient, .field-recipient_display, .field-delivery_readiness) { grid-column: 1 / -1; }
}

.store-brand-preview { display:block; width:auto; max-width:min(240px, 100%); max-height:180px; object-fit:contain; border-radius:8px; }
