/* Nico — Quotes (nico-quotes.js). Tokens only; dark / light / sierra. Shared, identical in IOS/ and renderer/. */
.nq { font-family: var(--sans, -apple-system, system-ui, sans-serif); color: var(--text); display: flex; flex-direction: column; gap: 12px; margin: 4px 0 24px; container: nq / inline-size; }
.nq * { box-sizing: border-box; }
.nq-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nq-head h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.nq-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.nq-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.nq-tabs::-webkit-scrollbar { display: none; }
.nq-tabs button { appearance: none; flex: none; border: 0.5px solid var(--line); background: var(--surface-1); color: var(--text-2); font: 500 13px var(--sans, system-ui); padding: 0 12px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.nq-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg, var(--surface-1)); border-color: transparent; font-weight: 600; }
.nq-search { width: 100%; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 0.5px solid var(--line); background: var(--surface-1); color: var(--text); font: 14px var(--sans, system-ui); }
.nq-search::placeholder { color: var(--text-4); }
.nq-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--surface-1); border: 0.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.nq-rows li + li { border-top: 0.5px solid var(--line); }
.nq-row { appearance: none; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; min-height: 64px; }
.nq-row:hover { background: var(--surface-2); }
.nq-r1, .nq-r2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.nq-r1 b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nq-amt { font-size: 14.5px; font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nq-num { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nq-r3 { font-size: 12.5px; color: var(--text-3); }
.nq-pill { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.nq-pill.info { color: var(--info); background: color-mix(in oklch, var(--info) 14%, transparent); }
.nq-pill.accent { color: var(--accent-text, var(--accent)); background: color-mix(in oklch, var(--accent) 16%, transparent); }
.nq-pill.ok { color: var(--ok); background: color-mix(in oklch, var(--ok) 14%, transparent); }
.nq-pill.warn { color: var(--warn, var(--accent)); background: color-mix(in oklch, var(--warn, var(--accent)) 16%, transparent); }
.nq-pill.muted { color: var(--text-3); }
.nq-msg { margin: 6px 2px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.nq-msg:empty { display: none; }
.nq-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
.nq-dim { color: var(--text-3); font-size: 12.5px; }
.nq-more { align-self: center; appearance: none; border: 0; background: none; color: var(--accent-text, var(--accent)); font: 600 13px var(--sans, system-ui); min-height: 40px; cursor: pointer; }
.nq-link { appearance: none; border: 0; background: none; padding: 0; color: var(--accent-text, var(--accent)); font: 600 13px var(--sans, system-ui); cursor: pointer; min-height: 32px; }
.nq-skel { display: flex; flex-direction: column; gap: 8px; }
.nq-skel i { display: block; height: 58px; border-radius: 12px; background: var(--surface-2); animation: nq-pulse 1.2s ease-in-out infinite; }
@keyframes nq-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .nq-skel i { animation: none; } }

.nq-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0.5px solid var(--line); background: var(--surface-1); color: var(--text); font: 600 13.5px var(--sans, system-ui); cursor: pointer; text-decoration: none; white-space: nowrap; }
.nq-btn:hover { border-color: var(--line-bright, var(--line)); }
.nq-btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent, #fff); }
.nq-btn.danger { color: var(--err); }
.nq-btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.nq-btn:disabled { opacity: .55; cursor: default; }
.nq-btn:focus-visible, .nq-row:focus-visible, .nq-tabs button:focus-visible, .nq-x:focus-visible, .nq-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sheet: bottom sheet on phones, side drawer when wide */
.nq-scrim { position: fixed; inset: 0; z-index: 1000; background: color-mix(in oklch, black 38%, transparent); display: flex; align-items: flex-end; justify-content: center; }
.nq-scrim[hidden] { display: none; }
.nq-sheet { width: 100%; max-height: 92vh; overflow-y: auto; background: var(--bg, var(--surface-1)); color: var(--text); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 40px color-mix(in oklch, black 25%, transparent); padding: 6px 18px calc(18px + env(safe-area-inset-bottom)); font-family: var(--sans, -apple-system, system-ui, sans-serif); }
@media (min-width: 720px) { .nq-scrim { justify-content: flex-end; align-items: stretch; } .nq-sheet { width: 480px; max-height: none; height: 100%; border-radius: 0; padding: 14px 22px 22px; } }
.nq-sheet-in { display: flex; flex-direction: column; gap: 14px; }
.nq-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0 8px; background: var(--bg, var(--surface-1)); border-bottom: 0.5px solid var(--line); }
.nq-top h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.015em; outline: none; }
.nq-top p { margin: 4px 0 0; font-size: 13px; color: var(--text-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nq-x { appearance: none; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); font: 400 20px/1 var(--sans, system-ui); cursor: pointer; }
.nq-x.sm { width: 32px; height: 32px; font-size: 18px; background: none; }
.nq-k { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-4); margin-bottom: 3px; }
.nq-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; font-size: 14px; }
.nq-grid2 > div { min-width: 0; overflow-wrap: anywhere; }
.nq-lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.nq-lines th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0 6px; border-bottom: 0.5px solid var(--line); }
.nq-lines td { padding: 9px 0; border-bottom: 0.5px solid var(--line); vertical-align: top; }
.nq-lines .n { text-align: right; padding-left: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nq-totals { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); margin-left: auto; min-width: 60%; }
.nq-totals div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.nq-totals .grand { color: var(--text); font-weight: 650; font-size: 16px; padding-top: 6px; border-top: 0.5px solid var(--line); }
.nq-note p { margin: 0; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.nq-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.nq-tl li { display: flex; justify-content: space-between; gap: 10px; }
.nq-tl time { color: var(--text-3); white-space: nowrap; }
.nq-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.nq-linkbox { display: flex; gap: 8px; }
.nq-linkbox input { flex: 1; min-width: 0; }

.nq-form { display: flex; flex-direction: column; gap: 14px; }
.nq-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.nq-form legend { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-4); margin-bottom: 6px; }
.nq-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); }
.nq-form label.nq-radio { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; min-height: 40px; }
.nq-form input:not([type="radio"]), .nq-form textarea, .nq-linkbox input, .nq-line input { min-height: 40px; padding: 8px 11px; border-radius: 10px; border: 0.5px solid var(--line); background: var(--surface-1); color: var(--text); font: 14px var(--sans, system-ui); width: 100%; }
.nq-form textarea { resize: vertical; line-height: 1.45; }
.nq-form input:focus, .nq-form textarea:focus, .nq-line input:focus, .nq-search:focus { outline: 2px solid color-mix(in oklch, var(--accent) 60%, transparent); outline-offset: 0; border-color: transparent; }
.nq-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nq-lines-ed { display: flex; flex-direction: column; gap: 8px; }
.nq-line { display: grid; grid-template-columns: minmax(0, 1fr) 64px 96px 32px; gap: 6px; align-items: center; }
.nq-line input[data-f="quantity"], .nq-line input[data-f="unit_price"] { text-align: right; font-variant-numeric: tabular-nums; }
/* phones: the item gets its own row, quantity and price under it */
@media (max-width: 480px) { .nq-line { grid-template-columns: 72px minmax(0, 1fr) 32px; padding-bottom: 8px; border-bottom: 0.5px solid var(--line); } .nq-line input[data-f="name"] { grid-column: 1 / -1; } }
