/* Smart Quote design system: shared by the quote page and Admin. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f8f9fb; --sunken: #f1f3f6;
  --ink: #0e1726; --ink-2: #344054; --muted: #667085; --faint: #98a2b3;
  --line: #e4e7ec; --line-2: #eef0f3;
  --brand: #0f2747; --brand-2: #1d3a63; --brand-soft: #eaf0f8;
  --gold: #b08d57; --gold-soft: #f7f1e6;
  --good: #16794c; --good-soft: #e7f6ef; --warn: #b54708; --warn-soft: #fef3e6; --bad: #c0362c; --bad-soft: #fdeceb;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05); --sh-2: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --sh-3: 0 12px 32px -8px rgba(16,24,40,.18), 0 4px 8px -4px rgba(16,24,40,.06);
  --ring: 0 0 0 3px rgba(15,39,71,.14);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand-2); }
.hidden { display: none !important; }
.num, .ex, .money input { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #e8d3a8; }
.brand .mark svg { width: 20px; height: 20px; }
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; } .brand small { display: block; font-size: 11.5px; color: var(--muted); }
.side .group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); margin: 20px 10px 6px; }
.side nav a, .side .foot a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2);
  text-decoration: none; font-weight: 400; cursor: pointer; margin-bottom: 2px; }
.side nav a svg.i { color: var(--faint); }
.side nav a:hover, .side .foot a:hover { background: var(--sunken); color: var(--ink); }
.side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; } .side nav a.on svg.i { color: var(--brand); }
.side .foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.side .foot .who { font-size: 12px; color: var(--muted); padding: 4px 10px 8px; }
.main { min-width: 0; }
.top { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 32px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(8px); position: sticky; top: 0; z-index: 4; }
.top h1 { font-size: 16px; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.top .meta { font-size: 12.5px; color: var(--muted); }
.content { max-width: 1180px; margin: 0 auto; padding: 28px 32px 120px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 8px 0 0; } .brand small, .side .group { display: none; }
  .side nav { display: flex; gap: 2px; } .side nav a { white-space: nowrap; margin: 0; }
  .side .foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; } .side .foot .who { display: none; }
  .top { padding: 0 16px; } .content { padding: 20px 16px 120px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 15px; margin: 0 0 2px; font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 680px) { .two { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
button { font: inherit; font-weight: 550; border: 1px solid transparent; border-radius: var(--r-sm); padding: 8px 14px; cursor: pointer;
  background: var(--brand); color: #fff; line-height: 1.3; transition: background .12s, box-shadow .12s, border-color .12s; }
button:hover { background: var(--brand-2); } button:focus-visible { outline: none; box-shadow: var(--ring); }
button:disabled { opacity: .55; cursor: default; }
button.ghost, button.secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line); box-shadow: var(--sh-1); }
button.ghost:hover, button.secondary:hover { background: var(--sunken); color: var(--ink); }
button.save { background: var(--brand); }
button.del { background: var(--bad-soft); color: var(--bad); } button.del:hover { background: #fadcd9; }
button.link { background: none; color: var(--brand-2); padding: 2px 6px; font-weight: 500; font-size: 13px; box-shadow: none; }
button.link:hover { text-decoration: underline; background: none; }
button.textdel { background: none; color: var(--bad); padding: 6px 4px; font-weight: 500; font-size: 13px; }
button.textdel:hover { background: none; text-decoration: underline; }
button.small { padding: 5px 10px; font-size: 12.5px; }
button.big { padding: 12px 18px; font-size: 15px; border-radius: 10px; }
button .i { margin: -2px 6px -4px 0; width: 16px; height: 16px; }

/* ---------- inputs ---------- */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=number], input[type=search], input[type=email], input[type=password], input[type=tel], select, textarea {
  font: inherit; width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); box-shadow: var(--sh-1); transition: border-color .12s, box-shadow .12s; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23667085' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
