From 7dad6e054dfa3f7bca8e6d7d66706079f57d23e4 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Sat, 14 Nov 2026 16:15:15 +0000 Subject: [PATCH] Add static/style.css with the layout, sheet, form and print styles --- static/style.css | 447 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100644 static/style.css diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..82d19e6 --- /dev/null +++ b/static/style.css @@ -0,0 +1,447 @@ +/* Skuld — one stylesheet, no external fonts and no CDNs. + * + * Class contract used by the pages (steps 18-26): + * .topbar .nav .nav a[aria-current] navigation + * .page .page-title .card .card-title page shell + * .sheet .numeric .totals .tot-row .gap the main sheet table + * .legend .toolbar .filters .year table helpers + * .field .field label .field input/select the forms + * .error .hint inline messages + * .lots .lot-row the lot picker + * .button .button-secondary .button-danger .button-row + * .message .message-error page level messages + * .login-card the login page + * .report-table .skattemelding .figure the report page + * .no-print hidden when printing + */ + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + -webkit-text-size-adjust: 100%; +} + +body { + margin: 0; + background: #f5f5f2; + color: #1d1d1b; + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-size: 16px; + line-height: 1.45; +} + +a { + color: #0b4f9e; +} + +h1, +h2, +h3 { + line-height: 1.2; + margin: 0 0 0.6rem; +} + +h1 { + font-size: 1.5rem; +} + +h2 { + font-size: 1.15rem; +} + +/* Navigation */ + +.topbar { + background: #1d1d1b; + color: #f5f5f2; +} + +.nav { + display: flex; + flex-wrap: wrap; + gap: 0.25rem; + margin: 0 auto; + max-width: 72rem; + padding: 0.4rem 1rem; +} + +.nav a { + border-radius: 4px; + color: #f5f5f2; + padding: 0.35rem 0.7rem; + text-decoration: none; +} + +.nav a:hover { + background: #3a3a37; +} + +.nav a[aria-current="page"] { + background: #f5f5f2; + color: #1d1d1b; +} + +.nav .spacer { + flex: 1; +} + +/* Page shell */ + +.page { + margin: 0 auto; + max-width: 72rem; + padding: 1.25rem 1rem 3rem; +} + +.page-title { + margin-bottom: 1rem; +} + +.card { + background: #fff; + border: 1px solid #dcdcd6; + border-radius: 6px; + margin-bottom: 1.25rem; + padding: 1rem; +} + +.card-title { + margin-bottom: 0.75rem; +} + +.muted { + color: #5c5c57; +} + +.empty { + color: #5c5c57; + padding: 1rem 0; +} + +/* Tables */ + +table { + border-collapse: collapse; + width: 100%; +} + +th, +td { + border-bottom: 1px solid #e6e6e0; + padding: 0.4rem 0.5rem; + text-align: left; + vertical-align: top; +} + +th { + border-bottom: 2px solid #c9c9c2; + font-size: 0.85rem; + letter-spacing: 0.02em; + text-transform: uppercase; +} + +.numeric { + font-variant-numeric: tabular-nums; + text-align: right; + white-space: nowrap; +} + +.sheet { + font-variant-numeric: tabular-nums; +} + +.sheet .totals td { + font-weight: 600; +} + +.sheet .gap td { + border: 0; + height: 0.6rem; +} + +.sheet .tot-row td { + color: #5c5c57; + font-style: italic; +} + +.legend { + color: #5c5c57; + font-size: 0.85rem; + margin-top: 0.6rem; +} + +/* Toolbars and filters */ + +.toolbar { + align-items: flex-end; + display: flex; + flex-wrap: wrap; + gap: 0.6rem; + margin-bottom: 1rem; +} + +.filters { + align-items: flex-end; + display: flex; + flex-wrap: wrap; + gap: 0.6rem; +} + +.toolbar .spacer { + flex: 1; +} + +/* Forms */ + +.field { + display: flex; + flex-direction: column; + gap: 0.2rem; + margin-bottom: 0.85rem; + max-width: 26rem; +} + +.field label { + font-size: 0.9rem; + font-weight: 600; +} + +input[type="text"], +input[type="date"], +input[type="number"], +input[type="password"], +select, +textarea { + background: #fff; + border: 1px solid #b9b9b2; + border-radius: 4px; + color: inherit; + font: inherit; + padding: 0.35rem 0.5rem; + width: 100%; +} + +input:focus, +select:focus, +textarea:focus { + border-color: #0b4f9e; + outline: 2px solid #cfe0f5; +} + +.field.invalid input, +.field.invalid select { + border-color: #b3261e; +} + +.field-row { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; +} + +.field-row .field { + margin-bottom: 0.85rem; +} + +.field-amount { + max-width: 9rem; +} + +.field-currency { + max-width: 8rem; +} + +.checkbox { + align-items: center; + display: flex; + gap: 0.45rem; +} + +.checkbox input { + height: 1.1rem; + margin: 0; + width: 1.1rem; +} + +.hint { + color: #5c5c57; + font-size: 0.85rem; +} + +.error { + color: #b3261e; + font-size: 0.85rem; +} + +.error:empty { + display: none; +} + +fieldset { + border: 1px solid #dcdcd6; + border-radius: 6px; + margin: 0 0 1rem; + padding: 0.85rem 1rem; +} + +legend { + font-weight: 600; + padding: 0 0.35rem; +} + +/* Lot picker */ + +.lots { + max-width: 100%; +} + +.lot-row .lot-amount { + max-width: 9rem; +} + +.lot-picked { + background: #f0f6fd; +} + +/* Buttons */ + +.button { + background: #0b4f9e; + border: 1px solid #0b4f9e; + border-radius: 4px; + color: #fff; + cursor: pointer; + font: inherit; + padding: 0.4rem 0.9rem; + text-decoration: none; +} + +.button:hover { + background: #0a4489; +} + +.button-secondary { + background: #fff; + border-color: #b9b9b2; + color: #1d1d1b; +} + +.button-secondary:hover { + background: #eeeeea; +} + +.button-danger { + background: #fff; + border-color: #b3261e; + color: #b3261e; +} + +.button-danger:hover { + background: #fbeceb; +} + +.button-row { + display: flex; + flex-wrap: wrap; + gap: 0.6rem; + margin-top: 0.5rem; +} + +/* Messages */ + +.message { + border-radius: 4px; + margin-bottom: 1rem; + padding: 0.6rem 0.8rem; +} + +.message-error { + background: #fbeceb; + border: 1px solid #b3261e; + color: #7a1a15; +} + +.message-ok { + background: #eaf6ec; + border: 1px solid #2f7d3a; + color: #1f5528; +} + +/* Login */ + +.login-card { + margin: 3rem auto 0; + max-width: 26rem; +} + +/* Report */ + +.report-table td:first-child { + font-weight: 600; +} + +.skattemelding { + display: flex; + flex-wrap: wrap; + gap: 1.5rem; +} + +.figure { + min-width: 9rem; +} + +.figure .figure-label { + color: #5c5c57; + font-size: 0.85rem; +} + +.figure .figure-value { + font-size: 1.2rem; + font-variant-numeric: tabular-nums; +} + +/* Print: the report only, without chrome */ + +@media print { + body { + background: #fff; + color: #000; + font-size: 11pt; + } + + .topbar, + .toolbar, + .button-row, + .no-print, + .message { + display: none !important; + } + + .page { + max-width: none; + padding: 0; + } + + .card { + border: 0; + margin: 0 0 0.8rem; + padding: 0; + } + + table { + page-break-inside: avoid; + } + + th { + border-bottom: 1px solid #000; + } + + a { + color: #000; + text-decoration: none; + } +}