:root {
  --bg: #f5f5f3; --card: #fff; --text: #1d1d1b; --muted: #6b6a66; --line: #e2e1dc;
  --accent: #1f5fbf; --accent-text: #fff; --danger: #b3261e; --head: #efeeea;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1b1a; --card: #262624; --text: #f0efea; --muted: #a9a8a2; --line: #3a3936;
    --accent: #5b9bf0; --accent-text: #0b1b33; --danger: #f2a39c; --head: #2f2f2c; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
[hidden] { display: none !important; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; max-width: 640px; margin: 0 auto; }
.brand { font-size: 14px; color: var(--muted); }
.lang { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 6px 0; cursor: pointer; }
.lang b { font-weight: 400; }
.lang b.on { color: var(--text); font-weight: 600; }
.view { max-width: 640px; margin: 0 auto; padding: 0 16px 24px; }
h1 { font-size: 24px; font-weight: 600; margin: 24px 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 18px; background: var(--card); color: var(--text); }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
#tel { letter-spacing: 6px; }
#cif { text-transform: uppercase; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.center { text-align: center; }
.err { color: var(--danger); font-size: 15px; margin: 12px 0 0; }
.primary { display: flex; width: 100%; height: 50px; align-items: center; justify-content: center; margin-top: 18px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; }
.primary[disabled] { opacity: .6; }
.help { font-size: 14px; color: var(--muted); margin-top: 22px; }
.who { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.cname { font-weight: 600; font-size: 17px; }
.ctax { color: var(--muted); font-size: 14px; }
.small, .zip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 6px 12px; font-size: 14px; cursor: pointer; text-decoration: none; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.mhead { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--head); gap: 8px; }
.mtitle { font-weight: 600; font-size: 15px; background: none; border: 0; color: var(--text); padding: 0; text-align: left; cursor: pointer; flex: 1; }
.mtitle .chev { display: inline-block; margin-left: 6px; color: var(--muted); transition: transform .15s; }
.month.closed .chev { transform: rotate(-90deg); }
.month.closed .rows, .month.closed .racts .na { color: var(--muted); font-size: 13px; }
.mtotal { display: none; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.rnum { font-weight: 600; font-size: 15px; }
.rdate { color: var(--muted); font-size: 13px; }
.ramt { text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.racts { text-align: right; font-size: 14px; }
.racts a, .racts a:visited { color: var(--accent); text-decoration: none; display: inline-block; padding: 6px 4px 6px 12px; font-weight: 500; }
.mtotal { text-align: right; color: var(--muted); font-size: 13px; padding: 8px 12px; border-top: 1px solid var(--line); }
.empty, .updated { color: var(--muted); font-size: 14px; }
.updated { font-size: 12px; margin-top: 16px; }
.invbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.link { background: none; border: 0; color: var(--accent); font-size: 16px; padding: 0; cursor: pointer; }
.inum { font-weight: 600; }
.pages img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; }
.pages .loading { padding: 60px 0; text-align: center; color: var(--muted); }
.dlbar { position: sticky; bottom: 0; padding: 10px 0 14px; background: var(--bg); }
.dlbar .primary { margin-top: 0; }
.privacy { max-width: 640px; margin: 8px auto 24px; padding: 0 16px; font-size: 12px; color: var(--muted); }
