/* ===== Forms ===== */
form {
    max-width: 1200px
}

#edit-form {
    max-width: none;
    margin: 0 auto 2rem; /* center and add bottom spacing */
}

.form-row {
    margin-bottom: 1rem
}

label {
    display: block;
    margin-bottom: .4rem;
    color: var(--ink);
    font-weight: 600
}

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
    width: 100%;
    padding: .7rem .8rem;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.25);
    background: #0b1325;
    color: var(--ink);
    transition: border-color .12s ease, box-shadow .12s ease;
}

textarea {
    min-height: 120px
}

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: rgba(124,92,255,.6);
        box-shadow: 0 0 0 3px rgba(124,92,255,.25);
    }

.helper {
    color: var(--muted);
    font-size: .9rem;
    margin-top: .35rem
}

.error {
    color: #fecaca;
    font-weight: 600
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap
}

.inline-hint {
    font-size: .9rem;
    color: var(--muted)
}

.input-hint {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #dc2626;
    transition: color 0.2s ease;
}

    .input-hint.ok {
        color: #16a34a;
    }

.auth-box {
    max-width: 560px;
    margin: 1rem 0;
    padding: var(--gap-2);
    border-radius: var(--rad);
    background: var(--surface);
    border: 1px solid rgba(148,163,184,.12);
    box-shadow: var(--shadow-1)
}

.staff-input {
    max-width: 50%;
}

.password-rules {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

    .password-rules li {
        color: #dc2626;
        transition: color 0.2s ease;
    }

        .password-rules li.ok {
            color: #16a34a;
        }

.password-match,
.input-hint {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #dc2626;
    transition: color 0.2s ease;
}

    .password-match.ok,
    .input-hint.ok {
        color: #16a34a;
    }

.grid.grid-2 {
    align-items: stretch;
}

    .grid.grid-2 > .card {
        display: flex;
        flex-direction: column;
    }

.form-control {
    width: 100%;
    padding: .7rem .8rem;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.25);
    background: #0b1325;
    color: var(--ink);
    transition: border-color .12s ease, box-shadow .12s ease;
}

/* Start a passenger counter on the container */
#passenger-rows {
    counter-reset: passenger;
}

/* Each passenger row increments the counter */
.passenger-row {
    counter-increment: passenger;
    padding-top: 1.4rem;
    margin-top: 1.4rem;
    border-top: 1px solid rgba(30, 64, 175, 1.0);
}

    /* No divider line above the very first one */
    .passenger-row:first-of-type {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }

/* The heading text comes from the counter */
.passenger-title::before {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.9;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-wrapper input {
        width: 100%;
        padding-right: 2.4rem;
    }

/* Timetable modal base (hidden by default) */
.timetable-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* When the checkbox is checked, show the modal */
#timetable-toggle:checked + .timetable-modal {
    display: flex;
}

/* Dark backdrop over the page */
.timetable-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75); /* dark semi-transparent */
}

/* Dialog panel */
.timetable-dialog {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    width: 90vw;
    max-height: 90vh;
    background: #020617;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

/* Timetable image scales nicely inside */
.timetable-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Close “X” in the top-right corner */
.timetable-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

    .timetable-close:hover {
        color: #ffffff;
    }


.eye-toggle {
    position: absolute;
    right: 0.65rem;
    cursor: pointer;
    width: 1.3rem;
    height: 1.3rem;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: .8;
    transition: opacity .2s ease;
}

/* Closed eye (white) */
.eye-toggle {
    background-image: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24">\
<path d="M12 5c-7.633 0-11 7-11 7s3.367 7 11 7 11-7 11-7-3.367-7-11-7zm0 12a5 5 0 110-10 5 5 0 010 10z"/>\
</svg>');
}

    /* Open eye (white) */
    .eye-toggle.open {
        background-image: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24">\
<path d="M12 4.5C5 4.5 1 12 1 12s4 7.5 11 7.5S23 12 23 12s-4-7.5-11-7.5zm0 12a4.5 4.5 0 110-9 4.5 4.5 0 010 9z"/>\
<circle cx="12" cy="12" r="2.5" fill="white"/>\
</svg>');
    }

    .eye-toggle:hover {
        opacity: 1;
    }
