/* =========================================================
   AUTH LAYOUT
   ========================================================= */

.auth-layout {
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 20px;

    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(15, 118, 110, 0.10), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(249, 115, 22, 0.08), transparent 50%),
        var(--background);

    box-sizing: border-box;
}


/* =========================================================
   AUTH CONTAINER
   ========================================================= */

.auth-container {
    width: 100%;
    max-width: 440px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================================
   AUTH BRAND
   ========================================================= */

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-bottom: 24px;

    color: var(--text);

    font-size: 22px;
    font-weight: 700;

    text-decoration: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.auth-brand:hover {
    opacity: 0.9;

    transform: translateY(-1px);

    text-decoration: none;

    color: var(--primary);
}


/* =========================================================
   AUTH BRAND ICON
   ========================================================= */

.auth-brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: var(--radius-md);

    background: var(--primary);

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;

    box-shadow:
        0 6px 18px rgba(15, 118, 110, 0.28);
}


/* =========================================================
   AUTH CARD
   ========================================================= */

.auth-card {
    width: 100%;

    box-sizing: border-box;

    padding: 32px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.10);
}


/* =========================================================
   AUTH FOOTER
   ========================================================= */

.auth-footer {
    width: 100%;

    margin-top: 20px;

    text-align: center;

    color: var(--text-muted);

    font-size: 12px;

    line-height: 1.5;
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login-page {
    width: 100%;
}


/* =========================================================
   LOGIN HEADER
   ========================================================= */

.login-header {
    margin-bottom: 24px;

    text-align: center;
}

.login-header h1 {
    margin: 0 0 8px;

    color: var(--text);

    font-size: 26px;
    font-weight: 700;

    line-height: 1.25;
}

.login-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 14px;

    line-height: 1.5;
}


/* =========================================================
   AUTH FIELD
   ========================================================= */

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;

    margin-bottom: 8px;

    color: var(--text);

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   AUTH LABEL ROW
   ========================================================= */

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 8px;
}

.auth-label-row label {
    margin-bottom: 0;
}

.auth-label-row a {
    color: var(--primary);

    font-size: 12px;

    text-decoration: none;
}

.auth-label-row a:hover {
    color: var(--primary-hover);

    text-decoration: underline;
}


/* =========================================================
   AUTH INPUT
   ========================================================= */

.auth-input {
    width: 100%;
    height: 46px;

    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--surface-secondary);

    color: var(--text);

    outline: none;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-input:focus {
    border-color: var(--primary);

    background: var(--surface);

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.15);
}


/* =========================================================
   PASSWORD
   ========================================================= */

.password-wrapper {
    position: relative;

    width: 100%;
}

.password-wrapper .auth-input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 8px;

    min-width: 48px;
    height: 32px;

    padding: 0;

    transform: translateY(-50%);

    border: none;

    border-radius: 6px;

    background: transparent;

    color: var(--text-muted);

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.06);

    color: var(--text);
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.google-button-host {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.google-button-host > div {
    width: 100% !important;
}

.auth-submit {
    width: 100%;
    height: 46px;

    margin-top: 4px;

    border: none;

    border-radius: var(--radius-md);

    background: var(--primary);

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    background: var(--primary-hover);

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(15, 118, 110, 0.28);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.6;

    cursor: not-allowed;

    box-shadow: none;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.auth-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 24px 0;

    color: var(--text-muted);

    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--border);
}


/* =========================================================
   GOOGLE BUTTON
   ========================================================= */

.google-button {
    width: 100%;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--surface-secondary);

    color: var(--text);

    font-family: inherit;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.google-button:hover {
    background: var(--surface-hover);

    border-color: var(--border-hover);

    transform: translateY(-1px);
}

.google-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ffffff;

    color: #4285f4;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   REGISTER
   ========================================================= */

.auth-register {
    margin-top: 24px;

    text-align: center;

    color: var(--text-muted);

    font-size: 13px;

    line-height: 1.5;
}

.auth-register a {
    margin-left: 5px;

    color: var(--primary);

    font-weight: 600;

    text-decoration: none;
}

.auth-register a:hover {
    color: var(--primary-hover);

    text-decoration: underline;
}


/* =========================================================
   ALERT
   ========================================================= */

.auth-alert {
    margin-bottom: 20px;

    padding: 12px 14px;

    border-radius: var(--radius-md);

    font-size: 13px;

    line-height: 1.5;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.10);

    border: 1px solid rgba(239, 68, 68, 0.25);

    color: #fca5a5;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {

    .auth-layout {
        align-items: flex-start;

        padding: 24px 16px;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-brand {
        margin-bottom: 20px;

        font-size: 20px;
    }

    .auth-brand-icon {
        width: 38px;
        height: 38px;

        font-size: 16px;
    }

    .auth-card {
        padding: 24px 20px;

        border-radius: var(--radius-md);
    }

    .login-header h1 {
        font-size: 23px;
    }

    .auth-footer {
        margin-top: 16px;

        font-size: 11px;
    }
}