/* ==========================================================================
   AUTHENTICATION STYLES (LOGIN & REGISTER)
   Brand: NHÀ PHỐ VIỆT NAM (Luxury Real Estate)
   BEM Architecture, Responsive & Pixel-Accurate Design
   ========================================================================== */

:root {
    --auth-brand-green-dark: #019a43;
    --auth-brand-green-main: #01B750;
    --auth-brand-green-light: #1cd46a;
    --auth-brand-green-gradient: #01B750;
    --auth-btn-gradient-hover: #019a43;
    --auth-text-dark: #111827;
    --auth-text-sub: #4b5563;
    --auth-text-muted: #6b7280;
    --auth-border-color: #e5e7eb;
    --auth-border-hover: #d1d5db;
    --auth-card-radius: 20px;
    --auth-input-radius: 8px;
    --auth-btn-radius: 8px;
    --auth-card-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Base Fullpage Wrap */
.auth-layout {
    min-height: 100vh;
    width: 100%;
    position: relative;
    background-color: #f3f4f6;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.auth-layout--login {
    background-image: url('/assets/admin/images/bglogin.png');
}

.auth-layout--register {
    background-image: url('/assets/admin/images/bglogin.png');
}

/* Subtle overlay to enhance contrast and typography */
.auth-layout__backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(0, 0, 0, 0.05) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Main Container */
.auth-layout__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Left Hero Showcase */
.auth-hero {
    flex: 1 1 55%;
    max-width: 580px;
    color: #111827;
}

.auth-hero__brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--auth-brand-green-dark);
    margin-bottom: 12px;
}

.auth-hero__title {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    letter-spacing: -0.025em;
}

.auth-hero__title--highlight {
    display: block;
    font-style: italic;
    font-weight: 800;
    color: var(--auth-brand-green-main);
    letter-spacing: -0.02em;
}

.auth-hero__desc {
    font-size: 14.5px;
    line-height: 1.6;
    font-weight: 400;
    color: #374151;
    margin: 0 0 28px 0;
    max-width: 440px;
}

.auth-hero__features {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.auth-hero__feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2937;
}

.auth-hero__feature-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-brand-green-main);
    flex-shrink: 0;
}

.auth-hero__feature-icon .material-icons-outlined {
    font-size: 20px;
}

/* Right / Center Auth Card */
.auth-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: var(--auth-card-radius);
    padding: 34px 32px 30px;
    box-shadow: var(--auth-card-shadow);
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-card--register {
    max-width: 425px;
    padding: 28px 30px 24px;
}

/* Card Brand Header */
.auth-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 14px;
    text-decoration: none;
}

.auth-card__logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.auth-card__brand-text {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--auth-brand-green-dark);
    text-transform: uppercase;
}

.auth-card__heading {
    font-size: 23px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 6px 0;
    letter-spacing: -0.015em;
}

.auth-card__subheading {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--auth-text-muted);
    text-align: center;
    margin: 0 0 20px 0;
    padding: 0 10px;
}

/* Form Layout */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
    width: 100%;
}

.auth-card--register .auth-form {
    gap: 11px;
}

