baustelle-pwa/app.css
Eduard Wisch 02ffdca57c
All checks were successful
Deploy baustelle-pwa / deploy (push) Successful in 1s
feat: Phase 4 Block 1 — Seite bearbeiten, PDF-Vorschau, Unterschrift, Share Target
Bericht-Detail-Ansicht:
- Tap auf Seiten-Thumb → openPageActionsModal mit:
  - Vorschaubild
  - Textarea für Seiten-Notiz (wird im PDF unter der Seite gedruckt)
  - '💾 Notiz speichern' → api.updatePageNote
  - 🗑️ im Header → api.deletePage mit Confirm
- Seiten-Thumbs haben Nummer-Badge oben links (1, 2, 3…)
- Neuer '👁 PDF-Vorschau'-Button öffnet openPdfModal (iframe mit
  Blob-URL) für Final-PDF oder on-the-fly Preview
- Neuer '✍️ Kunden-Unterschrift hinzufügen'-Button öffnet
  openSignatureModal: Touch-Canvas 2:1, Clear, Save → PNG wird als
  neue Bericht-Seite mit note='Unterschrift Kunde' angelegt

Web Share Target API:
- manifest.webmanifest: share_target mit photos array
- share.html: empfängt geteilte Fotos aus IDB (vom SW befüllt),
  zeigt Auftragsliste, Tap → Upload aller Fotos
- Service Worker v5: fängt POST /share.html ab, schreibt Files in
  IDB Key 'shared_files', redirected 303

Cache-Version bumpt damit neue Files geladen werden.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[deploy]
2026-04-09 01:00:24 +02:00

552 lines
11 KiB
CSS

