/* ==========================================================================
   ExpoNot – Auth pages (login / password reset)
   ========================================================================== */

:root {
    --auth-navy: #0a1f66;
    --auth-navy-deep: #061240;
    --auth-navy-light: #1a3fa8;
    --auth-blue: #29abe2;
    --auth-blue-dark: #1b8fc2;
    --auth-text: #1f2a44;
    --auth-muted: #6b7a99;
    --auth-border: #dfe5f0;
    --auth-input-bg: #f7f9fc;
    --auth-danger: #d93036;
    --auth-radius: 18px;
}

html,
body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--auth-text);
    background: var(--auth-navy-deep);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Page scaffold ------------------------------------------------------- */

.auth-wrapper {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 16px 24px;
    overflow: hidden;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('../auth-background.jpg') center center / cover no-repeat;
}

.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg,
            rgba(6, 18, 64, 0.90) 0%,
            rgba(8, 26, 92, 0.72) 38%,
            rgba(10, 31, 102, 0.34) 68%,
            rgba(10, 31, 102, 0.16) 100%),
        linear-gradient(180deg, rgba(6, 18, 64, 0.04) 0%, rgba(6, 18, 64, 0.32) 100%);
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1140px;
    margin: auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.auth-container > * {
    min-width: 0;
}

@media (min-width: 992px) {
    .auth-container {
        grid-template-columns: minmax(0, 1.15fr) 470px;
        gap: 72px;
    }
}

/* --- Left side: brand message ------------------------------------------- */

.auth-side {
    color: #fff;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-kicker i {
    color: var(--auth-blue);
}

.auth-side h2 {
    font-size: clamp(1.9rem, 2.9vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    max-width: 540px;
}

.auth-side p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    max-width: 500px;
    margin: 0;
}

/* --- Card ----------------------------------------------------------------- */

.auth-card {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    padding: 40px 40px 34px;
    background: #ffffff;
    border-radius: var(--auth-radius);
    box-shadow:
        0 30px 60px -20px rgba(3, 10, 40, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.35);
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 28px 22px 24px;
    }
}

.auth-logo-link {
    display: block;
    width: fit-content;
    margin: 0 auto 28px;
}

.auth-logo {
    display: block;
    width: 200px;
    height: auto;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--auth-navy);
    margin: 0 0 6px;
}

.auth-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--auth-muted);
    margin: 0 0 28px;
}

/* --- Alerts --------------------------------------------------------------- */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-alert-info {
    background: #eaf6fd;
    border-color: #bfe4f7;
    color: #0b5d85;
}

.auth-alert-success {
    background: #eaf9f0;
    border-color: #bfe8cf;
    color: #146c43;
}

.auth-alert-danger {
    background: #fdf0f0;
    border-color: #f5c6c8;
    color: #a12a2e;
}

/* --- Fields --------------------------------------------------------------- */

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #33405e;
}

.auth-input {
    position: relative;
}

.auth-input .form-control {
    height: 50px;
    padding: 0 48px 0 46px;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-input-bg);
    font-size: 0.98rem;
    color: var(--auth-text);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input .form-control::placeholder {
    color: #a4aec4;
}

.auth-input .form-control:focus {
    outline: none;
    border-color: var(--auth-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(41, 171, 226, 0.18);
}

.auth-input .form-control.is-invalid {
    border-color: #e5484d;
    background-color: #fff5f5;
    background-image: none;
    padding-right: 48px;
}

.auth-input .form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.15);
}

/* Chrome autofill: keep the light input background */
.auth-input .form-control:-webkit-autofill,
.auth-input .form-control:-webkit-autofill:hover,
.auth-input .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-text);
    -webkit-box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #9aa6c2;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input .form-control:focus ~ .auth-icon {
    color: var(--auth-blue);
}

.auth-input .form-control.is-invalid ~ .auth-icon {
    color: #e5484d;
}

.auth-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa6c2;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.auth-toggle:hover {
    color: var(--auth-navy);
    background: rgba(10, 31, 102, 0.06);
}

.auth-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.25);
}

.auth-feedback {
    display: block;
    margin-top: 7px;
    font-size: 0.82rem;
    color: var(--auth-danger);
}

/* --- Remember / forgot row ------------------------------------------------ */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 4px 0 24px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 0.9rem;
    color: #4a5572;
    cursor: pointer;
    user-select: none;
}

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

.auth-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-blue-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--auth-navy);
    text-decoration: underline;
}

/* --- Primary button ------------------------------------------------------- */

.auth-btn {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0e2a85 0%, var(--auth-navy) 55%, var(--auth-navy-light) 100%);
    box-shadow: 0 10px 24px -8px rgba(10, 31, 102, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.auth-btn i {
    font-size: 0.85em;
    transition: transform 0.15s ease;
}

.auth-btn:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(10, 31, 102, 0.65);
}

.auth-btn:hover i {
    transform: translateX(3px);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(41, 171, 226, 0.35);
}

/* --- Footer links --------------------------------------------------------- */

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.auth-footer .auth-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-copy {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding-top: 28px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

.auth-copy-part {
    white-space: nowrap;
}

.auth-copy-sep {
    margin: 0 2px;
}

.auth-copy a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-copy a:hover,
.auth-copy a:focus {
    color: #fff;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .auth-btn,
    .auth-btn i,
    .auth-toggle,
    .auth-input .form-control,
    .auth-icon {
        transition: none;
    }

    .auth-btn:hover {
        transform: none;
    }
}
