:root {
    --esn-bg: #0f131a;
    --esn-bg-soft: #141b24;
    --esn-surface: #171f29;
    --esn-surface-2: #1e2733;
    --esn-surface-3: #263241;
    --esn-sidebar: #111821;
    --esn-sidebar-2: #161e28;
    --esn-ink: #e7edf6;
    --esn-ink-soft: #c8d2de;
    --esn-muted: #94a1b3;
    --esn-line: rgba(255,255,255,0.08);
    --esn-line-strong: rgba(200, 155, 93, 0.34);
    --esn-accent: #c89b5d;
    --esn-accent-soft: rgba(200, 155, 93, 0.16);
    --esn-lead: #79b8bd;
    --esn-contact: #c89b5d;
    --esn-ai: #8f99ff;
    --esn-agent: #7fb0ff;
    --esn-closed: #7d8795;
    --esn-pending: #c89b5d;
    --esn-pass: #6ebc96;
    --esn-fail: #ca6f68;
    --esn-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    --esn-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.18);
    --esn-danger-soft: rgba(192, 92, 92, 0.18);
    --esn-danger-line: rgba(192, 92, 92, 0.34);
}

html, body {
    margin: 0;
    height: 100%;
}

body {
    font-family: "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(211, 163, 100, 0.10), transparent 26%),
        radial-gradient(circle at bottom right, rgba(108, 198, 192, 0.08), transparent 24%),
        linear-gradient(145deg, #0a0d12 0%, var(--esn-bg) 48%, #10151d 100%);
    color: var(--esn-ink);
}

.esn-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body,
button,
input,
select,
textarea,
a,
strong,
span,
summary,
h1,
h2,
h3,
h4,
label,
div {
    color: var(--esn-ink);
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
}

.panel-title,
.esn-nav-group summary,
.esn-db-grid strong,
.esn-db-card-head h3,
.esn-panel-header-block h2,
.esn-message-primary strong {
    font-family: "Segoe UI", sans-serif;
    font-weight: 700;
}

p {
    margin: 0;
    line-height: 1.55;
}

.esn-shell {
    width: 100%;
    height: 100vh;
}

.esn-workspace-shell.is-loading {
    opacity: 0.94;
}

.esn-workspace-shell.is-loading,
.esn-workspace-shell.is-loading * {
    cursor: progress !important;
}

.esn-workspace-shell {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: 100vh;
    overflow: hidden;
}

.esn-workspace-shell > div {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.esn-workspace-center-layout {
    display: grid !important;
    grid-template-columns: 360px minmax(0, 1fr) 390px;
    grid-template-rows: 100%;
    height: 100%;
    overflow: hidden;
}

.esn-workspace-center-layout > div {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.esn-workspace-shell .panel-header,
.esn-workspace-shell .layout-panel-west .panel-header,
.esn-workspace-shell .layout-panel-center .panel-header,
.esn-workspace-shell .layout-panel-east .panel-header {
    background: #0e1218 !important;
    color: var(--esn-accent);
    border-color: var(--esn-line) !important;
}

.esn-workspace-shell .layout-panel,
.esn-workspace-shell .layout-panel .panel,
.esn-workspace-shell .layout-panel .panel-header,
.esn-workspace-shell .layout-panel .panel-body {
    border-color: rgba(36, 44, 56, 0.96) !important;
}

.esn-workspace-shell .layout-panel-west,
.esn-workspace-shell .layout-panel-center,
.esn-workspace-shell .layout-panel-east {
    border-left-color: rgba(36, 44, 56, 0.96) !important;
    border-right-color: rgba(36, 44, 56, 0.96) !important;
}

.esn-workspace-shell .panel-title,
.esn-workspace-shell .panel-header .panel-title {
    color: var(--esn-accent) !important;
    font-weight: 700 !important;
    font-family: "Segoe UI", sans-serif !important;
    letter-spacing: 0.02em;
}

.esn-workspace-shell .panel-tool a {
    opacity: 0.98;
    filter: brightness(0) saturate(100%) invert(73%) sepia(26%) saturate(637%) hue-rotate(353deg) brightness(91%) contrast(88%);
}

.layout-split-west,
.layout-split-east,
.layout-split-proxy-v,
.layout-split-proxy-h {
    background: linear-gradient(180deg, rgba(41, 49, 60, 0.92), rgba(28, 35, 45, 0.96)) !important;
}

.layout-split-west:hover,
.layout-split-east:hover {
    background: linear-gradient(180deg, rgba(57, 67, 81, 0.96), rgba(39, 48, 59, 0.98)) !important;
}

.layout-expand,
.layout-expand .panel-header,
.layout-expand .panel-body {
    background: linear-gradient(180deg, var(--esn-sidebar) 0%, var(--esn-sidebar-2) 100%) !important;
    color: var(--esn-accent) !important;
    border-color: var(--esn-line) !important;
}

.esn-workspace-shell .panel-body {
    background: rgba(13, 17, 23, 0.70);
}

/* EasyUI renders the visible db_card column through a generated east-panel wrapper.
   Target that wrapper directly so warm page gradients cannot bleed into the right rail. */
.esn-workspace-center-layout .layout-panel-east,
.esn-workspace-center-layout .layout-panel-east .panel,
.esn-workspace-center-layout .layout-panel-east .panel-body {
    background: #111821 !important;
}

.esn-main-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    background: linear-gradient(180deg, var(--esn-sidebar) 0%, var(--esn-sidebar-2) 100%);
    border-right: 1px solid var(--esn-line);
}

.esn-main-topbar,
.esn-main-search-block,
.esn-main-footer {
    padding: 9px 12px;
    border-bottom: 1px solid var(--esn-line);
}

.esn-main-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.esn-main-brand {
    min-width: 0;
}

.esn-main-panel-region,
.esn-main-panel-region .panel-body {
    background: linear-gradient(180deg, var(--esn-sidebar) 0%, var(--esn-sidebar-2) 100%);
}

.esn-main-brand strong {
    display: block;
    font-size: 19px;
    line-height: 0.92;
    letter-spacing: 0.04em;
    color: var(--esn-accent);
    font-weight: 700;
}

.esn-brand-kicker,
.esn-kicker,
.esn-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.esn-brand-kicker {
    color: rgba(243, 237, 225, 0.62);
    margin-bottom: 2px;
}

.esn-kicker {
    color: var(--esn-accent);
    margin-bottom: 4px;
}

.esn-label {
    color: var(--esn-accent);
    margin-bottom: 4px;
}

.esn-main-search-form {
    display: grid;
    gap: 8px;
}

.esn-main-search-block,
.esn-panel-header-block,
.esn-message-top-strip {
    padding: 11px 16px 10px;
    background: linear-gradient(180deg, rgba(17, 23, 30, 0.98), rgba(15, 21, 29, 0.98));
    border-bottom: 1px solid var(--esn-line);
}

.esn-main-topbar {
    background: linear-gradient(180deg, rgba(17, 23, 30, 0.98), rgba(15, 21, 29, 0.98));
}

.esn-main-search-block {
    background: linear-gradient(180deg, rgba(18, 24, 33, 0.98), rgba(16, 22, 30, 0.98));
    border-bottom: 0;
    padding-bottom: 8px;
}

.esn-search-input {
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    border: 1px solid rgba(200, 155, 93, 0.48);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(25, 33, 44, 0.98), rgba(21, 28, 38, 0.98));
    color: var(--esn-ink);
    padding: 7px 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 0 3px rgba(200, 155, 93, 0.10);
}

.esn-search-input::placeholder {
    color: var(--esn-muted);
    opacity: 1;
}

.esn-search-input:focus {
    outline: none;
    border-color: rgba(200, 155, 93, 0.56);
}

.esn-search-input:focus::placeholder {
    color: transparent;
}

.esn-main-search-results,
.esn-related-list,
.esn-main-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.esn-main-search-results {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.esn-main-search-results li,
.esn-related-list li {
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.esn-main-search-results li {
    background: linear-gradient(180deg, rgba(22, 29, 38, 0.98), rgba(18, 24, 32, 0.98));
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.esn-main-search-results li:hover {
    border-color: rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(27, 35, 46, 0.98), rgba(22, 29, 38, 0.98));
    transform: translateY(-1px);
}

.esn-main-search-results a,
.esn-related-list a {
    display: block;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
}

.esn-main-search-results strong,
.esn-main-search-results span,
.esn-related-list strong,
.esn-related-list span {
    display: block;
}

.esn-related-list strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.esn-window-pill,
.esn-csw-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.esn-window-pill.is-on,
.esn-csw-pill.is-on {
    color: #0c3d1f;
    background: #7ee2a2;
    border-color: #56c486;
}

.esn-window-pill.is-off,
.esn-csw-pill.is-off {
    color: #4a1212;
    background: #f28f8f;
    border-color: #e36a6a;
}

.esn-main-search-results span,
.esn-related-list span,
.esn-nav-link em,
.esn-nav-static em,
.esn-user-card span,
.esn-conversation-card-meta span,
.esn-db-grid span,
.esn-panel-placeholder span {
    color: var(--esn-muted);
}

.esn-scroll-area {
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 155, 93, 0.42) rgba(255,255,255,0.04);
}

.esn-scroll-area::-webkit-scrollbar {
    width: 13px;
}

.esn-scroll-area::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
    border-left: 1px solid rgba(255,255,255,0.05);
}

.esn-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(200, 155, 93, 0.42);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.esn-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 155, 93, 0.56);
}

html,
body,
.layout-panel-body,
.panel-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 155, 93, 0.45) #0f141c;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.layout-panel-body::-webkit-scrollbar,
.panel-body::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.layout-panel-body::-webkit-scrollbar-track,
.panel-body::-webkit-scrollbar-track {
    background: #0f141c;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.layout-panel-body::-webkit-scrollbar-thumb,
.panel-body::-webkit-scrollbar-thumb {
    background: rgba(200, 155, 93, 0.42);
    border-radius: 999px;
    border: 2px solid #0f141c;
}

.esn-surface-card {
    border: 1px solid var(--esn-line);
    background: rgba(21, 27, 35, 0.98);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--esn-shadow-soft);
}

.esn-main-nav {
    flex: 1;
    padding: 8px 10px 10px;
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 7px;
    background: linear-gradient(180deg, rgba(18, 24, 33, 0.98), rgba(16, 22, 30, 0.98));
    padding-top: 4px;
}