/* Input Fields */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.auth-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-field__icon-leading {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 19px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.auth-field__input {
    width: 100%;
    height: 42px;
    padding: 0 38px 0 38px;
    background: #ffffff;
    border: 1px solid var(--auth-border-color);
    border-radius: var(--auth-input-radius);
    font-size: 13.5px;
    color: var(--auth-text-dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.auth-field__input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.auth-field__input:focus {
    border-color: var(--auth-brand-green-main);
    box-shadow: 0 0 0 3px rgba(6, 93, 53, 0.12);
}

.auth-field__input:focus ~ .auth-field__icon-leading {
    color: var(--auth-brand-green-main);
}

.auth-field__input--select {
    padding-right: 36px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.auth-field__input--select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23065d35' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
}

.auth-field__toggle-pwd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.auth-field__toggle-pwd:hover {
    color: #4b5563;
}

.auth-field__toggle-pwd .material-icons-outlined {
    font-size: 18px;
}

.auth-field__error {
    font-size: 11.5px;
    color: #dc2626;
    margin-top: 3px;
    line-height: 1.35;
    display: block;
}

.auth-field__input--error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* Actions Row (Remember me & Forgot Password) */
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 4px;
    font-size: 12.5px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #374151;
    font-size: 12.5px;
    line-height: 1.4;
}

.auth-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.auth-checkbox__custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.auth-checkbox input[type="checkbox"]:checked ~ .auth-checkbox__custom {
    background: var(--auth-brand-green-main);
    border-color: var(--auth-brand-green-main);
}

.auth-checkbox input[type="checkbox"]:checked ~ .auth-checkbox__custom::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.auth-actions__forgot {
    color: var(--auth-brand-green-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-actions__forgot:hover {
    color: var(--auth-brand-green-main);
    text-decoration: underline;
}

/* Primary Button */
.auth-btn-primary {
    width: 100%;
    height: 44px;
    background: var(--auth-brand-green-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--auth-btn-radius);
    font-size: 14.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(1, 183, 80, 0.28);
    margin-top: 4px;
}

.auth-btn-primary:hover {
    background: var(--auth-btn-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(1, 183, 80, 0.35);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-btn-primary .material-icons-outlined {
    font-size: 18px;
    transition: transform 0.15s ease;
}

.auth-btn-primary:hover .material-icons-outlined {
    transform: translateX(2px);
}

.auth-btn-primary:disabled,
.auth-btn-primary--loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 8px 0;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider__text {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    font-size: 11.5px;
    color: #9ca3af;
}

/* Social Buttons */
.auth-btn-social {
    width: 100%;
    height: 40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--auth-btn-radius);
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.auth-btn-social:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.auth-btn-social__icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer Link */
.auth-footer-prompt {
    text-align: center;
    font-size: 12.5px;
    color: #6b7280;
    margin-top: 14px;
}

.auth-footer-prompt__link {
    color: var(--auth-brand-green-main);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.auth-footer-prompt__link:hover {
    color: var(--auth-brand-green-dark);
    text-decoration: underline;
}

/* Terms checkbox highlight */
.auth-checkbox__terms-link {
    color: var(--auth-brand-green-main);
    font-weight: 600;
    text-decoration: none;
}

.auth-checkbox__terms-link:hover {
    text-decoration: underline;
}


/* ==========================================================================
   RESPONSIVE DESIGN (DESKTOP -> TABLET -> MOBILE)
   ========================================================================== */

/* 1. Large Desktop (1440px - 1920px) */
@media (min-width: 1440px) {
    .auth-layout {
        padding: 40px 80px;
    }
    
    .auth-layout__inner {
        max-width: 500px;
    }

    .auth-card {
        max-width: 440px;
        padding: 38px 36px 32px;
    }

    .auth-card--register {
        max-width: 440px;
        padding: 30px 34px 26px;
    }
}

/* 2. Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .auth-layout {
        padding: 30px 24px;
    }

    .auth-layout__inner {
        max-width: 440px;
    }

    .auth-card {
        max-width: 420px;
        padding: 28px 24px;
    }

    .auth-card--register {
        max-width: 420px;
    }
}

/* 3. Small Tablet / Mobile Breakpoint */
@media (max-width: 860px) {
    .auth-layout__inner {
        max-width: 440px;
        margin: 0 auto;
    }

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

/* 4. Mobile (360px - 540px) Bottom Sheet Native App UX */
@media (max-width: 540px) {
    .auth-layout {
        padding: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        background-position: center left;
        background-size: cover !important;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

    .auth-layout__backdrop {
        display: none;
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.15);
        z-index: 1;
    }

    .auth-layout__inner {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-top: 18vh; /* Thừa 1 khoảng trống phía trên nhìn thoáng ảnh phong cảnh */
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        box-sizing: border-box;
    }

    /* Bottom Sheet Card */
    .auth-card {
        max-width: 100%;
        width: 100%;
        background: #ffffff;
        border-radius: 32px 32px 0 0;
        padding: 20px 24px 34px;
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.14);
        border: none;
        box-sizing: border-box;
        position: relative;
    }

    /* Drag Handle Bar Indicator */
    .auth-card::before {
        content: "";
        display: block;
        width: 38px;
        height: 4px;
        border-radius: 2px;
        background: #e5e7eb;
        margin: 0 auto 16px;
    }

    .auth-card__heading {
        font-size: 22px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #065d35;
        text-align: center;
        margin: 0 0 6px 0;
    }

    .auth-card__subheading {
        font-size: 13px;
        line-height: 1.45;
        color: #6b7280;
        text-align: center;
        margin: 0 0 20px 0;
        padding: 0;
    }

    .auth-card__subheading a,
    .auth-footer-prompt__link {
        color: #065d35;
        font-weight: 700;
        text-decoration: none;
    }

    /* Mobile Pill Inputs (Nhộng bo tròn) */
    .auth-field {
        margin-bottom: 3px;
    }

    .auth-field__input {
        height: 48px;
        padding-left: 44px;
        border-radius: 24px;
        background-color: #f0f4f9;
        border: 1px solid transparent;
        font-size: 14.5px;
        color: #111827;
        transition: all 0.2s ease;
    }

    .auth-field__input::placeholder {
        color: #8c9ba8;
    }

    .auth-field__input:focus {
        background-color: #ffffff;
        border-color: #065d35;
        box-shadow: 0 0 0 4px rgba(6, 93, 53, 0.12);
    }

    .auth-field__icon-leading {
        font-size: 20px;
        left: 16px;
        color: #8c9ba8;
    }

    .auth-field__toggle-pwd {
        right: 14px;
        padding: 6px;
    }

    .auth-field__toggle-pwd .material-icons-outlined {
        font-size: 20px;
        color: #8c9ba8;
    }

    .auth-actions {
        margin: 8px 4px 10px;
        font-size: 12.5px;
    }

    .auth-checkbox {
        font-size: 12.5px;
    }

    .auth-checkbox__custom {
        width: 17px;
        height: 17px;
        border-radius: 4px;
    }

    /* Pill Action Button (Viên thuốc lớn) */
    .auth-btn-primary {
        height: 48px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 24px;
        margin-top: 6px;
        box-shadow: 0 4px 14px rgba(1, 183, 80, 0.25);
    }

    .auth-btn-social {
        height: 46px;
        font-size: 13.5px;
        border-radius: 24px;
        background-color: #f0f4f9;
        border: 1px solid transparent;
    }

    .auth-btn-social:hover {
        background-color: #e5ebf2;
    }

    .auth-divider {
        margin: 12px 0;
    }

    .auth-footer-prompt {
        font-size: 13px;
        margin-top: 16px;
    }
}