/*
 * ============================================================================
 *  Catch-Up CRM — Login page (FEATURE_NEW_DESIGN)
 * ============================================================================
 *  Split-card layout inspired by modern SaaS auth screens: form on the left,
 *  classy application teaser on the right. Loaded only when the feature flag
 *  is on (see resources/views/auth/login.blade.php).
 * ============================================================================
 */

body.login-new-design {
    --login-accent: #00B7AF;
    --login-accent-hover: #009b94;
    --login-accent-soft: #E6F5F3;
    --login-text: #1F2A37;
    --login-muted: #6B7A8D;
    --login-border: #E4E8EE;
    --login-bg: #EEF1F5;
    --login-card-shadow: 0 24px 64px rgba(38, 64, 90, 0.12), 0 2px 8px rgba(38, 64, 90, 0.06);
    margin: 0;
    min-height: 100vh;
    font-family: 'Quicksand', 'Inter', system-ui, sans-serif;
    background: var(--login-bg);
    color: var(--login-text);
    -webkit-font-smoothing: antialiased;
}

body.login-new-design #app,
body.login-new-design #wrapper,
body.login-new-design #page-wrapper {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

.login-nd {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    box-sizing: border-box;
}

.login-nd__card {
    display: flex;
    width: 100%;
    max-width: 1080px;
    min-height: 620px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--login-card-shadow);
    overflow: hidden;
}

.login-nd__card--narrow {
    max-width: 440px;
    min-height: auto;
}

.login-nd__form-panel--full {
    flex: 1 1 auto;
    max-width: none;
}

.login-nd__auth-content {
    text-align: left;
    color: var(--login-muted);
    font-size: 14px;
}

.login-nd__auth-content .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-nd__auth-content .form-control {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--login-border);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--login-text);
    background: #ffffff;
    box-shadow: none;
}

.login-nd__auth-content .form-control:focus {
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(0, 183, 175, 0.15);
    outline: none;
}

.login-nd__auth-content .btn-primary-hu {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: var(--login-accent) !important;
    border-color: var(--login-accent) !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
}

.login-nd__auth-content .btn-primary-hu:hover,
.login-nd__auth-content .btn-primary-hu:focus {
    background: var(--login-accent-hover) !important;
    border-color: var(--login-accent-hover) !important;
}

.login-nd__auth-content a {
    color: var(--login-accent);
    font-weight: 600;
}

.login-nd__auth-content a:hover {
    color: var(--login-accent-hover);
}

/* -------------------------------------------------------------------------- */
/*  Form panel                                                                */
/* -------------------------------------------------------------------------- */

.login-nd__form-panel {
    flex: 0 0 42%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    box-sizing: border-box;
    background: #ffffff;
}

.login-nd__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.login-nd__brand-logo {
    height: 36px;
    width: auto;
}

.login-nd__title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--login-text);
    text-align: left;
}

.login-nd__subtitle {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--login-muted);
    text-align: left;
}

.login-nd__form .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-nd__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--login-text);
}

.login-nd__form .form-control {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--login-border);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--login-text);
    background: #ffffff;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-nd__form .form-control:focus {
    border-color: var(--login-accent);
    box-shadow: 0 0 0 3px rgba(0, 183, 175, 0.15);
    outline: none;
}

.login-nd__form .form-control.is-invalid {
    border-color: #dc3545;
}

.login-nd__submit {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    margin-bottom: 0;
    border: none;
    border-radius: 12px;
    background: var(--login-accent);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.login-nd__submit:hover,
.login-nd__submit:focus {
    background: var(--login-accent-hover);
    color: #ffffff;
    outline: none;
}

.login-nd__submit:active {
    transform: translateY(1px);
}

.login-nd__forgot {
    margin-top: 16px;
    text-align: center;
}

.login-nd__forgot a {
    color: var(--login-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.login-nd__forgot a:hover {
    color: var(--login-accent-hover);
    text-decoration: underline;
}

.login-nd__form .invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/*  Teaser panel — angled app screenshots                                     */
/* -------------------------------------------------------------------------- */

.login-nd__teaser {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0, 183, 175, 0.12), transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(84, 189, 191, 0.18), transparent 50%),
        linear-gradient(160deg, #F7FAFB 0%, #E8EEF2 100%);
    min-height: 100%;
}

.login-nd__teaser-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
}

.login-nd__teaser-stack {
    position: relative;
    width: 92%;
    height: 78%;
    max-width: 560px;
    transform-style: preserve-3d;
    transform: rotateY(-8deg) rotateX(4deg) rotateZ(-2deg);
}

.login-nd__shot {
    position: absolute;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 28px 60px rgba(38, 64, 90, 0.18),
        0 4px 12px rgba(38, 64, 90, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.login-nd__shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.login-nd__shot--back {
    width: 78%;
    height: 72%;
    top: 4%;
    right: 0;
    opacity: 0.92;
    transform: translateZ(-40px) translateX(8%) rotate(3deg);
}

.login-nd__shot--front {
    width: 88%;
    height: 82%;
    left: 0;
    bottom: 0;
    transform: translateZ(20px);
}

/* -------------------------------------------------------------------------- */
/*  Responsive                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .login-nd {
        padding: 16px;
        align-items: flex-start;
    }

    .login-nd__card {
        flex-direction: column;
        min-height: auto;
        max-width: 480px;
    }

    .login-nd__form-panel {
        flex: none;
        max-width: none;
        padding: 36px 28px 28px;
    }

    .login-nd__teaser {
        min-height: 280px;
        order: -1;
    }

    .login-nd__teaser-stack {
        transform: none;
        width: 90%;
        height: 86%;
    }

    .login-nd__shot--back {
        display: none;
    }

    .login-nd__shot--front {
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        bottom: auto;
    }
}

@media (max-width: 480px) {
    .login-nd__form-panel {
        padding: 28px 20px;
    }

    .login-nd__title {
        font-size: 24px;
    }
}
