/* ============================================================
  TAK Service — calm, operational UI with the TAK blue palette.
   ============================================================ */
@import url("https://fonts.bunny.net/css?family=inter:400,500,600,700&display=swap");

:root {
  /* accent (used sparingly) */
  --accent:        #2e34ba;
  --accent-hover:  #1a2246;
  --accent-tint:   #eef3ff;
  --accent-tint-2: #f4f6fb;
  --blue-ink:      #18337b;
  --blue-sky:      #2575d8;

  /* neutrals — ClickUp app palette */
  --ink:        #1c1f24;
  --ink-2:      #3d4652;
  --ink-3:      #656f7d;
  --ink-4:      #8a93a1;
  --line:       #e8eaed;
  --line-2:     #eff1f4;
  --surface:    #ffffff;
  --canvas:     #f6f8fc;
  --hover:      #f4f5f7;

  /* status colours */
  --blue:   #3e82f7;  --blue-t:   #e9f1fe;
  --green:  #1f9d55;  --green-t:  #e6f5ec;
  --amber:  #d08700;  --amber-t:  #fdf4e3;
  --red:    #d33d3d;  --red-t:    #fdecec;
  --violet: #7b68ee;  --violet-t: #f0edfe;

  --r-xs: 4px;
  --r-sm: 6px;
  --r:    8px;
  --r-md: 12px;

  --shadow-xs: 0 1px 2px rgba(28, 31, 36, .06);
  --shadow-sm: 0 1px 3px rgba(28, 31, 36, .08);
  --shadow:    0 4px 16px rgba(28, 31, 36, .10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(35, 77, 160, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 77, 160, .035) 1px, transparent 1px),
    var(--canvas);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main.main, .wrap.main { flex: 1 0 auto; width: 100%; }

.msr {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  font-size: 18px; line-height: 1;
  display: inline-block; vertical-align: -4px;
  letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  flex: none;
  /* Until the icon font is ready the ligature text is hidden, never spelled out. */
  width: 1em; overflow: hidden; visibility: hidden;
}
html.icons-ready .msr { visibility: visible; }

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.main { padding-top: 40px; padding-bottom: 64px; }

/* ---------- header ---------- */
.topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #dce3f2;
  box-shadow: 0 2px 16px rgba(21, 48, 107, .05);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
}
.topbar .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 132px; height: auto; }
.service-centre {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px;
  color: var(--blue-ink); background: #edf3ff; border: 1px solid #ccdaf8;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.topbar nav { display: flex; align-items: center; gap: 2px; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--r-sm);
  text-decoration: none;
}
.topbar nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.topbar nav a.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.whoami {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 8px; padding: 5px 10px 5px 8px;
  border: 1px solid var(--line); border-radius: var(--r-full, 999px);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.whoami em {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-tint); padding: 2px 6px; border-radius: var(--r-xs);
}

.foot {
  border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-4);
  font-size: 12px; padding: 16px 0; margin-top: auto; flex: none;
}
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.foot__left { flex: 1 1 0; }
.foot__terms { flex: 0 0 auto; color: var(--ink-3); text-decoration: none; font-weight: 500; }
.foot__terms:hover { color: var(--accent); text-decoration: none; }
.foot .powered { flex: 1 1 0; text-align: right; color: var(--ink-3); font-weight: 500; text-decoration: none; }
.foot .powered:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 620px) {
  .foot .wrap { flex-direction: column; gap: 6px; text-align: center; }
  .foot .powered { text-align: center; }
}

/* ---------- typography ---------- */
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; margin: 0 0 14px; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
p  { margin: 0 0 12px; }
p.lead { font-size: 14px; color: var(--ink-3); margin: 0 0 22px; max-width: 70ch; }
.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: 8px;
}
.small { font-size: 12px; color: var(--ink-3); }
.hint { display: block; font-weight: 400; color: var(--ink-4); font-size: 12px; margin-top: 3px; }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace; font-size: 13px; }

/* ---------- cards ---------- */
.box {
  background: var(--surface);
  border: 1px solid #dfe5f0;
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(21, 48, 107, .045);
}
.box > h2 { display: flex; align-items: center; gap: 9px; }
.box > h2[data-step]::before {
  content: attr(data-step);
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  background: var(--accent); color: #fff;
  border-radius: var(--r-xs);
  font-size: 11px; font-weight: 700;
}

