:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --card: #ffffff;
  --rail: rgba(246, 246, 248, 0.86);
  --rail-ink: #1d1d1f;
  --rail-muted: #86868b;
  --accent: #14213d;        /* Detailo navy (docs/brand/BRAND.md): buttons, selection, links */
  --accent-soft: #e9ecf3;
  --accent-hover: #24365c;
  --accent-ring: rgba(20, 33, 61, 0.18);
  --brand-orange: #ff6b35;  /* only the logo's diamond echoed: never a status colour */
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --muted: #6e6e73;
  --green: #1a7f37;
  --green-soft: #e5f6e9;
  --green-edge: #34c759;
  --amber: #ff9f0a;
  --amber-ink: #a35200;
  --amber-soft: #fff3df;
  --danger: #d70015;
  --red-soft: #ffeceb;
  --red-edge: #ff3b30;
  --indigo: #4b49c9;
  --indigo-soft: #eeeefd;
  --gray-soft: #f0f0f2;
  --warn: var(--amber-soft);
  --row: #f7f7f9;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lift: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 6px 16px rgba(0, 0, 0, 0.07), 0 18px 40px rgba(0, 0, 0, 0.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, .display { font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 1.9rem; line-height: 1.1; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 0.7rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 1rem 0.75rem 0.8rem;
  background: var(--rail);
  color: var(--rail-ink);
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--rail-ink); padding: 0.15rem 0.45rem 0.35rem; }
.mark {
  width: 2rem; height: 2rem; border-radius: 0.55rem;
  display: grid; place-items: center; background: var(--rail); color: var(--bg); font-weight: 600;
}
.side .mark { background: var(--row); color: var(--rail); }
.brand span { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.rail-search { margin: 0.35rem 0.35rem 0.5rem; }
.rail-search input {
  background: rgba(255, 255, 255, 0.08); color: white;
  border: 1px solid rgba(255, 255, 255, 0.14); min-height: 2.4rem;
}
.rail-search input::placeholder { color: var(--rail-muted); }
.nav { display: grid; gap: 0.05rem; min-height: 0; overflow: auto; }
.nav a.back-desk { color: var(--bg); margin-bottom: 0.2rem; }
.nav-label { margin: 0.85rem 0.7rem 0.15rem; color: var(--rail-muted); font-size: 0.78rem; font-weight: 500; }
.nav a, .nav-foot a, button.link {
  display: block; text-decoration: none; color: var(--rail-ink);
  padding: 0.42rem 0.7rem; border-radius: 0.55rem; font-weight: 500;
}
.nav a.on, .nav-foot a.on { background: rgba(255, 255, 255, 0.1); color: white; box-shadow: inset 3px 0 0 var(--bg); }
.nav-foot { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.menu-btn, .tabbar { display: none; }
.menu-btn {
  align-items: center; min-height: 2.3rem; padding: 0 0.9rem; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: white; border: 1px solid rgba(255, 255, 255, 0.18); font-weight: 600;
}
.nav-foot form { margin: 0; }
.tenant { margin: 0.55rem 0.7rem 0; font-weight: 600; color: white; }
.public { display: block; color: var(--rail-muted); font-size: 0.88rem; text-decoration: none; padding: 0.15rem 0.7rem 0.35rem; }
button.link { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; }
.content { padding: 1.5rem 1.6rem 3rem; max-width: 1180px; }
.kicker { color: var(--accent); font-weight: 600; margin: 0 0 0.15rem; font-size: 0.92rem; }
.lead, .muted, .note { color: var(--muted); }
.lead { margin: 0.35rem 0 1rem; max-width: 40rem; }
.head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 0.2rem 0 1rem; }
.stats.now { grid-template-columns: 1fr 1fr; max-width: 40rem; }
.desk-label { margin: 0.85rem 0 0.4rem; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.stat .hint { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.stat b.amount { font-size: 1.45rem; }
.rangebar { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin: 0.2rem 0 0.4rem; }
.rangebar input[type="date"] { width: auto; min-width: 10.5rem; min-height: 2.4rem; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 0.9rem; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat { color: inherit; text-decoration: none; display: block; }
.stat b { display: block; font-size: 2rem; margin-top: 0.15rem; letter-spacing: -0.03em; }
.stat.due b { color: var(--amber-ink); }
.dispatch { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.jump { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.jump a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.jump a:hover { border-bottom-color: var(--accent); }
.block { margin-top: 1.3rem; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; align-content: start; }  /* boxes never push the page wider */
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.8fr); gap: 1rem; align-items: start; }
.fields { display: grid; gap: 0.8rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field { min-width: 0; }
.lbl { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%; background: white; border: 1px solid var(--line);
  border-radius: 0.7rem; padding: 0.55rem 0.7rem; min-height: 2.7rem;
}
textarea { min-height: 6.5rem; resize: vertical; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem; }
.daypick[hidden] { display: none !important; }
.daypick {
  display: grid; gap: 0.1rem; border: 1px solid var(--line); border-radius: 0.8rem;
  padding: 0.55rem 0.65rem; background: white; cursor: pointer;
}
.daypick input { width: auto; min-height: 0; accent-color: var(--accent); }
.daypick.on, .daypick:has(input:checked) { border-color: transparent; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.daypick b { color: var(--accent); }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rail); color: white; text-decoration: none;
  border: 0; border-radius: 0.65rem; min-height: 2.45rem; padding: 0 1rem;
  font-weight: 600; cursor: pointer;
}
.btn.wide { width: 100%; }
.btn.line { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.danger { background: white; color: var(--danger); border: 1px solid rgba(215, 0, 21, 0.25); }
.btn.small { min-height: 2.2rem; padding: 0 0.8rem; font-size: 0.92rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.8rem 0 1rem; }
.filters input, .filters select { width: auto; min-width: 12rem; background: white; }
.navbtn {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 999px; border: 1px solid var(--line); background: white;
  text-decoration: none; color: inherit; font-size: 1.3rem; font-weight: 600;
}
.table { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
tbody tr:hover td { background: var(--accent-soft); }
tr:last-child td { border-bottom: 0; }
.table a { font-weight: 600; text-decoration: none; color: var(--ink); }
.badge {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 0.15rem 0.55rem; font-size: 0.82rem; font-weight: 600; background: var(--accent-soft); color: var(--accent);
}
.badge.confirmed, .badge.deposit, .badge.rental_paid, .badge.refunded { background: var(--indigo-soft); color: var(--indigo); }
.badge.completed, .badge.paid, .badge.done { background: var(--green-soft); color: var(--green); }
.badge.cancelled, .badge.unpaid { background: var(--gray-soft); color: var(--muted); }
.badge.partial, .badge.new, .badge.planned { background: var(--warn); color: var(--amber-ink); }
.badge.overdue, .badge.to_return { background: var(--red-soft); color: var(--danger); }
.line { display: flex; justify-content: space-between; gap: 1rem; margin: 0.35rem 0; }
.line.total { font-weight: 600; }
.display { font-size: 1.35rem; margin: 0.15rem 0 0.6rem; }
.notice, .warn, .err { border-radius: 0.8rem; padding: 0.7rem 0.85rem; }
.notice { background: var(--green-soft); color: var(--green); margin: 0 0 0.8rem; }
.warn { background: var(--warn); color: var(--amber-ink); margin: 0 0 0.8rem; }
.err { color: var(--danger); background: transparent; padding: 0.3rem 0 0; margin: 0; font-size: 0.9rem; }
.warn a { color: inherit; font-weight: 600; }
.job-row {
  display: flex; justify-content: space-between; gap: 0.8rem; align-items: center;
  margin-top: 0.45rem; padding: 0.75rem 0.85rem; border-radius: 0.7rem; background: var(--row);
}
.block .job-row:first-of-type, .box .job-row:first-of-type, .board .job-row:first-of-type { margin-top: 0; }
.job-row.done { opacity: 0.6; }
.actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.actions form { margin: 0; }
.plain { margin: 0 0 0.8rem; padding-left: 1.1rem; }
.cal { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: 0.8rem; box-shadow: var(--shadow); }
.board .cal { box-shadow: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.week, .grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.week { color: var(--muted); font-size: 0.78rem; font-weight: 600; text-align: center; margin-bottom: 0.3rem; }
.day {
  min-height: 5.4rem; background: var(--row); border-radius: 0.65rem; padding: 0.3rem;
  border: 1px solid transparent;
}
.day.out { opacity: 0.45; }
.day.has { background: var(--accent-soft); }
.day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.day .num { display: block; font-weight: 600; font-size: 0.82rem; }
.job { display: block; margin-top: 0.15rem; font-size: 0.75rem; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: 0.9rem 1rem 1rem; box-shadow: var(--shadow); }
.board.block { margin-top: 1rem; }
.dispatch { margin-top: 0.4rem; }
.board > .table { border: 0; background: transparent; border-radius: 0; box-shadow: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; justify-content: space-between; margin: 0.2rem 0 0.9rem; }
.toolbar .filters { margin: 0; }
.orders-find {
  display: grid; gap: 0.7rem; margin: 0.2rem 0 0.9rem;
  background: white; border: 1px solid var(--line); border-radius: 1rem;
  padding: 0.7rem 0.85rem 0.75rem; box-shadow: var(--shadow);
}
.find-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem 1rem; }
.find-row.dates { justify-content: flex-start; gap: 1.5rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.find-q { display: flex; align-items: stretch; }
.find-field { position: relative; display: flex; }
.find-q input {
  width: 16rem; min-height: 2.35rem; padding: 0.3rem 2rem 0.3rem 0.75rem;
  border-radius: 0.65rem 0 0 0.65rem; border-right: 0;
}
.find-q button {
  min-height: 2.35rem; padding: 0 0.85rem; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 0 0.65rem 0.65rem 0;
  font-weight: 600; cursor: pointer;
}
.find-q button:hover { background: var(--row); }
.find-q .clear-dates {
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; width: 1.45rem; height: 1.45rem;
}
.find-q:not(.has) .clear-dates { display: none; }
.find-range { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.range-name { font-weight: 600; min-width: 4.6rem; }
.find-range.live .range-name { color: var(--accent); }
.range-to { color: var(--muted); font-weight: 600; }
.find-range input[type="date"] {
  width: 10.4rem; min-width: 0; min-height: 2.2rem; padding: 0.15rem 0.45rem;
  background: var(--row); font-size: 0.92rem;
}
.find-range.live input[type="date"] { background: white; box-shadow: inset 0 0 0 1.5px var(--accent); }
.clear-dates {
  display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; padding: 0;
  border-radius: 999px; border: 1px solid var(--line);
  background: white; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer;
  text-decoration: none;
}
.clear-dates:hover { color: var(--ink); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.92rem;
  padding: 0.38rem 0.75rem; border-radius: 999px; background: white; border: 1px solid var(--line);
}
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.daybar { display: flex; align-items: center; gap: 0.8rem; }
.daybar form { display: flex; align-items: center; gap: 0.7rem; width: 100%; margin: 0; }
.daybar .when { flex: 1; text-align: center; }
.daybar .when strong { font-size: 1.35rem; letter-spacing: -0.03em; }
.daybar .dow-name { margin: 0.1rem 0 0; font-weight: 600; color: var(--muted); }
.daybar .pick { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.daybar input[type="date"] { width: auto; min-width: 10.2rem; }
.drop-day { margin: 0.95rem 0 0.2rem; font-size: 1.05rem; }
.run {
  margin: 0 0 0.75rem; padding: 0.7rem 0.9rem; border-radius: 0.75rem; font-weight: 600;
}
.run.ok { background: var(--green-soft); color: var(--green); }
.run.wait { background: var(--warn); color: var(--amber-ink); }
.run.off { background: var(--gray-soft); color: var(--muted); }
.drop {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr) 9.6rem;
  grid-template-areas: "pic main pay" "pic ship pay";
  gap: 0.35rem 1rem; align-items: center;
  margin-top: 0.6rem; padding: 0.8rem 0.9rem;
  border-radius: 0.85rem; background: var(--row);
}
.drop.open { box-shadow: inset 4px 0 0 var(--amber), var(--shadow-card); }
.drop.done { box-shadow: inset 4px 0 0 var(--green), var(--shadow-card); }
.drop.off { box-shadow: inset 4px 0 0 var(--line-strong), var(--shadow-card); }
a.drop-pic {
  grid-area: pic; align-self: start; margin-top: 0.15rem;
  width: 5.4rem; height: 5.4rem; display: block; overflow: hidden;
  border-radius: 0.75rem; background: white; text-decoration: none; color: var(--accent);
}
a.drop-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.drop-pic span {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-weight: 600; font-size: 1.35rem;
}
a.drop-pic:hover { box-shadow: inset 0 0 0 2px var(--accent); }
a.drop-pic.c-square { border-radius: 0.2rem; }
a.drop-pic.c-round { border-radius: 1.15rem; }
a.drop-pic.c-pill { border-radius: 999px; }
.drop-main { grid-area: main; display: grid; gap: 0.12rem; min-width: 0; }
.drop-top { display: flex; flex-wrap: wrap; gap: 0.2rem 0.65rem; align-items: baseline; }
.drop-main strong { font-size: 1.05rem; }
.order-no { font-size: 1.15rem; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 0.18rem; }
.call {
  display: inline-flex; font-weight: 600; text-decoration: none; color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.money, .gone { min-height: 0; background: transparent; }
.money {
  grid-area: pay; align-self: stretch;
  display: grid; align-content: center; justify-items: start; gap: 0.12rem;
  padding: 0 0 0 1.15rem; border-left: 1px solid var(--line);
}
.gone {
  grid-area: ship;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.6rem;
  padding-top: 0.15rem;
}
.money b, .gone b { font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.2; }
.money span, .gone span { font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.money.paid b { color: var(--green); }
.money.cancelled b { color: var(--muted); }
.money.refunded b { color: var(--indigo); }
.money.partial b { color: var(--amber-ink); }
.money.unpaid b, .money.overdue b, .money.to_return b { color: var(--danger); }
.gone.off b { color: var(--amber-ink); }
.gone.on b { color: var(--green); }
.gone.cancel b { color: var(--muted); }
.gone form { margin: 0; }
.pen {
  width: 2rem; height: 2rem; padding: 0; border-radius: 999px;
  border: 1px solid var(--line); background: white; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.pen svg { width: 0.95rem; height: 0.95rem; display: block; }
.pen:hover { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.slip {
  display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 9.6rem;
  gap: 0.7rem 1rem; align-items: center;
  margin-top: 0.55rem; padding: 0.8rem 0.9rem;
  border-radius: 0.85rem; background: var(--row);
}
.slip.open { box-shadow: inset 4px 0 0 var(--amber), var(--shadow-card); }
.slip.done { box-shadow: inset 4px 0 0 var(--green), var(--shadow-card); }
.slip.off { box-shadow: inset 4px 0 0 var(--line-strong), var(--shadow-card); }
.slip > a.drop-pic { grid-area: auto; margin-top: 0; align-self: center; }
.slip > .drop-main { grid-area: auto; }
.slip > .money { grid-area: auto; }
.slip .badge { font-size: 0.86rem; padding: 0.18rem 0.6rem; }
.slip-name { display: flex; flex-wrap: wrap; gap: 0.25rem 0.7rem; align-items: baseline; }
.driver { max-width: 36rem; margin: 0 auto; padding: 1.4rem 1rem 2.5rem; display: grid; gap: 0.8rem; }
.driver .box p + p { margin-top: 0.7rem; }
.tick-read { font-weight: 600; }
.tick-read.on { color: var(--green); }
.strip { margin: 0; }
.strip .day { display: block; text-decoration: none; color: inherit; min-height: 5.6rem; }
.strip .load { display: flex; align-items: baseline; gap: 0.25rem; margin-top: 0.15rem; color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.strip .load b { font-size: 1.05rem; color: var(--ink); }
.strip .dow { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: 0.7rem; }
.unit {
  display: grid; gap: 0.15rem; align-content: start; min-height: 8rem;
  background: white; border: 1px solid var(--line); border-radius: 0.9rem;
  padding: 0.9rem 1rem; text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.unit:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.unit b { font-size: 1.45rem; letter-spacing: -0.03em; margin-top: 0.35rem; }
.span-days { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0 1rem; }
.mini-day {
  width: 3.3rem; text-align: center; background: var(--accent-soft); border-radius: 0.65rem; padding: 0.35rem 0.2rem;
}
.mini-day .num { display: block; font-weight: 600; }
.mini-day .dow { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.legend { display: flex; gap: 1rem; color: var(--muted); font-size: 0.88rem; }
.sw { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 0.2rem; margin-right: 0.3rem; vertical-align: -1px; }
.sw.busy { background: var(--accent-soft); }
.sw.today { background: white; box-shadow: inset 0 0 0 2px var(--accent); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
.login .box { width: min(26rem, 100%); }
.login .mark { width: 2.4rem; height: 2.4rem; margin-bottom: 0.8rem; }
.login .field { margin-top: 0.85rem; }
.login .btn { margin-top: 1rem; }
.narrow { max-width: 28rem; }
.set-nav {
  position: sticky; top: 1rem; display: grid; align-content: start; gap: 0.1rem;
  background: white; border: 1px solid var(--line); border-radius: 1rem; padding: 0.65rem;
}
.set-label { margin: 0.9rem 0 0.15rem; color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.set-label:first-child { margin-top: 0; }
.set-nav a { display: block; text-decoration: none; color: inherit; font-weight: 500; padding: 0.42rem 0.65rem; border-radius: 0.6rem; }
.set-nav a.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.logo-preview { display: block; max-width: 18rem; max-height: 7rem; width: auto; object-fit: contain; background: #f4f6f8; border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.7rem; margin: 0 0 0.9rem; }
.logo-form .btn, .box form + form { margin-top: 0.8rem; }
input[type="file"] { padding: 0.45rem 0.7rem; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.9rem; }
.choice-card { display: grid; gap: 0.2rem; border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.8rem 0.9rem; background: white; cursor: pointer; }
.choice-card input { width: auto; min-height: 0; accent-color: var(--accent); }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.triple { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
.price-list { display: grid; gap: 0.45rem; }
.price-row { display: grid; grid-template-columns: 11rem minmax(8rem, 14rem); gap: 0.6rem; align-items: center; }
.price-row input { min-height: 2.4rem; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.weekdays label { font-size: 0.82rem; font-weight: 600; }
.weekdays input { text-align: center; padding-left: 0.2rem; padding-right: 0.2rem; }
.rule { display: grid; grid-template-columns: 1fr 1fr 8rem 7rem 6rem; gap: 0.45rem; margin: 0.35rem 0; }
.deal { display: grid; gap: 0.45rem; border-top: 1px solid var(--line); padding-top: 0.7rem; margin-top: 0.7rem; }
.daychecks { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; }
.daychecks label { display: flex; gap: 0.3rem; align-items: center; font-weight: 500; }
.daychecks input { width: auto; min-height: 0; }
.try-price { font-size: 1.6rem; font-weight: 600; margin: 0.2rem 0; }
.check { display: flex; gap: 0.55rem; align-items: center; font-weight: 500; }
.check input { width: auto; min-height: 0; }
.pay-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.pay-choices legend { margin-bottom: 0.35rem; }
.set-main .table input { min-height: 2.3rem; padding: 0.35rem 0.55rem; }
.set-main .box > .btn, .set-main .table + .btn { margin-top: 0.9rem; }
.content.wide { max-width: 1480px; }
.page-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.2rem; }
.page-tabs a { text-decoration: none; color: inherit; font-weight: 500; font-size: 0.92rem; padding: 0.38rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: white; }
.page-tabs a.on { background: var(--accent); color: white; border-color: var(--accent); }
.count.long { color: var(--danger); font-weight: 500; }
.seo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr); gap: 1rem; align-items: start; }
.seo-layout > * { min-width: 0; }
.seo-side { position: sticky; top: 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.seo-page > summary > span:first-child { flex: 1; }
.seo-group { font-size: 1rem; margin: 0.6rem 0 -0.2rem; }
.seo-link { display: grid; gap: 0.6rem; }
.seo-link h2 { margin: 0; font-size: 1.05rem; }
.seo-link .muted { margin: 0; }
.seo-link-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.seo-link .w-site-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.seo-page > summary .badge { flex: none; }
.seo-page > summary::after { margin-left: -0.4rem; }
[data-tone="good"].badge { background: var(--green-soft); color: var(--green); }
[data-tone="so"].badge { background: var(--warn); color: var(--amber-ink); }
[data-tone="bad"].badge { background: var(--red-soft); color: var(--danger); }
.seo-meter { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.seo-bar { flex: 0 0 5rem; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.seo-bar i { display: block; height: 100%; width: 0; background: var(--muted); transition: width 0.15s ease; }
.seo-meter[data-tone="good"] i { background: var(--green-edge); }
.seo-meter[data-tone="so"] i { background: var(--amber); }
.seo-meter[data-tone="bad"] i { background: var(--red-edge); }
.seo-meter[data-tone="bad"] .seo-count { color: var(--danger); font-weight: 500; }
.seo-items-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.seo-items-head .check { font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.seo-item-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem 1rem; }
.seo-item .lbl { display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; }
.seo-item textarea { font-size: 0.92rem; min-height: 3.6rem; }
.seo-page textarea { min-height: 3.6rem; }
.seo-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.seo-item[data-tone="good"] .seo-dot { background: var(--green-edge); }
.seo-item[data-tone="so"] .seo-dot { background: var(--amber); }
.seo-item[data-tone="bad"] .seo-dot { background: var(--red-edge); }
.chip.seo-name { padding: 0.05rem 0.45rem; font-size: 0.85rem; font-family: ui-monospace, Menlo, monospace; cursor: pointer; }
.seo-health { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
.seo-score { display: flex; align-items: baseline; gap: 0.45rem; }
.seo-score b { font-size: 1.35rem; }
.seo-progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.seo-progress i { display: block; height: 100%; background: var(--green-edge); border-radius: 6px; transition: width 0.2s ease; }
.seo-todo { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.15rem; font-size: 0.9rem; }
.seo-todo:empty { display: none; }
.seo-todo button { all: unset; cursor: pointer; display: flex; gap: 0.5rem; align-items: baseline; padding: 0.2rem 0; }
.seo-todo button::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; transform: translateY(-0.05rem); background: var(--amber); }
.seo-todo button[data-tone="bad"]::before { background: var(--red-edge); }
.seo-todo button:hover { color: var(--accent); }
.seo-todo button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.seo-look { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
.seo-look-head { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.seo-pick { flex: 1 1 12rem; max-width: 20rem; }
.seo-device { display: flex; gap: 0.3rem; }
.seo-device .chip { cursor: pointer; font: inherit; font-size: 0.88rem; }
.serp { background: white; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem 1.1rem; font-family: Arial, sans-serif; max-width: 600px; transition: max-width 0.2s ease; }
.serp.phone { max-width: 360px; margin: 0 auto; }
.serp-site { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.serp-site > span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.serp-site b { font-weight: 400; font-size: 14px; color: #202124; }
.serp-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #f1f3f4; border: 1px solid #dadce0; color: var(--accent); font-weight: 700; font-size: 13px; }
.serp-url { color: #4d5156; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp-title { color: #1a0dab; font-size: 20px; line-height: 1.3; font-weight: 400; margin: 0 0 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp.phone .serp-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 18px; }
.serp-desc { color: #4d5156; font-size: 14px; line-height: 1.58; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.serp.phone .serp-desc { -webkit-line-clamp: 3; }
.serp-desc.guess { font-style: italic; color: #80868b; }
.seo-fallback { font-size: 0.85rem; margin: 0; }
@media (max-width: 1100px) {
  .seo-layout { grid-template-columns: minmax(0, 1fr); }
  .seo-side { position: static; order: -1; }
}
.editor { display: flex; flex-direction: column; gap: 1rem; }
.preview-frame { width: 100%; height: min(32rem, 58vh); border: 1px solid var(--line); border-radius: 1rem; background: white; }
.color-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.color-row .field { width: 11rem; }
input[type="color"] { padding: 0.25rem; }
.box + .box, .stack .box h2 { margin-top: 0; }
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.choice-card.look { align-content: start; }
.swatch, .mini { display: block; }
.swatch { height: 3rem; background: var(--accent-soft); border: 2px solid var(--line); }
.swatch.square { border-radius: 0; }
.swatch.soft { border-radius: 0.7rem; }
.swatch.round { border-radius: 1.4rem; }
.swatch.pill { border-radius: 999px; }
.choice-card.look:has(input:checked) .swatch { border-color: var(--accent); }
.mini { height: 2.6rem; border-radius: 0.35rem; }
.mini.one { background: #dfe7f3; }
.mini.carousel { background: linear-gradient(90deg, white 0.4rem, #dfe7f3 0.4rem, #dfe7f3 calc(100% - 0.4rem), white calc(100% - 0.4rem)); }
.mini.row { background: linear-gradient(#dfe7f3, #dfe7f3) 0 0 / 62% 100% no-repeat, linear-gradient(#dfe7f3, #dfe7f3) 68% 0 / 32% 46% no-repeat, linear-gradient(#dfe7f3, #dfe7f3) 68% 54% / 32% 46% no-repeat; }
.mini.grid { background: linear-gradient(#dfe7f3, #dfe7f3) 0 0 / 48% 46% no-repeat, linear-gradient(#dfe7f3, #dfe7f3) 52% 0 / 48% 46% no-repeat, linear-gradient(#dfe7f3, #dfe7f3) 0 54% / 48% 46% no-repeat, linear-gradient(#dfe7f3, #dfe7f3) 52% 54% / 48% 46% no-repeat; }
.look-preview { position: relative; display: grid; gap: 0.45rem; background: white; border: 1px solid var(--line); border-radius: 1rem; padding: 0.7rem; }
.look-preview img, .look-preview .ph { width: 100%; height: 12rem; object-fit: cover; background: #eef0f3; display: none; }
.look-preview[data-gallery="one"] img:first-of-type, .look-preview[data-gallery="one"] .ph:first-of-type, .look-preview[data-gallery="carousel"] .on { display: block; }
.look-preview[data-gallery="grid"] { grid-template-columns: 1fr 1fr; }
.look-preview[data-gallery="grid"] img, .look-preview[data-gallery="grid"] .ph { display: block; height: 7rem; }
.look-preview[data-gallery="row"] { grid-template-columns: 2fr 1fr 1fr; }
.look-preview[data-gallery="row"] img, .look-preview[data-gallery="row"] .ph { display: block; height: 5.6rem; }
.look-preview[data-gallery="row"] img:first-of-type, .look-preview[data-gallery="row"] .ph:first-of-type { grid-row: 1 / span 2; height: 11.6rem; }
.look-preview[data-corner="square"] img, .look-preview[data-corner="square"] .ph { border-radius: 0; }
.look-preview[data-corner="soft"] img, .look-preview[data-corner="soft"] .ph { border-radius: 0.8rem; }
.look-preview[data-corner="round"] img, .look-preview[data-corner="round"] .ph { border-radius: 1.6rem; }
.look-preview[data-corner="pill"] img, .look-preview[data-corner="pill"] .ph { border-radius: 999px; }
.look-nav { display: none; position: absolute; top: 5.4rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 999px; background: white; font-size: 1.4rem; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.look-preview[data-gallery="carousel"] .look-nav { display: grid; place-items: center; }
#look-prev { left: 0.9rem; }
#look-next { right: 0.9rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem; }
.photo-card { display: grid; gap: 0.4rem; align-content: start; border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.7rem; background: #f8fafb; }
.photo-card img { width: 100%; height: 9rem; object-fit: cover; background: white; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.thumb { width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: 0.45rem; vertical-align: middle; margin-right: 0.45rem; }
details.box summary { font-weight: 600; cursor: pointer; }
details.box[open] summary { margin-bottom: 0.6rem; }
#product-form[data-corner="square"] .photo-card img { border-radius: 0; }
#product-form[data-corner="soft"] .photo-card img { border-radius: 0.8rem; }
#product-form[data-corner="round"] .photo-card img { border-radius: 1.5rem; }
#product-form[data-corner="pill"] .photo-card img { border-radius: 999px; }
.box h2 { margin-top: 0.9rem; }
.box h2:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; height: auto; z-index: 5; border-right: 0; padding: 0.55rem 0.8rem; }
  .side-top { display: flex; justify-content: space-between; align-items: center; }
  .menu-btn { display: inline-flex; }
  .side > .rail-search, .side > .nav, .side > .nav-foot { display: none; }
  .side.open { max-height: 100vh; overflow: auto; padding-bottom: 1rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
  .side.open > .rail-search, .side.open > .nav { display: flex; }
  .side.open > .rail-search { margin: 0.6rem 0 0.3rem; }
  .side.open > .rail-search input { width: 100%; }
  .side.open > .nav-foot { display: flex; }
  .side.open .when-closed, .when-open { display: none; }
  .side.open .when-open { display: inline; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--rail); padding: 0.3rem 0.3rem calc(0.3rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 0.15rem; padding: 0.35rem 0.1rem;
    color: var(--rail-muted); text-decoration: none; font-size: 0.68rem; font-weight: 600; border-radius: 0.6rem;
  }
  .tabbar a svg { width: 1.35rem; height: 1.35rem; }
  .tabbar a.on { color: white; background: rgba(255, 255, 255, 0.1); }
  .shell:has(.tabbar) .content { padding-bottom: 5.5rem; }
  .nav { display: flex; flex-wrap: wrap; gap: 0.15rem; overflow: visible; }
  .nav-label { width: 100%; margin: 0.45rem 0.4rem 0; }
  .nav a { white-space: nowrap; }
  .nav-foot { margin-top: 0.35rem; display: flex; flex-wrap: wrap; align-items: center; border-top: 0; padding-top: 0.2rem; }
  .tenant, .public { width: 100%; }
  .content { padding: 1rem 0.9rem 2.5rem; }
  .stats, .split, .pair, .settings, .choice, .triple, .editor, .price-row, .rule, .dispatch, .units { grid-template-columns: 1fr; }
  .drop {
    grid-template-columns: 4.2rem minmax(0, 1fr);
    grid-template-areas: "pic main" "ship ship" "pay pay";
  }
  .slip { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .slip > .money { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 0.65rem 0 0; }
  a.drop-pic { width: 4.2rem; height: 4.2rem; }
  .money { border-left: 0; border-top: 1px solid var(--line); padding: 0.65rem 0 0; }
  .daybar { align-items: stretch; }
  .daybar form { flex-wrap: wrap; }
  .find-q, .find-field, .find-range { width: 100%; }
  .find-q input { flex: 1; width: auto; min-width: 0; }
  .find-range input[type="date"] { flex: 1; width: auto; }
  .weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .looks { grid-template-columns: 1fr 1fr; }
  .preview-frame { height: 420px; }
  .set-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .set-label { width: 100%; margin: 0.4rem 0 0; }
  .day { min-height: 3.4rem; }
  .job { font-size: 0.68rem; }
}
/* One order */
.back { display: inline-block; margin-bottom: 0.5rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--accent); }
.order-head { align-items: center; margin-bottom: 0.9rem; }
.order-head .lead { margin: 0.3rem 0 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.title-row h1 { margin-right: 0.3rem; }
.order-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 0.9rem; padding: 0.85rem 1rem; box-shadow: var(--shadow); display: grid; gap: 0.15rem; align-content: start; }
.tile b { font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.2; }
.tile .hint { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.tile.bad { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }
.tile.bad b { color: var(--danger); }
.tile.wait { box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.tile.wait b { color: var(--amber-ink); }
.tile.good { box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
.tile.good b { color: var(--green); }
.item-card { display: flex; gap: 1rem; align-items: flex-start; }
.item-card a.drop-pic { width: 6.5rem; height: 6.5rem; flex: none; margin: 0; }
.item-card h2 { margin: 0.1rem 0 0; font-size: 1.3rem; }
.item-card .span-days { margin-bottom: 0.3rem; }
.order-line { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.order-line:first-of-type { border-top: 0; }
.order-line a.drop-pic { width: 3rem; height: 3rem; flex: none; margin: 0; }
.order-line-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.who { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
.box .actions + .line { margin-top: 0.9rem; }
.memo { margin-top: 0.8rem; padding: 0.7rem 0.85rem; border-radius: 0.7rem; background: var(--row); }
.memo span { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.15rem; }
.trip {
  display: flex; justify-content: space-between; gap: 0.8rem 1rem; align-items: center; flex-wrap: wrap;
  margin-top: 0.55rem; padding: 0.75rem 0.9rem; border-radius: 0.8rem; background: var(--row);
}
.trip:first-of-type { margin-top: 0; }
.trip.open { box-shadow: inset 4px 0 0 var(--amber); }
.trip.done { box-shadow: inset 4px 0 0 var(--green); }
.trip-when { display: grid; gap: 0.05rem; }
.trip-when .actions { margin-top: 0.4rem; }
.trip .gone { padding-top: 0; }
.ledger { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.35rem; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 0 0.8rem; padding: 0.5rem 0.65rem; border-radius: 0.6rem; background: var(--row); }
.ledger li .muted { grid-column: 1 / -1; font-size: 0.86rem; }
.ledger li.back b { color: var(--indigo); }
details.tool summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.tool summary::-webkit-details-marker { display: none; }
details.tool summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); }
details.tool[open] summary::after { content: "−"; }
details.tool .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (max-width: 860px) {
  .order-sum { grid-template-columns: 1fr 1fr; }
  .order-head { align-items: flex-start; }
}
/* Catalog shelf */
.shelf-find { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.shelf-search { display: flex; gap: 0.4rem; align-items: center; max-width: 26rem; }
.shelf-search input { min-height: 2.4rem; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.9rem; }
.shelf-card { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 0.9rem; box-shadow: var(--shadow); overflow: hidden; }
.shelf-pic { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef0f3; margin: 0.6rem 0.6rem 0; overflow: hidden; border-radius: 0.7rem; }
.shelf-pic.c-square { border-radius: 0.15rem; }
.shelf-pic.c-round { border-radius: 1.2rem; }
.shelf-pic.c-pill { border-radius: 1.6rem; }
.shelf-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.shelf-pic:hover img { transform: scale(1.03); }
.shelf-pic { text-decoration: none; }
.shelf-pic .ph { display: grid; place-content: center; justify-items: center; gap: 0.2rem; height: 100%; color: var(--accent); }
.shelf-pic .ph b { font-size: 2.4rem; line-height: 1; }
.shelf-pic .ph span { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.shelf-mark { position: absolute; top: 0.55rem; left: 0.55rem; }
.shelf-mark .badge { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.shelf-body { display: grid; gap: 0.4rem; align-content: start; padding: 0.75rem 0.9rem 0.9rem; }
.shelf-title { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.shelf-title a { color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.shelf-title a:hover { color: var(--accent); }
.shelf-price { white-space: nowrap; }
.shelf-price b { font-size: 1.1rem; }
.shelf-now { font-weight: 500; color: var(--amber-ink); }
.shelf-next a, .shelf-now a { font-weight: 600; }
.shelf-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; margin: 0.15rem 0; }
.shelf-strip span {
  display: grid; place-items: center; height: 1.55rem; border-radius: 0.3rem;
  background: var(--green-soft); color: var(--green); font-size: 0.62rem; font-weight: 600;
}
.shelf-strip span.busy { background: #ffe2b8; color: var(--amber-ink); }
.shelf-strip span.today { box-shadow: inset 0 0 0 2px var(--ink); }
.shelf-card .actions { margin-top: 0.3rem; }
/* Home desk */
.alerts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.alert { display: inline-flex; gap: 0.35rem; align-items: center; padding: 0.5rem 0.85rem; border-radius: 999px; font-weight: 500; text-decoration: none; color: var(--ink); background: white; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.alert b { font-size: 1.05rem; }
.alert.wait { background: var(--warn); border-color: rgba(255, 159, 10, 0.3); color: var(--amber-ink); }
.alert.bad { background: var(--red-soft); border-color: rgba(215, 0, 21, 0.2); color: var(--danger); }
.alert.good { background: var(--green-soft); border-color: rgba(26, 127, 55, 0.2); color: var(--green); }
a.alert:hover { box-shadow: inset 0 0 0 2px currentColor; }
.desk-stats { margin-bottom: 0.2rem; }
.desk-stats-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.desk-stats-head h2 { margin: 0; }
.desk-stats-head h2 .muted { font-weight: 500; font-size: 0.95rem; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.stat .hint.late { color: var(--danger); }
.range-pick { position: relative; }
.range-pick summary { list-style: none; cursor: pointer; display: inline-block; }
.range-pick summary::-webkit-details-marker { display: none; }
.range-pick form {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 3;
  display: flex; gap: 0.4rem; align-items: center; padding: 0.6rem;
  background: white; border: 1px solid var(--line); border-radius: 0.8rem; box-shadow: var(--shadow);
}
.range-pick input[type="date"] { width: auto; min-height: 2.3rem; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.board-head h2 { margin: 0; }
.board-head a { font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.desk-job {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center;
  margin-top: 0.5rem; padding: 0.6rem 0.75rem; border-radius: 0.8rem; background: var(--row);
}
.desk-job:first-of-type { margin-top: 0; }
.desk-job.open { box-shadow: inset 4px 0 0 var(--amber); }
.desk-job.done { box-shadow: inset 4px 0 0 var(--green); }
.desk-job a.drop-pic { grid-area: auto; width: 3.4rem; height: 3.4rem; margin: 0; font-size: 1rem; }
.desk-job-main { display: grid; gap: 0.05rem; min-width: 0; }
.desk-job-main .muted a { color: inherit; }
.desk-job-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.desk-job-name:hover { color: var(--accent); }
.desk-job form { margin: 0; }
.verb { color: var(--amber-ink); }
.verb.on { color: var(--green); }
.desk-row { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.desk-row:first-of-type { border-top: 0; padding-top: 0; }
.desk-row a { color: var(--ink); text-decoration: none; }
.desk-row a:hover { color: var(--accent); }
.desk-row form { margin: 0; }
.desk-row .badge { font-size: 0.74rem; padding: 0.05rem 0.45rem; }
.desk-row b.late { color: var(--danger); }
@media (max-width: 860px) {
  .stats.four { grid-template-columns: 1fr 1fr; }
  .range-pick form { left: 0; right: auto; flex-wrap: wrap; }
  .desk-job { grid-template-columns: 3rem minmax(0, 1fr); }
  .desk-job form { grid-column: 1 / -1; }
}

/* ===== Look v2: light, calm, Apple-like ===== */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-size: 15px; letter-spacing: -0.005em; }
h1, h2, .display { font-weight: 600; letter-spacing: -0.022em; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 1.05rem; }
b, strong { font-weight: 600; }
.lead { font-size: 0.98rem; }
.muted, .note, .hint { font-weight: 400; }
::selection { background: var(--accent-ring); }

/* Side menu: light, frosted */
.side {
  background: var(--rail);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line);
  color: var(--rail-ink);
}
.brand, .brand span { color: var(--ink); }
.brand span { font-weight: 600; letter-spacing: -0.02em; }
.side .mark, .mark {
  background: linear-gradient(145deg, #2b8cff, #0058c7); color: white; font-weight: 700;
  box-shadow: 0 2px 6px rgba(20, 33, 61, 0.3);
}
.rail-search input {
  background: rgba(0, 0, 0, 0.05); color: var(--ink); border: 0; border-radius: 0.6rem;
}
.rail-search input::placeholder { color: var(--rail-muted); }
.nav-label { color: var(--rail-muted); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.nav a, .nav-foot a, button.link { color: var(--ink); font-weight: 400; padding: 0.4rem 0.7rem; border-radius: 0.5rem; }
.nav a:hover, .nav-foot a:hover, button.link:hover { background: rgba(0, 0, 0, 0.045); }
.nav a.on, .nav-foot a.on { background: var(--accent); color: white; font-weight: 500; box-shadow: 0 1px 3px rgba(20, 33, 61, 0.3); }
.nav-foot { border-top: 1px solid var(--line); }
.tenant { color: var(--ink); font-weight: 600; }
.public { color: var(--accent); }

/* Cards and surfaces */
.box, .board, .tile, .table, .cal, .orders-find, .shelf-card, .unit {
  border: 0; border-radius: 14px; box-shadow: var(--shadow);
}
.board .cal, .board > .table { box-shadow: none; }
a.box.stat, .shelf-card, .unit, a.alert {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a.box.stat:hover, .shelf-card:hover, .unit:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); background: var(--card); }
.stat b { font-size: 1.85rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat b.amount { font-size: 1.45rem; }
.stat .muted { font-size: 0.85rem; }
.stat .hint { font-size: 0.78rem; font-weight: 400; }
.stat.due b { color: var(--amber-ink); }
.tile b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tile.bad { box-shadow: inset 3px 0 0 var(--red-edge), var(--shadow); }
.tile.wait { box-shadow: inset 3px 0 0 var(--amber), var(--shadow); }
.tile.good { box-shadow: inset 3px 0 0 var(--green-edge), var(--shadow); }
.line.total { font-weight: 600; }

/* Buttons */
.btn, button.btn {
  background: var(--accent); color: white; font-weight: 500; border-radius: 0.6rem;
  min-height: 2.35rem; padding: 0 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { background: #0e182d; }
.btn.line { background: white; color: var(--ink); border: 0; box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(0, 0, 0, 0.04); }
.btn.line:hover { background: #fafafa; }
.btn.danger { background: white; color: var(--danger); border: 0; box-shadow: 0 0 0 1px rgba(215, 0, 21, 0.28); }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { min-height: 2rem; padding: 0 0.75rem; font-size: 0.86rem; }
.pen { border: 0; box-shadow: 0 0 0 1px var(--line-strong); }

/* Inputs */
input, select, textarea {
  border: 0; border-radius: 0.6rem; background: white;
  box-shadow: 0 0 0 1px var(--line-strong); transition: box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-ring); }
.lbl { font-weight: 500; font-size: 0.88rem; color: var(--ink); }

/* Chips (segmented filters) */
.chip { font-weight: 500; font-size: 0.86rem; border: 0; background: white; box-shadow: 0 0 0 1px var(--line); padding: 0.34rem 0.8rem; }
.chip:hover { background: #fafafa; }
.chip.on { background: var(--ink); color: white; box-shadow: none; }

/* Status pills: richer color */
.badge { font-weight: 500; font-size: 0.78rem; padding: 0.14rem 0.55rem; background: var(--accent-soft); color: var(--accent); }
.badge.new, .badge.partial, .badge.planned { background: var(--amber-soft); color: var(--amber-ink); }
.badge.confirmed { background: var(--accent-soft); color: var(--accent); }
.badge.deposit, .badge.rental_paid { background: #e8f6fb; color: #0a6c8f; }
.badge.completed, .badge.paid, .badge.done { background: var(--green-soft); color: var(--green); }
.badge.refunded { background: var(--indigo-soft); color: var(--indigo); }
.badge.cancelled, .badge.unpaid { background: var(--gray-soft); color: var(--muted); }
.badge.overdue, .badge.to_return { background: var(--red-soft); color: var(--danger); }
.money b, .gone b { font-weight: 600; font-size: 1rem; }
.money.refunded b { color: var(--indigo); }
.money.partial b, .gone.off b, .verb { color: var(--amber-ink); }
.money.paid b, .gone.on b, .verb.on { color: var(--green); }

/* Status edges on rows */
.slip.open, .drop.open, .trip.open, .desk-job.open { box-shadow: inset 3px 0 0 var(--amber), var(--shadow-card); }
.slip.done, .drop.done, .trip.done, .desk-job.done { box-shadow: inset 3px 0 0 var(--green-edge), var(--shadow-card); }
.slip.off, .drop.off { box-shadow: inset 3px 0 0 #c7c7cc, var(--shadow-card); }
.drop, .trip, .desk-job, .job-row, .ledger li, .memo { background: var(--row); }

/* Notices */
.notice { background: var(--green-soft); color: var(--green); }
.warn { background: var(--amber-soft); color: var(--amber-ink); }
.notice, .warn { border-radius: 12px; font-size: 0.92rem; }
.alert { font-weight: 500; border: 0; box-shadow: var(--shadow-card); }
.alert b { font-weight: 600; }
.alert.wait { background: var(--amber-soft); color: var(--amber-ink); }
.alert.bad { background: var(--red-soft); color: var(--danger); }
.alert.good { background: var(--green-soft); color: var(--green); }
a.alert:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }

/* Calendar and strips */
.day { background: var(--row); border-radius: 10px; }
.day.has { background: var(--accent-soft); }
.day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.day .num, .week { font-weight: 500; }
.job { font-weight: 500; color: var(--accent); }
.shelf-strip span { background: var(--green-soft); color: var(--green); font-weight: 500; border-radius: 5px; }
.shelf-strip span.busy { background: #ffe2b8; color: var(--amber-ink); }
.mini-day { background: var(--accent-soft); border-radius: 8px; }

/* Tables */
th { font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table a, .order-no { font-weight: 600; }
tbody tr:hover td { background: #f8fafe; }

/* Phone bars: frosted white */
@media (max-width: 860px) {
  .side { background: rgba(255, 255, 255, 0.82); border-right: 0; border-bottom: 1px solid var(--line); }
  .side.open { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12); }
  .menu-btn { background: rgba(0, 0, 0, 0.05); color: var(--ink); border: 0; font-weight: 500; }
  .tabbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    background: var(--accent);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-top: 0; box-shadow: 0 -6px 20px rgba(20, 33, 61, 0.22);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  }
  .tabbar a { color: rgba(255, 255, 255, 0.78); font-weight: 500; font-size: 0.62rem; padding: 0.35rem 0; }
  .tabbar a.on { color: white; background: rgba(255, 255, 255, 0.2); font-weight: 600; }
  .btn.new-order { background: white; color: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(20, 33, 61, 0.15); }
  h1 { font-size: 1.55rem; }
  .stat b { font-size: 1.5rem; }
  .stat b.amount { font-size: 1.15rem; white-space: nowrap; }
  .stat-icon { width: 1.8rem; height: 1.8rem; }
}
.nav a.back-desk { color: var(--accent); font-weight: 500; }
.stat-icon { float: right; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 0.65rem; }
.stat-icon svg { width: 1.15rem; height: 1.15rem; }
.stat-icon.blue { background: var(--accent-soft); color: var(--accent); }
.stat-icon.indigo { background: var(--indigo-soft); color: var(--indigo); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber-ink); }

/* Lift on hover for everything you can open (keeps each card's status edge) */
.slip, .drop, .desk-job, .strip a.day {
  transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.slip:hover, .drop:hover, .desk-job:hover { transform: translateY(-1px); background: var(--card); }
.slip.open:hover, .drop.open:hover, .desk-job.open:hover { box-shadow: inset 3px 0 0 var(--amber), var(--shadow-lift); }
.slip.done:hover, .drop.done:hover, .desk-job.done:hover { box-shadow: inset 3px 0 0 var(--green-edge), var(--shadow-lift); }
.slip.off:hover, .drop.off:hover { box-shadow: inset 3px 0 0 #c7c7cc, var(--shadow-lift); }
.slip:not(.open):not(.done):not(.off):hover { box-shadow: var(--shadow-lift); }
.strip a.day:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); background: var(--card); }
.strip a.day.today:hover { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-lift); }
.cal .day.has { transition: background 0.15s ease; }
.cal .day.has:hover { background: #dbe9fc; }
.desk-row { transition: background 0.15s ease; border-radius: 10px; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.desk-row:hover { background: var(--row); }
@media (prefers-reduced-motion: reduce) {
  .slip, .drop, .desk-job, .strip a.day, a.box.stat, .shelf-card, .unit, a.alert { transition: none; }
  .slip:hover, .drop:hover, .desk-job:hover, .strip a.day:hover, a.box.stat:hover, .shelf-card:hover, .unit:hover, a.alert:hover { transform: none; }
}
.brand .demo-pill { margin-left: 0.15rem; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.7rem; font-weight: 500; letter-spacing: 0; background: var(--amber-soft); color: var(--amber-ink); }

/* ===== Phone polish ===== */
@media (max-width: 860px) {
  .content { padding: 0.9rem 0.85rem 6rem; }
  h1 { font-size: 1.45rem; }
  .lead { font-size: 0.92rem; margin-bottom: 0.8rem; }

  /* "New order" becomes a round + button above the tab bar */
  .btn.new-order {
    position: fixed; z-index: 7; right: 1rem; bottom: calc(4.6rem + env(safe-area-inset-bottom));
    width: 3.4rem; height: 3.4rem; min-height: 0; padding: 0; border-radius: 999px;
    font-size: 0; box-shadow: 0 6px 18px rgba(20, 33, 61, 0.35), 0 2px 4px rgba(0, 0, 0, 0.12);
  }
  .btn.new-order::before { content: "+"; font-size: 1.9rem; font-weight: 300; line-height: 1; margin-top: -0.12rem; }

  /* Rows of chips and alerts scroll sideways instead of stacking */
  .chips, .alerts {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .chips::-webkit-scrollbar, .alerts::-webkit-scrollbar { display: none; }
  .chip, .alert { flex: none; white-space: nowrap; }
  .alerts { margin: 0 -0.85rem 0.9rem; padding: 0.15rem 0.85rem 0.35rem; }
  .desk-stats-head { flex-direction: column; align-items: stretch; }
  .range-pick form {
    position: fixed; z-index: 8; left: 0.85rem; right: 0.85rem; top: auto;
    bottom: calc(5rem + env(safe-area-inset-bottom));
    flex-wrap: wrap; padding: 0.85rem; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  }
  .range-pick form input[type="date"] { flex: 1 1 8rem; min-width: 0; }
  .range-pick form .btn { flex: 1 1 100%; }

  /* Search and date filters fit the screen */
  .orders-find, .shelf-find { grid-template-columns: minmax(0, 1fr); }
  .orders-find > *, .shelf-find > *, .find-row > * { min-width: 0; }
  .find-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .find-q { width: 100%; }
  .find-field { flex: 1; width: auto; min-width: 0; }
  .find-row.dates { gap: 0.6rem; }
  .find-range { width: 100%; }
  .find-range input[type="date"] { flex: 1; width: auto; min-width: 0; }
  .find-range { flex-wrap: wrap; row-gap: 0.3rem; }
  .range-name { width: 100%; min-width: 0; font-size: 0.85rem; }
  .badge { white-space: nowrap; }

  /* Stats and amounts never break mid-number */
  .desk-row > b { white-space: nowrap; }
  .stat .muted { font-size: 0.8rem; }
  .stat-icon { position: absolute; top: 0.75rem; right: 0.75rem; float: none; }
  a.box.stat { position: relative; padding-right: 2.9rem; }

  /* 7-day strip: a dot instead of a cut-off name */
  .strip .day { min-height: 4.2rem; padding: 0.3rem 0.25rem; }
  .strip .day .job { font-size: 0; height: 0.45rem; width: 0.45rem; border-radius: 999px; background: var(--accent); margin-top: 0.35rem; }

  /* Order and delivery cards: tighter */
  .slip, .drop { padding: 0.7rem 0.75rem; gap: 0.5rem 0.75rem; }
  .slip { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .slip > a.drop-pic, a.drop-pic { width: 3.6rem; height: 3.6rem; align-self: start; }
  .drop { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .drop-top .muted { display: none; }
  .order-no { font-size: 1.05rem; }

  /* Payments: each order becomes a small card */
  .pay-table { overflow: visible; background: transparent; box-shadow: none; }
  .pay-table thead { display: none; }
  .pay-table table, .pay-table tbody { display: block; }
  .pay-table tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "num num state" "who who who" "sum paid left";
    gap: 0.3rem 0.6rem; margin-bottom: 0.55rem; padding: 0.75rem 0.85rem;
    background: var(--row); border-radius: 12px;
  }
  .pay-table td { padding: 0; border: 0; background: transparent !important; }
  .pay-table td:nth-child(1) { grid-area: num; }
  .pay-table td:nth-child(2) { grid-area: who; }
  .pay-table td:nth-child(3) { grid-area: sum; }
  .pay-table td:nth-child(4) { grid-area: paid; }
  .pay-table td:nth-child(5) { grid-area: left; }
  .pay-table td:nth-child(6) { grid-area: state; justify-self: end; }
  .pay-table td:nth-child(3)::before, .pay-table td:nth-child(4)::before, .pay-table td:nth-child(5)::before {
    display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  }
  .pay-table td:nth-child(3)::before { content: "Summa"; }
  .pay-table td:nth-child(4)::before { content: "Saņemts"; }
  .pay-table td:nth-child(5)::before { content: "Atlikums"; }
}

/* Month calendar: whole day is tappable, chosen day opens below */
.cal-month .day { position: relative; }
.cal-month .day .job { position: relative; z-index: 1; }
.cal-month .day-hit { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.cal-month .day-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.cal-month .day .num { position: relative; z-index: 1; pointer-events: none; }
.cal-month .day:hover { background: #f1f3f7; }
.cal-month .day.has:hover { background: #e2e6ef; }
.cal-month .day.picked { background: var(--accent); }
.cal-month .day.picked .num, .cal-month .day.picked .job { color: white; }
.cal-month .day.picked.today { box-shadow: inset 0 0 0 2px var(--brand-orange); }
.cal-month .dots { display: none; }
.cal-month .job.more { color: var(--muted); }
.cal-panel h2 { text-transform: none; }
.cal-order {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center;
  margin-top: 0.5rem; padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--row);
  color: var(--ink); text-decoration: none; transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.cal-order:first-of-type { margin-top: 0; }
.cal-order:hover { background: var(--card); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.cal-order .drop-pic { grid-area: auto; display: block; width: 3rem; height: 3rem; margin: 0; overflow: hidden; border-radius: 0.6rem; background: white; }
.cal-order .drop-pic img { width: 100%; height: 100%; object-fit: cover; }
.cal-order .drop-pic span { display: grid; place-items: center; height: 100%; font-weight: 600; color: var(--accent); }
.cal-order-main { display: grid; gap: 0.1rem; min-width: 0; }
.cal-order-main .muted { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-order-marks { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.cal-free-title { margin: 1rem 0 0.45rem; font-weight: 600; font-size: 0.9rem; }
.cal-free { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cal-free .chip { background: var(--green-soft); color: var(--green); box-shadow: none; }
.cal-free .chip:hover { box-shadow: inset 0 0 0 1.5px var(--green); }

@media (max-width: 860px) {
  .cal-month { padding: 0.6rem 0.45rem; }
  .cal-month .cal-head strong { font-size: 1.1rem; }
  .cal-month .navbtn { width: 2.8rem; height: 2.8rem; }
  .cal-month .grid7 { gap: 0.3rem; }
  .cal-month .day {
    min-height: 3.6rem; padding: 0.45rem 0 0.35rem; border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  }
  .cal-month .day .num { font-size: 1rem; font-weight: 500; }
  .cal-month .day .job { display: none; }
  .cal-month .dots { display: flex; gap: 3px; position: relative; z-index: 1; pointer-events: none; min-height: 6px; }
  .cal-month .dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
  .cal-month .dots i.plus { background: var(--amber); }
  .cal-month .day.picked .dots i { background: white; }
  .cal-month .day.out { opacity: 0.35; }
  .cal-order { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .cal-order .drop-pic { width: 2.6rem; height: 2.6rem; }
  .cal-order-marks { grid-column: 2; justify-content: flex-start; }
  .cal-free { flex-wrap: wrap; overflow: visible; }
}

/* ===== Settings ===== */
.nav a.set-link { display: flex; align-items: center; gap: 0.55rem; }
.nav a.set-link svg { width: 1.05rem; height: 1.05rem; flex: none; opacity: 0.75; }
.nav a.set-link.on svg { opacity: 1; }
.nav a.set-home { color: var(--ink); }
.set-group { margin-top: 1.2rem; }
.set-group-label { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; }
.set-card {
  display: flex; gap: 0.85rem; align-items: center; padding: 0.9rem 1rem; border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.set-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.set-card > span:last-child { display: grid; gap: 0.1rem; }
.set-card .muted { font-size: 0.85rem; }
.set-card-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 0.75rem; background: var(--accent-soft); color: var(--accent); }
.set-card-icon svg { width: 1.3rem; height: 1.3rem; }
.suffix-field { display: flex; align-items: center; gap: 0.45rem; }
.suffix-field input { max-width: 7rem; }
.suffix-field span { color: var(--muted); font-weight: 500; }
.example { background: var(--row); padding: 0.65rem 0.8rem; border-radius: 10px; font-size: 0.92rem; }
.narrow-note { max-width: 28rem; margin-top: 0.8rem; font-size: 0.88rem; }

/* ===== Item editor ===== */
.item-head { align-items: center; margin-bottom: 1rem; }
.item-head .lead { margin: 0.25rem 0 0; }
.item-editor { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.item-side { align-self: start; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.box-head h2 { margin: 0; }
.box-head .muted { font-size: 0.85rem; }
.item-editor .box .field + .field { margin-top: 0.8rem; }
.item-editor .box h2 { font-size: 1rem; }
.side-label { margin: 0.9rem 0 0.4rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* switches */
input.switch {
  appearance: none; -webkit-appearance: none; width: 2.6rem; height: 1.55rem; min-height: 0; padding: 0; flex: none;
  border-radius: 999px; background: #d1d1d6; box-shadow: none; position: relative; cursor: pointer; transition: background 0.2s ease;
}
input.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.55rem - 4px); height: calc(1.55rem - 4px);
  border-radius: 999px; background: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease;
}
input.switch:checked { background: #34c759; }
input.switch:checked::after { transform: translateX(1.05rem); }
input.switch:focus-visible { outline: 3px solid rgba(20, 33, 61, 0.35); outline-offset: 2px; box-shadow: none; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; }
.toggle-row > span { display: grid; gap: 0.1rem; }
.toggle-row .muted { font-size: 0.85rem; }

/* price lengths */
.len-list { display: grid; gap: 0.15rem; }
.len-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--line); }
.len-row:last-child { border-bottom: 0; }
.len-name { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.len-name b { font-weight: 500; }
.len-name .muted { font-size: 0.82rem; }
.len-row.off .unit-input { opacity: 0.35; }
.len-row.off .len-name b { color: var(--muted); }
.unit-input { display: inline-flex; align-items: center; position: relative; }
.unit-input input { width: 7.5rem; padding-right: 1.8rem; text-align: right; min-height: 2.3rem; }
.unit-input span { position: absolute; right: 0.65rem; color: var(--muted); pointer-events: none; }
details.inner { margin-top: 0.9rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }
details.inner summary { cursor: pointer; font-weight: 500; color: var(--accent); }
details.inner[open] summary { margin-bottom: 0.4rem; }
.weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.5rem; }
.weekdays .wd { display: grid; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); }
.weekdays .unit-input input { width: 100%; padding-left: 0.4rem; padding-right: 1.3rem; }
.weekdays .unit-input span { right: 0.4rem; font-size: 0.8rem; }

/* folding sections */
details.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary > span { display: grid; gap: 0.1rem; }
details.fold > summary .muted { font-size: 0.85rem; font-weight: 400; }
details.fold > summary::after { content: "›"; font-size: 1.4rem; color: var(--muted); transition: transform 0.2s ease; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold[open] > summary { margin-bottom: 0.7rem; }
.rule-card { background: var(--row); border-radius: 12px; padding: 0.75rem; margin-bottom: 0.6rem; display: grid; gap: 0.55rem; }
.rule-card[hidden] { display: none; }
.rule-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.55rem; }
.mini-field { display: grid; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }
.mini-field.grow { flex: 1 1 12rem; }
.mini-field input, .mini-field select { min-height: 2.3rem; color: var(--ink); font-size: 0.92rem; }
.mini-field input[type="date"] { width: 10rem; }
.amount-pair { display: flex; gap: 0.3rem; }
.amount-pair input { width: 5rem; }
.amount-pair select { width: 4.2rem; }
.link-btn { background: none; border: 0; color: var(--danger); font: inherit; font-size: 0.85rem; cursor: pointer; padding: 0.5rem 0.2rem; margin-left: auto; }
.rule-days { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.85rem; }
.day-pill input { position: absolute; opacity: 0; pointer-events: none; }
.day-pill span { display: grid; place-items: center; min-width: 2.1rem; height: 2rem; padding: 0 0.4rem; border-radius: 999px; background: white; box-shadow: 0 0 0 1px var(--line-strong); font-weight: 500; cursor: pointer; }
.day-pill input:checked + span { background: var(--accent); color: white; box-shadow: none; }
.day-pill input:focus-visible + span { outline: 3px solid rgba(20, 33, 61, 0.35); }

/* photos */
.photo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.75rem; margin-bottom: 0.7rem; }
.photo-tile { display: grid; gap: 0.4rem; min-width: 0; }
.photo-tile input { width: 100%; min-width: 0; }
.photo-img { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--row); }
.photo-img img { width: 100%; height: 100%; object-fit: cover; }
.photo-main { position: absolute; top: 0.4rem; left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: white; font-size: 0.72rem; font-weight: 500; }
.photo-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 0.3rem; padding: 0.4rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.45)); opacity: 0; transition: opacity 0.15s ease; }
.photo-tile:hover .photo-tools, .photo-tile:focus-within .photo-tools { opacity: 1; }
.icon-btn { width: 2rem; height: 2rem; border-radius: 999px; border: 0; background: white; color: var(--ink); font-size: 0.95rem; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.danger { color: var(--danger); }
.photo-tile input { min-height: 2.1rem; font-size: 0.85rem; }
.photo-drop {
  display: grid; place-content: center; justify-items: center; gap: 0.15rem; aspect-ratio: 4 / 3; padding: 0.5rem; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: 12px; color: var(--accent); cursor: pointer; font-size: 0.85rem;
}
.photo-drop:hover { background: var(--accent-soft); border-color: var(--accent); }
.photo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-drop-plus { font-size: 1.8rem; line-height: 1; font-weight: 300; }
.photo-drop .muted { font-size: 0.75rem; }

/* look choices in the side column */
.looks.compact { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.looks.compact .choice-card { padding: 0.5rem; gap: 0.3rem; font-size: 0.82rem; }
.looks.compact .choice-card .muted:empty { display: none; }
.looks.compact .swatch { height: 1.8rem; }
.looks.compact .mini { height: 1.8rem; }
.item-side .look-preview img, .item-side .look-preview .ph { height: 9rem; }
.item-side .look-nav { top: 3.7rem; }
.fields.tight { gap: 0.45rem; }

/* save bar */
.savebar {
  grid-column: 1 / -1; position: sticky; bottom: 0.8rem; z-index: 4;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.6rem 0.7rem 0.6rem 1rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, 0.1);
}
.savebar-text { font-size: 0.9rem; color: var(--muted); }
.savebar .when-dirty { display: none; color: var(--amber-ink); font-weight: 500; }
.item-editor.dirty .savebar .when-dirty { display: inline; }
.item-editor.dirty .savebar .when-clean { display: none; }
.item-editor.dirty .savebar { box-shadow: 0 0 0 1.5px var(--amber), 0 8px 24px rgba(0, 0, 0, 0.12); }

@media (max-width: 1100px) {
  .item-editor { grid-template-columns: 1fr; }
  .item-side { position: static; }
}
@media (max-width: 860px) {
  .set-cards { grid-template-columns: 1fr; }
  .savebar { bottom: calc(0.6rem + env(safe-area-inset-bottom)); }
  .item-head .actions .btn:not(.line) { display: none; }
  .mini-field input[type="date"] { width: 9.5rem; }
  .weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-tools { opacity: 1; gap: 0.2rem; padding: 0.3rem; }
  .photo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
  .icon-btn { width: 1.75rem; height: 1.75rem; font-size: 0.85rem; }
}

/* Settings item list */
.cat-search { margin: 0 0 0.8rem; max-width: 26rem; }
.cat-list { display: grid; gap: 0.55rem; }
.cat-row {
  position: relative; display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center;
  padding: 0.7rem 0.9rem 0.7rem 0.7rem; border-radius: 14px; background: var(--card); box-shadow: var(--shadow);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.cat-row[hidden] { display: none; }
.cat-row:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.cat-row.hidden-item .cat-pic, .cat-row.hidden-item .cat-prices { opacity: 0.5; }
.cat-pic { width: 4.2rem; height: 4.2rem; overflow: hidden; border-radius: 0.75rem; background: var(--row); display: grid; place-items: center; color: var(--accent); font-weight: 600; font-size: 1.2rem; }
.cat-pic.c-square { border-radius: 0.2rem; }
.cat-pic.c-round { border-radius: 1.1rem; }
.cat-pic.c-pill { border-radius: 999px; }
.cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cat-main { display: grid; gap: 0.15rem; min-width: 0; }
.cat-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.cat-link { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 1.02rem; }
.cat-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cat-main .muted { font-size: 0.85rem; }
.cat-prices { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-top: 0.15rem; font-size: 0.9rem; }
.cat-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cat-price .muted { font-size: 0.8rem; }
.cat-extras { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0.35rem; }
.cat-go { color: var(--muted); font-size: 1.4rem; margin-left: 0.3rem; }
@media (max-width: 860px) {
  .cat-row { grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.7rem; }
  .cat-pic { width: 3.4rem; height: 3.4rem; }
  .cat-extras { grid-column: 2; justify-content: flex-start; }
  .cat-go { display: none; }
}

/* Delivery prices */
.rule-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0.8rem 0 0.3rem; padding: 0.75rem 0.85rem; border-radius: 12px; background: var(--row); }
.rule-sentence > input { width: 3.4rem; min-height: 2.2rem; text-align: center; }
.rule-sentence .unit-input input { width: 6rem; min-height: 2.2rem; }
.small-note { font-size: 0.85rem; }
.zone-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.1rem 0 0.5rem; }
.zone-tools input { max-width: 16rem; min-height: 2.2rem; }
.zone-table, .ring-table { box-shadow: none; background: transparent; }
.zone-table td, .ring-table td { padding: 0.4rem 0.35rem; vertical-align: middle; }
.zone-table input, .ring-table input { min-height: 2.2rem; font-size: 0.92rem; }
.zone-table .unit-input input, .ring-table .unit-input input { width: 7.5rem; }
.zone-table .code-cell { font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 0.6rem; }
.zone-table tr.add-row td { background: var(--accent-soft); }
.zone-table tr.add-row td:first-child { border-radius: 10px 0 0 10px; }
.zone-table tr.add-row td:last-child { border-radius: 0 10px 10px 0; }
.zone-table tr.add-row input { width: 100%; }
.zone-table tr.add-row td:first-child input { width: 5rem; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .icon-btn { margin-left: 0.3rem; vertical-align: middle; }
.ring-table { margin-bottom: 0.8rem; }
.zone-table tr.add-row:hover td { background: var(--accent-soft); }
.ring-table tbody tr:hover td { background: transparent; }
.zone-table tbody tr:not(.add-row):hover td { background: #f8fafe; }
@media (max-width: 860px) {
  .zone-tools { flex-direction: column; align-items: stretch; }
  .zone-tools input { max-width: none; }
}

/* Website content form */
.web-form { gap: 0.6rem; }
.web-form .savebar { position: sticky; }
.web-form.dirty .savebar .when-dirty { display: inline; }
.web-form.dirty .savebar .when-clean { display: none; }
.web-form.dirty .savebar { box-shadow: 0 0 0 1.5px var(--amber), 0 8px 24px rgba(0, 0, 0, 0.12); }
.web-form details.fold .fields { gap: 0.7rem; }
.preview-frame { border: 0; box-shadow: var(--shadow); border-radius: 14px; height: min(28rem, 52vh); }

/* Radios and plain checkboxes are not text fields */
input[type="radio"], input[type="checkbox"]:not(.switch) {
  width: auto; min-height: 0; padding: 0; box-shadow: none; border-radius: initial; accent-color: var(--accent);
}
input[type="radio"]:focus, input[type="checkbox"]:not(.switch):focus { box-shadow: none; }
.choice-card { position: relative; padding-right: 2.4rem; }
.choice-card > input[type="radio"] { position: absolute; top: 0.85rem; right: 0.85rem; width: 1.05rem; height: 1.05rem; margin: 0; }
.looks.compact .choice-card { padding-right: 0.5rem; }
.looks.compact .choice-card > input[type="radio"] { top: 0.4rem; right: 0.4rem; width: 0.9rem; height: 0.9rem; }

/* Keep the last part of every form clear of the sticky Save bar */
.item-editor, .web-form { padding-bottom: 0.4rem; }
.savebar { margin-top: 0.8rem; }

/* Number + unit fields: the unit sits beside the number, never on top of it */
.unit-input, .unit-field {
  display: inline-flex; align-items: center; position: static; background: white; border-radius: 0.6rem;
  box-shadow: 0 0 0 1px var(--line-strong); transition: box-shadow 0.15s ease; min-width: 0;
}
.unit-input:focus-within, .unit-field:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-ring); }
.unit-input input, .unit-field input {
  box-shadow: none !important; background: transparent; border: 0; border-radius: 0.6rem 0 0 0.6rem;
  width: 6.2rem; min-width: 0; min-height: 2.25rem; padding: 0.3rem 0.3rem 0.3rem 0.6rem; text-align: right;
}
.unit-input input::placeholder, .unit-field input::placeholder { text-align: right; font-size: 0.85rem; }
.unit-input > span, .unit-field > span { position: static; padding: 0 0.65rem 0 0.15rem; color: var(--muted); white-space: nowrap; pointer-events: none; }
.weekdays .unit-input { width: 100%; }
.weekdays .unit-input input { width: 100%; padding-right: 0.15rem; }
.weekdays .unit-input > span { padding-right: 0.45rem; }
.zone-table .unit-field input, .ring-table .unit-field input { width: 6.5rem; }
.zone-table tr.add-row .unit-field input { width: 6.5rem; }
.rule-sentence .unit-field input { width: 4.5rem; }

/* Rules as numbered steps */
.how-steps { margin: 0.2rem 0 0.4rem; padding-left: 1.3rem; display: grid; gap: 0.3rem; font-size: 0.92rem; color: var(--ink); }
.how-steps li::marker { color: var(--accent); font-weight: 600; }
.official { display: block; margin-top: 0.15rem; font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.km-cell { white-space: nowrap; color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }

/* Map */
.map-wrap { position: relative; }
.delivery-map { height: 24rem; border-radius: 12px; overflow: hidden; background: var(--row); z-index: 0; }
.map-legend {
  position: absolute; z-index: 500; left: 0.6rem; bottom: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem;
  max-width: calc(100% - 1.2rem); padding: 0.45rem 0.7rem; border-radius: 10px; font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.map-legend span { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.map-legend i { width: 0.7rem; height: 0.7rem; border-radius: 999px; display: inline-block; }
.map-legend i.home { background: #2b82cb; box-shadow: 0 0 0 2px white, 0 0 0 3px #2b82cb; width: 0.55rem; height: 0.55rem; }
.map-tools { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; margin-top: 0.8rem; align-items: start; }
.try-delivery .mini-field { color: var(--ink); font-weight: 500; font-size: 0.9rem; }
.try-delivery input { max-width: 16rem; }
.try-result { margin-top: 0.5rem; padding: 0.65rem 0.8rem; border-radius: 10px; background: var(--row); font-size: 0.9rem; min-height: 3.2rem; }
.try-fee { font-size: 1.15rem; font-weight: 600; }
.base-form { display: grid; gap: 0.45rem; justify-items: start; }
.credit { margin-top: 0.7rem; font-size: 0.72rem; color: var(--muted); }
@media (max-width: 860px) {
  .delivery-map { height: 18rem; }
  .map-tools { grid-template-columns: 1fr; }
  .official { max-width: 10rem; }
}
[hidden] { display: none !important; }
.special-card {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.7rem 1rem;
  margin: 1rem 0 0.4rem; padding: 0.8rem 0.9rem; border-radius: 12px;
  background: linear-gradient(135deg, #f3f0ff, #eef5ff); box-shadow: inset 0 0 0 1px rgba(94, 92, 230, 0.18);
}
.special-card > div:first-of-type { display: grid; gap: 0.15rem; max-width: 34rem; }
.special-card .muted { font-size: 0.85rem; }
.special-set { display: flex; align-items: center; gap: 0.5rem; }
details.bulk-add { margin-top: 0.6rem; }
.flow-title { margin: 0.4rem 0 0.5rem; font-weight: 500; font-size: 0.92rem; color: var(--muted); }
.price-flow { display: grid; gap: 0.5rem; }
.flow-step {
  display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.8rem; align-items: center;
  padding: 0.7rem 0.85rem; border-radius: 12px; background: var(--row);
}
.flow-step > div:not(.flow-price) { display: grid; gap: 0.1rem; }
.flow-step .muted { font-size: 0.86rem; }
.flow-num { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: var(--accent); color: white; font-weight: 600; font-size: 0.9rem; }
.flow-price { display: flex; align-items: center; gap: 0.45rem; }
.flow-price .unit-field input { width: 4.5rem; }
.prefix-edit summary { cursor: pointer; font-size: 0.78rem; color: var(--accent); margin-top: 0.15rem; }
.prefix-edit .mini-field { margin-top: 0.35rem; }
.prefix-edit input { width: 4rem; min-height: 2rem; }
@media (max-width: 860px) {
  .flow-step { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .flow-price { grid-column: 2; }
}

/* Postal price list */
.list-tools { display: grid; gap: 0.55rem; margin: 1rem 0 0.6rem; }
.list-tools input[type="search"] { max-width: 28rem; min-height: 2.4rem; }
.list-tools .chip { cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 500; }
.fill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--row); font-size: 0.9rem; }
.fill-row .unit-field input { width: 4.5rem; }
.code-list { display: grid; margin-top: 0.4rem; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.code-row {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) 4.6rem auto 6.2rem; gap: 0.8rem; align-items: center;
  padding: 0.45rem 0.8rem; background: var(--card); border-top: 1px solid var(--line);
}
.code-row:first-child { border-top: 0; }
.code-row[hidden] { display: none; }
.code-row:hover { background: #fafbfd; }
.code-no { font-weight: 600; font-variant-numeric: tabular-nums; }
.code-where { display: grid; min-width: 0; }
.code-where b { font-weight: 500; }
.code-where .muted { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-km { color: var(--muted); font-size: 0.85rem; text-align: right; font-variant-numeric: tabular-nums; }
.code-row .unit-field input { width: 5.5rem; }
.free-tag { visibility: hidden; justify-self: start; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 0.78rem; font-weight: 500; }
.code-row.is-free .free-tag { visibility: visible; }
.code-row.has-price { background: #fbfdff; }
.code-row.changed { box-shadow: inset 3px 0 0 var(--amber); }
.code-row.bad .unit-field { box-shadow: 0 0 0 1.5px var(--danger); }
#price-list.dirty .savebar .when-dirty { display: inline; }
#price-list.dirty .savebar .when-clean { display: none; }
#price-list.dirty .savebar { box-shadow: 0 0 0 1.5px var(--amber), 0 8px 24px rgba(0, 0, 0, 0.12); }
#price-list .savebar { margin-top: 0.8rem; }
.map-pop { display: grid; gap: 0.2rem; min-width: 12rem; font: 14px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
.map-pop .muted { font-size: 0.8rem; }
.pop-fee { font-size: 1.1rem; font-weight: 600; }
.pop-set { display: flex; gap: 0.35rem; margin-top: 0.3rem; }
.pop-set input { width: 6rem; min-height: 2rem; }
.leaflet-container { cursor: crosshair; }
@media (max-width: 860px) {
  .code-row { grid-template-columns: 3rem minmax(0, 1fr) 6rem; gap: 0.3rem 0.6rem; }
  .code-km { grid-column: 2; grid-row: 2; text-align: left; }
  .code-row .unit-field { grid-column: 3; grid-row: 1; }
  .free-tag { grid-column: 3; grid-row: 2; justify-self: end; font-size: 0.68rem; padding: 0.05rem 0.4rem; }
}

.box .fields > .btn.small { justify-self: start; }

/* Google reviews integration */
.stars { color: #fbbc04; letter-spacing: 0.06em; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 52rem; }
.g-head-text { min-width: 0; }
.g-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.g-logo { width: 3.4rem; height: 3.4rem; border-radius: 1rem; background: white; display: grid; place-items: center; box-shadow: var(--shadow); }
.g-logo .g-mark { width: 1.9rem; height: 1.9rem; }
.g-logo.small { width: 2.4rem; height: 2.4rem; border-radius: 0.75rem; flex: none; }
.g-logo.small .g-mark { width: 1.3rem; height: 1.3rem; }
.g-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.g-head h1 { margin-bottom: 0.25rem; }
.g-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.g-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.g-status i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.g-status.on { background: #e6f4ea; color: #137333; }
.g-status.wait { background: #fef7e0; color: #b06000; }
.g-status.err { background: #fce8e6; color: #c5221f; }
.g-alert { background: #fce8e6; color: #a50e0e; border-radius: 0.7rem; padding: 0.6rem 0.8rem; margin-bottom: 0.9rem; }
.g-overview-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.g-score { display: flex; align-items: center; gap: 0.8rem; }
.g-score > b { font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.g-score > span { display: grid; gap: 0.15rem; }
.g-score .stars { font-size: 1.25rem; }
.g-stats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.g-stats div { background: var(--row); border-radius: 0.8rem; padding: 0.55rem 0.9rem; min-width: 6rem; }
.g-stats dt { font-size: 0.78rem; color: var(--muted); }
.g-stats dd { margin: 0; font-size: 1.35rem; font-weight: 600; }
.g-stats dd.small { font-size: 0.9rem; font-weight: 500; padding-top: 0.3rem; }
.g-place { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
.g-place svg, .g-pin svg { width: 1.1rem; height: 1.1rem; color: #ea4335; flex: none; }
.g-place > span { flex: 1; min-width: 12rem; }
.g-steps { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.g-steps li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--muted); padding-right: 0.8rem; }
.g-steps li + li::before { content: ""; width: 1.4rem; height: 1px; background: var(--line-strong); margin-right: 0.4rem; }
.g-steps li span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 0.82rem; background: var(--gray-soft); }
.g-steps li.now { color: var(--ink); font-weight: 600; }
.g-steps li.now span { background: #1a73e8; color: white; }
.g-steps li.done span { background: #e6f4ea; color: #137333; }
.g-guide { margin: 0.4rem 0 1rem; padding-left: 1.3rem; display: grid; gap: 0.4rem; color: var(--muted); }
.g-guide b { color: var(--ink); font-weight: 600; }
.g-inline { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.7rem; }
.g-inline input:not([type="hidden"]) { flex: 1; min-width: 12rem; }
.g-fine, .g-legal { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; }
.g-legal { text-align: center; margin-top: 0.2rem; }
.g-results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.g-place-pick { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 0.9rem; }
.g-place-pick:hover { border-color: #1a73e8; background: #f8fbff; }
.g-place-text { flex: 1; display: grid; gap: 0.1rem; min-width: 0; }
.g-mini { font-size: 0.82rem; color: #b06000; }
.g-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.g-section-head h2 { margin-bottom: 0.15rem; }
.g-chips { margin-bottom: 0.6rem; }
.g-chips .chip span { color: var(--muted); margin-left: 0.2rem; }
.g-chips .chip.on span { color: rgba(255, 255, 255, 0.75); }
.g-list { display: grid; }
.g-review { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; padding: 0.95rem 0.1rem; border-top: 1px solid var(--line); }
.g-review:first-child { border-top: 0; }
.g-avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; color: white; display: grid; place-items: center; font-weight: 600; font-size: 1.05rem; flex: none; }
.g-review-body { min-width: 0; display: grid; gap: 0.2rem; }
.g-review-head { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.g-source { font-size: 0.72rem; color: var(--muted); background: var(--gray-soft); border-radius: 999px; padding: 0.05rem 0.5rem; }
.g-review-meta { display: flex; gap: 0.5rem; align-items: center; font-size: 0.86rem; }
.g-text { margin-top: 0.15rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.g-toggle { display: grid; justify-items: center; gap: 0.2rem; font-size: 0.72rem; color: var(--muted); cursor: pointer; align-self: start; }
.g-toggle input:disabled { opacity: 0.35; }
.g-more { justify-self: center; margin-top: 0.6rem; }
.g-reviews .savebar { margin-top: 0.8rem; }
.g-widget-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; padding: 1rem; background: var(--row); border-radius: 0.9rem; }
.g-badge { display: flex; align-items: center; gap: 0.7rem; background: white; border-radius: 0.9rem; padding: 0.7rem 1rem; box-shadow: var(--shadow-card); }
.g-badge-logo .g-mark { width: 1.6rem; height: 1.6rem; }
.g-badge > span:last-child { display: grid; }
.g-badge b { font-size: 1.3rem; }
.g-quote { margin: 0; flex: 1; min-width: 14rem; background: white; border-radius: 0.9rem; padding: 0.9rem 1rem; box-shadow: var(--shadow-card); display: grid; gap: 0.5rem; }
.g-quote footer { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.g-quote footer > span:last-child { display: grid; }
.g-quote .g-avatar { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; }
.g-settings h2 { margin-bottom: 0.3rem; }
.g-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.g-row:first-of-type { border-top: 0; }
.g-row .muted { font-size: 0.88rem; }
.g-fold { display: block; }
.g-fold summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none; }
.g-fold summary::-webkit-details-marker { display: none; }
.g-chev { font-size: 0.86rem; font-weight: 600; color: #1a73e8; white-space: nowrap; }
.g-chev::after { content: " ›"; }
.g-fold[open] .g-chev::after { content: " ⌄"; }
.g-fold[open] > :not(summary) { margin-top: 0.8rem; }
.g-link-card { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.9rem; }
.g-link-card > span:nth-child(2) { flex: 1; display: grid; gap: 0.1rem; min-width: 0; }
@media (max-width: 860px) {
  .g-head { grid-template-columns: auto 1fr; }
  .g-head-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .g-head h1 { font-size: 1.5rem; }
  .g-stats { width: 100%; }
  .g-stats div { flex: 1 1 5rem; min-width: 0; }
  .g-stats div:last-child { flex-basis: 100%; }
  .g-score > b { font-size: 2.5rem; }
  .g-place-pick { flex-wrap: wrap; }
  .g-place-pick form { width: 100%; }
  .g-place-pick .btn { width: 100%; }
}
.g-create summary { display: flex; align-items: center; gap: 0.8rem; cursor: pointer; list-style: none; }
.g-create summary::-webkit-details-marker { display: none; }
.g-create summary > span:nth-child(2) { flex: 1; display: grid; gap: 0.1rem; min-width: 0; }
.g-create-icon { width: 2.4rem; height: 2.4rem; border-radius: 0.75rem; background: #e8f0fe; color: #1a73e8; display: grid; place-items: center; font-size: 1.4rem; font-weight: 500; flex: none; }
.g-ready { font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: #fef7e0; color: #b06000; white-space: nowrap; }
.g-ready.ok { background: #e6f4ea; color: #137333; }
.g-create-body { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.g-create-body h3 { font-size: 0.98rem; margin: 0 0 0.2rem; }
.g-create-body h3 + .muted { margin-bottom: 0.6rem; }
.g-copy-list { margin: 0 0 1.2rem; display: grid; border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; }
.g-copy { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0.8rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); align-items: center; }
.g-copy:first-child { border-top: 0; }
.g-copy dt { font-weight: 600; font-size: 0.9rem; display: grid; gap: 0.1rem; }
.g-copy-hint { font-weight: 400; font-size: 0.76rem; color: var(--muted); }
.g-copy dd { margin: 0; display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
.g-copy-value { overflow-wrap: anywhere; font-size: 0.92rem; }
.g-copy-btn { flex: none; }
.g-copy-btn.copied { color: #137333; box-shadow: 0 0 0 1px #34a853; }
.g-copy.missing { background: #fffbf0; }
.g-copy.missing dd { justify-content: flex-start; flex-wrap: wrap; font-size: 0.9rem; }
@media (max-width: 860px) {
  .g-copy { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* Reviews widget settings */
.w-page { max-width: 60rem; }
.w-logo { color: #1a73e8; }
.w-logo svg { width: 1.8rem; height: 1.8rem; }
.w-form { display: grid; gap: 1rem; }
.w-sites { align-items: flex-start; }
.w-sites-field { width: min(18rem, 45%); }
.w-sites-field textarea { width: 100%; min-height: 2.6rem; }
.w-layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin: 0.6rem 0 1.1rem; }
.w-layout { cursor: pointer; }
.w-layout input { position: absolute; opacity: 0; pointer-events: none; }
.w-layout > span { display: grid; gap: 0.15rem; align-content: start; height: 100%; padding: 0.8rem 0.9rem; border-radius: 0.9rem; box-shadow: inset 0 0 0 1px var(--line); }
.w-layout svg { width: 1.7rem; height: 1.7rem; color: var(--muted); margin-bottom: 0.3rem; }
.w-layout .muted { font-size: 0.8rem; }
.w-layout:hover > span { background: #fafafa; }
.w-layout input:checked + span { box-shadow: inset 0 0 0 2px #1a73e8; background: #f4f8ff; }
.w-layout input:checked + span svg { color: #1a73e8; }
.w-layout input:focus-visible + span { outline: 3px solid rgba(26, 115, 232, 0.35); }
.w-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem 1rem; align-items: start; }
.w-segs { display: inline-flex; background: var(--gray-soft); border-radius: 0.7rem; padding: 0.2rem; }
.w-seg input { position: absolute; opacity: 0; pointer-events: none; }
.w-seg span { display: block; padding: 0.35rem 0.8rem; border-radius: 0.55rem; cursor: pointer; font-size: 0.9rem; }
.w-seg input:checked + span { background: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.w-color { display: flex; gap: 0.4rem; align-items: center; }
.w-color input[type="color"] { width: 2.6rem; height: 2.4rem; padding: 0.15rem; border-radius: 0.6rem; flex: none; cursor: pointer; }
.w-color input:not([type="color"]) { min-width: 0; font-family: ui-monospace, Menlo, monospace; }
.w-note { margin-top: 0.9rem; padding: 0.6rem 0.8rem; border-radius: 0.7rem; background: var(--row); font-size: 0.9rem; }
.w-note.warn { background: #fef7e0; color: #7a4a00; }
.w-stage { position: relative; min-height: 14rem; padding: 1.4rem; border-radius: 1rem; background: #f6f7f9; transition: background 0.2s; overflow: hidden; }
.w-stage.dark { background: #161719; }
.w-stage.dark .w-empty { color: #a8adb3; }
.w-save { position: sticky; bottom: 0.8rem; display: flex; justify-content: flex-end; pointer-events: none; }
.w-save .btn { pointer-events: auto; }
.w-save .btn { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
.w-code { margin: 0.7rem 0; padding: 0.8rem 1rem; border-radius: 0.8rem; background: #1f2124; color: #e8eaed; font-size: 0.82rem; overflow-x: auto; white-space: pre; }
.w-more { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.w-more summary { cursor: pointer; font-weight: 600; }
.w-more > p { margin-top: 0.5rem; }
@media (max-width: 760px) {
  .w-layouts, .w-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-sites { flex-direction: column; align-items: stretch; }
  .w-sites-field { width: 100%; }
}
.w-places { display: grid; border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; }
.w-place { display: grid; grid-template-columns: auto 1fr minmax(9rem, 12rem); gap: 0.9rem; align-items: center; padding: 0.75rem 0.9rem; border-top: 1px solid var(--line); }
.w-place:first-child { border-top: 0; }
.w-place-text { display: grid; gap: 0.1rem; min-width: 0; }
.w-state { font-size: 0.82rem; color: var(--muted); }
.w-state.on { color: #137333; font-weight: 600; }
.w-state.none { color: #b06000; }
.w-folder { margin-top: 0.9rem; }
.w-folder summary { cursor: pointer; font-size: 0.9rem; list-style: none; }
.w-folder summary::-webkit-details-marker { display: none; }
.w-folder .w-link { color: #1a73e8; margin-left: 0.3rem; }
.w-folder p { margin: 0.5rem 0 0.4rem; font-size: 0.88rem; }
.w-folder input { width: 100%; }
.w-site-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
@media (max-width: 560px) { .w-place { grid-template-columns: auto 1fr; } .w-place select { grid-column: 1 / -1; } }

/* Website reviews inbox */
.nav-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem; margin-left: 0.45rem; border-radius: 999px; background: #d93025; color: white; font-size: 0.72rem; font-weight: 700; vertical-align: 1px; }
.rv-lead { margin: 0.3rem 0 1.1rem; }
.rv-chips { margin-bottom: 1rem; }
.rv-chips .chip span { color: var(--muted); margin-left: 0.2rem; }
.rv-chips .chip.on span { color: rgba(255, 255, 255, 0.75); }
.rv-list { display: grid; gap: 0.8rem; max-width: 46rem; }
.rv { display: grid; gap: 0.7rem; }
.rv-head { display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center; }
.rv-who { display: grid; gap: 0.1rem; min-width: 0; }
.rv-who .stars { color: #f9ab00; letter-spacing: 0.05em; }
.rv-product { font-weight: 600; }
.rv-state { font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--gray-soft); color: var(--muted); }
.rv-state.new { background: #fef7e0; color: #b06000; }
.rv-state.on { background: #e6f4ea; color: #137333; }
.rv-text { margin: 0; white-space: pre-line; font-size: 1.02rem; }
.rv-contact { margin: 0; font-size: 0.86rem; }
.rv-contact span { opacity: 0.8; }
.rv-reply { display: grid; gap: 0.35rem; padding: 0.75rem; border-radius: 0.8rem; background: var(--row); }
.rv-reply textarea { width: 100%; background: white; }
.rv-reply-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.84rem; }
.rv-acts { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.rv-acts form { display: contents; }
.rv-gap { flex: 1; }
.rv-empty { padding: 1.4rem; }
.rv-google { margin-top: 1.2rem; font-size: 0.9rem; color: var(--muted); }
.rv-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rv-tags span { font-size: 0.84rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--row); }

/* Payment links (Montonio) */
.pl-hint { font-size: 0.88rem; margin: 0; padding: 0 0.2rem; }
.pl-list { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.5rem; }
.pl-row { display: grid; gap: 0.35rem; padding: 0.65rem 0.75rem; border-radius: 0.7rem; background: var(--row); }
.pl-row .muted { font-size: 0.86rem; }
.pl-row .actions { margin-top: 0.15rem; }
.pl-top { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.pl-sub { font-size: 1rem; margin: 1.1rem 0 0.4rem; }
.pl-methods { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0 0 0.6rem; padding: 0; }
.pl-methods li { background: var(--gray-soft); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.88rem; font-weight: 500; }
.pv-list { display: grid; gap: 0.6rem; max-width: 52rem; margin-bottom: 1rem; }
.pv-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.9rem 1rem; background: var(--card, white); border-radius: 1rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
a.pv-card:hover { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.pv-card.later { opacity: 0.6; box-shadow: 0 0 0 1px var(--line); background: transparent; }
.pv-text { display: grid; gap: 0.15rem; min-width: 0; }
.pv-text .muted { font-size: 0.88rem; }
.pv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.pv-main { justify-self: start; font-size: 0.72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.05rem 0.55rem; }
.pv-later-label { margin-top: 0.6rem; }
@media (max-width: 640px) {
  .pv-card { grid-template-columns: auto minmax(0, 1fr); }
  .pv-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
.rv-src { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.4rem; font-size: 0.72rem; font-weight: 500; color: var(--muted); background: var(--gray-soft); border-radius: 999px; padding: 0.05rem 0.5rem 0.05rem 0.35rem; vertical-align: 0.1em; }
.rv-src .g-mark { width: 0.8rem; height: 0.8rem; }
.rv-gsum { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: inherit; margin-bottom: 0.9rem; }
.rv-gsum > span:nth-child(2) { flex: 1; display: grid; gap: 0.1rem; min-width: 0; }
.rv-more { display: block; width: max-content; margin: 0.4rem auto 0; }

/* Funkcijas */
.core-note { margin: 0 0 1rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--row); font-size: 0.9rem; color: var(--muted); }
.core-note b { color: var(--ink); font-weight: 500; }
.feature-list { display: grid; gap: 0.6rem; max-width: 46rem; }
.feature-card {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; cursor: pointer;
  padding: 0.85rem 1rem; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); transition: box-shadow 0.18s ease;
}
.feature-card:hover { box-shadow: var(--shadow-lift); }
.feature-card:not(.on) .set-card-icon { background: var(--gray-soft); color: var(--muted); }
.feature-text { display: grid; gap: 0.1rem; }
.feature-text .muted { font-size: 0.86rem; }
.code-block { margin: 0.4rem 0 0.6rem; padding: 0.7rem 0.85rem; border-radius: 10px; background: #1d1d1f; color: #f5f5f7; font: 0.8rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; }
.booking-preview { align-self: start; }
.booking-preview .board-head .btn { white-space: nowrap; }
.booking-split { grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem); }
@media (max-width: 1240px) { .booking-split { grid-template-columns: minmax(0, 1fr); } .booking-split .booking-preview { max-width: 34rem; } }
.code-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.code-row .code-block { flex: 1; min-width: 0; }
.code-row .btn { flex: none; margin-top: 0.4rem; }
.code-row .btn.copied { color: #137333; box-shadow: 0 0 0 1px #34a853; }
.code-item { display: flex; gap: 0.5rem; align-items: center; margin: 0.2rem 0; }
.code-item select { width: auto; max-width: 100%; }
.badge.test { background: transparent; color: var(--amber-ink); box-shadow: inset 0 0 0 1px currentColor; }

/* Test payments and the booking test page */
.pt-flag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: #8a4b00; background: #fff3d6; border-radius: 999px; padding: 0.25rem 0.7rem; }
.pt-box { max-width: 26rem; }
.pt-sum { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.2rem 0 1rem; }
.pt-form { display: grid; gap: 0.6rem; }
.pt-banks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pt-bank { display: flex; gap: 0.5rem; align-items: center; padding: 0.7rem; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; font-weight: 600; }
.pt-bank input { width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; box-shadow: none; appearance: auto; accent-color: var(--accent); }
.pt-done { text-align: center; }
.pt-tick { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 0.6rem; border-radius: 999px; background: #e5f6e9; color: #1a7f37; font-size: 1.8rem; }
.bt-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem clamp(1rem, 4vw, 2.5rem); }
.bt-head .back { margin: 0; }
.bt-page { max-width: 40rem; margin: 0 auto; padding: 0.5rem 1rem 4rem; }
.bt-note { margin-bottom: 1rem; }
.bt-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.bt-tabs .chip.on { background: var(--accent); color: #fff; }
.bt-item { display: grid; grid-template-columns: 9rem 1fr; gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
.bt-item h1 { margin: 0.1rem 0 0.4rem; font-size: 1.7rem; }
.bt-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #f5f5f7; }
.bt-cart-title { margin: 2.5rem 0 0.8rem; }
@media (max-width: 560px) { .bt-item { grid-template-columns: 1fr; } .bt-photo { aspect-ratio: 4 / 3; } }
.preview-cart { display: flex; justify-content: flex-end; margin-bottom: 0.6rem; }
.money-page { display: grid; gap: 1rem; max-width: 36rem; }
.money-page .box h2 { margin: 0 0 0.2rem; }

/* Website content editor (Vietnes saturs) and Izskats */
.sc-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sc-grid { display: grid; grid-template-columns: 13rem minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: 1rem; }
.sc-parts { position: sticky; top: 1rem; display: grid; gap: 0.1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.sc-parts .nav-label { margin: 0.8rem 0 0.2rem; }
.sc-parts .nav-label:first-child { margin-top: 0; }
.sc-part { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border-radius: 9px; color: inherit; text-decoration: none; font-size: 0.92rem; }
.sc-part:hover { background: var(--line); }
.sc-part.on { background: var(--accent); color: #fff; }
.sc-part.off { color: var(--muted, #6e6e73); }
.sc-part small { font-size: 0.72rem; opacity: 0.8; }
.sc-form { display: grid; gap: 0.8rem; min-width: 0; }
.sc-form h2 { margin: 0; }
.sc-field { display: grid; gap: 0.25rem; font-size: 0.9rem; }
.sc-field > span { color: var(--muted, #6e6e73); font-size: 0.82rem; }
.sc-num input { max-width: 8rem; }
.sc-group { border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 0.9rem 0.9rem; margin: 0; display: grid; gap: 0.6rem; min-width: 0; }
.sc-group legend { font-weight: 600; font-size: 0.88rem; padding: 0 0.3rem; }
.sc-group .sc-group { border-style: dashed; }
.sc-section { border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong); background: #fff; }
.sc-section > summary { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; cursor: pointer; font-weight: 600; list-style: none; }
.sc-section > summary::-webkit-details-marker { display: none; }
.sc-section > summary::before { content: "›"; margin-right: 0.3rem; transition: transform 0.15s; display: inline-block; }
.sc-section[open] > summary::before { transform: rotate(90deg); }
.sc-section > summary > span { flex: 1; }
.sc-section.off > summary > span { color: var(--muted, #6e6e73); text-decoration: line-through; }
.sc-section-body { display: grid; gap: 0.6rem; padding: 0 1rem 1rem; }
.sc-page-on { font-weight: 600; }
.sc-block { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: start; }
.sc-block.h input { font-weight: 700; }
.sc-list { display: grid; gap: 0.35rem; }
.sc-del { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--muted, #6e6e73); white-space: nowrap; padding-top: 0.5rem; }
.sc-del input { width: auto; min-height: 0; }
.sc-tokens { font-size: 0.88rem; }
.sc-tokens summary { cursor: pointer; color: var(--accent); }
.sc-tokens ul { margin: 0.4rem 0; padding-left: 1.1rem; display: grid; gap: 0.15rem; }
.sc-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; background: linear-gradient(transparent, var(--bg, #f5f5f7) 30%); }
.sc-preview { position: sticky; top: 1rem; display: grid; gap: 0.5rem; min-width: 0; }
.sc-preview-bar { display: flex; justify-content: space-between; align-items: center; }
.sc-sizes { display: inline-flex; background: var(--line); border-radius: 999px; padding: 2px; }
.sc-sizes button { border: 0; background: none; font: inherit; font-size: 0.82rem; padding: 0.3rem 0.8rem; border-radius: 999px; cursor: pointer; }
.sc-sizes button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.sc-frame { height: calc(100vh - 6rem); min-height: 28rem; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong); background: #fff; display: flex; justify-content: center; }
.sc-frame iframe { border: 0; transform-origin: top center; flex: none; background: #fff; }
.look-logo { max-width: 12rem; max-height: 6rem; display: block; margin: 0.4rem 0; }
.look-preview { padding: 0.5rem; }
@media (max-width: 1180px) { .sc-grid { grid-template-columns: 12rem minmax(0, 1fr); } .sc-preview { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) { .sc-grid { grid-template-columns: 1fr; } .sc-parts { position: static; max-height: none; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); } .sc-parts .nav-label { grid-column: 1 / -1; } }
.sc-publish { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; margin-top: 0.8rem; padding: 0.7rem 1rem; border-radius: 14px; background: #e9f6ee; }
.sc-publish.wait { background: #fff3d6; }
.sc-publish p { margin: 0; }
.sc-publish form { margin: 0; }

/* Catalog: an item's site texts and the parameter fields */
.feature-row, .spec-row { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; margin-top: 0.4rem; }
.spec-row { grid-template-columns: 1fr 9rem auto; align-items: center; }
.spec-row.new input { border-style: dashed; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
.chip-check { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.65rem; border-radius: 999px; box-shadow: 0 0 0 1px var(--line-strong); font-size: 0.88rem; cursor: pointer; }
.chip-check input { width: auto; min-height: 0; margin: 0; }
.fold-inline summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; margin: 0.4rem 0; }
.narrow-stack { max-width: 34rem; }

/* Domēns */
.domain-page { max-width: 46rem; }
.domain-card { border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong); padding: 0.8rem 1rem; margin-bottom: 0.8rem; display: grid; gap: 0.4rem; }
.domain-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: 1.05rem; }
.domain-card .actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.domain-card .actions form { margin: 0; }
.domain-add { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: end; }
.dns { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.dns th { text-align: left; color: var(--muted, #6e6e73); font-weight: 600; padding: 0.3rem 0.4rem; }
.dns td { padding: 0.45rem 0.4rem; border-top: 1px solid var(--line); vertical-align: top; word-break: break-all; }
.dns td span { display: block; font-size: 0.78rem; }
.dns code { font-size: 0.85rem; }
.ok-line { color: #1a7f37; }
@media (max-width: 560px) { .domain-add { grid-template-columns: 1fr; } }

/* Template gallery */
.starter-list { display: grid; gap: 1rem; margin-top: 1rem; }
.starter-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.starter-frame { height: 22rem; overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); background: #fff; }
.starter-frame iframe { border: 0; transform-origin: top left; pointer-events: none; }
.starter-text h2 { margin: 0.1rem 0 0.4rem; }
.starter-text .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 860px) { .starter-card { grid-template-columns: 1fr; } }

/* Klienti */
.clients-chips { margin: 0.6rem 0 1rem; }
.clients-export { margin-top: 1rem; display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.client-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.row-checks { display: flex; gap: 1.2rem; flex-wrap: wrap; }
@media (max-width: 640px) { .client-tiles { grid-template-columns: 1fr; } }
.client-orders { display: grid; gap: 0.1rem; }
.client-order { display: grid; gap: 0.15rem; padding: 0.7rem 0.2rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.client-order:first-child { border-top: 0; }
.client-order:hover { background: var(--line); border-radius: 10px; }
.client-order-top { display: flex; align-items: center; gap: 0.5rem; }
.client-order-sum { margin-left: auto; font-weight: 600; }

/* Rēķini */
.invoice-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.invoice-frame { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong); background: #f2f2f5; }
.invoice-frame iframe { width: 100%; height: 1120px; border: 0; display: block; }
@media (max-width: 900px) { .invoice-split { grid-template-columns: 1fr; } }

/* Paziņojumi */
.badge.failed { background: #fdecec; color: #b42318; }
button.chip { font: inherit; font-size: 0.85rem; cursor: pointer; }
.pay-card { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 0.9rem; margin: 0.45rem 0 0; cursor: pointer; }
.pay-card input { margin-top: 0.2rem; }
.sms-keys { margin: 0.4rem 0 0.4rem 1.9rem; }
.pay-card:has(input:not(:checked)) + .sms-keys { display: none; }

/* A number or name that opens its own page: in lines of text it is clearly a link. */
a.ref { color: var(--accent); text-decoration: none; font-weight: 600; }
a.ref:hover { text-decoration: underline; }
.tabs-row { margin: 0.2rem 0 0.9rem; }
.public-note { max-width: 32rem; margin: 12vh auto; padding: 2rem; background: white; border-radius: 1.2rem; box-shadow: var(--shadow); }
.public-note h1 { font-size: 1.5rem; margin: 0 0 0.6rem; }
/* Side columns are narrow: two fields side by side would be cut off ("Pārskaitījur"). */
.split > aside .pair { grid-template-columns: 1fr; }

/* What a click did (static/portal.js) */
.toast { position: fixed; z-index: 1000; right: 1.25rem; bottom: 1.25rem; max-width: min(28rem, calc(100vw - 2rem));
  display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem 0.9rem 0.85rem 1rem; border-radius: 1rem;
  background: #1d1d1f; color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22); font-size: 0.95rem; line-height: 1.4;
  opacity: 0; transform: translateY(0.6rem); transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: none; }
.toast-icon { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.toast-ok .toast-icon { background: #34c759; color: #fff; }
.toast-bad { background: #fff; color: var(--ink); border: 2px solid var(--danger); }
.toast-bad .toast-icon { background: var(--danger); color: #fff; }
.toast-text p { margin: 0; padding: 0; background: none; border: 0; color: inherit; }
.toast-text p + p { margin-top: 0.35rem; }
.toast-text a { color: inherit; text-decoration: underline; }
.toast-close { flex: none; margin-left: auto; border: 0; background: none; color: inherit; opacity: 0.7; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 0.15rem; }
@media (max-width: 760px) { .toast { left: 1rem; right: 1rem; bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)); max-width: none; } }
button.busy { opacity: 0.75; cursor: progress; pointer-events: none; }
button.busy::after { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.5em; vertical-align: -0.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button.attention { box-shadow: 0 0 0 3px var(--accent-soft, var(--accent-ring)); }
.unsaved { display: block; margin-top: 0.4rem; font-size: 0.85rem; color: #b25000; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--danger); box-shadow: 0 0 0 3px var(--red-soft); }
.save-bar { position: fixed; z-index: 999; left: 50%; bottom: 1.25rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0.6rem 0.6rem 1.1rem; border-radius: 999px; background: #1d1d1f; color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); transition: opacity 0.2s, transform 0.2s; white-space: nowrap; }
.save-bar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.save-bar .btn { min-height: 2.4rem; }
@media (max-width: 760px) { .save-bar { bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)); } }

/* Nepabeigtie */
.box.draft { margin-bottom: 0.9rem; }
.box.draft h3 { margin: 0.5rem 0 0.3rem; font-size: 1.1rem; }
.draft-lines { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.draft-actions { margin-top: 0.6rem; flex-wrap: wrap; align-items: center; }
.draft-actions form { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.draft-actions input[name=note] { min-width: 14rem; }
.draft-when { color: var(--muted, #6e6e73); font-size: 0.85rem; }

/* Jauns pasūtījums */
.new-order > .stack { min-width: 0; }
.order-items { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.5rem; padding: 0; }
.order-items .chip { display: inline-flex; align-items: center; gap: 0.35rem; }
.chip-x { border: 0; background: none; font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 0.1rem; }
.staff-cal { border: 1px solid var(--line); border-radius: 1rem; padding: 0.75rem; margin-bottom: 0.5rem; background: white; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; text-transform: capitalize; }
.cal-nav { border: 1px solid var(--line); background: white; border-radius: 999px; width: 2.2rem; height: 2.2rem; font-size: 1.2rem; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.cal-wd { text-align: center; font-size: 0.75rem; color: var(--muted, #6e6e73); }
.cal-day { border: 0; border-radius: 0.6rem; padding: 0.35rem 0.1rem; min-height: 3.1rem; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.cal-day .n { font-weight: 600; }
.cal-day small { font-size: 0.68rem; line-height: 1.1; }
.cal-day.free { background: #e9f6ee; color: #14532d; }
.cal-day.free:hover { box-shadow: inset 0 0 0 2px #34c759; }
.cal-day.taken { background: #ececef; color: #6e6e73; cursor: not-allowed; }
.cal-day.past { background: none; color: #c7c7cc; cursor: default; }
.cal-day.picked { background: var(--accent); color: white; }
.cal-legend { font-size: 0.78rem; margin: 0.5rem 0 0; }
.client-find { position: relative; }
.client-hits { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: white; border: 1px solid var(--line); border-radius: 0.8rem;
  box-shadow: var(--shadow); padding: 0.3rem; max-height: 18rem; overflow: auto; }
.client-hit { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 0.55rem 0.6rem; border-radius: 0.5rem; cursor: pointer; }
.client-hit:hover { background: var(--accent-soft, #eef4ff); }
.order-sum { position: sticky; top: 1rem; align-self: start; }

/* Detailo, the platform (docs/brand/BRAND.md): its own logo files, never redrawn or recoloured */
.brand-logo { display: block; height: 1.55rem; width: auto; }
.login-logo { display: block; width: min(15rem, 80%); height: auto; margin: 0.2rem 0 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Detailo colours, option A (navy with an orange accent) =====
   Navy does the work; orange only echoes the logo's diamond: the selected menu item, the line
   under a link to an order, client or invoice, and today in calendars. Statuses keep their own
   green, amber and red, so orange never reads as "late" or "to refund". */
.nav a.on, .nav-foot a.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; box-shadow: none; }
.nav > a:not(.set-link):not(.back-desk):not(.set-home)::before, .nav-foot > a::before {
  content: ""; display: inline-block; width: 0.38rem; height: 0.38rem; margin: 0 0.6rem 0 0.1rem; vertical-align: 0.12em;
  transform: rotate(45deg); border-radius: 1px; background: transparent; }
.nav > a.on:not(.set-link):not(.back-desk):not(.set-home)::before, .nav-foot > a.on::before { background: var(--brand-orange); }
.nav a.set-link.on svg { color: var(--brand-orange); }
.tabbar a.on { background: rgba(255, 255, 255, 0.12); }
.tabbar a.on svg { color: var(--brand-orange); }
a.ref { color: var(--accent); text-decoration: underline; text-decoration-color: var(--brand-orange);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a.ref:hover { text-decoration-thickness: 2.5px; }
.day.today, .sw.today { box-shadow: inset 0 0 0 2px var(--brand-orange); }
.toast, .save-bar { background: var(--accent); }
.toast-bad { background: white; }
::selection { background: rgba(255, 107, 53, 0.22); }
.pl-row { min-width: 0; overflow-wrap: anywhere; }
.pl-top { flex-wrap: wrap; row-gap: 0.25rem; }
.content { min-width: 0; }  /* a wide table scrolls in its box instead of widening the page */

/* The business on top of the menu; Detailo small at its foot */
.biz-logo { display: block; max-height: 3.6rem; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.biz-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--accent); }
.nav-foot a.powered-by, .powered-by { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem; padding: 0.5rem 0.7rem 0.2rem;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 0.72rem; }
.powered-by img { height: 0.85rem; width: auto; }
.nav-foot > a.powered-by::before { display: none; }

/* ---------- Facebook: inbox, posts, settings ---------- */
.plain-list { margin: 0.2rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--ink); }
.plain-list code, .fb-owner code { font-size: 0.85rem; background: var(--row); padding: 0.05rem 0.35rem; border-radius: 0.35rem; word-break: break-all; }
.fb-head-page { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-weight: 500; }
.fb-page-pic { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex: none; }
.fb-empty { max-width: 36rem; display: grid; gap: 0.7rem; }
.fb-inbox { display: grid; grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.fb-list { display: grid; gap: 0.6rem; padding: 0.8rem; position: sticky; top: 1rem; }
.fb-find input { width: 100%; }
.fb-threads { display: grid; gap: 0.15rem; max-height: calc(100vh - 17rem); overflow-y: auto; margin: 0 -0.3rem; }
.fb-thread { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.55rem 0.5rem;
  border-radius: 0.7rem; text-decoration: none; color: var(--ink); }
.fb-thread:hover { background: var(--row); }
.fb-thread.on { background: var(--accent-soft); }
.fb-thread-text { display: grid; min-width: 0; }
.fb-thread-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.88rem; }
.fb-thread.waiting .fb-thread-text b, .fb-thread.waiting .fb-thread-text span { color: var(--ink); font-weight: 600; }
.fb-thread-when { display: grid; justify-items: end; gap: 0.3rem; font-size: 0.78rem; color: var(--muted); }
.fb-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent); }
.fb-none { padding: 0.6rem 0.4rem; }
.fb-sync { display: grid; gap: 0.4rem; justify-items: start; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.fb-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 0; min-height: 30rem; height: calc(100vh - 12rem); overflow: hidden; }
.fb-chat-empty { place-items: center; grid-template-rows: 1fr; }
.fb-chat-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.fb-chat-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-back { display: none; }
.fb-messages { overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.55rem; background: var(--row); }
.fb-msg { display: grid; max-width: min(34rem, 80%); gap: 0.15rem; }
.fb-msg.in { justify-self: start; align-self: flex-start; }
.fb-msg.out { justify-self: end; align-self: flex-end; justify-items: end; }
.fb-bubble { padding: 0.55rem 0.8rem; border-radius: 1.1rem; background: var(--card); box-shadow: var(--shadow-card); overflow-wrap: anywhere; display: grid; gap: 0.4rem; }
.fb-msg.out .fb-bubble { background: var(--accent); color: white; }
.fb-msg.out .fb-bubble a { color: white; }
.fb-when { font-size: 0.75rem; color: var(--muted); padding: 0 0.3rem; }
.fb-file-img { max-width: 15rem; max-height: 15rem; border-radius: 0.7rem; object-fit: cover; }
.fb-reply { display: grid; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: var(--card); }
.fb-reply textarea { width: 100%; resize: vertical; min-height: 4rem; }
.fb-reply-bar { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; }
.fb-reply-bar p { margin: 0; flex: 1; }
.fb-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.6rem; margin: 0.35rem 0 1.4rem; }
.fb-idea { display: grid; gap: 0.2rem; padding: 0.8rem 0.95rem; border-radius: 0.9rem; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.fb-idea:hover { box-shadow: var(--shadow-lift); }
.fb-idea .muted { font-size: 0.86rem; }
.fb-sub { margin-top: 0.4rem; }
.fb-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-ai { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: end; padding: 0.7rem; border-radius: 0.8rem; background: var(--row); }
.fb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.5rem; }
.fb-photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 0.7rem; overflow: hidden; cursor: pointer;
  background: var(--row); border: 2px solid transparent; font-size: 0.85rem; color: var(--muted); text-align: center; }
.fb-photo img { width: 100%; height: 100%; object-fit: cover; }
.fb-photo input { position: absolute; opacity: 0; pointer-events: none; }
.fb-photo:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fb-photo:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.fb-schedule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: end; }
.fb-preview-box { position: sticky; top: 1rem; }
.fb-preview { margin-top: 0.5rem; border: 1px solid var(--line); border-radius: 0.8rem; overflow: hidden; background: white; }
.fb-preview-head { display: flex; gap: 0.6rem; align-items: center; padding: 0.75rem 0.85rem 0.4rem; }
.fb-preview-head span { display: grid; line-height: 1.2; }
.fb-preview-head .muted { font-size: 0.78rem; }
.fb-preview-text { padding: 0.3rem 0.85rem 0.75rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.fb-preview-img { width: 100%; max-height: 26rem; object-fit: cover; }
.fb-preview-link { padding: 0.55rem 0.85rem; background: var(--row); font-size: 0.8rem; text-transform: uppercase; }
.fb-preview [hidden] { display: none; }
.fb-connected { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.fb-connected > span { flex: 1; }
.fb-token { margin-top: 0.4rem; }
.fb-token summary, .fb-owner summary { cursor: pointer; font-weight: 600; }
.fb-token[open] summary { margin-bottom: 0.6rem; }
.fb-owner[open] summary { margin-bottom: 0.7rem; }
.fb-owner { margin-top: 0.8rem; }
@media (max-width: 860px) {
  .fb-inbox { grid-template-columns: minmax(0, 1fr); }
  .fb-list { position: static; }
  .fb-threads { max-height: none; }
  .fb-inbox.has-chat .fb-list, .fb-inbox:not(.has-chat) .fb-chat { display: none; }
  .fb-back { display: inline; text-decoration: none; }
  .fb-chat { height: calc(100vh - 16rem); height: calc(100dvh - 16rem); min-height: 22rem; }
  .fb-wide { display: none; }
  .fb-chat-head { padding: 0.6rem 0.75rem; gap: 0.45rem; }
  .fb-ai, .fb-schedule { grid-template-columns: minmax(0, 1fr); }
  .fb-msg { max-width: 88%; }
}

/* Pieprasījumi */
.box.request { margin-bottom: 0.9rem; }
.box.request h3 { margin: 0.5rem 0 0.4rem; font-size: 1.1rem; }
.request-work { margin-top: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.8rem; }

/* The item editor shows only the chosen kind's blocks */
.item-editor:has(input[name=kind][value=sale]:checked) [data-kind-only]:not([data-kind-only="sale"]),
.item-editor:has(input[name=kind][value=quote]:checked) [data-kind-only]:not([data-kind-only="quote"]),
.item-editor:has(input[name=kind][value=rental]:checked) [data-kind-only]:not([data-kind-only="rental"]) { display: none; }
.badge.kind_sale { background: var(--accent-soft); color: var(--accent); }
.badge.kind_quote { background: #fff0ea; color: #b4441a; }

/* ---------- Konfiguratori ---------- */
.cfg-card { margin-bottom: 0.9rem; }
.cfg-card h2 a { color: inherit; text-decoration: none; }
.cfg-items { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.cfg-item { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; text-decoration: none; }
.cfg-item.off { background: var(--amber-soft); color: var(--amber-ink); }
.cfg-start { margin-top: 1rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.cfg-start textarea { width: 100%; font: 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 0.5rem; }
.cfg-errors ul, .cfg-start .warn ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.cfg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 1.2rem; align-items: start; }
.cfg-form { min-width: 0; }
.cfg-preview { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.cfg-preview .board-head select { max-width: 55%; }
.cfg-save { position: sticky; bottom: 0; padding: 0.8rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
.cfg-delete { margin-top: 1.5rem; }
.cfg-block { margin-bottom: 1rem; }
.cfg-block h2 { margin-top: 0; }
.cfg-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
.cfg-row > label { display: grid; gap: 0.2rem; min-width: 0; }
.cfg-row > label .lbl { font-size: 0.78rem; color: var(--muted); font-weight: 500; margin: 0; }
.cfg-row input, .cfg-row select { min-width: 0; }
.cfg-grow { flex: 1 1 11rem; }
.cfg-dim-row { display: grid; grid-template-columns: auto minmax(0, 2fr) minmax(0, 0.8fr) repeat(4, minmax(0, 1fr)) auto; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
/* An option, and a question of the form: name, description and tools on one line; price (or type) below. */
.cfg-option > .cfg-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: end; }
.cfg-option > .cfg-row > .cfg-handle { grid-row: 1; }
.cfg-option > .cfg-row > .cfg-tools { grid-column: 4; grid-row: 1; }
.cfg-option > .cfg-row > label:nth-of-type(3) { grid-column: 2 / 4; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.cfg-option > .cfg-row > label:nth-of-type(3) > .lbl { margin: 0; }
.cfg-option > .cfg-row > label:nth-of-type(4), .cfg-option > .cfg-row > .cfg-req { grid-row: 2; }
.cfg-option > .cfg-row > .cfg-req { grid-column: 3; justify-self: end; }
.cfg-option > .cfg-row:has(.cfg-req) > label:nth-of-type(3) { grid-column: 2; }
.cfg-row input, .cfg-row select { min-height: 2.4rem; padding: 0.4rem 0.6rem; }
.cfg-rule select, .cfg-cond select, .cfg-inc select, .cfg-add-cond { width: auto; max-width: 100%; }
.cfg-handle { cursor: grab; color: var(--muted); padding: 0.55rem 0.15rem; user-select: none; letter-spacing: -0.15em; align-self: center; }
.cfg-handle:active { cursor: grabbing; }
.cfg-tools { display: inline-flex; gap: 0.2rem; align-self: center; margin-left: auto; }
.cfg-tool { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer; font-size: 0.95rem; line-height: 1; }
.cfg-tool:disabled { opacity: 0.35; cursor: default; }
.cfg-del:hover { color: var(--danger); border-color: rgba(215, 0, 21, 0.3); }
.cfg-step { border: 1px solid var(--line-strong); border-radius: 14px; padding: 0.9rem; margin: 0 0 0.9rem; background: var(--card); }
.cfg-step h3 { margin: 0; font-size: 1.02rem; }
.cfg-step-head { margin-bottom: 0.5rem; }
.cfg-n { font-size: 1.15rem; color: var(--accent); font-weight: 600; align-self: center; min-width: 1.8rem; }
.cfg-options { display: grid; gap: 0.5rem; margin: 0.6rem 0; }
.cfg-option { background: var(--row); border-radius: 10px; padding: 0.55rem 0.65rem; }
.cfg-rule { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.cfg-money { display: inline-flex; align-items: center; gap: 0.25rem; }
.cfg-money input { width: 6.5rem; text-align: right; }
.cfg-money em { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.cfg-min input { width: 5.5rem; }
.cfg-conds { margin-top: 0.4rem; font-size: 0.9rem; }
.cfg-conds summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.cfg-conds[open] summary { margin-bottom: 0.35rem; }
.cfg-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.4rem 0.5rem; margin-bottom: 0.35rem; border-radius: 8px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.cfg-checks { display: inline-flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.cfg-checks .check { margin: 0; font-weight: 400; }
.cfg-num { width: 5rem; min-height: 2.2rem; }
.cfg-cond select { min-height: 2.2rem; padding: 0.3rem 0.5rem; }
.cfg-money input, .cfg-num { padding: 0.4rem 0.5rem; }
.cfg-x { margin-left: auto; border: 0; background: none; font-size: 1.2rem; color: var(--muted); cursor: pointer; padding: 0 0.3rem; }
.cfg-x:hover { color: var(--danger); }
.cfg-add-cond { font-size: 0.85rem; max-width: 100%; }
.cfg-inc { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.cfg-inc > span:first-child { flex: 0 0 11rem; color: var(--muted); font-size: 0.9rem; }
.cfg-step > .lbl { margin: 0.8rem 0 0.2rem; }
.cfg-req { align-self: center; margin: 0 0 0.35rem; }
.cfg-list { margin-top: 0.5rem; }
.cfg-more summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.cfg-form input.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--red-soft); }
.cfg-form .dragging { opacity: 0.45; }
.cfg-form .drop-before { box-shadow: 0 -3px 0 var(--accent); }
.cfg-form .drop-after { box-shadow: 0 3px 0 var(--accent); }
@media (max-width: 1100px) {
  .cfg-layout { grid-template-columns: 1fr; }
  .cfg-preview { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .cfg-inc > span:first-child { flex-basis: 100%; }
  .cfg-dim-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cfg-dim-row > .cfg-handle { display: none; }
  .cfg-dim-row > label:first-of-type { grid-column: 1 / -1; }
  .cfg-option > .cfg-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cfg-option > .cfg-row > .cfg-handle { display: none; }
  .cfg-option > .cfg-row > label:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .cfg-option > .cfg-row > .cfg-tools { grid-column: 2; grid-row: 1; }
  .cfg-option > .cfg-row > label:nth-of-type(2) { grid-column: 1 / -1; grid-row: 2; }
  .cfg-option > .cfg-row > label:nth-of-type(3) { grid-column: 1 / -1; grid-row: 3; }
  .cfg-option > .cfg-row > label:nth-of-type(4), .cfg-option > .cfg-row > .cfg-req { grid-row: auto; grid-column: 1 / -1; justify-self: start; }
}
.feature-row { grid-template-columns: 9rem minmax(0, 0.8fr) minmax(0, 1.6fr); }
@media (max-width: 640px) { .feature-row { grid-template-columns: 1fr; } }
#site_spec_groups { font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Ienākt ---------- */
.login .login-logo { width: min(10.5rem, 60%); margin: 0.2rem auto 1.4rem; }
.login-ways { display: grid; gap: 0.6rem; }
.login .login-way { margin-top: 0; display: flex; align-items: center; justify-content: center; gap: 0.7rem; width: 100%; font-weight: 600; }
.login-way svg { width: 1.2rem; height: 1.2rem; flex: none; }
.login-or { display: flex; align-items: center; gap: 0.8rem; margin: 1.3rem 0 0.2rem; color: var(--muted); font-size: 0.85rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.login-title { font-size: 1.15rem; text-align: center; margin: 0 0 0.6rem; }
.login-back { text-align: center; margin: 1rem 0 0; font-size: 0.9rem; }
.login-back a { color: var(--muted); }

/* ---------- the platform's legal documents ---------- */
.legal-doc { max-width: 48rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.legal-brand img { width: 8.5rem; height: auto; display: block; margin: 0 auto 1.5rem; }
.legal-doc article { line-height: 1.6; }
.legal-doc h1 { font-size: 1.7rem; margin: 0 0 1rem; }
.legal-doc h2 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
.legal-doc ol, .legal-doc ul { padding-left: 1.3rem; }
.legal-doc li { margin: 0.25rem 0; }
.legal-doc > p { text-align: center; }
