:root {
    --cp-primary: #2563eb;
    --cp-primary-dark: #1d4ed8;
    --cp-bg: #eff6ff;
    --cp-dark: #0f172a;
    --cp-muted: #64748b;
    --cp-border: #e2e8f0;
    --cp-card: #ffffff;
    --cp-green: #22c55e;
    --cp-whatsapp: #16a34a;
}

* {
    box-sizing: border-box
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.client-portal-login-body {
    min-height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, #1e40af 0, #0f172a 48%, #020617 100%);
    color: #fff;
}

.client-login-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.client-login-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(25px);
    opacity: .35;
    animation: floatGlow 8s ease-in-out infinite;
}

.client-login-glow-a {
    background: #38bdf8;
    left: -120px;
    top: 8%;
}

.client-login-glow-b {
    background: #22c55e;
    right: -120px;
    bottom: 5%;
    animation-delay: 2s;
}

@keyframes floatGlow {
    0%,
    100% {
        transform: translateY(0) scale(1)
    }
    50% {
        transform: translateY(-20px) scale(1.06)
    }
}

.client-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.client-login-card {
    width: min(1080px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(22px);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    overflow: hidden;
}

.client-login-left {
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.client-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.client-login-logo,
.client-portal-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    box-shadow: 0 15px 35px rgba(37, 99, 235, .35);
}

.client-login-brand-title {
    font-weight: 800;
    font-size: 19px;
}

.client-login-brand-subtitle {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.client-login-left h1 {
    font-size: 48px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.04em;
    margin: 0 0 20px;
}

.client-login-left p {
    color: rgba(255, 255, 255, .75);
    font-size: 17px;
    line-height: 1.7;
    max-width: 560px;
}

.client-login-benefits {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    color: #e0f2fe;
    font-weight: 600;
}

.client-login-benefits i {
    color: #22c55e;
    margin-right: 8px;
}

.client-login-right {
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-login-form-card {
    width: 100%;
    background: #fff;
    color: #0f172a;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.client-login-form-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.client-login-form-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.client-login-form-head h2 {
    font-size: 23px;
    font-weight: 800;
    margin: 0;
}

.client-login-form-head p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 13px;
}

.client-input-icon {
    position: relative;
}

.client-input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.client-input-icon .form-control {
    padding-left: 42px;
    height: 48px;
    border-radius: 16px;
}

.client-login-btn {
    height: 50px;
    border-radius: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
}

.client-login-small {
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.client-portal-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #eff6ff 0, #f8fafc 100%);
    color: #0f172a;
}

.client-portal-shell {
    min-height: 100vh;
}

.client-portal-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .18);
}

.client-portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-portal-brand-title {
    font-size: 17px;
    font-weight: 800;
}

.client-portal-brand-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

.client-portal-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.client-portal-user {
    text-align: right;
}

.client-portal-user span {
    display: block;
    font-weight: 800;
}

.client-portal-user small {
    color: rgba(255, 255, 255, .68);
}

.client-portal-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 26px;
}

.client-hero-card {
    min-height: 190px;
    border-radius: 30px;
    background: radial-gradient(circle at 90% 10%, rgba(56, 189, 248, .32), transparent 32%), linear-gradient(135deg, #1d4ed8, #0f172a);
    color: #fff;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 22px 60px rgba(30, 64, 175, .22);
    margin-bottom: 22px;
}

.client-eyebrow {
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 12px;
    color: #bfdbfe;
    font-weight: 800;
    margin-bottom: 8px;
}

.client-hero-card h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.04em;
    font-size: 38px;
}

.client-hero-card p {
    margin: 10px 0 0;
    color: #dbeafe;
    max-width: 650px;
}

.client-chat-open-btn {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 18px;
    height: 54px;
    padding: 0 22px;
    font-weight: 900;
    position: relative;
    box-shadow: 0 18px 40px rgba(34, 197, 94, .28);
}

.client-chat-open-btn:hover {
    background: #16a34a;
    color: #fff;
}

.client-chat-badge {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 8px;
}

.client-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.client-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.client-card-head h2 {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
}

.client-card-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.client-card-head>i {
    font-size: 28px;
    color: #2563eb;
}

.client-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.client-info-grid div {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 13px;
    background: #f8fafc;
}

.client-info-grid span {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    margin-bottom: 4px;
}

.client-info-grid strong {
    font-size: 14px;
    color: #0f172a;
}

.family-mini-card {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px;
    animation: chatFadeUp .25s ease both;
}

.family-mini-title,
.family-section-title {
    font-size: 12px;
    color: #2563eb;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.family-mini-name {
    font-weight: 900;
    margin-bottom: 6px;
}

.family-mini-meta {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.client-empty-box {
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 12px;
}

.client-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 390px;
    height: 600px;
    max-height: calc(100vh - 48px);
    background: #efeae2;
    border-radius: 26px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
    display: flex;
    flex-direction: column;
    animation: chatPop .22s ease both;
}

.client-chat-head {
    background: #075e54;
    color: #fff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-chat-title {
    font-weight: 900;
}

.client-chat-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
}

.client-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(rgba(239, 234, 226, .92), rgba(239, 234, 226, .92)), radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .35), transparent 30%);
}

.client-chat-message {
    display: flex;
    margin-bottom: 10px;
    animation: chatFadeUp .18s ease both;
}

.client-chat-message.is-client {
    justify-content: flex-end;
}

.client-chat-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
}

.client-chat-message.is-client .client-chat-bubble {
    background: #dcf8c6;
    border-bottom-right-radius: 4px;
}

.client-chat-message.is-agent .client-chat-bubble {
    background: #fff;
    border-bottom-left-radius: 4px;
}

.client-chat-time {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 10px;
    text-align: right;
}

.client-chat-form {
    background: #f0f2f5;
    padding: 12px;
    display: flex;
    gap: 8px;
}

.client-chat-form input {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
}

.client-chat-form button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
}

.client-chat-loader {
    text-align: center;
    color: #64748b;
    padding: 24px;
}

@keyframes chatPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96)
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes chatFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media(max-width:991px) {
    .client-login-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .client-login-left {
        padding: 34px;
    }
    .client-login-left h1 {
        font-size: 34px;
    }
    .client-hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .client-info-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:575px) {
    .client-login-shell {
        padding: 12px;
    }
    .client-login-left {
        display: none;
    }
    .client-login-right {
        padding: 12px;
    }
    .client-login-form-card {
        padding: 24px;
    }
    .client-portal-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .client-portal-content {
        padding: 14px;
    }
    .client-hero-card {
        padding: 24px;
        border-radius: 24px;
    }
    .client-hero-card h1 {
        font-size: 28px;
    }
    .client-chat-widget {
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
}