Files
business-card-scanner/static/style.css
Lucas Orth 811dba4e98
Some checks failed
Build & Deploy / deploy (push) Failing after 11m38s
Toten Code entfernen
Ungenutzte Hilfsfunktion, ungenutzter Konfigurationswert und drei
CSS-Regeln ohne Verwendung im Markup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 11:46:52 +02:00

365 lines
8.1 KiB
CSS

/* Schwarzweiss, harte Kanten, keine Rundungen. Mobile first. */
:root {
color-scheme: light;
--fg: #000;
--bg: #fff;
--muted: #6b6b6b;
--hair: #d5d5d5;
--wash: #f2f2f2;
--sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
--shell: 3px;
--pad: 18px;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--wash);
color: var(--fg);
font-family: var(--sans);
font-size: 15px;
line-height: 1.45;
-webkit-text-size-adjust: 100%;
}
body { overflow-x: hidden; }
button, input, textarea, select {
font: inherit;
color: inherit;
border-radius: 0;
-webkit-appearance: none;
appearance: none;
}
a { color: inherit; }
/* ------------------------------------------------------------------ Typografie */
.display {
font-weight: 800;
font-stretch: 85%;
letter-spacing: -0.02em;
text-transform: uppercase;
line-height: 0.95;
margin: 0;
}
.d-xl { font-size: 40px; }
.d-lg { font-size: 28px; }
.d-md { font-size: 20px; }
.label {
font-size: 10px;
font-weight: 700;
letter-spacing: 0.16em;
text-transform: uppercase;
margin: 0;
}
.muted { color: var(--muted); }
.mono-num { font-variant-numeric: tabular-nums; }
/* ---------------------------------------------------------------------- Gerüst */
.app {
max-width: 560px;
margin: 0 auto;
min-height: 100vh;
background: var(--bg);
border-left: 1px solid var(--fg);
border-right: 1px solid var(--fg);
display: flex;
flex-direction: column;
}
.topbar {
position: sticky;
top: 0;
z-index: 20;
display: flex;
align-items: center;
gap: 12px;
padding: 14px var(--pad);
background: var(--bg);
border-bottom: var(--shell) solid var(--fg);
}
.mark {
width: 34px;
height: 34px;
flex: 0 0 34px;
background: var(--fg);
display: grid;
place-items: center;
}
.mark svg { width: 20px; height: 20px; }
.wordmark { line-height: 1; }
.wordmark .d-md { display: block; }
.wordmark .label { color: var(--muted); margin-top: 3px; }
.topbar .spacer { margin-left: auto; }
main { flex: 1; display: flex; flex-direction: column; }
.screen { flex: 1; padding: var(--pad) var(--pad) 28px; }
.screen[hidden] { display: none; }
.stack > * + * { margin-top: 14px; }
.stack-tight > * + * { margin-top: 8px; }
/* ---------------------------------------------------------------------- Blöcke */
.block {
border: var(--shell) solid var(--fg);
padding: 16px;
}
.block-invert {
background: var(--fg);
color: var(--bg);
border: var(--shell) solid var(--fg);
padding: 16px;
}
.block-invert .muted { color: #b4b4b4; }
.strip {
border: var(--shell) solid var(--fg);
border-top: none;
padding: 12px 16px;
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.section-label {
display: flex;
align-items: center;
gap: 10px;
margin: 26px 0 10px;
}
.section-label::after {
content: "";
flex: 1;
height: 1px;
background: var(--fg);
}
.figures {
display: flex;
gap: 30px;
margin-top: 18px;
}
.figure { display: flex; flex-direction: column; }
.figure .label { color: inherit; opacity: 0.7; margin-bottom: 5px; }
/* --------------------------------------------------------------------- Buttons */
.btn {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
width: 100%;
padding: 16px;
background: var(--bg);
border: var(--shell) solid var(--fg);
font-weight: 800;
font-size: 14px;
letter-spacing: 0.06em;
text-transform: uppercase;
text-decoration: none;
cursor: pointer;
text-align: left;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn .arrow { font-weight: 400; font-size: 17px; }
.btn-danger { border-color: var(--fg); color: var(--fg); }
/* --------------------------------------------------------------------- Formular */
.field { display: block; }
.field .label { color: var(--muted); margin-bottom: 5px; }
.field input,
.field textarea,
.field select {
width: 100%;
padding: 11px 12px;
background: var(--bg);
border: 2px solid var(--fg);
}
.field input:focus,
.field textarea:focus,
.field select:focus { outline: 3px solid var(--fg); outline-offset: 1px; }
.field textarea { min-height: 90px; resize: vertical; }
.search {
display: flex;
border: var(--shell) solid var(--fg);
}
.search input { flex: 1; border: none; padding: 14px; background: var(--bg); }
.search input:focus { outline: none; }
.search button {
border: none;
border-left: 2px solid var(--fg);
background: var(--bg);
padding: 0 16px;
cursor: pointer;
font-weight: 800;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
padding: 7px 11px;
border: 2px solid var(--fg);
background: var(--bg);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
/* --------------------------------------------------------------------- Tabellen */
.rows { border-top: 1px solid var(--fg); }
.row {
display: block;
width: 100%;
text-align: left;
background: var(--bg);
border: none;
border-bottom: 1px solid var(--hair);
padding: 14px 0;
cursor: pointer;
}
.row:last-child { border-bottom: 1px solid var(--fg); }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row-title { font-weight: 800; font-size: 16px; }
.row-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-meta { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { padding: 11px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.data th { width: 38%; font-weight: 400; color: var(--muted); font-size: 13px; }
.data td { font-weight: 600; word-break: break-word; }
.data tr:last-child th, .data tr:last-child td { border-bottom: none; }
/* ----------------------------------------------------------------------- Bilder */
.card-image {
display: block;
width: 100%;
border: var(--shell) solid var(--fg);
background: var(--wash);
}
/* -------------------------------------------------------------------- Navigation */
.tabs {
position: sticky;
bottom: 0;
z-index: 20;
display: flex;
background: var(--bg);
border-top: var(--shell) solid var(--fg);
}
.tab {
flex: 1;
padding: 14px 4px calc(14px + env(safe-area-inset-bottom));
background: var(--bg);
border: none;
border-left: 1px solid var(--fg);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
cursor: pointer;
}
.tab:first-child { border-left: none; }
.tab[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.tab .count { display: block; font-size: 16px; font-weight: 800; margin-bottom: 2px; }
/* ------------------------------------------------------------------- Zustände */
.empty { border: 2px dashed var(--fg); padding: 28px 18px; text-align: center; }
.badge {
display: inline-block;
padding: 3px 7px;
border: 2px solid var(--fg);
font-size: 9px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.overlay {
position: fixed;
inset: 0;
z-index: 60;
background: rgba(0, 0, 0, 0.82);
display: grid;
place-items: center;
padding: var(--pad);
}
.overlay[hidden] { display: none; }
.overlay .block { background: var(--bg); width: 100%; max-width: 380px; }
.spinner {
width: 26px;
height: 26px;
border: 3px solid var(--bg);
border-top-color: transparent;
animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
position: fixed;
left: 50%;
bottom: 96px;
transform: translateX(-50%);
z-index: 70;
max-width: 90vw;
padding: 12px 16px;
background: var(--fg);
color: var(--bg);
font-size: 13px;
font-weight: 600;
}
.toast[hidden] { display: none; }
.hint { font-size: 12px; color: var(--muted); }
@media (min-width: 600px) {
:root { --pad: 24px; }
.app { border: 1px solid var(--fg); margin: 24px auto; min-height: calc(100vh - 48px); }
.d-xl { font-size: 48px; }
}