:root {
    --clh-ink: #102331;
    --clh-muted: #718190;
    --clh-line: #e3e9ed;
    --clh-soft: #f4f7f8;
    --clh-paper: #ffffff;
    --clh-teal: #078e91;
    --clh-teal-dark: #06666f;
    --clh-teal-soft: #dff5f2;
    --clh-navy: #062a38;
    --clh-green: #20b77c;
    --clh-shadow: 0 12px 35px rgba(13, 42, 56, .10);
    --clh-radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0 !important; min-height: 100%; }

body.clh-public-page,
body.clh-crm-page {
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--clh-ink);
    background: var(--clh-soft);
}

body.clh-crm-page { overflow: hidden; }
body.clh-crm-page #wpadminbar { display: none !important; }
body.clh-crm-page.admin-bar { margin-top: 0 !important; }

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Public landing */
.clh-landing {
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 35%, rgba(21, 174, 166, .14), transparent 25%),
        linear-gradient(135deg, #fbfdfd 0%, #f4f8f8 55%, #e7f2f1 100%);
    display: flex;
    flex-direction: column;
}

.clh-landing-nav {
    height: 92px;
    max-width: 1320px;
    width: calc(100% - 72px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid rgba(6, 70, 79, .12);
}

.clh-login-top {
    justify-self: start;
    color: var(--clh-navy);
    text-decoration: none;
    padding: 11px 18px;
    border: 1px solid rgba(6, 70, 79, .22);
    border-radius: 999px;
    font-weight: 700;
    transition: .2s ease;
}

.clh-login-top:hover { background: var(--clh-navy); color: white; }

.clh-wordmark {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 5px;
    align-items: baseline;
    font-family: "Playfair Display", Georgia, serif;
    letter-spacing: .04em;
    color: var(--clh-navy);
}

.clh-wordmark span { font-size: 22px; }
.clh-wordmark strong { font-size: 22px; color: var(--clh-teal); }
.clh-wordmark small { grid-column: 1 / -1; text-align: center; font: 8px "DM Sans", sans-serif; letter-spacing: .32em; }
.clh-secure-label { justify-self: end; font-size: 13px; color: var(--clh-muted); }

.clh-hero {
    flex: 1;
    max-width: 1180px;
    width: calc(100% - 72px);
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 70px 0;
}

.clh-eyebrow {
    display: inline-flex;
    color: var(--clh-teal-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.clh-hero h1 {
    font: 600 clamp(44px, 5vw, 76px)/1.04 "Playfair Display", Georgia, serif;
    margin: 22px 0;
    letter-spacing: -.035em;
}

.clh-hero h1 em { color: var(--clh-teal); font-style: italic; }
.clh-hero-copy > p { font-size: 18px; line-height: 1.7; color: #526673; max-width: 570px; }

.clh-primary-cta {
    margin-top: 20px;
    display: inline-flex;
    gap: 26px;
    align-items: center;
    padding: 16px 20px 16px 24px;
    border-radius: 12px;
    background: var(--clh-teal);
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 12px 26px rgba(7, 142, 145, .24);
}

.clh-primary-cta span { font-size: 22px; }
.clh-trust-row { display: flex; gap: 24px; margin-top: 32px; color: var(--clh-muted); font-size: 12px; }
.clh-trust-row span { display: flex; align-items: center; gap: 7px; }
.clh-trust-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--clh-green); }

.clh-hero-visual { min-height: 500px; position: relative; display: grid; place-items: center; }
.clh-orbit { position: absolute; border: 1px solid rgba(7, 142, 145, .2); border-radius: 50%; }
.clh-orbit-one { width: 430px; height: 430px; }
.clh-orbit-two { width: 310px; height: 310px; border-style: dashed; animation: clh-spin 30s linear infinite; }
@keyframes clh-spin { to { transform: rotate(360deg); } }

.clh-preview-card {
    position: relative;
    width: min(430px, 100%);
    padding: 24px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 28px 70px rgba(8, 64, 72, .18);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    transform: rotate(-2deg);
}

.clh-preview-head { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--clh-line); }
.clh-preview-head > div { display: flex; flex-direction: column; flex: 1; }
.clh-preview-head small { color: var(--clh-muted); margin-top: 2px; }
.clh-preview-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--clh-teal), #6dc4bd); font-weight: 700; }
.clh-online-dot { width: 10px; height: 10px; background: var(--clh-green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(32,183,124,.12); }
.clh-preview-message { padding: 13px 15px; max-width: 82%; border-radius: 14px; margin-top: 18px; font-size: 14px; line-height: 1.45; box-shadow: 0 4px 14px rgba(31,58,68,.06); }
.clh-preview-message.incoming { background: white; border-top-left-radius: 4px; }
.clh-preview-message.outgoing { margin-left: auto; background: #dff9df; border-top-right-radius: 4px; }
.clh-preview-status { margin-top: 24px; display: flex; gap: 8px; align-items: center; padding: 12px; background: var(--clh-teal-soft); border-radius: 10px; color: var(--clh-teal-dark); font-size: 13px; font-weight: 700; }
.clh-preview-status span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--clh-teal); color: white; }