.esn-nav-group {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    box-shadow: none;
    overflow: visible;
    transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.esn-nav-group[open] {
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
    border-color: rgba(200, 155, 93, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-nav-group > * {
    flex: 0 0 auto;
}

.esn-nav-group summary,
.esn-nav-link,
.esn-nav-static {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
}

.esn-nav-group summary {
    cursor: pointer;
    justify-content: flex-start;
    text-align: left;
    font-weight: 700;
    color: var(--esn-accent);
    list-style: none;
    background: transparent;
    position: relative;
    border: 1px solid transparent;
    border-radius: 12px;
    padding-left: 16px;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.esn-nav-group summary::-webkit-details-marker {
    display: none;
}

.esn-nav-group summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(200, 155, 93, 0.58);
    box-shadow: 0 0 0 4px rgba(200, 155, 93, 0.08);
    flex: 0 0 auto;
}

.esn-nav-group summary::after {
    content: '›';
    font-size: 21px;
    font-weight: 700;
    color: var(--esn-accent);
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform 140ms ease, color 140ms ease;
}

.esn-nav-group[open] summary::after {
    color: var(--esn-accent);
    transform: rotate(90deg);
}

.esn-nav-group[open] summary {
    background: rgba(200, 155, 93, 0.08);
    border-color: rgba(200, 155, 93, 0.16);
}

.esn-nav-link,
.esn-nav-static {
    color: var(--esn-ink-soft);
    text-decoration: none;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.esn-nav-group > .esn-nav-link,
.esn-nav-group > .esn-nav-static {
    margin-left: 14px;
    padding: 10px 13px 10px 16px;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-radius: 0 10px 10px 0;
    font-size: 13px;
}

.esn-nav-action {
    padding-right: 10px;
}

.esn-nav-action span {
    color: var(--esn-accent);
}

.esn-nav-action em {
    min-width: 18px;
    margin-right: 8px;
    color: var(--esn-accent);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.esn-nav-group > .esn-nav-link:first-of-type,
.esn-nav-group > .esn-nav-static:first-of-type {
    margin-top: 4px;
}

.esn-nav-group > .esn-nav-link:last-of-type,
.esn-nav-group > .esn-nav-static:last-of-type {
    margin-bottom: 6px;
}

.esn-nav-link.is-active,
.esn-nav-static.is-active {
    background: linear-gradient(180deg, rgba(200, 155, 93, 0.18), rgba(200, 155, 93, 0.10));
    color: var(--esn-ink);
}

.esn-nav-group > .esn-nav-link.is-active,
.esn-nav-group > .esn-nav-static.is-active {
    border-left-color: rgba(200, 155, 93, 0.7);
    background: linear-gradient(180deg, rgba(200, 155, 93, 0.22), rgba(200, 155, 93, 0.10));
}

.esn-nav-link:hover,
.esn-nav-static:hover,
.esn-nav-group summary:hover {
    background: rgba(255,255,255,0.05);
}

.esn-nav-static {
    margin-top: 2px;
}

.esn-nav-link.esn-nav-link-compact {
    padding: 8px 13px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--esn-ink-muted);
}

.esn-nav-link.esn-nav-link-main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 4px;
    padding: 11px 13px 11px 16px;
    font-weight: 700;
    color: var(--esn-accent);
    border: 1px solid transparent;
    border-radius: 12px;
    text-align: left;
}

.esn-nav-link.esn-nav-link-main::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(200, 155, 93, 0.58);
    box-shadow: 0 0 0 4px rgba(200, 155, 93, 0.08);
    flex: 0 0 auto;
}

.esn-nav-link.esn-nav-link-main.is-active {
    background: rgba(200, 155, 93, 0.08);
    border-color: rgba(200, 155, 93, 0.16);
    color: var(--esn-accent);
}

.esn-nav-link.esn-nav-link-main:hover {
    background: rgba(255,255,255,0.05);
}

button.esn-nav-static {
    width: 100%;
    border: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.esn-main-footer {
    display: grid;
    flex: 0 0 auto;
    gap: 8px;
}

.esn-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.esn-account-switch {
    position: relative;
}

.esn-account-switch summary {
    list-style: none;
    cursor: pointer;
}

.esn-account-switch summary::-webkit-details-marker {
    display: none;
}

.esn-account-switch-panel {
    margin: 0;
    width: 220px;
    padding: 12px;
    display: grid;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(24, 31, 41, 0.99), rgba(18, 24, 33, 0.99));
    box-shadow: var(--esn-shadow);
    position: absolute;
    z-index: 60;
    bottom: calc(100% + 8px);
    left: 0;
}

.esn-footer-icon-button { width:36px; height:36px; padding:0; display:inline-grid; place-items:center; position:relative; border:1px solid rgba(129,157,182,.38); border-radius:10px; background:#1a2937; color:#dce9f3; font-size:18px; }
.esn-footer-icon-button:hover { background:#22384b; }
.esn-notification-badge { position:absolute; top:-7px; right:-7px; min-width:18px; height:18px; padding:0 4px; display:grid; place-items:center; border:2px solid #131c25; border-radius:999px; background:#d65050; color:#fff; font-size:10px; font-style:normal; font-weight:800; }
.esn-admin-switch .esn-account-switch-panel { left:auto; right:0; width:280px; }
.esn-notification-panel-head { display:grid; gap:2px; padding-bottom:8px; border-bottom:1px solid rgba(255,255,255,.08); }
.esn-notification-panel-head span { color:#91a8ba; font-size:12px; }

.esn-account-switch-form,
.esn-account-switch-return {
    display: grid;
    gap: 10px;
}

.esn-user-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(24, 31, 41, 0.98), rgba(20, 26, 35, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-user-card > div:last-child {
    min-width: 0;
}

.esn-user-card strong {
    display: block;
    font-size: 14px;
    line-height: 1.15;
}

.esn-user-card span {
    font-size: 12px;
    line-height: 1.15;
}

.esn-footer-session {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 0;
}

.esn-status-dots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.esn-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}

.esn-status-dot.is-online,
.esn-status-dot.is-ready,
.esn-status-dot.is-registered,
.esn-status-dot.is-in-call {
    background: #61cf91;
    border-color: rgba(97, 207, 145, 0.58);
    box-shadow: 0 0 0 3px rgba(97, 207, 145, 0.14);
}

.esn-status-dot.is-away,
.esn-status-dot.is-registering,
.esn-status-dot.is-connecting,
.esn-status-dot.is-outgoing,
.esn-status-dot.is-incoming {
    background: #e2b05a;
    border-color: rgba(226, 176, 90, 0.58);
    box-shadow: 0 0 0 3px rgba(226, 176, 90, 0.14);
}

.esn-status-dot.is-offline,
.esn-status-dot.is-idle,
.esn-status-dot.is-error,
.esn-status-dot.is-unregistered {
    background: #d56f69;
    border-color: rgba(213, 111, 105, 0.58);
    box-shadow: 0 0 0 3px rgba(213, 111, 105, 0.14);
}

.esn-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 13px;
    font-weight: 700;
    color: var(--esn-ink);
}

.esn-button {
    width: 100%;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(200, 155, 93, 0.42);
    background: linear-gradient(180deg, rgba(200, 155, 93, 0.26), rgba(200, 155, 93, 0.13));
    color: #fff7eb;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(0,0,0,0.18);
}

.esn-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(200, 155, 93, 0.56);
    background: linear-gradient(180deg, rgba(200, 155, 93, 0.32), rgba(200, 155, 93, 0.16));
}

.esn-button-small {
    width: auto;
    min-height: 32px;
    padding: 6px 12px;
}

.esn-column-panel,
.esn-db-card-shell {
    height: 100%;
}

.esn-column-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.esn-flash {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--esn-line);
    font-size: 13px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: var(--esn-shadow-soft);
    transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease, margin 180ms ease, padding 180ms ease;
    max-height: 120px;
    overflow: hidden;
}

.esn-flash-title,
.esn-flash-detail {
    display: block;
}

.esn-flash-title {
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.esn-flash-detail {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    opacity: 0.92;
}

.esn-flash.is-fading {
    opacity: 0;
    transform: translateY(-4px);
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.esn-flash-success {
    background: rgba(77, 163, 114, 0.14);
    color: #bce8c6;
    border-color: rgba(77, 163, 114, 0.35);
}

.esn-flash-error {
    background: rgba(216, 70, 70, 0.14);
    color: #ffb8b1;
    border-color: rgba(216, 70, 70, 0.34);
    box-shadow: var(--esn-shadow-soft);
}

.esn-conversations-panel {
    background: rgba(20, 26, 34, 0.96);
}

.esn-panel-header-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.esn-panel-filter-stack {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding-top: 0;
}

.esn-status-filter-form {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

.esn-status-filter-form.is-filter-conv,
.esn-status-filter-form.is-filter-inbox {
    flex: 1 1 0;
}

.esn-status-filter-form.is-filter-patient {
    flex: 1.24 1 0;
}

.esn-field select,
.esn-control-select {
    color-scheme: dark;
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(180deg, rgba(28, 38, 52, 0.98), rgba(24, 32, 44, 0.98));
    color: var(--esn-ink);
    border: 1px solid rgba(255,255,255,0.10);
}

select option,
.esn-field select option,
.esn-control-select option {
    background: #1b2330;
    color: var(--esn-ink);
}

.esn-control-select {
    background: var(--esn-surface-3);
    color: var(--esn-ink);
    border: 1px solid var(--esn-line);
    padding: 8px 10px;
}

.esn-conversation-scroll {
    flex: 1;
    padding: 10px 12px 12px;
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: 9px;
}

.esn-conversation-card {
    display: block;
    align-self: start;
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 80px;
    max-height: 92px;
    padding: 11px 12px 12px;
    color: inherit;
    text-decoration: none;
    border-color: rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(20, 26, 35, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), var(--esn-shadow-soft);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.esn-conversation-card.is-active {
    border-color: rgba(217, 171, 96, 0.82);
    background: linear-gradient(180deg, rgba(44, 50, 61, 0.99), rgba(34, 40, 50, 0.99));
    box-shadow: inset 4px 0 0 rgba(217, 171, 96, 0.98), inset 0 1px 0 rgba(255,255,255,0.03), 0 0 0 1px rgba(217, 171, 96, 0.30), 0 18px 34px rgba(0,0,0,0.24);
}

.esn-conversation-card.is-unread {
    border-color: rgba(232, 78, 78, 0.98);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 0 0 2px rgba(232, 78, 78, 0.28), 0 0 22px rgba(232, 78, 78, 0.22), 0 0 42px rgba(232, 78, 78, 0.12), var(--esn-shadow-soft);
}

.esn-conversation-card.is-unread::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5c5c;
    box-shadow: 0 0 0 5px rgba(255, 92, 92, 0.16), 0 0 14px rgba(255, 92, 92, 0.44);
}

.esn-conversation-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(29, 36, 47, 0.98), rgba(24, 30, 40, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 12px 24px rgba(0,0,0,0.18);
}

.esn-conversation-card.is-call-secondary {
    opacity: 0.82;
    border-style: dashed;
}

.esn-conversation-card-top,
.esn-conversation-card-meta,
.esn-conversation-card-footer,
.esn-conversation-badges,
.esn-message-top-strip,
.esn-message-strip-actions,
.esn-composer-toolbar,
.esn-composer-input-wrap {
    display: flex;
    align-items: center;
}

.esn-conversation-card-top,
.esn-message-top-strip {
    justify-content: space-between;
    gap: 8px;
}

.esn-conversation-card-top,
.esn-conversation-card-meta {
    min-width: 0;
}

.esn-conversation-card-footer {
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-top: 8px;
}

.esn-card-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.esn-conversation-badges,
.esn-message-strip-actions,
.esn-conversation-card-meta {
    gap: 8px;
    flex-wrap: wrap;
}

.esn-conversation-card-meta {
    justify-content: flex-end;
    text-align: right;
    gap: 4px 8px;
    flex: 0 0 auto;
}

.esn-conversation-card-top strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.15;
}

.esn-patient-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--avatar-bg, #385d8a);
    color: var(--avatar-fg, #eef6ff);
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16);
}

.esn-patient-avatar.is-small {
    width: 30px;
    height: 30px;
    font-size: 11px;
}

.esn-patient-avatar.is-tiny {
    width: 18px;
    height: 18px;
    font-size: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 4px 10px rgba(0,0,0,0.12);
}

.esn-patient-avatar.is-large {
    width: 46px;
    height: 46px;
    font-size: 15px;
}

.esn-conversation-badges {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
}

.esn-conversation-card-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.1;
}

.esn-card-label-row,
.esn-label-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.esn-card-label-row {
    margin-top: 8px;
}

.esn-tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(200, 155, 93, 0.28);
    background: rgba(200, 155, 93, 0.10);
    color: var(--esn-accent);
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

.esn-tag-pill.is-hot-follow {
    background: rgba(228, 102, 102, 0.18);
    border-color: rgba(228, 102, 102, 0.36);
    color: #ffc3c3;
}

.esn-tag-pill.is-ticket-received {
    background: rgba(232, 132, 28, 0.20);
    border-color: rgba(232, 132, 28, 0.40);
    color: #ffd08a;
}

.esn-tag-pill.is-visit-1-done {
    background: rgba(201, 174, 78, 0.18);
    border-color: rgba(201, 174, 78, 0.36);
    color: #f4df98;
}

.esn-tag-pill.is-all-visits-done {
    background: rgba(66, 155, 102, 0.18);
    border-color: rgba(66, 155, 102, 0.36);
    color: #9be0b3;
}

.esn-tag-pill.is-lost-by-price {
    background: rgba(102, 18, 18, 0.34);
    border-color: rgba(102, 18, 18, 0.52);
    color: #ff9a9a;
}

.esn-topbar-menu-button {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 20px;
}

.esn-conversation-card strong,
.esn-db-card-head strong,
.esn-db-card-head h3,
.esn-message-primary strong {
    color: var(--esn-ink);
}

.esn-conversation-card-body {
    color: var(--esn-ink-soft);
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.esn-conversation-card-footer .esn-conversation-card-meta span {
    color: #c89b5d;
    font-size: 10px;
    font-weight: 700;
}

.esn-conversation-card-footer .esn-conversation-card-meta .esn-card-inbox {
    color: var(--esn-gold);
    letter-spacing: 0.03em;
    text-align: right;
    white-space: nowrap;
}

.esn-status-pill,
.esn-new-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
}

.esn-status-pill.is-lead { background: rgba(108,198,192,0.14); color: var(--esn-lead); border-color: rgba(108,198,192,0.24); }
.esn-status-pill.is-contact { background: rgba(216,173,109,0.14); color: var(--esn-contact); border-color: rgba(216,173,109,0.24); }
.esn-status-pill.is-on-ai { background: rgba(143,114,214,0.16); color: #b19aff; border-color: rgba(143,114,214,0.30); }
.esn-status-pill.is-on-agent { background: rgba(127,176,255,0.16); color: var(--esn-agent); border-color: rgba(127,176,255,0.30); }
.esn-status-pill.is-closed { background: rgba(125,135,149,0.14); color: var(--esn-closed); border-color: rgba(125,135,149,0.24); }
.esn-status-pill.is-pending { background: rgba(195,154,88,0.14); color: var(--esn-pending); border-color: rgba(195,154,88,0.24); }
.esn-status-pill.is-priority-normal { background: rgba(125,135,149,0.14); color: var(--esn-closed); border-color: rgba(125,135,149,0.24); }
.esn-status-pill.is-priority-high { background: rgba(127,176,255,0.16); color: var(--esn-agent); border-color: rgba(127,176,255,0.34); }
.esn-status-pill.is-priority-very-high { background: rgba(208,96,170,0.16); color: #f0a8d4; border-color: rgba(208,96,170,0.34); }
.esn-status-pill.is-pass { background: rgba(87,181,138,0.14); color: var(--esn-pass); border-color: rgba(87,181,138,0.24); }
.esn-status-pill.is-fail { background: rgba(208,111,100,0.14); color: var(--esn-fail); border-color: rgba(208,111,100,0.24); }

.esn-message-panel-wrap {
    padding: 0;
}

.esn-workspace-feedback {
    display: grid;
    gap: 8px;
    padding: 8px 18px 0;
}

.esn-workspace-feedback:empty {
    display: none;
    padding: 0;
}

.esn-message-top-strip {
    padding: 12px 18px 10px;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(8px);
}

.esn-window-state-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 18px 7px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.015);
}

.esn-window-state-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    min-width: 0;
    padding: 4px 8px 5px 12px;
    border-left: 3px solid rgba(255,255,255,0.14);
    background: transparent;
    position: relative;
}

.esn-window-state-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 0;
}

.esn-window-state-item strong {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-window-state-item span {
    color: var(--esn-muted);
    font-size: 11px;
    line-height: 1.22;
}

.esn-window-state-item.is-on strong { color: #99e0b1; }
.esn-window-state-item.is-pending strong { color: #f1cf8e; }
.esn-window-state-item.is-off strong { color: #ffb0a6; }

.esn-window-state-item.is-on { border-left-color: #62c98c; }
.esn-window-state-item.is-pending { border-left-color: #f1cf8e; }
.esn-window-state-item.is-off { border-left-color: #e67b71; }

.esn-window-state-item.is-highlighted {
    background: rgba(255, 196, 104, 0.20);
    border-left-color: #ffc468;
    box-shadow: inset 0 0 0 1px rgba(255, 196, 104, 0.52), 0 0 0 4px rgba(255, 196, 104, 0.10);
    animation: esn-window-state-highlight 2s ease;
}

@keyframes esn-window-state-highlight {
    0% {
        background: rgba(255, 196, 104, 0.28);
        border-left-color: #ffc468;
        box-shadow: inset 0 0 0 1px rgba(255, 196, 104, 0.58), 0 0 0 0 rgba(255, 196, 104, 0.34);
        transform: translateY(0);
    }
    18% {
        background: rgba(255, 196, 104, 0.22);
        box-shadow: inset 0 0 0 1px rgba(255, 196, 104, 0.50), 0 0 0 5px rgba(255, 196, 104, 0.12);
        transform: translateY(-1px);
    }
    100% {
        background: transparent;
        box-shadow: none;
        transform: translateY(0);
    }
}

.esn-message-primary {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.esn-message-primary-rich {
    gap: 6px;
}

.esn-message-title-row,
.esn-message-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.esn-message-title-row .esn-status-pill {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.08em;
    box-shadow: none;
}

.esn-message-primary span {
    color: var(--esn-muted);
    font-size: 13px;
}

.esn-message-primary strong {
    font-size: 17px;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.esn-message-status-form {
    display: inline-flex;
    min-width: 0;
    flex: 0 0 auto;
}

.esn-status-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--esn-line-strong);
    background: rgba(211, 163, 100, 0.10);
    color: var(--esn-ink);
    cursor: pointer;
}

.esn-status-form {
    margin: 0;
}

.esn-message-strip-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 8px;
    align-self: flex-start;
}

.esn-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    line-height: 1;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(180deg, rgba(48, 58, 73, 0.72), rgba(34, 43, 56, 0.72));
    color: var(--esn-ink);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16);
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
    font-weight: 700;
}

.esn-action-button-neutral {
    border-color: rgba(148, 161, 179, 0.38);
    background: linear-gradient(180deg, rgba(148, 161, 179, 0.18), rgba(122, 136, 156, 0.10));
    color: #d6deea;
}

.esn-action-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 22px rgba(0,0,0,0.20);
}

.esn-action-button-neutral:hover:not(:disabled) {
    border-color: rgba(148, 161, 179, 0.42);
    background: linear-gradient(180deg, rgba(148, 161, 179, 0.24), rgba(122, 136, 156, 0.14));
}

.esn-action-button-accent {
    border-color: rgba(200, 155, 93, 0.50);
    background: linear-gradient(180deg, rgba(200, 155, 93, 0.24), rgba(176, 133, 72, 0.14));
    color: #f3d39c;
}

.esn-action-button-secondary {
    border-color: rgba(111, 143, 232, 0.42);
    background: linear-gradient(180deg, rgba(111, 143, 232, 0.22), rgba(111, 143, 232, 0.10));
}

.esn-action-button-positive {
    border-color: rgba(73, 140, 104, 0.58);
    background: linear-gradient(180deg, rgba(54, 111, 81, 0.98), rgba(42, 91, 66, 0.98));
    color: #eefaf3;
}

.esn-action-button-info {
    border-color: rgba(92, 152, 232, 0.58);
    background: linear-gradient(180deg, rgba(63, 121, 214, 0.98), rgba(46, 96, 183, 0.98));
    color: #ffffff;
}

.esn-action-button-warning {
    border-color: rgba(224, 154, 86, 0.62);
    background: linear-gradient(180deg, rgba(224, 154, 86, 0.28), rgba(202, 126, 51, 0.14));
    color: #ffcf98;
}

.esn-action-button-call {
    border-color: rgba(73, 214, 104, 0.72);
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.34), rgba(21, 171, 84, 0.20));
    color: #d8ffe4;
}

.esn-action-button-voice {
    border-color: rgba(129, 197, 255, 0.72);
    background: linear-gradient(180deg, rgba(110, 196, 255, 0.34), rgba(76, 162, 236, 0.22));
    color: #eff8ff;
}

.esn-action-button-positive:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(62, 123, 90, 0.98), rgba(46, 100, 73, 0.98));
    border-color: rgba(88, 164, 122, 0.64);
}

