/* ATUS v5.0 - Haupt-Stylesheet */

/* ===== RESET & GRUNDLAGEN ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 20px 0;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

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

.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

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

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

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

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== KALENDER CONTROLS ===== */
.calendar-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.view-controls,
.date-navigation,
.additional-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.current-period {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0 15px;
    min-width: 200px;
    text-align: center;
}

/* ===== LEGENDE ===== */
.legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.legend-color.available {
    background: #27ae60;
    border-color: #219a52;
}

.legend-color.user-reservation {
    background: #e74c3c;
    border-color: #c0392b;
}

.legend-color.my-reservation {
    background: #3498db;
    border-color: #2980b9;
}

.legend-color.past {
    background: #95a5a6;
    border-color: #7f8c8d;
}

.legend-color.maintenance {
    background: #f39c12;
    border-color: #e67e22;
}

/* ===== KALENDER ===== */
.calendar-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.calendar-table th,
.calendar-table td {
    border: 1px solid #e1e8ed;
    text-align: center;
    vertical-align: middle;
}

.calendar-table th {
    background: #f8fafc;
    padding: 15px 8px;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 100;
}

.calendar-table .time-header {
    background: #667eea;
    color: white;
    width: 80px;
    min-width: 80px;
}

.calendar-table .date-header {
    background: #f8fafc;
    color: #2c3e50;
    min-width: 120px;
}

.calendar-table .date-header.today {
    background: #27ae60;
    color: white;
    font-weight: bold;
}

.calendar-table .time-cell {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
    width: 80px;
    padding: 12px 8px;
}

.time-slot {
    padding: 8px 4px;
    min-height: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 12px;
}

.time-slot:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.time-slot.available {
    background: #d5f4e6;
    color: #2c3e50;
}

.time-slot.available:hover {
    background: #27ae60;
    color: white;
}

.time-slot.reserved {
    background: #ffeaa7;
    color: #2c3e50;
    cursor: default;
}

.time-slot.user-reservation {
    background: #fab1a0;
    color: white;
    cursor: pointer;
}

.time-slot.my-reservation {
    background: #74b9ff;
    color: white;
    cursor: pointer;
}

.time-slot.past {
    background: #ddd;
    color: #7f8c8d;
    cursor: not-allowed;
}

.time-slot.maintenance {
    background: #fdcb6e;
    color: #2c3e50;
    cursor: not-allowed;
}

.reservation-info {
    font-weight: 600;
    font-size: 11px;
    line-height: 1.2;
}

.reservation-category {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInDown 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e74c3c;
    color: white;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-value {
    display: block;
    padding: 12px 15px;
    background: #f8fafc;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    color: #2c3e50;
    font-weight: 500;
}

/* ===== RESERVIERUNGEN STATS ===== */
.reservations-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== RESERVIERUNGEN LISTE ===== */
.reservations-list {
    max-height: 400px;
    overflow-y: auto;
}

.reservation-item {
    background: #f8fafc;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.reservation-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.reservation-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.reservation-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-confirmed {
    background: #d5f4e6;
    color: #27ae60;
}

.status-pending {
    background: #ffeaa7;
    color: #f39c12;
}

.status-cancelled {
    background: #fab1a0;
    color: #e74c3c;
}

.reservation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

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

/* ===== NO DATA ===== */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-data p:first-child {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* ===== ADMIN PANEL ===== */
.admin-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1500;
    overflow-y: auto;
}

.admin-panel.open {
    right: 0;
}

.admin-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
}

.admin-panel-content {
    padding: 20px;
}

.admin-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid #27ae60;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

.toast.error {
    border-left-color: #e74c3c;
}

.toast.warning {
    border-left-color: #f39c12;
}

.toast.info {
    border-left-color: #3498db;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FOOTER ===== */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }