/* Stil general */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ffffff;
    color: #111;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Top bar admin */

.top-bar {
    background: #f2f2f2;
    color: #111;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

.top-bar nav {
    display: flex;
    gap: 8px;
}

.btn-link {
    padding: 6px 10px;
    border-radius: 4px;
    background: #e0e0e0;
}

.btn-link:hover {
    background: #cfcfcf;
}

.btn-logout {
    padding: 6px 10px;
    border-radius: 4px;
    background: #e57373;
    color: #fff;
}

.btn-logout:hover {
    background: #ef5350;
}

/* Pagina de login */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #fafafa;
}

.login-box {
    background: #ffffff;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0,0,0,0.08);
    width: min(320px, 90vw);
}

.login-box h1 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
    text-align: center;
}

.login-box label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.login-box input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #111;
    margin-bottom: 12px;
}

.login-box button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: #4c8bf5;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.login-box button:hover {
    background: #336ad9;
}

.error {
    background: #ffcdd2;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Pagina principală admin */

.main {
    padding: 12px 12px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Legendă culori */

.legend {
    list-style: none;
    padding: 0;
    margin: 8px 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
}

.legend .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* Hall container cu scroll pe mobil */

.hall-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

/* Hall absolut poziționat (layout exact) */

.hall-abs {
    position: relative;
    width: min(100%, 1100px);
    margin: 0 auto;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1387 / 761;
    border: 1px solid #ddd;
}

/* Scaun individual – buline mai mici global */

.seat {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    cursor: pointer;
    border: 1px solid #555;
    user-select: none;
    color: #fff;
}

.seat:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

/* Culori pentru stări */

.seat-liber {
    background: #9e9e9e;       /* gri */
}

.seat-rezervat {
    background: #1e88e5;       /* albastru */
}

.seat-ocupat {
    background: #e53935;       /* roșu */
}

/* Meniul de schimbare a stării */

.seat-menu {
    position: absolute;
    background: #ffffff;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
    display: none;
    z-index: 100;
}

.seat-menu button {
    display: block;
    width: 100%;
    margin: 2px 0;
    padding: 4px 8px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.seat-menu button[data-status="liber"] {
    background: #eeeeee;
    color: #000;
}

.seat-menu button[data-status="rezervat"] {
    background: #1e88e5;
    color: #fff;
}

.seat-menu button[data-status="ocupat"] {
    background: #e53935;
    color: #fff;
}

.seat-menu button:hover {
    filter: brightness(1.05);
}

/* Etichete de rând */

.row-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #000;
}

.row-label-left {
    text-align: right;
}

.row-label-right {
    text-align: left;
}

/* Texte SCENA / INTRARE */

.hall-text {
    position: absolute;
    transform: translate(-50%, -50%);
    font-weight: 700;
    letter-spacing: 0.15em;
    font-size: 16px;
    color: #000;
}

.hall-text-scena {
    left: 50%;
    top: 95%;
}

/* Etichete speciale pentru Casa Tineretului */
.hall-text-balcon {
    left: 50%;
    top: 72.3%;   /* între rândurile S–V, fără să calce bulinele */
    font-size: 14px;
}

.hall-text-loja {
    left: 50%;
    top: 89.9%;   /* între V și X–Y, ca în layout-ul de referință */
    font-size: 14px;
}

.hall-text-intrare-left {
    left: 15%;
    top: 60%;
}

.hall-text-intrare-right {
    left: 85%;
    top: 45%;
}

/* Info loc selectat */

.seat-info {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

/* Home: listă săli */

.home-body {
    background: radial-gradient(circle at top, #f0f0f0 0, #ffffff 55%);
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    text-align: center;
    padding: 32px 16px 16px;
}

.site-header h1 {
    margin: 0;
    font-size: clamp(32px, 6vw, 42px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-header p {
    margin-top: 8px;
    font-size: 15px;
    color: #555;
}

.hall-list {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
}

.hall-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 22px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 18px 35px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 45px rgba(0,0,0,0.12);
    background: #fafafa;
}

.hall-card-body h2 {
    margin: 0;
    font-size: 22px;
}

.hall-capacity {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.hall-desc {
    margin: 0;
    font-size: 13px;
    color: #777;
}

.hall-button {
    margin-top: 8px;
    padding: 10px 14px;
    background: #4c8bf5;
    border-radius: 999px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.hall-card:hover .hall-button {
    background: #336ad9;
}

/* Responsivitate */

@media (max-width: 900px) {
    /* scalam ușor sala și micșorăm puțin bulinele pe tablete */
    .hall-abs {
        width: 1200px;
    }

    .seat {
        width: 14px;
        height: 14px;
        font-size: 5px;
    }

    .hall-text {
        font-size: 14px;
    }

    .row-label {
        font-size: 10px;
    }
}

@media (max-width: 600px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        font-size: 13px;
    }

    .hall-abs {
        width: 1100px; /* suficient de mare pentru scroll orizontal pe telefon */
    }

    .seat {
        width: 13px;
        height: 13px;
        font-size: 4px;
    }

    .row-label {
        font-size: 9px;
    }

    .hall-text {
        font-size: 12px;
    }

    .main {
        padding-inline: 6px;
    }

    .hall-card {
        max-width: 420px;
    }

    .seat-info {
        font-size: 12px;
    }
}