.esn-action-button-info:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(73, 132, 225, 0.98), rgba(52, 104, 193, 0.98));
    border-color: rgba(112, 174, 237, 0.66);
}

.esn-action-button-warning:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(232, 162, 95, 0.34), rgba(208, 132, 58, 0.18));
    border-color: rgba(233, 170, 102, 0.66);
}

.esn-action-button-call:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(48, 224, 114, 0.42), rgba(23, 184, 91, 0.26));
    border-color: rgba(97, 232, 125, 0.74);
}

.esn-action-button-voice:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(130, 210, 255, 0.42), rgba(88, 174, 245, 0.28));
    border-color: rgba(158, 220, 255, 0.76);
}

.esn-status-select,
.esn-inline-convert-button,
.esn-inline-reassign-button {
    min-width: 128px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.esn-status-form .esn-action-button {
    min-width: 168px;
}

.esn-status-form .esn-action-button.esn-action-button-voice-compact {
    min-width: 34px;
    width: 34px;
}

.esn-message-action-button {
    min-width: 110px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 13px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(0,0,0,0.18);
}

.esn-message-action-button.esn-action-button-voice-compact {
    gap: 0;
    padding: 0;
    border-radius: 999px;
}

.esn-action-button-voice-compact .esn-button-icon {
    width: 1em;
    height: 1em;
    font-size: 28px;
    line-height: 1;
    color: #ffffff;
    transform: translateX(1px);
}

.esn-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    margin-right: 2px;
    color: inherit;
}

.esn-message-action-button span {
    color: inherit;
}

.esn-inline-reassign-button.esn-message-action-button {
    border-color: rgba(212, 180, 86, 0.56);
    background: linear-gradient(180deg, rgba(212, 180, 86, 0.26), rgba(184, 146, 49, 0.14));
    color: #f7dfa0;
}

.esn-inline-reassign-button.esn-message-action-button:hover:not(:disabled) {
    border-color: rgba(225, 194, 104, 0.68);
    background: linear-gradient(180deg, rgba(212, 180, 86, 0.34), rgba(184, 146, 49, 0.18));
}

.esn-inline-convert-button.esn-message-action-button {
    border-color: rgba(106, 148, 226, 0.52);
    background: linear-gradient(180deg, rgba(106, 148, 226, 0.22), rgba(72, 113, 194, 0.12));
    color: #bfd6ff;
}

.esn-inline-convert-button.esn-message-action-button:hover:not(:disabled) {
    border-color: rgba(126, 166, 238, 0.64);
    background: linear-gradient(180deg, rgba(106, 148, 226, 0.30), rgba(72, 113, 194, 0.16));
}

.esn-action-button-warning.esn-message-action-button {
    border-color: rgba(214, 112, 88, 0.62);
    background: linear-gradient(180deg, rgba(214, 112, 88, 0.28), rgba(184, 76, 61, 0.14));
    color: #ffb4a2;
}

.esn-action-button-warning.esn-message-action-button:hover:not(:disabled) {
    border-color: rgba(228, 128, 103, 0.72);
    background: linear-gradient(180deg, rgba(214, 112, 88, 0.36), rgba(184, 76, 61, 0.18));
}

