.aenes {
  --aes-paper: #f7f6f2;
  --aes-ink: #202c32;
  --aes-muted: #5c6b70;
  --aes-teal: #15585c;
  --aes-soft: #edf5f2;
  --aes-line: #d9e1dc;
  --aes-error: #a33b32;
  color: var(--aes-ink);
  background: var(--aes-paper);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font: 400 16px/1.55 "Segoe UI", Arial, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  accent-color: var(--aes-teal);
  color-scheme: light;
}

.aenes *,
.aenes *::before,
.aenes *::after { box-sizing: border-box; }
.aenes [hidden] { display: none !important; }

.aenes .aes-hero :is(h2, h3),
.aenes .aes-panel :is(h2, h3, h4),
.aenes .aes-dialog :is(h2, h3, h4),
.aenes .aes-help :is(h2, h3, h4) {
  color: var(--aes-ink);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
  margin: 0 0 12px;
}
.aenes .aes-hero h2 { font-size: clamp(25px, 3vw, 36px); line-height: 1.2; }
.aenes .aes-panel :is(h2, h3),
.aenes .aes-dialog :is(h2, h3),
.aenes .aes-help :is(h2, h3) { font-size: 20px; }
.aenes .aes-panel h4,
.aenes .aes-dialog h4 { font-size: 16px; letter-spacing: 0; }
.aenes .aes-panel p,
.aenes .aes-hero p,
.aenes .aes-dialog p,
.aenes .aes-help p { margin: 0 0 12px; font-family: inherit; line-height: 1.65; }
.aenes .aes-panel > :last-child,
.aenes .aes-help > :last-child,
.aenes .aes-dialog-inner > :last-child { margin-bottom: 0; }

.aenes .aes-hero { margin: 0 0 22px; padding: 22px 0 0; }
.aenes .aes-eyebrow {
  display: block;
  margin: 0 0 10px !important;
  color: var(--aes-teal);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.aenes .aes-intro,
.aenes .aes-hero .aes-intro { max-width: 780px; margin: 0; color: var(--aes-muted); font-size: 17px; line-height: 1.7; }
.aenes .aes-panel {
  min-width: 0;
  margin: 0 0 18px;
  padding: 20px;
  border: 1px solid var(--aes-line);
  border-radius: 14px;
  background: #fff;
}
.aenes .aes-heading,
.aenes .aes-toolbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}
.aenes .aes-heading :is(h2, h3, h4) { margin: 0; }
.aenes .aes-heading > :first-child { min-width: 0; }
.aenes .aes-actions,
.aenes .aes-filters { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; }
.aenes .aes-actions > *,
.aenes .aes-filters > * { min-width: 0; max-width: 100%; }

