/* =========================================================
   OYAFI — AUTHENTICATION SYSTEM
   Premium dark fintech
   Login • Register • Verification • Password Reset
   ========================================================= */

/* =========================================================
   BASE
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: #08090d;
    color: #ffffff;
    font-family: inherit;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =========================================================
   PAGE
   ========================================================= */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 32px 20px 60px;

    background:
        radial-gradient(
            circle at 18% 8%,
            rgba(52, 36, 92, 0.20),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 90%,
            rgba(0, 196, 204, 0.07),
            transparent 30%
        ),
        #08090d;
}

/* =========================================================
   CONTAINER
   ========================================================= */

.auth-container {
    width: 100%;
    max-width: 506px;
    margin: 0 auto;
}

/* =========================================================
   BRAND
   ========================================================= */

.auth-brand {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 24px;
}

.auth-brand-logo,
.auth-logo {
    display: block;

    width: 125px;
    height: auto;

    max-width: 70%;

    object-fit: contain;
}

/* =========================================================
   CARD
   ========================================================= */

.auth-card {
    width: 100%;

    padding: 38px;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(28, 29, 37, 0.97),
            rgba(15, 16, 21, 0.98)
        );

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* =========================================================
   HEADERS
   Supports both login and register markup
   ========================================================= */

.auth-header {
    margin-bottom: 30px;
}

.auth-eyebrow {
    display: block;

    margin: 0 0 10px;

    color: #00c4cc;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-title,
.auth-header h1,
.auth-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;

    letter-spacing: -0.04em;
}

.auth-subtitle,
.auth-header p {
    margin: 11px 0 0;

    color: #9699a5;

    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   ERROR MESSAGE
   ========================================================= */

.auth-error {
    margin-bottom: 22px;
    padding: 13px 15px;

    border: 1px solid rgba(255, 80, 80, 0.22);
    border-radius: 12px;

    background: rgba(255, 70, 70, 0.07);

    color: #ff9696;

    font-size: 13px;
    line-height: 1.5;
}

/* =========================================================
   SUCCESS MESSAGE
   ========================================================= */

.auth-success {
    margin-bottom: 22px;
    padding: 13px 15px;

    border: 1px solid rgba(0, 196, 204, 0.22);
    border-radius: 12px;

    background: rgba(0, 196, 204, 0.06);

    color: #8be8eb;

    font-size: 13px;
    line-height: 1.5;
}

/* =========================================================
   FORM
   ========================================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 14px;
}

.auth-field,
.form-group {
    width: 100%;
}

/* =========================================================
   LABELS
   ========================================================= */

.auth-label,
.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #d5d6dc;

    font-size: 12px;
    font-weight: 700;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;
}

.form-label-row label {
    margin-bottom: 0;
}

/* =========================================================
   INPUTS
   Supports register (.auth-input)
   and login (.form-group input)
   ========================================================= */

.auth-input,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    height: 52px;

    padding: 0 15px;

    border: 1px solid #30323b;
    border-radius: 12px;

    outline: none;

    background: #101116;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-input::placeholder,
.form-group input::placeholder {
    color: #656873;
}

.auth-input:hover,
.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.auth-input:focus,
.form-group input:focus {
    border-color: #00c4cc;

    background: #111219;

    box-shadow:
        0 0 0 3px rgba(0, 196, 204, 0.08);
}

/* =========================================================
   PASSWORD WRAPPERS
   ========================================================= */

.auth-password,
.password-wrapper {
    position: relative;
}

.auth-password .auth-input,
.password-wrapper input {
    padding-right: 70px;
}

/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.auth-password-toggle,
.password-toggle {
    position: absolute;

    top: 50%;
    right: 13px;

    transform: translateY(-50%);

    padding: 5px;

    border: 0;

    background: transparent;

    color: #00c4cc;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: color 0.2s ease;
}

.auth-password-toggle:hover,
.password-toggle:hover {
    color: #ffffff;
}

/* =========================================================
   PASSWORD STRENGTH
   ========================================================= */

.auth-password-strength {
    width: 100%;
    height: 3px;

    margin-top: 8px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.06);
}

.auth-password-strength-bar {
    width: 0;
    height: 100%;

    border-radius: inherit;

    transition:
        width 0.25s ease,
        background 0.25s ease;
}

/* =========================================================
   FORGOT PASSWORD
   ========================================================= */

.forgot-link {
    color: #00c4cc;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* =========================================================
   REMEMBER ME
   ========================================================= */

.remember-row {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-top: -3px;

    color: #858792;

    font-size: 12px;

    cursor: pointer;
}

.remember-row input {
    width: 14px;
    height: 14px;

    margin: 0;

    accent-color: #00c4cc;

    cursor: pointer;
}

/* =========================================================
   TERMS
   ========================================================= */

.auth-terms {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    margin: 0;

    color: #858994;

    font-size: 12px;
    line-height: 1.55;
}

.auth-terms input {
    flex: 0 0 auto;

    width: 15px;
    height: 15px;

    margin: 2px 0 0;

    accent-color: #00c4cc;

    cursor: pointer;
}

/* =========================================================
   LINKS
   ========================================================= */

.auth-link,
.auth-footer a,
.forgot-link {
    color: #00c4cc;

    text-decoration: none;
}

.auth-link:hover,
.auth-footer a:hover,
.forgot-link:hover {
    text-decoration: underline;
}

/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.auth-submit {
    width: 100%;
    height: 54px;

    margin-top: 2px;

    border: 0;
    border-radius: 13px;

    background: #00c4cc;
    color: #071014;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        opacity 0.15s ease;
}

.auth-submit:hover {
    filter: brightness(1.08);
}

.auth-submit:active {
    transform: scale(0.99);
}

.auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* =========================================================
   FOOTER
   ========================================================= */

.auth-footer,
.auth-footer-link {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 5px;

    margin-top: 25px;

    color: #777984;

    font-size: 12px;
    line-height: 1.5;

    text-align: center;
}

/* =========================================================
   SECURITY
   ========================================================= */

.auth-security {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 7px;

    margin-top: 18px;

    color: #555862;

    font-size: 11px;

    text-align: center;
}

.auth-security-dot,
.security-dot {
    flex: 0 0 auto;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #00c4cc;

    box-shadow:
        0 0 8px rgba(0, 196, 204, 0.5);
}

/* =========================================================
   AUTH ACTION / SECONDARY BUTTON
   Useful for verification and password-reset screens
   ========================================================= */

.auth-secondary {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    min-height: 50px;

    padding: 12px 18px;

    border: 1px solid rgba(0, 196, 204, 0.35);
    border-radius: 12px;

    background: transparent;
    color: #00c4cc;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.auth-secondary:hover {
    background: rgba(0, 196, 204, 0.07);
    border-color: #00c4cc;
    color: #ffffff;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-actions form {
    margin: 0;
}

.auth-actions .auth-secondary {
    width: 100%;
}

.legal-page {
    align-items: flex-start;
}

.legal-container {
    width: min(100%, 900px);
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.legal-back {
    color: #00c4cc;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.legal-card {
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background: rgba(15, 16, 21, 0.98);
}

.legal-content {
    color: #b9bbc4;
    font-size: 15px;
    line-height: 1.75;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
    color: #fff;
    line-height: 1.25;
}

.legal-content h1 { font-size: 30px; }
.legal-content h2 { margin-top: 32px; font-size: 21px; }
.legal-content h3 { margin-top: 24px; font-size: 17px; }
.legal-content hr { margin: 28px 0; border: 0; border-top: 1px solid #30323b; }
.legal-content strong { color: #fff; }

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .auth-page {
        align-items: flex-start;

        padding: 24px 14px 40px;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-brand {
        margin-bottom: 20px;
    }

    .auth-brand-logo,
    .auth-logo {
        width: 125px;
    }

    .auth-card {
        padding: 28px 20px;

        border-radius: 20px;
    }

    .auth-title,
    .auth-header h1,
    .auth-header h2 {
        font-size: 28px;
    }

    .auth-subtitle,
    .auth-header p {
        font-size: 14px;
        line-height: 1.55;
    }

    .auth-form {
        gap: 18px;
    }

    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-field {
        margin-bottom: 0;
    }

    .auth-input,
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="password"] {
        height: 52px;
    }

    .auth-submit {
        height: 54px;
    }

    .auth-actions {
        grid-template-columns: 1fr;
    }

    .legal-header { align-items: flex-start; flex-direction: column-reverse; }
    .legal-card { padding: 26px 20px; border-radius: 20px; }
    .legal-content { font-size: 14px; }
    .legal-content h1 { font-size: 26px; }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .auth-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .auth-card {
        padding: 24px 16px;
    }

    .auth-title,
    .auth-header h1,
    .auth-header h2 {
        font-size: 26px;
    }
}
