/* =========================================
   ARTISHELP AUTHENTICATION
========================================= */

:root {
    --auth-primary: #16a34a;
    --auth-primary-dark: #15803d;
    --auth-primary-light: #f0fdf4;
    --auth-text: #111827;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-bg: #f8fafc;
    --auth-white: #ffffff;
    --auth-danger: #dc2626;
    --auth-danger-bg: #fef2f2;
    --auth-success: #15803d;
    --auth-success-bg: #f0fdf4;
}


/* =========================================
   HEADER
========================================= */

.auth-header {
    width: 100%;
    min-height: 76px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid var(--auth-border);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-logo > span:last-child span {
    color: var(--auth-primary);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--auth-primary);
    color: #ffffff;
    border-radius: 10px;
}

.logo-mark svg {
    width: 22px;
    height: 22px;
}

.auth-header-link {
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-header-link strong {
    color: var(--auth-primary);
    margin-left: 4px;
}

.auth-header-link:hover {
    color: var(--auth-primary-dark);
}


/* =========================================
   PAGE
========================================= */

.auth-page {
    min-height: calc(100vh - 76px);
    padding: 70px 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(22, 163, 74, 0.07),
            transparent 35%
        ),
        var(--auth-bg);
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-intro {
    text-align: center;
    margin-bottom: 30px;
}

.auth-eyebrow {
    display: inline-block;
    color: var(--auth-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.auth-intro h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(2rem, 5vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -1px;
}

.auth-intro p {
    max-width: 450px;
    margin: 15px auto 0;
    color: var(--auth-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}


/* =========================================
   CARD
========================================= */

.auth-card {
    background: var(--auth-white);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.07);
}


/* =========================================
   FORM
========================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group > label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-text);
    font-size: 0.88rem;
    font-weight: 650;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > svg {
    position: absolute;
    left: 15px;
    width: 19px;
    height: 19px;
    color: #9ca3af;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 45px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.93rem;
    outline: none;
    transition: 0.2s ease;
}

.ng-phone-prefix {
    position: absolute;
    left: 43px;
    z-index: 1;
    color: var(--auth-text);
    font-size: 0.93rem;
    pointer-events: none;
}

.input-wrapper.ng-phone-input input {
    padding-left: 84px;
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

.input-wrapper input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.09);
}

.input-wrapper input:focus + .password-toggle {
    color: var(--auth-primary);
}


/* =========================================
   PASSWORD TOGGLE
========================================= */

.password-toggle {
    position: absolute;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.password-toggle:hover {
    color: var(--auth-text);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}


/* =========================================
   PASSWORD STRENGTH
========================================= */

.password-strength {
    margin-top: 7px;
    min-height: 16px;
}

.password-strength span {
    color: #9ca3af;
    font-size: 0.75rem;
}


/* =========================================
   ACCOUNT TYPE
========================================= */

.account-options {
    display: grid;
    gap: 10px;
}

.account-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.account-option:hover {
    border-color: #bbf7d0;
    background: #fafffb;
}

.account-option.selected {
    border-color: var(--auth-primary);
    background: var(--auth-primary-light);
}

.account-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.account-option-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--auth-primary);
    background: #ffffff;
    border-radius: 10px;
}

.account-option-icon svg {
    width: 22px;
    height: 22px;
}

.account-option-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-option-text strong {
    color: var(--auth-text);
    font-size: 0.88rem;
}

.account-option-text small {
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.radio-check {
    margin-left: auto;
    width: 19px;
    height: 19px;
    border: 1.5px solid #d1d5db;
    border-radius: 50%;
    position: relative;
}

.account-option.selected .radio-check {
    border-color: var(--auth-primary);
}

.account-option.selected .radio-check::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    background: var(--auth-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* =========================================
   TERMS
========================================= */

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--auth-muted);
    font-size: 0.77rem;
    line-height: 1.55;
    cursor: pointer;
    margin: 5px 0 20px;
}

.terms-check input {
    position: absolute;
    opacity: 0;
}

.custom-checkbox {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    position: relative;
}

.terms-check input:checked + .custom-checkbox {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
}

.terms-check input:checked + .custom-checkbox::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
    left: 5px;
    top: 2px;
}

.terms-check a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}


/* =========================================
   SUBMIT BUTTON
========================================= */

.auth-submit {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 11px;
    background: var(--auth-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.auth-submit:hover {
    background: var(--auth-primary-dark);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-arrow {
    width: 18px;
    height: 18px;
}


/* =========================================
   LOADER
========================================= */

.button-loader {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

.auth-submit.loading .button-loader {
    display: block;
}

.auth-submit.loading .submit-arrow {
    display: none;
}

.auth-submit.loading #registerButtonText {
    opacity: 0.9;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   DIVIDER
========================================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: #9ca3af;
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--auth-border);
}


/* =========================================
   SECONDARY BUTTON
========================================= */

.secondary-auth-button {
    width: 100%;
    height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: var(--auth-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 650;
    transition: 0.2s ease;
}

.secondary-auth-button:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}


/* =========================================
   MESSAGES
========================================= */

.auth-message {
    display: none;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.auth-message.error {
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    border: 1px solid #fecaca;
}

.auth-message.success {
    color: var(--auth-success);
    background: var(--auth-success-bg);
    border: 1px solid #bbf7d0;
}

.auth-message.show {
    display: block;
}


/* =========================================
   FOOTER
========================================= */

.auth-footer {
    text-align: center;
    padding: 25px 20px;
    background: #ffffff;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.75rem;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .auth-header {
        padding: 0 20px;
        min-height: 68px;
    }

    .auth-header-link {
        font-size: 0.75rem;
    }

    .auth-header-link strong {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

    .auth-page {
        padding: 45px 15px;
    }

    .auth-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .auth-intro h1 {
        font-size: 1.9rem;
    }

    .auth-intro p {
        font-size: 0.86rem;
    }

}

/* =========================================
   LOGIN SPECIFIC
========================================= */

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.form-label-row label {
    margin-bottom: 8px;
}

.forgot-password {
    margin-bottom: 8px;
    color: var(--auth-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.forgot-password:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}


/* =========================================
   REMEMBER ME
========================================= */

.remember-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -3px 0 20px;
    color: var(--auth-muted);
    font-size: 0.78rem;
    cursor: pointer;
}

.remember-check input {
    position: absolute;
    opacity: 0;
}

.remember-box {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    position: relative;
}

.remember-check input:checked + .remember-box {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.remember-check input:checked + .remember-box::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 9px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
    left: 5px;
    top: 2px;
}

/* =========================================
   GOOGLE SIGN-IN BUTTON
========================================= */

.google-signin-button {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #ffffff;
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
    transition: 0.2s ease;
    margin-bottom: 4px;
}

.google-signin-button:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.google-signin-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.google-signin-button svg {
    flex-shrink: 0;
}