html {
    font-size: 16px;
    min-height: 100%;
}

body {
    margin: 0;
    background: #eef1f5;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1f2937;
}

/* TOPBAR */

.topbar {
    max-width: 1500px;
    margin: 30px auto 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .topbar h1 {
        font-size: 44px;
        margin: 0;
        font-weight: 800;
    }

.legend {
    display: flex;
    gap: 22px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

    .dot.frei {
        background: #22c55e;
    }

    .dot.reserviert {
        background: #ef4444;
    }

    .dot.verbunden {
        background: #ffd54a;
    }

/* DATE */

.date-form {
    display: flex;
    gap: 12px;
}

    .date-form input,
    .date-form button {
        border: none;
        padding: 15px 20px;
        border-radius: 14px;
        font-size: 16px;
    }

    .date-form input {
        background: white;
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    }

    .date-form button {
        background: #16a34a;
        color: white;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 8px 25px rgba(22,163,74,0.25);
    }

/* FLOORPLAN */

.floorplan {
    position: relative;
    max-width: 1500px;
    height: 820px;
    margin: 0 auto 50px auto;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 30px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.13);
    overflow: auto;
    border: 1px solid rgba(0,0,0,0.06);
}

    .floorplan::before {
        content: "";
        position: absolute;
        inset: 25px;
        border: 2px dashed rgba(148,163,184,0.35);
        border-radius: 24px;
        pointer-events: none;
        z-index: 1;
    }

.room-label {
    position: absolute;
    top: 28px;
    left: 35px;
    font-size: 24px;
    font-weight: 900;
    color: #334155;
    z-index: 5;
}

.window-area {
    position: absolute;
    left: 30px;
    top: 90px;
    width: 55px;
    height: 620px;
    background: #dbeafe;
    border-radius: 22px;
    color: #1d4ed8;
    display: flex;
    justify-content: center;
    align-items: center;
    writing-mode: vertical-rl;
    font-weight: 800;
    z-index: 3;
}

.bar-area {
    position: absolute;
    right: 35px;
    top: 90px;
    width: 95px;
    height: 620px;
    background: linear-gradient(180deg, #78350f, #451a03);
    border-radius: 26px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 900;
    writing-mode: vertical-rl;
    z-index: 3;
}

.entrance-area {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: #e5e7eb;
    color: #374151;
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 900;
    z-index: 3;
}

/* VERBINDUNGSLINIEN */

.table-link {
    position: absolute;
    height: 8px;
    background: rgba(255, 213, 74, 0.92);
    border-radius: 999px;
    z-index: 12;
    box-shadow: 0 0 12px rgba(255,213,74,0.7);
    transform-origin: center;
    pointer-events: none;
}

/* TISCHE - FÜR VIELE TISCHE */

.table-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 88px;
    min-height: 74px;
    border-radius: 14px;
    color: white !important;
    text-decoration: none;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 8px 18px rgba(0,0,0,0.20);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 20;
    transition: all 0.18s ease;
    padding: 6px;
}

    .table-dot.frei {
        background: linear-gradient(135deg, #16a34a, #166534);
    }

    .table-dot.reserviert {
        background: linear-gradient(135deg, #dc2626, #991b1b);
        border-color: #ffd54a;
        outline: 3px solid rgba(255, 213, 74, 0.6);
        outline-offset: 2px;
    }

.table-short {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    color: white !important;
}

.table-main {
    font-size: 13px;
    font-weight: 900;
    margin-top: 3px;
    color: white !important;
}

.table-guest {
    font-size: 11px;
    font-weight: 800;
    margin-top: 2px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white !important;
}

.table-small {
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
    color: white !important;
}

.table-free {
    font-size: 10px;
    font-weight: 900;
    margin-top: 3px;
    color: white !important;
}

.table-note {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 700;
    background: rgba(255,255,255,0.18);
    padding: 2px 5px;
    border-radius: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white !important;
}

.table-dot:hover {
    transform: translate(-50%, -50%) scale(1.25);
    z-index: 1000;
    width: 150px;
    min-height: 115px;
    overflow: visible;
}

    .table-dot:hover .table-short {
        font-size: 22px;
    }

    .table-dot:hover .table-main {
        font-size: 16px;
    }

    .table-dot:hover .table-guest {
        font-size: 14px;
        white-space: normal;
    }

    .table-dot:hover .table-small,
    .table-dot:hover .table-free {
        font-size: 12px;
    }

    .table-dot:hover .table-note {
        font-size: 11px;
        white-space: normal;
    }

/* FORMULAR */

.form-page {
    max-width: 900px;
    margin: 40px auto;
}

.form-card {
    background: white;
    padding: 35px;
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.12);
}

    .form-card h1 {
        margin: 0;
        font-size: 38px;
    }

.subtitle {
    color: #64748b;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        border: 1px solid #d1d5db;
        border-radius: 14px;
        padding: 14px 16px;
        font-size: 16px;
    }

    .form-group textarea {
        min-height: 110px;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    border: none;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    background: #16a34a;
    color: white;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.error-box {
    color: #b91c1c;
    background: #fee2e2;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
}

/* RESERVIERUNGSLISTE */

.reservation-list {
    max-width: 1200px;
    margin: 30px auto;
}

.reservation-card {
    background: white;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reservation-time {
    font-size: 26px;
    font-weight: 900;
    color: #16a34a;
}

.reservation-name {
    font-size: 24px;
    font-weight: 800;
    margin-top: 6px;
}

.reservation-details {
    color: #64748b;
    margin-top: 4px;
}

.reservation-note {
    margin-top: 10px;
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 12px;
}

.empty-box {
    background: white;
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    color: #64748b;
    font-size: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* MOBILE */

@media(max-width:900px) {
    .topbar {
        display: block;
        margin: 20px;
    }

        .topbar h1 {
            font-size: 32px;
        }

    .date-form {
        margin-top: 18px;
    }

    .floorplan {
        margin: 20px;
        height: 700px;
    }

    .table-dot {
        width: 70px;
        min-height: 62px;
        border-radius: 12px;
        padding: 4px;
    }

    .table-short {
        font-size: 14px;
    }

    .table-main {
        font-size: 11px;
    }

    .table-guest,
    .table-small,
    .table-free {
        font-size: 9px;
    }

    .table-note {
        font-size: 8px;
    }

    .table-link {
        height: 5px;
    }

    .bar-area {
        width: 75px;
        font-size: 14px;
    }

    .window-area {
        width: 40px;
        font-size: 12px;
    }
}
