
  :root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-alt: #edeae2;
    --ink: #1d2321;
    --ink-soft: #3a423e;
    --muted: #6b756f;
    --accent: #0f6e63;
    --accent-ink: #ffffff;
    --accent-soft: #e1eeea;
    --border: #dde1da;
    --danger: #a8442c;
    --danger-soft: #f6e6e1;
    --focus: #0f6e63;
    --radius-s: 8px;
    --radius-m: 14px;
    --radius-l: 20px;
    --shadow: 0 1px 2px rgba(20, 24, 22, 0.04), 0 8px 24px -12px rgba(20, 24, 22, 0.18);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #14181a;
      --surface: #1b2124;
      --surface-alt: #21282b;
      --ink: #edf1ee;
      --ink-soft: #cfd8d3;
      --muted: #93a19b;
      --accent: #55d6c0;
      --accent-ink: #0b1817;
      --accent-soft: #1c3733;
      --border: #2b3336;
      --danger: #e59078;
      --danger-soft: #3a231e;
      --focus: #55d6c0;
      --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    }
  }

  :root[data-theme="dark"] {
    --bg: #14181a;
    --surface: #1b2124;
    --surface-alt: #21282b;
    --ink: #edf1ee;
    --ink-soft: #cfd8d3;
    --muted: #93a19b;
    --accent: #55d6c0;
    --accent-ink: #0b1817;
    --accent-soft: #1c3733;
    --border: #2b3336;
    --danger: #e59078;
    --danger-soft: #3a231e;
    --focus: #55d6c0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
  }

  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  .wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px 80px;
  }

  header.top {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
  }

  .eyebrow {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
  }

  h1 {
    font-family: "Manrope", ui-sans-serif, sans-serif;
    font-weight: 800;
    font-size: clamp(26px, 5vw, 34px);
    margin: 2px 0 0;
    letter-spacing: -0.01em;
    text-wrap: balance;
  }

  .sub {
    color: var(--muted);
    font-size: 14.5px;
    margin-top: 2px;
  }

  section.search {
    position: relative;
    margin-bottom: 28px;
  }

  .search-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
  }

  .search-box {
    position: relative;
  }

  .search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
  }

  #search-input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    padding: 15px 16px 15px 46px;
    border-radius: var(--radius-m);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    outline: none;
    box-shadow: var(--shadow);
    transition: border-color 0.15s ease;
  }

  #search-input:focus-visible {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
  }

  #search-input::placeholder { color: var(--muted); }

  .suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 340px;
    overflow-y: auto;
    display: none;
  }

  .suggestions.open { display: block; }

  .suggestion {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 14.5px;
  }

  .suggestion:last-child { border-bottom: none; }

  .suggestion mark {
    background: var(--accent-soft);
    color: var(--ink);
    border-radius: 3px;
    padding: 0 1px;
  }

  .suggestion .price {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .suggestion.active, .suggestion:hover {
    background: var(--accent-soft);
  }

  .suggestion.add-custom {
    color: var(--accent);
    font-weight: 600;
  }

  .empty-hint {
    padding: 14px 16px;
    color: var(--muted);
    font-size: 13.5px;
  }

  .cart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
  }

  .cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
  }

  .cart-head h2 {
    font-family: "Manrope", sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    margin: 0;
  }

  .cart-head .email {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
  }

  .count-pill {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12.5px;
    font-weight: 500;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
  }

  ul.items {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  li.item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
  }

  li.item:last-child { border-bottom: none; }

  .item-name {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
  }

  .item-price {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
    margin-top: 1px;
  }

  .qty-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    overflow: hidden;
    flex-shrink: 0;
  }

  .qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "IBM Plex Mono", monospace;
  }

  .qty-btn:hover { background: var(--accent-soft); color: var(--accent); }

  .qty-input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    background: var(--surface);
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }

  .qty-input:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

  .remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: var(--radius-s);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .remove-btn:hover { background: var(--danger-soft); color: var(--danger); }

  .cart-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }

  .btn {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .btn-primary:hover { filter: brightness(1.06); }

  .btn-ghost {
    background: var(--surface);
    color: var(--ink-soft);
    border-color: var(--border);
  }

  .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

  .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .empty-cart {
    padding: 44px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14.5px;
  }

  .empty-cart svg {
    width: 34px;
    height: 34px;
    color: var(--border);
    margin-bottom: 10px;
  }

  .future-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--accent-soft);
    border-radius: var(--radius-m);
    color: var(--ink-soft);
    font-size: 13.5px;
    margin-top: 4px;
  }

  .future-note svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

  .toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 12px);
    background: var(--ink);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
    box-shadow: var(--shadow);
  }

  .toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .price-note {
    color: var(--muted);
    font-size: 12px;
    margin-top: 10px;
  }

  .name-row {
    margin-bottom: 20px;
    max-width: 280px;
  }

  .name-input {
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    padding: 10px 12px;
    border-radius: var(--radius-s);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    outline: none;
  }

  .name-input:focus-visible {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  .btn-log {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--accent);
  }

  .btn-log:hover { background: var(--accent-soft); }

  .btn-log[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .btn-danger {
    background: var(--surface);
    color: var(--danger);
    border-color: var(--danger);
  }

  .btn-danger:hover { background: var(--danger-soft); }

  .history-section {
    margin-top: 40px;
  }

  .history-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 4px 0 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
  }

  .history-toggle h2 {
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .history-toggle .chev {
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform 0.15s ease;
    flex-shrink: 0;
  }

  .history-section.open .chev { transform: rotate(180deg); }

  .history-body { display: none; }
  .history-section.open .history-body { display: block; }

  .history-note {
    color: var(--muted);
    font-size: 12.5px;
    margin: 0 0 16px;
  }

  .history-year { margin-bottom: 22px; }

  .history-year-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }

  .history-year-head h3 {
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
  }

  .history-year-total {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
  }

  .history-supplier-totals {
    margin-bottom: 10px;
  }

  .history-supplier-total {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
  }

  .history-entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 12px 16px;
    margin-bottom: 10px;
    font-size: 13.5px;
  }

  .history-entry-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
  }

  .history-entry-who { font-weight: 600; }

  .history-entry-meta {
    color: var(--muted);
    font-size: 12px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    white-space: nowrap;
  }

  .history-entry-items {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
  }

  .history-entry-total {
    margin-top: 6px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12.5px;
    color: var(--muted);
  }

  .history-empty {
    color: var(--muted);
    font-size: 13.5px;
    padding: 8px 0;
  }

  .readonly-badge {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface-alt);
    padding: 3px 9px;
    border-radius: 999px;
  }

  .catalog-section {
    margin-top: 28px;
  }

  .catalog-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 4px 0 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
  }

  .catalog-toggle h2 {
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .catalog-toggle .chev {
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform 0.15s ease;
    flex-shrink: 0;
  }

  .catalog-section.open .chev { transform: rotate(180deg); }

  .catalog-body { display: none; }
  .catalog-section.open .catalog-body { display: block; }

  .catalog-note {
    color: var(--muted);
    font-size: 12.5px;
    margin: 0 0 14px;
  }

  .catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
  }

  .catalog-chip {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
  }

  .catalog-chip:hover { border-color: var(--accent); color: var(--accent); }

  .catalog-chip.active {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
  }

  .catalog-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
  }

  .catalog-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }

  .catalog-row:last-child { border-bottom: none; }

  .catalog-row .catalog-row-name { flex: 1; min-width: 0; }

  .catalog-row .catalog-row-price {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .catalog-row .catalog-row-price.unknown { font-style: italic; }

  .catalog-empty-hint {
    padding: 20px 16px;
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
  }

  .search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
  }

  .search-row .search-box { flex: 1; min-width: 0; }

  .new-item-btn {
    flex-shrink: 0;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    padding: 0 16px;
    border-radius: var(--radius-m);
    border: 1.5px solid var(--accent);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow);
    white-space: nowrap;
  }

  .new-item-btn:hover, .new-item-btn[aria-expanded="true"] { background: var(--accent-soft); }
  .new-item-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .new-item-btn svg { width: 18px; height: 18px; }

  @media (max-width: 420px) {
    .new-item-btn .lbl-long { display: none; }
    .new-item-btn { padding: 0 14px; }
  }
  @media (min-width: 421px) {
    .new-item-btn .lbl-short { display: none; }
  }

  .new-item-panel {
    display: none;
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow);
    padding: 18px 20px 20px;
  }

  .new-item-panel.open { display: block; }

  .new-item-panel h3 {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
  }

  .new-item-panel .panel-sub {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
  }

  .ni-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .ni-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .ni-field.full { grid-column: 1 / -1; }

  .ni-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
  }

  .ni-field .opt { font-weight: 400; color: var(--muted); }

  .ni-input, .ni-select {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    padding: 11px 12px;
    border-radius: var(--radius-s);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    outline: none;
  }

  .ni-input:focus-visible, .ni-select:focus-visible {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  .ni-input.invalid, .ni-select.invalid { border-color: var(--danger); }

  .price-wrap { position: relative; }
  .price-wrap .ni-input { padding-right: 34px; }
  .price-wrap .cur {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    pointer-events: none;
  }

  .ni-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 14px;
    cursor: pointer;
  }

  .ni-check input { width: 18px; height: 18px; accent-color: var(--accent); }

  .ni-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 10px;
    display: none;
  }

  .ni-error.show { display: block; }

  .ni-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
  }

  .ni-actions .btn[disabled] { opacity: 0.6; cursor: progress; }

  @media (max-width: 480px) {
    .ni-grid { grid-template-columns: 1fr; }
    .ni-newsup { order: 1; }
    .ni-price-field { order: 2; }
    .ni-pack-field { order: 3; }
  }

  .ni-newsup {
    display: none;
    grid-column: 1 / -1;
    background: var(--surface-alt);
    border: 1px dashed var(--border);
    border-radius: var(--radius-m);
    padding: 12px 14px 14px;
  }

  .ni-newsup.open { display: block; }

  .ni-newsup .ni-grid { gap: 10px; }

  .ni-newsup-title {
    font-size: 12px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
  }

  .all-sup-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 0 22px;
    padding: 13px 16px;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
  }

  .all-sup-btn:hover { border-color: var(--accent); }
  .all-sup-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .all-sup-btn .ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .all-sup-btn .ico svg { width: 20px; height: 20px; }
  .all-sup-btn .txt { flex: 1; min-width: 0; }
  .all-sup-btn .txt small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
  .all-sup-btn .chev-r { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }

  /* ---------- New layout: header, bottom bar, summary, branding ---------- */
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
  .topbar .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .brand-mark svg { width: 24px; height: 24px; }
  .brandname { font-family: "Space Grotesk", ui-sans-serif, sans-serif !important; font-weight: 700 !important; font-size: 16px !important; letter-spacing: -0.02em !important; text-transform: none !important; display: inline-flex !important; align-items: center; gap: 6px; line-height: 1.2; color: #0f6e63 !important; }
  .nb-tile { width: 20px; height: 20px; border-radius: 6px; background: #0f6e63; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .nb-tile svg { width: 14px; height: 14px; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandname { color: #7fd6c7 !important; } }
  :root[data-theme="dark"] .brandname { color: #7fd6c7 !important; }
  .brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex-shrink: 0; }
  .topbar h1 { font-size: clamp(20px, 4.5vw, 26px); margin: 0; }
  .top-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-s); border: 1.5px solid var(--border); background: var(--surface); color: var(--ink-soft); font: 600 14px "IBM Plex Sans", sans-serif; cursor: pointer; }
  .top-btn:hover, .top-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
  .top-btn svg { width: 17px; height: 17px; }
  @media (max-width: 480px) { .top-btn .lbl { display: none; } }

  .bnav { display: flex; gap: 4px; margin: 0 0 14px; }
  .bnav button {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; position: relative;
    border: 1px solid transparent; background: transparent; color: var(--ink-soft); font: 600 14px "IBM Plex Sans", sans-serif; cursor: pointer;
  }
  .bnav button svg { width: 18px; height: 18px; flex-shrink: 0; }
  .bnav button:hover { background: var(--surface); border-color: var(--border); }
  .bnav button.on { background: var(--accent-soft); color: var(--accent); }
  .nbadge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 10.5px/17px "IBM Plex Mono", monospace; text-align: center; }
  @media (max-width: 759px) {
    .bnav {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; gap: 0;
      background: var(--surface); border-top: 1px solid var(--border);
      padding: 4px max(8px, env(safe-area-inset-left, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
    }
    .bnav button { flex: 1; flex-direction: column; gap: 2px; padding: 5px 2px; border-radius: 10px; font-size: 10.5px; font-weight: 500; }
    .bnav button svg { width: 20px; height: 20px; }
    .bnav button:hover { border-color: transparent; background: transparent; }
    .bnav button.on { background: transparent; color: var(--accent); }
    .bnav .nbadge { position: absolute; top: 1px; left: calc(50% + 4px); }
    .wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
    .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
    .sup-overlay { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
    .sup-overlay .sup-sheet { height: calc(100% - 5vh); }
    .sup-foot { padding-bottom: 12px; }
  }

  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .stat { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 9px 12px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); cursor: pointer; font-family: inherit; color: var(--ink); }
  .stat:hover { border-color: var(--accent); }
  .stat .k { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat .v { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .name-row.compact { margin-bottom: 14px; max-width: 240px; }

  .av {
    --h: 168; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 22px; height: 22px; border-radius: 7px; margin-right: 8px; vertical-align: -5px;
    font: 800 11.5px "Manrope", sans-serif; background: hsl(var(--h) 55% 91%); color: hsl(var(--h) 50% 28%);
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 65% 78%); } }
  :root[data-theme="dark"] .av { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 65% 78%); }

  .brand-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
  .brand-panel h2 { font-family: "Manrope", sans-serif; font-size: 16.5px; margin: 0; }
  .logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .logo-prev { width: 64px; height: 64px; border-radius: 14px; border: 1.5px dashed var(--border); background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; color: #9aa39e; font-size: 11px; text-align: center; }
  .logo-prev img { width: 100%; height: 100%; object-fit: contain; }
  .swatches { display: flex; gap: 10px; flex-wrap: wrap; }
  .sw { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
  .sw i { width: 34px; height: 34px; border-radius: 999px; display: block; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--border); }
  .sw.on i { box-shadow: 0 0 0 2.5px var(--ink); }
  .file-btn { position: relative; overflow: hidden; }
  .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
  .bp-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

  /* requests for quotes */
  .rq-wrap { display: flex; flex-direction: column; gap: 12px; }
  .rq-new { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; font: 600 14.5px "IBM Plex Sans", sans-serif; color: var(--accent); background: var(--surface); border: 1.5px dashed var(--accent); border-radius: var(--radius-m); cursor: pointer; }
  .rq-new:hover { background: var(--accent-soft); }
  .rq-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
  .rq-form h3 { font-family: "Manrope", sans-serif; font-size: 16px; margin: 0; }
  .rq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .rq-grid .full { grid-column: 1 / -1; }
  @media (max-width: 480px) { .rq-grid { grid-template-columns: 1fr; } }
  .rq-chk { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
  .rq-chk label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
  .rq-chk input { width: 18px; height: 18px; accent-color: var(--accent); }
  .rq-chk small { color: var(--muted); font: 12px "IBM Plex Mono", monospace; }
  .rq-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
  .rq-head { padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--border); }
  .rq-head h3 { font-family: "Manrope", sans-serif; font-size: 16px; margin: 0; }
  .rq-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .rq-status { font: 12px "IBM Plex Mono", monospace; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-alt); color: var(--ink-soft); }
  .rq-status.done { background: var(--accent-soft); color: var(--accent); }
  .rq-row { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
  .rq-row:last-child { border-bottom: none; }
  .rq-row.best, .rq-row.chosen { background: var(--accent-soft); }
  .rq-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
  .rq-row-top b { font-weight: 600; font-size: 14.5px; }
  .rq-tag { font: 500 10.5px "IBM Plex Mono", monospace; color: var(--accent-ink); background: var(--accent); padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
  .rq-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 13px "IBM Plex Mono", monospace; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .rq-nums .big { font-weight: 600; color: var(--ink); }
  .rq-wait { font-size: 13px; color: var(--muted); font-style: italic; }
  .rq-acts { display: flex; gap: 8px; flex-wrap: wrap; }
  .rq-acts .btn { padding: 7px 12px; font-size: 13px; }
  .rq-offer-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
  .rq-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface-alt); border-top: 1px solid var(--border); align-items: center; }
  .rq-foot .btn { padding: 7px 12px; font-size: 13px; }
  .rq-input { width: 100%; font: 16px "IBM Plex Sans", sans-serif; padding: 10px 12px; border-radius: var(--radius-s); border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); outline: none; }
  .rq-input:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
  .rq-err { color: var(--danger); font-size: 13px; }
  .rq-err:empty { display: none; }
  .rq-lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }

  /* history window */
  .hs-wrap { display: flex; flex-direction: column; gap: 10px; }
  .hs-year { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
  .hs-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .hs-top h3 { font-size: 15px; color: var(--muted); font-weight: 600; margin: 0; }
  .hs-total { font-family: "Manrope", sans-serif; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .hs-sub { font-size: 13px; color: var(--muted); }
  .bars { display: flex; flex-direction: column; gap: 8px; }
  .bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13.5px; }
  .bar-row .amt { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; font-variant-numeric: tabular-nums; }
  .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
  .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
  .hs-month { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 6px 0 -2px; }
  .hs-entry { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
  .hs-entry-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
  .hs-entry-head b { font-weight: 600; font-size: 14.5px; }
  .hs-entry-head .amt { font-family: "IBM Plex Mono", monospace; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .hs-entry .d { font-size: 12.5px; color: var(--muted); }
  .hs-items { font-size: 13px; color: var(--ink-soft); }
  .chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .chip { font: 600 13px "IBM Plex Sans", sans-serif; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
  .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .hs-note { font-size: 12.5px; color: var(--muted); margin: 0; }

  .sup-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(10, 14, 13, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .sup-item .qty-group { border-color: var(--accent); }
  .sup-item .qty-btn { width: 34px; height: 34px; }
  .sup-item .qty-input { width: 40px; height: 34px; }
  .sup-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }
  .sup-foot .sf-sum { flex: 1; min-width: 0; font-size: 14px; }
  .sup-foot .sf-sum b { display: block; font-weight: 600; }
  .sup-foot .sf-sum span { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--muted); }

  .sup-sheet {
    background: var(--bg);
    width: 100%;
    max-width: 640px;
    height: 92vh;
    height: 92dvh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.35);
  }

  @media (min-width: 640px) {
    .sup-overlay { align-items: center; padding: 24px; }
    .sup-sheet { height: min(82vh, 780px); border-radius: var(--radius-l); }
  }

  .sup-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .sup-head-text { flex: 1; min-width: 0; }

  .sup-head h2 {
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sup-sub {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .icon-btn:hover { background: var(--surface-alt); }
  .icon-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
  .icon-btn svg { width: 20px; height: 20px; }

  .sup-filter {
    padding: 12px 16px 4px;
    flex-shrink: 0;
  }

  .sup-filter input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    padding: 11px 14px;
    border-radius: var(--radius-s);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    outline: none;
  }

  .sup-filter input:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }

  .sup-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 28px;
  }

  .sup-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    font: inherit;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }

  .sup-card:hover { border-color: var(--accent); }
  .sup-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .sup-card .sc-main { flex: 1; min-width: 0; }
  .sup-card .sc-name { font-weight: 600; font-size: 15px; display: block; }
  .sup-card .sc-mail {
    display: block;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sup-card .sc-count {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    text-align: right;
  }
  .sup-card .sc-count .in-cart { display: block; color: var(--accent); }
  .sup-card svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }

  .sup-items {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    overflow: hidden;
  }

  .sup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }

  .sup-item:last-child { border-bottom: none; }
  .sup-item .si-name { flex: 1; min-width: 0; }
  .sup-item .si-name mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 1px; }
  .sup-item .si-price {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 13px;
    color: var(--ink-soft);
    white-space: nowrap;
    text-align: right;
  }
  .sup-item .si-price.unknown { color: var(--muted); font-style: italic; font-size: 12.5px; }
  .sup-item .si-qty {
    display: block;
    font-size: 11.5px;
    color: var(--accent);
    font-style: normal;
  }

  .si-add {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1.5px solid var(--accent);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .si-add:hover { background: var(--accent-soft); }
  .si-add.in { background: var(--accent); color: var(--accent-ink); }
  .si-add:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .si-add svg { width: 18px; height: 18px; }

  .si-edit-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .si-edit-btn:hover { color: var(--accent); border-color: var(--accent); }
  .si-edit-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .si-edit-btn svg { width: 16px; height: 16px; }

  .sup-item.no-price .si-edit-btn { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

  .sup-item.editing {
    display: block;
    background: var(--accent-soft);
    padding: 14px 16px;
  }

  .si-edit-grid {
    display: grid;
    grid-template-columns: 1fr 120px 110px;
    gap: 10px;
  }

  .si-edit-grid label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 4px;
  }

  .si-edit-grid .ni-input { padding: 10px 12px; }

  @media (max-width: 480px) {
    .si-edit-grid { grid-template-columns: 1fr; }
  }

  .si-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
  }

  .si-edit-actions .btn { padding: 9px 14px; }
  .si-edit-actions .btn[disabled] { opacity: 0.6; cursor: progress; }

  .si-edit-err { color: var(--danger); font-size: 13px; margin-top: 8px; }
  .si-edit-err:empty { display: none; }

  .sup-hint {
    color: var(--muted);
    font-size: 12.5px;
    margin: 0 0 10px;
  }

  .sup-empty {
    padding: 28px 16px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
  }

  .copy-panel {
    padding: 14px 20px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }

  .copy-panel .cp-hint {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 12px;
  }

  .cp-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .cp-row:last-child { border-bottom: none; padding-bottom: 0; }

  .cp-num {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .cp-main { flex: 1; min-width: 0; }
  .cp-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); display: block; }
  .cp-value {
    font-size: 14px;
    color: var(--ink);
    word-break: break-word;
    display: block;
    margin-top: 1px;
  }
  .cp-value.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
  .cp-value.missing { color: var(--danger); font-style: italic; }

  .cp-body {
    margin-top: 6px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--ink-soft);
    background: var(--surface-alt);
    border-radius: var(--radius-s);
    padding: 8px 10px;
    max-height: 140px;
    overflow-y: auto;
  }

  .cp-btn {
    flex-shrink: 0;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-s);
    border: 1.5px solid var(--accent);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
  }

  .cp-btn:hover { background: var(--accent-soft); }
  .cp-btn.done { background: var(--accent); color: var(--accent-ink); }
  .cp-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  .mail-pref {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--ink-soft);
  }

  .mail-pref label { font-weight: 600; }

  .mail-pref .ni-select {
    width: auto;
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    padding: 9px 12px;
  }

  .pack-wrap { position: relative; }
  .pack-wrap .pre {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 15px;
    font-weight: 500;
    pointer-events: none;
  }
  .pack-wrap .ni-input { padding-left: 30px; }
  .pack-hint { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }

  .badge-pack {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    padding: 0 6px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: 1px;
    white-space: nowrap;
  }

  .sup-add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--accent);
    background: var(--surface);
    border: 1.5px dashed var(--accent);
    border-radius: var(--radius-m);
    cursor: pointer;
  }
  .sup-add-btn:hover { background: var(--accent-soft); }
  .sup-add-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .sup-add-btn svg { width: 18px; height: 18px; }

  .sup-add-form {
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  .sup-add-form h3 {
    font-family: "Manrope", sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px;
  }

  .vat-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
  .vat-bar.unset { border-color: #c98a1a; background: #fdf6e8; }
  .vat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
  .vat-q { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
  .vat-opts { display: inline-flex; gap: 6px; }
  .vat-seg { font: 600 13px "IBM Plex Sans", sans-serif; padding: 7px 12px; min-height: 36px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
  .vat-seg.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .vat-seg:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .vat-warn { margin: 0; font-size: 13px; color: #8a5a00; }
  .vat-note { margin: 0; font-size: 12px; color: var(--muted); }
  .vat-bar .si-edit-actions { margin-top: 2px; }
  .badge-vat { font: 500 10.5px "IBM Plex Mono", monospace; color: #8a5a00; background: #fdf0d5; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
  .si-vat { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
  .si-vat-field { grid-column: 1 / -1; }
  .si-vat-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
  .si-edit-grid .si-vat-field select { padding: 10px 12px; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vat-bar.unset { background: #2e2615; border-color: #8a6420; } :root:not([data-theme="light"]) .vat-warn, :root:not([data-theme="light"]) .badge-vat { color: #f0c46a; } :root:not([data-theme="light"]) .badge-vat { background: #3a2e14; } }
  :root[data-theme="dark"] .vat-bar.unset { background: #2e2615; border-color: #8a6420; }
  :root[data-theme="dark"] .vat-warn, :root[data-theme="dark"] .badge-vat { color: #f0c46a; }
  :root[data-theme="dark"] .badge-vat { background: #3a2e14; }

  .sent-ask { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 12px 20px; background: var(--accent-soft); border-top: 1px solid var(--border); font-weight: 600; font-size: 14.5px; }
  .sent-ask .sent-btns { display: inline-flex; gap: 8px; }
  .sent-ask .btn { padding: 8px 14px; }
  .sent-ask small { flex-basis: 100%; font-weight: 400; font-size: 12.5px; color: var(--muted); }

  .badge-new {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: 1px;
    white-space: nowrap;
  }

  /* ---------- Samostojna aplikacija: prijava, nastavitve ---------- */
  [hidden] { display: none !important; }
  .auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; }
  .auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; }
  .loading-card { align-items: center; text-align: center; }
  .auth-brand { display: flex; align-items: center; gap: 12px; }
  .nb-tile.big { width: 48px; height: 48px; border-radius: 13px; }
  .nb-tile.big svg { width: 30px; height: 30px; }
  .auth-name { display: block; font: 700 26px/1.1 "Space Grotesk", sans-serif; letter-spacing: -0.02em; color: #0f6e63; }
  .auth-tag { display: block; font-size: 13px; color: var(--muted); }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-name { color: #7fd6c7; } }
  .auth-card h1 { font-size: 24px; margin: 6px 0 0; }
  .auth-card h2 { font-family: "Manrope", sans-serif; font-size: 16px; margin: 0; }
  .auth-card form { display: flex; flex-direction: column; gap: 12px; }
  .auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
  .auth-sub, .auth-hint { margin: 0; font-size: 13.5px; color: var(--muted); }
  .auth-err { margin: 0; color: var(--danger); font-size: 13.5px; }
  .auth-err:empty, .auth-ok:empty { display: none; }
  .auth-ok { margin: 0; color: var(--accent); font-size: 13.5px; font-weight: 600; }
  .auth-submit { justify-content: center; min-height: 46px; font-size: 15px; }
  .auth-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .linkbtn { background: none; border: none; padding: 8px 0; color: var(--accent); font: 600 14px "IBM Plex Sans", sans-serif; cursor: pointer; min-height: 40px; }
  .linkbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .ob-block { display: flex; flex-direction: column; gap: 10px; }
  .ob-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
  .ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  .code-in { text-transform: uppercase; letter-spacing: 0.12em; font-family: "IBM Plex Mono", monospace; }

  .set-h { font-family: "Manrope", sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 10px 0 -4px; padding-top: 12px; border-top: 1px solid var(--border); }
  .brand-panel .set-h:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
  .set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 520px) { .set-grid { grid-template-columns: 1fr; } }
  .set-field { display: flex; flex-direction: column; }
  .set-field .search-label { margin-bottom: 6px; }
  .invite-box { background: var(--accent-soft); border-radius: var(--radius-m); padding: 12px 14px; }
  .invite-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .join-code { font: 600 20px "IBM Plex Mono", monospace; letter-spacing: 0.14em; color: var(--ink); background: var(--surface); padding: 6px 12px; border-radius: var(--radius-s); border: 1px solid var(--border); }
  .members-list { display: flex; flex-direction: column; gap: 6px; }
  .mem-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
  .mem-main { display: flex; flex-direction: column; min-width: 0; }
  .mem-main b { font-weight: 600; font-size: 14.5px; }
  .mem-main span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
  .mem-acts { display: flex; gap: 6px; flex-wrap: wrap; }
  .mem-acts .btn { padding: 7px 10px; font-size: 13px; }
  .me-line { margin: 0; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
  .set-acts { display: flex; gap: 8px; flex-wrap: wrap; }

  /* izbira programa za pošto: majhen spustni seznam */
  .mail-pref { flex-direction: row; align-items: center; gap: 8px; }
  .mp-label { font-weight: 600; font-size: 13.5px; color: var(--ink-soft); }
  .mp-wrap { position: relative; }
  .mp-current { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 10px 5px 8px; border-radius: var(--radius-s);
                border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
  .mp-current:hover, .mp-current[aria-expanded="true"] { border-color: var(--accent); }
  .mp-current:focus-visible, .mp-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .mp-chev { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
  .mo-ic { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
           background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
  .mo-ic svg { width: 15px; height: 15px; }
  .mo-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
  .mo-txt b { font-size: 14px; font-weight: 600; color: var(--c); }
  .mo-txt small { font-size: 11.5px; color: var(--muted); }
  .mp-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 250px; background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius-m); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
  .mp-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; border: none; border-radius: var(--radius-s);
             background: none; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
  .mp-item:hover, .mp-item.on { background: var(--surface-alt); }
  .mp-item .mo-txt { flex: 1; }
  .mp-check { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
  .mopt-ol { --c: #0f6cbd; }
  .mopt-gm { --c: #c5221f; }
  .mopt-ot { --c: #5b6662; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .mopt-ol { --c: #6cb4ff; }
    :root:not([data-theme="light"]) .mopt-gm { --c: #ff8a80; }
    :root:not([data-theme="light"]) .mopt-ot { --c: #b5c0bb; }
  }
