/* Admin sign-in, password reset and 2FA pages. Same tokens as the booker portal (booker.css). */
:root {
    --au-ink: #1c1d2b;
    --au-ink-2: #262839;
    --au-bg: #f3f4f8;
    --au-surface: #ffffff;
    --au-line: #e3e5ee;
    --au-text: #22243a;
    --au-muted: #6c7089;
    --au-accent: #7366ff;
    --au-accent-dark: #5b4ee6;
    --au-accent-soft: #eeecff;
    --au-danger: #d1453b;
    --au-success: #1f9254;
    --au-radius: 12px;
    --au-font: "Rubik", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-page {
    background: var(--au-bg);
    color: var(--au-text);
    font-family: var(--au-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.au-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44%) minmax(0, 1fr);
}

/* ---------- brand panel ---------- */
.au-side {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 90% at 0% 0%, #34306b 0%, var(--au-ink) 55%) var(--au-ink);
    color: #fff;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
}

/* soft grid texture */
.au-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(160deg, #000 0%, transparent 75%);
    -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 75%);
}

/* accent glow */
.au-side::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -160px;
    bottom: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(115, 102, 255, .45), transparent 65%);
}

.au-side > * {
    position: relative;
    z-index: 1;
}

.au-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.au-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.au-brand-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .2px;
    line-height: 1.1;
}

.au-brand-name span {
    color: #b9b2ff;
}

.au-brand-name small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #9a9dbb;
    margin-top: 3px;
}

.au-pitch h2 {
    font-size: 34px;
    line-height: 1.18;
    font-weight: 600;
    margin: 0 0 14px;
    max-width: 15ch;
}

.au-pitch p {
    margin: 0;
    color: #b5b8d0;
    font-size: 16px;
    max-width: 38ch;
}

.au-points {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.au-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d9dbec;
    font-size: 15px;
}

.au-points i {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .08);
    color: #c4beff;
    font-size: 15px;
}

.au-side-foot {
    color: #8f92ae;
    font-size: 13px;
}

/* ---------- form side ---------- */
.au-main {
    display: grid;
    place-items: center;
    padding: 48px 24px;
}

.au-card {
    width: 100%;
    max-width: 410px;
}

.au-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--au-accent-soft);
    color: var(--au-accent);
    font-size: 22px;
    margin-bottom: 20px;
}

.au-card h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--au-text);
}

.au-lead {
    color: var(--au-muted);
    margin: 0 0 28px;
}

.au-form {
    display: grid;
    gap: 18px;
}

.au-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--au-text);
    margin-bottom: 7px;
}

.au-input,
.au-password input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--au-line);
    border-radius: 10px;
    background: var(--au-surface);
    color: var(--au-text);
    font: inherit;
    padding: 0 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.au-input::placeholder,
.au-password input::placeholder {
    color: #a3a6bd;
}

.au-input:focus,
.au-password input:focus {
    outline: none;
    border-color: var(--au-accent);
    box-shadow: 0 0 0 4px rgba(115, 102, 255, .14);
}

.au-password {
    position: relative;
}

.au-password input {
    padding-right: 68px;
}

.au-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--au-accent);
    font: 500 13px var(--au-font);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.au-toggle:hover,
.au-toggle:focus-visible {
    background: var(--au-accent-soft);
    outline: none;
}

.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.au-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--au-muted);
    cursor: pointer;
    user-select: none;
}

.au-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--au-accent);
    cursor: pointer;
}

.au-link {
    color: var(--au-accent);
    text-decoration: none;
    font-weight: 500;
}

.au-link:hover {
    color: var(--au-accent-dark);
    text-decoration: underline;
}

.au-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--au-accent);
    color: #fff;
    font: 500 15px var(--au-font);
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}

.au-btn:hover {
    background: var(--au-accent-dark);
}

.au-btn:active {
    transform: translateY(1px);
}

.au-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(115, 102, 255, .3);
}

.au-btn[disabled],
body.auth-busy .au-btn {
    opacity: .75;
    pointer-events: none;
}

/* spinner while a request is running */
body.auth-busy .au-btn i {
    display: none;
}

body.auth-busy .au-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: au-spin .7s linear infinite;
}

@keyframes au-spin {
    to {
        transform: rotate(360deg);
    }
}

.au-foot {
    margin: 26px 0 0;
    text-align: center;
    color: var(--au-muted);
    font-size: 14px;
}

.au-note {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--au-accent-soft);
    color: #4a4396;
    font-size: 13px;
}

/* password strength */
.au-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.au-strength span {
    height: 4px;
    border-radius: 4px;
    background: var(--au-line);
    transition: background .2s ease;
}

.au-strength[data-level="1"] span:nth-child(-n+1) { background: var(--au-danger); }
.au-strength[data-level="2"] span:nth-child(-n+2) { background: #e08a2b; }
.au-strength[data-level="3"] span:nth-child(-n+3) { background: #c5b42a; }
.au-strength[data-level="4"] span:nth-child(-n+4) { background: var(--au-success); }

.au-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--au-muted);
}

.au-hint.is-bad {
    color: var(--au-danger);
}

.au-hint.is-good {
    color: var(--au-success);
}

/* 2FA code boxes (dream.js moves focus between the sibling .auth-input fields) */
.au-otp {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.au-otp .auth-input {
    width: 100%;
    height: 58px;
    border: 1px solid var(--au-line);
    border-radius: 12px;
    background: var(--au-surface);
    text-align: center;
    font: 600 24px var(--au-font);
    color: var(--au-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.au-otp .auth-input:focus {
    outline: none;
    border-color: var(--au-accent);
    box-shadow: 0 0 0 4px rgba(115, 102, 255, .14);
}

/* SweetAlert in the same font */
.swal2-popup {
    font-family: var(--au-font) !important;
    border-radius: 16px !important;
}

/* ---------- tablets & phones ---------- */
@media (max-width: 991.98px) {
    .au-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .au-side {
        padding: 22px 24px;
        gap: 0;
    }

    .au-pitch,
    .au-side-foot {
        display: none;
    }

    .au-side::after {
        width: 260px;
        height: 260px;
        right: -120px;
        bottom: -170px;
    }

    .au-main {
        align-items: start;
        padding: 40px 20px 48px;
    }
}

@media (max-width: 420px) {
    .au-card h1 {
        font-size: 24px;
    }

    .au-otp {
        gap: 7px;
    }

    .au-otp .auth-input {
        height: 52px;
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