.clh-landing-footer { max-width: 1320px; width: calc(100% - 72px); margin: auto; padding: 24px 0; border-top: 1px solid rgba(6,70,79,.12); display: flex; justify-content: space-between; color: var(--clh-muted); font-size: 12px; }

/* Login */
.clh-login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; background: white; }
.clh-login-brand { position: relative; overflow: hidden; background: linear-gradient(145deg, #052b39, #064e58); color: white; padding: 50px 65px; display: flex; flex-direction: column; }
.clh-back-link { color: rgba(255,255,255,.7); text-decoration: none; font-size: 13px; position: relative; z-index: 2; }
.clh-wordmark-light { color: white; width: max-content; margin: 70px 0 0; position: relative; z-index: 2; }
.clh-wordmark-light strong { color: #6dd1c7; }
.clh-login-quote { margin: auto 0; max-width: 480px; position: relative; z-index: 2; }
.clh-login-quote .clh-eyebrow { color: #7ee0d6; }
.clh-login-quote h1 { font: 600 clamp(42px, 4vw, 65px)/1.08 "Playfair Display", Georgia, serif; margin: 20px 0; }
.clh-login-quote p { color: rgba(255,255,255,.7); font-size: 17px; line-height: 1.6; }
.clh-login-decoration { position: absolute; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; right: -220px; bottom: -220px; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018); }
.clh-login-panel { display: grid; place-items: center; padding: 40px; }
.clh-login-form { width: min(420px, 100%); }
.clh-login-heading { margin-bottom: 38px; }
.clh-login-heading h2 { font: 600 38px/1.15 "Playfair Display", Georgia, serif; margin: 0 0 10px; }
.clh-login-heading p { margin: 0; color: var(--clh-muted); }
.clh-mobile-mark { display: none; }
.clh-login-form > label { display: block; margin: 20px 0 8px; font-size: 13px; font-weight: 700; }
.clh-input-wrap { height: 52px; border: 1px solid var(--clh-line); background: #fafcfc; border-radius: 11px; display: flex; align-items: center; gap: 10px; padding: 0 15px; transition: .2s; }
.clh-input-wrap:focus-within { border-color: var(--clh-teal); box-shadow: 0 0 0 4px rgba(7,142,145,.1); background: white; }
.clh-input-wrap span { color: #91a0aa; }
.clh-input-wrap input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; }
.clh-login-options { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 24px; font-size: 12px; }
.clh-checkbox { color: var(--clh-muted); display: flex; gap: 7px; align-items: center; }
.clh-login-options a { color: var(--clh-teal-dark); font-weight: 700; text-decoration: none; }
.clh-login-submit { width: 100%; height: 54px; border: 0; border-radius: 11px; background: var(--clh-teal); color: white; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 18px; cursor: pointer; box-shadow: 0 12px 24px rgba(7,142,145,.2); }
.clh-login-submit:hover { background: var(--clh-teal-dark); }
.clh-login-help { text-align: center; color: var(--clh-muted); font-size: 12px; margin-top: 24px; }
.clh-login-error { border: 1px solid #f4c5c5; color: #a53d3d; background: #fff3f3; border-radius: 9px; padding: 11px 13px; font-size: 13px; }

/* CRM shell */
.clh-app { height: 100vh; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 76px 1fr; background: #f2f5f7; }
.clh-sidebar { grid-row: 1 / -1; background: linear-gradient(175deg, #062d3b 0%, #072431 100%); color: white; padding: 26px 16px 20px; display: flex; flex-direction: column; min-height: 0; box-shadow: 4px 0 20px rgba(6,35,47,.10); z-index: 20; }
.clh-sidebar-brand { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: center; column-gap: 4px; font: 600 19px "Playfair Display", Georgia, serif; margin-bottom: 30px; }
.clh-sidebar-brand strong { color: #69d4ca; }
.clh-sidebar-brand small { grid-column: 1 / -1; text-align: center; font: 7px "DM Sans", sans-serif; letter-spacing: .28em; margin-top: 2px; }
.clh-user-card { display: grid; grid-template-columns: 42px 1fr 24px; align-items: center; gap: 10px; padding: 10px 9px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.clh-user-card > div { min-width: 0; display: flex; flex-direction: column; }
.clh-user-card strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.clh-user-card small { color: rgba(255,255,255,.58); font-size: 11px; margin-top: 3px; }
.clh-user-avatar, .clh-top-avatar { display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, #55bdbb, #218691); font-weight: 700; }
.clh-user-avatar { width: 42px; height: 42px; font-size: 13px; }
.clh-icon-button { border: 0; background: transparent; color: white; cursor: pointer; }
.clh-main-nav { margin-top: 20px; display: flex; flex-direction: column; gap: 5px; }
.clh-main-nav button, .clh-main-nav a { width: 100%; height: 46px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.72); display: flex; gap: 12px; align-items: center; padding: 0 13px; text-decoration: none; cursor: pointer; font-size: 13px; text-align: left; }
.clh-main-nav button:hover, .clh-main-nav a:hover { color: white; background: rgba(255,255,255,.06); }
.clh-main-nav .active { color: white; background: linear-gradient(90deg, rgba(8,156,158,.85), rgba(9,112,122,.65)); box-shadow: inset 0 0 0 1px rgba(91,221,211,.18); }
.clh-main-nav button span, .clh-main-nav a span { width: 20px; font-size: 17px; text-align: center; }
.clh-main-nav b { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; background: #38dec0; color: #043b43; border-radius: 8px; font-size: 11px; }
.clh-sidebar-spacer { flex: 1; }
.clh-plan-card { display: flex; gap: 10px; align-items: center; padding: 14px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; }
.clh-plan-card > span { color: #f1c94a; font-size: 20px; }
.clh-plan-card > div { display: flex; flex-direction: column; }
.clh-plan-card strong { font-size: 12px; }
.clh-plan-card small { margin-top: 2px; font-size: 9px; color: rgba(255,255,255,.57); }
.clh-logout { color: rgba(255,255,255,.63); padding: 17px 10px 0; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.08); text-decoration: none; font-size: 12px; }
.clh-logout span { margin-right: 8px; }

.clh-topbar { grid-column: 2; display: flex; align-items: center; padding: 0 24px; gap: 18px; background: white; border-bottom: 1px solid var(--clh-line); }
.clh-global-search { width: min(600px, 60%); height: 46px; display: flex; align-items: center; gap: 10px; background: #f8fafb; border: 1px solid #e7ecef; border-radius: 10px; padding: 0 14px; }
.clh-global-search span { font-size: 21px; color: #506574; }
.clh-global-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.clh-top-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.clh-notification-button { position: relative; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.clh-notification-button i { position: absolute; right: 0; top: 0; width: 7px; height: 7px; background: #ed5656; border-radius: 50%; box-shadow: 0 0 0 2px white; }
.clh-presence { padding: 9px 13px; border-radius: 999px; background: #f5f8f9; border: 1px solid var(--clh-line); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.clh-presence i { width: 8px; height: 8px; background: var(--clh-green); border-radius: 50%; }
.clh-top-avatar { width: 42px; height: 42px; font-size: 12px; }
.clh-mobile-button { display: none; border: 0; background: transparent; cursor: pointer; font-size: 20px; }

.clh-workspace { grid-column: 2; display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 10px; padding: 10px; min-height: 0; overflow: hidden; }
.clh-inbox, .clh-chat { background: white; border: 1px solid var(--clh-line); border-radius: 13px; overflow: hidden; min-height: 0; }
.clh-inbox { display: flex; flex-direction: column; }
.clh-inbox-header { padding: 18px 18px 13px; display: flex; align-items: center; justify-content: space-between; }
.clh-inbox-header > div { display: flex; gap: 8px; align-items: center; }
.clh-inbox-header h1 { margin: 0; font-size: 19px; }
.clh-demo-badge { padding: 3px 7px; background: #fff2ce; color: #916618; border-radius: 999px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.clh-new-button { height: 38px; padding: 0 15px; border: 0; border-radius: 8px; background: var(--clh-teal); color: white; font-weight: 700; cursor: pointer; }
.clh-new-button span { margin-right: 7px; }
.clh-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--clh-line); padding: 0 9px; }
.clh-tabs button { position: relative; height: 43px; border: 0; background: transparent; color: var(--clh-muted); font-size: 11px; cursor: pointer; }
.clh-tabs button.active { color: var(--clh-teal-dark); font-weight: 800; }
.clh-tabs button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--clh-teal); }
.clh-tabs b { display: inline-grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; margin-left: 3px; border-radius: 7px; background: #edf1f3; color: #677783; font-size: 9px; }
.clh-tabs .active b { background: #dff4f2; color: var(--clh-teal-dark); }
.clh-conversation-list { flex: 1; overflow-y: auto; padding: 5px 9px 14px; }
.clh-conversation { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; gap: 11px; align-items: center; padding: 13px 9px; border: 0; border-bottom: 1px solid #edf1f3; background: white; cursor: pointer; text-align: left; border-radius: 9px; color: inherit; }
.clh-conversation:hover { background: #f7fbfb; }
.clh-conversation.active { background: linear-gradient(90deg, #e6f7f5, #f4fbfa); border-color: transparent; }
.clh-contact-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #72969c, #9eb5ba); color: white; font-size: 14px; font-weight: 700; flex: 0 0 auto; }
.clh-conversation-copy { min-width: 0; }
.clh-conversation-copy strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clh-conversation-copy p { color: var(--clh-muted); font-size: 11px; margin: 4px 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clh-status-pill { display: inline-flex; padding: 3px 8px; border-radius: 6px; background: #e8eef1; color: #4e626f; font-size: 9px; }
.clh-status-pill.nuevo, .clh-status-pill.en_atencion { background: #dceeff; color: #176bac; }
.clh-status-pill.bot_atendiendo { background: #e1f4f1; color: #087a78; }
.clh-status-pill.esperando_comercial { background: #fff0d1; color: #9c6810; }
.clh-status-pill.cerrado { background: #dff5e9; color: #16714b; }
.clh-conversation-meta { align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; color: var(--clh-muted); font-size: 9px; white-space: nowrap; }
.clh-unread { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; background: var(--clh-green); color: white; border-radius: 50%; font-weight: 700; }
.clh-empty-list { display: grid; place-items: center; text-align: center; color: var(--clh-muted); min-height: 240px; padding: 30px; }
.clh-list-loading { display: grid; gap: 10px; padding: 15px 5px; }
.clh-list-loading i { display: block; height: 64px; border-radius: 8px; background: linear-gradient(90deg, #f0f3f4 25%, #f8fafa 50%, #f0f3f4 75%); background-size: 200% 100%; animation: clh-shimmer 1.3s infinite; }
@keyframes clh-shimmer { to { background-position: -200% 0; } }

.clh-chat { display: flex; flex-direction: column; position: relative; }
.clh-chat-empty .clh-empty-state { display: grid; }
.clh-empty-state { flex: 1; display: none; place-content: center; text-align: center; color: var(--clh-muted); padding: 30px; }
.clh-empty-state h2 { color: var(--clh-ink); font-size: 20px; margin: 14px 0 5px; }
.clh-empty-state p { margin: 0; font-size: 12px; }
.clh-empty-icon { margin: auto; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--clh-teal-soft); color: var(--clh-teal); font-size: 34px; }
.clh-chat-header { height: 78px; padding: 0 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--clh-line); flex: 0 0 auto; }
.clh-chat-contact { min-width: 120px; }
.clh-chat-contact > div { display: flex; align-items: center; gap: 7px; }
.clh-chat-contact h2 { margin: 0; font-size: 15px; white-space: nowrap; }
.clh-chat-contact small { color: var(--clh-muted); font-size: 11px; }
.clh-whatsapp-mark { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--clh-green); font-size: 7px; }
.clh-chat-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.clh-assignment { display: flex; flex-direction: column; gap: 2px; }
.clh-assignment span { font-size: 8px; color: var(--clh-muted); text-transform: uppercase; font-weight: 800; }
.clh-assignment select { max-width: 130px; border: 0; color: var(--clh-ink); background: transparent; font-size: 11px; font-weight: 700; outline: 0; }
.clh-tool-button, .clh-close-button { height: 38px; border-radius: 8px; border: 1px solid var(--clh-line); background: white; color: var(--clh-ink); padding: 0 12px; cursor: pointer; font-size: 10px; font-weight: 700; }
.clh-tool-button.bot-paused { border-color: #f1c36c; background: #fff7e7; color: #8b5a08; }
.clh-tool-button.bot-off { border-color: #eca8a8; background: #fff1f1; color: #9b3939; }
.clh-close-button { background: #f4f7f8; border-color: transparent; font-size: 11px; }

.clh-message-area { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 28px; background-color: #f1eee8; background-image: radial-gradient(circle at 15px 15px, rgba(255,255,255,.6) 1px, transparent 1.5px); background-size: 28px 28px; }
.clh-day-label { width: max-content; margin: 0 auto 18px; padding: 6px 14px; background: rgba(255,255,255,.86); border-radius: 999px; color: var(--clh-muted); font-size: 10px; box-shadow: 0 2px 7px rgba(30,50,58,.05); }
.clh-message-row { display: flex; margin: 9px 0; }
.clh-message-row.outbound { justify-content: flex-end; }
.clh-message-bubble { max-width: min(620px, 78%); padding: 10px 13px 7px; border-radius: 11px; background: white; box-shadow: 0 2px 6px rgba(35,57,67,.08); font-size: 13px; line-height: 1.48; }
.clh-message-row.inbound .clh-message-bubble { border-top-left-radius: 3px; }
.clh-message-row.outbound .clh-message-bubble { background: #d9f7d7; border-top-right-radius: 3px; }
.clh-message-row.bot .clh-message-bubble { background: #e4f4f3; border-left: 3px solid var(--clh-teal); }
.clh-message-author { display: block; margin-bottom: 3px; color: var(--clh-teal-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.clh-message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.clh-message-footer { display: flex; justify-content: flex-end; gap: 6px; align-items: center; margin-top: 4px; color: #72818b; font-size: 8px; }
.clh-message-status { color: #168fd2; font-weight: 800; letter-spacing: -2px; }
.clh-media-link { color: var(--clh-teal-dark); font-weight: 700; }

.clh-composer { min-height: 72px; padding: 10px 13px; display: flex; align-items: flex-end; gap: 6px; background: white; border-top: 1px solid var(--clh-line); }
.clh-composer textarea { flex: 1; min-height: 46px; max-height: 130px; resize: none; border: 1px solid var(--clh-line); border-radius: 10px; outline: 0; padding: 13px 14px; font-size: 12px; line-height: 1.4; }
.clh-composer textarea:focus { border-color: #88c9c7; box-shadow: 0 0 0 3px rgba(7,142,145,.08); }
.clh-composer-icon { width: 42px; height: 46px; border: 0; background: transparent; color: #637681; font-size: 21px; cursor: pointer; }
.clh-send-button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--clh-teal); color: white; font-size: 20px; cursor: pointer; box-shadow: 0 6px 15px rgba(7,142,145,.22); }
.clh-send-button:disabled { opacity: .45; cursor: wait; }

.clh-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5,28,38,.28); backdrop-filter: blur(2px); }
.clh-drawer { position: fixed; z-index: 60; right: 0; top: 0; bottom: 0; width: min(450px, 100%); padding: 28px; background: white; box-shadow: -15px 0 40px rgba(10,37,48,.16); overflow-y: auto; }
.clh-drawer-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--clh-line); padding-bottom: 18px; }
.clh-drawer-header h2 { margin: 5px 0 0; font: 600 30px "Playfair Display", Georgia, serif; }
.clh-drawer-header button { border: 0; background: #f3f6f7; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.clh-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin: 22px 0; }
.clh-stat-card { padding: 16px; border: 1px solid var(--clh-line); border-radius: 12px; background: #fafcfc; }
.clh-stat-card strong { display: block; font-size: 27px; color: var(--clh-teal-dark); }
.clh-stat-card span { font-size: 10px; color: var(--clh-muted); }
.clh-agent-stats { border-top: 1px solid var(--clh-line); padding-top: 10px; }
.clh-agent-stats h3 { font-size: 14px; }
.clh-agent-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #eef2f3; font-size: 12px; }
.clh-agent-row b { color: var(--clh-teal-dark); }

.clh-toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.clh-toast { width: min(360px, calc(100vw - 40px)); padding: 13px 15px; border-radius: 10px; background: #103644; color: white; box-shadow: var(--clh-shadow); font-size: 12px; animation: clh-toast-in .2s ease-out; }
.clh-toast.error { background: #923f3f; }
@keyframes clh-toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1050px) {
    .clh-app { grid-template-columns: 74px 1fr; }
    .clh-sidebar { padding-left: 9px; padding-right: 9px; }
    .clh-sidebar-brand span, .clh-sidebar-brand strong { font-size: 0; }
    .clh-sidebar-brand span::after { content: "L"; font-size: 19px; }
    .clh-sidebar-brand strong::after { content: "H"; font-size: 19px; }
    .clh-sidebar-brand small, .clh-user-card > div, .clh-user-card > button, .clh-main-nav button:not(.active), .clh-main-nav a, .clh-plan-card > div, .clh-logout { display: none; }
    .clh-user-card { display: flex; justify-content: center; padding: 9px 0 18px; }
    .clh-main-nav .active { justify-content: center; padding: 0; }
    .clh-main-nav .active span { margin: 0; }
    .clh-main-nav .active b { position: absolute; margin: -28px -46px 0 0; min-width: 17px; height: 17px; }
    .clh-plan-card { justify-content: center; padding: 12px 0; }
    .clh-topbar, .clh-workspace { grid-column: 2; }
    .clh-workspace { grid-template-columns: 335px 1fr; }
    .clh-assignment span { display: none; }
    .clh-tool-button { max-width: 90px; }
}

@media (max-width: 760px) {
    .clh-landing-nav { width: calc(100% - 32px); grid-template-columns: auto 1fr; height: 76px; }
    .clh-landing-nav .clh-wordmark { justify-self: end; }
    .clh-secure-label { display: none; }
    .clh-hero { width: calc(100% - 40px); grid-template-columns: 1fr; padding: 55px 0 35px; }
    .clh-hero-visual { min-height: 390px; }
    .clh-orbit-one { width: 330px; height: 330px; }
    .clh-orbit-two { width: 240px; height: 240px; }
    .clh-landing-footer { width: calc(100% - 32px); }
    .clh-landing-footer span:last-child { display: none; }

    .clh-login-layout { display: block; background: #f6f9f9; padding: 22px; }
    .clh-login-brand { display: none; }
    .clh-login-panel { min-height: calc(100vh - 44px); padding: 26px 20px; background: white; border-radius: 20px; }
    .clh-mobile-mark { display: grid; width: 48px; height: 48px; place-items: center; background: var(--clh-navy); color: #73d6ce; border-radius: 13px; font-weight: 800; margin-bottom: 26px; }

    body.clh-crm-page { overflow: hidden; }
    .clh-app { display: block; height: 100dvh; }
    .clh-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 25px 16px; transform: translateX(-105%); transition: transform .25s ease; }
    .clh-app.menu-open .clh-sidebar { transform: translateX(0); }
    .clh-sidebar-brand span, .clh-sidebar-brand strong { font-size: 19px; }
    .clh-sidebar-brand span::after, .clh-sidebar-brand strong::after { content: none; }
    .clh-sidebar-brand small, .clh-user-card > div, .clh-user-card > button, .clh-main-nav button, .clh-main-nav a, .clh-plan-card > div, .clh-logout { display: flex; }
    .clh-user-card { display: grid; padding: 9px 9px 18px; }
    .clh-main-nav .active { justify-content: flex-start; padding: 0 13px; }
    .clh-main-nav .active b { position: static; margin: 0 0 0 auto; }
    .clh-plan-card { justify-content: flex-start; padding: 14px 12px; }
    .clh-logout { display: block; }
    .clh-topbar { height: 64px; padding: 0 12px; gap: 10px; }
    .clh-mobile-button { display: inline-grid; place-items: center; }
    .clh-global-search { flex: 1; width: auto; height: 42px; }
    .clh-global-search input { font-size: 11px; }
    .clh-presence, .clh-notification-button { display: none; }
    .clh-top-avatar { width: 36px; height: 36px; }
    .clh-workspace { height: calc(100dvh - 64px); display: block; padding: 6px; }
    .clh-inbox, .clh-chat { height: 100%; border-radius: 10px; }
    .clh-workspace.chat-open .clh-inbox { display: none; }
    .clh-workspace:not(.chat-open) .clh-chat { display: none; }
    .clh-chat-header { padding: 0 9px; height: 68px; }
    .clh-chat-header .clh-contact-avatar { width: 39px; height: 39px; }
    .clh-chat-contact h2 { max-width: 125px; overflow: hidden; text-overflow: ellipsis; }
    .clh-assignment, .clh-close-button span { display: none; }
    .clh-tool-button { padding: 0 8px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
    .clh-close-button { width: 38px; padding: 0; }
    .clh-message-area { padding: 14px 10px 20px; }
    .clh-message-bubble { max-width: 88%; }
    .clh-composer { padding: 8px; }
    .clh-composer-icon:nth-of-type(1), .clh-composer-icon:nth-of-type(2) { width: 31px; }
    .clh-composer-icon[data-action="voice"] { display: none; }
    .clh-send-button { width: 43px; height: 43px; }
}

@media (max-width: 420px) {
    .clh-hero h1 { font-size: 42px; }
    .clh-preview-card { padding: 18px; }
    .clh-trust-row { flex-direction: column; gap: 8px; }
}
