/* Rough-In · "Clean Pro" look: bright and calm, soft rounded cards, orange saved for talking. */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --ink: #111827;
  --muted: #5B6472;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --line: #E8EAEE;
  --field: #D9DCE1;
  --orange: #FF7A1A;        /* fills: always with ink text on it */
  --orange-text: #A8410A;   /* orange for text on light backgrounds (5:1) */
  --orange-tint: #FFF1E6;
  --side: #FFFFFF;
  --side-text: #374151;
  --good: #1A7F37;
  --warn: #8A5A00;
  --bad: #B42318;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 4px 12px rgba(17,24,39,.04);
  --cond: "Plus Jakarta Sans", system-ui, sans-serif;
  /* kept for older templates */
  --brand: var(--ink);
  --brand-ink: #fff;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
a { color: var(--orange-text); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--cond); line-height: 1.05; }
h1 { font-size: 2.1rem; font-weight: 800; margin: 0 0 .25rem; }
h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .6rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- sidebar (wide) / top bar (narrow) ---------- */
.sidebar { background: var(--side); color: #fff; z-index: 40; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.sidebar .brand svg { flex-shrink: 0; }
.sidebar .word { font-family: var(--cond); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.sidebar .hy { color: var(--orange); }
.sidebar nav.main a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 .85rem; border-radius: 8px;
  color: var(--side-text); font-weight: 500; white-space: nowrap; text-decoration: none; }
.sidebar nav.main a:hover { background: #23272E; color: #fff; }
.sidebar nav.main a.on { background: var(--orange); color: var(--ink); font-weight: 700; }
.sidebar .who { display: flex; flex-direction: column; gap: .1rem; font-size: .9rem; }
.sidebar .who .org-name { font-weight: 600; color: #fff; }
.sidebar .who .user-name { color: #A3ABB6; }
.sidebar .who .linkbtn { color: #A3ABB6; font-size: .9rem; margin-top: .4rem; min-height: 32px; text-align: left; }
.sidebar .who .linkbtn:hover { color: #fff; }

/* Phones: slim dark top bar; navigation is the bottom tab bar below. */
.sidebar { position: sticky; top: 0; padding: .6rem .75rem .5rem; }
.sidebar-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .4rem; }
.sidebar-top .org { margin-left: auto; color: var(--side-text); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.sidebar nav.main { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.25rem; padding: 0 .25rem; }
.sidebar nav.main::-webkit-scrollbar { display: none; }
@media (max-width: 719px) {
  /* Fade the right edge so it's clear the menu scrolls sideways. */
  .sidebar nav.main { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 2.5rem; }
}
.sidebar nav.main a { min-height: 40px; padding: 0 .7rem; gap: .45rem; font-size: .95rem; }
.sidebar .who { display: none; }

/* Phones: a bottom tab bar within thumb reach. iPads and computers get the sidebar. */
.tabbar { display: none; }
@media (max-width: 719px) {
  .sidebar nav.main { display: none; }
  .sidebar { padding: .55rem 1rem; }
  .sidebar-top { margin: 0; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--side);
    padding: .35rem .5rem calc(.4rem + env(safe-area-inset-bottom)); justify-content: space-around; align-items: flex-end;
    box-shadow: 0 -2px 12px #0002; }
  .tabbar a { flex: 1 1 0; max-width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .2rem;
    min-height: 64px; padding-bottom: .3rem; border-radius: 12px; color: var(--side-text); font-size: .8rem; font-weight: 600; text-decoration: none; }
  .tabbar a:hover { text-decoration: none; color: #fff; }
  .tabbar a.on { color: var(--orange); }
  .tabbar a.talk { color: #fff; }
  .tabbar a.talk .disc { width: 66px; height: 66px; margin-top: -30px; border-radius: 50%; background: var(--orange); color: var(--ink);
    display: flex; align-items: center; justify-content: center; border: 4px solid var(--side); box-shadow: 0 4px 12px #0004; }
  main { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
  .fab { display: none !important; }
}

/* iPads (either way up) and computers: fixed sidebar on the left. */
@media (min-width: 720px) {
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: 232px; padding: 1.25rem .9rem; display: flex; flex-direction: column; gap: .25rem; overflow-y: auto; }
  .sidebar-top { padding: 0 .35rem 1rem; margin: 0; }
  .sidebar-top .org { display: none; }
  .sidebar nav.main { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: .2rem; }
  .sidebar nav.main a { min-height: 44px; padding: 0 .85rem; gap: .7rem; font-size: 1rem; }
  .sidebar .who { display: flex; margin-top: auto; padding: .9rem .5rem 0; border-top: 1px solid #2C3139; }
  .sidebar ~ main { margin-left: 232px; }
}
/* Upright iPad: a slimmer sidebar leaves room for the page. */
@media (min-width: 720px) and (max-width: 999px) {
  .sidebar { width: 196px; padding: 1.1rem .6rem; }
  .sidebar .word { font-size: 1.4rem; }
  .sidebar nav.main a { padding: 0 .7rem; gap: .6rem; font-size: .95rem; }
  .sidebar ~ main { margin-left: 196px; }
}

main { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 2rem; min-width: 0; }
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video, canvas, iframe { max-width: 100%; }
.card, .row > *, .list, .line .desc, .page-head > div { min-width: 0; }
h1, h2, h3, .list .title, .line .desc { overflow-wrap: anywhere; }
/* iPhone Safari gives date and time fields a fixed width that won't shrink in a row. */
input[type=date], input[type=time] { min-width: 0; -webkit-appearance: none; appearance: none; display: block; }
@media (min-width: 720px) { .sidebar ~ main { max-width: none; padding: 1.5rem 1.5rem 2.5rem; } .sidebar ~ main > * { max-width: 1080px; } }
@media (min-width: 1000px) { .sidebar ~ main { padding: 1.75rem 2rem 2.5rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; margin-bottom: 1.1rem; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.eyebrow { font-family: var(--cond); font-weight: 700; font-size: .95rem; color: var(--muted); }

/* ---------- cards + grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; color: var(--ink); }
.stat .n { font-family: var(--cond); font-size: 2.1rem; font-weight: 800; line-height: 1.05; }
.stat .l { color: var(--muted); font-size: .85rem; font-weight: 500; }
a.stat:hover { text-decoration: none; border-color: var(--ink); }
.stat.bad { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat.bad .l { color: #C9CED6; }

/* ---------- buttons + forms ---------- */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .45rem 1.1rem;
  border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font-family: var(--cond); font-size: 1.1rem; font-weight: 700;
  cursor: pointer; text-decoration: none; line-height: 1.1; }
.btn:hover { text-decoration: none; background: #F6F4F0; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn.primary:hover { background: #F06C0C; border-color: #F06C0C; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.big { min-height: 54px; font-size: 1.25rem; padding: .6rem 1.5rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 36px; padding: .2rem .7rem; font-size: .95rem; border-width: 1px; border-color: var(--field); }
.btn.small.primary { border-color: var(--orange); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--orange-text); cursor: pointer; font: inherit; font-weight: 500; }
.linkbtn.danger { color: var(--bad); }
label { display: block; font-weight: 600; font-size: .92rem; margin: .7rem 0 .3rem; }
label.check { display: flex; gap: .55rem; align-items: center; font-weight: 400; }
label.check input { width: 20px; height: 20px; accent-color: var(--orange); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel],
input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--field); border-radius: 10px; font: inherit; background: #fff; min-height: 46px; color: var(--ink);
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
::placeholder { color: #8A929C; }
.row { display: flex; gap: .65rem; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.row > .narrow { flex: 0 0 90px; }
.inline-form { display: inline; }
fieldset { border: 1px dashed var(--field); border-radius: 10px; padding: .5rem 1rem 1rem; margin: .75rem 0; }
legend { font-family: var(--cond); font-weight: 700; color: var(--muted); padding: 0 .3rem; }
details > summary { cursor: pointer; font-weight: 600; padding: .3rem 0; min-height: 32px; }

/* ---------- tables + lists ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--cond); font-size: .95rem; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; border-bottom: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table-wrap table { min-width: 100%; }
.table-wrap th, .table-wrap td.num { white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list a.item { display: flex; gap: .75rem; align-items: center; padding: .75rem .2rem; color: var(--ink); min-height: 56px; }
.list a.item:hover { background: #FAF8F5; text-decoration: none; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .sub { color: var(--muted); font-size: .88rem; }
.list .amt { font-weight: 700; white-space: nowrap; min-width: 84px; text-align: right; }
.empty { color: var(--muted); padding: 1rem 0; text-align: center; }

/* ---------- status chips ---------- */
.pill { display: inline-block; font-family: var(--cond); font-size: .85rem; font-weight: 700;
  padding: .12rem .5rem; border-radius: 4px; background: #E6E8EC; color: #3A414B; white-space: nowrap; }
.pill.DRAFT { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--field); }
.pill.SENT, .pill.OPEN { background: #E6E8EC; color: #3A414B; }
.pill.VIEWED { background: #FFE3CC; color: #8A3A06; }
.pill.ACCEPTED, .pill.PAID, .pill.COMPLETE { background: #DDF1E3; color: #14632B; }
.pill.PARTIAL { background: #FFF1CC; color: var(--warn); }
.pill.DECLINED, .pill.EXPIRED, .pill.VOID, .pill.CLOSED { background: #ECEAE6; color: #5E6670; }
.pill.OVERDUE { background: var(--ink); color: #fff; }

/* ---------- flash ---------- */
.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.flash.ok { background: #DDF1E3; color: #0F4D22; }
.flash.err { background: #FDE4E1; color: #7A1A10; }

/* ---------- quote editor ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.tabs a { padding: .45rem .9rem; border-radius: 8px; border: 1px solid var(--field); color: var(--ink); background: #fff; font-weight: 600; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.line { border-top: 1px solid var(--line); padding: .75rem 0; }
.line .top { display: flex; gap: .75rem; }
.line .desc { flex: 1; }
.line .amt { font-weight: 700; white-space: nowrap; }
.line details summary { font-weight: 500; color: var(--orange-text); font-size: .92rem; }
.totals { margin-left: auto; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; padding: .2rem 0; }
.totals .grand { font-family: var(--cond); font-weight: 800; font-size: 1.6rem; border-top: 3px solid var(--ink); margin-top: .35rem; padding-top: .35rem; }
.copybox { display: flex; gap: .5rem; }
.copybox input { font-size: .85rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photos figcaption { font-size: .8rem; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.timeline li { padding: .35rem 0; border-bottom: 1px dotted var(--line); }
form.addline { background: #FAF8F5; }

/* ---------- customer portal (uses the business's own colour) ---------- */
.portal-head { background: var(--ink); color: #fff; padding: 1.25rem 1rem; }
.portal-head .inner { max-width: 760px; margin: 0 auto; }
.portal-head h1 { color: #fff; }
.portal main { max-width: 760px; }
.option-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .75rem; background: #fff; }
.option-card.pick { cursor: pointer; }
.option-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px #16191D22; }
.option-card .price { font-size: 1.3rem; font-weight: 700; }
.sign { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.4rem; }

/* ---------- sign in ---------- */
.auth { max-width: 420px; margin: 3rem auto; padding: 0 1rem; }
.auth .card { padding: 1.5rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.25rem; color: var(--ink); text-decoration: none; }
.auth-brand .word { font-family: var(--cond); font-weight: 800; font-size: 2rem; }
.auth-brand .hy { color: var(--orange); }
.center { text-align: center; }

.fab { position: fixed; right: 1rem; bottom: 1rem; border-radius: 999px; box-shadow: 0 6px 18px #0003; z-index: 20; }
@media (min-width: 720px) { .fab { display: none; } }
@media print { .sidebar, .no-print, .fab, .action-bar { display: none !important; } .sidebar ~ main { margin: 0 !important; } }

/* ---------- "More" page ---------- */
.menu-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 720px) { .menu-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.menu-tiles .tile { display: flex; flex-direction: column; justify-content: space-between; gap: .9rem; min-height: 112px; padding: 1.1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.menu-tiles .tile:hover { border-color: var(--ink); text-decoration: none; }
.menu-tiles .tile .t { font-family: var(--cond); font-weight: 800; font-size: 1.45rem; line-height: 1; }

/* ---------- home ---------- */
.home-head { margin-bottom: 1rem; }
.home-head h1 { font-size: 2.6rem; margin: .1rem 0 0; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .9rem; }
.hero .tile { display: flex; flex-direction: column; justify-content: space-between; gap: .75rem; min-height: 92px; padding: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.hero .tile:hover { border-color: var(--ink); text-decoration: none; }
.hero .tile .t { font-family: var(--cond); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.hero .tile.big { grid-column: 1 / -1; background: var(--orange); border-color: var(--orange); min-height: 168px; padding: 1.3rem; }
.hero .tile.big:hover { background: #F06C0C; }
.hero .tile.big .t { font-size: 2.5rem; font-weight: 800; }
.hero .tile.big .sub { font-size: 1rem; font-weight: 500; }
.hero .tile.big .disc { width: 66px; height: 66px; border-radius: 50%; background: var(--ink); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.hero .tile.big .disc svg { width: 34px; height: 34px; }
@media (min-width: 720px) {
  .hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero .tile.big { grid-column: span 2; grid-row: span 2; }
}
.home-lists .card { margin-bottom: 0; }

/* ---------- tablet tweaks ---------- */
@media (min-width: 720px) and (max-width: 999px) {
  main { padding: 1.25rem 1.5rem 2rem; }
  .fab { display: inline-flex; }
}

/* ---------- invoice design ---------- */
.logo-preview { background: #fff; border: 1px dashed var(--field); border-radius: 10px; padding: .75rem; margin-bottom: .5rem; text-align: center; }
.logo-preview img { max-width: 100%; max-height: 120px; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.style-card { display: flex; flex-direction: column; gap: .25rem; border: 2px solid var(--line); border-radius: 10px; padding: .6rem; cursor: pointer; font-weight: 400; margin: 0; }
.style-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px #16191D22; }
.style-card input { width: auto; min-height: 0; }
.swatch { display: block; height: 70px; border: 1px solid #ddd; border-radius: 4px; background: #fff; padding: 6px; }
.swatch i { display: block; height: 16px; margin-bottom: 6px; }
.swatch b { display: block; height: 5px; background: #e4e6ea; margin-bottom: 5px; }
.swatch.CLASSIC i { border-bottom: 3px solid var(--ink); }
.swatch.BOLD i { background: var(--ink); }
.swatch.MINIMAL i { border-bottom: 1px solid #999; }
.pdf-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.portal-logo { display: inline-block; background: #fff; border-radius: 8px; padding: 6px 10px; margin-bottom: .5rem; }
.portal-logo img { display: block; max-width: 260px; object-fit: contain; }

/* ---------- file pickers (photos, logo, CSV) ---------- */
input[type=file] {
  width: 100%; min-height: 46px; padding: .35rem; border: 1px dashed var(--field); border-radius: 10px;
  background: #FAF8F5; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer;
}
input[type=file]:hover { border-color: var(--ink); }
input[type=file]::file-selector-button {
  min-height: 36px; margin-right: .75rem; padding: .3rem .9rem; border: 0; border-radius: 8px;
  background: var(--ink); color: #fff; font-family: var(--cond); font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* ---------- talk-a-quote ---------- */
.talk-link { display: flex; align-items: center; gap: .75rem; color: var(--ink); background: var(--orange); border-color: var(--orange); font-weight: 600; }
.talk-link:hover { text-decoration: none; background: #F06C0C; }
.talk-link svg { flex-shrink: 0; }
.recorder { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .25rem 0 .75rem; }
.recorder.no-rec .rec-btn { display: none; }
.rec-btn { gap: .55rem; background: var(--orange) !important; border-color: var(--orange) !important; }
.rec-btn .dot { display: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.recorder.recording .rec-btn { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff; }
.recorder.recording .rec-btn .dot { display: inline-block; background: #FF5A4A; animation: rec-pulse 1s ease-in-out infinite; }
.recorder.recording .rec-btn svg { display: none; }
@keyframes rec-pulse { 50% { opacity: .25; } }
.card.review { border: 2px solid var(--orange); background: var(--orange-tint); }
.card.review h3 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.card.review ul { margin: .25rem 0 .75rem; padding-left: 1.2rem; }
details.talk > summary { font-family: var(--cond); font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; }
small.small, p.small { font-size: .85rem; }
.line form.alt { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 .1rem; padding: .5rem .6rem;
  background: var(--orange-tint); border: 1px solid #F3C9A6; border-radius: 10px; }
.line form.alt small { color: #8A3A06; font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.line form.alt select { flex: 1 1 220px; width: auto; min-height: 40px; }

/* Phone: the quote's main actions stay under your thumb. */
.action-bar { display: none; }
@media (max-width: 719px) { .hide-phone { display: none !important; } }
@media (max-width: 719px) {
  /* Sits on the tab bar; the extra bottom padding keeps its buttons clear of the raised mic. */
  .action-bar { display: flex; gap: .6rem; position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); margin: 1rem -1rem 0; padding-bottom: 2.4rem !important; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line); z-index: 15; }
  .action-bar > * { flex: 1; }
  .action-bar form { display: flex; }
  .action-bar form .btn { flex: 1; }
}

/* ---------- receipt reading ---------- */
.scan-status:empty { display: none; }
.scan-status { margin-top: .6rem; padding: .7rem .9rem; border-radius: 10px; font-size: .95rem; }
.scan-status.busy { background: #F6F4F0; color: var(--ink); display: flex; align-items: center; gap: .6rem; }
.scan-status.ok { background: #DDF1E3; color: #0F4D22; }
.scan-status.warn { background: var(--orange-tint); color: #6B2E05; border: 1px solid #F3C9A6; }
.scan-status ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.scan-status .spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--field); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
input.filled, select.filled, textarea.filled { background: var(--orange-tint); border-color: #F3C9A6; }


/* ================= Clean Pro overrides ================= */
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 2rem; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }
.eyebrow { font-weight: 500; font-size: .95rem; color: var(--muted); }
.card, .stat, .hero .tile, .menu-tiles .tile { box-shadow: var(--shadow); border-color: var(--line); }

/* sidebar: white, with a soft orange pill for the page you're on */
.sidebar { color: var(--ink); }
.sidebar .brand { color: var(--ink); }
.sidebar .word { font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.sidebar nav.main a { color: var(--side-text); }
.sidebar nav.main a:hover { background: #F3F4F6; color: var(--ink); }
.sidebar nav.main a.on { background: var(--orange-tint); color: var(--orange-text); font-weight: 700; }
.sidebar nav.main a { border-radius: 12px; }
.sidebar .who .org-name { color: var(--ink); }
.sidebar .who .user-name, .sidebar .who .linkbtn { color: var(--muted); }
.sidebar .who .linkbtn:hover { color: var(--ink); }
.sidebar-top .org { color: var(--muted); }
@media (min-width: 720px) {
  .sidebar { border-right: 1px solid var(--line); }
  .sidebar .who { border-top-color: var(--line); }
}
@media (max-width: 719px) {
  .sidebar { border-bottom: 1px solid var(--line); }
  .tabbar { background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(17,24,39,.05); }
  .tabbar a { color: var(--muted); }
  .tabbar a:hover { color: var(--ink); }
  .tabbar a.on { color: var(--orange-text); }
  .tabbar a.talk { color: var(--ink); }
  .tabbar a.talk .disc { border-color: #fff; box-shadow: 0 4px 14px rgba(255,122,26,.35); }
}

/* buttons: dark for the main action, quiet outlines for the rest; orange is for talking */
.btn, button.btn { border-radius: 12px; border: 1px solid var(--field); font-weight: 600; font-size: 1rem; line-height: 1.2; }
.btn:hover { background: #F9FAFB; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #1F2937; border-color: #1F2937; }
.btn.big { font-size: 1.05rem; font-weight: 700; }
.btn.small { font-size: .9rem; }
.btn.small.primary { border-color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel],
input[type=search], input[type=url], input:not([type]), select, textarea { border-radius: 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #FFC9A3; outline-offset: 0; border-color: var(--orange-text); }
:focus-visible { outline: 3px solid var(--orange-text); }
th { font-weight: 600; font-size: .85rem; }
legend { font-weight: 600; }

/* status chips: soft and rounded, "Sent" rather than "SENT" */
.pill { border-radius: 999px; font-weight: 600; font-size: .78rem; padding: .18rem .6rem; text-transform: lowercase; }
.pill::first-letter { text-transform: uppercase; }
.pill.VIEWED { background: var(--orange-tint); color: var(--orange-text); }
.pill.SENT, .pill.OPEN { background: #EEF2FF; color: #3730A3; }
.pill.ACCEPTED, .pill.PAID, .pill.COMPLETE { background: #E7F6EC; color: #166534; }
.pill.OVERDUE { background: #FDE8E7; color: #A1190F; }
.pill.DRAFT { box-shadow: inset 0 0 0 1px var(--line); }
.stat .n { font-weight: 800; letter-spacing: -.02em; font-size: 1.9rem; }
.stat.bad { background: #FDE8E7; border-color: #F9D0CC; color: #7A1A10; }
.stat.bad .l { color: #A1190F; }
.totals .grand { font-weight: 800; letter-spacing: -.01em; font-size: 1.45rem; border-top-width: 2px; }
.tabs a { border-radius: 999px; }
.tabs a.on { background: var(--ink); }

/* home: the charcoal "Talk a quote" card with the orange mic */
.home-head h1 { font-size: 2.2rem; }
.hero .tile .t { font-weight: 700; font-size: 1.05rem; }
.hero .tile.big { background: var(--ink); border-color: var(--ink); color: #fff; }
.hero .tile.big:hover { background: #1F2937; }
.hero .tile.big .t { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.hero .tile.big .sub { opacity: .85; }
.hero .tile.big .disc { background: var(--orange); color: var(--ink); }
.hero .tile svg { color: var(--ink); }
.hero .tile.big svg { color: inherit; }
.menu-tiles .tile .t { font-weight: 700; font-size: 1.1rem; }

/* talk-a-quote + receipts keep the orange */
.talk-link { background: var(--ink); border-color: var(--ink); color: #fff; }
.talk-link:hover { background: #1F2937; }
.talk-link svg { color: var(--orange); }
.rec-btn { color: var(--ink) !important; }
details.talk > summary { font-size: 1.05rem; font-weight: 700; }
.card.review { border: 1px solid #F3C9A6; }
.line form.alt { border-radius: 12px; }
.flash { border-radius: 14px; }
input[type=file] { border-radius: 12px; }
input[type=file]::file-selector-button { border-radius: 10px; font-weight: 600; font-size: .95rem; }
.auth-brand .word { font-weight: 800; font-size: 1.8rem; letter-spacing: -.02em; }
.portal-head { background: var(--ink); }
