diff --git a/static/app.css b/static/app.css index 60003fb..f33e8d4 100644 --- a/static/app.css +++ b/static/app.css @@ -1,129 +1,268 @@ -/* zeitkort-web — deliberately plain. Light + dark (follows the browser). */ +/* zeitkort-web — styled to match fló.fo. Light + tokyo (dark), follows system. */ -:root { - color-scheme: light dark; - --bg: #fff; - --fg: #000; - --muted: #777; - --border: #999; - --border-soft: #ccc; - --dotted: #ccc; - --field-bg: #fff; - --field-border: #888; - --btn-bg: #eee; - --btn-bg-hover: #ddd; - --btn-border: #555; - --header-border: #000; - --th-bg: #f0f0f0; - --row-active: #ffd; - --link: #003; - --accent-bg: #e3ecff; - --accent-border: #357; - --notice-fg: #060; --notice-bg: #efe; --notice-border: #060; - --error-fg: #a00; --error-bg: #fee; --error-border: #a00; - --go-bg: #e7f5e7; --go-border: #2a8a2a; --go-bg-hover: #d6eed6; - --stop-bg: #fbe4e4; --stop-border: #a00; --stop-bg-hover: #f6d2d2; - --card-bg: #fff; --card-border: #a00; - --danger-btn-bg: #fee; --danger-btn-bg-hover: #fdd; - --backdrop: rgba(0, 0, 0, .35); - --shadow: rgba(0, 0, 0, .4); +*, *::before, *::after { box-sizing: border-box; } + +:root, +[data-theme="light"] { + --bg: #f4f1ec; + --fg: #1a1d22; + --muted: #595f68; + --dim: #9299a2; + --border: rgba(26, 29, 34, 0.12); + --border-soft: rgba(26, 29, 34, 0.06); + --dotted: rgba(26, 29, 34, 0.12); + --field-bg: rgba(26, 29, 34, 0.03); + --field-border: rgba(26, 29, 34, 0.18); + --btn-bg: rgba(26, 29, 34, 0.05); + --btn-bg-hover: rgba(26, 29, 34, 0.09); + --btn-border: rgba(26, 29, 34, 0.18); + --header-border: rgba(26, 29, 34, 0.12); + --th-bg: rgba(26, 29, 34, 0.04); + --row-active: rgba(44, 90, 122, 0.06); + --link: #2c5a7a; + --accent: #2c5a7a; + --accent-bg: rgba(44, 90, 122, 0.07); + --accent-border: #2c5a7a; + --nav-bg: rgba(244, 241, 236, 0.6); + --bg-panel: rgba(255, 253, 250, 0.72); + + --notice-fg: #2a6e2a; --notice-bg: rgba(42, 110, 42, 0.06); --notice-border: rgba(42, 110, 42, 0.25); + --error-fg: #a03030; --error-bg: rgba(160, 48, 48, 0.06); --error-border: rgba(160, 48, 48, 0.25); + --go-bg: rgba(42, 110, 42, 0.06); --go-border: rgba(42, 110, 42, 0.3); --go-bg-hover: rgba(42, 110, 42, 0.1); + --stop-bg: rgba(160, 48, 48, 0.06); --stop-border: rgba(160, 48, 48, 0.3); --stop-bg-hover: rgba(160, 48, 48, 0.1); + --card-bg: #fff; --card-border: rgba(160, 48, 48, 0.3); + --danger-btn-bg: rgba(160, 48, 48, 0.06); --danger-btn-bg-hover: rgba(160, 48, 48, 0.12); + --backdrop: rgba(0, 0, 0, 0.3); + --shadow: rgba(0, 0, 0, 0.12); + + /* Theme toggle pill */ + --toggle-bg: linear-gradient(135deg, #07070d 0%, #64dcff 100%); + --toggle-border: rgba(26, 29, 34, 0.2); + --toggle-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); } -@media (prefers-color-scheme: dark) { - :root { - --bg: #1d1f21; - --fg: #e6e6e6; - --muted: #9aa0a6; - --border: #555; - --border-soft: #3a3d40; - --dotted: #3a3d40; - --field-bg: #2a2d30; - --field-border: #5a5e62; - --btn-bg: #34383c; - --btn-bg-hover: #3f4348; - --btn-border: #6a6e72; - --header-border: #6a6e72; - --th-bg: #2a2d30; - --row-active: #3a3a20; - --link: #9bbcff; - --accent-bg: #21344f; - --accent-border: #5a86c0; - --notice-fg: #8fe08f; --notice-bg: #142a14; --notice-border: #3f7a3f; - --error-fg: #ff9b9b; --error-bg: #3a1616; --error-border: #a85050; - --go-bg: #1f3a1f; --go-border: #4caf4c; --go-bg-hover: #264826; - --stop-bg: #3a1a1a; --stop-border: #cc5555; --stop-bg-hover: #4a2222; - --card-bg: #26292c; --card-border: #cc5555; - --danger-btn-bg: #3a1a1a; --danger-btn-bg-hover: #4a2222; - --backdrop: rgba(0, 0, 0, .6); - --shadow: rgba(0, 0, 0, .75); - } +[data-theme="tokyo"] { + --bg: #07070d; + --fg: #e8f4ff; + --muted: #a3b3cc; + --dim: #7886a0; + --border: rgba(100, 220, 255, 0.12); + --border-soft: rgba(100, 220, 255, 0.06); + --dotted: rgba(100, 220, 255, 0.1); + --field-bg: rgba(100, 220, 255, 0.04); + --field-border: rgba(100, 220, 255, 0.15); + --btn-bg: rgba(100, 220, 255, 0.06); + --btn-bg-hover: rgba(100, 220, 255, 0.1); + --btn-border: rgba(100, 220, 255, 0.18); + --header-border: rgba(100, 220, 255, 0.12); + --th-bg: rgba(100, 220, 255, 0.04); + --row-active: rgba(100, 220, 255, 0.06); + --link: #64dcff; + --accent: #64dcff; + --accent-bg: rgba(100, 220, 255, 0.06); + --accent-border: #64dcff; + --nav-bg: rgba(7, 7, 13, 0.65); + --bg-panel: rgba(15, 16, 28, 0.72); + + --notice-fg: #8fe08f; --notice-bg: rgba(143, 224, 143, 0.06); --notice-border: rgba(143, 224, 143, 0.25); + --error-fg: #ff9b9b; --error-bg: rgba(255, 155, 155, 0.06); --error-border: rgba(255, 155, 155, 0.2); + --go-bg: rgba(80, 200, 80, 0.08); --go-border: rgba(80, 200, 80, 0.3); --go-bg-hover: rgba(80, 200, 80, 0.14); + --stop-bg: rgba(200, 80, 80, 0.08); --stop-border: rgba(200, 80, 80, 0.3); --stop-bg-hover: rgba(200, 80, 80, 0.14); + --card-bg: #0f1018; --card-border: rgba(200, 80, 80, 0.4); + --danger-btn-bg: rgba(200, 80, 80, 0.1); --danger-btn-bg-hover: rgba(200, 80, 80, 0.18); + --backdrop: rgba(0, 0, 0, 0.55); + --shadow: rgba(0, 0, 0, 0.5); + + --toggle-bg: #f4f1ec; + --toggle-border: rgba(100, 220, 255, 0.4); + --toggle-shadow: 0 0 10px rgba(100, 220, 255, 0.5), 0 0 25px rgba(100, 220, 255, 0.3); } -* { box-sizing: border-box; } html, body { max-width: 100%; overflow-x: hidden; } body { - font-family: -apple-system, Helvetica, Arial, sans-serif; - font-size: 15px; - line-height: 1.4; + font-family: 'JetBrains Mono', monospace; + font-size: 0.88rem; + font-weight: 300; + line-height: 1.55; color: var(--fg); background: var(--bg); margin: 0; padding: 0; + display: flex; + flex-direction: column; + min-height: 100vh; + transition: background 0.3s ease, color 0.3s ease; } -/* Long, unbreakable names must never widen the page on mobile. */ -main { overflow-wrap: break-word; padding: 16px; max-width: 1040px; margin: 0 auto; } +main { overflow-wrap: break-word; padding: 16px; max-width: 1040px; margin: 0 auto; width: 100%; flex: 1; } input, select, textarea { max-width: 100%; } .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } +/* ---- Header / nav ---- */ header { - border-bottom: 2px solid var(--header-border); - padding: 8px 16px; + border-bottom: 1px solid var(--header-border); + padding: 1rem 1.5rem; display: flex; - align-items: baseline; - gap: 20px; + align-items: center; + gap: 1.2rem; + background: var(--nav-bg); + backdrop-filter: blur(12px) saturate(120%); + -webkit-backdrop-filter: blur(12px) saturate(120%); + position: sticky; + top: 0; + z-index: 20; + transition: background 0.3s ease; } -.brand { font-weight: bold; font-size: 18px; } -nav a { margin-right: 14px; text-decoration: none; color: var(--link); } -nav a:hover { text-decoration: underline; } -footer { padding: 12px 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border-soft); margin-top: 24px; } -h2 { margin: 0 0 12px; } +.back-link { + font-family: 'JetBrains Mono', monospace; + font-weight: 400; + font-size: 0.7rem; + letter-spacing: 0.15em; + text-transform: uppercase; + white-space: nowrap; + color: var(--muted); + text-decoration: none; + padding: 0.35rem 0.6rem; + border: 1px solid var(--border); + border-radius: 2px; + transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease; +} +.back-link:hover { + color: var(--fg); + border-color: var(--muted); + background: var(--bg-panel); +} -fieldset { border: 1px solid var(--border); margin: 0 0 14px; padding: 10px 12px; min-width: 0; } -legend { font-weight: bold; padding: 0 4px; } +.brand { + font-weight: 700; + font-size: 1rem; + letter-spacing: -0.02em; + color: var(--fg); + text-decoration: none; + display: inline-flex; + align-items: baseline; + gap: 0.35rem; + white-space: nowrap; +} +.brand:hover { color: var(--accent); } + +.brand-sep { + font-weight: 300; + color: var(--dim); +} +.brand-sub { + font-weight: 400; + font-size: 0.78rem; + letter-spacing: 0.18em; + text-transform: uppercase; + color: var(--muted); +} + +[data-theme="tokyo"] .brand { + color: #e8f4ff; + text-shadow: 0 0 8px rgba(100, 220, 255, 0.3); +} + +nav a { + margin-right: 0.9rem; + text-decoration: none; + color: var(--muted); + font-size: 0.72rem; + font-weight: 400; + letter-spacing: 0.15em; + text-transform: uppercase; + padding: 0.35rem 0; + border-bottom: 1px solid transparent; + transition: color 0.2s ease, border-color 0.2s ease; +} +nav a:hover { color: var(--fg); border-bottom-color: transparent; } + +footer { + padding: 0.9rem 1.5rem; + color: var(--muted); + font-size: 0.68rem; + letter-spacing: 0.05em; + border-top: 1px solid var(--border-soft); + background: var(--nav-bg); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); +} + +h2 { + margin: 0 0 0.9rem; + font-family: 'JetBrains Mono', monospace; + font-weight: 700; + font-size: 1.1rem; + letter-spacing: -0.02em; +} + +[data-theme="tokyo"] h2 { + text-shadow: 0 0 10px rgba(100, 220, 255, 0.2); +} + +/* ---- Forms ---- */ +fieldset { + border: 1px solid var(--border); + margin: 0 0 14px; + padding: 10px 12px; + min-width: 0; + border-radius: 3px; + background: var(--field-bg); + transition: border-color 0.3s ease, background 0.3s ease; +} +legend { + font-weight: 500; + padding: 0 6px; + font-size: 0.78rem; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--muted); +} select, input[type=text], input[type=number], input:not([type]), textarea { font: inherit; - padding: 3px 5px; + font-size: 0.85rem; + padding: 0.35rem 0.55rem; border: 1px solid var(--field-border); + border-radius: 3px; background: var(--field-bg); color: var(--fg); + transition: border-color 0.2s; + outline: none; +} +select:focus, input[type=text]:focus, input[type=number]:focus, input:not([type]):focus, textarea:focus { + border-color: var(--accent); } textarea { width: 100%; max-width: 460px; } -label { display: inline-block; } +label { display: inline-block; font-size: 0.85rem; } button { font: inherit; - padding: 3px 10px; + font-size: 0.82rem; + font-weight: 500; + padding: 0.3rem 0.7rem; border: 1px solid var(--btn-border); + border-radius: 3px; background: var(--btn-bg); color: var(--fg); cursor: pointer; + letter-spacing: 0.02em; + transition: background 0.15s, border-color 0.15s; } button:hover { background: var(--btn-bg-hover); } -.muted { color: var(--muted); font-size: 13px; } -.error { color: var(--error-fg); border: 1px solid var(--error-border); padding: 6px 10px; background: var(--error-bg); } -.notice { color: var(--notice-fg); border: 1px solid var(--notice-border); padding: 6px 10px; background: var(--notice-bg); } +.muted { color: var(--muted); font-size: 0.78rem; } +.error { color: var(--error-fg); border: 1px solid var(--error-border); padding: 6px 10px; background: var(--error-bg); border-radius: 3px; } +.notice { color: var(--notice-fg); border: 1px solid var(--notice-border); padding: 6px 10px; background: var(--notice-bg); border-radius: 3px; } .columns { display: flex; gap: 16px; flex-wrap: wrap; } .col { flex: 1 1 340px; min-width: 0; } -.task { padding: 4px 0; border-bottom: 1px dotted var(--dotted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } +.task { padding: 5px 0; border-bottom: 1px dotted var(--dotted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .task .pick { flex: 1 1 140px; min-width: 0; } -button.go { font-weight: bold; min-width: 84px; } +button.go { font-weight: 700; min-width: 84px; letter-spacing: 0.04em; } button.go:not(.stop):not([disabled]) { background: var(--go-bg); border-color: var(--go-border); } button.go:not(.stop):not([disabled]):hover { background: var(--go-bg-hover); } button.go.stop { background: var(--stop-bg); border-color: var(--stop-border); } @@ -134,21 +273,24 @@ button.go[disabled] { opacity: .45; cursor: not-allowed; } fieldset > .inline { margin-top: 10px; } .add-toggle { margin-top: 10px; } -.clock { font-family: monospace; font-size: 26px; font-weight: bold; margin: 0; } +.clock { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; } /* Sticky bar shown only while a timer runs. */ .running-bar { position: sticky; - top: 0; - z-index: 50; + top: 52px; /* below the header */ + z-index: 15; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--go-bg); border: 1px solid var(--go-border); + border-radius: 3px; padding: 8px 12px; margin: 0 0 14px; + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); } .rb-task { flex: 1 1 auto; } .running-bar .go { margin-left: auto; } @@ -157,33 +299,39 @@ fieldset > .inline { margin-top: 10px; } display: inline-block; min-width: 84px; text-align: center; - font-weight: bold; + font-weight: 700; padding: 4px 10px; border: 1px solid var(--go-border); + border-radius: 3px; background: var(--go-bg); color: var(--fg); + font-size: 0.78rem; + letter-spacing: 0.04em; } +/* ---- Tables ---- */ table { border-collapse: collapse; width: 100%; } -th, td { border: 1px solid var(--border-soft); padding: 3px 6px; text-align: left; font-size: 13px; vertical-align: top; } -th { background: var(--th-bg); } +th, td { border: 1px solid var(--border-soft); padding: 0.3rem 0.5rem; text-align: left; font-size: 0.78rem; vertical-align: top; } +th { background: var(--th-bg); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem; color: var(--muted); } tr.active { background: var(--row-active); } .row-actions { white-space: nowrap; } -.row-actions button { padding: 1px 6px; font-size: 12px; } +.row-actions button { padding: 1px 6px; font-size: 0.72rem; } .line { display: flex; gap: 6px; margin: 4px 0; flex-wrap: wrap; } .line input { width: 110px; } .line input[name=extra_desc] { width: 220px; } -/* Two-tap delete confirm — a centered card, always fully on-screen (mobile-safe). - No native dialog and no JS, so it works in Brave/Chrome/Safari alike. */ +/* ---- Two-tap delete confirm ---- */ details.confirm { display: inline-block; } details.confirm > summary { list-style: none; cursor: pointer; font: inherit; - padding: 3px 10px; + font-size: 0.82rem; + font-weight: 500; + padding: 0.3rem 0.7rem; border: 1px solid var(--btn-border); + border-radius: 3px; background: var(--btn-bg); color: var(--fg); display: inline-block; @@ -193,7 +341,6 @@ details.confirm > summary::marker { content: ""; } details.confirm > summary:hover { background: var(--btn-bg-hover); } details.confirm[open] > summary { background: var(--stop-bg); border-color: var(--stop-border); } -/* Dim the page behind the open confirm card. */ details.confirm[open]::before { content: ""; position: fixed; @@ -209,71 +356,113 @@ details.confirm[open]::before { transform: translate(-50%, -50%); z-index: 1000; width: min(360px, 92vw); - padding: 16px 18px; + padding: 1.2rem 1.4rem; border: 1px solid var(--card-border); + border-radius: 3px; background: var(--card-bg); color: var(--fg); white-space: normal; - box-shadow: 0 6px 30px var(--shadow); - font-size: 14px; - line-height: 1.45; + box-shadow: 0 8px 30px var(--shadow); + font-size: 0.85rem; + line-height: 1.55; text-align: left; } .confirm-pop button { margin-top: 12px; margin-right: 6px; } .confirm-pop button:not(.cancel) { border-color: var(--stop-border); background: var(--danger-btn-bg); } .confirm-pop button:not(.cancel):hover { background: var(--danger-btn-bg-hover); } -.row-actions details.confirm > summary { padding: 1px 6px; font-size: 12px; } +.row-actions details.confirm > summary { padding: 1px 6px; font-size: 0.72rem; } -/* Very visible countdown for the proof-of-concept reset. */ +/* ---- POC reset banner ---- */ .reset-banner { position: sticky; - top: 0; - z-index: 80; + top: 52px; + z-index: 18; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; - padding: 10px 16px; - border-bottom: 3px solid var(--error-border); + padding: 8px 16px; + border-bottom: 1px solid var(--error-border); background: var(--error-bg); color: var(--error-fg); text-align: center; + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); } .reset-label { - font-weight: bold; + font-weight: 500; text-transform: uppercase; - letter-spacing: .04em; + letter-spacing: 0.12em; + font-size: 0.72rem; } .reset-countdown { - font-family: monospace; - font-size: clamp(34px, 8vw, 64px); - font-weight: 900; + font-family: 'JetBrains Mono', monospace; + font-size: clamp(1.5rem, 6vw, 2.5rem); + font-weight: 700; line-height: 1; padding: 2px 10px; - border: 2px solid currentColor; + border: 1px solid currentColor; + border-radius: 3px; background: var(--bg); } .reset-note { flex-basis: 100%; - font-size: 13px; - font-weight: bold; + font-size: 0.72rem; + font-weight: 500; + letter-spacing: 0.04em; } .reset-imminent .reset-banner { - outline: 4px solid var(--error-border); - outline-offset: -4px; + outline: 2px solid var(--error-border); + outline-offset: -2px; } .about-card { max-width: 760px; border: 1px solid var(--border); + border-radius: 3px; background: var(--field-bg); - padding: 12px 14px; + padding: 1.2rem 1.4rem; + line-height: 1.75; } +.about-card p { margin-bottom: 0.6rem; } + .poc-warning { border: 1px solid var(--error-border); + border-radius: 3px; background: var(--error-bg); color: var(--error-fg); padding: 8px 10px; + margin-top: 0.8rem; +} + +/* ---- Theme toggle ---- */ +.theme-toggle { + position: fixed; + bottom: 1.5rem; + right: 1.5rem; + width: 28px; + height: 28px; + border-radius: 50%; + border: 1px solid var(--toggle-border); + cursor: pointer; + padding: 0; + z-index: 30; + transition: all 0.3s ease; + box-shadow: var(--toggle-shadow); + background: var(--toggle-bg); +} +.theme-toggle:hover { transform: scale(1.08); } + +@media (max-width: 640px) { + header { padding: 0.7rem 0.9rem; gap: 0.6rem; } + .back-link { font-size: 0.58rem; padding: 0.25rem 0.4rem; letter-spacing: 0.08em; } + .brand { font-size: 0.9rem; } + nav a { font-size: 0.62rem; margin-right: 0.6rem; letter-spacing: 0.08em; } + footer { font-size: 0.62rem; padding: 0.7rem 0.9rem; } + main { padding: 12px; } + .theme-toggle { width: 20px; height: 20px; bottom: 1rem; right: 0.9rem; } + .reset-banner { top: 44px; } + .running-bar { top: 44px; } } diff --git a/templates/page.html b/templates/page.html index 00119dc..2785635 100644 --- a/templates/page.html +++ b/templates/page.html @@ -3,12 +3,25 @@
-