[x-cloak] { display: none !important; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background-color: #f4f6f8; margin: 0; padding-bottom: 6.5rem; color: #1e293b; -webkit-font-smoothing: antialiased; }
.shell { max-width: 28rem; margin: 0 auto; min-height: 100vh; flex-direction: column; display: flex; background-color: #f4f6f8; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1); }
header { background-color: #00263B; color: #FAFFE4; padding: 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.75rem; position: sticky; top: 0; z-index: 50; border-bottom: 3px solid #AA9251; }
.wait-label { flex: 1 0 100%; margin: 0; font-size: 0.75rem; font-weight: 700; color: #FAFFE4; font-family: inherit; line-height: 1.4; overflow-wrap: anywhere; }
header h1 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.025em; }
header p { margin: 0; font-size: 10px; color: #FAFFE4; font-family: monospace; font-weight: bold; letter-spacing: 0.05em; }
.status-box { display: flex; align-items: center; gap: 0.35rem; }
header .icon-btn { width: auto; background: transparent; color: #FAFFE4; border: 0; padding: 0.35rem; display: flex; align-items: center; justify-content: center; border-radius: 0.5rem; }
header a.icon-btn { text-decoration: none; }
header .icon-btn.cog-on { background: #01344f; }
header .help-mark { width: 1.9rem; height: 1.9rem; padding: 0; font-size: 1.25rem; font-weight: 700; line-height: 1; }
header .help-chip { display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid #FAFFE4; color: #FAFFE4; background: transparent; border-radius: 0.55rem; padding: 0.4rem 0.85rem; font-size: 0.95rem; font-weight: 600; line-height: 1; text-decoration: none; }
header .icon-btn.cog-ring { width: 2.15rem; height: 2.15rem; padding: 0; border: 1.5px solid #FAFFE4; border-radius: 999px; }
header .icon-btn.cog-ring svg { width: 18px; height: 18px; }
.help-page { display: flex; flex-direction: column; }
.help-page .page-title { margin-bottom: 0.35rem; }
.help-page > .page-lead { margin-bottom: 1.05rem; }
.help-steps { list-style: none; margin: 0 0 1.05rem; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.help-step { background: #ffffff; border: 1px solid #e6eaee; border-radius: 0.95rem; padding: 1rem 1.05rem 1.05rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.help-step-head { display: flex; align-items: center; gap: 0.7rem; }
.help-num { width: 1.75rem; height: 1.75rem; flex: 0 0 1.75rem; display: flex; align-items: center; justify-content: center; background: #00263B; color: #FAFFE4; border-radius: 0.35rem; font-size: 0.95rem; font-weight: 700; line-height: 1; }
.help-step h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #00263B; }
.help-step p { margin: 0.55rem 0 0; color: #64748b; font-size: 0.95rem; font-weight: 500; line-height: 1.45; }
.help-note { margin: 0; }
.refresh-btn { border: 0; background: transparent; color: inherit; font: inherit; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; padding: 0.35rem 0.2rem; }
a.refresh-btn { text-decoration: none; }
.dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; background-color: #34d399; }
.dot.syncing { background-color: #FAFFE4; animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.banner { background-color: #00263B; border-bottom: 1px solid #01344f; padding: 0.5rem 0.75rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: #FAFFE4; line-height: 1.4; overflow-wrap: anywhere; }
main { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; background-color: #f4f6f8; }
.home-board { display: flex; flex-direction: column; gap: 0.85rem; }
.home-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.home-pair button { padding: 0.9rem 0.45rem; }
.home-heading { margin: 0.15rem 0 0; font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.pile-list { display: flex; flex-direction: column; gap: 0.75rem; }
button.pile { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; text-align: left; background: #ffffff; color: #0f172a; border: 1px solid #e6eaee; border-radius: 0.9rem; padding: 0.95rem 1rem; font-weight: 700; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }
.pile-copy { display: flex; flex-direction: column; min-width: 0; }
button.pile .metric-value { font-size: 1.55rem; margin-top: 0.3rem; }
.pile-hint { display: block; margin-top: 0.2rem; font-size: 0.72rem; font-weight: 600; color: #64748b; text-transform: none; letter-spacing: 0; }
.pile-empty { display: block; margin-top: 0.35rem; font-size: 0.95rem; font-weight: 600; color: #64748b; text-transform: none; letter-spacing: 0; }
.pile-chevron { flex-shrink: 0; color: #00263B; }
.sheet-page > * + * { margin-top: 0.85rem; }
.sheet-page > .page-lead { margin-top: 0.3rem; }
.sheet-page > .inv-stack { margin-top: 1rem; }
.page-title { margin: 0; font-size: 1.7rem; font-weight: 700; color: #00263B; letter-spacing: -0.02em; }
.page-lead { margin: 0; color: #64748b; font-size: 0.95rem; font-weight: 500; }
.pay-row { display: flex; align-items: center; gap: 0.55rem; margin: 0.15rem 0 0.85rem; }
a.pay-open { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: #00263B; font-weight: 700; font-size: 0.92rem; }
button.pay-copy { width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; padding: 0; background: #ffffff; color: #00263B; border: 1px solid #e2e8f0; border-radius: 0.65rem; display: flex; align-items: center; justify-content: center; }
button.pay-copy:disabled { background: #ffffff; color: #94a3b8; }
.pay-copied { margin: -0.35rem 0 0.75rem; color: #065f46; font-size: 0.8rem; font-weight: 700; }
.inv-stack { display: flex; flex-direction: column; gap: 0.85rem; }
.inv-card { background: #ffffff; border: 1px solid #e6eaee; border-radius: 0.95rem; padding: 1rem 1.05rem 1.05rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); cursor: pointer; }
.inv-client { font-size: 1.15rem; font-weight: 700; color: #00263B; }
.inv-card.inv-late { border-left: 4px solid #AA9251; }
.inv-flag:empty { display: none; }
.inv-flag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #AA9251; }
.inv-code { margin-top: 0.15rem; color: #64748b; font-size: 0.92rem; font-weight: 500; }
.inv-facts { margin-top: 0.45rem; display: flex; flex-direction: column; gap: 0.16rem; }
.inv-fact { display: flex; gap: 0.45rem; align-items: baseline; font-size: 0.9rem; line-height: 1.35; color: #1e293b; font-weight: 500; }
.inv-k { flex: 0 0 auto; font-weight: 700; color: #64748b; }
.inv-fact span:last-child { min-width: 0; overflow-wrap: anywhere; }
.inv-amount { margin-top: 0.5rem; font-size: 1.55rem; font-weight: 700; color: #00263B; line-height: 1.15; }
.inv-actions { display: flex; gap: 0.65rem; align-items: center; }
.inv-card .inv-actions { margin-top: 0.9rem; }
.inv-actions button { flex: 1 1 0; width: auto; }
button.btn-line { background: #ffffff; color: #00263B; border: 1.5px solid #00263B; }
button.btn-quiet { width: auto; align-self: center; background: transparent; color: #64748b; padding: 0.15rem 0.35rem; font-size: 0.8rem; font-weight: 700; }
button.btn-quiet:disabled { background: transparent; color: #94a3b8; }
.send-dock .pay-row, .send-dock .pay-copied { margin: 0; }
.send-dock .share-whatsapp { flex: 1 1 100%; }
button.btn-line.btn-auto { flex: 0 0 auto; padding-left: 1.15rem; padding-right: 1.15rem; }
.send-bar { background: #00263B; color: #FAFFE4; border-radius: 0.75rem; padding: 0.85rem 1rem; font-weight: 700; overflow-wrap: anywhere; }
.send-heading { margin: 0; font-size: 1.2rem; font-weight: 700; color: #00263B; }
button.back-home { width: auto; align-self: flex-start; background: transparent; color: #00263B; font-size: 0.85rem; font-weight: 700; padding: 0; text-align: left; }
label.to-label { text-transform: none; letter-spacing: 0; font-size: 0.95rem; font-weight: 600; color: #334155; }
textarea.email-preview { min-height: 4.25rem; line-height: 1.4; white-space: pre-wrap; background: #ffffff; }
.invoice-sheet { background: #ffffff; border: 1px solid #e6eaee; border-radius: 0.95rem; padding: 1rem 1rem 0.75rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); scroll-margin-top: 5.25rem; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.invoice-head > div:first-child { min-width: 0; }
.invoice-sheet .page-title { overflow-wrap: anywhere; }
.invoice-meta > div { min-width: 0; }
.inv-actions { flex-wrap: wrap; }
.invoice-kicker { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #64748b; }
.invoice-client { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 700; color: #00263B; overflow-wrap: anywhere; }
.invoice-job { margin: 0.25rem 0 0; color: #334155; font-size: 0.92rem; font-weight: 600; overflow-wrap: anywhere; }
.invoice-total-block { flex: 0 0 auto; text-align: right; }
.invoice-total { display: block; margin-top: 0.15rem; font-size: 1.45rem; font-weight: 700; color: #00263B; line-height: 1.1; }
.invoice-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 0.75rem; margin: 0.9rem 0 0; }
.invoice-meta dt { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #94a3b8; }
.invoice-meta dd { margin: 0.12rem 0 0; font-size: 0.92rem; font-weight: 600; color: #1e293b; overflow-wrap: anywhere; }
.invoice-lines { margin-top: 0.85rem; border-top: 1px solid #e6eaee; }
.related-invoices { margin-top: 0.85rem; }
.related-invoices .page-lead { margin-bottom: 0.45rem; }
.related-invoices .inv-row + .inv-row { margin-top: 0.45rem; }
.invoice-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid #f1f5f9; }
.invoice-line-main { min-width: 0; }
.invoice-line-title { display: block; font-weight: 700; color: #00263B; overflow-wrap: anywhere; }
.invoice-line-meta { display: block; margin-top: 0.15rem; color: #64748b; font-size: 0.8rem; font-weight: 600; overflow-wrap: anywhere; }
.invoice-line-amt { flex: 0 0 auto; font-weight: 700; color: #00263B; }
.invoice-totals { margin-top: 0.35rem; }
.option-group { border: 1px solid #e2e8f0; border-radius: 0.85rem; padding: 0.35rem 0.9rem 0.9rem; background: #ffffff; }
.option-group:not([open]) > :not(summary) { display: none; }
.option-group summary { cursor: pointer; font-weight: 700; color: #00263B; padding: 0.6rem 0; }
.option-group[open] summary { margin-bottom: 0.15rem; }
.vat-note { margin: 0 0 0.85rem; color: #64748b; font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; }
.switch-label { font-size: 0.95rem; font-weight: 700; color: #00263B; text-transform: none; letter-spacing: 0; }
button.switch { width: 3.15rem; height: 1.85rem; flex: 0 0 3.15rem; padding: 0.18rem; border-radius: 999px; background: #e2e8f0; position: relative; }
button.switch.switch-on { background: #00263B; }
.switch-knob { display: block; width: 1.45rem; height: 1.45rem; border-radius: 999px; background: #ffffff; transform: translateX(0); }
button.switch.switch-on .switch-knob { transform: translateX(1.3rem); }
.invoice-total-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.22rem 0; font-size: 0.92rem; font-weight: 600; color: #334155; }
.invoice-grand { margin-top: 0.15rem; padding-top: 0.45rem; border-top: 2px solid #AA9251; font-size: 1.05rem; font-weight: 700; color: #00263B; }
.email-sheet { background: #ffffff; border: 1px solid #e6eaee; border-radius: 0.85rem; padding: 0.7rem; }
.email-sheet > * + * { margin-top: 0.55rem; }
.email-sheet button { padding: 0.7rem; }
.send-dock { position: sticky; bottom: 4.4rem; z-index: 30; background: #f4f6f8; padding-top: 0.35rem; max-height: calc(100dvh - 9.5rem); overflow-y: auto; }
.send-dock-inner { display: flex; flex-direction: column; gap: 0.55rem; }
.metric-title.gold { color: #AA9251; }
.metric-box.alt .metric-title.gold { color: #AA9251; }
section { background: #ffffff; border: 1px solid #f1f5f9; border-radius: 1rem; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
section + section { margin-top: 1rem; }
.card-title { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0; padding-bottom: 0.5rem; border-bottom: 1px solid #f1f5f9; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
label { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
select, input, textarea { width: 100%; background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.75rem; font-size: 0.875rem; color: #0f172a; box-sizing: border-box; font-family: inherit; }
input:disabled, textarea:disabled, select:disabled { background-color: #f1f5f9; color: #64748b; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
input[type="time"], input[type="date"], input[type="file"] { min-height: 2.75rem; }
.logo-frame { display: block; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 0.75rem; padding: 0.75rem; }
.logo-frame img { display: block; max-width: 100%; max-height: 12rem; margin: 0 auto; object-fit: contain; }
.shift-note { margin: 0; font-size: 0.75rem; font-weight: 600; color: #FAFFE4; background: #00263B; border-radius: 0.75rem; padding: 0.5rem 0.75rem; }
button { width: 100%; background-color: #00263B; color: #FAFFE4; font-weight: 600; padding: 1rem; border-radius: 0.75rem; border: none; font-size: 0.875rem; cursor: pointer; }
button:disabled { background-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
button.btn-alt { background-color: #00263B; color: #FAFFE4; }
button.btn-paid { background-color: #047857; }
button.btn-unpaid { background-color: #b45309; }
button.btn-bad { background-color: #be123c; }
nav { background-color: #00263B; color: #FAFFE4; display: flex; justify-content: center; padding: 0.45rem 0.35rem 0.7rem; position: fixed; bottom: 0; left: 0; right: 0; max-width: 28rem; margin: 0 auto; z-index: 50; border-top: 1px solid #01344f; box-sizing: border-box; gap: 0.35rem; }
nav button, nav a { background: none; color: #FAFFE4; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; padding: 0.45rem 0.15rem 0.15rem; width: auto; min-width: 0; flex: 1 1 0; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; }
button.see-more { width: auto; align-self: flex-start; background: transparent; color: #00263B; font-size: 0.8rem; font-weight: 700; padding: 0; text-align: left; }
.alert { padding: 0.875rem; border-radius: 0.75rem; text-align: center; font-size: 0.875rem; font-weight: 600; border: 1px solid transparent; }
.job-logged-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; margin: 0; }
button.text-btn { width: auto; background: transparent; color: inherit; padding: 0; border-radius: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; }
button.text-btn:disabled { background: transparent; color: inherit; opacity: 0.55; }
.alert-success { background-color: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background-color: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.metric-box { background-color: #f8fafc; border: 1px solid #f1f5f9; padding: 0.75rem; border-radius: 0.75rem; }
.metric-box.alt { background-color: #00263B; border-color: #00263B; color: #FAFFE4; }
.metric-box.warn { background-color: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.metric-box.bad { background-color: #fff1f2; border-color: #fecdd3; color: #9f1239; }
button.metric-box { text-align: left; color: #0f172a; font-weight: 700; padding: 0.75rem; }
button.metric-box.alt { background-color: #00263B; color: #FAFFE4; }
button.metric-box.warn { background-color: #fff7ed; color: #9a3412; }
button.metric-box.bad { background-color: #fff1f2; color: #9f1239; }
.metric-title { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; display: block; }
.metric-value { display: block; margin-top: 0.25rem; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.metric-value-sm { font-size: 0.95rem; }
.metric-sub { display: block; margin-top: 0.2rem; font-size: 0.7rem; font-weight: 600; color: #64748b; }
button.seg { background: #f8fafc; color: #475569; padding: 0.65rem 0.4rem; border: 1px solid #e2e8f0; }
button.seg.seg-on { background: #00263B; color: #FAFFE4; border-color: #00263B; }
button.btn-ghost { background: #e2e8f0; color: #0f172a; }
button.inv-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; width: 100%; background: #fff; color: #0f172a; border: 1px solid #e2e8f0; text-align: left; padding: 0.75rem; }
.inv-main { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.inv-title { font-weight: 700; font-size: 0.85rem; }
.inv-meta { font-size: 0.7rem; font-weight: 600; color: #64748b; }
.inv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; flex-shrink: 0; }
.inv-amt { font-weight: 700; font-size: 0.85rem; }
.pill { display: inline-block; border-radius: 999px; padding: 0.15rem 0.45rem; font-size: 0.65rem; font-weight: 700; background: #e2e8f0; color: #334155; }
.pill-overdue, .pill-bad, .pill-writtenoff { background: #ffe4e6; color: #9f1239; }
.pill-due { background: #ffedd5; color: #9a3412; }
.pill-draft { background: #00263B; color: #FAFFE4; }
.pill-paid { background: #d1fae5; color: #065f46; }
.line { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 0.15rem 0.5rem; padding: 0.55rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.75rem; }
.line-amt { font-weight: 700; text-align: right; }
.line-sub { color: #64748b; font-weight: 600; }
button.btn-line:disabled,
button.btn-alt:disabled,
button.btn-paid:disabled,
button.btn-bad:disabled,
button.btn-ghost:disabled,
button.btn-unpaid:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
header .refresh-btn:disabled { background: transparent; color: #FAFFE4; opacity: 0.45; }
nav button, nav a { position: relative; }
nav button.nav-on { color: #FAFFE4; font-weight: 700; }
nav button.nav-on::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5rem; height: 3px; transform: translateX(-50%); background: #AA9251; border-radius: 2px; }
.metric-box.alt .metric-title,
.metric-box.alt .metric-sub,
button.metric-box.alt .metric-title,
button.metric-box.alt .metric-sub { color: #FAFFE4; }
.banner.sample { background: #fff7ed; border-bottom-color: #fed7aa; color: #9a3412; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.todo-list { display: flex; flex-direction: column; gap: 0.65rem; }
button.todo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "kicker amount" "client amount" "meta amount";
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.12rem;
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #00263B;
  border: 1px solid #e6eaee;
  border-radius: 0.95rem;
  padding: 0.9rem 1rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
button.todo-row.todo-late { border-left: 4px solid #AA9251; }
.todo-kicker { grid-area: kicker; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #64748b; }
button.todo-late .todo-kicker { color: #AA9251; }
.todo-client { grid-area: client; font-size: 1.05rem; font-weight: 700; color: #00263B; overflow-wrap: anywhere; }
.todo-meta { grid-area: meta; font-size: 0.85rem; font-weight: 600; color: #64748b; }
.todo-amount { grid-area: amount; font-size: 1.25rem; font-weight: 700; color: #00263B; white-space: nowrap; }
.home-foot { margin: 0.15rem 0 0; color: #64748b; font-size: 0.9rem; font-weight: 500; line-height: 1.4; }
.quiet-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.quiet-actions > button { flex: 1 1 0; width: auto; padding: 0.75rem 0.4rem; }
.remind-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.55rem; }
.send-choices { display: flex; flex-direction: column; gap: 0.55rem; }
.send-choices > button { width: 100%; }
