  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f6f8;
    color: #1a1a1a;
    line-height: 1.5;
  }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; cursor: pointer; }
  input, select, textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #d0d4dc;
    border-radius: 8px;
    background: #fff;
    width: 100%;
    color: #1a1a1a;
  }
  input:focus, select:focus, textarea:focus { outline: 2px solid #1F4E79; outline-offset: -1px; border-color: #1F4E79; }
  textarea { min-height: 80px; resize: vertical; }
  label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
  .field { margin-bottom: 14px; }
  .row { display: flex; gap: 12px; flex-wrap: wrap; }
  .row .field { flex: 1; min-width: 200px; }

  /* Layout */
  .app { display: flex; min-height: 100vh; }
  .sidebar {
    width: 240px; background: #0E2A4A; color: #fff;
    padding: 20px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  }
  .sidebar h1 {
    font-size: 16px; font-weight: 700; padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px;
  }
  .sidebar h1 small { display: block; font-size: 11px; opacity: 0.6; font-weight: 400; margin-top: 4px; }
  .nav-item {
    display: block; padding: 12px 20px; color: rgba(255,255,255,0.75);
    font-size: 14px; cursor: pointer; border-left: 3px solid transparent;
    transition: all 0.15s;
  }
  .nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .nav-item.active { background: rgba(242,169,59,0.15); color: #fff; border-left-color: #F2A93B; font-weight: 600; }
  .nav-item .ico { display: inline-block; width: 22px; margin-right: 8px; }
  .nav-divider { padding: 16px 20px 8px; font-size: 11px; text-transform: uppercase; opacity: 0.4; letter-spacing: 0.5px; }
  .role-panel {
    margin: 0 12px 14px; padding: 12px; border-radius: 8px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  }
  .role-panel .name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
  .role-panel .role { font-size: 11px; color: #F2A93B; text-transform: uppercase; letter-spacing: .4px; }
  .role-panel select { margin-top: 10px; padding: 7px 8px; font-size: 12px; border-radius: 6px; }
  .role-panel .btn { margin-top: 10px; width: 100%; justify-content: center; padding: 7px 8px; font-size: 12px; }

  .content { flex: 1; padding: 24px 32px; max-width: 100%; overflow-x: hidden; }
  .page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
  .page-header h2 { font-size: 24px; font-weight: 700; }
  .page-header .desc { color: #666; font-size: 14px; margin-top: 4px; }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
    border: 1px solid transparent; transition: all 0.15s;
  }
  .btn-primary { background: #1F4E79; color: #fff; }
  .btn-primary:hover { background: #163b5e; }
  .btn-secondary { background: #fff; color: #1F4E79; border-color: #1F4E79; }
  .btn-secondary:hover { background: #f0f5fa; }
  .btn-danger { background: #fff; color: #c00; border-color: #c00; }
  .btn-danger:hover { background: #fef0f0; }
  .btn-ghost { background: transparent; color: #666; }
  .btn-ghost:hover { background: #eef0f3; color: #1a1a1a; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
  .btn-yellow { background: #F2A93B; color: #fff; }
  .btn-yellow:hover { background: #d99020; }
  .btn[disabled], .step[disabled] { opacity: .45; pointer-events: none; }

  /* Cards */
  .card {
    background: #fff; border-radius: 12px; padding: 20px;
    border: 1px solid #e5e7eb; margin-bottom: 16px;
  }
  .card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
  .status-badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px;
    border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef0f3; color: #555;
  }
  .status-badge.ok { background: #E8F5E9; color: #1B6B2A; }
  .status-badge.warn { background: #FFF4D6; color: #8A5A00; }
  .status-badge.hot { background: #FFE7D6; color: #A24100; }
  .role-lock { display: none !important; }
  .mini-note { font-size: 12px; color: #666; margin-top: 6px; }
  .switch-row {
    display: flex; align-items: center; gap: 9px; margin-bottom: 9px;
    font-size: 14px; color: #333;
  }
  .switch-row input { width: auto; }
  .price-mode {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px;
  }
  .price-mode label {
    border: 1px solid #d0d4dc; border-radius: 8px; padding: 10px; font-weight: 600;
    display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  }
  .price-mode input { width: auto; }

  /* Grid of items */
  .grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .item-card {
    background: #fff; border-radius: 10px; border: 1px solid #e5e7eb;
    padding: 14px; transition: all 0.15s; cursor: pointer; position: relative;
  }
  .item-card:hover { border-color: #1F4E79; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
  .item-card.selected { border-color: #1F4E79; background: #f0f5fa; box-shadow: 0 0 0 2px #1F4E79 inset; }
  .item-card img.thumb {
    width: 100%; height: 140px; object-fit: contain; background: #fafafa;
    border-radius: 6px; margin-bottom: 10px; border: 1px solid #eee;
  }
  .item-card .no-thumb {
    width: 100%; height: 140px; background: #fafafa; border-radius: 6px;
    margin-bottom: 10px; display: flex; align-items: center; justify-content: center;
    color: #aaa; font-size: 12px; border: 1px dashed #ccc;
  }
  .item-card .name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
  .item-card .meta { font-size: 12px; color: #666; }
  .item-card .tag {
    display: inline-block; padding: 2px 8px; background: #eef0f3;
    border-radius: 4px; font-size: 11px; color: #555; margin-top: 6px;
  }
  .item-card .actions {
    position: absolute; top: 10px; right: 10px; display: none;
    gap: 4px; background: rgba(255,255,255,0.95); border-radius: 6px; padding: 4px;
  }
  .item-card:hover .actions { display: flex; }

  /* Modal */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100;
    display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
  }
  #photoPickerOverlay { z-index: 150; background: rgba(0,0,0,0.28); }
  .modal-overlay.open { display: flex; }
  .modal {
    background: #fff; border-radius: 12px; max-width: 720px; width: 100%;
    padding: 24px; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee; }

  /* Media picker */
  .media-picker {
    border: 1px dashed #d0d4dc; border-radius: 8px; padding: 12px;
    background: #fafbfc; min-height: 80px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #666; font-size: 13px; gap: 10px;
  }
  .media-picker:hover { border-color: #1F4E79; background: #f0f5fa; color: #1F4E79; }
  .media-picker img { max-height: 80px; max-width: 100%; border-radius: 4px; }
  .media-picker.with-image { display: block; text-align: center; position: relative; }
  .media-picker .remove-img {
    position: absolute; top: 6px; right: 6px; background: #fff; border: 1px solid #ddd;
    border-radius: 50%; width: 24px; height: 24px; font-size: 14px; line-height: 1;
  }

  /* Builder steps */
  .steps {
    display: flex; gap: 0; margin-bottom: 24px; background: #fff;
    border-radius: 10px; padding: 6px; border: 1px solid #e5e7eb; overflow-x: auto;
  }
  .step {
    flex: 1; padding: 12px 14px; text-align: center; font-size: 13px; font-weight: 600;
    border-radius: 8px; color: #888; cursor: pointer; white-space: nowrap;
  }
  .step.active { background: #1F4E79; color: #fff; }
  .step.done { color: #1F4E79; }
  .step-num { display: inline-block; width: 22px; height: 22px; border-radius: 50%;
    background: #eef0f3; color: #888; line-height: 22px; font-size: 12px; margin-right: 6px; }
  .step.active .step-num { background: rgba(255,255,255,0.25); color: #fff; }
  .step.done .step-num { background: #1F4E79; color: #fff; }

  /* Structure cards */
  .struct-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .struct-card {
    background: #fff; border: 2px solid #e5e7eb; border-radius: 10px; padding: 18px;
    text-align: center; cursor: pointer; transition: all 0.15s;
  }
  .struct-card:hover { border-color: #1F4E79; }
  .struct-card.selected { border-color: #1F4E79; background: #f0f5fa; }
  .struct-card .struct-num {
    font-size: 36px; font-weight: 800; color: #1F4E79; margin-bottom: 6px;
  }
  .struct-card .struct-name { font-size: 13px; font-weight: 600; }
  .struct-card .struct-desc { font-size: 11px; color: #666; margin-top: 4px; }

  /* Empty state */
  .empty {
    text-align: center; padding: 40px 20px; color: #888;
    background: #fff; border-radius: 12px; border: 1px dashed #d0d4dc;
  }
  .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

  /* PDF preview */
  .pdf-preview {
    background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px auto; max-width: 794px; min-height: 1123px;
    padding: 0; overflow: hidden;
  }

  /* Tag filter */
  .tag-filter {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  }
  .tag-pill {
    padding: 6px 14px; background: #fff; border: 1px solid #d0d4dc;
    border-radius: 999px; font-size: 12px; cursor: pointer; transition: all 0.15s;
  }
  .tag-pill:hover { border-color: #1F4E79; }
  .tag-pill.active { background: #1F4E79; color: #fff; border-color: #1F4E79; }

  /* Toast */
  .toast {
    position: fixed; bottom: 30px; right: 30px; background: #1F4E79; color: #fff;
    padding: 14px 22px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 200; opacity: 0; pointer-events: none; transition: all 0.3s;
    font-size: 14px; font-weight: 600;
  }
  .toast.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .toast.error { background: #c00; }

  .login-screen {
    position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0E2A4A 0%, #1F4E79 100%);
    padding: 24px;
  }

  .image-profile-row {
    display: grid; grid-template-columns: 1.1fr 180px 220px; gap: 14px; align-items: center;
    padding: 14px 0; border-bottom: 1px solid #eef0f3;
  }
  .image-profile-row:last-of-type { border-bottom: none; }
  .image-profile-row .name { font-weight: 700; font-size: 14px; }
  .image-profile-row .meta { color: #666; font-size: 12px; margin-top: 2px; }
  .login-card {
    width: min(420px, 100%); background: #fff; border-radius: 8px; padding: 28px;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
  }
  .login-card h2 { font-size: 22px; margin-bottom: 8px; color: #111827; }
  .login-card p { font-size: 13px; color: #6b7280; line-height: 1.45; margin-bottom: 18px; }
  .login-card .btn { width: 100%; justify-content: center; margin-top: 4px; }
  .login-error { min-height: 18px; margin-top: 12px; color: #c00; font-size: 13px; }

  /* Mobile */
  @media (max-width: 768px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; padding: 12px 0; }
    .sidebar h1 { padding-bottom: 12px; margin-bottom: 8px; }
    .nav-item { padding: 10px 16px; }
    .content { padding: 16px; }
    .page-header h2 { font-size: 20px; }
  }

  /* Print */
  @media print {
    body { background: #fff; }
    .sidebar, .page-header, .builder-controls, .preview-controls, .steps { display: none !important; }
    .content { padding: 0; }
    .pdf-preview { box-shadow: none; margin: 0; max-width: 100%; }
  }

  /* ========= PDF DOCUMENT STYLES (для предпросмотра и печати) ========= */
  .doc-page {
    width: 210mm; min-height: 297mm; padding: 0; background: #fff;
    page-break-after: always; position: relative; box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11pt; color: #111;
  }
  .doc-page:last-child { page-break-after: auto; }

  .doc-header {
    background: var(--brand-dark, #0E2A4A); color: #fff; padding: 6mm 12mm;
    display: grid; grid-template-columns: 38mm 1fr 50mm; gap: 8mm; align-items: center;
  }
  .doc-header .h-logo { display: flex; align-items: center; }
  .doc-header .h-logo img { max-width: 100%; max-height: 15mm; object-fit: contain; }
  .doc-header .h-logo .logo-placeholder {
    border: 1px dashed rgba(255,255,255,0.4); padding: 3mm 3mm; color: rgba(255,255,255,0.5);
    font-size: 9pt; text-align: center; border-radius: 4px;
  }
  .doc-header .h-mid { text-align: center; }
  .doc-header .h-mid .title { font-size: 15pt; font-weight: 700; margin-bottom: 1.5mm; letter-spacing: 0.5px; }
  .doc-header .h-mid .sub { font-size: 8.5pt; opacity: 0.9; margin-bottom: 1.5mm; }
  .doc-header .h-mid .badge { font-size: 8pt; font-weight: 700; color: var(--brand-accent, #F2A93B); letter-spacing: 0.3px; }
  .doc-header .h-phone { border-left: 2px solid var(--brand-accent, #F2A93B); padding-left: 5mm; }
  .doc-header .h-phone .label { font-size: 7.5pt; color: var(--brand-accent, #F2A93B); font-weight: 700; margin-bottom: 1.4mm; }
  .doc-header .h-phone .phone1 { font-size: 12pt; font-weight: 700; margin-bottom: .8mm; }
  .doc-header .h-phone .phone2 { font-size: 9pt; opacity: 0.8; }

  .doc-yellow-bar { height: 2mm; background: var(--brand-accent, #F2A93B); }

  .doc-crumbs {
    padding: 2mm 12mm 0; font-size: 8pt; color: #888;
  }

  .doc-body { padding: 6mm 12mm 34mm; }

  .doc-footer {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--brand-dark, #0E2A4A); color: #fff; padding: 5mm 12mm;
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4mm; font-size: 8pt;
    align-items: center;
  }
  .doc-footer::before {
    content: ''; position: absolute; top: -3mm; left: 0; right: 0; height: 3mm;
    background: var(--brand-accent, #F2A93B);
  }
  .doc-footer .ft-l strong { font-size: 9pt; display: block; margin-bottom: 1mm; }
  .doc-footer .ft-m { text-align: center; }
  .doc-footer .ft-m strong { font-size: 9pt; display: block; margin-bottom: 1mm; }
  .doc-footer .ft-r { text-align: right; opacity: 0.85; }
  .doc-footer .ft-r .page-num { font-size: 11pt; font-weight: 700; color: #fff; }

  .doc-section-tag { font-size: 9pt; color: #888; margin-bottom: 2mm; }
  .doc-h1 { font-size: 18pt; font-weight: 700; margin-bottom: 3mm; color: #111; }
  .doc-sub { font-size: 11pt; color: #444; margin-bottom: 6mm; }
  .doc-h2 { font-size: 13pt; font-weight: 700; margin-top: 6mm; margin-bottom: 3mm; }
  .doc-p { font-size: 10.5pt; margin-bottom: 3mm; line-height: 1.5; }
  .doc-ul { margin-bottom: 4mm; padding-left: 5mm; }
  .doc-ul li { font-size: 10.5pt; margin-bottom: 2mm; line-height: 1.4; }

  .doc-photo { text-align: center; margin: 4mm 0; }
  .doc-photo img { max-width: 90%; max-height: 80mm; object-fit: contain; border: 1px solid #eee; border-radius: 4px; }
  .doc-photo.hero img { max-height: 96mm; }
  .doc-photo .caption { font-size: 9pt; color: #888; font-style: italic; margin-top: 2mm; }
  .doc-photo-placeholder {
    border: 1px dashed #ccc; background: #fafafa; padding: 20mm 10mm; color: #aaa;
    border-radius: 4px; text-align: center; margin: 4mm 0; font-size: 10pt;
  }

  .doc-cover-page {
    min-height: 297mm; height: 297mm; overflow: hidden;
    display: grid; grid-template-rows: 198mm 99mm;
  }
  .cover-top {
    position: relative; color: #fff; padding: 14mm 16mm 11mm;
    background:
      linear-gradient(135deg, var(--brand-dark, #0E2A4A) 0%, var(--brand-primary, #1F4E79) 100%);
  }
  .cover-top::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5mm;
    background: var(--brand-accent, #F2A93B);
  }
  .cover-logo { position: absolute; top: 13mm; left: 16mm; max-width: 48mm; max-height: 20mm; }
  .cover-logo img { max-width: 48mm; max-height: 20mm; object-fit: contain; }
  .cover-logo-placeholder {
    border: 1px solid rgba(255,255,255,.35); padding: 4mm 5mm; border-radius: 4px;
    font-size: 10pt; font-weight: 800; color: rgba(255,255,255,.82);
  }
  .cover-kicker {
    position: absolute; top: 17mm; right: 16mm; max-width: 80mm; text-align: right;
    color: var(--brand-accent, #F2A93B); font-size: 8.5pt; font-weight: 800; line-height: 1.35;
  }
  .cover-main { padding-top: 44mm; max-width: 158mm; }
  .cover-title { font-size: 30pt; line-height: 1.03; font-weight: 900; margin-bottom: 9mm; }
  .cover-subtitle { font-size: 17pt; line-height: 1.25; opacity: .95; margin-bottom: 3mm; }
  .cover-models { font-size: 20pt; line-height: 1.18; font-weight: 800; max-width: 150mm; }
  .cover-suffix { font-size: 15pt; line-height: 1.25; margin-top: 3mm; color: var(--brand-accent, #F2A93B); font-weight: 800; }
  .cover-grid {
    position: absolute; left: 16mm; right: 16mm; bottom: 16mm;
    display: grid; grid-template-columns: 1.25fr .9fr; gap: 7mm;
  }
  .cover-client, .cover-contacts {
    border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08);
    padding: 5mm; border-radius: 6px;
  }
  .cover-label { color: var(--brand-accent, #F2A93B); font-size: 8pt; font-weight: 800; text-transform: uppercase; margin-bottom: 2mm; }
  .cover-client-name { font-size: 13pt; line-height: 1.25; font-weight: 800; margin-bottom: 2mm; }
  .cover-muted { font-size: 9pt; line-height: 1.35; color: rgba(255,255,255,.82); margin-top: 1mm; }
  .cover-phone { font-size: 14pt; line-height: 1.25; font-weight: 900; }
  .cover-phone.secondary { font-size: 10.5pt; opacity: .9; }
  .cover-date { position: absolute; right: 16mm; bottom: 7mm; font-size: 8.5pt; color: rgba(255,255,255,.75); }
  .cover-bottom { background: #eef1f5; overflow: hidden; }
  .cover-bottom img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .cover-photo-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #7c8594; font-weight: 800; font-size: 14pt; background: #e7ebf1;
  }

  .doc-components { margin: 7mm 0 5mm; }
  .doc-components .lead { color: #5b667a; font-size: 10pt; line-height: 1.4; margin-bottom: 4mm; max-width: 155mm; }
  .doc-component-card {
    border: 1px solid #d7dce5; background: #fff; margin-bottom: 4mm;
    display: grid; grid-template-columns: 32mm 1fr; gap: 5mm; padding: 4mm;
    break-inside: avoid; page-break-inside: avoid;
  }
  .doc-component-img { display: flex; align-items: center; justify-content: center; min-height: 28mm; }
  .doc-component-img img { max-width: 30mm; max-height: 30mm; object-fit: contain; }
  .doc-component-img .empty-img {
    width: 28mm; height: 22mm; border: 1px dashed #ccd3df; color: #9aa4b5;
    display: flex; align-items: center; justify-content: center; font-size: 8pt; text-align: center;
  }
  .doc-component-head { display: flex; justify-content: space-between; gap: 4mm; align-items: baseline; margin-bottom: 2mm; }
  .doc-component-title { font-size: 11.5pt; font-weight: 800; color: #071f4a; }
  .doc-component-brand { font-size: 8.5pt; font-weight: 800; color: #c46c00; text-align: right; }
  .doc-component-desc {
    font-size: 8.7pt; line-height: 1.3; color: #102a5c; margin-bottom: 2.5mm;
    padding-bottom: 2mm; border-bottom: 1px solid #d8dde6;
  }
  .doc-component-specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6mm; row-gap: 1.6mm; }
  .doc-component-spec { border-bottom: 1px solid #d8dde6; padding-bottom: 1.2mm; min-height: 8mm; }
  .doc-component-spec .label {
    font-size: 7.2pt; color: #697386; text-transform: uppercase; line-height: 1.1; margin-bottom: .8mm;
  }
  .doc-component-spec .value { font-size: 8.3pt; color: #071f4a; font-weight: 800; line-height: 1.2; }

  .doc-price-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border: 2px solid var(--brand-primary, #1F4E79); border-radius: 6px; overflow: hidden;
    margin: 6mm 0;
  }
  .doc-price-2 > div { padding: 6mm 4mm; text-align: center; }
  .doc-price-2 .pr-closed { background: #DEEBF7; }
  .doc-price-2 .pr-label { font-size: 8pt; font-weight: 700; color: #666; letter-spacing: 0.3px; margin-bottom: 3mm; }
  .doc-price-2 .pr-closed .pr-label { color: var(--brand-primary, #1F4E79); }
  .doc-price-2 .pr-value { font-size: 18pt; font-weight: 700; color: var(--brand-primary, #1F4E79); }
  .doc-price-2 .pr-suffix { font-size: 8pt; color: #888; margin-top: 2mm; }

  .doc-kv { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
  .doc-kv td { padding: 2.2mm 0; border-bottom: 1px solid #eee; font-size: 10pt; vertical-align: top; }
  .doc-kv td:first-child { color: #666; width: 40%; padding-right: 4mm; }

  .doc-spec-page .doc-h1 { font-size: 16pt; margin-bottom: 2mm; }
  .doc-spec-page .doc-h2 { font-size: 11.5pt; margin-top: 4mm; margin-bottom: 2mm; }
  .doc-spec-page .doc-p { font-size: 9.2pt; line-height: 1.35; margin-bottom: 2mm; }
  .doc-spec-page .doc-ul { margin-bottom: 3mm; }
  .doc-spec-page .doc-ul li { font-size: 9pt; line-height: 1.25; margin-bottom: 1.2mm; }
  .doc-spec-grid {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 6mm; row-gap: 1.4mm;
    margin-bottom: 3mm;
  }
  .doc-spec-item {
    min-height: 8mm; border-bottom: 1px solid #e0e4ea; padding-bottom: 1mm;
    break-inside: avoid; page-break-inside: avoid;
  }
  .doc-spec-item .spec-label {
    color: #697386; font-size: 7.1pt; line-height: 1.1; text-transform: uppercase; margin-bottom: .7mm;
  }
  .doc-spec-item .spec-value {
    color: #071f4a; font-size: 8.8pt; line-height: 1.18; font-weight: 800;
  }

  .doc-table { width: 100%; border-collapse: collapse; margin-bottom: 4mm; font-size: 9.5pt; }
  .doc-table th { padding: 3mm 2mm; border-bottom: 2px solid #888; text-align: left; color: #666; font-weight: 700; font-size: 9pt; }
  .doc-table td { padding: 2.5mm 2mm; border-bottom: 1px solid #eee; }
  .doc-table tr:last-child td { font-weight: 700; background: #f5f5f5; }

  .doc-callout {
    background: #DEEBF7; border-left: 4px solid var(--brand-primary, #1F4E79);
    padding: 4mm 5mm; margin: 4mm 0; border-radius: 0 4px 4px 0;
  }
  .doc-callout.warn { background: #FFF4D6; }
  .doc-callout .ct-title { font-weight: 700; color: var(--brand-primary, #1F4E79); margin-bottom: 2mm; font-size: 10.5pt; }
  .doc-callout p { font-size: 10pt; margin-bottom: 2mm; }

  .doc-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; margin: 6mm 0; }
  .doc-kpi > div { padding: 5mm 3mm; text-align: center; border-right: 1px solid #ddd; }
  .doc-kpi > div:last-child { border-right: none; }
  .doc-kpi .k-label { font-size: 8pt; color: #666; font-weight: 700; margin-bottom: 2mm; letter-spacing: 0.3px; }
  .doc-kpi .k-value { font-size: 13pt; font-weight: 700; color: var(--brand-primary, #1F4E79); }

  .doc-case { margin-bottom: 4mm; padding-left: 4mm; border-left: 3px solid var(--brand-primary, #1F4E79); }
  .doc-case .case-title { font-weight: 700; color: var(--brand-primary, #1F4E79); font-size: 10.5pt; margin-bottom: 1mm; }
  .doc-case .case-text { font-size: 10pt; }

  /* Брендовые варианты — пресеты */
  .doc-page.brand-style { /* стиль по умолчанию заданы в --brand-* */ }

  /* CTA в шапке */
  .help-card {
    background: linear-gradient(135deg, #1F4E79 0%, #0E2A4A 100%);
    color: #fff; padding: 20px; border-radius: 12px; margin-bottom: 20px;
  }
  .help-card h3 { font-size: 16px; margin-bottom: 6px; }
  .help-card p { font-size: 13px; opacity: 0.9; line-height: 1.5; }

  /* Builder selected stations list */
  .selected-list {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px;
    margin-bottom: 12px;
  }
  .selected-list h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #666; }
  .selected-list .item {
    display: flex; align-items: center; gap: 10px; padding: 6px 0;
    border-bottom: 1px solid #f0f0f0; font-size: 13px;
  }
  .selected-list .item:last-child { border-bottom: none; }
  .selected-list .item img { width: 32px; height: 32px; object-fit: contain; background: #fafafa; border-radius: 4px; }
  .selected-list .item .name { flex: 1; font-weight: 600; }
  .selected-list .item .remove { color: #c00; font-size: 12px; cursor: pointer; padding: 2px 6px; }
</style>
