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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #7CB342 0%, #558B2F 100%); /* ABO Energy Grün */
    min-height: 100vh;
    padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #7CB342; /* ABO Grün */
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #558B2F; /* Dunkleres ABO Grün */
    font-size: 28px;
    margin-bottom: 5px;
}

.header-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #7CB342; /* ABO Grün */
    color: white;
}

.btn-primary:hover {
    background: #689F38; /* Dunkleres Grün */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.4);
}

.btn-secondary {
    background: #757575; /* Grau */
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-danger {
    background: #E53935; /* Rot */
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

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

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 15px;
}

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

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #7CB342; /* ABO Grün */
}

/* ===== BOOKING CONTROLS ===== */
.booking-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #F1F8E9; /* Helles Grün */
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #C5E1A5;
}

/* ===== MESSAGES ===== */
#message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

#message.success {
    background: #C8E6C9; /* Helles Grün */
    color: #2E7D32; /* Dunkelgrün */
    border: 2px solid #81C784;
}

#message.error {
    background: #FFCDD2; /* Helles Rot */
    color: #C62828; /* Dunkelrot */
    border: 2px solid #E57373;
}

/* ===== LEGEND ===== */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #F1F8E9;
    border-radius: 8px;
    flex-wrap: wrap;
    border: 2px solid #C5E1A5;
}

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

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

.legend-color.available {
    background: #7CB342; /* ABO Grün - Verfügbar */
}

.legend-color.booked {
    background: #E53935; /* Rot - Gebucht */
}

.legend-color.my-booking {
    background: #FFA726; /* Orange - Meine Buchung */
}

/* ===== FLOOR PLAN ===== */
.floor-plan-container {
    margin-top: 20px;
}

.floor-plan-container h3 {
    color: #558B2F;
    margin-bottom: 15px;
    padding: 10px;
    background: #F1F8E9;
    border-radius: 6px;
    border-left: 4px solid #7CB342;
}

.floor-plan {
    position: relative;
    background: #FAFAFA;
    border: 3px solid #C5E1A5;
    border-radius: 8px;
    overflow: visible;
    min-height: 520px;
    width: 100%;
}

.desk {
    position: absolute;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.desk:hover {
    transform: scale(1.1);
    z-index: 100;
}

.desk svg {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.desk.available svg {
    fill: #7CB342; /* ABO Grün */
}

.desk.booked svg {
    fill: #E53935; /* Rot */
}

.desk.my-booking svg {
    fill: #FFA726; /* Orange */
}

.desk.available:hover svg {
    fill: #689F38; /* Dunkleres Grün */
}

.desk-label {
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    margin-top: 4px;
    color: #333;
}

.desk-room {
    font-size: 9px;
    color: #666;
    text-align: center;
    margin-top: 2px;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background: #7CB342; /* ABO Grün */
    color: white;
}

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

table th {
    font-weight: 600;
    font-size: 14px;
}

table tbody tr {
    transition: background 0.2s;
}

table tbody tr:hover {
    background: #F1F8E9; /* Helles Grün */
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 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);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s;
    border-top: 4px solid #7CB342;
}

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

.modal-content h2 {
    margin-bottom: 15px;
    color: #558B2F;
}

.modal-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #7CB342;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border: 3px solid #C5E1A5;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(124, 179, 66, 0.3);
    border-color: #7CB342;
}

.stat-card h3 {
    font-size: 36px;
    color: #7CB342; /* ABO Grün */
    margin-bottom: 10px;
    font-weight: bold;
}

.stat-card p {
    color: #666;
    font-size: 14px;
}

/* ===== ADMIN STYLES ===== */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid #C5E1A5;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #7CB342;
}

.tab-btn.active {
    color: #7CB342;
    border-bottom-color: #7CB342;
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

.admin-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: #F1F8E9;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #C5E1A5;
}

.admin-floor-plan {
    position: relative;
    background: #FAFAFA;
    border: 3px solid #C5E1A5;
    border-radius: 8px;
    min-height: 400px;
}

.admin-desk {
    position: absolute;
    width: 70px;
    transition: opacity 0.3s;
}

.admin-desk:hover {
    opacity: 0.8;
}

.floor-card {
    border: 3px solid #C5E1A5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s;
}

.floor-card:hover {
    border-color: #7CB342;
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

.floor-card h3 {
    color: #558B2F;
    margin-bottom: 10px;
}

.floor-card p {
    color: #666;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-top: 4px solid #7CB342;
}

.login-container h1 {
    text-align: center;
    color: #558B2F;
    margin-bottom: 30px;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container .btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

.error-message {
    background: #FFCDD2;
    color: #C62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 2px solid #E57373;
}

/* ===== DATE PREVIEW ===== */
#datePreview {
    margin: 15px 0;
    padding: 15px;
    background: #E8F5E9; /* Sehr helles Grün */
    border-radius: 6px;
    border-left: 4px solid #7CB342;
}

#datePreview strong {
    color: #558B2F;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-info {
        width: 100%;
    }

    .header-info .btn {
        flex: 1;
    }

    .booking-controls {
        grid-template-columns: 1fr;
    }

    .desk {
        width: 60px;
    }

    .desk svg {
        width: 40px;
        height: 40px;
    }

    .desk-label {
        font-size: 9px;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 10px;
    }

    .stat-card h3 {
        font-size: 28px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 22px;
    }

    .legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .floor-plan {
        overflow-x: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* ===== LOADING SPINNER ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 4px solid #F1F8E9;
    border-top: 4px solid #7CB342; /* ABO Grün */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #F1F8E9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #7CB342; /* ABO Grün */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #689F38;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .header-info,
    .btn,
    .booking-controls {
        display: none;
    }
}

/* ===== HIGHLIGHT EFFECTS ===== */
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(124, 179, 66, 0.3);
}

.form-group input:focus,
.form-group select:focus {
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

/* ===== ABO ENERGY BRANDING ===== */
.abo-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #7CB342;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* ===== ZUSÄTZLICHE AKZENTE ===== */
h2, h3 {
    color: #558B2F;
}

a {
    color: #7CB342;
    text-decoration: none;
}

a:hover {
    color: #689F38;
    text-decoration: underline;
}

/* ===== SUCCESS HIGHLIGHTS ===== */
.success-highlight {
    background: linear-gradient(90deg, #C8E6C9 0%, #F1F8E9 100%);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #7CB342;
    margin: 15px 0;
}
