/**
 * Future Helper - Auth Pages Stylesheet (assets/css/auth.css)
 * Matches the clean blue aesthetic, seal wrapper, and mobile-responsive layout.
 */

:root {
    --blue: #1a56db;
    --blue-dk: #1144b8;
    --text: #1e293b;
    --text2: #475569;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --red: #dc2626;
    --green: #16a34a;
}

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

html, body.auth-body {
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14.5px;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── MOBILE-FIRST BASE ── */
.page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #fff;
    padding: 0;
    overflow-y: auto;
}

.card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    background: #fff;
    padding: 44px 24px 36px;
    transform: scale(0.92);
    transform-origin: top center;
}

/* ── CLOSE BUTTON ── */
.close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-decoration: none;
    font-size: 19px;
    z-index: 5;
    transition: all .3s ease;
    padding: 6px;
    border-radius: 8px;
    line-height: 1;
}
.close-btn:hover {
    color: var(--text);
    transform: rotate(90deg);
}

/* ── HEADER ── */
.card-head {
    text-align: center;
    margin-bottom: 20px;
}
.seal-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 14px;
    margin-top: 4px;
    background: #fff;
    border: 2px solid var(--border);
    padding: 4px;
    box-shadow: 0 8px 24px rgba(26,86,219,.15);
}
.seal-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.seal-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.seal-ph {
    font-size: 34px;
    color: var(--blue);
}
.sys-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -.5px;
    margin-bottom: 6px;
    line-height: 1.15;
    text-align: center;
}
.sys-sub {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 24px;
}

/* ── ALERTS / ERRORS ── */
.errs {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--red);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: fadeIn .3s;
    text-align: left;
}
.succs {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--green);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: fadeIn .3s;
    text-align: left;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.errs i, .succs i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── FORM FIELDS ── */
.fg {
    margin-bottom: 16px;
    text-align: left;
}
.fg label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text2);
    margin-bottom: 6px;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.inp {
    position: relative;
}
.inp i.field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14.5px;
    color: #b0bec9;
    pointer-events: none;
    z-index: 1;
    transition: color .2s;
}
.inp input {
    width: 100%;
    height: 48px;
    background: #f4f7fb;
    border: 1.5px solid #94a3b8;
    border-radius: 10px;
    padding: 0 15px 0 44px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none;
}
.inp input::placeholder {
    color: #b0bec9;
}
.inp input:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,.08);
}
.inp:focus-within i.field-icon {
    color: var(--blue);
}
.inp .pw-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 15px;
    padding: 8px 12px;
    z-index: 2;
    transition: color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.inp .pw-toggle:hover {
    color: var(--blue);
}
.msg {
    font-size: 11px;
    margin-top: 4px;
    min-height: 15px;
    font-weight: 500;
    transition: all .2s;
    display: block;
}
.msg.err {
    color: var(--red);
}
.fg.err .inp input {
    border-color: var(--red) !important;
    background: #fff8f8;
}
.fg.err .inp i.field-icon {
    color: var(--red);
}

.forgot-row {
    text-align: right;
    margin: -4px 0 20px;
}
.forgot-row a {
    font-size: 12px;
    color: var(--blue);
    font-weight: 500;
    text-decoration: underline;
}
.forgot-row a:hover {
    color: var(--blue-dk);
}

/* ── BUTTON ── */
.btn-login {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    background: var(--blue);
    color: #fff;
    border: none;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .25s;
    letter-spacing: .3px;
    margin-top: 22px;
}
.btn-login:hover {
    background: var(--blue-dk);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(26,86,219,.32);
}
.btn-login:active {
    transform: scale(.97);
}
.btn-login.loading {
    pointer-events: none;
    opacity: .82;
}

/* ── DIVIDER ── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    color: var(--muted);
    font-size: 13px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── REGISTER / FOOTER ROW ── */
.reg-row {
    text-align: center;
    font-size: 13.5px;
    color: var(--text2);
}
.reg-row a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}
.reg-row a:hover {
    color: var(--blue-dk);
}

/* ── OTP INPUT ROW ── */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 22px;
}
.otp-input {
    width: 44px;
    height: 52px;
    border: 1.5px solid #94a3b8;
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    background: #f4f7fb;
    outline: none;
    transition: all .2s;
    -webkit-appearance: none;
}
.otp-input:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,.08);
}

/* ── DESKTOP ADJUSTMENTS ── */
@media(min-width: 769px) {
    html, body.auth-body {
        font-size: 14px;
    }
    .page {
        align-items: center;
        padding: 20px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(155deg,#3b82c4,#1d6fa0 30%,#1a4d82 60%,#0f3060);
    }
    .page::before {
        display: block;
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        background: rgba(8,28,55,.54);
        backdrop-filter: blur(1.5px);
        -webkit-backdrop-filter: blur(1.5px);
    }
    .page::after {
        display: block;
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        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: 52px 52px;
    }
    .card {
        max-width: 410px;
        padding: 36px 36px 36px;
        border-radius: 18px;
        box-shadow: 0 28px 72px rgba(0,0,0,.30), 0 4px 20px rgba(0,0,0,.14);
        animation: cardUp .6s both;
        zoom: 78%;
        transform: none;
    }
    @keyframes cardUp {
        from { opacity: 0; transform: translateY(30px) scale(.96); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .card-head {
        margin-bottom: 22px;
    }
    .seal-wrap {
        width: 120px;
        height: 120px;
        box-shadow: 0 8px 24px rgba(26,86,219,.15);
        border-color: rgba(255,255,255,.9);
        border-width: 3px;
    }
    .sys-name {
        font-size: 26px;
        margin-bottom: 8px;
    }
    .sys-sub {
        font-size: 12px;
        margin-bottom: 22px;
    }
    .fg {
        margin-bottom: 14px;
    }
    .fg label {
        font-size: 10.5px;
    }
    .inp input {
        height: 46px;
        font-size: 13px;
        border-radius: 9px;
    }
    .btn-login {
        height: 46px;
        font-size: 13.5px;
    }
    .divider {
        margin: 20px 0 16px;
        font-size: 12px;
    }
    .reg-row {
        font-size: 13px;
    }
    .forgot-row {
        margin: -4px 0 18px;
    }
}
