/* cash.simples.ch */
:root {
  --bg: #f4f6f5; --sheet: #ffffff; --ink: #17202a; --muted: #5d6874; --rule: #dfe5e2; --soft: #edf3f0;
  --accent: #0f7a5c; --accent-ink: #ffffff; --accent-soft: #dcefe7; --err: #b0261d; --err-soft: #fbe6e3; --ok-soft: #e1f2e9;
  --r: 8px; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111614; --sheet: #182019; --ink: #e6ece8; --muted: #9aa7a0; --rule: #2a352f; --soft: #1e2823;
          --accent: #4fc79c; --accent-ink: #0b1510; --accent-soft: #173a2d; --err: #f08a7e; --err-soft: #3a1c19; --ok-soft: #173a2d; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.top { display: flex; align-items: center; gap: 1.2rem; padding: .7rem 1.2rem; background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--ink); font-size: 1.1rem; }
.brand svg { width: 26px; height: 26px; } .brand rect { fill: var(--accent); } .brand path { fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; }
.brand b { color: var(--accent); }
.top-year { color: var(--muted); font-size: .9rem; }

.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 54px); }
.shell-login { grid-template-columns: 1fr; }
.side { padding: 1rem .7rem; border-right: 1px solid var(--rule); background: var(--sheet); display: flex; flex-direction: column; gap: .15rem; }
.side a { padding: .5rem .75rem; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.side a:hover { background: var(--soft); }
.side a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.yearpick { margin-top: 1.2rem; padding: 0 .75rem; } .yearpick label { font-size: .8rem; color: var(--muted); display: grid; gap: .2rem; }
.side form:last-child { margin-top: auto; padding: 0 .75rem; }
main { padding: 1.5rem 1.8rem 3rem; min-width: 0; max-width: 1280px; }

.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.1rem; }
.card.narrow { max-width: 460px; margin: 3rem auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.1rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.kpi { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .1rem; }
.kpi span { color: var(--muted); font-size: .85rem; } .kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; } .kpi small { color: var(--muted); }

input, select, textarea { font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: .45rem .6rem; min-height: 2.3rem; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; min-width: 0; }
.btn { font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: var(--r); padding: .45rem 1rem; min-height: 2.3rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--accent); }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.danger { color: var(--err); }
.inline { display: inline; }

.form { display: grid; gap: .8rem; } .form.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: end; }
.form.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; } .form.row .grow, .filter .grow { flex: 1 1 260px; }
.chk { display: flex; align-items: center; gap: .4rem; font-weight: 400; } .chk input { width: auto; min-height: 0; }

.booking { display: grid; gap: .7rem; grid-template-columns: 130px 120px minmax(0, 1fr) 130px; }
.booking .c-text { grid-column: span 2; }
.booking .c-acc { grid-column: span 2; }
.booking .c-vat { grid-column: span 2; }
.booking .c-file { grid-column: span 2; }
.booking .c-actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
.booking .c-vatinfo { grid-column: 1 / -1; margin: 0; min-height: 1.2em; font-size: .85rem; }
@media (max-width: 900px) { .booking { grid-template-columns: 1fr 1fr; } .booking > * { grid-column: span 2 !important; } .booking .c-date, .booking .c-doc, .booking .c-amt { grid-column: span 1 !important; } }
.files { margin: .8rem 0 0; padding-left: 1.1rem; }
.del { margin-top: .8rem; }

.filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: .9rem; } .filter label { font-weight: 400; }
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .45rem .5rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.tbl td { padding: .45rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl td a { text-decoration: none; } .tbl td a:hover { text-decoration: underline; }
.tbl tfoot td, .tbl tr.sum td { font-weight: 700; border-top: 2px solid var(--rule); }
.tbl tr.sub td { background: var(--soft); font-weight: 600; }
.tbl tr.sel td { background: var(--accent-soft); }
.tbl tr.grp td { font-weight: 700; padding-top: 1rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.tbl tr.inactive td { color: var(--muted); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 4px; background: var(--soft); color: var(--muted); }
.clip { font-size: .85em; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .8rem; }
.tabs a { padding: .3rem .7rem; border-radius: 99px; text-decoration: none; color: var(--ink); border: 1px solid var(--rule); background: var(--sheet); font-size: .9rem; }
.tabs a[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.flash { padding: .65rem .9rem; border-radius: var(--r); background: var(--ok-soft); margin: 0 0 1rem; }
.flash-err { background: var(--err-soft); color: var(--err); }
.hint { color: var(--muted); font-size: .9rem; }
.steps { padding-left: 1.2rem; } .steps li { margin-bottom: .6rem; }
.secret { font-size: 1.15rem; letter-spacing: .08em; background: var(--soft); padding: .5rem .7rem; border-radius: var(--r); display: inline-block; margin: .4rem 0; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--rule); padding: .5rem; }
  .side a { padding: .35rem .6rem; }
  .yearpick { margin: 0; padding: 0 .3rem; } .side form:last-child { margin: 0 0 0 auto; }
  main { padding: 1rem; }
  .top-year { display: none; }
}