textarea { height: auto; min-height: 64px; padding: 9px 12px; line-height: 1.45; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #d4d4d0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=number]::-webkit-inner-spin-button { display: none; }
input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; }
.money { display: flex; align-items: center; gap: 8px; } .money span { color: var(--muted); font-size: 13px; }
.money b { color: var(--muted); font-weight: 500; }
.auto { background-color: var(--gold-soft) !important; border-color: #e2cfa8 !important; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }

/* ---------- toggle ---------- */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin: 0; }
.toggle input { display: none; }
.toggle i { width: 36px; height: 20px; border-radius: 999px; background: #d0d5dd; position: relative; transition: .15s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + i { background: var(--brand); } .toggle input:checked + i::after { left: 18px; }

/* ---------- segmented / tabs ---------- */
.steps, .seg-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.steps button, .seg-tabs button { background: transparent; color: var(--muted); border: 0; padding: 6px 14px; font-size: 13px; border-radius: 7px; box-shadow: none; }
.steps button:hover, .seg-tabs button:hover { color: var(--ink); background: transparent; }
.steps button.on, .seg-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); }

/* stone type picker */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-align: left; color: var(--ink);
  font-weight: 400; box-shadow: var(--sh-1); display: block; }
.type:hover { background: var(--surface); border-color: #cfd4dc; }
.type.on { border-color: var(--brand); box-shadow: var(--ring); }
.type b { display: block; font-size: 14px; font-weight: 600; } .type span { font-size: 12px; color: var(--muted); }
@media (max-width: 680px) { .types { grid-template-columns: 1fr; } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--sunken); color: var(--ink-2); }
.badge.high { background: var(--good-soft); color: var(--good); } .badge.medium { background: var(--warn-soft); color: var(--warn); }
.badge.low { background: var(--bad-soft); color: var(--bad); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- tiles & chips (colours, clarities, cut types) ---------- */
.ghead { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 14px 0 8px; font-weight: 600; }
.ghead:first-of-type { margin-top: 4px; }
.tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; align-items: center; gap: 7px;
  height: 34px; box-shadow: var(--sh-1); }