.esn-message-status-form .esn-status-select {
    min-width: 104px;
    min-height: 30px;
    padding: 6px 24px 6px 10px;
    border-radius: 999px;
    border-color: rgba(127,176,255,0.30);
    background: rgba(127,176,255,0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(127,176,255,0.18), 0 3px 10px rgba(127,176,255,0.12);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--esn-agent);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.esn-status-filter {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 22px 7px 10px;
    border-radius: 999px;
    border-color: rgba(212, 175, 111, 0.20);
    background:
        linear-gradient(180deg, rgba(39, 48, 61, 0.98), rgba(26, 34, 45, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 4px 10px rgba(0,0,0,0.14);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.esn-status-filter-form::after {
    content: attr(data-filter-chip);
    position: absolute;
    top: -7px;
    left: 10px;
    z-index: 1;
    padding: 1px 5px;
    border-radius: 999px;
    background: #111923;
    border: 1px solid rgba(212, 175, 111, 0.16);
    color: rgba(231, 214, 181, 0.66);
    font-size: 8px;
    font-weight: 800;
    font-family: "Segoe UI", sans-serif;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: none;
}

.esn-status-filter:hover,
.esn-status-filter:focus,
.esn-status-select:hover,
.esn-status-select:focus {
    border-color: rgba(200, 155, 93, 0.54);
    box-shadow: 0 0 0 3px rgba(200, 155, 93, 0.12);
    transform: translateY(-1px);
}

.esn-status-filter-static {
    min-height: 30px;
}

.esn-status-filter-static .esn-status-pill {
    min-height: 30px;
    width: 100%;
    padding: 5px 9px;
    justify-content: center;
}

@media (max-width: 1180px) {
    .esn-panel-header-block {
        justify-content: flex-start;
    }

    .esn-panel-filter-stack {
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }
}

.esn-status-select.is-on-ai {
    background: rgba(143,114,214,0.16);
    border-color: rgba(143,114,214,0.42);
    color: #d2c5ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(143,114,214,0.22), 0 3px 10px rgba(143,114,214,0.14);
}

.esn-status-select.is-on-agent {
    background: rgba(127,176,255,0.16);
    border-color: rgba(127,176,255,0.30);
    color: var(--esn-agent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(127,176,255,0.18), 0 3px 10px rgba(127,176,255,0.12);
}

.esn-status-select.is-closed {
    background: rgba(125,135,149,0.14);
    border-color: rgba(125,135,149,0.38);
    color: #d0d7e1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(125,135,149,0.20), 0 3px 8px rgba(125,135,149,0.10);
}

.esn-message-canvas {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(24,31,43,0.98) 0%, rgba(20,26,38,0.98) 100%);
}

.esn-thread-trim-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px 0;
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-message-thread {
    flex: 1;
    min-height: 0;
    padding: 16px 18px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.esn-message {
    max-width: 72%;
    width: fit-content;
    min-width: 220px;
    align-self: start;
    padding: 10px 12px 8px;
    border: 1px solid transparent;
    background: rgba(34, 42, 54, 0.98);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    border-radius: 18px 18px 18px 8px;
}

.esn-message header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-message header strong {
    font-size: 12px;
    line-height: 1.2;
}

.esn-message header span {
    font-size: 10px;
    line-height: 1.2;
}

.esn-message-copy,
.esn-message-copy * {
    color: var(--esn-ink);
    line-height: 1.4;
}

.esn-translation-block {
    display: grid;
    gap: 8px;
}

.esn-translation-kicker {
    color: #8bb8f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.esn-translation-original {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 20, 28, 0.56);
    border: 1px solid rgba(138, 164, 194, 0.14);
}

.esn-translation-original strong {
    color: var(--esn-muted);
    font-size: 11px;
}

.esn-toolbar-button.is-active {
    background: linear-gradient(180deg, rgba(55, 122, 211, 0.9), rgba(34, 91, 168, 0.96));
    color: #f8fbff;
    border-color: rgba(128, 186, 255, 0.34);
}

.esn-message.is-call-event {
    width: min(560px, 100%);
}

.esn-call-event-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(28, 36, 46, 0.98), rgba(23, 30, 39, 0.98));
    border: 1px solid rgba(113, 165, 230, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 26px rgba(6, 17, 27, 0.34);
}

.esn-call-event-kicker {
    color: #8bb8f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-call-event-title {
    color: var(--esn-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.esn-call-event-copy {
    color: var(--esn-ink-soft);
    font-size: 13px;
    line-height: 1.45;
}

.esn-call-event-actions {
    display: grid;
    gap: 10px;
}

.esn-call-event-actions audio {
    width: 100%;
}

.esn-call-event-download {
    color: #a9d0ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.esn-call-event-download:hover {
    text-decoration: underline;
}

.esn-message.is-call-event {
    width: min(560px, 100%);
}

.esn-call-event-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(28, 36, 46, 0.98), rgba(23, 30, 39, 0.98));
    border: 1px solid rgba(113, 165, 230, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 26px rgba(6, 17, 27, 0.34);
}

.esn-call-event-kicker {
    color: #8bb8f6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-call-event-title {
    color: var(--esn-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.esn-call-event-copy {
    color: var(--esn-ink-soft);
    font-size: 13px;
    line-height: 1.45;
}

.esn-call-event-actions {
    display: grid;
    gap: 10px;
}

.esn-call-event-actions audio {
    width: 100%;
}

.esn-call-event-download {
    color: #a9d0ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.esn-call-event-download:hover {
    text-decoration: underline;
}

.esn-message-delivery-meta {
    margin-top: 2px;
    display: flex;
    justify-content: flex-end;
    line-height: 1;
}

.esn-message-delivery-indicator {
    min-width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--esn-muted);
}

.esn-message-delivery-indicator.is-single-check {
    color: #cfd8e6;
}

.esn-message-delivery-indicator.is-double-check {
    color: #8fd3ff;
}

.esn-message-delivery-indicator.is-failed {
    color: #ff9c9c;
}

.esn-message-delivery-indicator.is-pending {
    color: #d7c39f;
}

.esn-message-delivery-detail {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(140, 42, 42, 0.22);
    border: 1px solid rgba(219, 97, 97, 0.28);
    color: #ffd9d9;
    font-size: 12px;
    line-height: 1.45;
}

.esn-message header strong,
.esn-message header span,
.esn-conversation-card strong,
.esn-db-card-head h3,
.esn-db-grid strong,
.esn-db-grid span,
.esn-field span,
.esn-field select,
.esn-main-search-results strong,
.esn-main-search-results span,
.esn-nav-group summary,
.esn-nav-link span,
.esn-nav-static span,
.esn-user-card strong {
    color: var(--esn-ink);
}

.esn-field select,
.esn-status-filter,
.esn-main-toggle,
.esn-head-action-button,
.esn-primary-button,
.esn-secondary-button,
.esn-composer-toolbar button,
.esn-composer-send {
    color: var(--esn-ink);
}

.esn-message-patient,
.esn-message-system {
    justify-self: start;
}

.esn-message-patient {
    border-color: rgba(124, 146, 176, 0.16);
    background: linear-gradient(180deg, rgba(48, 58, 74, 0.98), rgba(40, 50, 66, 0.98));
    box-shadow: 0 10px 24px rgba(12, 24, 38, 0.34);
}

.esn-message-ai {
    justify-self: end;
    border: 1px solid rgba(200, 155, 93, 0.48);
    border-radius: 18px 18px 8px 18px;
    background: linear-gradient(180deg, rgba(70, 80, 104, 0.98), rgba(59, 68, 91, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 0 1px rgba(200, 155, 93, 0.12), 0 10px 24px rgba(42, 34, 10, 0.22);
}

.esn-message-ai header strong {
    color: var(--esn-accent);
}

.esn-message-user {
    justify-self: end;
    border-color: rgba(143, 169, 216, 0.18);
    border-radius: 18px 18px 8px 18px;
    background: linear-gradient(180deg, rgba(68, 79, 104, 0.98), rgba(56, 67, 91, 0.98));
    box-shadow: 0 10px 24px rgba(18, 26, 44, 0.34);
}

.esn-message-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.esn-attachment-card {
    min-width: 132px;
    max-width: 220px;
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink);
    text-decoration: none;
}

.esn-attachment-card a {
    color: inherit;
    text-decoration: none;
}

.esn-attachment-card strong,
.esn-attachment-card span {
    color: var(--esn-ink);
}

.esn-attachment-card span {
    font-size: 12px;
    color: var(--esn-muted);
}

.esn-attachment-card.is-image img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.06);
}

.esn-attachment-card.is-audio audio {
    width: 100%;
    max-width: 220px;
}

.esn-image-lightbox {
    background: rgba(8, 10, 14, 0.92);
    z-index: 1200;
}

.esn-image-lightbox-card {
    position: relative;
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    padding: 18px;
    border-radius: 18px;
    background: rgba(18, 24, 32, 0.98);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.esn-image-lightbox-card img {
    display: block;
    max-width: min(86vw, 1040px);
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
}

.esn-composer,
.esn-message-composer-shell {
    border-top: 1px solid var(--esn-line);
    background: linear-gradient(180deg, rgba(20,26,34,0.96), rgba(18,24,31,0.98));
    padding: 9px 18px 10px;
    display: grid;
    gap: 6px;
    flex: 0 0 auto;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-composer-toolbar {
    gap: 7px;
    padding-bottom: 1px;
}

.esn-toolbar-button {
    min-width: 32px;
    padding: 8px 9px;
    background: var(--esn-surface-3);
    color: var(--esn-ink-soft);
    font-size: 18px;
    line-height: 1;
}

.esn-composer-send {
    min-width: 58px;
    padding: 8px 14px;
    align-self: stretch;
}

.esn-composer-input-wrap {
    gap: 10px;
    align-items: flex-end;
}

.esn-composer-input-wrap textarea {
    flex: 1;
    min-height: 64px;
    max-height: 132px;
    resize: none;
    border: 1px solid var(--esn-line);
    background: linear-gradient(180deg, rgba(19, 25, 34, 0.98), rgba(17, 23, 31, 0.98));
    color: var(--esn-ink);
    padding: 11px 12px;
    border-radius: 12px;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.esn-composer-input-wrap textarea:focus {
    outline: none;
    border-color: rgba(127,176,255,0.32);
    box-shadow: 0 0 0 3px rgba(127,176,255,0.10);
}

.esn-composer-input-wrap textarea[readonly] {
    cursor: pointer;
    opacity: 0.82;
}

.esn-composer-hint {
    color: var(--esn-muted);
    font-size: 11px;
    line-height: 1.25;
    opacity: 0.9;
}

.esn-composer-guidance {
    margin: 0 16px 10px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid rgba(229, 109, 101, 0.46);
    background: linear-gradient(180deg, rgba(88, 28, 30, 0.96), rgba(63, 22, 25, 0.98));
    color: #fff6f4;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--esn-shadow-soft);
}

.esn-composer-guidance-primary {
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
}

.esn-composer-guidance-secondary {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 236, 232, 0.94);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.esn-hidden-input {
    display: none;
}

.esn-composer-pending {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esn-composer-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.05);
    color: var(--esn-ink);
    font-size: 12px;
}

.esn-template-button {
    font-size: 11px;
    padding-inline: 10px;
}

.esn-ai-translate-button {
    font-size: 11px;
    padding-inline: 10px;
    white-space: nowrap;
}

.esn-template-form {
    display: grid;
    gap: 8px;
}

.esn-template-vars {
    border: 1px dashed var(--esn-border);
    border-radius: 10px;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.esn-template-var-row {
    display: grid;
    gap: 4px;
}

.esn-template-var-row input {
    width: 100%;
    border: 1px solid var(--esn-border);
    border-radius: 8px;
    padding: 7px 9px;
    background: var(--esn-white);
}

.esn-settings-field-template {
    grid-column: 1 / -1;
}

.esn-template-manager {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.esn-template-manager-list {
    display: grid;
    gap: 8px;
}

.esn-template-manager-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    border: 1px solid var(--esn-border);
    border-radius: 10px;
    padding: 8px;
    background: var(--esn-white);
}

.esn-template-manager-row input {
    width: 100%;
    border: 1px solid var(--esn-border);
    border-radius: 8px;
    padding: 7px 9px;
}

.esn-template-manager-row > button[data-template-remove] {
    grid-column: 1 / -1;
    justify-self: end;
}

.esn-admin-inline-form,
.esn-admin-table-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.esn-admin-inline-form input,
.esn-admin-inline-form select,
.esn-admin-table-form input,
.esn-admin-table-form select {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink);
}

.esn-admin-inbox-card {
    display: grid;
    gap: 14px;
    width: 100%;
}

.esn-admin-inbox-head,
.esn-admin-inbox-summary {
    display: grid;
    gap: 12px;
}

.esn-admin-inbox-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.esn-admin-inbox-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.esn-admin-inbox-state {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.esn-admin-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.08);
}

.esn-admin-status-badge.is-ready {
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink-soft);
    border-color: rgba(255,255,255,0.10);
}

.esn-admin-status-badge.is-incomplete {
    background: rgba(255,255,255,0.03);
    color: var(--esn-muted);
    border-color: rgba(255,255,255,0.08);
}

.esn-admin-summary-box,
.esn-admin-webhook-box {
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--esn-line);
}

.esn-admin-summary-box strong,
.esn-admin-webhook-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--esn-ink-soft);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-admin-summary-box span {
    color: var(--esn-ink);
}

.esn-admin-inbox-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.esn-admin-webhook-list {
    display: grid;
    gap: 8px;
}

.esn-admin-webhook-list li {
    display: grid;
    gap: 4px;
}

.esn-admin-webhook-list span {
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-settings-panel .esn-admin-webhook-list li > span,
.esn-settings-panel .esn-settings-field > span,
.esn-settings-panel .esn-settings-form-section > strong,
.esn-settings-panel .esn-settings-advanced > summary {
    color: var(--esn-ink-soft) !important;
    font-family: "Segoe UI", sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
}

.esn-settings-panel .esn-admin-webhook-list li > code {
    color: var(--esn-ink) !important;
    font-family: "Segoe UI", sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.esn-admin-webhook-list code {
    display: block;
    padding: 8px 10px;
    background: rgba(0,0,0,0.22);
    border: 1px solid var(--esn-line);
    color: var(--esn-ink);
    overflow-wrap: anywhere;
}

.esn-admin-settings-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.esn-settings-rail,
.esn-settings-panel {
    display: grid;
    gap: 14px;
}

.esn-ai-module-grid,
.esn-ai-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.esn-ai-module-card,
.esn-ai-placeholder-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #131922;
}

.esn-ai-module-card p,
.esn-ai-placeholder-card p {
    margin: 0;
    color: var(--esn-ink-soft);
    font-size: 12px;
    line-height: 1.45;
}

.esn-ai-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.esn-ai-module-head strong,
.esn-ai-placeholder-card strong {
    font-size: 15px;
    color: var(--esn-ink);
}

.esn-ai-shell {
    gap: 14px;
}

.esn-ai-shell .esn-admin-summary-box,
.esn-ai-shell .esn-admin-webhook-box,
.esn-ai-shell .esn-settings-form-section,
.esn-ai-shell .esn-settings-advanced {
    background: linear-gradient(180deg, rgba(17, 24, 35, 0.96), rgba(13, 19, 28, 0.98));
    border: 1px solid rgba(213, 161, 88, 0.22);
    border-radius: 14px;
    box-shadow: none;
}

.esn-ai-shell .esn-admin-webhook-list code,
.esn-ai-shell .esn-settings-field input,
.esn-ai-shell .esn-settings-field select,
.esn-ai-shell .esn-control-select,
.esn-ai-shell .esn-ai-mini-input,
.esn-ai-shell .esn-ai-mini-select {
    background: #18212d;
    border-color: rgba(255,255,255,0.09);
    color: var(--esn-ink);
}

.esn-ai-shell .esn-settings-field input:focus,
.esn-ai-shell .esn-settings-field select:focus,
.esn-ai-shell .esn-control-select:focus,
.esn-ai-shell .esn-ai-mini-input:focus,
.esn-ai-shell .esn-ai-mini-select:focus {
    outline: none;
    border-color: rgba(213, 161, 88, 0.52);
    box-shadow: 0 0 0 1px rgba(213, 161, 88, 0.16);
}

.esn-ai-overview-stack,
.esn-ai-overview-main,
.esn-ai-overview-side {
    display: grid;
    gap: 14px;
}

.esn-ai-accordion-list {
    display: grid;
    gap: 12px;
}

.esn-ai-module-accordion {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(20, 28, 40, 0.98), rgba(15, 21, 31, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-ai-module-accordion > summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 16px;
}

.esn-ai-module-accordion > summary::-webkit-details-marker {
    display: none;
}

.esn-ai-module-accordion > summary p {
    margin: 4px 0 0;
    color: var(--esn-ink-soft);
    font-size: 11px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.esn-ai-module-accordion[open] > summary p {
    display: block;
}

.esn-ai-module-accordion[open] > summary,
.esn-ai-module-accordion > summary:hover {
    background: linear-gradient(180deg, rgba(235, 179, 32, 0.08), rgba(235, 179, 32, 0.03));
}

.esn-ai-status-pill {
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(0,0,0,0.22);
}

.esn-ai-status-pill.is-live {
    color: #e8fff2;
    background: linear-gradient(180deg, rgba(59, 141, 99, 0.82), rgba(35, 92, 63, 0.92));
    border-color: rgba(138, 222, 174, 0.22);
}

.esn-ai-status-pill.is-partial {
    color: #fff6df;
    background: linear-gradient(180deg, rgba(198, 138, 39, 0.84), rgba(122, 79, 21, 0.94));
    border-color: rgba(248, 204, 122, 0.22);
}

.esn-ai-status-pill.is-planned,
.esn-ai-status-pill.is-closed {
    color: #f2ecff;
    background: linear-gradient(180deg, rgba(84, 66, 123, 0.88), rgba(45, 36, 66, 0.94));
    border-color: rgba(181, 162, 228, 0.18);
}

.esn-ai-skill-block {
    padding: 0 18px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(8, 12, 18, 0.28);
}

.esn-ai-skill-block h4 {
    margin: 14px 0 12px;
    color: #f0c56a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.esn-ai-skill-list {
    display: grid;
    gap: 12px;
}

.esn-ai-skill-item {
    display: grid;
    gap: 4px;
}

.esn-ai-skill-item strong {
    color: var(--esn-ink);
    font-size: 13px;
    font-weight: 700;
}

.esn-ai-skill-item p {
    margin: 0;
    color: var(--esn-ink-soft);
    font-size: 12px;
    line-height: 1.55;
}

.esn-ai-overview-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.esn-ai-summary-card {
    display: grid;
    gap: 10px;
    padding: 14px 18px;
    border: 1px solid rgba(213, 161, 88, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(18, 25, 36, 0.98), rgba(12, 18, 27, 0.98));
    align-self: start;
}

.esn-ai-summary-head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
}

.esn-ai-summary-head strong {
    margin: 0;
    color: #f0c56a;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.esn-ai-summary-head span {
    color: var(--esn-muted);
    font-size: 11px;
}

.esn-ai-fact-list {
    display: grid;
    gap: 4px;
}

.esn-ai-fact-row {
    display: grid;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.esn-ai-fact-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.esn-ai-fact-row .esn-ai-fact-label,
.esn-ai-summary-card .esn-ai-fact-label,
.esn-ai-summary-card .esn-ai-fact-row > span {
    color: #93a8c4 !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    line-height: 1.35 !important;
}

.esn-ai-fact-row .esn-ai-fact-value,
.esn-ai-summary-card .esn-ai-fact-value,
.esn-ai-summary-card .esn-ai-fact-row > strong {
    color: var(--esn-ink) !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    line-height: 1.45 !important;
}

.esn-ai-runtime-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.esn-ai-runtime-sections {
    display: grid;
    gap: 14px;
}

.esn-ai-usage-stack {
    display: grid;
    gap: 18px;
}

.esn-ai-usage-window {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(213, 161, 88, 0.16);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(13, 19, 29, 0.98), rgba(9, 14, 22, 0.98));
}

.esn-ai-usage-window-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.esn-ai-usage-window-head h3 {
    margin: 4px 0 0;
    color: #f6f8fb;
    font-size: 24px;
    font-weight: 720;
    letter-spacing: -0.02em;
}

.esn-ai-usage-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.esn-ai-usage-stat-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.esn-ai-usage-stat-label {
    color: #8fa5c2;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esn-ai-usage-stat-value {
    color: #f6f8fb;
    font-size: 26px;
    font-weight: 760;
    line-height: 1.1;
}

.esn-ai-usage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: 16px;
    align-items: start;
}

.esn-ai-usage-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.esn-ai-usage-module-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(circle at top right, rgba(240, 197, 106, 0.08), transparent 42%),
        rgba(255,255,255,0.025);
}

.esn-ai-usage-module-head,
.esn-ai-usage-module-foot,
.esn-ai-usage-model-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.esn-ai-usage-module-head strong,
.esn-ai-usage-model-row strong {
    color: #f5f7fa;
    font-size: 14px;
    font-weight: 700;
}

.esn-ai-usage-module-head span,
.esn-ai-usage-module-foot span,
.esn-ai-usage-model-row span {
    color: #8fa5c2;
    font-size: 11px;
    font-weight: 600;
}

.esn-ai-usage-module-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.esn-ai-usage-metric {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(7, 11, 18, 0.42);
    border: 1px solid rgba(255,255,255,0.05);
}

.esn-ai-usage-metric span {
    color: #88a0bf;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esn-ai-usage-metric strong,
.esn-ai-usage-module-foot strong {
    color: #f6f8fb;
    font-size: 16px;
    font-weight: 720;
}

.esn-ai-usage-side {
    display: grid;
    gap: 12px;
}

.esn-ai-usage-model-list {
    display: grid;
    gap: 10px;
}

.esn-ai-usage-model-row {
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.esn-ai-usage-model-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.esn-ai-usage-model-row > div:last-child {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.esn-ai-usage-model-empty {
    color: #8fa5c2;
    font-size: 13px;
}

.esn-ai-report-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    gap: 16px;
    align-items: end;
}

.esn-ai-report-hero-copy {
    display: grid;
    gap: 8px;
}

.esn-ai-report-hero-copy h1 {
    margin: 0;
    color: #f5f7fb;
    font: 700 18px/1.12 "Segoe UI", sans-serif;
    letter-spacing: -0.02em;
}

.esn-ai-report-hero-copy p {
    margin: 0;
    max-width: 62ch;
    color: #8fa5c2;
    font-size: 12px;
    line-height: 1.55;
}

.esn-ai-report-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.esn-ai-report-hero-stat {
    display: grid;
    gap: 4px;
    min-width: 108px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.014));
}

.esn-ai-report-hero-stat span {
    color: #7d92ad;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-ai-report-hero-stat strong {
    color: #f5f7fb;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.15;
}

.esn-ai-report-stack {
    display: grid;
    gap: 16px;
}

.esn-ai-report-card {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(213, 161, 88, 0.12);
    background:
        radial-gradient(circle at top right, rgba(240, 197, 106, 0.06), transparent 30%),
        linear-gradient(180deg, rgba(14, 19, 28, 0.98), rgba(10, 15, 23, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025), 0 16px 36px rgba(0, 0, 0, 0.18);
}

.esn-ai-report-head,
.esn-ai-report-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.esn-ai-report-head-copy {
    display: grid;
    gap: 4px;
}

.esn-ai-report-kicker {
    color: rgba(214, 181, 109, 0.78);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.esn-ai-report-head strong,
.esn-ai-report-chart-head strong {
    color: #f6f8fb;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.esn-ai-report-head span,
.esn-ai-report-chart-head span {
    color: #8fa5c2;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esn-ai-report-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(214, 181, 109, 0.15);
    background: rgba(214, 181, 109, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.esn-ai-report-chart-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.esn-ai-report-chart-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 16px 16px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        radial-gradient(circle at top right, rgba(91, 131, 201, 0.06), transparent 24%),
        linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
    min-width: 0;
}

.esn-ai-report-chart-total {
    color: #9dbbe2 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.esn-user-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.esn-user-report-summary-item {
    display: grid;
    gap: 8px;
    padding: 16px 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(214, 181, 109, 0.16);
    background:
        radial-gradient(circle at top left, rgba(214, 181, 109, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.esn-user-report-summary-item span {
    color: rgba(214, 181, 109, 0.9);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-user-report-summary-item strong {
    color: #f7fafc;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.esn-ai-bar-chart {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 188px;
    padding: 8px 8px 2px;
    overflow: hidden;
}

.esn-ai-bar-chart::before {
    content: "";
    position: absolute;
    inset: 0 0 18px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.014), rgba(255,255,255,0.004)),
        repeating-linear-gradient(
            to top,
            rgba(255,255,255,0.045) 0,
            rgba(255,255,255,0.045) 1px,
            transparent 1px,
            transparent 36px
        );
    border: 1px solid rgba(255,255,255,0.03);
    pointer-events: none;
}

.esn-ai-bar-chart-item {
    position: relative;
    display: grid;
    grid-template-rows: 150px auto;
    gap: 8px;
    align-items: end;
    justify-items: center;
    min-width: 0;
}

.esn-ai-bar-chart-value {
    display: none;
}

.esn-ai-bar-chart-column {
    position: relative;
    display: block;
    width: 100%;
    height: 150px;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    align-self: end;
}

.esn-ai-bar-chart-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 100%;
    border-radius: 12px 12px 0 0;
    background:
        linear-gradient(180deg, rgba(247, 211, 123, 0.96), rgba(211, 163, 75, 0.94) 54%, rgba(183, 130, 50, 0.94));
    box-shadow: 0 10px 18px rgba(160, 112, 42, 0.18);
}

.esn-ai-bar-chart-fill.is-floor {
    bottom: 4px;
    min-height: 10px;
    border-radius: 999px;
    box-shadow: none;
}

.esn-ai-bar-chart-fill::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
    pointer-events: none;
}

.esn-ai-bar-chart-label {
    color: #89a6cd;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow-wrap: anywhere;
}

.esn-ai-shell .esn-settings-form-section > strong {
    color: #f0c56a;
    font-size: 13px;
    letter-spacing: 0.08em;
}

@media (max-width: 980px) {
    .esn-ai-report-hero {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .esn-ai-report-hero-stats {
        justify-content: flex-start;
    }
}

.esn-ai-shell .esn-admin-webhook-box > strong {
    color: #f0c56a !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.25 !important;
    text-transform: none !important;
}

.esn-ai-shell .esn-admin-webhook-list li span {
    color: #8fa5c2 !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
}

.esn-ai-shell .esn-admin-webhook-list li code {
    display: inline !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--esn-ink) !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    line-height: 1.45 !important;
    text-transform: none !important;
}

.esn-ai-shell .esn-status-pill {
    min-height: 0 !important;
    padding: 4px 9px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.1 !important;
}

.esn-ai-runtime-grid .esn-settings-field {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.015);
}

.esn-ai-runtime-grid .esn-settings-field span {
    font-size: 10px;
    line-height: 1.3;
}

.esn-ai-runtime-grid .esn-control-select,
.esn-ai-runtime-grid input[type="text"] {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 11px;
}

.esn-ai-mapping-box {
    border: 1px solid var(--esn-line);
    background: #111823;
    border-radius: 14px;
    overflow: hidden;
}

.esn-ai-mapping-table {
    display: grid;
    min-width: 0;
}

.esn-ai-mapping-head,
.esn-ai-mapping-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.45fr) 58px minmax(104px, 0.85fr) minmax(88px, 0.75fr);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    min-width: 0;
}

.esn-ai-mapping-head {
    border-bottom: 1px solid var(--esn-line);
    color: var(--esn-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.03);
}

.esn-ai-mapping-head span {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.esn-ai-shell .esn-ai-mapping-head > span,
.esn-ai-shell .esn-ai-persona-head > span {
    color: var(--esn-muted) !important;
    font-family: "Segoe UI", sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
}

.esn-ai-mapping-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.015);
}

.esn-ai-mapping-row:nth-child(odd) {
    background: rgba(255,255,255,0.028);
}

.esn-ai-mapping-row:hover {
    background: rgba(235, 179, 32, 0.08);
}

.esn-ai-mapping-row:last-child {
    border-bottom: 0;
}

.esn-ai-mapping-row strong {
    font-size: 12px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esn-ai-mini-select,
.esn-ai-mini-input {
    min-height: 31px;
    font-size: 11px;
    padding: 5px 8px;
    min-width: 0;
    width: 100%;
}

.esn-ai-mini-select {
    width: 58px;
    padding-left: 6px;
    padding-right: 6px;
}

.esn-ai-mapping-row code {
    font-size: 10px;
    color: var(--esn-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esn-ai-mapping-empty,
.esn-ai-source-empty {
    padding: 10px;
    color: var(--esn-ink-soft);
    font-size: 12px;
}

.esn-ai-persona-table {
    display: grid;
    border: 1px solid var(--esn-line);
    background: #111823;
    border-radius: 14px;
    overflow: hidden;
}

.esn-ai-persona-head,
.esn-ai-persona-row > summary {
    display: grid;
    grid-template-columns: minmax(150px, 1.35fr) minmax(84px, 0.95fr) minmax(88px, 0.9fr) 62px minmax(72px, 0.8fr) minmax(72px, 0.8fr) minmax(110px, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    min-width: 0;
}

.esn-ai-persona-head {
    border-bottom: 1px solid var(--esn-line);
    color: var(--esn-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.03);
}

.esn-ai-persona-head span {
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
}

.esn-ai-persona-row {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.018);
}

.esn-ai-persona-row:last-child {
    border-bottom: 0;
}

.esn-ai-persona-row > summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.esn-ai-persona-row > summary::-webkit-details-marker {
    display: none;
}

.esn-ai-persona-row > summary::before {
    content: "›";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-52%);
    color: var(--esn-accent);
    font-size: 18px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.esn-ai-persona-row[open] > summary::before {
    transform: translateY(-52%) rotate(90deg);
}

.esn-ai-persona-row:nth-child(odd) {
    background: rgba(255,255,255,0.032);
}

.esn-ai-persona-row > summary:hover,
.esn-ai-persona-row[open] > summary {
    background: rgba(235, 179, 32, 0.08);
}

.esn-ai-persona-row > summary strong {
    font-size: 12px;
    color: var(--esn-ink);
}

.esn-ai-persona-row > summary span,
.esn-ai-persona-row > summary code {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.esn-ai-persona-body {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
    background: rgba(8, 12, 18, 0.55);
}

.esn-ai-persona-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    color: var(--esn-ink-soft);
}

.esn-ai-source-list {
    display: grid;
    gap: 8px;
}

.esn-ai-source-item {
    border: 1px solid rgba(255,255,255,0.08);
    background: #18212e;
    border-radius: 12px;
    overflow: hidden;
}

.esn-ai-source-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    list-style: none;
    background: rgba(255,255,255,0.02);
}

.esn-ai-source-item > summary::-webkit-details-marker {
    display: none;
}

.esn-ai-source-item > summary strong,
.esn-ai-source-item > summary a {
    font-size: 11px;
    color: var(--esn-ink);
}

.esn-ai-source-item > summary a {
    color: #f0c56a;
    text-decoration: none;
}

.esn-ai-source-item > summary:hover {
    background: rgba(235, 179, 32, 0.08);
}

.esn-ai-source-item p {
    margin: 0;
    padding: 0 10px 10px;
    color: var(--esn-ink-soft);
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .esn-ai-overview-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .esn-ai-runtime-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .esn-ai-usage-stat-grid,
    .esn-ai-usage-module-grid,
    .esn-ai-usage-layout {
        grid-template-columns: 1fr;
    }

    .esn-ai-bar-chart {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1700px) {
    .esn-ai-usage-layout,
    .esn-ai-usage-module-grid {
        grid-template-columns: 1fr;
    }

    .esn-ai-usage-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .esn-ai-runtime-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .esn-ai-mapping-head,
    .esn-ai-mapping-row {
        grid-template-columns: minmax(136px, 1.45fr) 58px minmax(104px, 0.9fr) minmax(88px, 0.85fr);
        gap: 8px;
    }

    .esn-ai-persona-head,
    .esn-ai-persona-row > summary {
        grid-template-columns: minmax(150px, 1.3fr) minmax(80px, 0.9fr) minmax(78px, 0.8fr) 54px minmax(66px, 0.72fr) minmax(66px, 0.72fr) minmax(96px, 0.9fr);
        gap: 8px;
    }
}

@media (max-width: 860px) {
    .esn-ai-runtime-grid,
    .esn-ai-overview-summary-grid,
    .esn-ai-module-grid,
    .esn-ai-placeholder-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .esn-ai-usage-stat-grid,
    .esn-ai-usage-module-grid,
    .esn-ai-usage-layout,
    .esn-ai-usage-module-metrics,
    .esn-ai-bar-chart {
        grid-template-columns: minmax(0, 1fr);
    }

    .esn-ai-usage-window-head,
    .esn-ai-usage-module-head,
    .esn-ai-usage-module-foot,
    .esn-ai-usage-model-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .esn-ai-usage-model-row > div:last-child {
        justify-items: start;
    }

    .esn-ai-mapping-head,
    .esn-ai-persona-head {
        display: none;
    }

    .esn-ai-mapping-row,
    .esn-ai-persona-row > summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .esn-ai-persona-row > summary {
        padding-left: 34px;
    }
}

.esn-settings-rail-head,
.esn-settings-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.esn-settings-rail-head strong,
.esn-settings-form-head h3 {
    margin: 0;
    color: var(--esn-ink);
    font: 700 15px/1.3 "Segoe UI", sans-serif;
}

.esn-settings-rail-list {
    display: grid;
    gap: 10px;
}

.esn-settings-rail-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
}

.esn-settings-rail-item,
.esn-settings-channel-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.03);
    color: var(--esn-ink);
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.esn-settings-rail-item:hover,
.esn-settings-channel-card:hover {
    border-color: rgba(213, 161, 88, 0.42);
    background: rgba(255,255,255,0.045);
    transform: translateY(-1px);
}

.esn-settings-rail-item.is-active {
    border-color: rgba(213, 161, 88, 0.6);
    box-shadow: 0 0 0 1px rgba(213, 161, 88, 0.16) inset;
}

.esn-settings-rail-item-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.esn-settings-rail-item strong,
.esn-settings-channel-card strong {
    color: var(--esn-ink);
    font: 600 13px/1.35 "Segoe UI", sans-serif;
}

.esn-settings-rail-item span,
.esn-settings-channel-card span,
.esn-settings-form-head p {
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-settings-stage {
    display: grid;
    gap: 16px;
}

.esn-settings-panel-head h1 {
    margin: 0;
    color: var(--esn-ink);
    font: 700 20px/1.15 "Segoe UI", sans-serif;
    letter-spacing: -0.02em;
}

.esn-settings-panel-head p {
    margin: 8px 0 0;
    max-width: 68ch;
    color: var(--esn-muted);
    font-size: 13px;
    line-height: 1.5;
}

.esn-settings-form-priority {
    border-color: rgba(213, 161, 88, 0.45);
    background: linear-gradient(180deg, rgba(213, 161, 88, 0.10), rgba(255,255,255,0.025));
    box-shadow: 0 0 0 1px rgba(213, 161, 88, 0.08) inset;
}

.esn-role-stage {
    gap: 18px;
}

.esn-role-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(213, 161, 88, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(31, 39, 51, 0.98), rgba(18, 24, 32, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--esn-shadow-soft);
}

.esn-role-hero.is-compact {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 20px;
}

.esn-role-hero-copy {
    display: grid;
    gap: 8px;
}

.esn-role-hero-copy h3 {
    margin: 0;
    color: var(--esn-ink);
    font: 700 18px/1.15 "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

.esn-role-hero-copy p {
    margin: 0;
    max-width: 62ch;
    color: var(--esn-muted);
    font-size: 13px;
    line-height: 1.55;
}

.esn-role-note {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(200, 155, 93, 0.16);
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
}

.esn-role-note strong {
    margin: 0;
    color: var(--esn-ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-role-note p {
    margin: 0;
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.5;
}

.esn-role-note.is-inline {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.esn-role-note.is-inline .esn-secondary-button {
    text-decoration: none;
}

.esn-role-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.esn-role-stat-card {
    display: grid;
    gap: 8px;
}

.esn-role-stat-card strong {
    margin: 0;
}

.esn-role-stat-value {
    color: var(--esn-ink);
    font: 700 24px/1 "Segoe UI", sans-serif;
    letter-spacing: -0.03em;
}

.esn-role-stat-card p,
.esn-role-field-copy {
    margin: 0;
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.5;
}

.esn-role-checklist {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.esn-role-stage .esn-agents-card-grid {
    margin-top: 0;
}

.esn-inbox-options-stage {
    gap: 18px;
}

.esn-inbox-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at top right, rgba(213, 161, 88, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(31, 39, 51, 0.98), rgba(18, 24, 32, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--esn-shadow-soft);
}

.esn-inbox-hero-copy {
    display: grid;
    gap: 8px;
}

.esn-inbox-hero-kicker {
    color: rgba(223, 183, 118, 0.9);
    font: 700 11px/1.2 "Segoe UI", sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.esn-inbox-hero-copy h3 {
    margin: 0;
    color: var(--esn-ink);
    font: 700 18px/1.15 "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

.esn-inbox-hero-copy p {
    margin: 0;
    max-width: 62ch;
    color: var(--esn-muted);
    font-size: 13px;
    line-height: 1.55;
}

.esn-inbox-hero-meta {
    display: grid;
    align-content: space-between;
    justify-items: end;
    gap: 12px;
}

.esn-inbox-meta-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.esn-inbox-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--esn-ink-soft);
    font: 700 11px/1 "Segoe UI", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-inbox-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.esn-inbox-overview-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(25, 33, 44, 0.98), rgba(18, 24, 32, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-inbox-overview-label {
    color: var(--esn-muted);
    font: 700 9px/1.2 "Segoe UI", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-inbox-overview-card strong {
    color: var(--esn-ink);
    font: 700 12px/1.35 "Segoe UI", sans-serif;
    overflow-wrap: anywhere;
}

.esn-inbox-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.esn-inbox-main,
.esn-inbox-side {
    display: grid;
    gap: 16px;
}

.esn-inbox-form {
    gap: 18px;
}

.esn-inbox-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 31, 41, 0.98), rgba(16, 22, 30, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.esn-inbox-panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.esn-inbox-panel-head strong {
    display: block;
    color: var(--esn-ink);
    font: 700 11px/1.2 "Segoe UI", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.esn-inbox-panel-head p {
    margin: 4px 0 0;
    color: var(--esn-muted);
    font-size: 11px;
    line-height: 1.5;
}

.esn-inbox-panel-danger {
    border-color: rgba(173, 72, 72, 0.26);
    background: linear-gradient(180deg, rgba(41, 22, 24, 0.96), rgba(28, 18, 21, 0.98));
}

.esn-inbox-field-grid {
    gap: 14px;
}

.esn-settings-field-toggle {
    align-content: start;
}

.esn-settings-boolean {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.esn-settings-boolean input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #d5a158;
}

.esn-settings-boolean em {
    color: var(--esn-muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.4;
}

.esn-inbox-template-card {
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
}

.esn-inbox-facts,
.esn-inbox-verify-list,
.esn-inbox-webhooks {
    display: grid;
    gap: 10px;
}

.esn-inbox-facts div,
.esn-inbox-verify-row,
.esn-inbox-webhook-row {
    display: grid;
    gap: 6px;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
}

.esn-inbox-facts span,
.esn-inbox-verify-row span,
.esn-inbox-webhook-row span {
    color: var(--esn-muted);
    font: 600 9px/1.2 "Segoe UI", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-inbox-facts strong {
    color: var(--esn-ink);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.esn-inbox-verify-row code,
.esn-inbox-webhook-row code {
    display: block;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    color: var(--esn-ink);
    overflow-wrap: anywhere;
}

.esn-inbox-verify-note {
    padding: 12px 14px;
    border-left: 3px solid rgba(213, 161, 88, 0.54);
    background: rgba(213, 161, 88, 0.08);
    color: var(--esn-ink-soft);
    font-size: 12px;
    line-height: 1.5;
}

.esn-inbox-advanced[open] summary {
    margin-bottom: 10px;
}

.esn-inbox-form-actions {
    justify-content: flex-start;
}

.esn-inbox-verify-form {
    gap: 0;
}

.esn-settings-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.esn-settings-form {
    display: grid;
    gap: 16px;
}

.esn-settings-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 10px;
}

.esn-settings-inline-form input[type="text"] {
    min-width: 0;
}

.esn-unified-mapping-row {
    display: grid;
    gap: 8px;
}

.esn-unified-mapping-summary,
.esn-unified-mapping-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.esn-unified-mapping-detail span {
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-unified-pair-builder {
    display: grid;
    gap: 16px;
}

.esn-unified-pair-steps {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 18px;
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.45;
}

.esn-unified-pair-steps li {
    padding-left: 4px;
}

.esn-unified-pair-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.esn-unified-pair-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.esn-unified-select {
    position: relative;
}

.esn-unified-select summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(180deg, rgba(36, 46, 60, 0.98), rgba(25, 33, 44, 0.98));
    cursor: pointer;
    list-style: none;
}

.esn-unified-select summary::-webkit-details-marker {
    display: none;
}

.esn-unified-select summary strong {
    color: var(--esn-ink);
    font-size: 14px;
}

.esn-unified-select summary span {
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-unified-select-menu {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    max-height: 240px;
    overflow: auto;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(11, 15, 21, 0.78);
}

.esn-unified-pair-pane {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(26, 34, 44, 0.98), rgba(19, 25, 33, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), var(--esn-shadow-soft);
}

.esn-unified-pair-pane header {
    display: grid;
    gap: 4px;
}

.esn-unified-pair-pane header strong {
    color: var(--esn-ink);
    font-size: 15px;
    letter-spacing: 0.02em;
}

.esn-unified-pair-pane header span {
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.45;
}

.esn-unified-pair-list {
    display: grid;
    gap: 10px;
}

.esn-unified-pair-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.esn-unified-pair-option:hover {
    transform: translateY(-1px);
    border-color: rgba(200, 155, 93, 0.36);
    background: rgba(200, 155, 93, 0.08);
}

.esn-unified-pair-option strong {
    color: var(--esn-ink);
    display: block;
}

.esn-unified-pair-option span {
    color: var(--esn-muted);
    font-size: 12px;
}

.esn-unified-pair-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.esn-unified-pair-footer .esn-settings-field {
    margin-bottom: 0;
}

.esn-unified-pair-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esn-unified-empty {
    color: var(--esn-muted);
    font-size: 12px;
    padding: 10px;
}

.esn-unified-mapping-grid {
    display: grid;
    gap: 12px;
}

.esn-unified-mapping-card {
    display: grid;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(26, 34, 44, 0.98), rgba(19, 25, 33, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.esn-unified-mapping-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.esn-unified-mapping-card-head strong {
    font-size: 13px;
}

.esn-unified-mapping-card-head code {
    color: var(--esn-muted);
    font-size: 11px;
}

.esn-unified-mapping-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.esn-unified-mapping-card-body span {
    display: block;
    color: var(--esn-muted) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em !important;
    margin-bottom: 4px;
}

.esn-unified-mapping-card-body strong {
    color: var(--esn-ink);
    line-height: 1.4;
    font-size: 12px;
}

.esn-unified-mapping-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.esn-unified-mapping-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esn-unified-label-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.esn-unified-label-form input {
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink);
}

.esn-settings-field-grid,
.esn-settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.esn-settings-field {
    display: grid;
    gap: 7px;
}

.esn-settings-checklist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 10px 12px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.03);
}

.esn-settings-checklist label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--esn-ink-soft);
}

.esn-settings-field span,
.esn-settings-form-section strong,
.esn-settings-advanced summary {
    color: var(--esn-ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.esn-settings-field input,
.esn-settings-field select {
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink);
}

.esn-settings-field input:disabled {
    opacity: 0.8;
}

.esn-settings-form-section,
.esn-settings-advanced {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.025);
}

.esn-settings-advanced[open] summary {
    margin-bottom: 2px;
}

.esn-settings-form-actions {
    display: flex;
    justify-content: flex-end;
}

.esn-inline-form {
    display: inline-flex;
}

.esn-link-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 5px 9px;
    border: 1px solid rgba(173, 72, 72, 0.45);
    border-radius: 8px;
    background: rgba(128, 38, 38, 0.22);
    color: #f3c6c6;
    font: 700 10px/1 "Segoe UI", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.esn-link-danger:hover {
    background: rgba(146, 48, 48, 0.34);
    color: #ffe3e3;
}

.esn-settings-danger-form {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .esn-inbox-hero,
    .esn-inbox-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .esn-inbox-hero-meta {
        justify-items: start;
    }

    .esn-inbox-meta-pills {
        justify-content: start;
    }

    .esn-inbox-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .esn-inbox-overview-grid,
    .esn-settings-field-grid,
    .esn-settings-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .esn-inbox-hero {
        padding: 18px;
    }

    .esn-inbox-hero-copy h3 {
        font-size: 17px;
    }

    .esn-role-hero {
        padding: 18px;
    }

    .esn-role-hero-copy h3 {
        font-size: 17px;
    }
}

@media (max-width: 980px) {
    .esn-role-hero,
    .esn-role-note.is-inline {
        grid-template-columns: minmax(0, 1fr);
    }
}

.esn-danger-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(173, 72, 72, 0.48);
    background: rgba(128, 38, 38, 0.24);
    color: #f3c6c6;
    font: 700 12px/1 "Segoe UI", sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.esn-danger-button:hover {
    background: rgba(146, 48, 48, 0.34);
    border-color: rgba(204, 90, 90, 0.56);
    color: #ffe3e3;
}

.esn-admin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--esn-ink);
}

.esn-admin-checkbox span {
    display: inline;
    margin-top: 0;
    font-size: 12px;
    line-height: 1.2;
}

.esn-db-card-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    gap: 12px;
    padding-bottom: 8px;
    background: #111821;
}

.esn-db-card-shell > * {
    flex: 0 0 auto;
}

.esn-db-card-panel .panel-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden !important;
    background: #111821 !important;
}

.esn-nav-group,
.esn-accordion {
    flex: 0 0 auto;
}

.esn-db-card-head {
    box-shadow: var(--esn-shadow);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 16px 15px;
    background: #10161e;
}

.esn-db-card-head-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-align: center;
}

.esn-accordion {
    box-shadow: var(--esn-shadow);
    background: #151b23;
}

.esn-db-card-panel .panel-body:hover,
.esn-accordion:hover {
    background: #151b23;
}

.esn-accordion[open] {
    border-color: var(--esn-line-strong);
    box-shadow: 0 0 0 1px rgba(200, 155, 93, 0.14), var(--esn-shadow);
}

.esn-db-head-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.esn-inline-edit-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(43, 52, 66, 0.98), rgba(32, 40, 53, 0.98));
    color: var(--esn-ink);
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

.esn-inline-edit-icon:hover {
    border-color: rgba(200, 155, 93, 0.46);
    transform: translateY(-1px);
}

.esn-head-action-button,
.esn-primary-button,
.esn-secondary-button {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--esn-ink);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 18px rgba(0,0,0,0.16);
}

.esn-head-action-button,
.esn-primary-button {
    background: linear-gradient(180deg, rgba(54, 111, 81, 0.98), rgba(42, 91, 66, 0.98));
    border-color: rgba(73, 140, 104, 0.58);
    color: #eefaf3;
}

.esn-secondary-button {
    background: linear-gradient(180deg, rgba(43, 52, 66, 0.98), rgba(32, 40, 53, 0.98));
    border-color: rgba(255,255,255,0.10);
}

.esn-db-card-head h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.esn-db-label-trigger {
    width: 100%;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--esn-ink);
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

.esn-db-label-trigger:hover {
    background: rgba(200, 155, 93, 0.08);
}

.esn-db-label-trigger .esn-tag-pill {
    min-height: 26px;
    padding: 5px 7px;
    font-size: 11px;
}

.esn-db-label-placeholder {
    color: var(--esn-ink-soft);
    font-size: 13px;
}

.esn-label-choice-list {
    display: grid;
    gap: 10px;
}

.esn-label-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.esn-label-choice:hover {
    border-color: rgba(200, 155, 93, 0.38);
    background: rgba(200, 155, 93, 0.08);
    transform: translateY(-1px);
}

.esn-label-choice input {
    accent-color: var(--esn-accent);
}

.esn-accordion summary {
    cursor: pointer;
    padding: 14px 16px 13px;
    font-weight: 700;
    color: var(--esn-accent);
    list-style: none;
    border-bottom: 1px solid transparent;
    background: #151b23;
    position: relative;
}

.esn-accordion[open] summary {
    border-bottom-color: var(--esn-line);
}

.esn-accordion summary::-webkit-details-marker {
    display: none;
}

.esn-accordion summary::after {
    content: '+';
    position: absolute;
    right: 16px;
    color: var(--esn-accent);
    font-size: 18px;
    line-height: 1;
}

.esn-accordion[open] summary::after {
    content: '−';
    color: var(--esn-accent);
}

.esn-accordion-body {
    display: block;
    padding: 12px 16px 14px;
}

.esn-db-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.esn-db-grid.is-single {
    grid-template-columns: 1fr;
}

.esn-db-grid strong,
.esn-db-grid span {
    display: block;
}

.esn-db-grid strong {
    margin-bottom: 5px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--esn-ink-soft);
}

.esn-db-grid span {
    line-height: 1.45;
    color: var(--esn-ink);
}

.esn-quality-ai-audit-toggle {
    border-top: 1px solid var(--esn-line);
    padding-top: 10px;
}

.esn-quality-ai-audit-toggle > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.esn-quality-ai-audit-toggle > summary::-webkit-details-marker {
    display: none;
}

.esn-quality-ai-audit-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.esn-quality-ai-audit-card {
    border: 1px solid var(--esn-line);
    background: rgba(13, 18, 26, 0.72);
    padding: 12px;
}

.esn-quality-ai-audit-head,
.esn-quality-ai-audit-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.esn-quality-ai-audit-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--esn-ink-soft);
}

.esn-quality-ai-audit-card p {
    margin: 10px 0 0;
    color: var(--esn-ink);
    line-height: 1.5;
}


.esn-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 12, 18, 0.64);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 24px;
}

.esn-modal-backdrop[hidden] {
    display: none !important;
}

.esn-modal-card {
    width: min(560px, 100%);
    border: 1px solid var(--esn-line-strong);
    background: #131922;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.esn-modal-head,
.esn-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--esn-line);
}

.esn-modal-foot {
    border-bottom: 0;
    border-top: 1px solid var(--esn-line);
    justify-content: flex-end;
}

.esn-modal-head h3 {
    margin: 4px 0 0;
}

.esn-modal-close {
    border: 0;
    background: transparent;
    color: var(--esn-ink);
    font-size: 28px;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.esn-modal-close:hover,
.esn-modal-close:focus-visible {
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(217, 171, 96, 0.18);
    outline: none;
}

.esn-modal-close:active {
    transform: scale(0.96);
}

.esn-modal-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.esn-modal-copy,
.esn-modal-rules,
.esn-checkbox-row {
    color: var(--esn-muted);
}

.esn-call-incoming-modal {
    z-index: 1200;
}

.esn-call-incoming-meta {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--esn-line);
    background: rgba(255, 255, 255, 0.03);
}

.esn-call-incoming-meta strong {
    font-size: 14px;
    color: var(--esn-ink);
}

.esn-call-incoming-meta span {
    font-size: 12px;
    color: var(--esn-muted);
}

.esn-call-card.is-in-call .esn-modal-head {
    border-bottom-color: rgba(64, 196, 132, 0.35);
}

.esn-call-card.is-in-call .esn-kicker {
    color: #63d39b;
}

.esn-call-incoming-timer {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--esn-ink);
}

