/** * KundenKarte PWA Styles * Mobile-First, Touch-optimiert, Dark Mode */ :root { --primary: #3498db; --primary-dark: #2980b9; --success: #27ae60; --warning: #f39c12; --danger: #e74c3c; --bg-body: #1a1a2e; --bg-card: #16213e; --bg-input: #0f3460; --bg-header: #0f3460; --text: #eee; --text-muted: #888; --text-dim: #666; --border: #2a2a4a; --border-light: #3a3a5a; --shadow: 0 4px 20px rgba(0,0,0,0.4); --radius: 12px; --radius-sm: 8px; /* Safe areas für notches */ --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); } * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } html, body { height: 100%; overflow: hidden; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; background: var(--bg-body); color: var(--text); font-size: 16px; line-height: 1.4; } /* ============================================ APP CONTAINER ============================================ */ .app { height: 100%; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; } /* ============================================ SCREENS ============================================ */ .screen { display: none; flex-direction: column; height: 100%; overflow: hidden; } .screen.active { display: flex; } /* ============================================ HEADER ============================================ */ .header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: calc(12px + var(--safe-top)); background: var(--bg-header); border-bottom: 1px solid var(--border); min-height: 60px; flex-shrink: 0; } .header h1 { flex: 1; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .header-spacer { width: 44px; } .btn-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 50%; color: var(--text); cursor: pointer; transition: background 0.2s; position: relative; } .btn-icon:active { background: rgba(255,255,255,0.1); } .btn-icon svg { width: 24px; height: 24px; fill: currentColor; } .sync-btn { position: relative; } .sync-badge { position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff; font-size: 11px; font-weight: bold; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; } .sync-badge.hidden { display: none; } /* ============================================ LOGIN SCREEN ============================================ */ .login-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; } .login-logo { width: 80px; height: 80px; background: var(--primary); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; } .login-logo svg { width: 48px; height: 48px; fill: #fff; } .login-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; } .login-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; } .login-form { width: 100%; max-width: 320px; } /* ============================================ FORMS ============================================ */ .form-group { margin-bottom: 16px; } .form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; } .form-group input, .form-group select { width: 100%; padding: 14px 16px; font-size: 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); outline: none; transition: border-color 0.2s; } .form-group input:focus, .form-group select:focus { border-color: var(--primary); } .form-group input::placeholder { color: var(--text-dim); } .error-text { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; min-height: 20px; } /* ============================================ BUTTONS ============================================ */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; font-size: 16px; font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; white-space: nowrap; } .btn:active { transform: scale(0.98); } .btn-primary { background: var(--primary); color: #fff; } .btn-primary:active { background: var(--primary-dark); } .btn-secondary { background: var(--border); color: var(--text); } .btn-success { background: var(--success); color: #fff; } .btn-danger { background: var(--danger); color: #fff; } .btn-large { width: 100%; padding: 16px; font-size: 17px; } /* ============================================ SEARCH ============================================ */ .search-container { padding: 16px; flex-shrink: 0; } .search-box { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); } .search-box svg { width: 22px; height: 22px; fill: var(--text-muted); flex-shrink: 0; } .search-box input { flex: 1; background: transparent; border: none; color: var(--text); font-size: 16px; outline: none; } .search-box input::placeholder { color: var(--text-dim); } /* ============================================ LISTS ============================================ */ .list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 16px; } .list-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; transition: all 0.2s; } .list-item:active { background: var(--bg-input); transform: scale(0.99); } .list-item-icon { width: 44px; height: 44px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .list-item-icon svg { width: 24px; height: 24px; fill: #fff; } .list-item-content { flex: 1; min-width: 0; } .list-item-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .list-item-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; } .list-item-arrow { width: 20px; height: 20px; fill: var(--text-dim); } .list-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); } /* ============================================ ANLAGEN GRID ============================================ */ .anlagen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; } .anlage-card { display: flex; flex-direction: column; align-items: center; padding: 20px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; } .anlage-card:active { background: var(--bg-input); transform: scale(0.98); } .anlage-card-icon { width: 56px; height: 56px; background: var(--success); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; } .anlage-card-icon svg { width: 32px; height: 32px; fill: #fff; } .anlage-card-title { font-size: 14px; font-weight: 600; text-align: center; word-break: break-word; } /* ============================================ EDITOR ============================================ */ .editor-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; padding-bottom: 100px; } .panel-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; } .panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--bg-header); border-bottom: 1px solid var(--border); } .panel-title { font-size: 16px; font-weight: 600; } .panel-actions { display: flex; gap: 8px; } .panel-body { padding: 12px; } /* Hutschiene */ .carrier-item { background: var(--bg-input); border: 1px solid var(--border-light); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; } .carrier-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: rgba(255,255,255,0.03); } .carrier-label { font-size: 13px; font-weight: 600; color: var(--text-muted); } .carrier-te { font-size: 12px; color: var(--text-dim); } .carrier-body { padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; min-height: 50px; } /* Equipment Block */ .equipment-block { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; height: 60px; padding: 4px 8px; background: var(--primary); border-radius: 6px; cursor: pointer; transition: all 0.2s; } .equipment-block:active { transform: scale(0.95); } .equipment-block-type { font-size: 11px; font-weight: bold; color: #fff; } .equipment-block-value { font-size: 13px; font-weight: bold; color: #fff; } .equipment-block-label { font-size: 9px; color: rgba(255,255,255,0.7); max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Add Button in Carrier */ .btn-add-equipment { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 60px; padding: 8px; background: transparent; border: 2px dashed var(--border-light); border-radius: 6px; color: var(--text-dim); cursor: pointer; transition: all 0.2s; } .btn-add-equipment:active { background: rgba(255,255,255,0.05); border-color: var(--primary); color: var(--primary); } .btn-add-equipment svg { width: 24px; height: 24px; fill: currentColor; } /* Add Carrier Button */ .btn-add-carrier { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: transparent; border: 2px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; cursor: pointer; transition: all 0.2s; } .btn-add-carrier:active { border-color: var(--primary); color: var(--primary); } .btn-add-carrier svg { width: 20px; height: 20px; fill: currentColor; } /* ============================================ FAB (Floating Action Button) ============================================ */ .fab-container { position: fixed; bottom: 24px; right: 24px; padding-bottom: var(--safe-bottom); z-index: 100; } .fab { display: flex; align-items: center; gap: 8px; padding: 14px 20px; background: var(--primary); color: #fff; border: none; border-radius: 30px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s; } .fab:active { transform: scale(0.95); background: var(--primary-dark); } .fab svg { width: 22px; height: 22px; fill: currentColor; } /* ============================================ MODALS ============================================ */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: none; align-items: flex-end; justify-content: center; z-index: 1000; padding: var(--safe-bottom); } .modal.active { display: flex; } .modal-content { width: 100%; max-width: 500px; max-height: 85vh; background: var(--bg-card); border-radius: var(--radius) var(--radius) 0 0; display: flex; flex-direction: column; overflow: hidden; animation: slideUp 0.3s ease; } .modal-small { max-height: auto; } @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); } .modal-header h2 { font-size: 18px; font-weight: 600; } .modal-close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-muted); font-size: 28px; cursor: pointer; border-radius: 50%; } .modal-close:active { background: rgba(255,255,255,0.1); } .modal-body { flex: 1; overflow-y: auto; padding: 20px; } .modal-footer { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); } .modal-footer .btn { flex: 1; } /* ============================================ TYPE GRID ============================================ */ .step { display: none; } .step.active { display: block; } .step-label { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; } .type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .type-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 8px; background: var(--bg-input); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; transition: all 0.2s; } .type-btn:active, .type-btn.selected { border-color: var(--primary); background: rgba(52, 152, 219, 0.2); } .type-btn-icon { font-size: 24px; margin-bottom: 6px; } .type-btn-label { font-size: 12px; font-weight: 600; text-align: center; } .te-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } .te-btn { padding: 20px; background: var(--bg-input); border: 2px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 18px; font-weight: 600; cursor: pointer; transition: all 0.2s; } .te-btn:active, .te-btn.selected { border-color: var(--primary); background: rgba(52, 152, 219, 0.2); } /* Value Quick Select */ .value-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .value-chip { padding: 10px 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 20px; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; } .value-chip:active, .value-chip.selected { background: var(--primary); border-color: var(--primary); } /* ============================================ OFFLINE BAR ============================================ */ .offline-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px; padding-bottom: calc(10px + var(--safe-bottom)); background: var(--warning); color: #000; text-align: center; font-size: 13px; font-weight: 600; z-index: 500; } .offline-bar.hidden { display: none; } /* ============================================ TOAST ============================================ */ .toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 14px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; box-shadow: var(--shadow); opacity: 0; transition: all 0.3s; z-index: 2000; max-width: 90%; text-align: center; } .toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; } .toast.success { border-color: var(--success); } .toast.error { border-color: var(--danger); } /* ============================================ UTILITIES ============================================ */ .hidden { display: none !important; } .text-center { text-align: center; } .text-muted { color: var(--text-muted); } /* Loading Spinner */ .spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .loading-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }