/* ============================================================
   Auth pages (Login, Register, etc.)
   Breakpoints:
     XS  ≤699px
     S   700px–1199px
     M   1200px–1399px
     L   ≥1400px
   ============================================================ */

.auth-body {
    background-color: #eef0f6;
    min-height: 100vh;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
}

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 140px 16px;
    min-height: 100vh;
    box-sizing: border-box;

    @media (max-width: 1199px) and (min-width: 700px) {
        padding: 80px 24px;
    }

    @media (max-width: 699px) {
        padding: 40px 16px;
    }
}

.auth-logo {
    display: block;
    width: auto;
    margin-bottom: 20px;
}

.auth-tagline {
    font-size: 15px;
    color: #333;
    text-align: center;
    margin-bottom: 40px;

    @media (max-width: 699px) {
        font-size: 13px;
        margin-bottom: 28px;
    }
}

.auth-card-wrapper {
    width: 100%;
    max-width: 620px;
}

.auth-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
    padding: 40px 48px;

    @media (max-width: 1399px) and (min-width: 1200px) {
        padding: 36px 40px;
    }

    @media (max-width: 1199px) and (min-width: 700px) {
        padding: 32px 36px;
    }

    @media (max-width: 699px) {
        padding: 24px 20px;
        border-radius: 8px;
    }
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1f2e;
    margin-bottom: 6px;

    @media (max-width: 699px) {
        font-size: 20px;
    }
}

.auth-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;

    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        font-size: 14px;
        color: #374151;

        li + li {
            margin-top: 4px;
        }
    }
}

.auth-alert-icon {
    flex-shrink: 0;
    margin-top: 1px;

    svg {
        display: block;
    }
}

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

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;

    .req {
        color: #dc3545;
        margin-left: 1px;
    }
}

.auth-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 8px 12px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;

    &:focus {
        outline: none;
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }
}

.auth-input-group {
    position: relative;

    .auth-input {
        padding-right: 44px;
    }
}

.auth-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    line-height: 0;

    &:hover {
        color: #6b7280;
    }
}

.auth-field-error {
    display: block;
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
}

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.auth-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3d4a5c;
    flex-shrink: 0;
}

.auth-link-muted {
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;

    &:hover {
        color: #374151;
        text-decoration: underline;
    }
}

.auth-btn {
    display: block;
    width: 100%;
    height: 48px;
    background: #3d4a5c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 28px;

    &:hover,
    &:focus {
        background: #2e3847;
        outline: none;
    }

    &:active {
        background: #232e3a;
    }
}

.auth-footer-text {
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
    margin: 0;

    a {
        font-weight: 700;
        color: #1a1f2e;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }
}

/* ---- Two-column field row (First/Last, Email/Phone) -------- */
/* Stays 2-col on all breakpoints — matches Figma XS spec */
.auth-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- Select (Country) ------------------------------------- */
.auth-select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 8px 12px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    appearance: auto;

    &:focus {
        outline: none;
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }
}

/* ---- Password strength hints ------------------------------ */
.auth-password-hints {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    transition: color 0.15s;

    .auth-hint-icon {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
    }

    &.valid {
        color: #16a34a;
    }
}

/* ---- Address section -------------------------------------- */
.auth-address-divider {
    border: none;
    border-top: 1px solid #f3f4f6;
    margin: 4px 0 20px;
}

.auth-link-sm {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;

    &:hover {
        color: #374151;
        text-decoration: underline;
    }
}

/* ---- Legal text ------------------------------------------- */
.auth-legal {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;

    a {
        color: #6b7280;
        text-decoration: underline;

        &:hover {
            color: #374151;
        }
    }
}