.esn-call-card.is-in-call .esn-call-incoming-timer {
    color: #63d39b;
}

.esn-call-foot {
    justify-content: space-between;
}

.esn-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.esn-field {
    display: grid;
    gap: 6px;
}

.esn-field span {
    font-size: 12px;
    color: var(--esn-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.esn-field select {
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(28, 38, 52, 0.98), rgba(24, 32, 44, 0.98));
    color: var(--esn-ink);
    border: 1px solid rgba(255,255,255,0.10);
}

.esn-field input {
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(28, 38, 52, 0.98), rgba(24, 32, 44, 0.98));
    color: var(--esn-ink);
    border: 1px solid rgba(255,255,255,0.10);
}

.esn-modal-inline-hint {
    font-size: 12px;
    color: var(--esn-muted);
}


.esn-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.esn-checkbox-stack {
    display: grid;
    gap: 10px;
}

.esn-related-list-tight {
    display: grid;
    gap: 8px;
}

.esn-related-list-tight li {
    margin: 0;
}

.esn-locked-card {
    padding: 10px 12px;
}

.esn-related-list li.is-active {
    border-color: rgba(217, 171, 96, 0.82);
    background: linear-gradient(180deg, rgba(42, 48, 58, 0.98), rgba(33, 39, 48, 0.98));
    box-shadow: inset 4px 0 0 rgba(217, 171, 96, 0.98), 0 0 0 1px rgba(217, 171, 96, 0.26);
}

