:root { --brand: #2f7d32; --brand-ink: #fff; --bg: #f4f7f2; --card: #fff; --ink: #18221a; --muted: #5d6b5f; --line: #dfe6dc; --ok: #1f8a44; --warn: #b26a00; --bad: #c62828; --r: 14px; --shadow: 0 1px 2px rgba(20,40,20,.06), 0 4px 14px rgba(20,40,20,.06); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1 { font-size: 1.45rem; margin: 0; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 22px 0 10px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
small, .muted { color: var(--muted); }
.pad { padding: 12px 4px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, #000 0%); outline-offset: 2px; }
.loading { padding: 40px 16px; text-align: center; color: var(--muted); }

/* top bar + navs */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--brand); color: var(--brand-ink); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand img { height: 36px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px 4px; }
.brand .leaf { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.18); }
.bname { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .trial { display: none; } }
.trial { font-size: .75rem; background: rgba(255,255,255,.2); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.lang { display: inline-flex; border-radius: 99px; background: rgba(0,0,0,.18); padding: 3px; flex: none; }
.lang button { border: 0; background: transparent; color: inherit; font-weight: 700; font-size: .85rem; padding: 7px 11px; border-radius: 99px; cursor: pointer; min-width: 44px; min-height: 36px; }
.lang button.on { background: #fff; color: #18221a; }
.lang.sm { background: #e8eee5; }
.lang.sm button { min-height: 30px; padding: 4px 10px; }
.main { padding: 14px 14px 110px; max-width: 1100px; margin: 0 auto; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: .72rem; text-decoration: none; color: var(--muted); min-height: 56px; justify-content: center; }
.bottom a.on { color: var(--brand); font-weight: 700; }
.bottom a.on .ic { transform: scale(1.1); }
.side { display: none; }
@media (min-width: 960px) {
  .bottom { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; top: 58px; bottom: 0; left: 0; width: 230px; padding: 14px 10px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; }
  .side a:hover { background: #f0f4ee; }
  .side a.on { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
  .side .who { margin-top: auto; padding: 12px; font-size: .85rem; color: var(--muted); }
  .main { margin-left: 230px; padding: 22px 32px 60px; }
  h1 { font-size: 1.7rem; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 15px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c5d0c1; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: #fff; }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 36px; padding: 6px 11px; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.link { background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; padding: 6px; }
.rowbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rowbtns.center { justify-content: center; }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
@media (min-width: 700px) { .share { display: flex; flex-wrap: wrap; } }

/* cards, lists */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); text-decoration: none; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; }
.row:last-child { border-bottom: 0; }
a.row:hover, button.row:hover { background: #f7faf5; }
.rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rmain small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rside { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.list.big .row { padding: 16px; font-size: 1.05rem; }
.chkrow input { width: 22px; height: 22px; accent-color: var(--brand); }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #edf2ea; color: #3d4b3f; white-space: nowrap; }
.badge.lang { background: #fff3d6; color: #7a5300; }
.st-done, .badge.st-paid, .badge.st-q_approved { background: #dff3e5; color: #17663a; }
.badge.st-started { background: #e0ecff; color: #1d4fa3; }
.badge.st-unpaid, .badge.st-q_sent { background: #fff1d6; color: #8a5600; }
.badge.st-overdue, .badge.st-q_declined { background: #fde3e3; color: #a51c1c; }
.badge.st-skipped, .badge.st-void, .badge.st-q_draft { background: #eceeed; color: #5d6b5f; }
.badge.st-scheduled { background: #edf2ea; color: #3d4b3f; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; padding: 4px 9px; border-radius: 99px; background: #f0f4ee; text-decoration: none; }
.chip .ic { width: 15px; height: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.chips .chip { padding: 8px 13px; font-size: .9rem; min-height: 38px; }
.chips .chip.on { background: var(--brand); color: var(--brand-ink); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 42px; height: 42px; color: var(--brand); opacity: .7; }
.sub { color: var(--muted); margin: 4px 0 10px; }
.fine { color: var(--muted); font-size: .85rem; }
.alert { display: flex; align-items: center; gap: 10px; padding: 13px 14px; margin: 10px 0; border-radius: 12px; background: #fff7e3; color: #6b4a00; text-decoration: none; font-weight: 600; }
.alert.bad { background: #fde8e8; color: #8f1d1d; }
.alert span { flex: 1; }
.notices { margin-bottom: 8px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #e3f4e6; color: #17552e; margin: 6px 0; text-decoration: none; font-weight: 600; }

/* dashboard */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; border-top: 4px solid var(--brand); min-width: 0; }
.stat.warn { border-top-color: #e3a21a; }
.stat small { font-weight: 600; }
.stat b { font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.stat span { font-size: .82rem; color: var(--muted); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, 1fr); } }

/* today */
.daynav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.daynav input[type=date] { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 6px 10px; background: #fff; flex: 1; min-width: 0; max-width: 200px; }
.daynav .range { font-weight: 700; flex: 1; text-align: center; }
.progress { height: 10px; background: #e3e9e0; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress div { height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.visits { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.visit { display: flex; gap: 10px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; border-left: 5px solid var(--brand); }
.visit.st-done { border-left-color: var(--ok); background: #f7fcf8; }
.visit.st-started { border-left-color: #2b6bd6; }
.visit.st-skipped { opacity: .6; border-left-color: #aab4a8; }
.ord { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ord .num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.arrow { width: 36px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-size: .8rem; color: var(--muted); }
.arrow[disabled] { opacity: .3; }
.vbody { flex: 1; min-width: 0; }
.vtop { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cname { font-weight: 800; font-size: 1.08rem; text-decoration: none; }
.svc { margin: 2px 0 4px; }
.addr { display: flex; gap: 6px; align-items: flex-start; color: #1d4fa3; text-decoration: none; font-weight: 600; margin: 4px 0; overflow-wrap: anywhere; }
.addr .ic { width: 18px; height: 18px; margin-top: 2px; }
.addr.big { font-size: 1.05rem; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cnote { background: #fffbea; border-radius: 9px; padding: 8px 10px; margin: 6px 0; font-size: .92rem; white-space: pre-wrap; }
.vnote { color: #3d4b3f; font-size: .92rem; margin: 6px 0; display: flex; gap: 6px; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.vbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vbtns .btn { flex: 1 1 auto; padding: 9px 10px; }

/* week */
.week { display: grid; gap: 10px; margin-top: 12px; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, 1fr); } }
.day { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day.is-today { outline: 3px solid var(--brand); }
.dhead { display: flex; justify-content: space-between; gap: 6px; }
.dhead b { text-transform: capitalize; }
.dhead span { color: var(--muted); font-size: .85rem; }
.dcount { font-weight: 600; font-size: .92rem; }
.dnames { display: flex; flex-wrap: wrap; gap: 4px; }
.dnames span { font-size: .76rem; background: #f0f4ee; border-radius: 6px; padding: 2px 6px; }
.dnames span.did { text-decoration: line-through; color: var(--muted); }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .svc-row label, .line label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.form small { font-weight: 400; }
input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd8cb; border-radius: 11px; background: #fff; font-size: 16px; }
input[type=color] { width: 100%; min-height: 46px; border: 1px solid #cfd8cb; border-radius: 11px; padding: 4px; background: #fff; }
textarea { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.err { color: var(--bad); margin: 0; min-height: 1em; font-weight: 600; }
.search { margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.shead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shead h2 { margin: 22px 0 10px; }
.cols { display: grid; gap: 0 24px; }
@media (min-width: 960px) { .cols { grid-template-columns: 1fr 1fr; } }
.logo-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.logo-prev { width: 140px; height: 80px; border: 1px dashed #c5d0c1; border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-prev .leaf .ic { width: 36px; height: 36px; color: var(--brand); }
.soon { display: flex; gap: 12px; align-items: flex-start; background: #f2f6ff; }
.soon p { margin: 4px 0 0; color: #3b4a68; font-size: .92rem; }
.soon .ic { color: #3b5bdb; width: 26px; height: 26px; }
.ready h2 { display: flex; gap: 8px; align-items: center; margin-top: 0; }
.overdue-row { border-bottom: 1px solid var(--line); }
.overdue-row .row { border-bottom: 0; }
.overdue-row .rowbtns { padding: 0 14px 12px; margin: 0; }

/* services */
.svc-list { display: flex; flex-direction: column; gap: 0; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: end; padding: 12px; margin: 8px 0; }
.svc-row label:nth-child(1), .svc-row label:nth-child(2) { grid-column: span 2; }
.svc-row.off { opacity: .55; }
.svc-row .chk { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.svc-row .chk input { width: 22px; height: 22px; accent-color: var(--brand); }
@media (min-width: 900px) { .svc-row { grid-template-columns: 2fr 2fr 1fr 1.1fr auto auto; } .svc-row label:nth-child(1), .svc-row label:nth-child(2) { grid-column: auto; } }

/* line items */
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; background: #fbfcfa; }
.l-nums { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.l-nums label { flex: 1 1 90px; font-size: .82rem; }
.l-total { font-weight: 700; min-width: 80px; text-align: right; padding-bottom: 12px; }
.totals { margin-left: auto; width: 100%; max-width: 320px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 8px; font-size: 1.15rem; }

/* sheet + toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(10,20,10,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; background: #fff; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.sheet h2 { margin-top: 0; padding-right: 40px; display: flex; gap: 8px; align-items: center; }
.sheet .x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; background: #f0f4ee; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; background: #18221a; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100% - 28px); text-align: center; transition: opacity .4s; }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; }

/* auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 14px 14px 40px; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #000) 0, var(--brand) 220px, var(--bg) 220px); }
.auth-top { width: 100%; max-width: 460px; display: flex; justify-content: flex-end; color: #fff; padding-top: env(safe-area-inset-top); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.15); padding: 24px 20px; margin-top: 14px; }
.auth-card h1 { text-align: center; font-size: 1.8rem; }
.logo-big { display: grid; place-items: center; width: 64px; height: 64px; margin: -56px auto 8px; border-radius: 18px; background: var(--brand); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.logo-big .ic { width: 36px; height: 36px; }
.auth .sub { text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #eef2ec; border-radius: 12px; padding: 4px; margin: 16px 0; }
.tabs button { border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 700; cursor: pointer; min-height: 44px; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.pitch { background: #eef7ee; border-radius: 10px; padding: 10px 12px; margin: 0; color: #24532c; font-weight: 600; }

/* documents (shared by app preview, public page) */
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }
.paper { background: #fff; border-radius: 6px; box-shadow: 0 2px 16px rgba(0,0,0,.1); overflow: hidden; }
.doc { --doc: #2f7d32; padding: 22px 18px; border-top: 8px solid var(--doc); color: #18221a; font-size: 14px; }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.doc-biz { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.doc-biz img { max-height: 70px; max-width: 160px; object-fit: contain; }
.doc-leaf { font-size: 34px; }
.doc-biz div { display: flex; flex-direction: column; font-size: 13px; color: #4b584d; overflow-wrap: anywhere; }
.doc-biz b { font-size: 16px; color: #18221a; }
.doc-title { text-align: right; margin-left: auto; }
.doc-title h2 { margin: 0 0 6px; color: var(--doc); font-size: 20px; }
.doc-title dl { display: grid; grid-template-columns: auto auto; gap: 2px 10px; margin: 0; font-size: 13px; justify-content: end; }
.doc-title dt { color: #6a776c; }
.doc-title dd { margin: 0; font-weight: 600; }
.doc-paid { display: inline-block; border: 2px solid #1f8a44; color: #1f8a44; font-weight: 800; padding: 2px 10px; border-radius: 6px; transform: rotate(-4deg); margin-bottom: 6px; letter-spacing: .06em; }
.doc-to { margin: 18px 0 12px; display: flex; flex-direction: column; }
.doc-to small { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: #6a776c; }
.doc-to b { font-size: 15px; }
.doc-lines { width: 100%; border-collapse: collapse; }
.doc-lines th { background: var(--doc); color: var(--doc-ink, #fff); text-align: left; padding: 8px; font-size: 12px; }
.doc-lines td { padding: 9px 8px; border-bottom: 1px solid #e6ebe3; vertical-align: top; }
.doc-lines td small { display: block; color: #6a776c; font-size: 12px; }
.doc-lines .n { text-align: right; white-space: nowrap; }
.doc-tot { margin: 12px 0 0 auto; max-width: 280px; }
.doc-tot div { display: flex; justify-content: space-between; padding: 3px 8px; }
.doc-tot .grand { border-top: 2px solid var(--doc); margin-top: 4px; padding-top: 8px; font-size: 17px; }
.doc-note { color: #4b584d; white-space: pre-wrap; margin: 14px 0 0; }
.doc-pay { margin-top: 16px; background: #f4f8f2; border-radius: 8px; padding: 10px 12px; }
.doc-pay p { margin: 4px 0 0; white-space: pre-wrap; }
.doc-foot { margin-top: 22px; text-align: center; color: #6a776c; font-size: 13px; }
@media (max-width: 480px) { .doc { padding: 16px 12px; font-size: 13px; } .doc-title { text-align: left; margin-left: 0; } .doc-title dl { justify-content: start; } .doc-lines th, .doc-lines td { padding: 7px 4px; } }
.docbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* public page */
.pubbody { background: #eef2ec; }
.pub-top { display: flex; justify-content: center; padding: 12px; background: var(--brand); color: var(--brand-ink); padding-top: max(12px, env(safe-area-inset-top)); }
.pub-top .lang button { min-width: 84px; }
.pub { max-width: 820px; margin: 0 auto; padding: 14px 12px 40px; }
.pub-status { text-align: center; font-size: 1.15rem; font-weight: 700; padding: 14px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); margin: 0 0 14px; }
.pub-status.ok { background: #e2f5e7; color: #17663a; }
.pub-status.bad { background: #fde8e8; color: #8f1d1d; }
.pub-pay { margin: 14px 0; background: #f2f6ff; border-radius: 12px; padding: 12px 14px; color: #3b4a68; }
.pub-pay p { margin: 4px 0 0; }
.pub-approve h2 { margin-top: 0; }
.pub .btn { white-space: normal; text-align: center; max-width: 100%; }
.notices { display: flex; flex-direction: column; }
.notices .link { align-self: flex-end; }

/* admin */
.adminbody .admin { max-width: 1200px; margin: 0 auto; padding: 20px 14px; }
.tablewrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.atable { border-collapse: collapse; width: 100%; font-size: .9rem; }
.atable th, .atable td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.atable .n { text-align: right; }
.atable select { min-height: 34px; padding: 4px 8px; width: auto; }
.adminbody .form { max-width: 380px; }

@media print { .top, .bottom, .side, .rowbtns, .share, .pv-head, .docbar, .soon, .head, .pub-top, .pub-pay, .pub-status, .pub-approve { display: none !important; } .main { margin: 0; padding: 0; } .paper { box-shadow: none; } body { background: #fff; } }

/* grid/flex children may shrink below their content (WebKit long-text overflow) */
.cols > *, .two > *, .row > *, .shead > * { min-width: 0; }
.row .rmain, .row > div:first-child { overflow-wrap: anywhere; }
dd, .addr, .cnote { overflow-wrap: anywhere; }

/* phone overflow fix (long Spanish labels) */
.quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick .btn, .rowbtns .btn { white-space: normal; min-width: 0; max-width: 100%; height: auto; text-align: center; overflow-wrap: anywhere; }
/* team rows: let the action buttons drop below the name on a phone */
.row { flex-wrap: wrap; }
.row .rmain { flex: 1 1 170px; min-width: 0; }
.rside { max-width: 100%; }
