* {
    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;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 28px;
    color: #667eea;
}

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

/* Authentifizierungs-Boxen */
.auth-box, .form-box, .detail-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin: 50px auto;
}

.form-box, .detail-box {
    max-width: 700px;
}

.auth-box h1, .form-box h1, .detail-box h1 {
    margin-bottom: 25px;
    color: #667eea;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

.alert-info {
    background: #eef;
    color: #33c;
    border-left: 4px solid #33c;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="time"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
}

.btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

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

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

.btn-danger {
    background: #dc3545;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

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

.btn-create {
    background: #28a745;
    padding: 6px 10px;
    font-size: 11px;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Monatsnavigation */
.month-navigation {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.month-navigation h2 {
    color: #667eea;
    font-size: 24px;
}

/* Kalender */
.calendar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.day-name {
    min-width: 0;
    overflow: hidden;
    text-align: center;
    font-weight: 700;
    padding: 10px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 14px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: hidden;
    min-height: 120px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    position: relative;
    transition: all 0.3s;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day.occupied {
    background: #fff3cd;
    border-color: #ffc107;
}

.calendar-day.own-entry {
    background: #d4edda;
    border-color: #28a745;
}

.calendar-day.past {
    opacity: 0.6;
}

.calendar-day:not(.empty):not(.past):not(.occupied):hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.day-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: #667eea;
}

.day-content {
    font-size: 12px;
    line-height: 1.4;
}

.day-content strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.day-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 15px;
    border-radius: 6px;
}

.btn-info-icon {
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
}

/* Detail-Ansicht */
.entry-detail {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.entry-detail h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section strong {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.detail-section p {
    color: #333;
    line-height: 1.6;
    font-size: 15px;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-body {
        gap: 5px;
    }
    
    .calendar-day {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: hidden;
        min-height: 100px;
        padding: 8px;
        font-size: 11px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .month-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}
