/* Login pages (layouts/authentication) */
:root {
    --auth-primary: #900f6c;
    --auth-primary-dark: #750c58;
    --auth-gold: #d9a441;
    --auth-tint: #f7eef5;
    --auth-border: #e9dbe6;
    --auth-text: #1f1320;
    --auth-muted: #7b6a78;
}

body.auth {
    min-height: 100vh;
    margin: 0;
    background: #2a0821;
    color: var(--auth-text);
    overflow-x: hidden;
}

/* Blurred event artwork behind everything */
.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(900px 600px at 70% 30%, #6b1a78 0%, #2a0821 70%);
}
.auth-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(36px) brightness(.55) saturate(1.2);
    transform: scale(1.2);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Event artwork */
.auth-art {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.25rem 2.5rem;
}
.auth-art img {
    display: block;
    max-width: 100%;
    max-height: 40vh;
    width: auto;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .65);
}

/* Form panel */
.auth-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: -1.5rem;
    background: #fff;
    border-radius: 1.75rem 1.75rem 0 0;
    padding: 1.75rem 1.25rem 1.25rem;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: start;
}
.auth-logo { display: none; }
.auth-logo img { width: 150px; height: auto; }

.auth-head h1 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--auth-text); }
.auth-head p { margin: .4rem 0 0; font-size: .88rem; line-height: 1.9; color: var(--auth-muted); }
.auth-head b { color: var(--auth-text); }
.auth-head a { color: var(--auth-primary); font-weight: 600; }
.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .6rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--auth-primary);
    background: var(--auth-tint);
}
.auth-badge::before {
    content: "";
    width: .4rem;
    height: .4rem;
    transform: rotate(45deg);
    background: var(--auth-gold);
}

/* Mobile / access-code switch */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
    padding: .25rem;
    border-radius: .9rem;
    background: #f4eef3;
}
.auth-tabs a {
    padding: .6rem .5rem;
    border-radius: .7rem;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: var(--auth-muted);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.auth-tabs a:hover { color: var(--auth-primary); }
.auth-tabs a.active { background: #fff; color: var(--auth-primary); box-shadow: 0 2px 8px -2px rgba(117, 26, 116, .25); }

.auth-form { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.auth-label { display: block; margin-bottom: .4rem; font-size: .8rem; font-weight: 600; color: #4a3447; }

.auth-input.input-group {
    flex-wrap: nowrap;
    border: 1.5px solid var(--auth-border);
    border-radius: .9rem;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-input.input-group:focus-within { border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(144, 15, 108, .12); }
.auth-input .input-group-text {
    border: 0;
    border-radius: 0;
    padding: 0 .9rem;
    background: var(--auth-tint);
    color: var(--auth-primary);
}
.auth-input .input-group-text svg { width: 1.2rem; height: 1.2rem; }
.auth-input .form-control,
.auth-field {
    height: 3.25rem;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
    font-size: 1.05rem;
    letter-spacing: .04em;
    color: var(--auth-text);
}
.auth-field {
    width: 100%;
    border: 1.5px solid var(--auth-border);
    border-radius: .9rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: .2em;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-field:focus { outline: 0; border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(144, 15, 108, .12) !important; }
.auth-input .form-control::placeholder, .auth-field::placeholder { color: #b9a9b6; letter-spacing: .04em; font-weight: 400; }
.auth-input .form-control:focus { text-indent: 0; }

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 3.25rem;
    border: 0;
    border-radius: .9rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    box-shadow: 0 12px 24px -12px rgba(144, 15, 108, .9);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    text-decoration: none;
}
.auth-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(144, 15, 108, .95); }
.auth-btn svg { width: 1.1rem; height: 1.1rem; }
.auth-btn-outline {
    color: var(--auth-primary);
    background: #fff;
    border: 1.5px solid var(--auth-border);
    box-shadow: none;
}
.auth-btn-outline:hover { color: var(--auth-primary); border-color: var(--auth-primary); box-shadow: none; }
.auth-btn:disabled { opacity: .5; transform: none; }

.auth-note {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin: 0;
    padding: .75rem .9rem;
    border-radius: .9rem;
    font-size: .8rem;
    line-height: 1.9;
    color: #5d4a5a;
    background: #fbf6fa;
}
.auth-note svg { flex-shrink: 0; width: 1.1rem; height: 1.1rem; margin-top: .25rem; color: var(--auth-gold); }

.auth-card .alert { margin: 0; border-radius: .9rem; font-size: .85rem; }
.auth-card .standalone-error, .auth-card .invalid-feedback { font-size: .8rem !important; }

/* One-time code boxes */
.auth-otp.opt-section {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .5rem;
    margin: 0;
    direction: ltr;
}
.auth-otp .otp-field-holder { width: auto; padding: 0; }
.auth-otp .otp-field {
    width: 100%;
    height: 3.4rem;
    padding: 0;
    border: 1.5px solid var(--auth-border);
    border-radius: .8rem;
    background: #fff;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--auth-primary);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.auth-otp .otp-field::placeholder { color: #d8c9d4; font-size: 1rem; }
.auth-otp .otp-field:focus { outline: 0; border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(144, 15, 108, .12); }
.auth-otp .otp-field:not(:placeholder-shown) { background: var(--auth-tint); border-color: #d7b6cf; }
.auth-otp .standalone-error { grid-column: 1 / -1; text-align: center; direction: rtl; }

.auth-resend { text-align: center; font-size: .82rem; color: var(--auth-muted); }
.auth-resend strong { color: var(--auth-primary); }
.auth-resend .auth-btn { margin-top: .6rem; }

.auth-foot {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
    font-size: .75rem;
    color: #a8949f;
}
.auth-foot a { color: var(--auth-muted); text-decoration: none; }
.auth-foot a:hover { color: var(--auth-primary); }

@media (min-width: 992px) {
    .auth-shell {
        flex-direction: row;
        align-items: stretch;
    }
    /* In RTL the panel comes first, so it sits on the right */
    .auth-panel {
        order: 0;
        flex: 0 0 480px;
        margin: 1.25rem;
        border-radius: 1.75rem;
        padding: 2.5rem 2.75rem 1.5rem;
        box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6);
        justify-content: center;
    }
    .auth-card { margin-block: auto; }
    .auth-foot { margin-top: 0; }
    .auth-logo { display: block; margin-bottom: .25rem; }
    .auth-art { order: 1; flex: 1; padding: 3rem; }
    .auth-art img { max-height: calc(100vh - 6rem); }
    .auth-head h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth * { transition: none !important; }
}