.tile.letter { width: 38px; justify-content: center; font-size: 14px; font-weight: 600; color: var(--ink); }
.tile.named { padding: 0 11px 0 9px; font-weight: 500; font-size: 13px; }
.tile.clar { padding: 0 11px; } .tile.clar b { font-size: 13px; font-weight: 600; } .tile.clar span { font-size: 11.5px; color: var(--muted); }
.tile .x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; padding: 0; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1; display: none; font-weight: 500; box-shadow: var(--sh-2); }
.tile:hover { border-color: #cfd4dc; } .tile:hover .x { display: grid; place-items: center; }
.tile .x:hover { color: #fff; background: var(--bad); border-color: var(--bad); }
.sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); flex: none; box-shadow: inset 0 -2px 3px rgba(0,0,0,.08); }
.addrow { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); align-items: center; flex-wrap: wrap; }
.addrow input { max-width: 220px; height: 34px; } .addrow button { padding: 6px 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--sunken); font-size: 13px; font-weight: 500; margin: 0; }
.chip input { display: none; }
.chip span { display: inline-block; }
label.chip { background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--ink-2); box-shadow: var(--sh-1); }
label.chip:hover { border-color: #cfd4dc; }
label.chip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.cut { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; }

/* ---------- shape / metal cards ---------- */
.shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.shape { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .12s; box-shadow: var(--sh-1); }
.shape:hover { border-color: #cfd4dc; box-shadow: var(--sh-2); transform: translateY(-1px); }
.shape.inactive { opacity: .55; background: var(--surface-2); }
.shape.dragging { opacity: .3; } .shape.over { outline: 2px dashed var(--brand-2); outline-offset: 2px; }
.shape svg, .shape img.ico { width: 32px; height: 32px; color: var(--ink-2); object-fit: contain; }
.shape b { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.shape .meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.shape .st { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--good-soft); color: var(--good); }
.shape .st.no { background: var(--sunken); color: var(--muted); }
.shape.new { display: grid; place-items: center; border-style: dashed; color: var(--muted); font-weight: 500; min-height: 100px; box-shadow: none; background: transparent; }
.shape.new:hover { color: var(--brand); border-color: var(--brand-2); background: var(--surface); }
.msw { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); box-shadow: inset 0 -3px 6px rgba(0,0,0,.1); }
.msw.sm { width: 16px; height: 16px; }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; width: min(520px, 94vw); box-shadow: var(--sh-3); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(14,23,38,.4); backdrop-filter: blur(2px); }
.dtop { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.dico { width: 48px; height: 48px; border-radius: var(--r); background: var(--sunken); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.dico img, .dico svg { width: 32px; height: 32px; } .dico .msw { width: 30px; height: 30px; }
.dtop .nm { flex: 1; min-width: 0; } .dtop .nm small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.dtop .nm input { font-size: 17px; font-weight: 600; border: 1px solid transparent; padding: 0 7px; margin-left: -8px; box-shadow: none; height: 34px; }
.dtop .nm input:hover { border-color: var(--line); }
.dtop .act { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.dbody { padding: 4px 20px 18px; } .dsec { margin-top: 16px; }
.dsec .lbl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.dsec .lbl .cnt, .cnt { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 550;
  border: 1px dashed #d0d5dd; color: var(--faint); background: var(--surface); cursor: pointer; user-select: none; transition: .1s; }
.opt.sq { width: 34px; padding: 0; justify-content: center; } .opt .sw { opacity: .4; }
.opt.on { border: 1px solid var(--brand); background: var(--brand-soft); color: var(--brand); } .opt.on .sw { opacity: 1; }
.opt:hover { border-color: var(--brand-2); }
dialog footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
dialog footer .row { gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.seg button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); text-align: left; padding: 10px 12px; box-shadow: var(--sh-1); }
.seg button:hover { background: var(--surface-2); }
.seg button small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: var(--ring); }

/* ---------- tables ---------- */
table.list { border-collapse: collapse; width: 100%; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
.range { border: 1px solid var(--line); border-radius: var(--r); margin-top: 14px; overflow: hidden; background: var(--surface); }
.range .head { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.range .head b { font-weight: 600; } .range .head input { width: 76px; text-align: center; height: 32px; }
.gridwrap { overflow-x: auto; padding: 12px; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 520px; }
table.grid th { font-weight: 600; font-size: 12px; color: var(--muted); padding: 6px 8px; text-align: center; }
table.grid td { padding: 3px; }
table.grid td.c { font-weight: 600; font-size: 13px; padding: 0 10px; white-space: nowrap; color: var(--ink-2); }
table.grid input { text-align: center; height: 34px; box-shadow: none; font-variant-numeric: tabular-nums; }
table.grid input.empty { background: var(--surface-2); border-style: dashed; }

.steps-t td { vertical-align: middle; } .steps-t td:first-child { color: var(--faint); width: 32px; font-variant-numeric: tabular-nums; }
.steps-t .sub { margin: 2px 0 0; font-size: 12px; } .steps-t .ex { text-align: right; white-space: nowrap; font-weight: 500; }
.steps-t .aud { color: var(--muted); font-size: 12px; margin-left: 6px; white-space: nowrap; }
.steps-t input { max-width: 110px; }
.steps-t tr.subt td { background: var(--surface-2); }
.steps-t tr.final td { border-top: 1px solid var(--ink); font-size: 16px; padding-top: 14px; } .steps-t tr.final .ex { font-weight: 700; }

.pricebox { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); }
.pricebox input { font-size: 17px; font-weight: 600; max-width: 180px; height: 42px; }

/* ---------- save bar, toast ---------- */
.bar { position: fixed; left: 248px; right: 0; bottom: 0; padding: 12px 32px; display: flex; justify-content: center; z-index: 5;
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.bar > div { max-width: 1180px; width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
@media (max-width: 900px) { .bar { left: 0; padding: 12px 16px; } }
.msg { color: var(--muted); font-size: 13px; } .msg.dirty { color: var(--warn); font-weight: 550; } .msg.err { color: var(--bad); font-weight: 550; } .msg.ok { color: var(--good); font-weight: 550; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500; opacity: 0; transition: .2s; pointer-events: none; z-index: 20; box-shadow: var(--sh-3); }
.toast.show { opacity: 1; transform: translateX(-50%); } .toast.err { background: var(--bad); }

/* ---------- sign-in ---------- */
#gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 70px 16px 40px; background: var(--bg); }
.gatebox { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 44px 40px 26px;
  box-shadow: 0 24px 60px -24px rgba(16,24,40,.22); }
.gatebox .logo { padding: 0 0 44px; } .gatebox .logo .w { font-size: 27px; } .gatebox .logo .s { font-size: 14px; }
.gatebox h2 { font: 400 28px/1.2 var(--serif); text-align: center; margin: 0 0 6px; letter-spacing: 0; }
.gatebox .sub { text-align: center; font-size: 14px; margin: 0 0 22px; }
.gatebox label { font-size: 13px; margin: 14px 0 6px; }
.gatebox input { height: 44px; } .gatebox input.bad { border-color: var(--bad); }
.gatebox button[type=submit] { width: 100%; height: 44px; margin-top: 16px; font-size: 14.5px; }
.gatebox .alt { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.gatebox .alt a { font-weight: 600; color: var(--brand); text-decoration: none; margin-left: 4px; } .gatebox .alt a:hover { text-decoration: underline; }
.alert { display: flex; align-items: center; gap: 10px; background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px;
  font-size: 13px; font-weight: 500; margin-top: 16px; } .alert svg.i { width: 16px; height: 16px; }
.alert.okay { background: var(--good-soft); color: var(--good); }
.gatefoot { margin-top: 44px; font-size: 12px; color: var(--muted); text-align: center; }

/* Admin > Accuracy check */
.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.acc-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.acc-stats small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.acc-stats b { display: block; font-size: 24px; font-weight: 650; margin: 4px 0 2px; color: var(--ink); }
.acc-stats b.dir { font-size: 15px; line-height: 1.35; }
.acc-stats span { color: var(--muted); font-size: 12px; }
table.acc td.ph { width: 64px; }
table.acc img, table.acc .noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--sunken); display: block; }
table.acc .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
table.acc td:nth-child(4) { width: 220px; }
table.acc .money { display: flex; align-items: center; gap: 6px; }
table.acc .money span { color: var(--muted); }

/* ======================================================================
   Look 2 (owner's designs): logo, page header, sections, shape cards
   ====================================================================== */
.logo { display: block; text-decoration: none; text-align: center; padding: 8px 6px 28px; line-height: 1; }
.logo .w { display: block; font: 300 23px/1 "Jost", var(--font); letter-spacing: .06em; color: #4f7194; white-space: nowrap; }
.logo .w b { font-weight: 400; color: var(--brand); }
.logo .s { display: block; margin-top: 5px; font: 400 12px/1 var(--serif); letter-spacing: .5em; padding-left: .5em; color: #8fb0cc; white-space: nowrap; }
.side .me { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin-top: 12px; padding: 14px 6px 0 10px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.me b { display: block; font-size: 13.5px; font-weight: 600; } .me small { display: block; font-size: 12px; color: var(--muted); }
button.iconbtn { margin-left: auto; background: none; color: var(--muted); padding: 6px; box-shadow: none; border: 0; }
button.iconbtn:hover { background: var(--sunken); color: var(--ink); }
@media (max-width: 900px) { .logo { padding: 0 10px 0 0; } .logo .w { font-size: 17px; } .logo .s { display: none; } .side .me { border: 0; margin: 0; padding: 0; } .me span:not(.av) { display: none; } }

body.admin .content { max-width: 1240px; padding: 36px 40px 120px; }
@media (max-width: 900px) { body.admin .content { padding: 24px 16px 120px; } }
.phead { margin-bottom: 24px; }
.crumbs { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.crumbs b { color: var(--ink); font-weight: 500; } .crumbs i { font-style: normal; color: var(--faint); }
.ptitle { font: 400 32px/1.15 var(--serif); letter-spacing: -.005em; margin: 0 0 8px; color: var(--ink); }
.psub { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px 24px; flex-wrap: wrap; }
.psub p { margin: 0; color: var(--muted); font-size: 14px; max-width: 680px; }
.saved { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.saved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
.saved.dirty { color: var(--warn); font-weight: 550; } .saved.dirty::before { background: var(--warn); }
.saved.err { color: var(--bad); font-weight: 550; } .saved.err::before { background: var(--bad); }
.saved.busy::before { background: var(--faint); }
.saved:empty { display: none; }

/* stone type cards */
.stypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 760px) { .stypes { grid-template-columns: 1fr; } }
button.stype { position: relative; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-align: left; color: var(--ink); font-weight: 400; box-shadow: var(--sh-1); }
button.stype:hover { background: var(--surface); border-color: #cdd3dc; }
button.stype.on { border: 2px solid var(--brand); padding: 15px 17px; }
.stype .ic { width: 40px; height: 40px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.stype .ic svg { width: 18px; height: 18px; }
.stype.on .ic { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.stype b { display: block; font-size: 14.5px; font-weight: 600; } .stype .m { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.stype .ok { position: absolute; top: 13px; right: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.stype .ok svg { width: 12px; height: 12px; stroke-width: 3; }

/* underline tabs with step numbers */
.utabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.utabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 10px 2px 12px; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 9px; font-weight: 500; font-size: 14px; box-shadow: none; }
.utabs button:hover { background: none; color: var(--ink); }
.utabs .n { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #d0d5dd; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.utabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.utabs button.on .n { background: var(--brand); border-color: var(--brand); color: #fff; }

/* sections: head / body / foot */
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-1); margin-bottom: 20px; overflow: hidden; }
.blk-h { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.blk-h:last-child { border-bottom: 0; }
.blk-h h3 { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.blk-h p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .tools .seg-tabs { margin: 0; }
.pill { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface); }
.blk-b { padding: 20px 24px 24px; } .blk-b.flush { padding: 0; }
.blk-b > .ghead:first-child { margin-top: 0; }
.blk-f { padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.blk-f input { max-width: 240px; height: 36px; } .blk-f button { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; }
.blk-f button .i, .blk-h button .i { width: 15px; height: 15px; margin: 0 6px 0 0; }
.ghead { color: var(--ink-2); letter-spacing: .08em; margin: 22px 0 10px; }
.tile { height: 34px; border-radius: 7px; } .tile.letter { width: 40px; }
.tile .cnt { margin-left: 2px; }
.search { position: relative; display: inline-block; }
.search svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.search input { padding-left: 34px; width: 220px; height: 36px; }
.tip { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; } .tip svg.i { width: 14px; height: 14px; }

/* shape cards */
.scgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.scgrid.rows { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.scgrid.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; min-height: 134px;
  transition: border-color .12s, box-shadow .12s; }
.sc:hover { border-color: #cdd3dc; box-shadow: var(--sh-2); }
.icbox { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface); flex: none; }
.icbox img, .icbox svg { width: 26px; height: 26px; object-fit: contain; }
.sc > b { display: block; margin-top: 20px; font-size: 13.5px; font-weight: 600; }
.sc .meta { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
.st2 { position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 600; color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.st2::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-sizing: border-box; }
.st2.no { color: var(--muted); font-weight: 500; } .st2.no::before { background: none; border: 1.5px solid currentColor; }
.sc.off { background: var(--surface-2); } .sc.off > b, .sc.off .meta, .sc.off .icbox, .sc.off .sphere { opacity: .55; }
.sc.dragging { opacity: .3; } .sc.over { outline: 2px dashed var(--brand-2); outline-offset: 2px; }
.sc.new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-style: dashed; border-color: #cfd5dd; color: var(--ink-2);
  font-weight: 500; font-size: 13.5px; background: transparent; }
.sc.new .plus { font-size: 22px; font-weight: 300; color: var(--faint); line-height: 1; }
.sc.new:hover { color: var(--brand); border-color: var(--brand-2); background: var(--surface); box-shadow: none; }
/* compact cards (side stones, metals): picture + name in a row */
.sc.row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 26px 10px 12px; flex-wrap: nowrap; }
.sc.row > b, .sc.row .nm b { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; display: block; }
.sc.row.new { flex-direction: column; padding: 8px; }
.sc .dot { position: absolute; top: 10px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.sc .dot.no { background: none; border: 1.5px solid var(--faint); }
.sc.metal { min-height: 70px; padding-right: 76px; }
.sphere { width: 36px; height: 36px; border-radius: 50%; flex: none; box-shadow: inset -3px -4px 8px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.08); }
.sphere.gold { background: radial-gradient(circle at 35% 30%, #fff6d6 0%, #f0d48a 35%, #d9ae55 75%, #c7963c 100%); }
.sphere.white { background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e8ebef 40%, #c6cbd2 80%, #adb3bc 100%); }
.sphere.rose { background: radial-gradient(circle at 35% 30%, #fff0e8 0%, #f2c2ad 40%, #d98c6f 85%); }
.grp { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 12.5px; color: var(--muted); } .grp:first-child { margin-top: 0; }
.grp .cut { font-size: 12px; padding: 2px 8px; border-radius: 5px; }

/* input with a small label box in front / behind */
.ig { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; vertical-align: middle; }
.ig:focus-within { border-color: var(--brand-2); box-shadow: var(--ring); }
.ig .ad { display: grid; place-items: center; padding: 0 10px; color: var(--muted); font-size: 13px; background: var(--surface-2); border-right: 1px solid var(--line); white-space: nowrap; }
.ig .ad.post { border-right: 0; border-left: 1px solid var(--line); }
.ig input { border: 0 !important; box-shadow: none !important; height: 100% !important; border-radius: 0; text-align: right; width: 92px; padding: 0 10px; font-variant-numeric: tabular-nums; }
.ig input:focus { box-shadow: none; }
.ig.big { height: 40px; } .ig.big input { font-size: 15px; font-weight: 600; width: 110px; }

/* settings: quote steps */
table.stbl { width: 100%; border-collapse: collapse; }
.stbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 24px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.stbl th:last-child, .stbl td.ex { text-align: right; }
.stbl td { padding: 14px 24px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.stbl td.no { width: 64px; padding-right: 0; }
.stbl .nc { width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.stbl td b { font-weight: 600; font-size: 14px; } .stbl .d { font-size: 12.5px; color: var(--muted); margin-top: 1px; max-width: 380px; }
.stbl td.set { width: 36%; white-space: nowrap; }
.stbl td.ex { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.stbl td.ex small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.stbl tr.subt td { background: #eef3f9; } .stbl tr.subt td.ex { color: var(--brand); }
.stbl tr.final td { background: var(--surface-2); border-bottom: 0; padding: 18px 24px; }
.stbl .big { font: 400 27px/1 var(--serif); color: var(--brand); font-variant-numeric: lining-nums; }
.exl { font-size: 13px; color: var(--muted); margin-right: 10px; }
.aside { font-size: 12.5px; color: var(--muted); margin-left: 10px; }
.stbl .toggle { margin-top: 10px; font-size: 13px; color: var(--ink-2); gap: 8px; }
@media (max-width: 760px) { .stbl td, .stbl th { padding: 12px 12px; } .stbl td.no { width: 36px; } .stbl td.set { white-space: normal; } }

/* bottom save bar */
.bar { background: rgba(255,255,255,.95); padding: 12px 40px; } .bar > div { max-width: none; }
.bar button.save { height: 38px; padding: 0 18px; }
.aside small { margin-left: 3px; font-size: 11.5px; }
.sc.row { padding-right: 20px; } .sc.row .icbox { width: 40px; height: 40px; } .sc.row .icbox svg { width: 24px; height: 24px; }
.sc.metal { padding-right: 76px; } .nm .meta { display: block; }
@media (max-width: 900px) { .app > * { min-width: 0; } .side { max-width: 100vw; } body.admin .content { max-width: 100vw; }
  .blk-h, .blk-b, .blk-f { padding-left: 16px; padding-right: 16px; } .search input { width: 100%; } .tools { width: 100%; } .tools .search { flex: 1; } }
@media (max-width: 900px) { .blk-b.flush { overflow-x: auto; } .blk-b.flush table.stbl { min-width: 640px; } }
@media (max-width: 900px) { .app { align-content: start; min-height: 100vh; } }
