@import url("tokens.css");
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root { --line: #dfe2ea; --soft: #f4f5f9; --muted: #555d73; --link: #24408e; --err: #a3161f; --ok: #14633a; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 var(--tw-font-body); color: var(--tw-ink); background: var(--soft); }
h1, h2 { font-family: var(--tw-font-heading); line-height: 1.2; margin: 0 0 1rem; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.1rem; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--tw-orange); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem; z-index: 9; }
button, .button { display: inline-block; font: 600 1rem var(--tw-font-body); padding: .6rem 1.1rem; min-height: 44px; border: 2px solid var(--tw-navy); border-radius: 8px; background: var(--tw-navy); color: #fff; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { border-color: var(--tw-orange); }
button.ghost { background: transparent; color: var(--tw-navy); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: inherit; text-decoration: underline; font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; color: inherit; padding: .55rem .7rem; min-height: 44px; border: 1px solid #8b92a5; border-radius: 8px; background: #fff; }
.field { margin-bottom: 1rem; } label { display: block; font-weight: 500; margin-bottom: .25rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; margin: .25rem 1rem .5rem 0; } .check input { width: 20px; min-height: 20px; height: 20px; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
.msg { padding: .75rem 1rem; border-radius: 8px; border-left: 5px solid var(--tw-orange); background: #fff3ea; } .msg.err { border-color: var(--err); background: #fdecec; color: var(--err); } .msg.ok { border-color: var(--ok); background: #e9f6ee; color: var(--ok); }
.scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; } th { font-size: .85rem; color: var(--muted); white-space: nowrap; } tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; } .bar input[type=search] { flex: 1 1 220px; width: auto; } .bar select { width: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; } .tabs a { padding: .5rem .8rem; border-radius: 8px; text-decoration: none; background: #fff; border: 1px solid var(--line); } .tabs a[aria-current] { background: var(--tw-navy); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; } .tile { display: block; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--tw-orange); border-radius: 12px; padding: 1.25rem; text-decoration: none; color: inherit; } .tile strong { display: block; font-family: var(--tw-font-heading); } .tile span, .hint, .small { color: var(--muted); font-size: .9rem; }
.qr svg { max-width: 220px; height: auto; } code { font-size: .95em; } .wrap { overflow-wrap: anywhere; } .codes { columns: 2; max-width: 30rem; list-style: none; padding: 0; }
.bare { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--tw-navy); } .card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 0 1.5rem 1.5rem; overflow: hidden; } .card h1 { margin-top: 1.25rem; } .brand { display: block; width: calc(100% + 3rem); margin: 0 -1.5rem; padding: 1.25rem 25%; height: auto; background: var(--tw-navy); border-bottom: 4px solid var(--tw-orange); } .card form > button { width: 100%; }
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; } .side { background: var(--tw-navy); color: #fff; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; } .side a { color: #fff; } .logo img { width: 150px; height: auto; display: block; }
.side nav a { display: block; padding: .6rem .75rem; border-radius: 8px; text-decoration: none; border-left: 3px solid transparent; } .side nav a:hover { background: #262c42; } .side nav a[aria-current] { background: #262c42; border-left-color: var(--tw-orange); } .menu { display: none; } .me { margin-top: auto; font-size: .9rem; } #main { padding: 2rem; min-width: 0; max-width: 1200px; }
@media (max-width: 800px) { .app { display: block; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; } .logo img { width: 100px; } .wide { display: none; } .menu { display: block; margin-left: auto; } .menu summary { padding: .6rem; cursor: pointer; } .menu[open] { flex-basis: 100%; } .me { margin: 0; width: 100%; display: flex; gap: 1rem; } #main { padding: 1.25rem 1rem; } }

/* v0.2 CRM */
.num { text-align: right; white-space: nowrap; }
.label, legend.label { display: block; font-weight: 500; margin-bottom: .25rem; padding: 0; }
.spaced { margin: 1rem 0 1.25rem; } form.inline { display: inline; margin-left: .5rem; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.s-active, .o-won .badge, .badge.o-won { background: #e9f6ee; border-color: #b6dcc4; color: var(--ok); } .badge.o-lost, .s-lost { background: #fdecec; border-color: #f0c4c4; color: var(--err); }
.s-prospect, .badge.o-open { background: #fff3ea; border-color: #ffd2b3; color: #7a3a0c; } .s-inactive { color: var(--muted); }
.late, .late td, li.late .when { color: var(--err); }
a.button.ghostlink { background: transparent; color: var(--tw-navy); font-size: .9rem; padding: .4rem .8rem; min-height: 36px; }
button.danger, .danger { border-color: var(--err); background: var(--err); color: #fff; } button.ghost.danger { background: transparent; color: var(--err); }
details > summary { cursor: pointer; color: var(--link); padding: .35rem 0; min-height: 32px; } details.add, details.confirm { margin-top: .75rem; } details[open] > summary { margin-bottom: .5rem; }
.people, .timeline, .plainlist { list-style: none; padding: 0; margin: 0; }
.people > li { padding: .75rem 0; border-bottom: 1px solid var(--line); } .people > li:last-child { border-bottom: 0; } .people .past { opacity: .65; }
.people details form { background: var(--soft); border-radius: 8px; padding: .75rem; margin-bottom: .5rem; }
.timeline > li { position: relative; padding: .5rem 0 .5rem 1.1rem; border-left: 2px solid var(--line); margin-left: .3rem; }
.timeline > li::before { content: ""; position: absolute; left: -6px; top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.timeline > li.t-planned::before { background: var(--tw-orange); } .timeline > li.late::before { background: var(--err); } .timeline > li.t-cancelled { opacity: .6; }
.timeline .when { display: block; font-size: .85rem; color: var(--muted); }
.plainlist li { padding: .3rem 0; }
.scroll.flat { border: 0; margin: 0 0 1rem; }
.kpis { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; } .kpis > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; min-width: 150px; }
.kpis span { display: block; font-size: .85rem; color: var(--muted); } .kpis strong { font: 700 1.3rem var(--tw-font-heading); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.board .col { background: #e9ebf2; border-radius: 12px; padding: .75rem; min-height: 120px; border-top: 4px solid var(--tw-orange); } .board .col.o-won { border-top-color: var(--ok); } .board .col.o-lost { border-top-color: var(--err); }
.board h2 { font-size: 1rem; margin-bottom: .75rem; }
.card-o { display: block; background: #fff; border-radius: 8px; padding: .65rem .75rem; margin-bottom: .6rem; text-decoration: none; color: inherit; border: 1px solid var(--line); }
.card-o:hover { border-color: var(--tw-orange); } .card-o span { display: block; font-size: .9rem; } .card-o .amt { font-weight: 600; }
@media (max-width: 700px) {
  table.cards thead { display: none; } table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: .6rem .9rem; border-bottom: 1px solid var(--line); } table.cards td { border: 0; padding: .15rem 0; text-align: left; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; } table.cards td:first-child::before { content: none; }
  table.cards td:empty { display: none; }
}

/* v0.3 orders */
.pre { white-space: pre-line; }
.st-draft { color: var(--muted); } .st-offered { background: #fff3ea; border-color: #ffd2b3; color: #7a3a0c; } .st-confirmed { background: #e8eefc; border-color: #bccbef; color: #24408e; }
.st-fulfilled { background: #e9f6ee; border-color: #b6dcc4; color: var(--ok); } .st-declined, .st-cancelled { background: #fdecec; border-color: #f0c4c4; color: var(--err); }
table.lines td { vertical-align: top; } table.lines select, table.lines input, table.lines textarea { min-width: 0; } table.lines td:nth-child(2) { min-width: 260px; }
table.lines td:nth-child(3), table.lines td:nth-child(5), table.lines td:nth-child(6) { width: 7.5rem; } table.lines textarea { margin-top: .4rem; }
input.box { width: 22px; min-height: 22px; height: 22px; }
table.totals { width: auto; margin: .5rem 0 0 auto; min-width: min(360px, 100%); } table.totals th, table.totals td { border: 0; padding: .25rem .5rem; text-align: right; font-weight: 400; color: inherit; font-size: 1rem; }
table.totals tr.sum th, table.totals tr.sum td { font-weight: 700; border-top: 2px solid var(--tw-ink); }
.doc { background: var(--soft); } .docbar { display: flex; justify-content: space-between; align-items: center; max-width: 210mm; margin: 1rem auto; padding: 0 1rem; }
.paper { background: #fff; max-width: 210mm; margin: 0 auto 2rem; padding: 18mm 18mm 14mm; box-shadow: 0 2px 12px rgba(20,24,40,.12); font-size: 10.5pt; line-height: 1.45; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid var(--tw-orange); padding-bottom: 6mm; margin-bottom: 10mm; }
.doc-logo { flex: none; width: 45mm; height: auto; margin-top: -2mm; } .sender { text-align: left; font-size: 9pt; color: var(--muted); }
.doc-addr { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 10mm; } .recipient { margin: 0; min-width: 60mm; }
.meta { display: grid; grid-template-columns: auto auto; gap: .1rem 1rem; margin: 0; font-size: 9.5pt; } .meta dt { color: var(--muted); } .meta dd { margin: 0; }
.paper h1 { font-size: 16pt; margin-bottom: .25rem; } .doc-title { margin-top: 0; font-weight: 600; }
table.doc-lines { margin: 6mm 0 2mm; } table.doc-lines th, table.doc-lines td { padding: .35rem .4rem; font-size: 9.5pt; } table.doc-lines thead th { border-bottom: 2px solid var(--tw-ink); color: var(--tw-ink); }
.doc-foot { margin-top: 12mm; padding-top: 3mm; border-top: 1px solid var(--line); font-size: 8.5pt; color: var(--muted); text-align: center; }
@media print {
  @page { size: A4; margin: 0; }
  .noprint { display: none !important; } body.doc { background: #fff; } .paper { box-shadow: none; margin: 0; max-width: none; }
  table.doc-lines tr { break-inside: avoid; }
}

/* v0.4 projects and time */
.ps-active, .sh-approved { background: #e9f6ee; border-color: #b6dcc4; color: var(--ok); } .ps-planned, .sh-submitted { background: #e8eefc; border-color: #bccbef; color: #24408e; }
.ps-on_hold, .sh-open { background: #fff3ea; border-color: #ffd2b3; color: #7a3a0c; } .ps-completed { color: var(--muted); } .ps-cancelled, .sh-rejected { background: #fdecec; border-color: #f0c4c4; color: var(--err); }
progress.meter { appearance: none; -webkit-appearance: none; vertical-align: middle; width: 80px; height: 8px; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; margin-left: .3rem; color: var(--ok); }
progress.meter::-webkit-progress-bar { background: var(--line); } progress.meter::-webkit-progress-value { background: var(--ok); } progress.meter::-moz-progress-bar { background: var(--ok); }
progress.meter.near::-webkit-progress-value { background: var(--tw-orange); } progress.meter.near::-moz-progress-bar { background: var(--tw-orange); }
progress.meter.over::-webkit-progress-value { background: var(--err); } progress.meter.over::-moz-progress-bar { background: var(--err); }
.kpis .day { min-width: 84px; padding: .5rem .75rem; } .kpis .day.today { border-color: var(--tw-orange); border-width: 2px; } .kpis .day strong { font-size: 1.05rem; }
.weeknav { justify-content: flex-start; } .field.wide2 { grid-column: span 2; } @media (max-width: 560px) { .field.wide2 { grid-column: auto; } }
tr.sel td { background: #fff3ea; } .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; } h3 { font: 600 1rem var(--tw-font-heading); margin: 1rem 0 .5rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }

/* v0.5 invoices and Swiss QR-bill (SIX layout: receipt 62 mm, payment part 148 mm, height 105 mm) */
.iv-draft { color: var(--muted); } .iv-open, .iv-partial { background: #e8eefc; border-color: #bccbef; color: #24408e; } .iv-overdue { background: #fdecec; border-color: #f0c4c4; color: var(--err); }
.iv-paid { background: #e9f6ee; border-color: #b6dcc4; color: var(--ok); } .iv-cancelled { color: var(--muted); text-decoration: line-through; }
.timelog { margin-top: 10mm; } .timelog h2 { font-size: 12pt; }
.qr-page { max-width: 210mm; margin: 0 auto 2rem; background: #fff; box-shadow: 0 2px 12px rgba(20,24,40,.12); }
.qrbill { display: grid; grid-template-columns: 62mm 148mm; height: 105mm; font-family: Helvetica, Arial, "Liberation Sans", sans-serif; color: #000; border-top: 1px dashed #000; }
.qrbill h2 { font: 700 11pt Helvetica, Arial, sans-serif; margin: 0 0 5mm; } .qrbill h3 { font: 700 8pt Helvetica, Arial, sans-serif; margin: 0; } .qrbill p { margin: 0 0 3mm; font-size: 10pt; line-height: 1.25; }
.qr-receipt { padding: 5mm; border-right: 1px dashed #000; position: relative; } .qr-receipt h3 { font-size: 6pt; } .qr-receipt p { font-size: 8pt; }
.qr-accept { position: absolute; right: 5mm; bottom: 5mm; font: 700 6pt Helvetica, Arial, sans-serif !important; }
.qr-pay { display: grid; grid-template-columns: 56mm 1fr; padding: 5mm; } .qr-left .qr-code { display: block; margin: 0 0 5mm; }
.qr-amount { display: flex; gap: 5mm; } .qr-receipt .qr-amount { position: absolute; top: 72mm; left: 5mm; }
@media print {
  .qr-page { break-before: page; position: relative; height: 297mm; margin: 0; box-shadow: none; max-width: none; }
  .qrbill { position: absolute; bottom: 0; left: 0; width: 210mm; }
}

/* v0.6 menu groups, icons, profile card */
.icon { flex: none; display: block; width: 20px; height: 20px; }
.side { overflow-y: auto; } .side nav.wide { flex: 1 1 auto; }
.side nav a { display: flex; align-items: center; gap: .85rem; padding: .5rem .75rem; line-height: 1.3; } .side nav a .icon { opacity: .8; } .side nav a[aria-current] .icon { opacity: 1; color: var(--tw-orange); }
.nav-group { margin-bottom: .6rem; } .nav-group + .nav-group { padding-top: .6rem; border-top: 1px solid #2c3350; }
.nav-h { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #aab1c8; padding: .15rem .75rem .35rem; }
.me { display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.side a.me-card { display: flex; align-items: center; gap: .85rem; padding: .7rem .85rem; border: 1px solid #3a4262; border-radius: 12px; background: #1d2236; text-decoration: none; }
.side a.me-card:hover, .side a.me-card[aria-current] { border-color: var(--tw-orange); background: #262c42; }
.me-card > .icon { width: 22px; height: 22px; color: var(--tw-orange); }
.me-text { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.me-out { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 40px; padding: .45rem .75rem; font-size: .9rem; font-weight: 500; background: transparent; border: 1px solid #3a4262; color: #fff; }
button.me-out:hover { border-color: var(--tw-orange); background: #262c42; } button.me-out .icon { width: 18px; height: 18px; }
@media (max-width: 800px) {
  .side { overflow: visible; } .me { flex-direction: row; width: 100%; } .side a.me-card { flex: 1; } .me form { flex: none; } button.me-out { width: auto; height: 100%; }
  .menu nav { padding-top: .5rem; } .nav-group + .nav-group { border-top-color: #2c3350; }
}
.side .menu > summary { color: #fff; font-weight: 600; }

/* v0.7 logo placement */
.side > .logo { align-self: center; }
@media (max-width: 800px) { .side > .logo { align-self: auto; } }

/* v0.8 pager, contact selection */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin: 1rem 0; font-size: .9rem; }
.pager .pages { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.pager .pages a, .pager .pages span { min-width: 2.1rem; height: 2.1rem; display: inline-grid; place-items: center; padding: 0 .4rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; }
.pager .pages a:hover { background: var(--soft); }
.pager .pages .cur { background: var(--tw-navy); border-color: var(--tw-navy); color: #fff; font-weight: 600; }
.pager .pages .off { opacity: .35; } .pager .pages .gap { border: 0; min-width: 1rem; }
.pager .sizes a, .pager .sizes .cur { padding: 0 .2rem; } .pager .sizes .cur { font-weight: 700; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; padding: .6rem .8rem; margin-bottom: .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.bulkbar select { width: auto; max-width: 100%; } .bulkbar .sel { font-weight: 600; min-width: 8rem; }
[data-bulk]:not(.active) .bulkbar { opacity: .7; }
[data-bulk].active .bulkbar { border-color: var(--tw-orange); }
th.pick, td.pick { width: 2.2rem; text-align: center; padding-right: 0; } td.pick input, th.pick input { width: 1.15rem; height: 1.15rem; min-height: 0; margin: .1rem 0 0; padding: 0; vertical-align: middle; accent-color: var(--tw-navy); cursor: pointer; }
tr.picked td { background: #fff7ef; }
.tag.private { background: #f1ecfb; border-color: #d8cdf2; }
.nowrap { white-space: nowrap; }
