/* BSS · one stylesheet. Their logo's navy + black + brushed stainless steel; the steel bar under the header is the signature.
   Mobile first (workers on the job site), wider office layout from 900px. */
@font-face { font-family: 'Bricolage'; src: url(/fonts/BricolageGrotesque-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(/fonts/Inter-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #0d1726; --ink-2: #1c2a40; --muted: #5d6675; --line: #d9dee6; --page: #eef1f5; --card: #ffffff;
  --yellow: #1f4f96; --yellow-ink: #0d2a52; --yellow-soft: #e3ecfa; --acc-ink: #ffffff; --steel: linear-gradient(90deg,#8d96a3,#e9edf2 22%,#a4adb9 45%,#f4f6f9 62%,#9aa3af 82%,#dfe4ea);
  --green: #1d7a4a; --green-soft: #e3f3ea; --red: #c2361d; --red-soft: #fbe6e1; --blue: #2457a6; --blue-soft: #e6eefb;
  --r: 14px; --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --display: 'Bricolage', 'Inter', system-ui, sans-serif; --body: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--page); color: var(--ink); font: 400 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #5b8fd6; outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stripes { display: block; height: 8px; background: var(--steel); }
.boot { min-height: 100dvh; display: grid; place-items: center; } .boot .stripes { width: 140px; border-radius: 6px; animation: slide 1.2s linear infinite; background-size: 280px 100%; }
@keyframes slide { to { background-position: 280px 0; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; display: flex; align-items: center; gap: 12px; }
.top .brand { font: 800 20px/1 var(--display); letter-spacing: -0.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .brand small { display: block; font: 600 11px/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #9fb6d8; }
.top .logo { height: 34px; width: auto; background: #fff; border-radius: 8px; padding: 4px 6px; flex: none; }
.top .sp { flex: 1; }
.top .back { background: none; border: 0; color: #fff; padding: 8px; margin: -8px 0 -8px -8px; font-size: 22px; line-height: 1; cursor: pointer; }
.top + .stripes { height: 6px; }
.iconbtn { background: var(--ink-2); border: 0; color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }

main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
h1 { font: 800 28px/1.1 var(--display); letter-spacing: -0.02em; margin: 6px 0 4px; }
h2 { font: 800 20px/1.2 var(--display); margin: 26px 0 10px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.eyebrow { font: 700 11px/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- bottom tabs (office) ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs a { color: #b9b4ad; text-decoration: none; text-align: center; font: 600 12px/1.2 var(--body); padding: 8px 2px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: #fff; background: var(--yellow); }

/* ---------- cards + lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.grid { display: grid; gap: 12px; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.proj { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; transition: transform 160ms var(--ease-out), border-color 160ms ease; }
.proj:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .proj:hover { border-color: var(--ink); } }
.proj .row1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.proj .name { font: 800 19px/1.2 var(--display); min-width: 0; }
.proj .addr { color: var(--muted); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 10px; background: #ebe7e0; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; background: var(--yellow); border-radius: 99px; transform-origin: left; }
.meter.over i { background: var(--red); }
.pct { font: 800 17px/1 var(--display); white-space: nowrap; }
.money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.money div { min-width: 0; } .money b { display: block; font: 700 15px/1.2 var(--body); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.money span { font-size: 12px; color: var(--muted); }
.pos { color: var(--green); } .neg { color: var(--red); }

.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--body); padding: 6px 10px; border-radius: 99px; background: #ebe7e0; white-space: nowrap; }
.chip.pending { background: var(--yellow-soft); color: var(--yellow-ink); } .chip.approved { background: var(--blue-soft); color: var(--blue); }
.chip.charged { background: var(--green-soft); color: var(--green); } .chip.rejected { background: var(--red-soft); color: var(--red); }
.chip.paused { background: #ebe7e0; } .chip.done { background: var(--green-soft); color: var(--green); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; min-width: 0; }
.stat b { display: block; font: 800 24px/1.1 var(--display); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .stat.dark span { color: #c9c3bb; } .stat.dark b { color: #fff; }

/* ---------- big action buttons (worker) ---------- */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.big { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 112px; padding: 16px; border-radius: var(--r); border: 0; text-align: left; font: 800 19px/1.15 var(--display); cursor: pointer; text-decoration: none; transition: transform 160ms var(--ease-out); }
.big:active { transform: scale(0.97); }
.big svg { width: 30px; height: 30px; }
.big.y { background: var(--yellow); color: #fff; } .big.k { background: var(--ink); color: #fff; } .big.w { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.actions .wide { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }

/* ---------- buttons + forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform 140ms var(--ease-out), opacity 140ms ease; }
.btn:active { transform: scale(0.97); }
.btn.y { background: var(--yellow); color: #fff; } .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); } .btn.danger { background: var(--red-soft); color: var(--red); }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form .f { margin-bottom: 14px; }
label, .lbl { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #cbc6bd; border-radius: 12px; background: #fff; font-size: 16px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #9cc0f0; outline-offset: 0; border-color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .two > * { min-width: 0; }
.err { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: 10px; font-weight: 600; margin-bottom: 12px; }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }

/* % picker: big taps, no fiddly slider on a dusty phone */
.pcts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pcts button { min-height: 48px; border-radius: 10px; border: 1px solid #cbc6bd; background: #fff; font-weight: 700; cursor: pointer; }
.pcts button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.stagepick { display: grid; gap: 6px; }
.stagepick button { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid #cbc6bd; background: #fff; font-weight: 600; text-align: left; cursor: pointer; }
.stagepick button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.stagepick button[aria-pressed="true"] small { color: #cfe0fa; }
.stagepick small { color: var(--muted); font-weight: 700; }

/* photo picker */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shots .add { aspect-ratio: 1; border: 2px dashed #b9b3a9; border-radius: 12px; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; background: #fff; }
.shots .add svg { width: 28px; height: 28px; margin: 0 auto 4px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #ddd8cf; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 99px; border: 0; background: rgba(21,20,19,.8); color: #fff; font-size: 18px; cursor: pointer; }
.shot .up { position: absolute; inset: auto 0 0 0; height: 4px; background: var(--yellow); transform-origin: left; }
.shot.fail { outline: 3px solid var(--red); }

/* timeline */
.feed { display: grid; gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.item .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.item .meta b { color: var(--ink); }
.item p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.item .move { font-weight: 700; margin-top: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.thumbs button { padding: 0; border: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #ddd8cf; cursor: zoom-in; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: #ddd8cf; cursor: zoom-in; border-radius: 6px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.day { font: 700 13px/1 var(--body); color: var(--muted); margin: 18px 0 8px; }

/* project page sub-tabs */
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 4px; padding: 0 16px 4px; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: none; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 9px 14px; border-radius: 99px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.seg a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg .dot { display: inline-block; min-width: 20px; padding: 2px 6px; border-radius: 99px; background: #d9342b; color: #fff; font-size: 12px; margin-left: 4px; }

/* stage list */
.stages { display: grid; gap: 12px; }
.stage .top2 { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.stage .meter { margin-top: 6px; height: 8px; }

/* budget vs real */
.bvr { display: grid; gap: 14px; }
.bvr .l { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; } .bvr .l b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bvr .meter { margin-top: 6px; height: 8px; }

/* tables (costs) */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl td, .tbl th { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cost { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cost .a { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cost .d { font-size: 13px; color: var(--muted); }

/* sheet (forms) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(21,20,19,.5); opacity: 0; transition: opacity 200ms ease; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; background: var(--page); border-radius: 20px 20px 0 0; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1); }
.sheet.open { transform: none; } .sheet-bg.open { opacity: 1; }
.sheet .grab { position: sticky; top: 0; background: var(--page); padding: 10px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 2; }
.sheet .grab h2 { margin: 0; }
.sheet .close { border: 0; background: #e2ded7; width: 40px; height: 40px; border-radius: 99px; font-size: 20px; cursor: pointer; flex: none; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(10,10,10,.94); display: grid; place-items: center; padding: 16px; }
.lb img { max-height: 86dvh; max-width: 100%; object-fit: contain; border-radius: 8px; }
.lb button { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 99px; border: 0; background: #fff; font-size: 22px; cursor: pointer; }

#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 70; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100vw - 32px); transition: transform 220ms var(--ease-out), opacity 220ms ease; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; } #toast.bad { background: var(--red); }

/* login */
.login { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.login .hero { background: var(--ink); color: #fff; padding: calc(env(safe-area-inset-top) + 36px) 20px 30px; }
.login .hero h1 { font-size: 34px; color: #fff; } .login .hero p { color: #c9c3bb; margin: 0; }
.login .hero .co { color: #9fb6d8; font: 700 12px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.login form { padding: 22px 20px 40px; max-width: 460px; width: 100%; margin: 0 auto; }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); background: var(--card); border: 1px dashed #cbc6bd; border-radius: var(--r); }
.empty b { display: block; color: var(--ink); font: 800 18px/1.2 var(--display); margin-bottom: 4px; }

@media (min-width: 900px) {
  main { padding: 24px 28px 40px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .sheet { left: 50%; right: auto; width: 560px; bottom: auto; top: 50%; border-radius: 20px; transform: translate(-50%, -46%) scale(0.97); opacity: 0; transition: transform 220ms var(--ease-out), opacity 220ms ease; max-height: 88dvh; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  #toast { bottom: 24px; }
}
/* ---------- laptop: a real sidebar with the logo and labeled sections; content centered and roomy ---------- */
@media (min-width: 1024px) {
  .tabs { top: 0; bottom: 0; left: 0; right: auto; width: 236px; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1px solid rgba(255,255,255,.06); }
  .tabs::before { content: ""; display: block; height: 70px; margin: 0 4px 22px; border-radius: 14px; background: #fff url(/img/bss-logo.png) center / 82% auto no-repeat; box-shadow: 0 1px 0 rgba(255,255,255,.9) inset; }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 14px; font-size: 15px; padding: 12px 14px; border-radius: 12px; }
  .tabs a svg { width: 21px; height: 21px; }
  @media (hover: hover) and (pointer: fine) { .tabs a:not([aria-current="page"]):hover { background: rgba(255,255,255,.07); color: #fff; } }
  body.side .top, body.side .top + .stripes, body.side main { margin-left: 236px; }
  body.side .top { padding-left: 36px; padding-right: 36px; } body.side .top .logo { display: none; }
  .top .brand { font-size: 22px; }
  main { max-width: 1280px; padding: 30px 40px 56px; }
  body.side main { margin-right: auto; }
  h1 { font-size: 34px; } h2 { font-size: 21px; margin-top: 30px; }
  .seg { margin: 14px 0 6px; padding: 0; flex-wrap: wrap; overflow: visible; }
  .sitegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
  .teamgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .list:not(.projects):not(.teamgrid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cal .day { grid-column: 1 / -1; }
  .feed { gap: 12px; }
  .actions { max-width: 760px; }
  #rf, #qf, #cf { max-width: 760px; }
  .empty { max-width: 760px; }
}
@media (min-width: 1500px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } .teamgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* BSS additions: chips that toggle (crew, tasks, sites), tables, calendar, quote sheet */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #c3cad5; background: #fff; font-weight: 600; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--yellow); color: #fff; border-color: var(--yellow); }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yn button { min-height: 48px; border-radius: 12px; border: 1px solid #c3cad5; background: #fff; font-weight: 700; cursor: pointer; }
.yn button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { min-width: 100%; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f5f8fc; }
.tbl .pid { font-weight: 800; white-space: nowrap; color: var(--yellow); }
.tag { display: inline-block; font: 700 11px/1 var(--body); letter-spacing: .04em; padding: 5px 8px; border-radius: 6px; background: #e8ecf2; color: #334; white-space: nowrap; }
.tag.done, .tag.Completed { background: var(--green-soft); color: var(--green); } .tag.prog, .tag.In.Progress { background: var(--blue-soft); color: var(--blue); }
.tag.open { background: var(--red-soft); color: var(--red); } .tag.wait { background: #fff1d6; color: #7a4c00; }
.site { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.site .n { width: 32px; height: 32px; border-radius: 8px; background: #e8ecf2; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.site.ok .n { background: var(--green); color: #fff; } .site .eq { font-size: 13px; color: var(--muted); margin-top: 3px; } .site .eq code { font-size: 12px; color: var(--ink-2); }
.cal { display: grid; gap: 8px; }
.cal .d { display: grid; grid-template-columns: 64px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cal .d .when { text-align: center; border-right: 1px solid var(--line); padding-right: 10px; } .cal .d .when b { display: block; font: 800 24px/1 var(--display); } .cal .d .when span { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.cal .d.oh { border-left: 4px solid #c5862a; } .cal .d.job { border-left: 4px solid var(--yellow); }
.lines { display: grid; gap: 8px; }
.line { display: grid; grid-template-columns: 1fr 70px 100px 36px; gap: 6px; align-items: center; }
.line .tx { grid-column: 1 / -1; font-size: 13px; display: flex; gap: 6px; align-items: center; color: var(--muted); }
.line input { min-height: 44px; }
.totals { display: grid; gap: 4px; justify-items: end; font-variant-numeric: tabular-nums; margin-top: 10px; } .totals b { font-size: 20px; }
.search { position: relative; } .search input { padding-left: 40px; } .search svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: var(--muted); }
.hide-mobile { display: none; }
@media (min-width: 900px) { .hide-mobile { display: table-cell; } }
.iconbtn.rf { font-size: 18px; line-height: 1; padding: 7px 11px; } .iconbtn.rf.spin { animation: spin .7s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.sheet.out, .sheet-bg.out { pointer-events: none; }
.iconbtn { white-space: nowrap; flex: none; } .top .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } input[type=search] { -webkit-appearance: none; appearance: none; } .site .eq code { overflow-wrap: anywhere; }
#toast { width: max-content; text-align: center; }

/* ---------- the opening (login) ---------- */
.opening { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; position: relative; overflow: hidden; background:
  radial-gradient(120% 60% at 50% 0%, #1b3a66 0%, #0d1726 62%), #0d1726; color: #fff; }
.opening::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(130,170,230,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(130,170,230,.07) 1px, transparent 1px); background-size: 24px 24px; }
.bp { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #6f93c8; stroke-width: 1.4; opacity: .5; }
.bp g g { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.2s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.bp .d2 { animation-delay: .15s } .bp .d3 { animation-delay: .3s } .bp .d4 { animation-delay: .45s } .bp .d5 { animation-delay: .6s } .bp .dim { stroke: #c5862a; stroke-width: 1; opacity: .7; animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.open-top { position: relative; z-index: 1; padding: calc(env(safe-area-inset-top) + 40px) 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; }
.plate { position: relative; overflow: hidden; border-radius: 18px; padding: 16px 22px; background: linear-gradient(135deg, #f7f9fb 0%, #d9dee5 18%, #ffffff 34%, #c7ced8 52%, #f2f4f7 70%, #cfd5de 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.12) inset, 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.25); animation: rise .7s cubic-bezier(0.23, 1, 0.32, 1) both; }
.plate img { display: block; height: 76px; width: auto; mix-blend-mode: multiply; }
.plate .sheen { position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent); transform: skewX(-18deg); animation: sheen 1.4s .5s cubic-bezier(0.77, 0, 0.175, 1) both; }
@keyframes sheen { to { left: 130%; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.kicker { margin: 22px 0 6px; font: 700 11px/1.2 var(--body); letter-spacing: .26em; text-transform: uppercase; color: #9fb6d8; animation: rise .7s .15s cubic-bezier(0.23, 1, 0.32, 1) both; }
.motto { margin: 0; font: 800 38px/1.02 var(--display); letter-spacing: -.02em; color: #fff; background: linear-gradient(180deg, #ffffff 30%, #b8c4d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: rise .7s .25s cubic-bezier(0.23, 1, 0.32, 1) both; }
.tri { display: flex; gap: 8px; margin: 18px 0 0; flex-wrap: wrap; justify-content: center; animation: rise .7s .35s cubic-bezier(0.23, 1, 0.32, 1) both; }
.tri span { font: 600 12px/1 var(--body); padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(159,182,216,.35); color: #cfdbec; background: rgba(13,23,38,.4); }
.open-card { position: relative; z-index: 1; background: var(--page); color: var(--ink); border-radius: 26px 26px 0 0; padding: 24px 22px calc(26px + env(safe-area-inset-bottom)); width: 100%; max-width: 520px; margin: 0 auto;
  box-shadow: 0 -20px 50px rgba(0,0,0,.35); animation: up .6s .3s cubic-bezier(0.32, 0.72, 0, 1) both; }
.open-card::before { content: ""; display: block; height: 6px; margin: -24px -22px 18px; border-radius: 26px 26px 0 0; background: var(--steel); }
.open-card h2 { margin: 0 0 14px; font-size: 22px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.pw { position: relative; } .pw input { padding-right: 76px; } .eye { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: #e3e8ef; font-weight: 700; font-size: 13px; cursor: pointer; }
.fine { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (min-width: 900px) { .opening { grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr; } .open-card { align-self: center; border-radius: 26px; margin: 40px; } .open-card::before { border-radius: 26px 26px 0 0; } .motto { font-size: 54px; } .plate img { height: 96px; } }
/* welcome after sign-in */
.hello { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; text-align: center; color: #fff; background: radial-gradient(120% 70% at 50% 30%, #1b3a66, #0d1726 65%); transition: opacity .4s ease, transform .4s cubic-bezier(0.23, 1, 0.32, 1); }
.hello.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.hello .hi { margin: 26px 0 0; font: 600 18px/1 var(--body); color: #9fb6d8; animation: rise .6s .1s cubic-bezier(0.23, 1, 0.32, 1) both; }
.hello .nm { margin: 6px 0 0; font: 800 48px/1 var(--display); animation: rise .6s .18s cubic-bezier(0.23, 1, 0.32, 1) both; }
.hello .dt { margin: 12px 0 0; font-size: 14px; color: #cfdbec; animation: rise .6s .26s cubic-bezier(0.23, 1, 0.32, 1) both; }
@media (prefers-reduced-motion: reduce) { .bp g g { stroke-dashoffset: 0; } .plate .sheen { display: none; } }
.hello .dt::first-letter { text-transform: uppercase; }
/* small phones: the screen name never turns into "Mis ..." */
@media (max-width: 479px) { .top { gap: 8px; } .top .logo { height: 28px; padding: 3px 5px; } .iconbtn { padding: 8px 11px; } }
@media (max-width: 379px) { .top .logo { display: none; } .top .brand { font-size: 18px; } }
.site .eqi { display: block; margin-top: 4px; } .site .eqi code { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

/* ---------- round 2 (her feedback 2026-10-29): Más in the top bar, sites with addresses, month calendar, finanzas ---------- */
.iconbtn.mas { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .iconbtn.mas svg { width: 16px; height: 16px; }
.iconbtn[aria-current="page"] { background: var(--yellow); }
.tabs .side-only { display: none; }
@media (max-width: 379px) { .iconbtn.mas span { display: none; } .iconbtn.mas { padding: 8px 10px; } }
.site .sa { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.site a.sl { display: block; color: inherit; text-decoration: none; min-width: 0; } .site a.sl > b::after { content: " ›"; color: var(--muted); }
.site .eq.addr { color: var(--ink-2); overflow-wrap: anywhere; }
.site.bad .n { background: var(--red); color: #fff; }
.mapbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--blue); flex: none; } .mapbtn svg { width: 20px; height: 20px; }
.eqs { display: grid; gap: 8px; }
.eqrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px; gap: 6px; align-items: center; } .eqrow input { min-height: 44px; }
.money-card { gap: 10px; } .money-card .l.tot { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }
.morelinks { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .morelinks svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.cost code { font-size: 13px; overflow-wrap: anywhere; } .cost > div { min-width: 0; }
/* month calendar */
.calnav { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; } .calnav h1, .calnav h2 { flex: 1; text-align: center; margin: 0; font-size: 22px; min-width: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 0 0 8px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 99px; margin-right: 6px; }
.legend i.job, .dots i.job { background: var(--yellow); } .legend i.oh, .dots i.oh { background: #c5862a; } .legend i.war, .dots i.war { background: var(--green); }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mgrid .wd { text-align: center; font: 700 11px/1 var(--body); text-transform: uppercase; color: var(--muted); padding: 4px 0; overflow: hidden; }
.cd { position: relative; min-height: 52px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.cd.out { background: transparent; border-style: dashed; opacity: .55; }
.cd .dn { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; color: inherit; font: 700 14px/1 var(--body); padding: 6px; display: flex; align-items: flex-start; justify-content: flex-start; cursor: pointer; border-radius: 10px; }
.cd.today { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); } .cd.today .dn { color: var(--yellow); }
.cd.sel { background: var(--yellow-soft); border-color: var(--yellow); }
.cd .dots { position: absolute; left: 6px; right: 3px; bottom: 6px; display: flex; gap: 3px; align-items: center; pointer-events: none; } .dots i { width: 7px; height: 7px; border-radius: 99px; flex: none; } .dots b { font-size: 10px; color: var(--muted); }
.cd .chipsx { display: none; }
#calday .cal .d { grid-template-columns: 1fr; } .cal .d.war { border-left: 4px solid var(--green); } .cal .d.hl { outline: 3px solid #c5862a; }
@media (min-width: 1024px) {
  .tabs .side-only { display: flex; margin-top: auto; }
  .pcols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; } .pside > h2:first-child { margin-top: 6px; }
  .cd { min-height: 112px; padding: 28px 6px 6px; } .cd .dots { display: none; }
  .cd .chipsx { display: grid; gap: 3px; position: relative; z-index: 1; pointer-events: none; } .cd .chipsx > * { pointer-events: auto; }
  .cc { display: block; width: 100%; font: 600 12px/1.25 var(--body); padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; border: 0; text-align: left; cursor: pointer; }
  .cc.job { background: var(--blue-soft); color: var(--blue); } .cc.oh { background: #fff1d6; color: #7a4c00; } .cc.war { background: var(--green-soft); color: var(--green); } .cc.done { opacity: .6; } .cc.more { background: transparent; color: var(--muted); }
  #calday .cal { max-width: 900px; }
}
/* Inicio: every box opens its details */
a.stat { display: block; text-decoration: none; color: inherit; transition: transform 140ms var(--ease-out), border-color 140ms ease; position: relative; }
a.stat::after { content: "›"; position: absolute; right: 12px; top: 10px; color: var(--muted); font-weight: 700; } a.stat.dark::after { color: #c9c3bb; }
a.stat:active { transform: scale(0.97); background: var(--yellow-soft); } a.stat.dark:active { background: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { a.stat:hover { border-color: var(--ink); } }
.billgrp { padding: 12px 16px; } .billgrp .irow:last-child { border-bottom: 0; }
@media (max-width: 379px) { .iconbtn .hx { display: none; } .iconbtn[data-act^="new"] { padding: 6px 12px; font-size: 18px; line-height: 1; } .top { gap: 6px; } }
.iconbtn.acct .ini { display: none; }
.seg.wrap { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; }
/* office phones: the top bar holds ↻ · Más · her initial, so "Cotizaciones" or "Calendario" is never cut */
@media (max-width: 599px) {
  body.office .top .logo { display: none; }
  body.office .iconbtn.acct { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: 99px; background: #fff; color: var(--ink); font-weight: 800; }
  body.office .iconbtn.acct .ini { display: inline; } body.office .iconbtn.acct .full { display: none; }
}
/* ---------- round 2 (2026-10-30): Avisos bell, crew check-in, follow-up, inventario, $ under counts ---------- */
.iconbtn.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; } .iconbtn.bell svg { width: 19px; height: 19px; }
.iconbtn.bell .badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #d9342b; color: #fff; font: 800 11px/18px var(--body); text-align: center; box-shadow: 0 0 0 2px var(--ink); }
.stat em { display: block; font: 700 14px/1.25 var(--body); font-style: normal; color: var(--ink-2); margin: 2px 0 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stat.dark em { color: #dfe6f0; }
a.stat[aria-current] { border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
.checkq { border: 2px solid var(--yellow); background: var(--yellow-soft); margin: 6px 0 14px; } .checkq h2 { font-size: 19px; }
.aviso.new { border-left: 4px solid var(--yellow); } .aviso.pend .meta b::before { content: "● "; color: #d9342b; }
.pushcard b svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.followcard .steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.followcard .steps li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f1f3f7; color: var(--muted); }
.followcard .steps li b::before { content: "○ "; } .followcard .steps li.on { background: var(--green-soft); color: var(--green); } .followcard .steps li.on b::before { content: "✓ "; }
.invq { font: 800 18px/1.1 var(--display); white-space: nowrap; }
.matrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 40px; gap: 6px; align-items: center; } .matrow .tx { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: -2px 0 4px; } .matrow select, .matrow input[type=number] { min-height: 44px; }
.legend i.rem, .dots i.rem { background: #7b4fc9; } .cal .d.rem { border-left: 4px solid #7b4fc9; }
@media (min-width: 1024px) { .cc.rem { background: #efe8fb; color: #5b33a6; } }
/* the crew tab bar has 5 items now */
.tabs a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* office phones with the Avisos bell: "Más" as a word (☰ only under 380 px), a slightly smaller screen title */
@media (max-width: 599px) { body.office .iconbtn.mas svg { display: none; } body.office .top .brand { font-size: 18px; } body.office .top { gap: 7px; } }
@media (max-width: 379px) { body.office .iconbtn.mas svg { display: inline; } body.office .top .brand { font-size: 17px; } body.office .top { gap: 5px; } }
@media (max-width: 479px) { .top .logo { display: none; } }
/* round 4: Llegué / Me fui on the crew's home; multi-project report */
.clockcard { border: 2px solid var(--ink); margin: 6px 0 14px; } .clockcard select { min-height: 46px; }
.mp { margin-bottom: 8px; } .mpsites { margin: -2px 0 12px 12px; } .mpsites .chips { gap: 6px; } .mpsites .chips button { min-height: 40px; font-size: 14px; }
/* round 5: lines from the price list; the catalog picker */
.line.cat { background: #f4f7fb; border-radius: 10px; padding: 6px; margin: 0 -6px; } .line .cinc { color: var(--blue); }
.catrow { border-bottom: 1px solid var(--line); padding: 4px 0; } .catrow:last-child { border-bottom: 0; } .catq { margin: 0 0 8px 34px; }
button.proj { border: 1px solid var(--line); font: inherit; cursor: pointer; width: 100%; }
/* round 6: sites grouped by project in "Varios proyectos hoy"; storage / install choice on quote lines */
.mpgroup { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; } .mph { display: block; margin-bottom: 6px; }
.mprows .check.mp { border: 0; padding: 6px 0; margin: 0; }
.line .lmode { grid-column: 1 / -1; } .line .lmode button { min-height: 40px; font-size: 13px; }
#newver { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 75; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 10px 12px 10px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 600; }
@media (min-width: 1024px) { #newver { left: auto; right: 24px; bottom: 24px; max-width: 420px; } }
/* round 7: distance brackets, the quote-level storage switch, the live total pinned to the bottom of the picker */
.tierrow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 40px; gap: 6px; align-items: center; } .tierrow input { min-height: 44px; }
.cattot { position: sticky; bottom: 0; z-index: 3; margin: 12px -16px 0; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 14px 14px 0 0; display: grid; gap: 2px; }
.cattot .r { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; } .cattot .r.sm { font-size: 13px; color: #c9d4e3; } .cattot .r.grand { font-size: 18px; font-weight: 700; margin-top: 4px; align-items: baseline; } .cattot .r.grand b { font-size: 20px; }
.catstor { position: sticky; top: 52px; z-index: 3; background: var(--page); padding: 6px 0 8px; margin: 0; }
.line .ltier select { min-height: 38px; width: auto; display: inline-block; margin-left: 6px; }
