/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.header-logo {
    height: 40px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-company {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Login-Seite */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

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

.logo-container {
    margin-bottom: 30px;
}

.logo {
    max-height: 80px;
    max-width: 100%;
}

.login-box h1 {
    color: #4c63d2;
    margin-bottom: 30px;
    font-size: 24px;
}

/* Formulare */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4c63d2;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #4c63d2;
    color: white;
}

.btn-primary:hover {
    background: #3d4fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    margin: 0 2px;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #4c63d2;
    margin-bottom: 20px;
    font-size: 22px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 20px;
}

.status {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.status.active {
    background: #d4edda;
    color: #155724;
}

.status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status.pause {
    background: #fff3cd;
    color: #856404;
}

.timer {
    font-size: 48px;
    font-weight: bold;
    color: #4c63d2;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.time-info {
    color: #666;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.pause-status {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
}

/* Wochen- und Monatsübersicht */
.week-summary, .month-summary {
    text-align: center;
}

.total-hours {
    font-size: 24px;
    margin-bottom: 20px;
    color: #4c63d2;
}

.daily-hours {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.day-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.day-entry:last-child {
    border-bottom: none;
}

.no-data {
    color: #666;
    font-style: italic;
    padding: 20px;
}

.more-entries {
    color: #666;
    font-style: italic;
    padding: 10px 0;
    text-align: center;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-btn.active {
    background: #4c63d2;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tabellen */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.total-row {
    background: #e9ecef !important;
    font-weight: bold;
}

/* Aktive Benutzer */
.active-users {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.active-user-card {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.user-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.work-info {
    font-size: 14px;
    color: #666;
}

.pause-indicator {
    color: #856404;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Berichte */
.report-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.report-logo {
    margin-bottom: 20px;
}

.report-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
    text-align: left;
}

.report-table {
    font-size: 14px;
}

.report-section {
    page-break-inside: avoid;
}

.employee-company {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.total-summary {
    text-align: center;
    padding: 20px;
    background: #e9ecef;
    border-radius: 10px;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-details {
        align-items: center;
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .timer {
        font-size: 36px;
    }
    
    .active-users {
        grid-template-columns: 1fr;
    }
    
    .report-info {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 20px;
    }
    
    .card {
        padding: 15px;
    }
    
    .timer {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .total-hours {
        font-size: 20px;
    }
}