/* Zeiterfassung Laser AG - Hauptstyles */
:root {
    --primary: #e60005;
    --primary-dark: #b30004;
    --primary-light: #ff3338;
    --secondary: #0077c8;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-logo {
    height: 32px;
    width: auto;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

.header-user {
    font-size: 13px;
    opacity: 0.9;
}

.header-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* Offline-Banner */
.offline-banner {
    background: var(--warning);
    color: #333;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    display: none;
}

.offline-banner.show { display: block; }

/* Hauptinhalt */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Karten */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* Start/Stop Button */
.time-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.time-btn:active {
    transform: scale(0.95);
}

.time-btn.start {
    background: linear-gradient(135deg, var(--success), #20c997);
    box-shadow: 0 6px 20px rgba(40,167,69,0.4);
}

.time-btn.stop {
    background: linear-gradient(135deg, var(--danger), #e74c3c);
    box-shadow: 0 6px 20px rgba(220,53,69,0.4);
}

.time-display {
    text-align: center;
    font-size: 36px;
    font-weight: 300;
    color: var(--text);
    margin: 10px 0;
    font-variant-numeric: tabular-nums;
}

.time-info {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin: 4px 0;
}

/* Projekt-Auswahl */
.project-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    background: white;
    color: var(--text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.project-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Formulare */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-light);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    background: white;
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-decoration: none;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* Navigation unten */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 12px;
    cursor: pointer;
    border: none;
    background: none;
}

.nav-item.active { color: var(--primary); }

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* Listen */
.list-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:last-child { border-bottom: none; }

.list-item-main {
    flex: 1;
}

.list-item-title {
    font-weight: 500;
    font-size: 15px;
}

.list-item-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Status-Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-submitted { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-active { background: #d4edda; color: #155724; }
.badge-synced { background: #cce5ff; color: #004085; }

/* Perioden-Tabs */
.period-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.period-tab {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: var(--text-light);
    transition: all 0.2s;
}

.period-tab.active {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff5f5;
}

/* Login-Seite */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}

.login-logo {
    width: 160px;
    margin: 0 auto 24px;
}

.login-title {
    font-size: 22px;
    margin-bottom: 24px;
    color: var(--text);
}

/* Abstandhalter fuer Bottom-Nav */
.nav-spacer {
    height: 80px;
}

/* Animationen */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulsing { animation: pulse 2s ease-in-out infinite; }

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.slide-up { animation: slideUp 0.3s ease-out; }

/* Toast-Nachrichten */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* Versteckte Seiten */
.page { display: none; }
.page.active { display: block; }

/* Responsive */
@media (min-width: 768px) {
    .container { padding: 24px; }
    .time-btn { width: 200px; height: 200px; font-size: 32px; }
}

/* Safe area fuer iOS */
@supports (padding: max(0px)) {
    .header { padding-top: max(12px, env(safe-area-inset-top)); }
}

/* Print-Styles fuer Regierapport */
@media print {
    .header, .bottom-nav, .no-print { display: none !important; }
    body { background: white; }
    .container { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
