* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p.date {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.date-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.date-picker label {
    font-weight: 600;
    white-space: nowrap;
}

.date-picker input[type="date"] {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.date-picker input[type="date"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.date-picker input[type="date"]:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* Styling für Date-Input in verschiedenen Browsern */
.date-picker input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.attendance-section {
    padding: 20px;
    min-height: 200px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.nav-buttons a {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-buttons a:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s;
}

.user-item:hover {
    background: #f5f5f5;
}

.user-item.present {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.user-item.present label {
    color: #2e7d32;
    font-weight: 600;
}

.user-item.absent {
    background: #ffebee;
    border-left-color: #f44336;
}

.user-item.absent label {
    color: #c62828;
}

.user-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.user-item label {
    flex: 1;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

.no-users {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.add-user-section {
    margin-bottom: 20px;
}

.add-user-form {
    display: flex;
    gap: 10px;
}

.add-user-form input,
.add-user-form select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
}

.add-user-form button {
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.add-user-form button:hover {
    background: #764ba2;
}

.admin-message {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.admin-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-message.error {
    background: #ffebee;
    color: #c62828;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f9f9f9;
    border: 1px solid #ebebeb;
}

.admin-user-name {
    font-weight: 600;
    color: #333;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    border: none;
    border-radius: 6px;
    padding: 7px 10px;
    cursor: pointer;
    background: #667eea;
    color: white;
    font-size: 13px;
}

.btn-small:hover {
    background: #764ba2;
}

.btn-small:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.btn-small.danger {
    background: #e74c3c;
}

.btn-small.danger:hover {
    background: #c0392b;
}

.footer {
    background: #f9f9f9;
    padding: 15px 20px;
    text-align: center;
    border-top: 2px solid #f0f0f0;
}

.footer p {
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 480px) {
    .header h1 {
        font-size: 24px;
    }

    .date-picker {
        flex-direction: column;
        gap: 8px;
    }

    .date-picker label {
        align-self: flex-start;
    }

    .date-picker input[type="date"] {
        width: 100%;
    }

    .user-item {
        padding: 12px;
    }

    .add-user-form {
        flex-direction: column;
    }

    .admin-user-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-actions {
        justify-content: flex-end;
    }
}

/* ── Statistik-Tabelle ──────────────────────────────────── */

.content {
    padding: 30px 20px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
}

.stats-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stats-table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.6px;
}

.stats-table tbody tr {
    transition: background 0.2s;
}

.stats-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.stats-table tbody tr:nth-child(even) {
    background: white;
}

.stats-table tbody tr:hover {
    background: #f0f2ff;
}

.stats-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #efefef;
}

.name-cell {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.number-cell {
    text-align: center;
}

.number-cell .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    min-width: 36px;
}

.number-cell.present-cell .badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.number-cell.absent-cell .badge {
    background: #ffebee;
    color: #c62828;
}

.quote-cell {
    text-align: center;
    white-space: nowrap;
}

.quote-bar {
    display: inline-block;
    width: 90px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 8px;
    vertical-align: middle;
}

.quote-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.quote-fill.low    { background: linear-gradient(90deg, #ff6b6b, #ee5a24); }
.quote-fill.medium { background: linear-gradient(90deg, #ffa94d, #f39c12); }
.quote-fill.high   { background: linear-gradient(90deg, #51cf66, #2ecc71); }

.quote-value {
    font-weight: 700;
    font-size: 14px;
    vertical-align: middle;
}

.no-data {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
    font-size: 16px;
}

@media (max-width: 600px) {
    .stats-table th,
    .stats-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .quote-bar {
        width: 60px;
    }
}