.aenes :is(button, input, select, textarea) { color: inherit; font: inherit; letter-spacing: normal; max-width: 100%; }
.aenes :is(input, select, textarea) { font-weight: 400; }
.aenes :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #bdcbc3;
  border-radius: 8px;
  color: var(--aes-ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.45;
  box-shadow: none;
}
.aenes textarea { min-height: 80px; resize: vertical; }
.aenes select { padding-right: 24px !important; }
.aenes input::placeholder,
.aenes textarea::placeholder { color: #76817a; opacity: 1; }
.aenes :is(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; min-width: 20px; margin: 0; accent-color: var(--aes-teal); }
.aenes input[type="file"] { display: block; width: 100%; min-height: 44px; font-size: 16px; }
.aenes input[type="file"]::file-selector-button { min-height: 44px; padding: 8px 12px; margin-right: 10px; border: 1px solid #bdcbc3; border-radius: 8px; color: var(--aes-ink); background: var(--aes-paper); font: inherit; cursor: pointer; }
.aenes :is(button, input, select, textarea, summary, a, [tabindex]):focus-visible { outline: 3px solid #5b9696; outline-offset: 3px; }
.aenes :is(input, select, textarea)[aria-invalid="true"],
.aenes :is(input, select, textarea).aes-invalid { border-color: var(--aes-error) !important; background: #fff7f3; }

.aenes .aes-btn {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid #bdcbc3;
  border-radius: 8px;
  background: #fff;
  color: var(--aes-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.aenes .aes-btn:hover:not(:disabled) { border-color: #7e9f96; background: var(--aes-soft); color: var(--aes-ink); }
.aenes .aes-btn.primary,
.aenes .aes-btn.active,
.aenes .aes-btn[aria-pressed="true"],
.aenes .aes-btn[aria-selected="true"] { border-color: var(--aes-teal); color: #fff; background: var(--aes-teal); }
.aenes .aes-btn.primary:hover:not(:disabled),
.aenes .aes-btn.active:hover:not(:disabled) { color: #fff; border-color: #11464a; background: #11464a; }
.aenes .aes-btn.danger { color: var(--aes-error); border-color: #dec4bf; background: #fff; }
.aenes .aes-btn.danger:hover:not(:disabled) { color: #862d27; border-color: #b36b61; background: #fff2ed; }
.aenes .aes-btn.small { padding: 8px 10px; font-size: 13px; }
.aenes .aes-btn:disabled { opacity: .48; cursor: not-allowed; }
.aenes .aes-btn :is(svg, i) { flex: 0 0 auto; }

.aenes .aes-meta-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(150px, .55fr) minmax(0, 1.5fr); align-items: start; gap: 15px; }
.aenes .aes-field { min-width: 0; margin: 0; }
.aenes .aes-field > label,
.aenes label.aes-field > span,
.aenes .aes-field > legend { display: block; margin: 0 0 6px; color: var(--aes-ink); font-size: 13px; font-weight: 650; line-height: 1.5; }
.aenes label.aes-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; line-height: 1.5; }
.aenes .aes-field :is(small, .aes-muted) { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; line-height: 1.6; }
.aenes .aes-field:has(input[type="checkbox"]):not(:has(input[type="text"])) label { display: flex; min-height: 44px; align-items: center; gap: 9px; margin: 0; }
.aenes .aes-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.aenes .aes-stat { min-width: 0; padding: 16px 18px; border: 1px solid var(--aes-line); border-radius: 12px; background: #fff; }
.aenes .aes-stat :is(span, small, p) { display: block; margin: 0 0 6px; color: var(--aes-muted); font-size: 13px; line-height: 1.5; }
.aenes .aes-stat strong { display: block; color: var(--aes-ink); font-size: clamp(19px, 2vw, 25px); font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.aenes .aes-stat.aes-total { border-color: #bdd4cc; background: #edf5f1; }
.aenes .aes-stat.aes-total strong { color: var(--aes-teal); }
.aenes .aes-status { display: block; min-height: 22px; margin: 7px 0 14px; color: var(--aes-teal); font-size: 13px; line-height: 1.6; }
.aenes .aes-status:empty { display: none; }
.aenes .aes-notice { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #c6dcd2; border-radius: 9px; color: #315b4e; background: #f0f7f2; font-size: 14px; line-height: 1.65; }
.aenes .aes-notice.aes-invalid,
.aenes .aes-notice[data-tone="error"] { border-color: #dfc1ba; color: var(--aes-error); background: #fff5ee; }
.aenes .aes-notice .aes-actions { margin-top: 10px; }
.aenes .aes-muted { color: var(--aes-muted); font-size: 13px; line-height: 1.6; }
.aenes p.aes-invalid,
.aenes span.aes-invalid,
.aenes small.aes-invalid { color: var(--aes-error); font-size: 13px; line-height: 1.6; }

.aenes .aes-rows { display: grid; min-width: 0; gap: 10px; }
.aenes .aes-section { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 7px; padding: 12px 14px; border: 1px solid #d2e0d7; border-radius: 8px; color: var(--aes-teal); background: #edf4ee; font-weight: 650; }
.aenes .aes-section :is(h3, h4, p) { margin: 0; font-size: 15px; letter-spacing: 0; }
.aenes .aes-section > :last-child { font-variant-numeric: tabular-nums; }
.aenes .aes-row,
.aenes .aes-row-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 44px 27px minmax(128px, .9fr) minmax(0, 2.45fr) minmax(0, .62fr) minmax(0, .88fr) minmax(96px, .72fr) minmax(0, .93fr) 140px;
  grid-template-areas: "select number type name unit price qty sum actions";
  gap: 8px;
  align-items: start;
}
.aenes .aes-row { padding: 13px 10px; border: 1px solid #dde4de; border-radius: 10px; background: #fff; }
.aenes .aes-row:hover { border-color: #acc4b8; }
.aenes .aes-row:focus-within { border-color: #79a39a; box-shadow: 0 0 0 1px #79a39a; }
.aenes .aes-row.aes-invalid { border-color: #c78173; background: #fffaf7; }
.aenes .aes-row-head { padding: 10px; border-bottom: 1px solid #d6dfd7; color: var(--aes-muted); font-size: 11px; font-weight: 700; line-height: 1.5; }
.aenes :is(.aes-row, .aes-row-head) > * { min-width: 0; max-width: 100%; }
.aenes :is(.aes-row, .aes-row-head) > .aes-select { grid-area: select; }
.aenes :is(.aes-row, .aes-row-head) > .aes-number { grid-area: number; }
.aenes :is(.aes-row, .aes-row-head) > .aes-type { grid-area: type; }
.aenes :is(.aes-row, .aes-row-head) > .aes-name { grid-area: name; }
.aenes :is(.aes-row, .aes-row-head) > .aes-unit { grid-area: unit; }
.aenes :is(.aes-row, .aes-row-head) > .aes-price { grid-area: price; }
.aenes :is(.aes-row, .aes-row-head) > .aes-qty { grid-area: qty; }
.aenes :is(.aes-row, .aes-row-head) > .aes-sum { grid-area: sum; }
.aenes :is(.aes-row, .aes-row-head) > .aes-row-actions { grid-area: actions; }
.aenes .aes-select { display: flex; min-height: 44px; align-items: center; justify-content: center; }
.aenes .aes-select label { display: inline-flex; width: 44px; min-height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.aenes .aes-number { display: flex; min-height: 44px; align-items: center; justify-content: center; color: var(--aes-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.aenes .aes-row .aes-name textarea { min-height: 44px; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; }
.aenes .aes-row .aes-name > :is(input, textarea) { min-height: 44px; }
.aenes .aes-row .aes-sum { min-height: 44px; padding: 9px 2px; text-align: right; font-weight: 700; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.aenes .aes-row :is(.aes-price, .aes-qty) input,
.aenes .aes-row input.aes-price,
.aenes .aes-row input.aes-qty { text-align: right; font-variant-numeric: tabular-nums; }
.aenes .aes-row :is(input, select, textarea) { padding-inline: 8px; }
 .aenes .aes-qty > label { display: block; }
.aenes .aes-quantity-controls { display: grid; grid-template-columns: repeat(2, minmax(44px, 1fr)); gap: 4px; margin-top: 4px; }
.aenes .aes-quantity-controls .aes-btn { min-width: 44px; min-height: 44px; padding: 4px; font-size: 20px; line-height: 1; }
.aenes .aes-row > :is(.aes-qty, .aes-price) { align-self: start; }
.aenes .aes-row-actions { display: flex; min-height: 44px; align-items: center; justify-content: flex-end; gap: 4px; }
.aenes .aes-row-actions .aes-btn { flex: 0 0 44px; width: 44px; min-width: 44px; padding-inline: 4px; }
.aenes .aes-mobile-label { display: none; }
.aenes .aes-row-details { grid-column: 1 / -1; min-width: 0; margin-top: 3px; border-top: 1px solid #e2e7e1; }
.aenes .aes-row-details > summary { min-height: 44px; padding: 11px 0; color: var(--aes-teal); font-size: 13px; font-weight: 650; line-height: 1.5; cursor: pointer; }
.aenes .aes-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 2px 0 8px; }
.aenes .aes-row-details .aes-field :is(input, textarea) { font-size: 16px; }
.aenes .aes-row .aes-row-issues {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #e4d3b3;
  border-radius: 7px;
  color: #805724;
  background: #fff9ee;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.aenes .aes-check { display: flex; min-width: 0; min-height: 44px; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 14px; padding: 8px 0; color: var(--aes-ink); font-size: 14px; line-height: 1.6; cursor: pointer; }
.aenes .aes-check > input { flex: 0 0 20px; }
.aenes .aes-check > .aes-muted { flex-basis: 100%; padding-left: 30px; }
.aenes label.aes-field.aes-search { flex: 1 1 220px; width: 100%; max-width: 360px; }
.aenes .aes-catalog-item { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; padding: 13px; border: 1px solid #d7e1d8; border-radius: 9px; background: #f8faf5; }
.aenes .aes-catalog-item > div { flex: 1 1 200px; min-width: 0; }
.aenes .aes-catalog-item strong { display: block; color: var(--aes-ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.aenes .aes-catalog-item small { display: block; margin-top: 5px; color: var(--aes-muted); font-size: 12px; line-height: 1.6; }
.aenes .aes-catalog-item > .aes-btn { flex: 0 0 auto; }
.aenes [data-catalog-list] { max-height: min(56vh, 500px); padding: 4px; overflow-y: auto; overscroll-behavior: contain; }
.aenes .aes-import-sample { min-width: 0; margin: 12px 0 16px; padding: 11px 13px; border: 1px solid #d2ddd4; border-radius: 8px; background: #f4f8f1; }
.aenes .aes-import-sample > p { margin: 0; padding: 8px 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.aenes .aes-import-sample > p + p { border-top: 1px solid #dfe7dc; }
.aenes .aes-import-sample strong { color: var(--aes-teal); }
.aenes .aes-panel > details > summary { min-height: 44px; margin: 10px 0; padding: 10px 0; color: var(--aes-teal); font-size: 14px; font-weight: 650; line-height: 1.5; cursor: pointer; }
.aenes .aes-panel > details[open] > .aes-meta-grid { margin: 8px 0 15px; }
.aenes .aes-panel > details > .aes-field { margin-top: 12px; }

.aenes .aes-bulk { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid #b8d2c7; border-radius: 9px; background: #edf5f1; }
.aenes .aes-bulk > :first-child { font-size: 14px; font-weight: 650; }
.aenes .aes-bulk .aes-field { width: 130px; }
.aenes .aes-bulk .aes-actions { flex: 1 1 auto; }
.aenes .aes-bulk :is(p, small) { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--aes-muted); }
.aenes .aes-filters .aes-field { flex: 1 1 170px; }
.aenes .aes-filters > :is(input, select) { width: auto; flex: 1 1 170px; }
.aenes .aes-import-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.aenes .aes-code,
.aenes textarea.aes-code { width: 100%; min-height: 150px; padding: 12px; border: 1px solid #bdcbc3; border-radius: 9px; background: #f7f9f5; color: var(--aes-ink); font: 15px/1.6 Consolas, "Courier New", monospace; white-space: pre; overflow: auto; }
.aenes .aes-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 15px; }
.aenes .aes-preset { display: flex; min-width: 0; min-height: 83px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 13px; border: 1px solid #d2ddd4; border-radius: 9px; color: var(--aes-ink); background: var(--aes-paper); text-align: left; cursor: pointer; }
.aenes .aes-preset:hover { border-color: #7ea49a; background: #edf4ef; }
.aenes .aes-preset strong { color: var(--aes-teal); font-size: 15px; line-height: 1.4; }
.aenes .aes-preset :is(span, small, p) { margin: 0; color: var(--aes-muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.aenes .aes-preset.active,
.aenes .aes-preset[aria-pressed="true"] { border-color: var(--aes-teal); box-shadow: inset 0 0 0 1px var(--aes-teal); }
.aenes .aes-footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.aenes .aes-footer-grid .aes-panel { margin: 0; }
.aenes .aes-help { min-width: 0; color: var(--aes-muted); font-size: 14px; line-height: 1.75; }
.aenes .aes-help :is(ul, ol) { margin: 0 0 14px; padding-left: 21px; }
.aenes .aes-help li + li { margin-top: 8px; }
.aenes .aes-help summary { min-height: 44px; padding: 10px 0; color: var(--aes-ink); font-weight: 650; cursor: pointer; }
.aenes .aes-help a { color: var(--aes-teal); text-decoration: underline; text-underline-offset: 3px; }

.aenes dialog.aes-dialog {
  width: min(780px, calc(100% - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #cbd7cd;
  border-radius: 15px;
  color: var(--aes-ink);
  background: #fff;
  box-shadow: 0 16px 70px rgb(25 42 35 / 22%);
  overflow: auto;
  overscroll-behavior: contain;
  font-family: inherit;
}
.aenes dialog.aes-dialog::backdrop { background: rgb(19 35 32 / 50%); }
.aenes .aes-dialog-inner { min-width: 0; padding: 24px; }
.aenes .aes-dialog-inner .aes-heading { margin-bottom: 17px; align-items: start; }
.aenes .aes-dialog .aes-close { display: inline-flex; flex: 0 0 44px; width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 5px; border: 1px solid #c5d2c9; border-radius: 8px; color: var(--aes-muted); background: #fff; font-size: 23px; line-height: 1; cursor: pointer; }
.aenes .aes-dialog .aes-close:hover { color: var(--aes-ink); background: #edf4ef; }
.aenes .aes-dialog .aes-actions { margin-top: 20px; justify-content: flex-end; }
.aenes .aes-dialog .aes-summary { margin: 0 0 17px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 900px) and (max-width: 1199px) {
  .aenes .aes-row,
  .aenes .aes-row-head { grid-template-columns: 44px 24px minmax(128px, .9fr) minmax(0, 1.8fr) minmax(0, .66fr) minmax(0, .85fr) minmax(96px, .7fr) minmax(0, .86fr) 140px; gap: 5px; }
  .aenes .aes-row { padding-inline: 7px; }
  .aenes .aes-row :is(input, select, textarea) { padding-inline: 6px; }
  .aenes .aes-row-head { font-size: 10px; }
}

@media (max-width: 899px) {
  .aenes .aes-panel { padding: 17px; }
  .aenes .aes-meta-grid { grid-template-columns: minmax(0, 1fr) minmax(150px, .55fr); }
  .aenes .aes-meta-grid > :nth-child(3) { grid-column: 1 / -1; }
  .aenes .aes-row-head { display: none; }
  .aenes .aes-row {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) 44px;
    grid-template-areas:
      "select number number number"
      "name name name name"
      "type type unit unit"
      "price price qty qty"
      "sum sum actions actions";
    align-items: end;
    gap: 13px 12px;
    padding: 16px;
    border-radius: 12px;
  }
  .aenes .aes-row .aes-number { justify-content: flex-start; }
  .aenes .aes-row .aes-select { justify-content: flex-start; }
  .aenes .aes-mobile-label { display: block; margin-bottom: 6px; color: var(--aes-muted); font-size: 12px; font-weight: 650; line-height: 1.5; }
  .aenes .aes-row .aes-sum { text-align: left; padding: 0; font-size: 19px; }
  .aenes .aes-row .aes-sum .aes-mobile-label { font-size: 12px; }
  .aenes .aes-row .aes-row-actions { justify-content: flex-end; align-self: end; }
  .aenes .aes-row-details { margin-top: 2px; }
  .aenes .aes-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aenes .aes-import-grid { grid-template-columns: minmax(0, 1fr); }
  .aenes .aes-footer-grid { grid-template-columns: minmax(0, 1fr); }
  .aenes .aes-heading .aes-actions { gap: 7px; }
  .aenes .aes-row :is(input, select, textarea) { padding-inline: 10px; }
}

@media (max-width: 600px) {
  .aenes .aes-hero { padding-top: 15px; margin-bottom: 17px; }
  .aenes .aes-hero h2 { font-size: 27px; }
  .aenes .aes-hero .aes-intro { font-size: 16px; }
  .aenes .aes-panel { padding: 13px; border-radius: 11px; margin-bottom: 15px; }
  .aenes .aes-heading,
  .aenes .aes-toolbar { gap: 10px; margin-bottom: 13px; }
  .aenes .aes-heading :is(h2, h3),
  .aenes .aes-dialog :is(h2, h3) { font-size: 19px; }
  .aenes .aes-heading .aes-actions,
  .aenes .aes-toolbar > .aes-actions { width: 100%; }
  .aenes .aes-heading .aes-actions > .aes-btn,
  .aenes .aes-toolbar > .aes-actions > .aes-btn { flex: 1 1 135px; }
  .aenes .aes-meta-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .aenes .aes-meta-grid > :nth-child(3) { grid-column: auto; }
  .aenes .aes-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 15px; }
  .aenes .aes-stat { padding: 12px; border-radius: 9px; }
  .aenes .aes-stat strong { font-size: 20px; }
  .aenes .aes-stat :is(span, small, p) { font-size: 12px; }
  .aenes .aes-row {
    padding: 12px;
    gap: 12px 10px;
    grid-template-areas:
      "select number number number"
      "name name name name"
      "type type unit unit"
      "price price qty qty"
      "sum sum sum sum"
      "actions actions actions actions";
  }
  .aenes .aes-row .aes-row-actions { justify-content: flex-start; }
  .aenes .aes-row .aes-sum { font-size: 20px; }
  .aenes .aes-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .aenes .aes-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .aenes .aes-preset { padding: 10px; min-height: 84px; }
  .aenes .aes-preset strong { font-size: 14px; }
  .aenes .aes-filters { width: 100%; gap: 8px; }
  .aenes label.aes-field.aes-search { max-width: none; flex-basis: 100%; }
  .aenes .aes-filters .aes-field,
  .aenes .aes-filters > :is(input, select) { flex-basis: 100%; width: 100%; }
  .aenes .aes-bulk { padding: 12px; gap: 10px; }
  .aenes .aes-bulk .aes-actions { flex-basis: 100%; }
  .aenes .aes-bulk .aes-actions > .aes-btn { flex: 1 1 100px; }
  .aenes .aes-bulk .aes-field { width: 150px; }
  .aenes .aes-code,
  .aenes textarea.aes-code { font-size: 16px; }
  .aenes dialog.aes-dialog { width: calc(100% - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .aenes .aes-dialog-inner { padding: 15px; }
  .aenes .aes-dialog .aes-actions > .aes-btn { flex: 1 1 120px; }
  .aenes .aes-dialog .aes-summary { grid-template-columns: minmax(0, 1fr); }
  .aenes .aes-catalog-item { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; gap: 9px; }
  .aenes .aes-catalog-item > div { grid-column: 1 / -1; }
  .aenes .aes-catalog-item > .aes-btn { min-width: 0; width: 100%; }
}

@media (max-width: 359px) {
  .aenes .aes-hero h2 { font-size: 25px; }
  .aenes .aes-panel { padding: 10px; }
  .aenes .aes-row { padding: 10px; gap: 11px 8px; }
  .aenes .aes-row :is(input, select, textarea) { padding-inline: 7px; }
  .aenes .aes-summary { gap: 7px; }
  .aenes .aes-stat { padding: 10px; }
  .aenes .aes-stat strong { font-size: 18px; }
  .aenes .aes-btn { padding-inline: 10px; }
  .aenes .aes-preset-grid { grid-template-columns: minmax(0, 1fr); }
  .aenes .aes-preset { min-height: 65px; }
}

@media (prefers-reduced-motion: reduce) {
  .aenes *,
  .aenes *::before,
  .aenes *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.aenes [data-message] { position:fixed; z-index:10010; bottom:16px; right:16px; width:min(520px,calc(100vw - 32px)); padding:14px 18px; border:1px solid #8cae9f; border-radius:10px; background:#edf5f2; box-shadow:0 8px 30px #202c321a; font-size:14px; }
.aenes .aes-guide-entry { margin-top:14px; }
.aenes .aes-guide-entry .aes-btn { border-color:var(--aes-teal); color:var(--aes-teal); font-weight:700; }
.aenes .aes-kit-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.aenes .aes-kit-card { border:1px solid var(--aes-line); border-radius:10px; background:var(--aes-soft); padding:16px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.aenes .aes-kit-card strong { font-size:17px; }
.aenes .aes-kit-card p { margin:0; }
.aenes .aes-kit-card .aes-btn { margin-top:auto; }
.aenes .aes-kits-storage { margin-top:12px; margin-bottom:0; }
.aenes .aes-kit-library-card,.aenes .aes-kit-editor-row { margin:14px 0; padding:16px; border:1px solid var(--aes-line); border-radius:10px; background:#fff; }
.aenes .aes-kit-library-card h4 { margin-bottom:8px; }
.aenes .aes-kit-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:12px 0; }
.aenes .aes-kit-footer { margin-top:18px; padding-top:16px; border-top:1px solid var(--aes-line); }
.aenes .aes-kit-preview-list { max-height:300px; overflow:auto; border:1px solid var(--aes-line); border-radius:8px; padding:12px; margin:14px 0; }
.aenes .aes-kit-preview-list p { border-bottom:1px solid var(--aes-line); padding-bottom:8px; }
.aenes .aes-kit-preview-list p:last-child { border:0; margin:0; padding:0; }
@media(max-width:800px){.aenes .aes-kit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.aenes .aes-kit-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }}
@media(max-width:600px){.aenes .aes-kit-grid { grid-template-columns:minmax(0,1fr); }.aenes .aes-kit-library-card,.aenes .aes-kit-editor-row { padding:12px; }.aenes .aes-kit-fields { gap:10px; }.aenes .aes-kits-dialog .aes-actions { gap:8px; }.aenes .aes-kit-editor-row .aes-heading .aes-actions { width:auto; }.aenes .aes-kit-editor-row .aes-heading .aes-actions .aes-btn { flex:0 0 44px; padding:8px; }}
.aenes .aes-dialog details > summary { min-height:44px; padding:10px 0; color:var(--aes-teal); font-weight:650; cursor:pointer; }
.aenes .aes-dialog details { margin:10px 0; }
.aenes .aes-dialog details ol { padding-left:24px; }
.aenes .aes-dialog details li { margin-bottom:10px; }
@media(max-width:359px){.aenes .aes-kit-editor-row .aes-kit-fields > .aes-field:nth-child(-n+2){grid-column:1 / -1;}}
.aenes .aes-kit-kind { color:var(--aes-teal); font-size:13px; font-weight:650; }
.aenes .aes-kit-calculation { padding:16px; margin:18px 0; border:1px solid var(--aes-line); border-radius:10px; background:var(--aes-soft); }
.aenes .aes-kit-rule-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap:12px; }
.aenes .aes-kit-rule-note { margin:8px 0; font-size:13px; }
.aenes .aes-kit-preview-row { padding:16px; margin:14px 0; border:1px solid var(--aes-line); border-radius:10px; background:#fff; }
.aenes .aes-kit-preview-row > strong { display:block; font-size:16px; }
.aenes .aes-kit-preview-row > p { margin:8px 0; }
.aenes .aes-kit-quantity-grid { display:grid; grid-template-columns:minmax(130px,.7fr) minmax(0,1fr); gap:16px; align-items:center; }
.aenes .aes-kit-manual { color:var(--aes-teal); font-weight:700; }
.aenes .aes-kit-preview-row .aes-btn { margin-top:10px; }
@media(min-width:601px){.aenes .aes-kits-dialog .aes-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.aenes .aes-kits-dialog .aes-meta-grid > :nth-child(3){grid-column:1 / -1;}}
@media(max-width:600px){.aenes .aes-kit-rule-grid,.aenes .aes-kit-quantity-grid{grid-template-columns:minmax(0,1fr);gap:10px;}.aenes .aes-kit-calculation,.aenes .aes-kit-preview-row{padding:12px;}.aenes .aes-kit-preview-row .aes-btn{width:100%;}}

/* Advanced kits: geometry and material procurement stay within the dialog. */
.aenes .aes-kit-geometry { min-width:0; margin:18px 0 0; padding:14px; border:1px solid var(--aes-line); border-radius:10px; background:#fff; }
.aenes .aes-kit-geometry legend { float:none; width:auto; padding:0 5px; margin:0; font-size:16px; font-weight:700; }
.aenes .aes-kit-geometry > .aes-muted { margin:8px 0 14px; }
.aenes .aes-kit-geometry .aes-meta-grid { margin-top:12px; }
.aenes .aes-kit-geometry .aes-meta-grid > .aes-kit-segments-choice { grid-column:1 / -1; }
.aenes .aes-kit-geometry .aes-meta-grid > .aes-kit-segment-list { grid-column:1 / -1; }
.aenes .aes-kit-geometry .aes-meta-grid > [hidden] { display:none; }
.aenes .aes-kit-geometry-help { font-size:13px; line-height:1.6; }
.aenes .aes-kit-template-help { margin-top:18px; padding:14px; border-radius:10px; background:var(--aes-soft); }
.aenes .aes-kit-template-help p { margin:6px 0 0; }
.aenes .aes-kit-procurement { margin:14px 0; padding:12px; border:1px solid var(--aes-line); border-radius:10px; background:var(--aes-soft); }
.aenes .aes-kit-procurement .aes-check { align-items:flex-start; }
.aenes .aes-kit-procurement .aes-meta-grid > .aes-kit-procurement-choice { grid-column:1 / -1; }
.aenes .aes-kit-rule-with-procurement { grid-template-columns:minmax(0,1fr); }
.aenes .aes-kit-rule-with-procurement > .aes-field:nth-child(n+2) { display:none; }
.aenes .aes-kit-geometry-result { padding:14px; border:1px solid var(--aes-line); border-radius:10px; background:var(--aes-soft); margin:18px 0; }
.aenes .aes-kit-geometry-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.aenes .aes-kit-geometry-counts > div { min-width:0; padding:10px; border:1px solid var(--aes-line); border-radius:8px; background:#fff; }
.aenes .aes-kit-geometry-counts span { display:block; font-size:13px; color:var(--aes-muted); }
.aenes .aes-kit-geometry-counts strong { display:block; font-size:20px; overflow-wrap:anywhere; }
.aenes .aes-kit-segment-results { max-height:340px; overflow:auto; padding-right:4px; }
.aenes .aes-kit-segment-results p { margin:0 0 10px; padding-bottom:10px; border-bottom:1px solid var(--aes-line); }
.aenes .aes-kit-procurement-result { padding:12px; background:var(--aes-soft); border-radius:8px; margin:12px 0; }
.aenes .aes-kit-procurement-result p { margin:0 0 8px; }
.aenes .aes-kit-procurement-result p:last-child { margin-bottom:0; }
.aenes .aes-kit-procurement-result dl { margin:0 0 10px; }
.aenes .aes-kit-procurement-result dl > div { display:flex; justify-content:space-between; gap:16px; padding:5px 0; border-bottom:1px solid var(--aes-line); }
.aenes .aes-kit-procurement-result dt { font-weight:400; min-width:0; }
.aenes .aes-kit-procurement-result dd { margin:0; font-weight:650; text-align:right; overflow-wrap:anywhere; flex:0 0 auto; max-width:50%; }
@media(max-width:600px){
 .aenes .aes-kit-geometry { padding:10px; }
 .aenes .aes-kit-geometry-counts { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .aenes .aes-kit-procurement-result dl > div { gap:10px; font-size:14px; }
 .aenes .aes-kit-geometry-result { padding:10px; }
}
@media(max-width:359px){
 .aenes .aes-kit-procurement .aes-meta-grid { grid-template-columns:minmax(0,1fr); }
 .aenes .aes-kit-procurement-result dl > div { display:block; }
 .aenes .aes-kit-procurement-result dd { text-align:left; max-width:100%; }
}