.esn-related-list li.is-locked {
    border-style: dashed;
    background: rgba(255,255,255,0.03);
}

.esn-related-list li.is-call-secondary {
    opacity: 0.82;
    border-style: dashed;
}

.esn-panel-placeholder,
.esn-empty-panel {
    margin: 16px;
    padding: 18px;
    border: 1px dashed var(--esn-line-strong);
    background: rgba(255,255,255,0.03);
}

.esn-module-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.esn-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgba(208,111,100,0.14);
    border: 1px solid rgba(208,111,100,0.28);
    color: #f0d0ca;
}

.esn-auth-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.esn-auth-brand img {
    height: auto;
    display: block;
    max-width: 100%;
}

.esn-auth-brand img.is-favicon {
    width: 88px;
    flex: 0 0 auto;
}

.esn-auth-brand img.is-logo {
    width: min(320px, calc(100% - 112px));
    min-width: 220px;
}

.esn-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.esn-auth-card {
    width: 100%;
    max-width: 560px;
    padding: 42px;
    background: rgba(18, 24, 31, 0.96);
    border: 1px solid var(--esn-line-strong);
    box-shadow: var(--esn-shadow);
}

.esn-auth-subtitle,
.esn-alert-hint {
    color: var(--esn-muted);
}

.esn-auth-form {
    display: grid;
    gap: 12px;
}