/* ---------- service terms ---------- */
.terms-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  padding: 30px 32px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(125deg, #172b6c 0%, #244eaa 62%, #2c7bcf 100%);
  border: 1px solid #203e8e; border-radius: 8px;
}
.terms-hero h1 { margin: 0 0 7px; font-size: 32px; color: #fff; }
.terms-hero p { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; }
.terms-hero > span { display: inline-flex; align-items: center; gap: 8px; color: #dbe8ff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.terms-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 24px; background: #dfe6f2; border: 1px solid #dfe6f2; border-radius: 8px; overflow: hidden; }
.terms-summary > div { display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; padding: 16px; background: #fff; }
.terms-summary strong { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #edf3ff; color: var(--accent); font-size: 12px; }
.terms-summary span { color: var(--ink); font-size: 13px; font-weight: 700; }
.terms-summary small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.terms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.terms-section { padding: 22px 24px; background: #fff; border: 1px solid #dfe5f0; border-top: 3px solid #2e34ba; border-radius: 8px; box-shadow: 0 8px 24px rgba(21, 48, 107, .045); }
.terms-section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--blue-ink); font-size: 15px; }
.terms-section h2 span { color: #7684a7; font-size: 11px; letter-spacing: .08em; }
.terms-section ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.terms-section li { margin-bottom: 9px; }
.terms-section li:last-child { margin-bottom: 0; }
.terms-section p { color: var(--ink-2); font-size: 13px; }
.terms-section address { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid #7a9fea; background: #f4f7ff; color: var(--ink-2); font-size: 12.5px; font-style: normal; line-height: 1.55; }
.terms-section address strong { color: var(--blue-ink); }
.terms-section--wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .terms-hero { align-items: flex-start; flex-direction: column; padding: 24px; } .terms-hero h1 { font-size: 28px; } .terms-summary, .terms-grid { grid-template-columns: 1fr; } .terms-section--wide { grid-column: auto; } }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 5px; color: var(--ink-2); }
.field { margin-bottom: 16px; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 88px; padding: 9px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:hover, select:hover, textarea:hover { border-color: #d6dae0; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23656f7d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 2 6 7l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px;
  padding-right: 32px;
}

/* single-choice chips */
.choices .field > label:first-child { font-weight: 500; margin-bottom: 8px; }
.choices label:has(input[type=radio]) {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px;
  margin: 0 6px 6px 0;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.choices label:has(input[type=radio]):hover { background: var(--hover); }
.choices label:has(input[type=radio]:checked) { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
label:has(> input[type=checkbox]) {
  display: flex; align-items: flex-start; gap: 9px;
  font-weight: 400; font-size: 13.5px; color: var(--ink-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 18px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow-xs);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sec { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn.sec:hover { background: var(--hover); border-color: #d6dae0; color: var(--ink); }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12.5px; }

/* ---------- messages ---------- */
.msg {
  display: flex; align-items: flex-start; gap: 9px;
  border-radius: var(--r); padding: 11px 14px; margin-bottom: 16px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px;
}
.msg.ok  { background: var(--green-t); border-color: #c6e6d3; color: #17683a; }
.msg.err { background: var(--red-t);   border-color: #f4c9c9; color: #a52c2c; }

/* ---------- estimate ---------- */
.estimate {
  background: linear-gradient(135deg, #f7f9ff, #edf4ff);
  border: 1px solid #d7e2fa;
  border-radius: var(--r);
  padding: 18px;
}
.estimate .total { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
.estimate ul { margin: 12px 0 0; padding: 0; list-style: none; }
.estimate li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-3);
  padding: 7px 0; border-top: 1px solid var(--line);
}

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-4); background: var(--canvas); white-space: nowrap;
}
tbody tr:hover td, tr:hover td { background: #fbfcfc; }
tr:last-child td { border-bottom: 0; }
.box table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

/* ---------- status pills ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--hover); color: var(--ink-2);
  border-radius: var(--r-xs);
  padding: 3px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok   { background: var(--green-t); color: var(--green); }
.tag.warn { background: var(--amber-t); color: var(--amber); }
.tag.info { background: var(--blue-t);  color: var(--blue); }
.tag.busy { background: var(--violet-t); color: var(--violet); }
.tag.bad  { background: var(--red-t);   color: var(--red); }

.code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 20px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 16px;
}

/* ---------- progress list ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 18px 26px; color: var(--ink-4); font-size: 13.5px; }
.steps li::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface);
}
.steps li::after {
  content: "";
  position: absolute; left: 5.5px; top: 19px; bottom: 0;
  width: 2px; background: var(--line-2);
}
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink-3); }
.steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* bullets */
ol, ul.bullets { padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
ol li, ul.bullets li { margin-bottom: 7px; }
ul.bullets { list-style: none; padding-left: 0; }
ul.bullets li { position: relative; padding-left: 20px; }
ul.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* ---------- app shell (manage dashboard) ---------- */
.app { display: flex; align-items: flex-start; gap: 22px; }
.side { width: 216px; flex: none; position: sticky; top: 76px; }
.side__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); padding: 0 10px 8px; }
.side a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.side a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.side a.on { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.side a > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.side .count { font-size: 11.5px; color: var(--ink-4); font-weight: 600; }
.side a.on .count { color: var(--accent); }
.content { flex: 1 1 auto; min-width: 0; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 500; text-decoration: none;
}
.chip:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
  flex: 1 1 150px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; box-shadow: var(--shadow-xs);
}
.stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--ink-4); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }

.hidden { display: none; }

/* ---------- multi-step wizard ---------- */
.wizard__bar { display: flex; gap: 6px; margin-bottom: 12px; }
.wizard__bar span {
  position: relative; flex: 1; height: 6px; border-radius: 4px;
  background: var(--line); overflow: hidden;
}
.wizard__bar span::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent); border-radius: 4px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.wizard__bar span.done::after { transform: scaleX(1); }
.wizard__bar span.now::after { transform: scaleX(1); background: linear-gradient(90deg, var(--accent), #35a3a4); }
.wizard__bar span.now { box-shadow: 0 0 0 3px var(--accent-tint); }

.wizard__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 18px; font-size: 12.5px; color: var(--ink-4);
}
.wizard__meta strong { color: var(--ink-2); font-weight: 600; }

.step { display: none; }
.step.on { display: block; }

.spin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: care-spin .7s linear infinite; margin-right: 8px; vertical-align: -2px;
}
@keyframes care-spin { to { transform: rotate(360deg); } }

.wizard__nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px;
}
.wizard__nav .spacer { flex: 1; }

.review { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.review__row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 14px; font-size: 13.5px;
  border-bottom: 1px solid var(--line-2); background: var(--surface);
}
.review__row:last-child { border-bottom: 0; }
.review__row span:first-child { color: var(--ink-4); }
.review__row span:last-child { color: var(--ink); font-weight: 500; text-align: right; }
.review__group {
  padding: 8px 14px; background: var(--canvas);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4);
  border-bottom: 1px solid var(--line-2);
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 260px; max-width: 380px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-md); padding: 13px 14px;
  box-shadow: 0 10px 30px rgba(28, 31, 36, .16);
  font-size: 13.5px;
  transform: translateX(120%); opacity: 0;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .24s ease;
}
.toast.is-in { transform: translateX(0); opacity: 1; }
.toast.is-out { transform: translateX(120%); opacity: 0; }
.toast--ok { border-left-color: var(--green); }
.toast--ok .toast__icon { color: var(--green); }
.toast--err { border-left-color: var(--red); }
.toast--err .toast__icon { color: var(--red); }
.toast--loading { border-left-color: var(--ink-4); }
.toast--loading .toast__icon { color: var(--ink-3); animation: care-spin-icon .9s linear infinite; }
@keyframes care-spin-icon { to { transform: rotate(360deg); } }
.toast__text { flex: 1; padding-top: 1px; }
.toast__close {
  border: 0; background: none; cursor: pointer; color: var(--ink-4);
  padding: 0; line-height: 1; margin-top: 1px;
}
.toast__close:hover { color: var(--ink); }
@media (max-width: 520px) {
  .toasts { left: 14px; right: 14px; bottom: 14px; align-items: stretch; }
  .toast { max-width: none; }
}

/* ---------- custom select ---------- */
.xselect { position: relative; }
.xselect__native {
  position: absolute; opacity: 0; pointer-events: none; height: 0; width: 0; padding: 0; border: 0;
}
.xselect__button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.xselect__button:hover { border-color: #d6dae0; }
.xselect.is-open .xselect__button { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.xselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xselect__caret { color: var(--ink-4); font-size: 20px; transition: transform .18s ease; }
.xselect.is-open .xselect__caret { transform: rotate(180deg); }
.xselect__list {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(28, 31, 36, .14);
  padding: 6px; max-height: 280px; overflow: auto;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.xselect.is-open .xselect__list { opacity: 1; transform: none; pointer-events: auto; }
.xselect__option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--ink-2); cursor: pointer;
}
.xselect__option:hover { background: var(--hover); color: var(--ink); }
.xselect__option .msr { font-size: 18px; opacity: 0; color: var(--accent); }
.xselect__option.is-on { color: var(--accent); font-weight: 600; background: var(--accent-tint); }
.xselect__option.is-on .msr { opacity: 1; }

/* ---------- read-only detail cards with inline edit ---------- */
[data-editable] .edit-fields { display: none; }
[data-editable].is-editing .edit-fields { display: block; }
[data-editable].is-editing .read-fields { display: none; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px;
}
.card-head h2 { margin: 0; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-3); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.icon-btn:hover { background: var(--hover); color: var(--accent); border-color: #d6dae0; }
.icon-btn--ok { color: var(--green); border-color: #bfe4cf; }
.icon-btn--ok:hover { background: var(--green-t); color: var(--green); }
.card-head .edit-actions { display: none; gap: 6px; }
[data-editable].is-editing .card-head > .icon-btn { display: none; }
[data-editable].is-editing .card-head .edit-actions { display: flex; }

/* ---------- copy button + reference code row ---------- */
.copy-btn {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; flex: none;
  border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-4); cursor: pointer;
  transition: background .12s, color .12s;
}
.copy-btn:hover { background: var(--hover); color: var(--accent); }
.code-row, .ref-copy { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- info popover ("No printer?") ---------- */
.info-pop { position: relative; display: inline-flex; vertical-align: middle; }
.info-pop__btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--canvas); color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.info-pop__btn:hover { background: var(--hover); border-color: #d6dae0; }
.info-pop__panel {
  position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 40;
  width: 260px; max-width: 80vw;
  background: var(--ink); color: #fff;
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
  box-shadow: 0 12px 32px rgba(28, 31, 36, .24);
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.info-pop__panel strong { color: #fff; }
.info-pop__panel p { margin: 6px 0 0; color: rgba(255,255,255,.85); }
.info-pop.is-open .info-pop__panel { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- card on file ---------- */
.card-onfile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }

/* ---------- sign-in dialog ---------- */
.auth {
  max-width: 400px; margin: min(8vh, 70px) auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 28px 26px; box-shadow: var(--shadow);
  text-align: center;
}
.auth .auth__mark { width: 34px; margin: 0 auto 14px; color: var(--accent); }
.auth h1 { font-size: 20px; margin-bottom: 6px; }
.auth p.lead { font-size: 13.5px; margin-bottom: 20px; }
.auth form { text-align: left; }
.auth .btn { width: 100%; }

/* ---------- catalogue editor ---------- */
.builder__row {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; margin-bottom: 12px; background: var(--surface);
}
.builder__row--sub { background: var(--canvas); padding: 12px; margin-bottom: 8px; }
.builder__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.builder__title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-row input[type=text] { flex: 2 1 160px; }
.opt-row input[type=number] { flex: 0 0 110px; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .side { width: 100%; position: static; display: flex; gap: 4px; overflow-x: auto; }
  .side__label { display: none; }
  .side a { white-space: nowrap; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .wrap.main { padding-top: 26px; }
  .topbar .wrap { height: 60px; }
  .brand img { width: 110px; }
  .service-centre { position: static; transform: none; margin-left: auto; }
  .box { padding: 16px; }
  .topbar nav a { padding: 7px 9px; }
  .topbar nav a span { display: none; }
}

@media print {
  .topbar, .foot, .btn, .side { display: none; }
  body { background: #fff; }
  .box { box-shadow: none; }
}
