:root {
    --ink: #2c1d15;
    --ink-soft: #4a3529;
    --muted: #7b6759;
    --muted-2: #9b8575;
    --line: #eee1d4;
    --line-soft: #f6ede4;
    --paper: #fbf7f1;
    --header-bg: rgba(251, 247, 241, .84);
    --card: #ffffff;
    --accent: #c2410c;
    --accent-deep: #7c2d12;
    --accent-soft: #fff1e6;
    --accent-line: #fed7aa;
    --field-bg: #fdfaf6;
    --field-bg-focus: #ffffff;
    --outline: #e4cfbc;
    --focus-border: #f97316;
    --focus-ring: rgba(234, 88, 12, .09);
    --quote-label: color-mix(in srgb, var(--accent-line) 65%, #fff);
    --quote-text: color-mix(in srgb, var(--accent-line) 55%, #fff);
    --quote-muted: color-mix(in srgb, var(--accent-line) 45%, #fff);
    --quote-faint: color-mix(in srgb, var(--accent-line) 35%, #fff);
    --quote-highlight: color-mix(in srgb, var(--accent-line) 75%, #fff);
    --layout-border: #f2dcc7;
    --layout-bg-start: #fff6ec;
    --layout-bg-mid: #fff1e2;
    --layout-bg-end: #fbe3cc;
    --layout-dot: rgba(194, 65, 12, .18);
    --mint: #b9f6d2;
    --mint-deep: #0f8a5f;
    --coral: #ff7a66;
    --amber: #f59e0b;
    --amber-soft: #fff7e6;
    --green-soft: #e9f9f0;
    --radius: 2mm;
    --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
    --shadow: 0 24px 60px -44px rgba(60, 30, 15, .38);
  }

  @font-face {
    font-family: "Futura Jobsheet";
    src: url("fonts/FuturaLT-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
  }
  @font-face {
    font-family: "Futura Jobsheet";
    src: url("fonts/FuturaLT-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    min-width: 320px;
    font-family: var(--font);
    color: var(--ink);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(234, 88, 12, .11), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(251, 146, 60, .075), transparent 60%),
      var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(120, 90, 70, .16) .7px, transparent .7px);
    background-size: 22px 22px;
    opacity: .42;
    mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  }
  body.company-theme-ocean {
    --accent: #0f766e;
    --accent-deep: #115e59;
    --accent-soft: #ecfdf9;
    --accent-line: #99f6e4;
    --paper: #eef9f7;
    --header-bg: rgba(238, 249, 247, .86);
    --field-bg: #f2fbf9;
    --field-bg-focus: #ffffff;
    --line: #cfe8e3;
    --line-soft: #e9f6f3;
    --outline: #bfe3dd;
    --focus-border: #0d9488;
    --focus-ring: rgba(13, 148, 136, .13);
    --layout-border: #c7eae3;
    --layout-bg-start: #f0fdfa;
    --layout-bg-mid: #e6faf5;
    --layout-bg-end: #d6f2ec;
    --layout-dot: rgba(13, 148, 136, .18);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(13, 148, 136, .12), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(45, 212, 191, .07), transparent 60%),
      var(--paper);
  }
  body.company-theme-forest {
    --accent: #3f6212;
    --accent-deep: #365314;
    --accent-soft: #f4f9e8;
    --accent-line: #d9f99d;
    --paper: #f4f9eb;
    --header-bg: rgba(244, 249, 235, .86);
    --field-bg: #f7fbee;
    --field-bg-focus: #ffffff;
    --line: #dbe8c5;
    --line-soft: #f0f7e5;
    --outline: #cfe3b2;
    --focus-border: #65a30d;
    --focus-ring: rgba(101, 163, 13, .14);
    --layout-border: #dcebc2;
    --layout-bg-start: #f7fce9;
    --layout-bg-mid: #edf7d8;
    --layout-bg-end: #e1f0c4;
    --layout-dot: rgba(101, 163, 13, .18);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(101, 163, 13, .12), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(132, 204, 22, .06), transparent 60%),
      var(--paper);
  }
  body.company-theme-plum {
    --accent: #7e22ce;
    --accent-deep: #581c87;
    --accent-soft: #faf5ff;
    --accent-line: #e9d5ff;
    --paper: #faf4ff;
    --header-bg: rgba(250, 244, 255, .86);
    --field-bg: #fbf6ff;
    --field-bg-focus: #ffffff;
    --line: #e6d6f5;
    --line-soft: #f4ecfb;
    --outline: #ddc7f0;
    --focus-border: #9333ea;
    --focus-ring: rgba(147, 51, 234, .13);
    --layout-border: #ead7fb;
    --layout-bg-start: #fbf5ff;
    --layout-bg-mid: #f4e9ff;
    --layout-bg-end: #ead7fb;
    --layout-dot: rgba(147, 51, 234, .16);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(147, 51, 234, .11), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(192, 132, 252, .06), transparent 60%),
      var(--paper);
  }
  body.company-theme-rose {
    --accent: #be123c;
    --accent-deep: #881337;
    --accent-soft: #fff1f5;
    --accent-line: #fecdd3;
    --paper: #fff3f6;
    --header-bg: rgba(255, 243, 246, .86);
    --field-bg: #fff5f8;
    --field-bg-focus: #ffffff;
    --line: #f3d6df;
    --line-soft: #fbeaef;
    --outline: #efc7d3;
    --focus-border: #e11d48;
    --focus-ring: rgba(225, 29, 72, .12);
    --layout-border: #f0cfd9;
    --layout-bg-start: #fff5f8;
    --layout-bg-mid: #ffeaf1;
    --layout-bg-end: #fbd5e1;
    --layout-dot: rgba(190, 18, 60, .15);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(225, 29, 72, .11), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(251, 113, 133, .07), transparent 60%),
      var(--paper);
  }
  body.company-theme-indigo {
    --accent: #4338ca;
    --accent-deep: #312e81;
    --accent-soft: #eef2ff;
    --accent-line: #c7d2fe;
    --paper: #f4f6ff;
    --header-bg: rgba(244, 246, 255, .86);
    --field-bg: #f6f7ff;
    --field-bg-focus: #ffffff;
    --line: #dfe3fb;
    --line-soft: #eef0fd;
    --outline: #cfd5f5;
    --focus-border: #4f46e5;
    --focus-ring: rgba(79, 70, 229, .13);
    --layout-border: #d9def8;
    --layout-bg-start: #f7f8ff;
    --layout-bg-mid: #eef2ff;
    --layout-bg-end: #dfe5fb;
    --layout-dot: rgba(67, 56, 202, .15);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(79, 70, 229, .11), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(129, 140, 248, .07), transparent 60%),
      var(--paper);
  }
  body.company-theme-amber {
    --accent: #b45309;
    --accent-deep: #78350f;
    --accent-soft: #fffbeb;
    --accent-line: #fde68a;
    --paper: #fffaf0;
    --header-bg: rgba(255, 250, 240, .86);
    --field-bg: #fffbf2;
    --field-bg-focus: #ffffff;
    --line: #f3e3c8;
    --line-soft: #fbf3e3;
    --outline: #ecd6b3;
    --focus-border: #d97706;
    --focus-ring: rgba(217, 119, 6, .13);
    --layout-border: #eedcbe;
    --layout-bg-start: #fffbf2;
    --layout-bg-mid: #fff5df;
    --layout-bg-end: #f9e8c9;
    --layout-dot: rgba(180, 83, 9, .15);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(217, 119, 6, .11), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(251, 191, 36, .07), transparent 60%),
      var(--paper);
  }
  body.company-theme-graphite {
    --accent: #334155;
    --accent-deep: #1e293b;
    --accent-soft: #f1f5f9;
    --accent-line: #cbd5e1;
    --paper: #f5f7fa;
    --header-bg: rgba(245, 247, 250, .86);
    --field-bg: #f7f9fb;
    --field-bg-focus: #ffffff;
    --line: #dbe2ea;
    --line-soft: #eef2f6;
    --outline: #cbd5e1;
    --focus-border: #475569;
    --focus-ring: rgba(71, 85, 105, .13);
    --layout-border: #d6dee7;
    --layout-bg-start: #f8fafc;
    --layout-bg-mid: #eef2f6;
    --layout-bg-end: #dfe6ee;
    --layout-dot: rgba(51, 65, 85, .16);
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(71, 85, 105, .10), transparent 62%),
      radial-gradient(760px 430px at 2% 2%, rgba(148, 163, 184, .07), transparent 60%),
      var(--paper);
  }
  body.modal-open { overflow: hidden; }
  button, input, select { font: inherit; }
  button { cursor: pointer; }
  svg { display: block; }
  .icon { width: 16px; height: 16px; flex: 0 0 auto; }
  :focus-visible { outline: 2px solid var(--focus-border); outline-offset: 3px; }
  .quote-card :focus-visible { outline-color: var(--mint); }
  ::selection { background: #fed7aa; color: #4a2412; }

  .wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

  /* ---------- Header ---------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(238, 225, 212, .8);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .header-left { display:flex; align-items:center; gap:16px; min-width:0; }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
  }
  .brand-logo {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: 50px;
    max-width: 190px;
    object-fit: contain;
  }
  .brand-logo-company { height: 44px; }
  .brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 2mm;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--ink);
    box-shadow: none;
    transform: rotate(-4deg);
  }
  .brand-mark .icon { width: 21px; height: 21px; }
  .brand-copy { display: flex; flex-direction: column; width: max-content; max-width: 100%; line-height: 1; min-width: 0; }
  .brand-copy strong { font-family: var(--display); font-size: 16px; font-weight: 680; letter-spacing: -.025em; white-space: nowrap; }
  .brand-tagline { display: flex; justify-content: space-between; gap: 4px; width: 100%; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
  .brand-version { margin-top: 4px; color: var(--muted-2); font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
  .header-actions { display: flex; align-items: center; gap: 8px; }
  .language-select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 104px;
    padding: 8px 23px 8px 9px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background-color: #fffdfa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1.5 5 5.5 9 1.5' fill='none' stroke='%239b8575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
  }
  .language-select:hover { border-color: var(--outline); background-color: var(--field-bg-focus); }
  .language-select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .company-logo {
    display: block;
    width: auto;
    max-width: 92px;
    height: 34px;
    object-fit: contain;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fff;
  }
  .company-logo[hidden] { display: none; }
  .header-note { margin-right: 6px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 2mm;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    color: var(--ink);
    background: transparent;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
  }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0) scale(.985); }
  .btn-ghost { background: rgba(255,255,255,.62); border-color: var(--line); }
  .btn-ghost:hover { background: #fff; border-color: var(--outline); box-shadow: 0 6px 16px -12px rgba(60, 30, 15,.4); }
  .btn-primary { background: var(--accent); color: #fff; }
  .btn-primary:hover { background: var(--accent-deep); }
  .btn-light { background: #fff; color: #4a2412; box-shadow: 0 10px 22px -14px rgba(0,0,0,.5); }
  .btn-light:hover { background: #fff7ee; }
  .btn-glass { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.17); color: #fff; }
  .btn-glass:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.26); }
  .icon-only { width: 40px; height: 40px; padding: 0; }

  /* ---------- Hero ---------- */
  .hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px;
    padding: 50px 0 30px;
  }
  .hero-copy { min-width: 0; }
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2mm;
    background: var(--accent);
    transform: rotate(45deg);
  }
  .hero h1 {
    max-width: 780px;
    margin: 15px 0 16px;
    font-family: var(--display);
    font-size: clamp(38px, 5.2vw, 66px);
    line-height: .96;
    letter-spacing: -.048em;
    font-weight: 720;
  }
  .hero h1 em {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    letter-spacing: -.035em;
    color: var(--accent);
  }
  .lede {
    max-width: 650px;
    margin: 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
  }
  .hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-bottom: 5px; flex: 0 0 auto; }
  .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(238, 225, 212,.9);
    border-radius: 2mm;
    background: rgba(255,255,255,.56);
    font-size: 10.5px;
    font-weight: 650;
    color: var(--muted);
    white-space: nowrap;
  }
  .status-chip .icon { width: 13px; height: 13px; color: var(--accent); }
  .status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.13);
  }

  /* ---------- Layout ---------- */
  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(360px, .88fr);
    gap: 20px;
    align-items: start;
  }
  .lower-grid {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
  }
  .card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 2mm;
    padding: 26px;
    box-shadow: var(--shadow);
  }
  .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
  .section-kicker {
    margin: 0 0 7px;
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .19em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .card h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 22px;
    line-height: 1.12;
    letter-spacing: -.03em;
    font-weight: 680;
  }
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .025em;
    white-space: nowrap;
  }
  .hint { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }

  /* ---------- Spec form ---------- */
  .spec-block { padding: 20px 0; border-top: 1px solid var(--line-soft); }
  .spec-block:first-of-type { border-top: 0; padding-top: 0; }
  .spec-block:last-of-type { padding-bottom: 4px; }
  .block-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
  .block-head h3 {
    margin: 0;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .mini-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1.5 5 5.5 9 1.5' fill='none' stroke='%239b8575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    border-radius: 2mm;
    padding: 6px 26px 6px 9px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 650;
    max-width: 170px;
  }

  .size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .size-field {
    min-width: 0;
    padding: 9px 11px 10px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  }
  .size-field:focus-within { border-color: var(--focus-border); background: #fff; box-shadow: var(--focus-ring); }
  .size-field.is-locked { background: var(--field-bg); border-color: var(--line); }
  .size-field.is-locked .dim-line { opacity: .58; }
  .size-field.is-locked .dim-line input { color: var(--accent-deep); -webkit-text-fill-color: var(--accent-deep); }
  .size-label {
    display: block;
    margin-bottom: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-deep);
  }
  .dim-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
  .dim-line input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--display);
    font-size: 20px;
    font-weight: 680;
    line-height: 1.3;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
  }
  .dim-line input:focus { outline: 0; }
  .dim-line .x { color: var(--accent-line); font-size: 12px; margin-top: 1px; }
  .dim-line .unit { color: var(--muted-2); font-size: 9.5px; font-weight: 650; margin-top: 4px; }
  .select-wrap select:disabled { opacity: .55; cursor: not-allowed; }
  .field.is-locked .field-label { color: var(--muted-2); }
  .large-format-material-hint { margin: 8px 0 0; }


  .chips { display: flex; flex-wrap: wrap; gap: 5px; }
  .sticker-chips { margin-top: 7px; }
  .chip {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 2mm;
    padding: 4px 8px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 650;
    line-height: 1.3;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
  }
  .chip:hover { border-color: #fdba74; color: var(--accent); }
  .chip.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

  .qty-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .qty-stepper {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    transition: border-color .18s ease, box-shadow .18s ease;
  }
  .qty-stepper:focus-within { border-color: var(--focus-border); background: #fff; box-shadow: var(--focus-ring); }
  .qty-stepper button {
    width: 34px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 2mm;
    background: transparent;
    color: var(--muted);
    font-size: 19px;
    font-weight: 500;
    transition: background .16s ease, color .16s ease;
  }
  .qty-stepper button:hover { background: #ffedd5; color: var(--accent); }
  .qty-stepper input {
    width: 72px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
    color: var(--ink);
    font-family: var(--display);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
  }
  .qty-stepper input:focus { outline: 0; }
  .qty-unit { margin-right: 4px; color: var(--muted-2); font-size: 9.5px; font-weight: 650; }
  .qty-chips { gap: 6px; }
  .qty-chips .chip { padding: 6px 10px; font-size: 10.5px; }

  .field { min-width: 0; }
  .field-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .optional-tag {
    margin-left: 4px;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: none;
  }
  .select-wrap { position: relative; }
  .select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 11px 36px 11px 12px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  }
  .select-wrap select:hover { border-color: var(--outline); }
  .select-wrap select:focus { outline: 0; border-color: var(--focus-border); background: #fff; box-shadow: var(--focus-ring); }
  .select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #9b8575;
    border-bottom: 1.5px solid #9b8575;
    transform: translateY(-67%) rotate(45deg);
    pointer-events: none;
  }
  .fixed-field {
    display: flex;
    align-items: center;
    min-height: 41px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: var(--field-bg);
    color: var(--accent-deep);
    font-size: 13px;
    font-weight: 600;
  }
  .print-method-field {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent-deep);
  }
  .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .finish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
  .select-wrap option:disabled { color: #b9a99a; }
  .finishing-hint {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
  }
  .finishing-hint[hidden] { display: none; }
  .finishing-hint::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--muted-2);
  }

  .media-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    padding: 9px 11px;
    border: 1px dashed #ecd9c7;
    border-radius: 2mm;
    background: #fffdfa;
  }
  .media-swatch {
    position: relative;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(60, 30, 15,.07);
    border-radius: 2mm;
    background: #f1d9b5;
  }
  .media-swatch::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255,255,255,.72), transparent 55%);
  }
  .media-info { flex: 1; min-width: 0; }
  .media-info strong { display: block; font-size: 13px; line-height: 1.25; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .media-info span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.3; }
  .media-code {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 2mm;
    background: #ffedd5;
    color: #9a3412;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    font-weight: 700;
  }
  .media-warning {
    flex: 0 0 auto;
    max-width: 130px;
    padding: 3px 6px;
    border: 1px solid #f5d9a8;
    border-radius: 2mm;
    background: var(--amber-soft);
    color: #9a6508;
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
  }

  .advanced { margin-top: 17px; border: 1px solid var(--line); border-radius: 2mm; background: #fdfaf6; }
  .advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    list-style: none;
    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
  }
  .advanced summary::-webkit-details-marker { display: none; }
  .summary-left { display: flex; align-items: center; gap: 8px; }
  .summary-left .icon { width: 14px; height: 14px; color: var(--accent); }
  .summary-hint { padding: 2px 6px; border-radius: 2mm; background: #f5ebe1; color: var(--muted); font-size: 9px; font-weight: 700; }
  .advanced .chev { width: 13px; height: 13px; color: var(--muted-2); transition: transform .2s ease; }
  .advanced[open] .chev { transform: rotate(180deg); }
  .advanced-body { padding: 0 13px 13px; border-top: 1px dashed #f1e4d8; }
  .advanced-note { margin: 10px 0 11px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
  .advanced-note strong { color: var(--ink-soft); }
  .extras-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
  .extra-field label { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .money-field {
    display: flex;
    align-items: center;
    padding: 0 7px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fff;
  }
  .money-field span { color: var(--muted-2); font-size: 10px; }
  .money-field input { width: 100%; min-width: 0; padding: 7px 2px; border: 0; background: transparent; text-align: right; color: var(--ink); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
  .money-field input:focus { outline: 0; }
  .money-field:focus-within { border-color: var(--focus-border); box-shadow: var(--focus-ring); }

  /* ---------- Quote card ---------- */
  .quote-card {
    position: sticky;
    top: 86px;
    z-index: 2;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 2mm;
    color: #fff;
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(251, 146, 60,.4), transparent 66%),
      linear-gradient(158deg, #2a140b 0%, #7c2d12 47%, #c2410c 100%);
    box-shadow: 0 34px 80px -44px rgba(60, 30, 15, .82);
  }
  body.company-theme-ocean .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(45, 212, 191, .38), transparent 66%),
      linear-gradient(158deg, #082f2b 0%, #115e59 47%, #0f766e 100%);
  }
  body.company-theme-forest .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(163, 230, 53, .35), transparent 66%),
      linear-gradient(158deg, #1a2e05 0%, #365314 47%, #4d7c0f 100%);
  }
  body.company-theme-plum .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(216, 180, 254, .38), transparent 66%),
      linear-gradient(158deg, #2e1065 0%, #581c87 47%, #7e22ce 100%);
  }
  body.company-theme-rose .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(253, 164, 175, .38), transparent 66%),
      linear-gradient(158deg, #4c0519 0%, #881337 47%, #be123c 100%);
  }
  body.company-theme-indigo .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(165, 180, 252, .38), transparent 66%),
      linear-gradient(158deg, #1e1b4b 0%, #312e81 47%, #4338ca 100%);
  }
  body.company-theme-amber .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(252, 211, 77, .38), transparent 66%),
      linear-gradient(158deg, #451a03 0%, #78350f 47%, #b45309 100%);
  }
  body.company-theme-graphite .quote-card {
    background:
      radial-gradient(520px 330px at 112% -12%, rgba(148, 163, 184, .3), transparent 66%),
      linear-gradient(158deg, #0f172a 0%, #1e293b 47%, #475569 100%);
  }
  .quote-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .34;
    background-image: radial-gradient(rgba(255,255,255,.16) .8px, transparent .8px);
    background-size: 13px 13px;
    mask-image: linear-gradient(118deg, transparent 38%, #000 100%);
  }
  .quote-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -140px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 146, 60,.25), transparent 66%);
    pointer-events: none;
  }
  .quote-card > * { position: relative; z-index: 1; }
  .quote-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
  .quote-label { color: var(--quote-label); font-size: 9.5px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
  .live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(185,246,210,.2);
    border-radius: 2mm;
    background: rgba(185,246,210,.1);
    color: var(--quote-highlight);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .live-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--quote-highlight); box-shadow: 0 0 0 3px rgba(255,255,255,.12); animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 4px;
    margin-bottom: 23px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 2mm;
    background: rgba(255,255,255,.065);
  }
  .mode-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 5px;
    border: 0;
    border-radius: 2mm;
    background: transparent;
    color: var(--quote-text);
    font-size: 11.5px;
    font-weight: 650;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  }
  .mode-tab small { color: var(--quote-highlight); font-size: 8.5px; font-weight: 650; letter-spacing: .02em; }
  .mode-tab:hover:not(.active) { background: rgba(255,255,255,.06); color: #fff; }
  .mode-tab.active { background: var(--accent-soft); color: var(--accent-deep); box-shadow: 0 8px 18px -10px rgba(0,0,0,.55); }
  .mode-tab.active small { color: var(--accent); }

  .total-caption { margin: 0 0 5px; color: var(--quote-label); font-size: 11.5px; font-weight: 500; }
  .total-value {
    margin: 0;
    color: #fff;
    font-family: var(--display);
    font-size: clamp(45px, 5.1vw, 60px);
    font-weight: 720;
    line-height: 1;
    letter-spacing: -.05em;
    font-variant-numeric: tabular-nums;
    transition: opacity .15s ease;
  }
  .total-value.is-empty {
    font-size: 34px;
    letter-spacing: .04em;
    opacity: .55;
  }
  .per-sticker { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 11px 0 5px; color: var(--quote-text); font-size: 11.5px; }
  .per-sticker strong { color: var(--quote-highlight); font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .per-sticker .per-note { color: var(--quote-muted); }
  .per-sticker .per-note::before { content: "·"; margin-right: 6px; color: var(--quote-faint); }
  .list-line { min-height: 17px; margin: 0; color: var(--quote-muted); font-size: 10.5px; }
  .list-line .save { color: var(--quote-highlight); font-weight: 650; }

  .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 21px 0 18px; }
  .stat {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 2mm;
    background: rgba(255,255,255,.055);
  }
  .stat span { display: block; margin-bottom: 4px; color: var(--quote-label); font-size: 8.5px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
  .stat strong { display: block; color: #fff; font-family: var(--display); font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
  .stat strong.positive { color: var(--quote-highlight); }
  .stat small { display: block; margin-top: 3px; overflow: hidden; color: var(--quote-muted); font-size: 9.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  .quote-notes-label {
    display: block;
    margin: 14px 0 4px;
    color: var(--quote-label);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .quote-notes {
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 2mm;
    background: rgba(255,255,255,.08) !important;
    color: var(--quote-text) !important;
    font: inherit;
    font-size: 10.5px;
    line-height: 1.4;
    resize: vertical;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }
  .quote-notes:focus {
    outline: 0;
    border-color: var(--focus-border) !important;
    background: #fff7ed !important;
    color: #2c1d15 !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-border) 18%, transparent);
  }
  .quote-notes:focus::placeholder { color: #8a6550 !important; }
  .quote-notes::placeholder { color: var(--quote-faint) !important; }
  .quote-actions { display: grid; grid-template-columns: 1.12fr .88fr; gap: 7px; }
  .quote-actions .btn { padding: 11px 8px; border-radius: 2mm; font-size: 11.5px; }
  .quote-actions .icon { width: 15px; height: 15px; }
  .jobsheet-button { width: 100%; margin-top: 7px; }
  .dashboard-backdrop { align-items: stretch; justify-content: stretch; padding: 0; background: #e9edf1; }
  .dashboard-shell { width: 100%; min-height: 100vh; background: #eef1f4; overflow: auto; }
  .dashboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 30px 18px;
    border-bottom: 1px solid #d8dee5;
    background: #fff;
  }
  .dashboard-head h2 { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -.03em; }
  .dashboard-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
  .dashboard-head-actions { display: flex; align-items: center; gap: 8px; }
  .dashboard-scroll { padding: 24px 30px 50px; }
  .dash-section { margin-bottom: 26px; }
  .dash-section h3 { margin: 0 0 11px; color: #28323d; font-size: 12px; font-weight: 650; letter-spacing: .01em; }
  .dash-section h3 span { margin-left: 6px; color: #7a8794; font-weight: 500; }
  .dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .dash-card {
    overflow: hidden;
    border: 1px solid #d8dee5;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(23, 37, 51, .05);
    cursor: pointer;
  }
  .dash-card:hover { border-color: #9aa7b4; box-shadow: 0 3px 10px rgba(23, 37, 51, .12); }
  .dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: #fff; }
  .dash-card-head strong { font-size: 10.5px; font-weight: 750; letter-spacing: .01em; }
  .dash-card-head span { font-size: 9px; opacity: .9; white-space: nowrap; }
  .dash-card-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 10px; }
  .dash-card-copy { min-width: 0; }
  .dash-card-copy strong { display: block; overflow: hidden; color: #28323d; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .dash-card-copy span { display: block; margin-top: 4px; color: #6c7a87; font-size: 9px; line-height: 1.3; }
  .dash-qr { width: 62px; height: 62px; flex: 0 0 auto; padding: 2px; border: 1px solid #e0e5ea; background: #fff; object-fit: contain; }
  .dash-status { display: inline-block; margin-top: 6px; padding: 3px 6px; border-radius: 2px; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
  .dash-status.processing { background: #fff1e5; color: #b84a12; }
  .dash-status.complete { background: #e2f6e9; color: #08753a; }
  .dash-status.pending { background: #edf0f3; color: #667482; }
  .dash-status.not-scanned { background: #f4f0e8; color: #7d6b57; }
  .dash-empty { padding: 30px; border: 1px dashed #c9d2db; color: #7a8794; font-size: 11px; text-align: center; }
  .dash-today { background: #ef6b5b; }
  .dash-tomorrow { background: #f08a4b; }
  .dash-two { background: #f4b63f; }
  .dash-three { background: #b8c844; }
  .dash-new { background: #4bc59b; }
  .dash-later { background: #7b8794; }
  .jobsheet-head-actions { display: flex; align-items: center; gap: 8px; }
  .jobsheet-head-actions .btn { padding: 8px 11px; font-size: 11px; }
  .jobsheet-history-modal { width: min(1100px, 100%); }
  .jobsheet-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
  .jobsheet-history-toolbar > span { color: var(--muted); font-size: 11px; font-weight: 650; }
  .jobsheet-history-toolbar .btn { padding: 7px 10px; font-size: 10.5px; }
  .jobsheet-history-bulk { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; padding:8px 10px; border:1px solid var(--line); border-radius:2mm; background:var(--field-bg); }
  .jobsheet-history-select-all { display:flex; align-items:center; gap:6px; color:var(--ink); font-size:10px; font-weight:650; }
  .jobsheet-history-select-all input, .jobsheet-history-checkbox { width:14px; height:14px; accent-color:var(--accent); cursor:pointer; }
  #jobsheetHistorySelected { margin-right:auto; color:var(--muted); font-size:10px; }
  .jobsheet-history-bulk .btn { padding:6px 9px; font-size:10px; }
  .jobsheet-history-table-wrap {
    overflow: auto;
    max-height: 56vh;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fff;
  }
  .jobsheet-history-table { width: 100%; min-width: 800px; border-collapse: collapse; font-size: 11px; }
  .jobsheet-history-check, .jobsheet-history-check-head { width: 30px; text-align: center; }
  .jobsheet-history-job { color: var(--accent); font-weight: 750; text-decoration: none; }
  .jobsheet-history-job:hover { text-decoration: underline; }
  .jobsheet-history-view { margin-right: 6px; color: var(--ink); font-size: 9px; font-weight: 650; text-decoration: underline; }
  .jobsheet-history-edit { margin-right: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 2px; background: var(--field-bg); color: var(--accent); font-size: 9px; font-weight: 700; cursor: pointer; }
  .jobsheet-history-status { display: inline-block; padding: 3px 6px; border-radius: 2px; font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
  .jobsheet-history-status.processing { background: #fff1e5; color: #b84a12; }
  .jobsheet-history-status.complete { background: #e9f9f0; color: #0f8a5f; }
  .jobsheet-history-status.pending { background: #f3ece3; color: #7b6759; }
  .jobsheet-history-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: #f8f2ea;
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
  }
  .jobsheet-history-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
  .jobsheet-history-table tbody tr:last-child td { border-bottom: 0; }
  .jobsheet-history-row { cursor: default; }
  .jobsheet-history-row:hover { background: #fff8f0; }
  .jobsheet-history-row.is-selected { background: #fff1e4; }
  .jobsheet-history-open {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 750;
    text-align: left;
  }
  .jobsheet-history-open:hover { text-decoration: underline; }
  .jobsheet-history-actions { text-align: right; white-space: nowrap; }
  .jobsheet-history-actions-head { text-align: right !important; }
  .jobsheet-history-delete {
    padding: 4px 7px;
    border: 1px solid #f0c7c2;
    border-radius: 1.5mm;
    background: #fff7f6;
    color: #b42318;
    font-size: 9px;
    font-weight: 650;
  }
  .jobsheet-history-delete:hover { background: #fee4e2; border-color: #e9a7a0; }
  .jobsheet-history-empty { padding: 24px !important; color: var(--muted) !important; text-align: center; }
  .jobsheet-foot-actions { display: flex; align-items: center; gap: 8px; }
  .jobsheet-summary {
    margin-bottom: 14px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: var(--field-bg);
  }
  .jobsheet-summary span { display: block; color: var(--accent); font-size: 8.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
  .jobsheet-summary strong { display: block; margin-top: 3px; color: var(--ink); font-family: var(--display); font-size: 24px; line-height: 1.1; }
  .jobsheet-summary p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
  .jobsheet-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobsheet-artwork-field { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:12px; padding:10px 11px; border:1px solid var(--line); border-radius:2mm; background:var(--field-bg); transition:border-color .15s ease, background-color .15s ease; }
  .jobsheet-artwork-field.is-dragover { border-color:var(--accent); background:#fff7ed; box-shadow:0 0 0 3px var(--focus-ring); }
  .jobsheet-artwork-copy { min-width:0; }
  .jobsheet-artwork-copy span { display:block; color:var(--muted); font-size:8px; font-weight:750; letter-spacing:.1em; text-transform:uppercase; }
  .jobsheet-artwork-copy strong { display:block; margin-top:3px; overflow:hidden; color:var(--ink); font-size:10.5px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
  .jobsheet-artwork-hint { display:block; margin-top:3px; color:var(--muted); font-size:8.5px; }
  .jobsheet-artwork-actions { display:flex; align-items:center; gap:6px; }
  .jobsheet-artwork-actions .btn { padding:7px 9px; font-size:10px; }
  .jobsheet-artwork-thumb { flex:0 0 100%; display:flex; align-items:center; gap:8px; padding-top:8px; border-top:1px solid var(--line); }
  .jobsheet-artwork-thumb img { width:64px; height:48px; border:1px solid var(--line); border-radius:1.5mm; background:#fff; object-fit:contain; }
  .jobsheet-notes-field { margin-top: 12px; }
  .jobsheet-notes-field textarea { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
  .jobsheet-notes-field textarea:focus {
    outline: 0;
    background: #fff7ed !important;
    color: #2c1d15 !important;
    border-color: var(--focus-border) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-border) 18%, transparent);
  }
  .artwork-preview {
    display: grid;
    place-items: center;
    min-height: 230px;
    max-height: 58vh;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: var(--field-bg);
    text-align: center;
  }
  .artwork-preview p { margin: 0; color: var(--muted); font-size: 12px; }
  .artwork-preview.is-dragover { border-color: var(--focus-border); background: var(--accent-soft); }
  .artwork-preview.is-dragover p { color: var(--accent-deep); font-weight: 700; }
  .artwork-preview img { display: block; max-width: 100%; max-height: 46vh; margin: 0 auto 8px; object-fit: contain; }
  .artwork-preview strong { display: block; color: var(--ink); font-size: 11px; overflow-wrap: anywhere; }
  .artwork-preview span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
  .artwork-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 7px; width: 100%; }
  .artwork-pages figure { position: relative; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 1.5mm; background: #fff; }
  .artwork-pages img { width: 100%; height: auto; max-height: none; margin: 0; }
  .artwork-pages figcaption { margin-top: 2px; color: var(--muted); font-size: 9px; text-align: center; }
  .artwork-file-meta { margin-top: 9px; }
  .artwork-actions { display: flex; gap: 8px; margin-top: 12px; }
  .artwork-button { margin-top: 5px; }
  @media (max-width: 560px) {
    .jobsheet-form-grid { grid-template-columns: 1fr; }
  }
  .quote-note { margin: 11px 0 0; color: var(--quote-text); font-size: 8.5px; line-height: 1.45; text-align: center; }
  .quote-warning {
    display: flex;
    gap: 7px;
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(255,183,77,.26);
    border-radius: 2mm;
    background: rgba(255,183,77,.1);
    color: #ffe0b2;
    font-size: 10px;
    line-height: 1.45;
  }
  .quote-warning[hidden] { display: none; }
  .quote-warning .icon { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; color: #ffc46b; }
  .quote-warning p { margin: 0; }
  .quote-warning p + p { margin-top: 4px; }
  .quote-warning button { padding: 0; border: 0; background: none; color: #ffd89a; font: inherit; text-decoration: underline; text-underline-offset: 2px; }

  /* ---------- Layout preview ---------- */
  .layout-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 386px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--layout-border);
    border-radius: 2mm;
    background:
      radial-gradient(circle at 50% 42%, var(--layout-bg-start) 0%, var(--layout-bg-mid) 72%, var(--layout-bg-end) 100%);
  }
  .layout-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .35;
    background-image: radial-gradient(var(--layout-dot) .8px, transparent .8px);
    background-size: 15px 15px;
    mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 70%);
  }
  .layout-svg { position: relative; z-index: 1; width: 100%; height: 100%; }
  .layout-empty { position: relative; z-index: 1; max-width: 250px; text-align: center; color: var(--muted); }
  .layout-empty .icon { width: 26px; height: 26px; margin: 0 auto 9px; color: var(--accent); }
  .layout-empty strong { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 13px; }
  .layout-empty span { font-size: 11px; line-height: 1.45; }
  .layout-caption { margin-top: 12px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .layout-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
  .layout-stat { padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 2mm; background: var(--field-bg); }
  .layout-stat strong { display: block; font-family: var(--display); font-size: 16px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .layout-stat span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }

  /* ---------- Breakdown ---------- */
  .table-wrap { overflow-x: auto; }
  .price-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .price-table th {
    padding: 0 0 9px;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
  }
  .price-table th:first-child { text-align: left; }
  .price-table td { padding: 9px 0; border-top: 1px solid var(--line-soft); vertical-align: middle; }
  .breakdown-card .price-table td:first-child strong { display: block; }
  .breakdown-card .price-table td:first-child small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
  .price-table td:nth-child(2), .price-table td:nth-child(3) { padding-left: 12px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .item-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .item-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 2mm; background: var(--accent); }
  .item-text { min-width: 0; }
  .item-text strong { display: block; color: var(--ink); font-size: 12.5px; font-weight: 650; line-height: 1.3; }
  .item-text small { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9.5px; line-height: 1.3; }
  .rate-cell { color: #6b5546; font-size: 11.5px; }
  .extended-cell { color: var(--ink); font-weight: 650; }
  .price-table tfoot td { padding: 8px 0; border-top: 1px solid #f1e4d8; color: #7a6454; font-size: 11.5px; }
  .price-table tfoot td:nth-child(2), .price-table tfoot td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .price-table tfoot .discount-row td { color: var(--mint-deep); font-weight: 600; }
  .price-table tfoot .extras-head td { padding: 10px 0 3px; border-top: 1px solid #f1e4d8; color: var(--muted-2); font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
  .price-table tfoot .extras-row td { color: var(--muted); }
  .price-table tfoot .extras-row td:last-child { color: var(--ink-soft); font-weight: 650; }
  .price-table tfoot .grand-row td { padding-top: 12px; border-top: 1px solid var(--ink); color: var(--ink); font-size: 13px; font-weight: 700; }
  .price-table tfoot .grand-row .extended-cell { font-family: var(--display); font-size: 17px; letter-spacing: -.02em; }
  .fineprint { margin: 14px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.5; }

  /* ---------- Discount tiers ---------- */
  .discounts-card { margin-top: 20px; }
  .discount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
  .tier-col { padding: 15px; border: 1px solid var(--line); border-radius: 2mm; background: #fdfaf6; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
  .tier-col.is-active { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--field-bg-focus)); box-shadow: inset 0 0 0 1px var(--focus-ring); }
  .tier-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
  .tier-badge { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 2mm; background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-size: 12px; font-weight: 800; }
  .tier-col.is-active .tier-badge { background: var(--accent); color: #fff; }
  .tier-head strong { display: block; font-size: 13px; line-height: 1.2; }
  .tier-head small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; }
  .tier-rate { margin-left: auto; color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 720; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
  .tier-rows { display: flex; flex-direction: column; gap: 3px; }
  .tier-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 18px;
    border-radius: 2mm;
    color: var(--ink-soft);
    font-size: 10.5px;
    font-weight: 600;
  }
  .tier-row::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--line);
    transform: translateY(-50%);
  }
  .tier-row.passed { color: var(--muted-2); }
  .tier-row.passed::before { background: var(--line); }
  .tier-row.applied { background: var(--accent-soft); color: var(--accent-deep); }
  .tier-row.applied::before { background: var(--accent); }
  .tier-row.applied span:last-child { font-weight: 750; }
  .tier-row span:last-child { text-align: right; }
  .tier-row.active { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); color: #fff; box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); }
  .tier-row.active::before { background: var(--quote-highlight); box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
  .tier-row.active span:last-child { color: var(--quote-highlight); font-weight: 700; }
  .tier-next { margin-top: 9px; padding: 6px 8px; border-radius: 2mm; background: var(--accent-soft); color: var(--accent-deep); font-size: 9.5px; font-weight: 650; line-height: 1.35; }
  .tier-next.is-max { background: var(--field-bg); color: var(--accent-deep); }
  .tier-empty { padding: 8px; color: var(--muted-2); font-size: 10px; }

  /* ---------- Footer ---------- */
  .site-footer { padding: 38px 0 46px; }
  .footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding-top: 22px; border-top: 1px solid rgba(238, 225, 212,.9); }
  .footer-brand { display: flex; align-items: center; gap: 9px; justify-self: start; color: var(--ink-soft); font-size: 11.5px; font-weight: 700; }
  .brand-logo-footer { height: 34px; max-width: 170px; object-fit: contain; }
  .brand-mark.small { width: 27px; height: 27px; border-radius: 2mm; box-shadow: none; }
  .brand-mark.small .icon { width: 14px; height: 14px; }
  .footer-inner p { margin: 0; justify-self: center; color: var(--muted-2); font-size: 10px; text-align: center; }
  .link-btn { padding: 0; border: 0; background: none; color: var(--accent); font-size: 10.5px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

  /* ---------- Back to top ---------- */
  .back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--ink);
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease, background .18s ease;
  }
  .back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .back-to-top:hover { background: #9a3412; }
  .back-to-top:active { transform: translateY(1px); }
  .back-to-top .icon { width: 20px; height: 20px; }

  /* ---------- Price book modal ---------- */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(35, 18, 9, .56);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  .modal-backdrop[hidden] { display: none; }
  .modal {
    display: flex;
    flex-direction: column;
    width: min(1120px, 100%);
    max-height: 88vh;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 2mm;
    background: #fff;
    box-shadow: 0 44px 110px -24px rgba(35, 18, 9, .55);
    isolation: isolate;
    animation: modal-in .2s ease both;
  }
  @keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
  .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 21px 24px 14px; background: #fff; }
  .modal-head h2 { font-family: var(--display); font-size: 22px; font-weight: 690; letter-spacing: -.03em; margin: 0; }
  .modal-head p:last-child { max-width: 560px; margin: 7px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
  .modal-close { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 2mm; background: #fdfaf6; color: var(--muted); }
  .modal-close:hover { background: #fff1e6; color: var(--accent); border-color: #fed7aa; }
  .modal-close .icon { width: 16px; height: 16px; }
  .users-modal { width: min(840px, 100%); }
  .users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .tab-access-panel {
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
  }
  .tab-access-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
  .tab-access-head h3 { margin: 2px 0 4px; font-size: 17px; letter-spacing: -.02em; }
  .tab-access-head p:not(.section-kicker) { margin: 0; max-width: 560px; color: var(--muted); font-size: 11px; line-height: 1.5; }
  .tab-access-target { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
  .tab-access-target label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 650; }
  .tab-access-target select {
    min-width: 200px;
    padding: 7px 9px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
  }
  .tab-access-target input { width: 15px; height: 15px; accent-color: var(--accent); }
  .tab-access-rows { display: grid; gap: 6px; }
  .tab-access-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 100px 100px;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: #fff;
  }
  .tab-access-row > span { color: var(--ink-soft); font-size: 11px; font-weight: 650; }
  .tab-access-row label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 650; }
  .tab-access-row input { width: 15px; height: 15px; accent-color: var(--accent); }
  .tab-access-panel[hidden] { display: none; }
  .users-search { flex: 1; max-width: 390px; }
  .users-search input { width: 100%; }
  .users-list { overflow-x: auto; }
  .users-table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .users-table th { padding: 0 8px 8px; color: var(--muted-2); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
  .users-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
  .users-table tr:last-child td { border-bottom: 0; }
  .users-person strong { display: block; color: var(--ink); font-size: 11.5px; font-weight: 700; }
  .users-person small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
  .users-role { display: inline-flex; padding: 3px 7px; border: 1px solid var(--accent-line); border-radius: 2mm; background: var(--accent-soft); color: var(--accent-deep); font-size: 8.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
  .users-status { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 650; }
  .users-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint-deep); }
  .users-status.is-off::before { background: #b91c1c; }
  .users-actions { display: flex; gap: 5px; justify-content: flex-end; }
  .users-actions .btn { padding: 5px 8px; font-size: 9px; }
  .users-form { display: grid; gap: 10px; max-width: 620px; }
  .users-form[hidden] { display: none; }
  .users-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .users-form-head h3 { margin: 2px 0 0; font-size: 17px; letter-spacing: -.02em; }
  .users-form-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 4px; }
  .user-active { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
  .user-active input { width: 16px; height: 16px; accent-color: var(--accent); }
  .users-foot-note { margin-right: auto; color: var(--muted-2); font-size: 9px; }
  .modal-tabs { display: flex; flex: 0 0 auto; gap: 3px; min-height: 39px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
  .modal-tab { flex: 0 0 auto; white-space: nowrap; }
  .modal-tab { padding: 9px 10px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 11px; font-weight: 700; }
  .modal-tab:hover { color: var(--accent); }
  .modal-tab.active { color: var(--accent); border-color: var(--accent); }
  .modal-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 24px 18px; background: #fff; }
  .pb-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .pb-search { position: relative; flex: 1; max-width: 330px; }
  .pb-search[hidden] { display: none; }
  .pb-search .icon { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
  .pb-search input { width: 100%; padding: 8px 10px 8px 31px; border: 1px solid var(--line); border-radius: 2mm; background: #fdfaf6; color: var(--ink); font-size: 11.5px; }
  .pb-search input:focus { outline: 0; border-color: var(--focus-border); background: #fff; box-shadow: var(--focus-ring); }
  .pb-note { margin-left: auto; color: var(--muted-2); font-size: 9.5px; }
  .pb-scroll { overflow-x: auto; }
  .pb-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
  .pb-table-media { min-width: 880px; }
  .pb-price-cell { text-align: right; }
  .pb-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 7px 6px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--muted-2);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .09em;
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .pb-table th:first-child, .pb-table th:nth-child(2), .pb-table th:nth-child(3) { text-align: left; }
  .pb-table td { padding: 6px; border-top: 1px solid #fbf3eb; vertical-align: middle; }
  .pb-table tr.selected td { background: #fffaf5; }
  .pb-table tr.pb-group td { padding-top: 13px; color: var(--accent); background: #fff; font-size: 8.5px; font-weight: 750; letter-spacing: .12em; text-align: left; text-transform: uppercase; }
  .pb-table td:nth-child(n+5) { text-align: right; }
  .pb-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9.5px; color: #9a3412; }
  .pb-type { font-size: 11px; font-weight: 650; color: var(--ink); }
  .digital-pb-key { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8.5px; letter-spacing: .02em; }
  .pb-table-digital .digital-pb-input,
  .pb-table-large .large-format-pb-input { width: 100%; min-width: 92px; max-width: 140px; margin-left: auto; }
  .pb-table-digital td:last-child,
  .pb-table-large td:last-child { text-align: right; }
  .digital-pb-label {
    width: 100%;
    min-width: 170px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-bottom-color: var(--line);
    border-radius: 2mm;
    background: transparent;
    color: var(--ink);
    font-size: 11px;
    font-weight: 650;
    cursor: text;
  }
  .digital-pb-label:hover { border-color: var(--line); background: #fff; }
  .digital-pb-label:focus { outline: 0; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
  .pb-table-ces { width: 100%; min-width: 0; table-layout: auto; }
  .pb-table-ces th, .pb-table-ces td { padding-left: 5px; padding-right: 5px; font-size: 9.5px; }
  .pb-table-ces th:first-child { width: 130px; }
  .pb-table-ces th:nth-child(2) { width: 145px; }
  .pb-table-ces th:nth-child(n+4), .pb-table-ces td:nth-child(n+4) { text-align: right; }
  .pb-table-ces .pb-input { width: 100%; min-width: 42px; max-width: 58px; padding-left: 4px; padding-right: 4px; font-size: 10px; }
  .pb-table-ces [data-ces-field="rate"] { min-width: 76px; max-width: 84px; }
  .ces-size-cell { display: flex; align-items: center; gap: 3px; }
  .ces-size-cell .pb-input { width: 45px; min-width: 45px; }
  .ces-digital-value { color: var(--ink-soft); font-weight: 650; font-variant-numeric: tabular-nums; }
  .ces-digital-note { display: block; margin-top: 1px; color: var(--muted-2); font-size: 8px; font-weight: 500; }
  .ces-percent { margin-left: 1px; color: var(--muted-2); font-size: 8.5px; }
  .pb-material { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
  .pb-dot { width: 8px; height: 8px; border-radius: 2mm; }
  .pb-money-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
  }
  .pb-money-wrap > span {
    color: var(--muted-2);
    font-size: 9.5px;
    font-weight: 750;
    line-height: 1;
  }
  .pb-money-wrap .pb-input { margin-left: 0; }
  .pb-money-wrap .digital-pb-input,
  .pb-money-wrap .large-format-pb-input { width: 122px; min-width: 92px; max-width: 128px; }
  .pb-money-wrap .digital-pb-input.is-unset,
  .pb-money-wrap .large-format-pb-input.is-unset { width: 92px; }
  .pb-input {
    width: 76px;
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: 2mm;
    background: #fcf8f3;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  }
  .pb-input:hover { border-color: #eddccb; }
  .pb-input:focus { outline: 0; border-color: var(--focus-border); background: #fff; box-shadow: 0 0 0 3px rgba(234, 88, 12,.1); }
  .pb-input.is-unset { border-color: #f5d9a8; background: #fffaf0; }
  .pb-table-tiers { min-width: 460px; }
  .pb-table-tiers .pb-input { width: 92px; }
  .pb-tier-note { margin: 0 0 10px; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
  .pb-percent { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
  .pb-percent .pb-input { width: 64px; }

  .pb-add-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
  .digital-pb-add-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .digital-add-panel {
    display: grid;
    gap: 9px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
  }
  .digital-add-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .digital-add-head strong { color: var(--accent-deep); font-size: 12px; }
  .digital-add-head .modal-close { width: 28px; height: 28px; }
  .digital-add-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(90px, .7fr) minmax(120px, .9fr); gap: 8px; align-items: end; }
  .digital-add-grid .auth-field { gap: 4px; }
  .digital-add-grid .auth-field > span { font-size: 8px; }
  .digital-add-actions { display: flex; gap: 6px; justify-content: flex-end; }
  .pb-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border: 0.75px solid var(--ink);
    border-radius: 2mm;
    background: #fff;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
  }
  .pb-add:hover { background: var(--accent-soft); }
  .pb-add .icon { width: 12px; height: 12px; }
  .pb-count { margin-left: auto; color: var(--muted-2); font-size: 9.5px; }
  .pb-text {
    width: 100%;
    min-width: 60px;
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: 2mm;
    background: #fcf8f3;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  }
  .pb-text:hover { border-color: #eddccb; }
  .pb-text:focus { outline: 0; border-color: var(--focus-border); background: #fff; box-shadow: 0 0 0 3px rgba(234, 88, 12,.1); }
  .pb-code-input {
    width: 72px;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    color: #9a3412;
  }
  .pb-material-cell { display: flex; align-items: center; gap: 5px; min-width: 105px; }
  .pb-material-cell .pb-text { min-width: 0; }
  .pb-select {
    max-width: 92px;
    padding: 5px 4px;
    border: 1px solid transparent;
    border-radius: 2mm;
    background: #fcf8f3;
    color: var(--ink);
    font-size: 10px;
    font-weight: 600;
  }
  .pb-select:hover { border-color: #eddccb; }
  .pb-select:focus { outline: 0; border-color: var(--focus-border); background: #fff; box-shadow: 0 0 0 3px rgba(234, 88, 12,.1); }
  .pb-group-label { color: var(--muted); font-size: 10px; }
  .pb-zero { color: var(--muted-2); font-size: 10.5px; }
  .pb-lock { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .pb-actions-cell { width: 32px; text-align: right; }
  .pb-drag-head, .pb-drag-cell { width: 24px; text-align: center; }
  .pb-drag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 25px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2mm;
    background: transparent;
    color: #b9a99b;
    font-size: 15px;
    line-height: 1;
    cursor: grab;
    user-select: none;
  }
  .pb-drag:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
  .pb-drag:active { cursor: grabbing; }
  .pb-table tr.pb-dragging { opacity: .38; }
  .pb-table tr.pb-drop-target td { box-shadow: inset 0 2px 0 var(--accent); }
  .pb-trash {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2mm;
    background: transparent;
    color: var(--muted-2);
  }
  .pb-trash:hover { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
  .pb-trash .icon { width: 14px; height: 14px; }
  .pb-empty { padding: 30px 10px; color: var(--muted); font-size: 12px; text-align: center; }
  .modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 24px; border-top: 1px solid var(--line); background: #fdf9f4; }
  .modal-foot .btn { padding: 9px 14px; font-size: 11.5px; }
  .pb-excel-actions { display: flex; align-items: center; gap: 6px; }

  /* ---------- Toast ---------- */
  .toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 15px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 2mm;
    background: #2c1d15;
    color: #fff;
    font-size: 11.5px;
    box-shadow: 0 18px 40px -14px rgba(35, 18, 9, .6);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity .2s ease, transform .2s ease;
  }
  .toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
  .toast button { padding: 0; border: 0; background: none; color: var(--mint); font-size: 11.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

  /* ---------- Print ---------- */
  .print-sheet { display: none; }

  /* ---------- Responsive ---------- */
  @media (max-width: 1040px) {
    .workspace, .scodix-grid { grid-template-columns: 1fr; }
    .quote-card { position: relative; top: auto; }
    .lower-grid { grid-template-columns: 1fr; }
    .scodix-badges { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .hero { align-items: flex-start; flex-direction: column; gap: 18px; padding-top: 38px; }
    .hero-meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  }
  @media (max-width: 760px) {
    .wrap { padding: 0 18px; }
    .header-inner { min-height: 62px; }
    .header-left { gap:8px; }
    .account-avatar { flex-basis:36px; width:36px; min-width:36px; max-width:36px; height:36px; }
    .header-note { display: none; }
    .brand-logo { height: 42px; }
    .brand-tagline { letter-spacing: .18em; }
    .hero { padding: 32px 0 24px; }
    .hero h1 { margin-top: 12px; font-size: clamp(35px, 10vw, 52px); }
    .lede { font-size: 14px; }
    .card, .quote-card { padding: 20px; border-radius: 2mm; }
    .card-head { margin-bottom: 18px; }
    .card h2 { font-size: 20px; }
    .size-grid { grid-template-columns: 1fr 1fr; }
    .field-grid, .finish-grid { grid-template-columns: 1fr; }
    .finish-grid { margin-top: 12px; }
    .extras-grid { grid-template-columns: 1fr 1fr; }
    .quote-actions { grid-template-columns: 1fr 1fr; }
    .layout-stage { height: 330px; }
    .discount-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
    .footer-brand { justify-self: center; }
    .footer-inner p { text-align: center; }
    .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
    .modal-backdrop { padding: 10px; }
    .modal { max-height: 94vh; }
    .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
    .dashboard-head, .dashboard-scroll { padding-left: 16px; padding-right: 16px; }
    .dashboard-head { padding-top: 18px; }
    .dash-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; }
    .dash-card-body { min-height: 62px; padding: 8px; }
    .dash-qr { width: 50px; height: 50px; }
    .modal-tabs { padding: 0 16px; }
    .pb-toolbar { flex-wrap: wrap; }
    .pb-note { width: 100%; margin-left: 0; }
  }
  @media (max-width: 560px) {
    .header-actions .btn span { display: none; }
    .header-actions .btn { padding: 10px; width: 40px; }
    .header-actions .btn.icon-only { width: 40px; }
    .hero-meta { display: none; }
    .size-grid { gap: 7px; }
    .dim-line input { font-size: 18px; }
    .qty-line { gap: 10px; }
    .qty-stepper input { width: 60px; }
    .qty-chips .chip { padding: 5px 8px; }
    .quote-card { padding: 19px; }
    .stat-grid { gap: 6px; }
    .stat { padding: 9px 10px; }
    .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
    .price-table td:nth-child(3) { padding-left: 8px; }
    .layout-stage { height: 300px; }
    .layout-caption { font-size: 10px; }
    .toast { bottom: 16px; width: calc(100% - 32px); justify-content: space-between; }
  }
  @media (max-width: 380px) {
    .size-grid { grid-template-columns: 1fr; }
    .brand-copy { display: none; }
    .brand-logo { height: 38px; }
    .header-actions { gap: 6px; }
    .card-head { gap: 10px; }
    .card-head h2 { font-size: 19px; }
    .pill { font-size: 9px; padding: 5px 7px; }
    .tier-head { gap: 7px; }
    .tier-rate { font-size: 19px; }
    .spec-card .card-head .pill { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  }

  /* ---------- Flat 2D vector skin ----------
     Solid fills, crisp ink linework, no gradients, blur or soft shadows. */
  @media screen {
    body { background: var(--paper); }
    body::before { display: none; }

    .site-header {
      background: var(--paper);
      border-bottom: 1px solid var(--ink);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .brand-mark { border: 1px solid var(--ink); box-shadow: none; }
    .brand-mark.small { border-width: 0.75px; }
    .header-note { color: var(--muted); }

    .btn { border-width: 0.75px; }
    .btn:hover { transform: none; }
    .btn:active { transform: translateY(1px); }
    .btn-ghost { background: var(--card); border-color: var(--ink); box-shadow: none; }
    .btn-ghost:hover { background: var(--accent-soft); border-color: var(--ink); box-shadow: none; }
    .btn-primary { background: var(--accent); border-color: var(--ink); color: #fff; }
    .btn-primary:hover { background: var(--accent-deep); }
    .btn-light { background: #fff; border: 0.75px solid var(--ink); box-shadow: none; color: var(--ink); }
    .btn-light:hover { background: var(--accent-soft); }
    .btn-glass { background: transparent; border: 1.5px solid rgba(255,255,255,.5); }
    .btn-glass:hover { background: rgba(255,255,255,.12); border-color: #fff; }

    .status-chip { background: var(--card); border: 0.75px solid var(--ink); color: var(--ink-soft); }
    .status-dot { box-shadow: none; }

    .card { border: 0.75px solid var(--ink); box-shadow: none; background: var(--card); }
    .pill { border: 0.75px solid var(--ink); background: #fff; color: var(--ink-soft); }

    .size-field, .qty-stepper, .select-wrap select, .money-field {
      border: 1.5px solid #d9c6b2;
      background: #fff;
      box-shadow: none;
    }
    .size-field:focus-within,
    .qty-stepper:focus-within,
    .select-wrap select:focus,
    .money-field:focus-within {
      border-color: var(--accent);
      background: #fff;
      box-shadow: none;
    }
    .media-card { border: 1.5px dashed #c9b19b; background: #fff; }
    .media-swatch::after { display: none; }
    .media-code { border: 1px solid #f3cfa8; }
    .advanced { background: #fff; border: 1.5px solid var(--line); }
    .advanced summary { background: #fff; }
    .chip { border: 1.5px solid #d9c6b2; background: #fff; }
    .chip:hover { border-color: var(--accent); color: var(--accent); }
    .chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

    .quote-card {
      background: #9a3412;
      border: 0;
      box-shadow: none;
      color: #fff;
    }
    .quote-card::before { display: none; }
    .quote-card::after {
      content: "";
      position: absolute;
      top: -18px;
      right: 0;
      bottom: auto;
      width: 148px;
      height: 148px;
      background: rgba(255,255,255,.065);
      clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
      pointer-events: none;
    }
    .live-pill { background: transparent; border: 1.5px solid rgba(185,246,210,.55); }
    .live-pill i { box-shadow: none; }
    .mode-tabs { background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.22); }
    .mode-tab.active { box-shadow: none; border: 0.75px solid var(--ink); }
    .stat { background: transparent; border: 1.5px solid rgba(255,255,255,.22); }
    .quote-card .btn-glass { background: transparent; }
    .quote-card .btn-glass:hover { background: rgba(255,255,255,.1); }

    .layout-stage { background: var(--layout-bg-mid); border: 1px solid var(--layout-border); }
    .layout-stage::before { display: none; }
    .layout-stat { background: var(--field-bg); border: 1.5px solid var(--line); }

    .tier-col { background: var(--field-bg); border: 1.5px solid var(--line); }
    .tier-col.is-active { background: var(--accent-soft); border: 1px solid var(--accent); box-shadow: none; }
    .tier-badge { border: 0.75px solid var(--ink); }
    .tier-col.is-active .tier-badge { background: var(--accent); color: #fff; }
    .tier-row.active { background: var(--accent); box-shadow: none; }
    .tier-row.active::before { box-shadow: none; }
    .tier-next { border: 1px solid var(--accent-line); }

    .modal-backdrop {
      background: rgba(42,29,21,.48);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .modal { border: 1px solid var(--ink); box-shadow: none; }
    .modal-close { background: #fff; border: 0.75px solid var(--ink); }
    .modal-close:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--ink); }
    .modal-tab { color: var(--muted); }
    .modal-tab.active { color: var(--accent); border-color: var(--accent); }
    .pb-search input { background: #fff; border: 1.5px solid var(--line); }
    .pb-search input:focus { box-shadow: none; border-color: var(--accent); }
    .pb-input { background: #fff; border: 1.5px solid var(--line); }
    .pb-input:focus { box-shadow: none; border-color: var(--accent); }
    .pb-input.is-unset { border-color: #e7c48b; background: #fff8e8; }
    .pb-table tr.selected td { background: var(--accent-soft); }

    .toast { box-shadow: none; border: 1.5px solid rgba(255,255,255,.22); }
    .footer-inner { border-top: 1px solid var(--ink); }
  }

  /* ---------- Role access ---------- */
  button.header-note { border: 0; background: transparent; padding: 0; font-family: inherit; cursor: pointer; appearance: none; }
  button.header-note:hover { color: var(--accent); }
  .footer-role { justify-self: end; border: 0; background: transparent; padding: 0; color: var(--muted); font: inherit; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .footer-role:hover { color: var(--accent); }

  body:not(.role-admin) #openPriceBook,
  body:not(.role-admin) #resetBtn { display: none; }

  body.role-reseller .mode-tabs,
  body.role-direct .mode-tabs { display: none; }

  body.role-reseller #extrasCostNote,
  body.role-direct #extrasCostNote,
  body.role-reseller #discountCostNote,
  body.role-direct #discountCostNote { display: none; }

  body.role-reseller .tier-col[data-tier-col="direct"],
  body.role-direct .tier-col[data-tier-col="reseller"] { display: none; }

  body.role-reseller .discount-grid,
  body.role-direct .discount-grid { grid-template-columns: 1fr; }

  body.role-gate-open { overflow: hidden; }

  .role-gate {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(42, 29, 21, .58);
  }
  .role-gate[hidden] { display: none; }
  .role-gate-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: var(--card);
    box-shadow: 0 30px 80px -40px rgba(60, 30, 15, .55);
  }
  .role-kicker { margin: 0 0 8px; color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
  .role-gate-head h2 { margin: 0 0 8px; font-family: var(--display); font-size: 30px; line-height: 1.05; letter-spacing: -.03em; }
  .role-gate-head > p:last-child { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
  .role-options { display: grid; gap: 9px; margin-top: 20px; }
  .role-options[hidden], .role-passcode[hidden] { display: none; }
  .role-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    text-align: left;
    transition: background .16s ease, border-color .16s ease;
  }
  .role-option:hover { border-color: var(--accent-line); background: var(--accent-soft); }
  .role-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--display);
    font-size: 16px;
    font-weight: 800;
  }
  .role-option[data-role="reseller"] .role-mark { border-color: #f5d9a8; background: #fff7e6; color: #b45309; }
  .role-option[data-role="direct"] .role-mark { border-color: #b9f6d2; background: #e9f9f0; color: #0f8a5f; }
  .role-option-copy { flex: 1; min-width: 0; }
  .role-option-copy strong { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
  .role-option-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
  .role-option-tag { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 2mm; color: var(--muted-2); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .role-option[data-role="admin"] .role-option-tag { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
  .role-passcode { display: grid; gap: 9px; margin-top: 18px; }
  .role-back { justify-self: start; border: 0; background: transparent; padding: 0; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
  .role-back:hover { color: var(--accent); }
  .role-passcode label { color: var(--muted); font-size: 9.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
  .role-input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 2mm; background: #fdfaf6; color: var(--ink); font-size: 16px; letter-spacing: .16em; }
  .role-input:focus { outline: 0; border-color: var(--accent); background: #fff; box-shadow: var(--focus-ring); }
  .role-error { margin: 0; color: #b91c1c; font-size: 11px; }
  .role-error[hidden] { display: none; }
  .role-unlock { width: 100%; margin-top: 3px; }
  .role-gate-note { margin: 15px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.45; text-align: center; }

  @media (max-width: 760px) {
    .footer-role { justify-self: center; }
  }
  @media (max-width: 560px) {
    .role-gate { padding: 14px; }
    .role-gate-card { padding: 20px; }
    .role-gate-head h2 { font-size: 25px; }
    .role-option { padding: 11px; gap: 10px; }
    .role-mark { width: 34px; height: 34px; }
  }

  /* ---------- Account access ---------- */
  body.auth-gate-open { overflow: hidden; }
  body.auth-gate-open main,
  body.auth-gate-open .site-footer,
  body.auth-gate-open .back-to-top { visibility: hidden; }

  .auth-gate {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(42, 29, 21, .62);
  }
  .auth-gate[hidden] { display: none; }
  .auth-card {
    width: min(640px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: var(--card);
    box-shadow: 0 30px 80px -40px rgba(60, 30, 15, .55);
  }
  .auth-kicker { margin: 0 0 8px; color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
  .auth-head h2 { margin: 0 0 7px; font-family: var(--display); font-size: 30px; line-height: 1.05; letter-spacing: -.03em; }
  .auth-head > p:last-child { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
  .auth-tabs {
    display: flex;
    gap: 3px;
    margin: 18px 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
  }
  .auth-tab {
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
    border: 0;
    border-radius: 2mm;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
  }
  .auth-tab:hover { color: var(--accent); }
  .auth-tab.active { background: var(--accent); color: #fff; }
  .auth-form { display: grid; gap: 10px; }
  .auth-form[hidden], .auth-field[hidden], .auth-message[hidden], .auth-back[hidden], .auth-gate[hidden] { display: none; }
  .auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .auth-field { display: grid; gap: 5px; min-width: 0; }
  .auth-field > span { color: var(--muted); font-size: 9.5px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
  .auth-field input, .auth-field select, .auth-field textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
  }
  .auth-field textarea { min-height: 68px; line-height: 1.5; resize: vertical; }
  .auth-field input:disabled, .auth-field select:disabled, .auth-field textarea:disabled { background: #f1ece5; color: var(--muted); border-color: #e4d8ca; cursor: not-allowed; opacity: 1; }
  .auth-field input.jobsheet-locked-field { background: #efe7db !important; border-color: #ddcfbf !important; border-style: dashed; color: #8a7563; cursor: not-allowed; }
  .auth-field input[type="date"]:disabled { cursor: not-allowed; }
  .auth-field input[type="date"] { cursor: pointer; color-scheme: light; }
  .auth-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .62;
  }
  .auth-field input[type="date"]:hover::-webkit-calendar-picker-indicator,
  .auth-field input[type="date"]:focus::-webkit-calendar-picker-indicator { opacity: 1; }
  .auth-field input:focus, .auth-field select:focus, .auth-field textarea:focus {
    outline: 0;
    border-color: var(--accent);
    background: #fff;
    box-shadow: var(--focus-ring);
  }
  .auth-hint { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.45; }
  .reseller-fields {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
  }
  .reseller-fields[hidden] { display: none; }
  .auth-message {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #f5d9a8;
    border-radius: 2mm;
    background: var(--amber-soft);
    color: #9a6508;
    font-size: 11px;
    line-height: 1.45;
  }
  .auth-message.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
  .auth-message.is-success { border-color: #b9f6d2; background: #e9f9f0; color: #0f8a5f; }
  .auth-submit { width: 100%; margin-top: 3px; }
  .auth-back { justify-self: start; border: 0; background: transparent; padding: 0; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
  .auth-back:hover { color: var(--accent); }
  .auth-question {
    margin: 0;
    padding: 10px 11px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
  }
  .auth-note { margin: 14px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.45; text-align: center; }

  .account-note { display: inline-flex; align-items: center; gap: 7px; }
  .account-avatar, .profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .02em;
  }
  .account-avatar img, .profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .profile-avatar {
    flex: 0 0 80px;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    height: 80px;
    font-size: 20px;
  }
  .profile-avatar-row { display: flex; align-items: center; gap: 14px; }
  .profile-avatar-copy { display: grid; justify-items: start; gap: 6px; min-width: 0; }
  .profile-avatar-copy p { margin: 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.4; }
  .auth-field > span em { color: var(--muted-2); font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; }
  .profile-postal { max-width: 220px; }
  .avatar-upload { display: inline-flex; align-items: center; padding: 7px 11px !important; font-size: 10.5px !important; cursor: pointer; }
  .footer-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
  .footer-actions .footer-role { justify-self: auto; }
  .profile-modal { width: min(640px, 100%); }
  .profile-form { display: grid; gap: 10px; }
  .profile-form[hidden] { display: none; }
  .profile-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
  }
  .profile-branding {
    display: grid;
    gap: 11px;
    margin: 2px 0 4px;
    padding: 13px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
  }
  .profile-branding[hidden] { display: none; }
  .branding-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .branding-head h3 { margin: 2px 0 0; font-size: 14px; letter-spacing: -.02em; }
  .branding-logo-row { display: flex; align-items: center; gap: 12px; }
  .company-logo-preview {
    display: grid;
    place-items: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: #fff;
    color: var(--muted-2);
    font-size: 8px;
    text-align: center;
  }
  .company-logo-preview img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
  .branding-hint { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.4; }
  .profile-role {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 8.5px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  .profile-email { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10.5px; text-align: right; }
  .profile-modal .modal-body { padding-top: 15px; }
  .profile-modal .auth-grid { gap: 10px; }

  @media (max-width: 760px) {
    .footer-actions { justify-self: center; }
    .header-note.account-note { display: inline-flex; }
    .account-note #accountNote { display: none; }
  }

  @media (max-width: 560px) {
    .auth-gate { padding: 12px; }
    .auth-card { padding: 20px; }
    .auth-head h2 { font-size: 25px; }
    .auth-grid { grid-template-columns: 1fr; }
    .auth-tabs { gap: 2px; padding: 3px; }
    .auth-tab { padding: 7px 4px; font-size: 10.5px; }
    .auth-field input, .auth-field select, .auth-field textarea { font-size: 16px; }
  }

  /* ---------- Calculator tabs ---------- */
  .tool-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 18px;
    border-bottom: 1px solid var(--line);
  }
  .tool-tab {
    padding: 10px 14px 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    cursor: pointer;
  }
  .tool-tab:hover { color: var(--accent); }
  .tool-tab.active { color: var(--accent); border-color: var(--accent); }
  body.auth-gate-open .tool-tabs { visibility: hidden; }
  .sticker-main[hidden], .digital-main[hidden], .large-format-main[hidden], .offset-main[hidden], .book-main[hidden], .scodix-main[hidden] { display: none !important; }

  .sticker-main, .digital-main, .book-main { padding-top: 20px; }
  .sticker-main .hero, .digital-hero, .book-hero { padding-top: 0; }
  .large-format-main { padding-top: 20px; }
  .large-format-hero { padding-top: 0; }
  .offset-main { padding-top: 20px; }
  .offset-hero { padding-top: 0; }
  .scodix-main { padding-top: 20px; }
  .scodix-hero { padding-top: 0; }
  .scodix-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: 20px; align-items: start; }
  .scodix-panel { min-width: 0; }
  .scodix-panel .field input {
    width: 100%;
    min-height: 41px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  }
  .scodix-panel .field input:hover { border-color: #eddccb; background: #fff; }
  .scodix-panel .field input:focus {
    outline: 0;
    border-color: var(--focus-border);
    background: #fff;
    box-shadow: var(--focus-ring);
  }
  .scodix-panel .spec-block:first-of-type { padding-top: 0; }
  .scodix-reset { padding: 7px 10px; font-size: 10px; }
  .scodix-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
  .scodix-polymer-note { margin: 8px 0 0; }
  .scodix-quote .quote-top { align-items: center; }
  .scodix-quote .total-value { font-size: clamp(34px, 4.2vw, 54px); }
  .scodix-net-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0 14px;
    padding: 9px 11px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 2mm;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.8);
    font-size: 10px;
  }
  .scodix-net-line strong { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
  .scodix-net-line .negative { color: #ffd0c2; }
  .scodix-quote .stat strong { font-size: 14px; }
  .scodix-quote .quote-actions .btn { width: 100%; }
  .scodix-table td:first-child strong { display: block; }
  .scodix-table td:first-child small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
  .scodix-table tfoot td { font-weight: 750; background: #fdfaf6; }
  .scodix-cash-card { margin-top: 20px; }
  .scodix-cash-table td:first-child { font-weight: 700; }
  .scodix-cash-table tbody tr.year-zero td { color: var(--accent-deep); background: var(--accent-soft); }
  .scodix-cash-table tbody tr.year-zero td:first-child { font-weight: 800; }
  .scodix-advanced { margin-top: 17px; }
  body:not(.role-admin) .offset-internal { display: none; }
  body:not(.role-admin) .book-internal { display: none; }
  body:not(.role-admin) [data-tool="scodix"] { display: none; }
  .book-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 20px;
    align-items: start;
  }
  .book-column { display: grid; gap: 14px; min-width: 0; }
  .book-spec-card { align-self: start; }
  .book-spec-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px 14px;
  }
  .book-spec-group { min-width: 0; }
  .book-dimension { display: flex; align-items: center; gap: 6px; }
  .book-dimension input {
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }
  .book-dimension span { color: var(--muted-2); font-size: 10px; font-weight: 650; }
  .book-qty-field .qty-stepper { width: 100%; }
  .book-qty-field .qty-stepper input { flex: 1 1 auto; width: auto; min-width: 0; }
  .book-spec-grid .field input,
  .book-spec-grid .fixed-field,
  .book-spec-grid .book-dimension input { height: 41px; }
  .book-spec-grid .qty-stepper { height: 41px; padding: 2px; }
  .book-spec-grid .qty-stepper button,
  .book-spec-grid .qty-stepper input { height: 35px; }
  .book-extent-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 41px;
    padding: 4px 11px 5px;
  }
  .book-extent-field .size-label { margin-bottom: 0; font-size: 8.5px; line-height: 1.1; }
  .book-extent-field .dim-line { gap: 5px; }
  .book-extent-field .dim-line input { height: 20px; font-size: 17px; }
  .book-extent-field .dim-line .unit { margin-top: 3px; }
  .book-extent-field.is-locked { background: var(--field-bg); border-color: var(--line); }
  .book-extent-value {
    flex: 1 1 auto;
    color: var(--ink-soft);
    font-family: var(--display);
    font-size: 17px;
    font-weight: 680;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
  }
  .book-readonly-input { color: var(--muted); cursor: default; }
  body.role-reseller .book-man-hours-field { display: none !important; }

  /* Theme-aware fields, panels and text boxes */
  .field input,
  .field select,
  .book-dimension input,
  .select-wrap select,
  .language-select,
  .size-field,
  .qty-stepper,
  .advanced,
  .tier-col,
  .media-card,
  .book-line select,
  .book-outsource-row select,
  .book-outsource-row input,
  .digital-misc-label,
  .money-field {
    background-color: var(--field-bg);
  }
  .field input:focus,
  .book-dimension input:focus,
  .select-wrap select:focus,
  .size-field:focus-within,
  .qty-stepper:focus-within,
  .book-line select:focus,
  .book-outsource-row select:focus,
  .book-outsource-row input:focus,
  .digital-misc-label:focus {
    background-color: var(--field-bg-focus);
  }
  .select-wrap select option,
  .book-line select option,
  .book-outsource-row select option,
  .language-select option {
    background: var(--field-bg);
    color: var(--ink);
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea {
    background-color: var(--field-bg) !important;
    color: var(--ink) !important;
    border-color: var(--line);
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
  textarea:focus {
    background-color: var(--field-bg-focus) !important;
    border-color: var(--focus-border);
  }
  input::placeholder,
  textarea::placeholder {
    color: var(--muted-2);
  }
  select,
  select option,
  select optgroup {
    background-color: var(--field-bg) !important;
    color: var(--ink) !important;
    color-scheme: light;
  }
  select option:checked {
    background-color: var(--accent-soft) !important;
    color: var(--accent-deep) !important;
  }
  select option:disabled {
    color: var(--muted-2) !important;
  }
  select { accent-color: var(--accent); }
  .book-calc-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }
  .book-calc-strip div { display: grid; gap: 3px; }
  .book-calc-strip span { color: var(--muted); font-size: 9.5px; font-weight: 650; }
  .book-calc-strip strong { color: var(--accent-deep); font-size: 16px; font-variant-numeric: tabular-nums; }
  .book-part-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .book-part-card { min-width: 0; }
  .book-lines { display: grid; gap: 5px; }
  .book-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 58px;
    gap: 6px;
    align-items: center;
  }
  .book-line > span { color: var(--muted); font-size: 9.5px; font-weight: 650; }
  .book-line select {
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font: inherit;
    font-size: 10.5px;
  }
  .book-line small { color: var(--accent-deep); font-size: 10px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
  .book-subtotal {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
  }
  .book-subtotal small { color: var(--muted-2); font-size: 9px; font-weight: 500; }
  .book-subtotal strong { color: var(--accent-deep); font-size: 15px; font-variant-numeric: tabular-nums; }
  .book-outsource-rows { display: grid; gap: 5px; }
  .book-outsource-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 7px;
    align-items: center;
  }
  .book-outsource-row select,
  .book-outsource-row input {
    width: 100%;
    padding: 6px 7px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink);
    font: inherit;
    font-size: 10.5px;
  }
  .book-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .book-summary-lines {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }
  .book-summary-lines div { display: grid; gap: 3px; }
  .book-summary-lines span { color: var(--muted); font-size: 9.5px; font-weight: 650; }
  .book-summary-lines strong { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
  .book-summary-lines .grand strong { color: var(--accent-deep); font-size: 17px; }
  .book-quote { position: sticky; top: 88px; }
  .book-flipbook-button { width: 100%; margin-top: 7px; }
  .flipbook-backdrop { z-index: 90; }
  .flipbook-modal:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .flipbook-backdrop.is-faux-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 120;
    padding: 0;
    background: #171310;
  }
  .flipbook-backdrop.is-faux-fullscreen .flipbook-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  .flipbook-modal {
    display: flex;
    flex-direction: column;
    width: min(940px, 94vw);
    height: min(92vh, 860px);
    height: min(92dvh, 860px);
    max-height: 94vh;
    max-height: 94dvh;
    overflow: hidden;
  }
  .flipbook-modal .modal-head { flex: 0 0 auto; }
  .flipbook-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px;
    background: #2b241f;
    perspective: 1600px;
    overflow: auto;
  }
  .flipbook-book { flex: 1 1 auto; width: 100%; min-width: 0; margin: 0 auto; }
  .flipbook-book[hidden], .flipbook-page[hidden] { display: none !important; }
  .stf__parent { margin: 0 auto; }
  .stf__item { background: #fff; box-shadow: 0 18px 45px rgba(0,0,0,.28); }
  .stf-page { width: 100%; height: 100%; overflow: hidden; background: #fff; }
  .stf-page .flip-pdf-page { width: 100%; height: 100%; overflow: hidden; display: block; }
  .flipbook-book.is-zoomed .stf__block { pointer-events: none; }
  .flipbook-stage.is-zoomed { cursor: grab; }
  .flipbook-stage.is-panning { cursor: grabbing; }
  .stf-page .flip-pdf-page img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
  }
  .flipbook-page {
    width: min(690px, 62vw);
    min-height: 420px;
    max-height: 100%;
    overflow: auto;
    padding: 38px 42px;
    border-radius: 2mm;
    background: #fffdf9;
    color: var(--ink);
    box-shadow: 0 24px 55px rgba(0,0,0,.35), 0 2px 0 rgba(255,255,255,.4) inset;
    transform-origin: left center;
    backface-visibility: hidden;
  }
  .flipbook-page.flip-next { animation: bookFlipNext .42s ease-out; }
  .flipbook-page.flip-prev { animation: bookFlipPrev .42s ease-out; }
  @keyframes bookFlipNext {
    from { transform: rotateY(-22deg) translateX(-8px); opacity: .3; }
    to { transform: rotateY(0) translateX(0); opacity: 1; }
  }
  @keyframes bookFlipPrev {
    from { transform: rotateY(22deg) translateX(8px); opacity: .3; }
    to { transform: rotateY(0) translateX(0); opacity: 1; }
  }
  .flipbook-nav {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
  }
  .flipbook-nav:hover { background: rgba(255,255,255,.22); }
  .flipbook-nav:disabled { opacity: .25; cursor: default; }
  .flipbook-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 15px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .flipbook-source { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .flipbook-source > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .flipbook-source small { max-width: 260px; overflow: hidden; color: var(--muted-2); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
  .flipbook-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
  .flipbook-zoom { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 2mm; background: #fff; }
  .flipbook-zoom[hidden] { display: none !important; }
  .flipbook-zoom-button,
  .flipbook-zoom-value {
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    cursor: pointer;
  }
  .flipbook-zoom-button { width: 30px; font-size: 18px; line-height: 1; }
  .flipbook-zoom-value { min-width: 48px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 10px; font-weight: 750; }
  .flipbook-zoom-button:hover,
  .flipbook-zoom-value:hover { background: var(--accent-soft); color: var(--ink); }
  .flipbook-zoom-button:disabled { opacity: .3; cursor: default; }
  .flip-pdf-page { display: flex; align-items: center; justify-content: center; }
  .flip-pdf-page img { display: block; width: 100%; height: auto; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
  .flipbook-page.is-pdf { padding: 12px; overflow: hidden; }
  .flipbook-page.is-pdf .flip-pdf-page { height: 100%; }
  .flipbook-page.is-pdf .flip-pdf-page img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
  .flipbook-page.is-empty { display: flex; align-items: center; justify-content: center; }
  .flip-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 330px; padding: 30px; text-align: center; }
  .flip-empty .icon { width: 46px; height: 46px; color: var(--accent); }
  .flip-empty h3 { margin: 4px 0 0; font-family: var(--display); font-size: 26px; letter-spacing: -.03em; }
  .flip-empty p { max-width: 320px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
  .flip-cover { display: flex; flex-direction: column; min-height: 430px; }
  .flip-cover .print-logo { height: 42px; max-width: 180px; object-fit: contain; margin-bottom: 28px; align-self: flex-start; }
  .flip-kicker { margin: 0 0 7px; color: var(--accent-deep); font-size: 10px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
  .flip-title { margin: 0; max-width: 440px; font-family: var(--display); font-size: 44px; line-height: .98; letter-spacing: -.045em; }
  .flip-sub { margin: 15px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
  .flip-cover-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 30px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 650; }
  .flip-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
  .flip-page-head h3 { margin: 2px 0 0; font-family: var(--display); font-size: 27px; letter-spacing: -.035em; }
  .flip-page-head span { color: var(--muted); font-size: 10px; font-weight: 700; }
  .flip-rows { display: grid; gap: 8px; margin-top: 18px; }
  .flip-row { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); color: var(--ink-soft); font-size: 11.5px; }
  .flip-row span:last-child { color: var(--ink); font-weight: 700; text-align: right; }
  .flip-row.total { margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--ink); border-bottom: 0; color: var(--ink); font-size: 15px; font-weight: 800; }
  .flip-row.total span:last-child { color: var(--accent-deep); font-size: 18px; }
  .flip-note { margin-top: 22px; padding: 14px; border: 1px solid var(--accent-line); border-radius: 2mm; background: var(--accent-soft); color: var(--muted); font-size: 10.5px; line-height: 1.6; }
  .flip-foot { margin-top: auto; padding-top: 24px; color: var(--muted-2); font-size: 9.5px; }
  .flipbook-page .flip-page-body { display: flex; flex-direction: column; min-height: 430px; }
  @media (max-width: 760px) {
    .flipbook-stage { min-height: 0; padding: 12px 5px; gap: 4px; }
    .flipbook-page { width: calc(100vw - 94px); min-height: 360px; max-height: 100%; padding: 24px 20px; }
    .flipbook-nav { width: 30px; height: 30px; font-size: 20px; }
    .flip-title { font-size: 32px; }
    .flipbook-footer { align-items: flex-start; flex-direction: column; }
    .flipbook-actions { width: 100%; }
    .flipbook-actions .btn { flex: 1; }
  }
  .book-breakdown td:first-child { font-weight: 700; }
  .book-breakdown tbody td { vertical-align: top; }
  @media (max-width: 980px) {
    .book-layout { grid-template-columns: 1fr; }
    .book-quote { position: static; }
  }
  @media (max-width: 760px) {
    .book-spec-grid, .book-part-grid { grid-template-columns: 1fr; }
    .book-calc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-summary-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .offset-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 41px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 2mm;
    background: #fdfaf6;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
  }
  .offset-check input { width: 16px; height: 16px; accent-color: var(--accent); }
  .offset-check span { color: var(--muted-2); font-size: 10px; font-weight: 500; }
  .offset-tier-scroll {
    max-height: 390px;
    overflow: auto;
    border: 1px solid var(--line-soft);
    border-radius: 2mm;
  }
  .offset-tier-table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .offset-tier-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 11px;
    border-bottom: 1px solid var(--line);
    background: #fdfaf6;
    color: var(--muted-2);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .08em;
    text-align: right;
    text-transform: uppercase;
  }
  .offset-tier-table th:first-child { text-align: left; }
  .offset-tier-table td {
    padding: 7px 11px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-soft);
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .offset-tier-table td:first-child { text-align: left; font-weight: 650; }
  .offset-tier-table tbody tr { cursor: pointer; }
  .offset-tier-table tbody tr:hover { background: #fff7ef; }
  .offset-tier-table tbody tr.selected { background: var(--accent-soft); }
  .offset-tier-table tbody tr.unavailable { cursor: default; opacity: .55; }
  .offset-tier-table tbody tr:last-child td { border-bottom: 0; }
  .offset-quote .stat strong { font-size: 14px; }
  .offset-quote .quote-actions .btn { width: 100%; }
  .offset-breakdown td:first-child strong { display: block; }
  .offset-breakdown td:first-child small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
  .large-format-stage { height: 360px; padding: 16px; }
  .large-format-svg { position: relative; z-index: 1; width: 100%; height: 100%; }
  .large-format-empty { position: relative; z-index: 1; max-width: 260px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
  .large-format-empty strong { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 13px; }
  .large-format-quote .stat strong { font-size: 14px; }
  .large-format-quote .quote-actions .btn { width: 100%; }
  .digital-spec .spec-block:first-of-type { padding-top: 0; }
  .digital-quote .kicker { margin: 0; }
  .digital-internal { margin-top: 17px; }
  body:not(.role-admin) .digital-internal,
  body:not(.role-admin) .digital-internal-row { display: none; }
  .digital-outsource-field { align-content: start; }
  .digital-outsource-value { width: 100%; cursor: default; }
  .digital-outsource-note { display: block; margin-top: -1px; color: var(--muted-2); font-size: 8.5px; line-height: 1.35; }
  .digital-misc-field { display: grid; gap: 5px; }
  .digital-misc-label {
    width: 100%;
    padding: 5px 7px;
    border: 1px solid var(--accent-line);
    border-radius: 2mm;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .digital-misc-label:hover { background: #fff; }
  .digital-misc-label:focus { border-color: var(--accent); background: #fff; outline: none; }
  .digital-gap-hint { margin-top: 8px; }
  .digital-size-chips { align-items: center; margin-top: 8px; }
  .digital-size-label { margin-right: 2px; color: var(--muted-2); font-size: 8.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .digital-size-chips .chip { padding: 5px 11px; font-size: 10px; }
  .digital-layout-stage {
    width: min(100%, 340px);
    height: auto;
    margin: 0 auto;
    padding: 16px;
  }
  .digital-layout-svg { position: relative; z-index: 1; width: 100%; height: 100%; }
  .digital-sheet {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3px;
    width: auto;
    max-width: 88%;
    height: min(88%, 330px);
    overflow: hidden;
    padding: 6px;
    border: 1px solid var(--ink);
    border-radius: 2mm;
    background: #fff;
    box-shadow: 0 18px 40px -20px rgba(35, 18, 9, .3);
  }
  .digital-piece {
    min-height: 9px;
    border: 1px dashed #f2b27e;
    border-radius: 1mm;
    background: var(--accent-soft);
  }
  .digital-sheet-empty {
    position: relative;
    z-index: 1;
    max-width: 260px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
  }
  .digital-sheet-empty strong { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 13px; }
  .digital-sheet-overflow {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
  }
  #digitalBreakdownBody td:first-child strong,
  #digitalBreakdownFoot td:first-child strong,
  #largeFormatBreakdownBody td:first-child strong,
  #largeFormatBreakdownFoot td:first-child strong { display: block; }
  #digitalBreakdownBody td:first-child small,
  #digitalBreakdownFoot td:first-child small,
  #largeFormatBreakdownBody td:first-child small,
  #largeFormatBreakdownFoot td:first-child small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9.5px; font-weight: 500; }
  .digital-price-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 3px;
    margin: 0 0 7px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 2mm;
    background: rgba(255,255,255,.065);
  }
  .digital-price-tab {
    padding: 7px 4px;
    border: 0;
    border-radius: 2mm;
    background: transparent;
    color: #f2d8c2;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
  }
  .digital-price-tab:hover:not(.active) { background: rgba(255,255,255,.06); color: #fff; }
  .digital-price-tab.active { background: #fff; color: #4a2412; }
  .digital-coverage-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 17px;
  }
  .digital-coverage-tabs[hidden] { display: none; }
  .digital-coverage-tab {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 2mm;
    background: rgba(255,255,255,.04);
    color: #e5c9b5;
    font: inherit;
    font-size: 9.5px;
    font-weight: 650;
    cursor: pointer;
  }
  .digital-coverage-tab.active { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.17); color: #fff; }
  .digital-quote .stat strong { font-size: 14px; }
  .digital-quote .quote-actions .btn { width: 100%; }

  @media (max-width: 760px) {
    .tool-tabs { margin-top: 12px; overflow-x: auto; }
    .tool-tab { flex: 1 0 auto; padding: 9px 11px 10px; font-size: 10.5px; }
    .sticker-main, .digital-main, .large-format-main, .offset-main, .book-main, .scodix-main { padding-top: 10px; }
    .scodix-cash-card { overflow: hidden; }
    .scodix-table { min-width: 520px; }
    .scodix-cash-table { min-width: 460px; }
    .offset-tier-scroll { max-height: 320px; }
    .company-logo { max-width: 38px; height: 30px; }
    .digital-add-grid { grid-template-columns: 1fr; }
    .users-toolbar { flex-direction: column; align-items: stretch; }
    .tab-access-head { flex-direction: column; }
    .tab-access-row { grid-template-columns: 1fr 78px 78px; }
    .users-search { max-width: none; }
    .users-modal { max-height: 94vh; }
    .users-table th:nth-child(3), .users-table td:nth-child(3) { display: none; }
    .users-actions { flex-direction: column; align-items: stretch; }
    .digital-layout-stage { width: min(100%, 340px); height: auto; }
    .digital-sheet { max-height: 280px; }
    .large-format-stage { height: 300px; }
  }

  @media print {
    @page { size: A4; margin: 16mm; }
    @page jobsheet { size: A4; margin: 5mm 5mm 5mm 13mm; }
    html, body { background: #fff !important; }
    body::before { display: none !important; }
    body > *:not(.print-sheet) { display: none !important; }
    .site-header, .tool-tabs, .sticker-main, .digital-main, .large-format-main, .offset-main, .scodix-main, .hero, .workspace, .lower-grid, .discounts-card, .site-footer, .back-to-top, .modal-backdrop, .role-gate, .auth-gate, .toast { display: none !important; }
    .print-sheet { display: block !important; }
    .print-sheet .print-inner { width: 100%; color: #111; font-family: var(--font); }
    .print-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #2c1d15; }
    .print-brand { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 750; }
    .print-logo { height: 34px; max-width: 180px; object-fit: contain; }
    .print-brand .brand-mark { width: 30px; height: 30px; border-radius: 2mm; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .print-brand .icon { width: 15px; height: 15px; }
    .print-meta { color: #666; font-size: 9px; text-align: right; line-height: 1.5; }
    .print-sheet h1 { margin: 26px 0 4px; font-size: 28px; letter-spacing: -.03em; }
    .print-sub { margin: 0 0 22px; color: #555; font-size: 11px; }
    .print-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin: 0 0 24px; padding: 16px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
    .print-spec { display: flex; justify-content: space-between; gap: 18px; font-size: 10.5px; }
    .print-spec span:first-child { color: #666; }
    .print-spec span:last-child { font-weight: 650; text-align: right; }
    .print-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
    .print-table th { padding: 0 0 7px; border-bottom: 1px solid #bbb; color: #666; font-size: 8px; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
    .print-table th:first-child { text-align: left; }
    .print-table td { padding: 7px 0; border-bottom: 1px solid #eee; text-align: right; }
    .print-table td:first-child { text-align: left; }
    .print-table td small { display: block; color: #777; font-size: 8.5px; margin-top: 1px; }
    .print-totals { width: 290px; margin-left: auto; margin-top: 18px; font-size: 10.5px; }
    .print-total-row { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; color: #444; }
    .print-total-row.grand { margin-top: 5px; padding-top: 10px; border-top: 1px solid #2c1d15; color: #111; font-size: 14px; font-weight: 750; }
    .print-per { margin-top: 14px; padding: 11px 14px; background: #fff6ec; border-radius: 2mm; color: #7c2d12; font-size: 11px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .print-per strong { font-size: 15px; }
    .print-notes { margin-top: 18px; padding: 10px 12px; border-left: 3px solid #c2410c; background: #fff7ef; color: #333; font-size: 10px; line-height: 1.5; white-space: pre-wrap; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .print-notes strong { display: block; margin-bottom: 4px; color: #7c2d12; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
    .jobsheet-print { page: jobsheet; display: flex; flex-direction: column; height: 284mm; min-height: 0; overflow: hidden; page-break-after: avoid; break-after: avoid; color: #333; font-family: "Futura Jobsheet", "Futura LT", "Century Gothic", Arial, sans-serif; }
    .jobsheet-artwork { display: flex; flex: 1; flex-direction: column; min-height: 0; margin-top: 0; overflow: hidden; color: #333; font-family: "Futura Jobsheet", "Futura LT", "Century Gothic", Arial, sans-serif; }
    .jobsheet-artwork-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 12.7mm; min-height: 12.7mm; padding: 0; border-bottom: 1px solid #777; }
    .jobsheet-artwork-head strong { color: #555; font-size: 10pt; }
    .jobsheet-artwork-head span { color: #555; font-size: 8pt; overflow-wrap: anywhere; text-align: right; }
    .jobsheet-artwork-frame { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 0; padding: 8pt 0 2pt; }
    .jobsheet-artwork-frame img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
    .jobsheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 9px; border-bottom: 2px solid #555; }
    .jobsheet-logo { width: 42.75pt; height: 25.5pt; object-fit: contain; }
    .jobsheet-head h1 { margin: 0; color: #555; font-family: "Futura Jobsheet", "Futura LT", "Century Gothic", Arial, sans-serif; font-size: 25pt; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
    .jobsheet-header-table { width: 100%; margin-top: 10px; border-collapse: collapse; table-layout: fixed; }
    .jobsheet-header-table td { height: 48.75pt; padding: 5px 7px; border: 1px solid #777; vertical-align: top; }
    .jobsheet-header-table td:nth-child(1) { width: 21%; }
    .jobsheet-header-table td:nth-child(2) { width: 17%; }
    .jobsheet-header-table td:nth-child(3) { width: 16%; }
    .jobsheet-header-table td:nth-child(4) { width: 25%; }
    .jobsheet-header-table td:nth-child(5) { width: 21%; }
    .jobsheet-header-table td span { display: block; color: #333; font-size: 10pt; white-space: nowrap; }
    .jobsheet-header-table td div { min-height: 24px; padding-top: 4px; color: #111; font-size: 10pt; font-weight: 700; }
    .jobsheet-description { margin-top: 10px; padding: 6px 8px; border: 1px solid #777; min-height: 28pt; }
    .jobsheet-description span { display: block; color: #333; font-size: 10pt; }
    .jobsheet-description p { margin: 4px 0 0; color: #111; font-size: 10pt; line-height: 1.35; }
    .jobsheet-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px; margin-top: 18px; padding: 12pt 0; border-top: 1px solid #777; border-bottom: 1px solid #777; }
    .jobsheet-spec-row { display: flex; gap: 10px; padding: 3px 0; color: #333; font-size: 10pt; line-height: 1.3; }
    .jobsheet-spec-row span { flex: 0 0 72pt; color: #444; }
    .jobsheet-spec-row strong { color: #111; font-weight: 700; }
    .jobsheet-specs--book { grid-template-columns: 1.05fr 1.05fr 0.9fr; gap: 8px 14px; }
    .jobsheet-spec-heading { display: block; margin-bottom: 1pt; color: #444; font-size: 9pt; line-height: 1.2; }
    .jobsheet-spec-heading--spacer { visibility: hidden; }
    .jobsheet-specs--book .jobsheet-spec-row { gap: 6px; padding: 2px 0; font-size: 8.4pt; }
    .jobsheet-specs--book .jobsheet-spec-row span { flex: 0 0 48pt; }
    .jobsheet-specs--book .jobsheet-spec-row strong { min-width: 0; overflow-wrap: anywhere; }
    .jobsheet-preview-note { margin: auto 0 8px; padding-top: 22px; color: #222; font-size: 12pt; text-align: center; }
    .jobsheet-ack-table { width: 100%; border-collapse: collapse; table-layout: fixed; page-break-inside: avoid; }
    .jobsheet-ack-table th, .jobsheet-ack-table td { border: 1px solid #777; }
    .jobsheet-ack-table th { height: 21pt; padding: 3px; color: #fff; font-size: 8pt; font-weight: 700; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .jobsheet-ack-label { width: 17%; color: #333 !important; background: #fff; font-size: 8pt !important; font-weight: 500 !important; text-align: left !important; }
    .jobsheet-ack-sales { background: #20b65a; }
    .jobsheet-ack-design { background: #8bc34a; }
    .jobsheet-ack-prod { background: #f4b400; }
    .jobsheet-ack-pack { background: #f68b1f; }
    .jobsheet-ack-qc { background: #e21b2d; }
    .jobsheet-print--digital .jobsheet-ack-sales,
    .jobsheet-print--book .jobsheet-ack-sales { background: #0db04b; }
    .jobsheet-print--digital .jobsheet-ack-design,
    .jobsheet-print--book .jobsheet-ack-design { background: #8bc53f; color: #231f20; }
    .jobsheet-print--digital .jobsheet-ack-prod,
    .jobsheet-print--book .jobsheet-ack-prod { background: #ffca05; color: #231f20; }
    .jobsheet-print--digital .jobsheet-ack-pack,
    .jobsheet-print--book .jobsheet-ack-pack { background: #f6921e; }
    .jobsheet-print--digital .jobsheet-ack-qc,
    .jobsheet-print--book .jobsheet-ack-qc { background: #ec1c24; }
    .jobsheet-artwork-empty { color: #9a9a9a; text-align: center; }
    .jobsheet-artwork-empty span { font-size: 8pt; }
    .jobsheet-ack-table td { height: 62pt; background: #fff; }
    .jobsheet-ack-sign { padding: 4px; color: #333; font-size: 8pt; text-align: center; vertical-align: middle; }
    .jobsheet-qr { display: block; width: 42pt; height: 42pt; margin: 0 auto 2px; image-rendering: pixelated; }
    .jobsheet-qr-caption { display: block; color: #555; font-size: 6pt; letter-spacing: .06em; text-align: center; }
    .jobsheet-ack-inspector { position: relative; padding: 8px; }
    .jobsheet-ack-inspector span { position: absolute; right: 7px; bottom: 5px; left: 7px; padding-top: 3px; border-top: 1px solid #333; font-size: 8pt; text-align: center; }
    .print-foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid #ddd; color: #777; font-size: 8.5px; line-height: 1.5; }
    .print-foot strong { color: #333; }
  }