.esn-auth-form label {
    color: var(--esn-ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.esn-auth-input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.05);
    color: var(--esn-ink);
    box-sizing: border-box;
}

.esn-auth-input:-webkit-autofill,
.esn-auth-input:-webkit-autofill:hover,
.esn-auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--esn-ink);
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 26, 34, 0.96) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.esn-admin-stats,
.esn-grid-two {
    display: grid;
    gap: 16px;
}

.esn-admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.esn-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.esn-stat-box {
    padding: 16px;
    background: rgba(22, 28, 36, 0.9);
    border: 1px solid var(--esn-line);
}

.esn-stat-box > strong,
.esn-stat-box > span {
    display: block;
}

.esn-stat-box > span {
    margin-top: 8px;
    font-size: 26px;
}

.esn-admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.esn-admin-table th,
.esn-admin-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--esn-line);
    vertical-align: top;
}

.esn-admin-table th {
    color: var(--esn-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.esn-agents-team-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(213, 161, 88, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(213, 161, 88, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(23, 30, 40, 0.98), rgba(17, 23, 32, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--esn-shadow-soft);
}

.esn-agents-team-hero h2 {
    margin: 4px 0 4px;
    color: var(--esn-ink);
    font-size: 16px;
    line-height: 1.08;
}

.esn-agents-team-hero p {
    margin: 0;
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.4;
}

.esn-agents-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.esn-agents-card {
    border: 1px solid rgba(213, 161, 88, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(29, 36, 47, 0.98), rgba(23, 30, 40, 0.98));
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(20, 35, 60, 0.16);
}

.esn-agents-card.is-overview {
    min-height: 100%;
}

.esn-agents-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.esn-agents-card-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.esn-agents-card-identity strong {
    margin: 0;
    font-size: 15px;
}

.esn-agents-card-identity span {
    margin-top: 4px;
    font-size: 11px;
    color: var(--esn-muted);
    letter-spacing: 0.08em;
}

.esn-agents-presence {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.esn-agents-card-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--avatar-bg, #17324d);
    color: var(--avatar-fg, #ffffff);
    font-weight: 700;
    flex: 0 0 auto;
}

.esn-agents-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.esn-agents-card-meta div {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.esn-agents-card-meta span {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--esn-muted);
}

.esn-agents-card-meta strong {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
    color: var(--esn-ink);
}

.esn-agents-card-meta.is-overview {
    grid-template-columns: 1fr;
}

.esn-agents-card-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.esn-agents-card-form.is-compact {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
}

.esn-agents-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.esn-settings-field textarea {
    width: 100%;
    min-height: 120px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--esn-line);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink);
    box-sizing: border-box;
    resize: vertical;
}

.esn-settings-field textarea:focus {
    outline: none;
    border-color: rgba(200, 155, 93, 0.46);
    box-shadow: 0 0 0 3px rgba(200, 155, 93, 0.12);
}

.esn-auto-stage {
    display: grid;
    gap: 16px;
}

.esn-crm-stage {
    display: grid;
    gap: 16px;
}

.esn-crm-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.esn-crm-inline-box {
    margin: 0;
}

.esn-crm-doc-grid {
    align-items: start;
}

.esn-crm-doc-span-full {
    grid-column: 1 / -1;
}

.esn-crm-code-card pre {
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(12, 17, 24, 0.78);
    color: #dbe8f8;
    font: 600 12px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    max-height: 420px;
}

.esn-auto-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.esn-auto-master-form {
    margin: 0;
    grid-column: span 2;
}

.esn-auto-master-card,
.esn-auto-mini-stat,
.esn-auto-table-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(213, 161, 88, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(213, 161, 88, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(24, 31, 41, 0.98), rgba(17, 23, 32, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(20, 35, 60, 0.16);
}

.esn-auto-master-card {
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.esn-auto-master-copy {
    display: grid;
    gap: 6px;
}

.esn-auto-master-copy p,
.esn-auto-mini-stat p {
    color: var(--esn-muted);
    font-size: 12px;
    line-height: 1.5;
}

.esn-auto-mini-stat .esn-role-stat-value,
.esn-auto-master-copy .esn-role-stat-value {
    font-size: 24px;
    line-height: 1;
}

.esn-auto-mini-stat strong,
.esn-auto-master-copy strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--esn-ink-soft);
}

.esn-auto-config-form {
    gap: 14px;
}

.esn-auto-overview-panels {
    align-items: start;
}

.esn-auto-panel {
    min-height: 100%;
}

.esn-auto-inline-note {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--esn-ink-soft);
    font-size: 13px;
}

.esn-auto-rules-list {
    display: grid;
    gap: 8px;
}

.esn-auto-rules-list span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.esn-auto-rules-list strong {
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--esn-ink);
}

.esn-auto-rules-list em {
    font-style: normal;
    color: var(--esn-muted);
    font-size: 12px;
    text-align: right;
}

.esn-auto-table-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.esn-auto-load-table {
    margin-top: 0;
}

.esn-auto-load-table th,
.esn-auto-load-table td {
    padding: 12px 10px;
}

.esn-auto-seller-cell {
    min-width: 220px;
}

.esn-auto-seller-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.esn-auto-seller-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(72, 107, 145, 0.98), rgba(45, 72, 102, 0.98));
    color: #eff6ff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.esn-auto-seller-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.esn-auto-seller-text strong {
    font-size: 13px;
    line-height: 1.3;
}