/* Baustelle PWA — Mobile-first CSS */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #1a1a1f;
color: #f0f0f0;
-webkit-font-smoothing: antialiased;
overscroll-behavior-y: contain;
}
#app {
display: flex;
flex-direction: column;
min-height: 100vh;
min-height: 100dvh;
}
#topbar {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 16px;
background: #25252b;
border-bottom: 1px solid #333;
position: sticky;
top: 0;
z-index: 10;
}
#topbar h1 {
flex: 1;
margin: 0;
font-size: 17px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon-btn {
background: transparent;
border: none;
color: #f0f0f0;
font-size: 22px;
padding: 4px 8px;
cursor: pointer;
-webkit-appearance: none;
}
#status-badge { font-size: 14px; }
#main {
flex: 1;
padding: 16px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
#bottom-nav {
display: flex;
background: #25252b;
border-top: 1px solid #333;
padding-bottom: env(safe-area-inset-bottom);
}
#bottom-nav button {
flex: 1;
background: transparent;
border: none;
color: #888;
padding: 14px 8px;
font-size: 12px;
cursor: pointer;
}
#bottom-nav button.active { color: #7aa2f7; }
/* ----- Login ----- */
.login-form {
max-width: 360px;
margin: 60px auto 0;
text-align: center;
}
.login-form h2 { margin: 0 0 24px; font-weight: 600; }
.login-form input {
display: block;
width: 100%;
padding: 16px;
margin-bottom: 12px;
border-radius: 8px;
border: 1px solid #444;
background: #2a2a30;
color: #f0f0f0;
font-size: 16px;
-webkit-appearance: none;
}
.login-form input:focus { outline: 2px solid #337ab7; }
/* ----- Buttons ----- */
.btn {
display: block;
width: 100%;
padding: 16px 20px;
font-size: 16px;
font-weight: 600;
border-radius: 10px;
border: none;
cursor: pointer;
background: #337ab7;
color: #fff;
margin: 8px 0;
-webkit-appearance: none;
transition: transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-secondary {
background: #2a2a30;
border: 1px solid #444;
color: #f0f0f0;
}
.btn-large { padding: 22px; font-size: 18px; }
.hidden-input { display: none; }
/* ----- Order List ----- */
.search-bar {
margin-bottom: 12px;
}
.search-bar input {
width: 100%;
padding: 12px 16px;
border-radius: 24px;
border: 1px solid #444;
background: #2a2a30;
color: #f0f0f0;
font-size: 15px;
-webkit-appearance: none;
}
.order-card {
background: #25252b;
border-radius: 10px;
padding: 14px 16px;
margin-bottom: 10px;
cursor: pointer;
transition: background 0.15s;
}
.order-card:active { background: #2f2f35; }
.order-card .ref {
font-weight: 600;
color: #7aa2f7;
font-size: 14px;
}
.order-card .name {
font-size: 15px;
margin-top: 4px;
}
.order-card .meta {
display: flex;
justify-content: space-between;
margin-top: 6px;
font-size: 12px;
opacity: 0.7;
}
.order-card .badge {
background: #337ab7;
color: #fff;
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
}
/* ----- Order Detail ----- */
.detail-section {
background: #25252b;
border-radius: 10px;
padding: 14px 16px;
margin-bottom: 12px;
}
.detail-section h3 {
margin: 0 0 8px;
font-size: 13px;
text-transform: uppercase;
color: #7aa2f7;
letter-spacing: 0.5px;
}
.detail-section p { margin: 4px 0; font-size: 14px; }
.detail-section .label { opacity: 0.6; font-size: 12px; }
.photo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 6px;
margin-top: 10px;
max-width: 600px;
}
.photo-grid .thumb {
aspect-ratio: 1;
max-width: 160px;
background: #2a2a30;
border-radius: 6px;
overflow: hidden;
position: relative;
cursor: pointer;
}
.photo-grid .thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.photo-grid .thumb-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
opacity: 0.5;
}
/* ----- Toast ----- */
#toast-container {
position: fixed;
top: 16px;
left: 16px;
right: 16px;
z-index: 100;
pointer-events: none;
}
.toast {
background: #5cb85c;
color: #fff;
padding: 14px 16px;
border-radius: 8px;
margin-bottom: 8px;
text-align: center;
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
animation: slide-down 0.2s;
pointer-events: auto;
}
.toast.error { background: #d9534f; }
.toast.warn { background: #f0ad4e; }
@keyframes slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; } }
.empty-state {
text-align: center;
padding: 40px 20px;
opacity: 0.6;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
/* Loader */
.loader {
text-align: center;
padding: 40px;
opacity: 0.6;
}
.status-draft {
background: #6c757d;
color: #fff;
font-size: 10px;
padding: 2px 6px;
border-radius: 8px;
margin-left: 6px;
vertical-align: middle;
}
.status-final {
background: #5cb85c;
color: #fff;
font-size: 10px;
padding: 2px 6px;
border-radius: 8px;
margin-left: 6px;
vertical-align: middle;
}
/* ============================================================
* Fullscreen Modals (Foto-Vollbild, Voice, Sketch)
* ============================================================ */
.fullscreen-modal {
position: fixed;
inset: 0;
background: #000;
z-index: 1000;
display: flex;
flex-direction: column;
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
}
.fs-header {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
background: rgba(0,0,0,0.7);
color: #fff;
border-bottom: 1px solid #222;
}
.fs-header .fs-title {
flex: 1;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fs-header .icon-btn { color: #fff; }
.fs-body {
flex: 1;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
}
.fs-body img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* Voice Modal */
.voice-modal .voice-body {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
gap: 16px;
color: #fff;
}
.voice-indicator {
font-size: 80px;
color: #444;
transition: color 0.3s;
}
.voice-indicator.recording {
color: #d9534f;
animation: pulse 1s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
.voice-time {
font-size: 32px;
font-variant-numeric: tabular-nums;
color: #7aa2f7;
}
/* Sketch Modal */
.sketch-modal .sketch-body {
flex: 1;
background: #222;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.sketch-modal .sketch-body canvas {
background: #fff;
box-shadow: 0 0 20px rgba(0,0,0,0.5);
touch-action: none;
}
.sketch-toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 12px;
background: #1a1a1f;
border-bottom: 1px solid #333;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.sketch-toolbar button {
background: #2a2a30;
color: #fff;
border: 1px solid #444;
border-radius: 6px;
padding: 8px 12px;
font-size: 16px;
cursor: pointer;
flex-shrink: 0;
}
.sketch-toolbar button.active {
background: #337ab7;
border-color: #2868a0;
}
.sketch-toolbar .sep {
width: 1px;
background: #444;
height: 24px;
margin: 0 6px;
flex-shrink: 0;
}
.sketch-toolbar input[type="color"] {
width: 40px;
height: 36px;
border: 1px solid #444;
background: #2a2a30;
border-radius: 6px;
padding: 2px;
flex-shrink: 0;
}
.sketch-toolbar input[type="range"] {
width: 100px;
flex-shrink: 0;
}
/* Audio-Items in Auftrags-Detail */
.audio-list { display: flex; flex-direction: column; gap: 8px; }
.audio-item {
background: #2a2a30;
border-radius: 6px;
padding: 10px 12px;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.audio-item .audio-name {
flex: 1;
font-size: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.audio-item .audio-play {
background: #337ab7;
color: #fff;
border: none;
border-radius: 50%;
width: 36px;
height: 36px;
font-size: 14px;
cursor: pointer;
flex-shrink: 0;
}
.audio-item audio { width: 100%; flex-basis: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
/* Report-Page-Thumb mit Nummer */
.report-page-thumb { position: relative; }
.report-page-thumb .page-num {
position: absolute;
top: 4px; left: 4px;
background: rgba(0,0,0,0.7);
color: #fff;
font-size: 11px;
padding: 2px 6px;
border-radius: 10px;
font-weight: 600;
}
/* Unterschrift-Modal */
.signature-modal .signature-toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
background: #1a1a1f;
border-bottom: 1px solid #333;
}
.signature-modal .signature-toolbar button {
background: #2a2a30;
color: #fff;
border: 1px solid #444;
border-radius: 6px;
padding: 8px 14px;
cursor: pointer;
}
.signature-modal .sig-hint {
opacity: 0.6;
font-size: 13px;
}
.signature-modal .signature-body {
flex: 1;
background: #222;
padding: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.signature-modal canvas {
background: #fff;
width: 100%;
max-width: 900px;
aspect-ratio: 2 / 1;
border-radius: 6px;
touch-action: none;
box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
/* Hilfe-Modal */
.help-modal .help-body {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 20px;
color: #e0e0e0;
max-width: 780px;
margin: 0 auto;
width: 100%;
box-sizing: border-box;
background: #1a1a1f;
}
.help-modal h2 {
color: #7aa2f7;
margin: 0 0 20px;
font-size: 22px;
}
.help-modal section {
background: #25252b;
border-radius: 10px;
padding: 14px 18px;
margin-bottom: 14px;
}
.help-modal section h3 {
color: #7aa2f7;
font-size: 16px;
margin: 0 0 10px;
}
.help-modal p { margin: 6px 0; line-height: 1.5; font-size: 14px; }
.help-modal ul { margin: 6px 0 6px 20px; padding: 0; }
.help-modal li { margin: 4px 0; font-size: 14px; line-height: 1.5; }
.help-modal strong { color: #fff; }
.help-modal .tip {
background: rgba(122, 162, 247, 0.1);
border-left: 3px solid #7aa2f7;
padding: 10px 12px;
border-radius: 4px;
margin: 10px 0;
font-size: 13px;
}
.help-modal .status-badge-help {
background: #2a2a30;
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
border: 1px solid #444;
}
.help-modal .help-footer {
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid #333;
text-align: center;
opacity: 0.6;
font-size: 12px;
}
/* help-btn in Topbar kleiner machen */
#help-btn { font-size: 18px; padding: 4px 8px; }