.esn-auto-seller-text span {
    font-size: 11px;
    color: var(--esn-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.esn-auto-table-value {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 12px;
    color: var(--esn-ink-soft);
}

.esn-auto-table-value.is-muted {
    color: var(--esn-muted);
}

.esn-auto-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esn-auto-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(200, 155, 93, 0.18);
    background: rgba(200, 155, 93, 0.10);
    color: #ead3af;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.esn-auto-pool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.esn-auto-pool-card {
    gap: 14px;
}

.esn-seller-pool-picker { position: relative; }
.esn-seller-pool-picker > summary { min-height:42px; padding:8px 38px 8px 12px; border:1px solid #3a5368; border-radius:10px; background:#192633; color:#eaf2f8; cursor:pointer; display:flex; align-items:center; gap:8px; list-style:none; position:relative; }
.esn-seller-pool-picker > summary::-webkit-details-marker { display:none; }
.esn-seller-pool-picker > summary::after { content:'⌄'; position:absolute; right:13px; color:#9cb2c5; font-size:18px; }
.esn-seller-pool-picker[open] > summary::after { transform:rotate(180deg); }
.esn-seller-pool-picker-hint { margin-left:auto; color:#a8bed0; font-size:12px; }
.esn-seller-pool-selected-tags { min-height:30px; padding:7px 2px 0; }
.esn-seller-pool-picker[open] > .esn-auto-pool-list { position:absolute; z-index:30; inset:calc(100% + 6px) 0 auto; max-height:260px; overflow:auto; padding:8px; border:1px solid #3a5368; border-radius:10px; background:#14202b; box-shadow:0 14px 30px rgba(0,0,0,.35); }
.esn-notification-center { position:relative; }.esn-notification-panel { width:330px; max-height:420px; overflow:auto; }.esn-notification-item { margin:0 0 6px; }.esn-notification-item button { width:100%; border:1px solid rgba(135,164,187,.2); border-radius:8px; background:transparent; color:inherit; padding:9px; text-align:left; cursor:pointer; }.esn-notification-item.is-unread button { background:rgba(52,111,155,.17); border-color:rgba(102,173,223,.45); }.esn-notification-item strong,.esn-notification-item span,.esn-notification-item em { display:block; }.esn-notification-item span { margin-top:3px; color:#a8bed0; font-size:12px; }.esn-notification-item em { margin-top:5px; color:#748a9d; font-size:11px; font-style:normal; }
.esn-notification-trigger { color:#8ed5ff; text-shadow:0 0 14px rgba(93,196,255,.35); }.esn-notification-trigger svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.esn-notification-trigger:hover { color:#c8efff; border-color:rgba(122,209,255,.7); background:#183448; }.esn-notification-overlay { position:fixed; z-index:1400; left:12px; bottom:58px; width:min(430px,calc(100vw - 24px)); }.esn-notification-overlay[hidden] { display:none; }.esn-notification-overlay-panel { width:100%; max-height:min(560px,calc(100vh - 84px)); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border:1px solid rgba(111,199,246,.35); border-radius:16px; background:linear-gradient(180deg,#172632,#101a23); box-shadow:0 20px 44px rgba(0,0,0,.48); }.esn-notification-overlay-head { display:flex; justify-content:space-between; align-items:start; gap:16px; padding:16px 18px 12px; border-bottom:1px solid rgba(255,255,255,.08); }.esn-notification-overlay-head .esn-notification-panel-head { flex:1; border:0; padding:0; }.esn-notification-overlay .esn-notification-panel { width:auto; max-height:none; overflow:auto; padding:12px 18px; }.esn-notification-overlay-foot { padding:12px 18px 16px; border-top:1px solid rgba(255,255,255,.08); }
.esn-brand-title-row { display:flex; align-items:center; gap:8px; }.esn-bug-report-trigger { padding:4px 7px; border:1px solid rgba(122,209,255,.38); border-radius:7px; background:rgba(38,100,137,.22); color:#9cddff; font:inherit; font-size:10px; font-weight:700; cursor:pointer; }.esn-bug-report-trigger:hover { background:rgba(51,131,176,.32); color:#d5f3ff; }
.esn-bug-report-modal textarea { min-height:132px; border:1px solid #3a5368; border-radius:10px; background:#14202b; color:#eaf2f8; caret-color:#9cddff; }.esn-bug-report-modal textarea::placeholder { color:#829aaf; }.esn-bug-report-modal textarea:focus { outline:none; border-color:#69c7f5; box-shadow:0 0 0 3px rgba(67,164,214,.16); }
.esn-bug-report-image { display:block; max-width:100%; max-height:420px; border:1px solid #3a5368; border-radius:10px; }

.esn-auto-pool-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.esn-auto-pool-list {
    display: grid;
    gap: 8px;
}

.esn-auto-pool-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.esn-auto-pool-item:hover {
    transform: translateY(-1px);
    border-color: rgba(200, 155, 93, 0.24);
}

.esn-auto-pool-item.is-selected {
    border-color: rgba(200, 155, 93, 0.28);
    background: rgba(200, 155, 93, 0.08);
}

.esn-auto-pool-item-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--esn-ink-soft);
}

.esn-auto-pool-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--esn-accent);
}

.esn-auto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.esn-auto-toggle-master {
    justify-self: end;
}

.esn-auto-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.esn-auto-toggle-track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(202, 111, 104, 0.32);
    border: 1px solid rgba(202, 111, 104, 0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: background 160ms ease, border-color 160ms ease;
}

.esn-auto-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f3f7fb;
    box-shadow: 0 4px 10px rgba(0,0,0,0.24);
    transition: transform 160ms ease;
}

.esn-auto-toggle-copy {
    font-size: 12px;
    font-weight: 700;
}

.esn-auto-toggle-on,
.esn-auto-toggle-off {
    display: none;
}

.esn-auto-toggle-off {
    display: inline;
    color: #e0a7a1;
}

.esn-auto-toggle-input:checked + .esn-auto-toggle-track {
    background: rgba(87, 181, 138, 0.28);
    border-color: rgba(87, 181, 138, 0.48);
}

.esn-auto-toggle-input:checked + .esn-auto-toggle-track::after {
    transform: translateX(20px);
}

.esn-auto-toggle-input:checked ~ .esn-auto-toggle-copy .esn-auto-toggle-on {
    display: inline;
    color: #9ad4b5;
}

.esn-auto-toggle-input:checked ~ .esn-auto-toggle-copy .esn-auto-toggle-off {
    display: none;
}

.esn-auto-seller-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 0;
}

.esn-auto-seller-card {
    padding: 14px;
    border-radius: 16px;
    gap: 12px;
}

.esn-auto-seller-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    font-size: 13px;
}

.esn-auto-seller-field-grid {
    gap: 10px;
}

.esn-auto-seller-field-grid > .esn-settings-field {
    min-width: 0;
}

.esn-auto-seller-card .esn-settings-field input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.esn-agents-admin-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(24, 31, 41, 0.98), rgba(16, 22, 30, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

@media (max-width: 1200px) {
    .esn-db-grid,
    .esn-grid-two,
    .esn-admin-stats,
    .esn-admin-inbox-summary,
    .esn-admin-settings-group {
        grid-template-columns: 1fr;
    }

    .esn-workspace-shell {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .esn-workspace-center-layout {
        grid-template-columns: 320px minmax(0, 1fr) 320px;
    }

    .esn-admin-inbox-head,
    .esn-admin-inbox-meta {
        grid-template-columns: 1fr;
    }

    .esn-admin-inbox-state {
        justify-items: start;
    }

    .esn-agents-team-hero,
    .esn-agents-card-head {
        flex-direction: column;
    }

    .esn-auto-overview-grid,
    .esn-crm-summary-grid,
    .esn-auto-pool-grid,
    .esn-auto-seller-field-grid {
        grid-template-columns: 1fr;
    }

    .esn-crm-doc-span-full {
        grid-column: auto;
    }

    .esn-auto-master-form {
        grid-column: auto;
    }

    .esn-auto-master-card,
    .esn-auto-pool-head,
    .esn-auto-table-head,
    .esn-auto-pool-item {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .esn-auto-toggle-master {
        justify-self: start;
    }

    .esn-agents-card-meta {
        grid-template-columns: 1fr;
    }

    .esn-window-state-bar,
    .esn-unified-pair-picker,
    .esn-unified-pair-columns,
    .esn-unified-pair-footer,
    .esn-unified-mapping-card-body,
    .esn-unified-mapping-actions,
    .esn-unified-label-form {
        grid-template-columns: 1fr;
    }

    .esn-unified-pair-footer-actions,
    .esn-unified-mapping-quick-actions {
        flex-wrap: wrap;
    }
}
