:root {
    color-scheme: light;
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
    --theme-page-bg: #f5f5f7;
    --theme-surface-bg: #ffffff;
    --theme-surface-alt-bg: #fbfbfd;
    --theme-text: #1d1d1f;
    --theme-muted: #6e6e73;
    --theme-border: #d2d2d7;
    --theme-primary: #0071e3;
    --theme-primary-hover: #005bb5;
    --theme-primary-soft: #eaf3ff;
    --theme-secondary: #1d1d1f;
    --theme-secondary-hover: #000000;
    --theme-danger: #b3262f;
    --theme-danger-hover: #8b1d25;
    --theme-success: #34c759;
    --theme-success-bg: #edf8f0;
    --theme-warning: #ff9f0a;
    --theme-warning-bg: #fff5e5;
    --theme-error: #b3262f;
    --theme-error-bg: #fff0f1;
    --theme-table-head-bg: #fbfbfd;
    --theme-table-row-alt-bg: #fbfbfd;
    --theme-font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --theme-font-base-size: 11px;
    --theme-font-data-size: 10px;
    --theme-font-table-header-size: 12px;
    --theme-font-nav-size: 14px;
    --theme-font-submenu-size: 12px;
    --theme-font-section-title-size: 12px;
    --theme-font-label-size: 14px;
    --theme-font-control-size: 11px;
    --theme-font-button-size: 12px;
    --theme-font-footer-size: 11px;
    background: #f5f5f7;
    color: #1d1d1f;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
}

body > main {
    flex: 1 0 auto;
}

a {
    color: #0071e3;
    font-weight: 800;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
}

button,
.button-link {
    width: fit-content;
    max-width: 100%;
    height: 32px;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: #0071e3;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    padding: 0 10px;
}

button:hover,
.button-link:hover {
    background: #005bb5;
}

.button-link.secondary {
    background: #1d1d1f;
}

label {
    display: grid;
    gap: 8px;
    color: #6e6e73;
    font-size: 14px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    color: #1d1d1f;
    font-size: 12px;
}

input,
select {
    height: 32px;
    min-height: 32px;
    line-height: 20px;
    padding: 4px 8px;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
}

textarea {
    min-height: 82px;
    padding: 6px 8px;
    resize: vertical;
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #d2d2d7;
    background: #fff;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-nav-toggle {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d1d1f;
    font-size: 18px;
    line-height: 1;
}

.brand:hover {
    color: #1d1d1f;
}

.brand-mark {
    width: 42px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #0071e3;
    border-radius: 6px;
    background: #0071e3;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-logo-wrap {
    width: 42px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    padding: 3px;
}

.brand-logo {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-copy small {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    border-top: 1px solid #d2d2d7;
    background: #fff;
    color: #6e6e73;
    font-size: 11px;
    font-weight: 800;
    padding: 10px 16px;
}

.session-timers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-session-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.session-meter {
    min-height: 36px;
    display: grid;
    align-content: center;
    gap: 1px;
    border: 1px solid #d2d2d7;
    border-left: 4px solid #0071e3;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 4px 9px;
}

.session-meter-mode {
    border-left-color: var(--mode-color, #6e6e73);
}

.session-meter span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.session-meter b {
    color: #1d1d1f;
    font-weight: 900;
}

.session-meter strong {
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.session-action {
    height: 30px;
    min-height: 30px;
    font-size: 12px;
    padding: 0 10px;
}

.session-end-action {
    background: #b3262f;
}

.session-end-action:hover {
    background: #8b1d25;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-links a,
.nav-group summary {
    color: #6e6e73;
    font-size: 14px;
}

.nav-links > a,
.nav-group summary {
    border-radius: 6px;
    padding: 5px 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.nav-group {
    position: relative;
}

.nav-group summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

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

.nav-group summary::after {
    content: " v";
    color: #8a96a3;
    font-size: 10px;
}

.nav-menu {
    width: max-content;
    min-width: 180px;
    max-width: calc(100vw - 32px);
    display: grid;
    gap: 4px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 14px 34px rgb(23 32 42 / 14%);
    padding: 8px;
    position: absolute;
    top: 28px;
    right: 0;
    z-index: 30;
    overflow-x: auto;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.agent-history-report-page {
    gap: 12px;
}

.agent-report-toolbar,
.agent-report-export-actions,
.agent-report-filter-actions {
    display: flex;
    align-items: end;
    gap: 6px;
}

.report-switch {
    display: grid;
    gap: 3px;
}

.report-switch span,
.agent-report-filter-grid label > span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.report-switch select {
    width: min(290px, 40vw);
    height: 32px;
}

.agent-report-export-actions .button-link {
    height: 32px;
    min-height: 32px;
    padding: 6px 10px;
}

.agent-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 8px;
    align-items: end;
}

.agent-report-filter-grid label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.agent-report-filter-grid input,
.agent-report-filter-grid select,
.agent-report-filter-actions button,
.agent-report-filter-actions .button-link {
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
}

.agent-report-filter-actions .button-link,
.agent-report-filter-actions button {
    width: auto;
    padding: 6px 10px;
}

.agent-history-table-wrap {
    max-height: clamp(320px, calc(100vh - 420px), 650px);
}

.agent-history-table {
    width: max-content;
    min-width: 100%;
}

.agent-history-table th,
.agent-history-table td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-table-cell {
    height: 90px;
    color: #6e6e73;
    text-align: center !important;
}

@media (max-width: 1200px) {
    .agent-report-filter-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

@media (max-width: 760px) {
    .agent-report-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .report-switch select {
        width: 100%;
    }

    .agent-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .agent-report-filter-grid {
        grid-template-columns: 1fr;
    }
}

.nav-menu a {
    border-radius: 4px;
    padding: 6px 8px;
    white-space: nowrap;
}

.nav-links > a.is-active,
.nav-group.is-active > summary {
    background: #eaf3ff;
    box-shadow: inset 0 -2px 0 #0071e3;
    color: #0071e3;
}

.nav-menu a.is-active {
    background: #eaf3ff;
    box-shadow: inset 3px 0 0 #0071e3;
    color: #0071e3;
    font-weight: 900;
}

.nav-menu a:hover {
    background: #eef8f7;
    color: #0071e3;
}

.nav-group:not([open]) .nav-menu {
    display: none;
}

.logout-form {
    margin: 0;
}

.logout-form button {
    height: 30px;
    min-height: 30px;
    background: #1d1d1f;
    font-size: 12px;
    padding: 0 10px;
}

@media (min-width: 901px) {
    .topbar-role-root-admin {
        gap: 12px;
        padding-right: 16px;
        padding-left: 16px;
    }

    .topbar-role-root-admin .topbar-start {
        flex: 0 1 auto;
        gap: 10px;
    }

    .topbar-role-root-admin .brand-copy {
        max-width: 180px;
    }

    .topbar-role-root-admin .brand-copy small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-role-root-admin .session-timers,
    .topbar-role-root-admin .agent-session-controls {
        flex-wrap: nowrap;
    }

    .topbar-role-root-admin .nav-links {
        min-width: 0;
        flex: 0 1 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 6px;
        margin-left: auto;
    }

    .topbar-role-root-admin .nav-links > a,
    .topbar-role-root-admin .nav-group summary {
        padding-right: 5px;
        padding-left: 5px;
        font-size: min(var(--theme-font-nav-size), 12px);
        white-space: nowrap;
    }

    .topbar-role-root-admin .logout-form button {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px;
        white-space: nowrap;
    }
}

@media (min-width: 901px) and (max-width: 1500px) {
    .topbar-role-root-admin {
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .topbar-role-root-admin .topbar-start,
    .topbar-role-root-admin .nav-links {
        width: 100%;
    }

    .topbar-role-root-admin .topbar-start {
        justify-content: space-between;
    }
}

.workspace {
    width: 95%;
    max-width: none;
    margin: 0 auto;
    padding: 20px 0 32px;
}

.workspace.narrow {
    width: 95%;
    max-width: none;
}

.workspace-header,
.panel-header,
.agent-toolbar,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.workspace-header {
    margin-bottom: 12px;
}

.header-actions,
.toolbar-actions,
.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eyebrow {
    margin: 0 0 5px;
    color: #73808d;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    color: #1d1d1f;
}

h1 {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

h2 {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
}

h3 {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-grid article,
.panel,
.customer-panel {
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgb(23 32 42 / 8%);
}

.metric-grid article {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.metric-grid span {
    color: #0071e3;
    font-size: 32px;
    font-weight: 900;
}

.metric-grid strong,
.table-list strong {
    color: #1d1d1f;
}

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

.ops-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supervisor-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.supervisor-metric-grid article {
    min-height: 82px;
    padding: 12px;
}

.supervisor-metric-grid span {
    font-size: 26px;
}

.dashboard-refresh {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-refresh b {
    color: #1d1d1f;
}

.supervisor-live-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
}

.supervisor-state-table,
.supervisor-sla-table {
    min-width: 760px;
}

.supervisor-agent-status-panel {
    grid-row: span 2;
}

.supervisor-ops-panel {
    margin-bottom: 18px;
}

.live-operation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.live-operation-grid article,
.queue-monitor-card {
    display: grid;
    gap: 4px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 10px;
}

.live-operation-grid span {
    color: #0071e3;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}

.live-operation-grid strong,
.queue-monitor-card strong {
    color: #1d1d1f;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.supervisor-state-table td strong,
.supervisor-state-table td small {
    display: block;
}

.supervisor-state-table td small {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
}

.queue-monitor-grid {
    display: grid;
    gap: 8px;
}

.queue-monitor-card span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
}

.queue-monitor-card b {
    color: #1d1d1f;
}

.risk-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 7px;
}

.risk-low {
    background: #edf8f0;
    color: #17643d;
}

.risk-medium {
    background: #fff5e5;
    color: #8b5e1a;
}

.risk-high {
    background: #fff0f1;
    color: #8b1d25;
}

.panel {
    padding: 12px;
}

.table-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.table-list article {
    display: grid;
    gap: 4px;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 12px;
}

.table-list span,
.table-list small {
    color: #6e6e73;
    font-size: 10px;
}

.api-key {
    max-width: 100%;
    overflow-wrap: anywhere;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    color: #1d1d1f;
    padding: 10px 12px;
}

.compact-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.inline-form {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

.mode-form {
    grid-template-columns: 1.4fr 76px 100px repeat(4, minmax(110px, 1fr)) 140px;
    align-items: end;
}

.disposition-form-grid {
    grid-template-columns: minmax(170px, 1fr) minmax(210px, 1.2fr) 110px 140px repeat(3, minmax(110px, auto)) 150px;
    align-items: end;
}

.theme-settings-form {
    gap: 14px;
}

.business-hours-form {
    gap: 14px;
}

.business-hours-toolbar,
.business-hours-message-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.business-hours-toolbar {
    align-items: end;
}

.business-hours-enabled {
    min-height: 36px;
    width: fit-content;
}

.business-hours-table input[type="time"] {
    min-width: 118px;
}

.business-hours-table th:first-child,
.business-hours-table td:first-child {
    text-align: left;
}

.business-hours-message-grid textarea {
    min-height: 92px;
    resize: vertical;
}

.business-hours-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-brand-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(140px, auto);
    align-items: end;
    gap: 10px;
}

.theme-brand-grid input[type="file"] {
    padding: 4px 6px;
}

.theme-logo-preview {
    min-height: 58px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 6px;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 8px;
}

.theme-logo-preview img {
    max-width: 120px;
    max-height: 36px;
    object-fit: contain;
}

.theme-logo-preview > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    border-radius: 6px;
    background: var(--theme-primary);
    color: #fff;
    font-weight: 900;
    padding: 0 8px;
}

.theme-font-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
}

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

.theme-color-group {
    display: grid;
    align-content: start;
    gap: 10px;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 10px;
}

.theme-color-fields {
    display: grid;
    gap: 8px;
}

.theme-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    color: #6e6e73;
    font-size: 11px;
}

.theme-color-field input[type="color"] {
    width: 42px;
    min-width: 42px;
    height: 28px;
    min-height: 28px;
    padding: 2px;
}

.theme-preview {
    display: grid;
    gap: 10px;
    border: 1px solid var(--preview-border);
    border-radius: 6px;
    background: var(--preview-page);
    color: var(--preview-text);
    font-family: var(--preview-font-family);
    font-size: var(--preview-base-size);
    padding: 12px;
}

.theme-preview-topbar,
.theme-preview-panel {
    border: 1px solid var(--preview-border);
    border-radius: 6px;
    background: var(--preview-surface);
}

.theme-preview-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.theme-preview-topbar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 28px;
    border-radius: 6px;
    background: var(--preview-primary);
    color: #fff;
    font-weight: 900;
}

.theme-preview-topbar img {
    max-width: 42px;
    max-height: 28px;
    object-fit: contain;
}

.theme-preview-topbar strong {
    color: var(--preview-text);
    font-size: var(--preview-section-size);
    font-weight: 900;
}

.theme-preview-panel {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.theme-preview-actions,
.theme-preview-alerts,
.theme-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-preview-actions button {
    font-size: var(--preview-button-size);
    pointer-events: none;
}

.theme-preview-actions button:first-child {
    background: var(--preview-primary);
}

.theme-preview-actions .secondary {
    background: var(--preview-secondary);
}

.theme-preview-alerts span {
    border-left: 4px solid;
    border-radius: 6px;
    font-weight: 900;
    padding: 7px 9px;
}

.theme-preview-alerts .success {
    border-left-color: var(--preview-success);
    background: var(--preview-success-bg);
}

.theme-preview-alerts .warning {
    border-left-color: var(--preview-warning);
    background: var(--preview-warning-bg);
}

.theme-preview-alerts .error {
    border-left-color: var(--preview-error);
    background: var(--preview-error-bg);
}

.theme-preview table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--preview-border);
    border-radius: 6px;
}

.theme-preview th,
.theme-preview td {
    border-bottom: 1px solid var(--preview-border);
    color: var(--preview-text);
    padding: 4px 8px;
    text-align: left;
}

.theme-preview th {
    background: var(--preview-table-head);
    color: var(--preview-muted);
    font-size: var(--preview-header-size);
    font-weight: 900;
}

.theme-preview tbody tr {
    background: var(--preview-table-row);
}

.theme-preview td {
    font-size: var(--preview-data-size);
}

.theme-reset-form {
    margin-top: 10px;
}

.form-panel {
    display: grid;
    gap: 14px;
}

.notice {
    margin-bottom: 14px;
    border: 1px solid #b8e3cc;
    border-radius: 6px;
    background: #edf8f0;
    color: #17643d;
    font-weight: 800;
    padding: 10px 12px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.skill-assignment-board {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) 150px minmax(420px, 1.6fr);
    gap: 14px;
    margin-top: 14px;
}

.assignment-column {
    min-height: 420px;
    display: grid;
    align-content: start;
    gap: 10px;
}

.assignment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assignment-toolbar h3 {
    margin: 0;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 900;
}

.assignment-search {
    display: grid;
    gap: 5px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.assignment-search input {
    width: 100%;
    min-height: 32px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 8px;
    text-transform: none;
}

.assignment-search input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
    outline: none;
}

.assignment-list,
.skill-box-grid {
    max-height: 520px;
    display: grid;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.skill-box-grid {
    grid-template-columns: 1fr;
}

.assignment-agent-item,
.skill-box {
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
}

.assignment-agent-item {
    cursor: pointer;
}

.skill-box-check {
    cursor: pointer;
}

.assignment-agent-item:has(input:checked) {
    border-color: #0071e3;
    background: #eef8f7;
}

.skill-box:has(.skill-selector:checked) {
    border-color: #0071e3;
    background: #eef8f7;
}

.assignment-agent-item,
.skill-box-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.assignment-pick {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: #0071e3;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.assignment-pick input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0071e3;
}

.assignment-agent-item strong,
.skill-box strong {
    display: block;
    color: #1d1d1f;
    font-size: 13px;
}

.assignment-agent-item b {
    display: block;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
}

.assignment-agent-item small,
.assignment-agent-item em,
.skill-box small {
    display: block;
    color: #6e6e73;
    font-size: 10px;
    line-height: 1.4;
}

.assignment-agent-item em {
    margin-top: 3px;
    font-style: normal;
}

.assignment-actions {
    display: grid;
    align-content: center;
    gap: 10px;
}

.assignment-actions label {
    display: grid;
    gap: 6px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.assignment-actions button {
    width: fit-content;
    justify-self: center;
}

.skill-box-head {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid #e5eaf0;
    padding-bottom: 10px;
}

.skill-assigned-select-all {
    margin-left: 0;
}

.skill-assigned-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.skill-assigned-agent {
    display: grid;
    grid-template-columns: 58px 44px minmax(110px, 0.45fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid #e5eaf0;
    border-radius: 4px;
    background: #fbfbfd;
    padding: 7px 8px;
    cursor: pointer;
}

.skill-assigned-agent:has(input:checked) {
    border-color: #b3262f;
    background: #fff1f0;
}

.assignment-remove-pick {
    color: #b3262f;
}

.assignment-remove-pick input {
    accent-color: #b3262f;
}

.skill-assigned-agent .assigned-priority {
    border-radius: 999px;
    background: #eaf3ff;
    color: #0071e3;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 6px;
    text-align: center;
}

.skill-assigned-agent strong,
.skill-assigned-agent small {
    overflow-wrap: anywhere;
}

.empty-assignment {
    margin: 0;
    color: #73808d;
    font-size: 10px;
}

.priority-control {
    display: grid;
    gap: 5px;
    margin: 10px 0 0 28px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.priority-control select {
    height: 32px;
    min-height: 32px;
    font-size: 12px;
}

.button-danger {
    background: #b3262f;
}

.button-danger:hover {
    background: #8b1d25;
}

.secondary-action {
    border: 1px solid #c8d5df;
    background: #eef4f8;
    color: #1d1d1f;
}

.secondary-action:hover {
    background: #dbe8ef;
}

.staff-grid,
.privilege-grid {
    display: grid;
    gap: 14px;
}

.staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.staff-card,
.privilege-column {
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 12px;
}

.staff-card {
    display: grid;
    gap: 10px;
}

.staff-card span {
    color: #6e6e73;
    font-size: 12px;
    font-weight: 900;
}

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

.privilege-column {
    display: grid;
    align-content: start;
    gap: 8px;
}

.privilege-matrix-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.privilege-matrix {
    min-width: 760px;
}

.privilege-matrix th,
.privilege-matrix td {
    text-align: center;
    vertical-align: middle;
}

.privilege-matrix th:first-child,
.privilege-matrix td:first-child {
    position: sticky;
    left: 0;
    min-width: 190px;
    text-align: left;
    z-index: 2;
}

.privilege-matrix th:first-child {
    background: #edf3f7;
    z-index: 3;
}

.privilege-matrix td:first-child {
    background: #fff;
    font-weight: 800;
}

.privilege-matrix tbody tr:nth-child(even) td:first-child {
    background: #f9fbfd;
}

.matrix-check {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 22px;
    margin: 0;
}

.matrix-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #0071e3;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.menu-card {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 8px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgb(23 32 42 / 8%);
    padding: 16px;
}

.menu-card span {
    color: #73808d;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.menu-card strong {
    color: #1d1d1f;
    font-size: 18px;
}

.menu-card small {
    color: #6e6e73;
    line-height: 1.45;
}

.menu-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.menu-card-actions a {
    border: 1px solid #c8d5df;
    border-radius: 4px;
    color: #0071e3;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 10px;
}

.table-wrap {
    width: 100%;
    max-height: clamp(260px, calc(100vh - 330px), 620px);
    overflow: auto;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fff;
    scrollbar-gutter: stable;
    margin-top: 14px;
}

.data-table {
    width: 100%;
    min-width: 780px;
    border-collapse: separate;
    border-spacing: 0;
}

.activity-summary-table {
    min-width: 1180px;
}

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

.operations-report-section {
    min-width: 0;
}

.operations-table-wrap {
    max-height: 300px;
    margin-top: 8px;
}

.operations-report-table {
    min-width: 520px;
}

.insight-report-page .workspace-header {
    align-items: flex-start;
}

.insight-report-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 920px;
}

.insight-report-actions .button-link {
    height: 30px;
    min-height: 30px;
    padding: 6px 9px;
}

.insight-metric-grid {
    margin: 14px 0;
}

.insight-table {
    min-width: 720px;
}

.insight-table-wrap-small {
    max-height: 360px;
}

.bot-report-page .workspace-header {
    align-items: flex-end;
}

.bot-report-switch {
    display: grid;
    min-width: 280px;
    gap: 4px;
}

.bot-report-switch span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.bot-report-switch select {
    min-height: 36px;
}

.bot-report-filter-panel {
    margin-bottom: 14px;
}

.bot-report-table-wrap {
    max-height: calc(100vh - 330px);
}

.bot-report-table {
    min-width: max-content;
}

.bot-report-table th,
.bot-report-table td {
    max-width: 360px;
    white-space: nowrap;
}

.bot-report-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.management-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    align-items: end;
}

.management-report-filter-grid label {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.management-report-filter-grid label > span {
    color: #6e6e73;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.management-report-filter-grid input,
.management-report-filter-grid select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
}

.management-report-table-wrap {
    max-height: calc(100vh - 390px);
}

.management-report-table {
    min-width: max-content;
}

.management-report-table th,
.management-report-table td {
    max-width: 360px;
    white-space: nowrap;
}

.management-report-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1180px) {
    .management-report-filter-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 720px) {
    .management-report-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.bot-message-count-button {
    min-width: 36px;
    height: 28px;
    padding: 4px 10px;
    border-color: var(--theme-primary, #087f8c);
    background: var(--theme-primary, #087f8c);
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bot-message-count-button:hover,
.bot-message-count-button:focus-visible {
    border-color: var(--theme-primary-dark, #075f68);
    background: var(--theme-primary-dark, #075f68);
    color: #fff;
}

.bot-conversation-modal-panel {
    width: min(880px, 96vw);
    grid-template-rows: auto auto minmax(0, 1fr);
}

.bot-conversation-modal-header h2 {
    max-width: min(680px, 72vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-conversation-facts {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(100px, 1fr));
    border-bottom: 1px solid #e5e5ea;
    background: #f7f9fa;
}

.bot-conversation-facts[hidden] {
    display: none;
}

.bot-conversation-facts > span {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 9px 12px;
    border-right: 1px solid #e5e5ea;
}

.bot-conversation-facts > span:last-child {
    border-right: 0;
}

.bot-conversation-facts b {
    color: #6e6e73;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.bot-conversation-facts strong {
    overflow: hidden;
    color: #1d1d1f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-conversation-modal-body {
    padding: 16px;
}

.bot-conversation-timeline {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.bot-conversation-message {
    align-self: flex-start;
    width: min(76%, 560px);
    display: grid;
    gap: 6px;
    border: 1px solid #d6dadd;
    border-radius: 8px;
    background: #fff;
    padding: 9px 11px;
    box-shadow: 0 4px 14px rgba(23, 32, 42, .06);
}

.bot-conversation-message.is-customer {
    align-self: flex-end;
    border-color: #b8deda;
    background: #effafa;
}

.bot-conversation-message.is-bot {
    border-color: #ead5a2;
    background: #fff9eb;
}

.bot-conversation-message.is-agent {
    border-color: #c8e6d0;
    background: #f1fbf3;
}

.bot-conversation-message.is-system {
    align-self: center;
    width: min(88%, 660px);
    border-style: dashed;
    background: #f7f7f8;
}

.bot-conversation-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6e6e73;
    font-size: 9px;
}

.bot-conversation-message-meta strong {
    color: #333;
    font-size: 10px;
    text-transform: uppercase;
}

.bot-conversation-message-meta time {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.bot-conversation-message > p,
.bot-conversation-state {
    margin: 0;
    color: #1d1d1f;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.bot-conversation-state {
    align-self: stretch;
    padding: 26px 12px;
    color: #6e6e73;
    text-align: center;
}

.bot-conversation-state.is-error {
    color: #b4232f;
}

.bot-conversation-attachments {
    display: grid;
    gap: 6px;
}

.bot-conversation-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    border-top: 1px solid rgba(110, 110, 115, .18);
    padding-top: 7px;
    color: #1d1d1f;
    text-decoration: none;
}

.bot-conversation-attachment:hover strong {
    text-decoration: underline;
}

.bot-conversation-attachment img {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 4px;
    object-fit: contain;
}

.bot-conversation-attachment span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.bot-conversation-attachment strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bot-conversation-attachment small {
    color: #6e6e73;
    font-size: 9px;
}

@media (max-width: 720px) {
    .bot-conversation-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bot-conversation-facts > span:nth-child(2) {
        border-right: 0;
    }

    .bot-conversation-facts > span:nth-child(-n + 2) {
        border-bottom: 1px solid #e5e5ea;
    }

    .bot-conversation-message,
    .bot-conversation-message.is-system {
        width: 92%;
    }
}

.insight-bar-cell {
    display: grid;
    gap: 4px;
    min-width: 160px;
}

.insight-bar-track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf3;
}

.insight-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0071e3;
}

.page-meta {
    color: #6e6e73;
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #e5e5ea;
    padding: 2px 8px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fbfbfd;
    box-shadow: inset 0 -1px 0 #d2d2d7;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    font-size: 10px;
}

.data-table tbody tr:nth-child(even) {
    background: #fbfbfd;
}

.data-table input,
.data-table select {
    width: 100%;
    min-width: 0;
    height: 28px;
    min-height: 28px;
    padding: 3px 6px;
}

.data-table input[type="checkbox"],
.data-table input[type="radio"] {
    width: auto;
    height: auto;
    min-height: 0;
    padding: 0;
}

.data-table input[type="color"] {
    width: 38px;
    min-width: 38px;
    padding: 2px;
}

.mode-duration-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef8f7;
    color: #0071e3;
    font-size: 10px;
    font-weight: 900;
    margin: 2px 3px 2px 0;
    padding: 4px 7px;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 7px;
    white-space: nowrap;
}

.status-pill.is-active {
    background: #edf8f0;
    color: #17643d;
}

.status-pill.is-inactive {
    background: #fbfbfd;
    color: #6e6e73;
}

.data-filter {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px;
}

.compact-form > button,
.compact-form > .button-link,
.data-filter > button,
.data-filter > .button-link {
    width: fit-content;
    justify-self: start;
    flex: 0 0 auto;
    padding-left: 10px;
    padding-right: 10px;
}

.data-filter > button {
    justify-self: start;
}

.data-filter > button + .button-link {
    justify-self: start;
}

.data-filter input,
.data-filter select {
    width: 150px;
    flex: 0 0 150px;
}

.data-filter input[type="date"] {
    width: 136px;
    flex-basis: 136px;
}

.data-filter input,
.data-filter select,
.data-filter button,
.data-filter .button-link {
    height: 32px;
    min-height: 32px;
}

.export-link {
    background: #17643d;
}

.export-link:hover {
    background: #1d542c;
}

.export-link.secondary {
    background: #6e6e73;
}

.export-link.secondary:hover {
    background: #46525f;
}

.field-label {
    margin: 0 0 8px;
    color: #6e6e73;
    font-size: 14px;
    font-weight: 800;
}

.pagination-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    font-size: 10px;
    text-align: center;
}

.pagination-row nav {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.pagination-row .pagination {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.pagination-row .page-link {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    padding: 4px 8px;
}

.pagination-row .page-item:first-child .page-link,
.pagination-row .page-item:last-child .page-link {
    border-radius: 4px;
}

.pagination-row p,
.pagination-row .small {
    margin: 0;
    color: #6e6e73;
    font-size: 10px;
}

.pagination-row svg {
    width: 16px;
    height: 16px;
}

.settings-table-wrap {
    max-height: clamp(260px, calc(100vh - 330px), 560px);
}

.settings-table {
    table-layout: fixed;
    min-width: 1040px;
}

.settings-table th,
.settings-table td {
    padding: 3px 6px;
    white-space: nowrap;
}

.settings-table .inline-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1d1d1f;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.settings-table .status-pill {
    padding: 3px 6px;
}

.settings-table .action-row {
    gap: 4px;
    flex-wrap: nowrap;
}

.settings-table .action-button {
    height: 24px;
    min-height: 24px;
    font-size: 10px;
    padding: 0 8px;
}

.disposition-table {
    min-width: 1320px;
}

.disposition-table th:nth-child(1),
.disposition-table td:nth-child(1) {
    width: 92px;
}

.disposition-table th:nth-child(2),
.disposition-table td:nth-child(2) {
    width: 52px;
}

.disposition-table th:nth-child(3),
.disposition-table td:nth-child(3) {
    width: 210px;
}

.disposition-table th:nth-child(4),
.disposition-table td:nth-child(4) {
    width: 180px;
}

.disposition-table th:nth-child(5),
.disposition-table td:nth-child(5) {
    width: 94px;
}

.disposition-table th:nth-child(6),
.disposition-table td:nth-child(6) {
    width: 130px;
}

.disposition-table th:nth-child(7),
.disposition-table td:nth-child(7) {
    width: 112px;
}

.disposition-table th:nth-child(8),
.disposition-table td:nth-child(8) {
    width: 98px;
}

.disposition-table th:nth-child(9),
.disposition-table td:nth-child(9) {
    width: 118px;
}

.disposition-table th:nth-child(10),
.disposition-table td:nth-child(10) {
    width: 130px;
}

.disposition-table th:nth-child(11),
.disposition-table td:nth-child(11) {
    width: 246px;
}

.agent-mode-table {
    min-width: 1260px;
}

.agent-mode-table th:nth-child(1),
.agent-mode-table td:nth-child(1) {
    width: 92px;
}

.agent-mode-table th:nth-child(2),
.agent-mode-table td:nth-child(2) {
    width: 48px;
}

.agent-mode-table th:nth-child(3),
.agent-mode-table td:nth-child(3) {
    width: 160px;
}

.agent-mode-table th:nth-child(4),
.agent-mode-table td:nth-child(4) {
    width: 150px;
}

.agent-mode-table th:nth-child(5),
.agent-mode-table td:nth-child(5) {
    width: 58px;
}

.agent-mode-table th:nth-child(6),
.agent-mode-table td:nth-child(6),
.agent-mode-table th:nth-child(7),
.agent-mode-table td:nth-child(7),
.agent-mode-table th:nth-child(8),
.agent-mode-table td:nth-child(8) {
    width: 92px;
}

.agent-mode-table th:nth-child(9),
.agent-mode-table td:nth-child(9) {
    width: 70px;
}

.agent-mode-table th:nth-child(10),
.agent-mode-table td:nth-child(10) {
    width: 118px;
}

.agent-mode-table th:nth-child(11),
.agent-mode-table td:nth-child(11) {
    width: 128px;
}

.agent-mode-table th:nth-child(12),
.agent-mode-table td:nth-child(12) {
    width: 246px;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.action-row form {
    margin: 0;
}

.action-button {
    width: auto;
    height: 28px;
    min-height: 28px;
    font-size: 11px;
    padding: 0 10px;
    white-space: nowrap;
}

.data-table .inline-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1d1d1f;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.data-table .action-row {
    gap: 4px;
    flex-wrap: nowrap;
}

.data-table .action-button {
    height: 24px;
    min-height: 24px;
    font-size: 10px;
    padding: 0 8px;
}

.message-count-button {
    min-width: 38px;
}

.has-report-modal {
    overflow: hidden;
}

.smart-alert-stack {
    width: min(420px, calc(100vw - 24px));
    display: grid;
    gap: 8px;
    position: fixed;
    top: 76px;
    right: 12px;
    z-index: 2200;
}

.smart-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-left-width: 5px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 40px rgb(23 32 42 / 16%);
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 800;
    padding: 9px 10px;
}

.smart-alert.success {
    border-left-color: #34c759;
    background: #edf8f0;
}

.smart-alert.error {
    border-left-color: #b3262f;
    background: #fff0f1;
}

.smart-alert.warning {
    border-left-color: #ff9f0a;
    background: #fff5e5;
}

.smart-alert button,
.confirm-dialog-close {
    width: 24px;
    height: 24px;
    min-height: 24px;
    border-radius: 4px;
    background: transparent;
    color: #1d1d1f;
    font-size: 11px;
    padding: 0;
}

.smart-alert button:hover,
.confirm-dialog-close:hover {
    background: #e9eef4;
}

.confirm-dialog[hidden] {
    display: none;
}

.confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 2300;
}

.confirm-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(23 32 42 / 45%);
}

.confirm-dialog-panel {
    width: min(430px, calc(100vw - 28px));
    display: grid;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 70px rgb(0 0 0 / 24%);
    padding: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.confirm-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.confirm-dialog-header span {
    color: #0071e3;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.confirm-dialog-panel h2 {
    margin: 0;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 900;
}

.confirm-dialog-panel p {
    margin: 0;
    color: #6e6e73;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

body.has-modal-open {
    overflow: hidden;
}

.quick-reply-modal[hidden] {
    display: none;
}

.whatsapp-call-modal[hidden] {
    display: none;
}

.quick-reply-modal,
.whatsapp-call-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 18px;
}

.quick-reply-modal-backdrop,
.whatsapp-call-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(23 32 42 / 52%);
}

.quick-reply-modal-panel {
    width: min(680px, calc(100vw - 36px));
    max-height: min(720px, calc(100vh - 36px));
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-bg);
    box-shadow: 0 24px 70px rgb(23 32 42 / 28%);
}

.whatsapp-call-modal-panel {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 36px));
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-bg);
    box-shadow: 0 24px 70px rgb(23 32 42 / 28%);
}

.whatsapp-call-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--theme-border);
    padding: 14px;
}

.whatsapp-call-modal-header h2 {
    margin: 2px 0 0;
    color: var(--theme-text);
    font-size: 18px;
}

.whatsapp-call-state {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 5px 10px;
    align-items: center;
    padding: 24px 18px;
}

.whatsapp-call-state strong,
.whatsapp-call-state small {
    min-width: 0;
}

.whatsapp-call-state small {
    grid-column: 2;
    color: var(--theme-muted);
    line-height: 1.45;
}

.whatsapp-call-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-primary) 16%, transparent);
}

.whatsapp-call-modal.is-connected .whatsapp-call-indicator {
    background: var(--theme-success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-success) 16%, transparent);
}

.whatsapp-call-modal.is-failed .whatsapp-call-indicator {
    background: var(--theme-error);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-error) 16%, transparent);
}

.whatsapp-call-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--theme-border);
    padding: 12px 14px;
}

.whatsapp-call-actions button {
    min-height: 36px;
}

.quick-reply-modal-header,
.quick-reply-modal-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--theme-border);
    padding: 12px 14px;
}

.quick-reply-modal-header h2 {
    margin: 2px 0 0;
    color: var(--theme-text);
    font-size: 16px;
    font-weight: 900;
}

.quick-reply-modal-close {
    width: 30px;
    height: 30px;
    min-height: 30px;
    flex: 0 0 30px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-bg);
    color: var(--theme-text);
    font-size: 21px;
    line-height: 1;
    padding: 0;
}

.quick-reply-modal-close:hover {
    background: var(--theme-surface-alt-bg);
    color: var(--theme-text);
}

.quick-reply-modal-search input {
    min-width: 0;
    flex: 1 1 auto;
}

.quick-reply-modal-search span {
    flex: 0 0 auto;
    color: var(--theme-muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.quick-reply-list {
    min-height: 180px;
    overflow-y: auto;
    background: var(--theme-surface-alt-bg);
    padding: 6px 14px 14px;
}

.quick-reply-option {
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    justify-items: start;
    gap: 3px;
    border: 0;
    border-bottom: 1px solid var(--theme-border);
    border-radius: 0;
    background: transparent;
    color: var(--theme-text);
    text-align: left;
    padding: 10px 4px;
}

.quick-reply-option:hover,
.quick-reply-option:focus-visible {
    background: var(--theme-primary-soft);
    color: var(--theme-text);
}

.quick-reply-option > span {
    color: var(--theme-primary);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.quick-reply-option > strong {
    font-size: 12px;
    font-weight: 900;
}

.quick-reply-option > small {
    color: var(--theme-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.quick-reply-empty {
    margin: 30px 0;
    color: var(--theme-muted);
    font-weight: 800;
    text-align: center;
}

.quick-reply-create-form {
    grid-template-columns: minmax(150px, .8fr) minmax(120px, .6fr) minmax(320px, 2fr) 90px auto auto;
    align-items: end;
}

.quick-reply-settings-table {
    min-width: 1420px;
}

.quick-reply-settings-table th:nth-child(1),
.quick-reply-settings-table td:nth-child(1) {
    width: 54px;
}

.quick-reply-settings-table th:nth-child(2),
.quick-reply-settings-table td:nth-child(2) {
    width: 190px;
}

.quick-reply-settings-table th:nth-child(3),
.quick-reply-settings-table td:nth-child(3) {
    width: 150px;
}

.quick-reply-settings-table th:nth-child(4),
.quick-reply-settings-table td:nth-child(4) {
    width: 520px;
}

.quick-reply-settings-table th:nth-child(5),
.quick-reply-settings-table td:nth-child(5) {
    width: 76px;
}

.quick-reply-settings-table th:nth-child(6),
.quick-reply-settings-table td:nth-child(6) {
    width: 100px;
}

.quick-reply-settings-table th:nth-child(7),
.quick-reply-settings-table td:nth-child(7) {
    width: 150px;
}

.quick-reply-settings-table th:nth-child(8),
.quick-reply-settings-table td:nth-child(8) {
    width: 150px;
}

.quick-reply-settings-table input {
    height: 26px;
    min-height: 26px;
}

.quick-reply-body-input {
    min-width: 500px;
}

.quick-reply-sort-input {
    min-width: 60px;
}

body,
button,
.button-link,
input,
select,
textarea,
label,
small,
table,
.data-table,
.data-table th,
.data-table td,
.nav-links a,
.nav-group summary,
.action-button,
.session-action,
.session-meter span,
.session-meter strong,
.form-error,
.notice,
.pagination-row,
.section-heading span,
.inline-check {
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
}

.report-modal[hidden] {
    display: none;
}

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.report-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    background: rgba(23, 32, 42, .56);
}

.report-modal-panel {
    width: min(760px, 95vw);
    max-height: min(720px, 88vh);
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(23, 32, 42, .28);
}

.report-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e5e5ea;
    padding: 12px;
}

.report-modal-header h2 {
    margin: 0;
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 400;
}

.report-modal-header span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
}

.report-modal-body {
    min-height: 0;
    overflow-y: auto;
    background: #fbfbfd;
    padding: 12px;
}

.history-message-list {
    display: grid;
    gap: 8px;
}

.history-message {
    display: grid;
    gap: 5px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    padding: 8px 10px;
}

.history-message-customer {
    border-color: #b8deda;
    background: #effafa;
}

.history-message-agent {
    border-color: #c8e6d0;
    background: #f1fbf3;
}

.history-message-system {
    border-color: #ffd38a;
    background: #fff9eb;
}

.history-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.history-message p,
.history-empty {
    margin: 0;
    color: #1d1d1f;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.api-panel {
    display: grid;
    gap: 16px;
}

.kbs-remote-page {
    gap: 14px;
}

.kbs-remote-header {
    align-items: center;
}

.kbs-remote-header h1,
.kbs-remote-header p {
    margin: 0;
}

.kbs-remote-header .eyebrow {
    margin-bottom: 4px;
}

.kbs-remote-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
}

.kbs-remote-filter {
    display: flex;
    align-items: end;
    gap: 8px;
    margin: 0;
}

.kbs-remote-filter label {
    display: grid;
    gap: 4px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.kbs-remote-filter select {
    min-width: 280px;
}

.kbs-remote-search {
    min-width: min(360px, 40vw);
}

.kbs-remote-search input {
    min-width: 0;
}

.kbs-category-picker {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.kbs-category-picker-label {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.kbs-category-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 280px;
    min-height: 38px;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: #1d1d1f;
    text-align: left;
}

.kbs-category-trigger:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.kbs-category-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    display: grid;
    gap: 6px;
    width: 280px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 14px 34px rgb(23 32 42 / 16%);
    padding: 8px;
}

.kbs-category-menu-search {
    width: 100%;
    min-width: 0;
}

.kbs-category-options {
    display: grid;
    max-height: 280px;
    overflow-y: auto;
}

.kbs-category-option {
    width: 100%;
    min-height: 32px;
    border-radius: 4px;
    background: transparent;
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 8px;
    justify-content: flex-start;
    text-align: left;
}

.kbs-category-option:hover,
.kbs-category-option.is-selected {
    background: #f0f0f2;
    color: #1d1d1f;
}

.kbs-category-empty {
    color: #6e6e73;
    font-size: 11px;
    padding: 8px;
}

.kbs-remote-toolbar-end {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.kbs-remote-count {
    color: #6e6e73;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.kbs-remote-alert {
    margin: 0;
}

.kbs-remote-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kbs-remote-article {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 160px;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 12px;
}

.kbs-remote-article h3,
.kbs-remote-article p {
    margin: 0;
}

.kbs-remote-article h3 {
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.3;
}

.kbs-remote-article-title {
    color: #1d1d1f;
    font-weight: 900;
}

.kbs-remote-article-title:hover {
    color: #0071e3;
}

.kbs-remote-article p {
    color: #6e6e73;
    font-size: 11px;
    line-height: 1.5;
}

.kbs-remote-article-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #6e6e73;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.kbs-remote-article-read {
    width: fit-content;
    color: #0071e3;
    font-size: 11px;
    font-weight: 900;
}

.kbs-remote-article-read:hover {
    color: #005bb5;
}

.kbs-search-highlight {
    border-radius: 2px;
    background: #fff0a6;
    color: inherit;
    padding: 0 2px;
}

.kbs-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 3px;
}

.kbs-language-switch a {
    border-radius: 4px;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    padding: 5px 8px;
}

.kbs-language-switch a:hover,
.kbs-language-switch a.is-active {
    background: #eaf3ff;
    color: #0071e3;
}

.kbs-article-page {
    gap: 14px;
}

.kbs-article-panel {
    display: grid;
    gap: 16px;
}

.kbs-article-content {
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.7;
    white-space: normal;
}

pre {
    overflow-x: auto;
    border-radius: 6px;
    background: #1d1d1f;
    color: #f5f7fb;
    padding: 16px;
}

.chat-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 24px;
}

.customer-site {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 28px 24px 40px;
}

.customer-page {
    min-height: calc(100vh - 64px);
    padding-bottom: 120px;
}

.customer-blank-page {
    min-height: calc(100vh - 64px);
    background: #f5f5f7;
}

.customer-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.customer-hero-expanded {
    align-items: center;
    min-height: 340px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #f7fbff;
    padding: 36px;
}

.customer-hero p {
    max-width: 680px;
    color: #6e6e73;
    font-size: 12px;
    line-height: 1.55;
    margin: 10px 0 0;
}

.customer-hero h1 {
    max-width: 760px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.customer-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.service-snapshot {
    width: min(280px, 100%);
    display: grid;
    gap: 6px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 18px 42px rgba(23, 32, 42, .08);
}

.service-snapshot span,
.service-tile span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.service-snapshot strong {
    color: #0071e3;
    font-size: 32px;
    line-height: 1;
}

.service-snapshot small,
.service-tile small {
    color: #6e6e73;
    line-height: 1.45;
}

.customer-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 18px;
}

.customer-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-tile {
    min-height: 132px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.service-tile strong {
    color: #1d1d1f;
    font-size: 18px;
}

.customer-info-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #1d1d1f;
    color: #fff;
    margin-top: 18px;
    padding: 22px;
}

.customer-info-band .eyebrow {
    color: #9bc4f3;
}

.customer-info-band h2 {
    margin: 0;
    font-size: 11px;
    font-weight: 400;
}

.customer-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
}

.chat-popup {
    width: min(420px, calc(100vw - 32px));
    max-height: min(690px, calc(100vh - 120px));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(23, 32, 42, .24);
    margin-bottom: 12px;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #1d1d1f;
    color: #fff;
    padding: 14px 16px;
}

.chat-popup-header div {
    display: grid;
    gap: 2px;
}

.chat-popup-header span {
    color: #9bc4f3;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.chat-popup-header strong {
    font-size: 18px;
}

.chat-close-button {
    height: 28px;
    min-height: 28px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: transparent;
    font-size: 11px;
    padding: 0 10px;
}

.chat-close-button:hover {
    background: rgba(255, 255, 255, .12);
}

.chat-start-form {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

.chat-error {
    border: 1px solid #f2b8b5;
    border-radius: 6px;
    background: #fff0f1;
    color: #8b1d25;
    font-size: 12px;
    font-weight: 800;
    margin: 0;
    padding: 8px 10px;
}

.chat-feedback-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.chat-feedback-form > div {
    display: grid;
    gap: 4px;
}

.chat-feedback-form span {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.chat-feedback-form strong {
    color: #1d1d1f;
    font-size: 20px;
}

.feedback-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.popup-conversation {
    min-height: 0;
}

.popup-message-list {
    height: min(360px, calc(100vh - 310px));
}

.chat-launcher {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #0071e3;
    box-shadow: 0 18px 40px rgba(0, 113, 227, .24);
    padding: 0;
}

.chat-launcher:hover {
    transform: translateY(-1px);
}

.chat-launcher-icon {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.auth-panel {
    margin: 32px auto;
}

.inline-check {
    display: flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
}

.inline-check input {
    width: auto;
    min-height: auto;
}

.form-error {
    border: 1px solid #f2b8b5;
    border-radius: 6px;
    background: #fff0f1;
    color: #8b1d25;
    font-weight: 800;
    padding: 10px 12px;
}

.demo-logins {
    display: grid;
    gap: 6px;
    border-top: 1px solid #e5eaf0;
    color: #6e6e73;
    font-size: 13px;
    padding: 16px 20px 20px;
}

.demo-login-row {
    display: grid;
    grid-template-columns: minmax(86px, 1fr) minmax(80px, auto) minmax(72px, auto);
    align-items: center;
    gap: 8px;
    border: 1px solid #e5eaf0;
    border-radius: 6px;
    background: #fbfbfd;
    padding: 6px 8px;
}

.demo-login-row span {
    color: #1d1d1f;
    font-weight: 900;
}

.demo-login-row code,
.demo-login-row small {
    color: #6e6e73;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 900;
}

.demo-login-row small {
    text-align: right;
}

.demo-section-title {
    margin-top: 8px;
}

.demo-contact-row {
    grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr);
}

.demo-contact-row a {
    color: var(--theme-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.customer-panel {
    width: min(720px, 100%);
    overflow: hidden;
}

.panel-header,
.agent-toolbar {
    border-bottom: 1px solid #e5eaf0;
    padding: 20px;
}

.agent-link {
    color: #0071e3;
}

.start-form,
.conversation {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.phone-input-group {
    display: grid;
    grid-template-columns: minmax(74px, auto) minmax(0, 1fr);
    gap: 6px;
}

.phone-input-group select {
    min-width: 74px;
}

.conversation-status {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #6e6e73;
}

.conversation-status span {
    border-radius: 999px;
    background: #eaf3ff;
    color: #0071e3;
    font-weight: 900;
    padding: 6px 10px;
    text-transform: capitalize;
}

.message-list {
    height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    background: #fbfbfd;
    padding: 14px;
}

.agent-messages {
    height: 450px;
    min-height: 450px;
}

.message {
    max-width: 76%;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.message span {
    display: block;
    margin-bottom: 4px;
    color: #6e6e73;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.message p {
    margin: 0;
    line-height: 1.45;
}

.message-customer {
    align-self: flex-start;
    background: #0071e3;
    border-color: #0071e3;
    color: #fff;
}

.message-customer span {
    color: #d7efed;
}

.message-agent {
    align-self: flex-end;
    background: #edf8f0;
    border-color: #c8e6d0;
}

.message-system {
    align-self: center;
    max-width: 90%;
    background: #fff5e5;
    border-color: #ffd38a;
}

.reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.composer-form {
    grid-template-columns: 1fr;
    gap: 4px;
}

.composer-input-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
}

.agent-main .composer-input-row {
    align-items: stretch;
}

.composer-tools {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.composer-tool-button {
    width: auto;
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8d5df;
    border-radius: 4px;
    background: #fbfbfd;
    color: #1d1d1f;
    font-size: 10px;
    font-weight: 900;
    line-height: 26px;
    padding: 0 8px;
    text-align: center;
    cursor: pointer;
}

.agent-main .composer-tool-button,
.agent-main #agent-reply-form button[type="submit"] {
    height: 50px;
    min-height: 50px;
    font-size: 12px;
    line-height: 1.15;
    padding: 0 10px;
}

.agent-main .reply-form textarea,
.agent-main .disposition-form textarea {
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    font-size: 12px;
    line-height: 1.35;
    overflow-y: auto;
    padding: 6px 9px;
    resize: none;
}

.smart-email-editor {
    grid-column: 3;
    display: grid;
    grid-template-rows: auto minmax(92px, 1fr);
    min-width: 0;
    border: 1px solid #c8d5df;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.smart-email-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e5e5ea;
    background: #f7f9fb;
    padding: 4px 6px;
}

.smart-email-toolbar button {
    width: 28px;
    height: 26px;
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #3b4652;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.smart-email-toolbar button:hover,
.smart-email-toolbar button:focus-visible {
    border-color: #b8d6f5;
    background: #eaf3ff;
    color: #0071e3;
}

.smart-email-toolbar button[data-editor-command="createLink"] {
    width: 42px;
}

.smart-email-surface {
    min-height: 92px;
    max-height: 180px;
    overflow-y: auto;
    color: #1d1d1f;
    font-size: 12px;
    line-height: 1.45;
    outline: 0;
    padding: 8px 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.smart-email-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 113, 227, .13);
}

.smart-email-surface:empty::before {
    content: 'Write your reply...';
    color: #8b949e;
    pointer-events: none;
}

.composer-tool-button:hover {
    background: #eaf3ff;
    color: #0071e3;
}

.composer-file-button input {
    display: none;
}

.composer-file-button[hidden] {
    display: none;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid #c8d5df;
    border-radius: 999px;
    background: #fbfbfd;
    color: #1d1d1f;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
}

.agent-main .attachment-chip {
    font-size: 12px;
    padding: 4px 9px;
}

.attachment-chip span {
    max-width: min(240px, 70vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip button {
    width: 18px;
    height: 18px;
    min-height: 18px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    padding: 0;
}

.emoji-picker {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 32, 42, .12);
    padding: 6px;
}

.emoji-picker[hidden] {
    display: none;
}

.emoji-picker button {
    width: 28px;
    height: 28px;
    min-height: 28px;
    border: 1px solid #e5e5ea;
    border-radius: 4px;
    background: #fbfbfd;
    font-size: 15px;
    line-height: 1;
    padding: 0;
}

.agent-main .emoji-picker button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    font-size: 18px;
}

.message-attachments {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.message-attachment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fbfbfd;
    color: #1d1d1f;
    padding: 6px;
    text-decoration: none;
}

.message-attachment img {
    width: min(180px, 100%);
    max-height: 150px;
    grid-column: 1 / -1;
    border-radius: 5px;
    object-fit: cover;
}

.message-attachment strong {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-attachment small,
.message-file-icon {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
}

.message-file-icon {
    border-radius: 4px;
    background: #eaf3ff;
    color: #0071e3;
    padding: 3px 6px;
}

.message-customer .message-attachment {
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.message-customer .message-attachment small,
.message-customer .message-file-icon {
    color: #e7f5f4;
}

.disposition-form {
    display: grid;
    grid-template-columns: minmax(230px, 340px) 340px minmax(180px, 1fr) auto;
    align-items: stretch;
    gap: 5px;
    margin-bottom: 5px;
}

.transfer-form {
    display: grid;
    grid-template-columns: 116px minmax(190px, 1fr) minmax(180px, 1fr) auto minmax(160px, auto);
    align-items: end;
    gap: 5px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    padding: 5px;
}

.transfer-form label {
    gap: 4px;
    font-size: 10px;
}

.transfer-form input,
.transfer-form select,
.transfer-form button {
    height: 30px;
    min-height: 30px;
}

.transfer-status {
    color: #6e6e73;
    font-size: 10px;
    line-height: 1.25;
}

.disposition-picker {
    position: relative;
    min-width: 0;
}

.disposition-picker-button {
    width: 100%;
    height: 50px;
    min-height: 50px;
    justify-content: flex-start;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d2d2d7;
    color: #1d1d1f;
    font-size: 12px;
    text-align: left;
}

.agent-main .disposition-form > button,
.agent-main .disposition-actions button {
    height: 50px;
    min-height: 50px;
    font-size: 12px;
    padding: 0 10px;
}

.disposition-actions {
    display: flex;
    align-items: stretch;
    gap: 5px;
}

.disposition-actions button {
    white-space: nowrap;
}

.disposition-actions .button-secondary {
    border: 1px solid #6e6e73;
    background: #fff;
    color: #1d1d1f;
}

.disposition-actions .button-secondary:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.agent-main .disposition-form > select {
    height: 50px;
    min-height: 50px;
}

.disposition-picker-button::after {
    content: "v";
    margin-left: auto;
    color: #6e6e73;
    font-size: 10px;
}

.disposition-picker-button:hover {
    background: #fff;
    color: #1d1d1f;
}

.disposition-picker-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.disposition-dropdown {
    width: min(440px, 92vw);
    max-height: 260px;
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 80;
    display: grid;
    gap: 6px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(23, 32, 42, .18);
    padding: 8px;
}

.disposition-dropdown[hidden] {
    display: none;
}

.disposition-dropdown-search {
    height: 36px;
    min-height: 36px;
    font-size: 12px;
}

.disposition-option-list {
    max-height: 204px;
    overflow-y: auto;
    display: grid;
    gap: 4px;
}

.disposition-option {
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    color: #1d1d1f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 8px;
}

.disposition-option:hover,
.disposition-option:has(input:checked) {
    background: #eef8f7;
    color: #0071e3;
}

.disposition-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.agent-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
}

body.agent-console-page {
    overflow: hidden;
}

.agent-console-page .agent-shell {
    height: calc(100vh - 102px);
    height: calc(100dvh - 102px);
    min-height: 0;
    overflow: hidden;
}

.agent-sidebar {
    display: grid;
    align-content: start;
    gap: 16px;
    min-height: 0;
    border-right: 1px solid #d2d2d7;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
}

.inbox-list {
    display: grid;
    gap: 8px;
}

.mode-hint {
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    background: #fff5e5;
    color: #8b5e1a;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 12px;
}

.mode-hint.is-ready {
    background: #edf8f0;
    color: #17643d;
}

.channel-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.channel-tabs button {
    width: auto;
    min-width: 96px;
    height: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: #6e6e73;
    font-size: 12px;
    padding: 0 8px;
}

.channel-tabs button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-tabs button b {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #eef2f6;
    color: #6e6e73;
    font-size: 10px;
    line-height: 1;
}

.channel-tabs button.is-active {
    border-color: #0071e3;
    background: #eaf3ff;
    color: #0071e3;
}

.channel-tabs button.has-count b {
    background: #0071e3;
    color: #fff;
}

.channel-empty {
    color: #6e6e73;
    font-size: 10px;
    font-weight: 800;
}

.inbox-item {
    width: 100%;
    height: auto;
    display: grid;
    gap: 4px;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: #1d1d1f;
    padding: 12px;
    text-align: left;
}

.inbox-item:hover,
.inbox-item.is-active {
    border-color: #0071e3;
    background: #eef8f7;
}

.inbox-item span,
.inbox-item small {
    color: #6e6e73;
}

.inbox-item .inbox-item-context {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.inbox-item .inbox-type-label {
    color: #173f62;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.inbox-item .inbox-skill-source {
    min-width: 0;
    overflow: hidden;
    color: #405565;
    font-size: 10px;
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item .inbox-item-state {
    overflow: hidden;
    color: #737d86;
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item-email {
    gap: 6px;
    padding: 13px 14px;
}

.inbox-item-email .email-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.inbox-item-email .email-list-meta strong {
    min-width: 0;
    overflow: hidden;
    color: #1d1d1f;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item-email .email-list-meta time {
    flex: 0 0 auto;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 700;
}

.inbox-item-email .email-list-subject {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-main {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    align-content: start;
    gap: 5px;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 5px 10px 10px;
}

.agent-mobile-channel-tabs,
.agent-mobile-conversation-bar {
    display: none;
}

.agent-console-page .agent-main {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
}

.agent-console-page .agent-main .agent-messages {
    height: 100%;
    min-height: 0;
}

.agent-main .email-thread-list {
    gap: 0;
    border-color: #e1e4e8;
    background: #fff;
    padding: 0;
}

.email-thread-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e1e4e8;
    background: #fff;
    padding: 16px 22px 14px;
}

.email-thread-title-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.email-thread-heading h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #202124;
    font-size: 17px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-thread-heading > small {
    flex: 0 0 auto;
    color: #5f6368;
    font-size: 10px;
    font-weight: 700;
}

.email-thread-label {
    flex: 0 0 auto;
    border-radius: 4px;
    background: #e8eaed;
    color: #4a4d51;
    font-size: 10px;
    padding: 4px 7px;
}

.email-message {
    width: 100%;
    max-width: none;
    border: 0;
    border-bottom: 1px solid #e1e4e8;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    padding: 22px 22px 26px;
}

.email-message-header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.email-message-avatar {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #dbe4ff;
    color: #465cc7;
    font-size: 20px;
    font-weight: 500;
}

.email-message-customer .email-message-avatar {
    background: #eef0f2;
    color: #5f6368;
}

.email-message-sender {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.email-message-sender strong,
.email-message-sender span,
.email-message-sender small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-sender strong {
    color: #202124;
    font-size: 13px;
}

.email-message-sender span,
.email-message-sender small,
.email-message-header time {
    color: #5f6368;
    font-size: 10px;
}

.email-message-header time {
    white-space: nowrap;
}

.email-message-body {
    margin-top: 16px;
    margin-left: 52px;
    color: #202124;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.email-message-body p {
    margin: 0 0 8px;
}

.email-message-body p:last-child {
    margin-bottom: 0;
}

.email-message-body ul,
.email-message-body ol {
    margin: 6px 0;
    padding-left: 22px;
}

.email-message > .message-attachments {
    margin-left: 52px;
}

.agent-main .facebook-comment-thread-list {
    gap: 0;
    border-color: #d8dde5;
    background: #f0f2f5;
    overflow: hidden;
    padding: 0;
}

.facebook-comment-workspace {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(250px, 44%) minmax(0, 56%);
}

.facebook-post-pane {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    border-right: 1px solid #d8dde5;
    background: #fff;
}

.facebook-comment-pane {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #f0f2f5;
}

.facebook-post-context {
    background: #fff;
    color: #1c1e21;
    padding: 12px;
}

.facebook-post-header {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.facebook-page-avatar,
.facebook-comment-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f3ff;
    color: #1769aa;
    font-weight: 900;
}

.facebook-page-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.facebook-post-header > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.facebook-post-header strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facebook-post-header small {
    display: flex;
    gap: 6px;
    overflow: hidden;
    color: #65676b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facebook-post-link {
    border: 1px solid #c8d5df;
    border-radius: 4px;
    background: #f7f9fb;
    color: #1769aa;
    font-size: 10px;
    font-weight: 900;
    padding: 6px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.facebook-post-link:hover,
.facebook-post-link:focus-visible {
    border-color: #8db9e2;
    background: #e7f3ff;
}

.facebook-post-text {
    margin: 11px 0 0;
    font-size: 13px;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.facebook-post-image {
    width: 100%;
    max-height: 360px;
    display: block;
    margin: 11px auto 0;
    border-radius: 6px;
    background: #f4f5f7;
    object-fit: contain;
}

.facebook-comments-heading {
    min-height: 35px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #d8dde5;
    background: #fff;
    color: #1c1e21;
    padding: 7px 16px;
}

.facebook-comments-heading strong {
    font-size: 12px;
}

.facebook-comments-heading span {
    min-width: 20px;
    border-radius: 999px;
    background: #e4e6eb;
    color: #4b4f56;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 6px;
    text-align: center;
}

.facebook-comment-list {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 9px;
    overflow-y: auto;
    padding: 12px 16px 18px;
}

.facebook-comment {
    width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
}

.facebook-comment-reply {
    width: calc(100% - 38px);
    margin-left: 38px;
}

.facebook-comment-avatar {
    width: 30px;
    height: 30px;
    background: #d8e8f7;
    color: #315d7d;
    font-size: 9px;
}

.facebook-comment-reply .facebook-comment-avatar {
    background: #dcefe3;
    color: #356747;
}

.facebook-comment-content {
    min-width: 0;
}

.facebook-comment-bubble {
    display: inline-block;
    max-width: 100%;
    border: 1px solid #dfe2e7;
    border-radius: 8px;
    background: #fff;
    color: #1c1e21;
    padding: 7px 10px;
}

.facebook-comment-reply .facebook-comment-bubble {
    background: #edf7f0;
    border-color: #cfe2d5;
}

.facebook-comment-bubble header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.facebook-comment-bubble strong {
    font-size: 11px;
}

.facebook-comment-bubble time,
.facebook-comment-content > small {
    color: #65676b;
    font-size: 9px;
}

.facebook-comment-bubble p {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.facebook-comment-content > small {
    display: block;
    margin: 3px 0 0 6px;
    font-weight: 800;
}

.meta-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
    margin: 3px 0 0 3px;
}

.meta-comment-action-button {
    min-height: 32px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #1769aa;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    padding: 5px 4px;
}

.meta-comment-action-button:hover,
.meta-comment-action-button:focus-visible {
    background: #e7f3ff;
    outline: none;
}

.meta-comment-action-button.is-danger {
    color: #b42318;
}

.meta-comment-action-button.is-danger:hover,
.meta-comment-action-button.is-danger:focus-visible {
    background: #fff0ee;
}

.meta-comment-action-button:disabled {
    background: transparent;
    color: #8a8d91;
    cursor: not-allowed;
    opacity: .75;
}

.meta-comment-action-status {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    border-radius: 999px;
    background: #e4e6eb;
    color: #4b4f56;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 7px;
}

.meta-comment-action-status.is-warning {
    margin-top: 5px;
    border-radius: 5px;
    background: #fff6e5;
    color: #7a4b00;
}

.meta-comment-action-status.is-deleted {
    width: fit-content;
    margin-top: 5px;
    background: #fff0ee;
    color: #b42318;
}

.facebook-comment-system {
    width: 100%;
    margin-left: 0;
}

.facebook-comment-system .facebook-comment-bubble {
    background: #fff6e5;
    border-color: #efd9a8;
}

.facebook-comment-bubble .message-attachments {
    margin-top: 7px;
}

.facebook-comment-composer .composer-input-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.meta-comment-reply-context {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #c8d5df;
    border-radius: 6px;
    background: #f7f9fb;
    color: #4b4f56;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 7px;
}

.meta-comment-reply-context[hidden] {
    display: none;
}

.meta-comment-reply-context button {
    min-height: 28px;
    border: 1px solid #8db9e2;
    border-radius: 5px;
    background: #fff;
    color: #1769aa;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 8px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .facebook-comment-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 42%) minmax(0, 58%);
    }

    .facebook-post-pane {
        border-right: 0;
        border-bottom: 1px solid #d8dde5;
    }

    .facebook-post-context,
    .facebook-comment-list {
        padding-left: 10px;
        padding-right: 10px;
    }

    .facebook-comment-reply {
        width: calc(100% - 22px);
        margin-left: 22px;
    }

    .facebook-post-header {
        grid-template-columns: 32px minmax(0, 1fr) auto;
    }

    .facebook-page-avatar {
        width: 32px;
        height: 32px;
    }

    .meta-comment-action-button {
        min-height: 42px;
        padding: 8px 6px;
    }

    .meta-comment-reply-context {
        min-height: 38px;
        font-size: 11px;
    }
}

.agent-main .agent-toolbar {
    align-items: flex-start;
    border-bottom: 1px solid #d2d2d7;
    padding: 0 0 5px;
}

.agent-main > #agent-message-list,
.agent-main > #disposition-form,
.agent-main > #agent-reply-form {
    margin: 0;
}

.agent-main > #disposition-form,
.agent-main > #agent-reply-form,
.agent-main > #agent-reply-form .composer-input-row {
    gap: 5px;
}

.conversation-actions {
    min-width: 0;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    color: #1d1d1f;
}

.conversation-actions summary {
    min-height: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
}

.conversation-actions[open] summary {
    border-bottom: 1px solid #e5e5ea;
}

.conversation-routing-form {
    display: grid;
    grid-template-columns: 120px auto minmax(180px, 1fr) 170px minmax(160px, 1fr) auto;
    align-items: end;
    gap: 5px;
    padding: 5px;
}

.conversation-routing-form label {
    gap: 3px;
    font-size: 10px;
}

.conversation-routing-form input,
.conversation-routing-form select,
.conversation-routing-form textarea,
.conversation-routing-form button {
    min-height: 30px;
    font-size: 11px;
}

.conversation-routing-form textarea {
    height: 30px;
    resize: vertical;
}

.conversation-action-buttons {
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

.conversation-routing-form > [data-conversation-action-status] {
    grid-column: 1 / -1;
    color: #6e6e73;
    font-size: 10px;
}

.conversation-internal-notes,
.conversation-follow-ups {
    display: flex;
    gap: 5px;
    max-height: 82px;
    overflow: auto;
    padding: 0 5px 5px;
}

.conversation-internal-notes:empty,
.conversation-follow-ups:empty {
    display: none;
}

.conversation-internal-notes article,
.conversation-follow-ups article {
    flex: 0 0 min(280px, 80vw);
    border-left: 3px solid #6e6e73;
    background: #f7f7f9;
    padding: 5px 7px;
}

.conversation-follow-ups article {
    border-left-color: #b45309;
}

.conversation-internal-notes span,
.conversation-follow-ups span {
    color: #6e6e73;
    font-size: 9px;
    font-weight: 700;
}

.conversation-internal-notes p,
.conversation-follow-ups p {
    margin: 2px 0 0;
    font-size: 10px;
    line-height: 1.3;
}

.agent-console-status {
    display: none;
}

.agent-console-feedback {
    min-height: 14px;
    margin: 0;
    color: #b45309;
    font-size: 11px;
    font-weight: 900;
}

.agent-console-feedback:empty {
    display: none;
}

.agent-mini-dashboard {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
}

.agent-mini-dashboard-wrap {
    display: grid;
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
}

.agent-mini-dashboard article {
    min-height: 44px;
    display: grid;
    align-content: center;
    gap: 3px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #fff;
    padding: 4px 6px;
}

.agent-mini-dashboard span {
    min-width: 0;
    overflow: hidden;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.agent-mini-dashboard strong {
    min-width: 0;
    overflow: hidden;
    color: #1d1d1f;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-skill-queue-counts {
    min-height: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.agent-skill-queue-counts span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d2d2d7;
    border-radius: 999px;
    background: #fff;
    color: #6e6e73;
    font-size: 10px;
    font-weight: 900;
    padding: 0 8px;
    text-transform: uppercase;
}

.agent-skill-queue-counts strong {
    min-width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #eef2f6;
    color: #1d1d1f;
    font-size: 10px;
    line-height: 1;
}

.agent-skill-queue-counts span.has-count strong {
    background: #0071e3;
    color: #fff;
}

.agent-dashboard-page {
    display: grid;
    gap: 12px;
}

.agent-dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgb(23 32 42 / 8%);
    padding: 12px;
}

.agent-dashboard-identity,
.agent-dashboard-state {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eaf3ff;
    color: #0071e3;
    font-size: 16px;
    font-weight: 900;
}

.agent-dashboard-identity strong,
.agent-dashboard-state strong {
    display: block;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.agent-dashboard-identity span,
.agent-dashboard-state small {
    display: block;
    color: #6e6e73;
    font-size: 11px;
    font-weight: 800;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--status-color, #0071e3);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color, #0071e3) 16%, transparent);
}

.agent-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.agent-dashboard-card {
    display: grid;
    align-content: start;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgb(23 32 42 / 8%);
    padding: 12px;
}

.agent-dashboard-card dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.agent-dashboard-card dl div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #e5e5ea;
    padding: 7px 0;
}

.agent-dashboard-card dl div:first-child {
    border-top: 0;
}

.agent-dashboard-card dt {
    color: #6e6e73;
    font-size: 11px;
    font-weight: 900;
}

.agent-dashboard-card dd {
    margin: 0;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.active-conversation-heading {
    min-width: 180px;
}

.agent-channel-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 5px;
}

.agent-main .channel-tabs {
    gap: 5px;
}

.is-hidden {
    display: none;
}

body,
button,
.button-link,
input,
select,
textarea,
label,
small,
table,
th,
td,
a,
p,
span,
strong,
summary,
h1,
h2,
h3,
.data-table,
.data-table th,
.data-table td,
.action-button,
.session-action,
.session-meter span,
.session-meter strong,
.form-error,
.notice,
.smart-alert,
.pagination-row,
.app-footer,
.section-heading span,
.inline-check,
.mode-hint,
.channel-tabs button,
.channel-empty,
.inbox-item,
.conversation-status,
.message-bubble,
.reply-form,
.compact-form {
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 11px;
}

.nav-links a,
.nav-group summary,
.eyebrow {
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.section-heading h2 {
    font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

html,
body {
    background: var(--theme-page-bg);
    color: var(--theme-text);
}

a,
.agent-link,
.live-operation-grid span {
    color: var(--theme-primary);
}

button,
.button-link {
    background: var(--theme-primary);
    color: #fff;
}

button:hover,
.button-link:hover {
    background: var(--theme-primary-hover);
}

.button-link.secondary,
.logout-form button {
    background: var(--theme-secondary);
}

.button-link.secondary:hover,
.logout-form button:hover {
    background: var(--theme-secondary-hover);
}

.button-danger,
.session-end-action {
    background: var(--theme-danger);
}

.button-danger:hover,
.session-end-action:hover {
    background: var(--theme-danger-hover);
}

.secondary-action {
    border-color: var(--theme-border);
    background: var(--theme-surface-alt-bg);
    color: var(--theme-text);
}

.secondary-action:hover {
    background: var(--theme-primary-soft);
}

input,
select,
textarea {
    border-color: var(--theme-border);
    background: var(--theme-surface-bg);
    color: var(--theme-text);
}

label,
.brand-copy small,
.nav-links a,
.nav-group summary,
.eyebrow,
.session-meter span,
.conversation-status,
.table-list span,
.table-list small,
.demo-logins,
.demo-login-row code,
.demo-login-row small,
.theme-color-field,
.agent-dashboard-identity span,
.agent-dashboard-state small,
.agent-dashboard-card dt,
.supervisor-state-table td small,
.queue-monitor-card span,
.app-footer {
    color: var(--theme-muted);
}

.brand,
.brand:hover,
.brand-copy strong,
h1,
h2,
h3,
.demo-login-row span,
.agent-dashboard-identity strong,
.agent-dashboard-state strong,
.agent-dashboard-card dd,
.live-operation-grid strong,
.queue-monitor-card strong,
.queue-monitor-card b,
.session-meter b,
.session-meter strong {
    color: var(--theme-text);
}

.topbar,
.nav-menu,
.panel,
.agent-dashboard-hero,
.agent-dashboard-card,
.customer-panel,
.auth-panel,
.report-modal-panel,
.confirm-dialog-panel,
.chat-popup,
.brand-logo-wrap,
.app-footer,
.theme-color-group,
.theme-logo-preview,
.theme-preview-panel,
.theme-preview-topbar {
    border-color: var(--theme-border);
    background: var(--theme-surface-bg);
    color: var(--theme-text);
}

.brand-mark,
.agent-avatar,
.theme-logo-preview > span {
    border-color: var(--theme-primary);
    background: var(--theme-primary);
    color: #fff;
}

.session-meter,
.table-list article,
.api-key,
.demo-login-row,
.live-operation-grid article,
.queue-monitor-card,
.agent-dashboard-card dl div,
.message-list {
    border-color: var(--theme-border);
    background: var(--theme-surface-alt-bg);
    color: var(--theme-text);
}

.session-meter {
    border-left-color: var(--theme-primary);
}

.nav-menu a:hover,
.nav-links > a.is-active,
.nav-group.is-active > summary,
.nav-menu a.is-active,
.mode-duration-pill,
.conversation-status span {
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
}

.nav-links > a.is-active,
.nav-group.is-active > summary {
    box-shadow: inset 0 -2px 0 var(--theme-primary);
}

.nav-menu a.is-active {
    box-shadow: inset 3px 0 0 var(--theme-primary);
}

.table-wrap,
.theme-preview,
.theme-preview table {
    border-color: var(--theme-border);
    background: var(--theme-surface-bg);
}

.data-table th,
.theme-preview th {
    background: var(--theme-table-head-bg);
    box-shadow: inset 0 -1px 0 var(--theme-border);
    color: var(--theme-muted);
}

.data-table th,
.data-table td,
.theme-preview th,
.theme-preview td {
    border-bottom-color: var(--theme-border);
}

.data-table tbody tr:nth-child(even),
.theme-preview tbody tr {
    background: var(--theme-table-row-alt-bg);
}

.data-table .inline-check,
.smart-alert,
.confirm-dialog-panel h2,
.confirm-dialog-panel p,
.theme-preview th,
.theme-preview td {
    color: var(--theme-text);
}

.status-pill.is-active,
.notice,
.smart-alert.success {
    border-color: var(--theme-success);
    background: var(--theme-success-bg);
    color: var(--theme-success);
}

.smart-alert.warning {
    border-color: var(--theme-warning);
    background: var(--theme-warning-bg);
    color: var(--theme-warning);
}

.form-error,
.smart-alert.error {
    border-color: var(--theme-error);
    background: var(--theme-error-bg);
    color: var(--theme-error);
}

.status-pill.is-inactive {
    background: var(--theme-surface-alt-bg);
    color: var(--theme-muted);
}

.pagination-row .page-link {
    border-color: var(--theme-border);
    color: var(--theme-primary);
}

.pagination-row .active .page-link,
.chat-launcher,
.chat-popup-header {
    background: var(--theme-primary);
    color: #fff;
}

.smart-alert button,
.confirm-dialog-close {
    background: transparent;
    color: var(--theme-secondary);
}

html,
body,
button,
.button-link,
input,
select,
textarea,
label,
small,
table,
.data-table,
.data-table th,
.data-table td,
.nav-links a,
.nav-group summary,
.eyebrow,
.section-heading h2,
.app-footer,
.smart-alert,
.confirm-dialog-panel,
.pagination-row,
.channel-tabs button,
.inbox-item,
.message-bubble,
.reply-form,
.compact-form,
.theme-preview {
    font-family: var(--theme-font-family);
}

html,
body,
table,
.compact-form,
.smart-alert,
.confirm-dialog-panel,
.pagination-row,
.message-bubble,
.reply-form,
.theme-preview {
    font-size: var(--theme-font-base-size);
}

label,
.theme-color-field {
    font-size: var(--theme-font-label-size);
}

input,
select,
textarea {
    font-size: var(--theme-font-control-size);
}

button,
.button-link,
.session-action,
.action-button {
    font-size: var(--theme-font-button-size);
}

.nav-links a,
.nav-group summary,
.eyebrow {
    font-size: var(--theme-font-nav-size);
}

.nav-menu a {
    font-size: var(--theme-font-submenu-size);
}

.section-heading h2 {
    font-size: var(--theme-font-section-title-size);
}

.data-table td,
.settings-table .status-pill,
.data-table .inline-check {
    font-size: var(--theme-font-data-size);
}

.data-table th {
    font-size: var(--theme-font-table-header-size);
}

.app-footer {
    font-size: var(--theme-font-footer-size);
}

@media (min-width: 901px) and (max-width: 1180px) {
    .topbar {
        min-height: 64px;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 0 0 0 16px;
        z-index: 40;
    }

    .topbar-start {
        width: 100%;
        min-height: 64px;
        align-items: center;
        flex-direction: row;
        gap: 10px;
    }

    .topbar .brand {
        min-width: 0;
        margin-right: auto;
    }

    .mobile-nav-toggle {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 6px;
        border: 0;
        border-radius: 0;
        background: #e8e8e8;
        padding: 0;
    }

    .mobile-nav-toggle:hover {
        background: var(--theme-primary-soft, #eaf3ff);
    }

    .mobile-nav-toggle span {
        width: 29px;
        height: 3px;
        display: block;
        border-radius: 1px;
        background: #fff;
        box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
        transition: transform .15s ease, opacity .15s ease;
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        max-height: calc(100dvh - 74px);
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
        border: 1px solid var(--theme-border, #d2d2d7);
        border-radius: 8px;
        background: var(--theme-surface-bg, #fff);
        box-shadow: 0 18px 40px rgba(23, 32, 42, .2);
        padding: 10px;
        position: absolute;
        top: calc(100% - 1px);
        right: 10px;
        left: 10px;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        z-index: 50;
    }

    .topbar.mobile-menu-open .nav-links {
        display: flex;
    }

    .nav-group,
    .logout-form {
        width: 100%;
    }

    .nav-menu {
        width: 100%;
        max-width: 100%;
        position: static;
        margin-top: 8px;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .quick-reply-modal {
        padding: 10px;
    }

    .quick-reply-modal-panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .quick-reply-modal-search {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-reply-create-form {
        grid-template-columns: 1fr;
    }

    body.agent-console-page {
        height: var(--agent-viewport-height, 100dvh);
        max-height: var(--agent-viewport-height, 100dvh);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .topbar,
    .workspace-header,
    .panel-header,
    .agent-toolbar,
    .agent-dashboard-hero,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        min-height: 0;
        align-items: stretch;
        gap: 0;
        padding: 0 0 0 10px;
        z-index: 40;
    }

    .topbar-start {
        align-items: center;
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }

    .mobile-nav-toggle {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 6px;
        border: 0;
        border-radius: 0;
        background: #e8e8e8;
        padding: 0;
    }

    .mobile-nav-toggle:hover {
        background: var(--theme-primary-soft, #eaf3ff);
    }

    .mobile-nav-toggle span {
        width: 29px;
        height: 3px;
        display: block;
        border-radius: 1px;
        background: #fff;
        box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
        transition: transform .15s ease, opacity .15s ease;
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .topbar.mobile-menu-open .mobile-nav-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .topbar .brand {
        min-width: 0;
        margin-right: auto;
    }

    .session-timers {
        width: auto;
        margin-left: auto;
    }

    .metric-grid,
    .supervisor-metric-grid,
    .live-operation-grid,
    .ops-grid,
    .ops-grid.three,
    .supervisor-live-grid,
    .menu-grid,
    .operations-report-list,
    .inline-form,
    .mode-form,
    .disposition-form-grid,
    .data-filter,
    .checkbox-grid,
    .customer-support-grid,
    .customer-service-grid,
    .staff-grid,
    .privilege-grid,
    .skill-assignment-board,
    .agent-shell,
    .agent-dashboard-grid,
    .theme-brand-grid,
    .theme-font-grid,
    .theme-settings-grid {
        grid-template-columns: 1fr;
    }

    .conversation-routing-form {
        grid-template-columns: 1fr;
    }

    .conversation-routing-form > [data-conversation-action-status] {
        grid-column: auto;
    }

    .kbs-remote-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .kbs-remote-filter {
        flex-wrap: wrap;
    }

    .kbs-category-picker {
        min-width: min(280px, 100%);
    }

    .kbs-category-trigger,
    .kbs-category-menu {
        width: min(280px, calc(100vw - 48px));
    }

    .kbs-remote-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assignment-column {
        min-height: 0;
    }

    .assignment-actions {
        align-content: stretch;
    }

    .skill-assigned-agent {
        grid-template-columns: 1fr;
    }

    .skill-assigned-agent span {
        width: max-content;
    }

    .nav-links {
        max-height: calc(100dvh - 74px);
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
        border: 1px solid var(--theme-border, #d2d2d7);
        border-radius: 8px;
        background: var(--theme-surface-bg, #fff);
        box-shadow: 0 18px 40px rgba(23, 32, 42, .2);
        padding: 10px;
        position: absolute;
        top: calc(100% - 1px);
        right: 10px;
        left: 10px;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        z-index: 50;
    }

    .topbar.mobile-menu-open .nav-links {
        display: flex;
    }

    .agent-mini-dashboard {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-channel-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .composer-input-row {
        grid-template-columns: auto auto minmax(120px, 1fr) auto;
    }

    .nav-group,
    .logout-form {
        width: 100%;
    }

    .nav-menu {
        max-width: 100%;
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }

    .customer-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-hero-expanded {
        min-height: 0;
        padding: 22px;
    }

    .customer-info-band {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-chat-widget {
        right: 12px;
        bottom: 12px;
        left: 12px;
        display: grid;
        justify-items: end;
    }

    .chat-popup {
        width: 100%;
        max-height: calc(100vh - 96px);
    }

    .chat-launcher {
        width: 54px;
        height: 54px;
        min-width: 54px;
        min-height: 54px;
    }

    .agent-sidebar {
        border-right: 0;
        border-bottom: 1px solid #d2d2d7;
    }

    .reply-form,
    .disposition-form,
    .transfer-form,
    .search-form,
    .header-actions {
        width: 100%;
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .data-filter {
        display: grid;
        width: 100%;
    }

    .data-filter input,
    .data-filter select,
    .data-filter button,
    .data-filter .button-link {
        width: 100%;
        flex-basis: auto;
    }

    .agent-console-page .topbar {
        align-items: stretch;
        flex: 0 0 auto;
        padding: 6px 10px;
    }

    .agent-console-page .topbar-start {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }

    .agent-console-page .brand-copy small {
        display: none;
    }

    .agent-console-page .session-timers,
    .agent-console-page .agent-session-controls {
        width: auto;
        flex-wrap: nowrap;
        gap: 5px;
    }

    .agent-console-page .session-meter,
    .agent-console-page .session-action {
        flex: 0 0 auto;
    }

    .agent-console-page .nav-links > a,
    .agent-console-page .nav-group,
    .agent-console-page .logout-form {
        width: 100%;
        flex: 0 0 auto;
    }

    .agent-console-page .nav-group[open] .nav-menu {
        max-height: min(50vh, 360px);
        position: static;
        width: 100%;
        overflow-y: auto;
        box-shadow: none;
    }

    .agent-console-page .app-footer {
        display: none;
    }

    .agent-console-page .agent-shell {
        height: 0;
        min-height: 0;
        display: grid;
        flex: 1 1 0;
        grid-template-columns: minmax(0, 1fr);
        overflow: hidden;
    }

    .agent-console-page .agent-sidebar {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto auto auto auto minmax(0, 1fr);
        align-content: stretch;
        gap: 8px;
        border: 0;
        padding: 10px;
        overflow: hidden;
    }

    .agent-console-page .agent-sidebar header .eyebrow {
        margin: 0;
        font-size: 13px;
    }

    .agent-console-page .agent-sidebar label {
        gap: 3px;
    }

    .agent-console-page .agent-sidebar select {
        min-height: 40px;
    }

    .agent-console-page .mode-hint {
        font-size: 11px;
        padding: 7px 9px;
    }

    .agent-mobile-channel-tabs {
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .agent-mobile-channel-tabs::-webkit-scrollbar {
        display: none;
    }

    .agent-mobile-channel-tabs button {
        min-width: 84px;
        flex: 0 0 auto;
    }

    .agent-console-page .inbox-list {
        min-height: 0;
        align-content: start;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .agent-console-page .inbox-item {
        min-height: 72px;
        padding: 9px 10px;
    }

    .agent-console-page .agent-main {
        display: none;
    }

    .agent-console-page .agent-shell.mobile-conversation-open .agent-sidebar {
        display: none;
    }

    .agent-console-page .agent-shell.mobile-conversation-open .agent-main {
        height: auto;
        max-height: 100%;
        min-height: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-content: stretch;
        gap: 6px;
        padding: 6px 8px 0;
        overflow: hidden;
    }

    .agent-mobile-conversation-bar {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border: 1px solid #d2d2d7;
        border-radius: 8px;
        background: #fff;
        padding: 6px;
    }

    .agent-mobile-conversation-bar button {
        min-width: 68px;
        min-height: 42px;
        font-size: 12px;
        padding: 0 10px;
    }

    .agent-mobile-back-button {
        border: 1px solid #c8d5df;
        background: #fbfbfd;
        color: #1d1d1f;
    }

    .agent-mobile-back-button::before {
        content: "‹ ";
        font-size: 18px;
        line-height: 0;
    }

    .agent-mobile-conversation-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .agent-mobile-conversation-copy strong,
    .agent-mobile-conversation-copy small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .agent-mobile-conversation-copy strong {
        color: #1d1d1f;
        font-size: 14px;
    }

    .agent-mobile-conversation-copy small {
        color: #6e6e73;
        font-size: 10px;
        font-weight: 700;
    }

    .agent-console-page .agent-channel-strip,
    .agent-console-page .agent-toolbar,
    .agent-console-page .agent-console-feedback,
    .agent-console-page .agent-main #transfer-form,
    .agent-console-page .agent-main #disposition-form {
        display: none;
    }

    .agent-console-page .agent-main .agent-messages {
        height: auto;
        max-height: 100%;
        min-height: 0;
        gap: 8px;
        border-radius: 8px;
        padding: 9px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }

    .agent-console-page .agent-main .message {
        max-width: 88%;
        padding: 9px 10px;
    }

    .agent-console-page #agent-reply-form {
        min-width: 0;
        margin: 0;
        border-top: 1px solid var(--theme-border, #d2d2d7);
        background: var(--theme-surface-bg, #fff);
        padding: 6px 0 max(6px, env(safe-area-inset-bottom));
        position: relative;
        z-index: 3;
    }

    .agent-console-page .composer-input-row {
        grid-template-columns: auto auto minmax(80px, 1fr) auto;
        gap: 4px;
    }

    .agent-console-page .agent-main .composer-tool-button,
    .agent-console-page .agent-main #agent-reply-form button[type="submit"] {
        height: 46px;
        min-height: 46px;
        padding: 0 8px;
    }

    .agent-console-page .agent-main .reply-form textarea {
        height: 46px;
        min-height: 46px;
        max-height: 92px;
        font-size: 16px;
        padding: 10px;
    }

    .agent-console-page .agent-shell.mobile-conversation-open .agent-main.mobile-actions-open {
        grid-template-rows: auto auto auto;
        align-content: start;
        overflow-y: auto;
    }

    .agent-console-page .agent-main.mobile-actions-open #transfer-form,
    .agent-console-page .agent-main.mobile-actions-open #disposition-form {
        display: grid;
        grid-template-columns: 1fr;
        margin: 0;
    }

    .agent-console-page .agent-main.mobile-actions-open .agent-console-feedback:not(:empty) {
        display: block;
        border-radius: 6px;
        background: #fff5e5;
        padding: 8px 10px;
    }

    .agent-console-page .agent-main.mobile-actions-open #agent-message-list,
    .agent-console-page .agent-main.mobile-actions-open #agent-reply-form {
        display: none;
    }

    .agent-console-page .agent-main.mobile-actions-open #transfer-form {
        gap: 7px;
        padding: 9px;
    }

    .agent-console-page .agent-main.mobile-actions-open #transfer-form input,
    .agent-console-page .agent-main.mobile-actions-open #transfer-form select,
    .agent-console-page .agent-main.mobile-actions-open #transfer-form button {
        height: 42px;
        min-height: 42px;
    }

    .agent-console-page .agent-main.mobile-actions-open #disposition-form {
        gap: 7px;
    }

    .agent-console-page .agent-main.mobile-actions-open .disposition-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agent-console-page .agent-main.mobile-actions-open .disposition-actions button {
        min-width: 0;
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .kbs-remote-article-grid {
        grid-template-columns: 1fr;
    }

    .business-hours-toolbar,
    .business-hours-message-grid,
    .business-hours-metrics {
        grid-template-columns: 1fr;
    }

    .agent-console-page .brand-copy {
        display: none;
    }

    .agent-console-page .session-meter:first-child {
        display: none;
    }

    .agent-console-page .agent-main .composer-tool-button {
        width: 42px;
        min-width: 42px;
        overflow: hidden;
        font-size: 0;
        padding: 0;
    }

    .agent-console-page [data-emoji-toggle]::before {
        content: "☺";
        font-size: 20px;
    }

    .agent-console-page [data-attachment-control]::before {
        content: "+";
        font-size: 22px;
    }
}

/* Messenger commerce administration */
.commerce-admin-page {
    display: grid;
    gap: 16px;
}

.commerce-admin-page .workspace-header p:not(.eyebrow) {
    max-width: 720px;
    margin: 5px 0 0;
    color: var(--theme-muted, #6e6e73);
}

.commerce-create-panel form,
.commerce-order-detail form {
    display: grid;
    gap: 14px;
}

.commerce-manual-order-form .section-heading:not(:first-child) {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--theme-border, #d2d2d7);
}

.commerce-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.commerce-form-grid,
.commerce-charge-form,
.commerce-zone-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.commerce-form-grid label,
.commerce-charge-form label,
.commerce-zone-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.commerce-form-grid label > span,
.commerce-charge-form label > span,
.commerce-zone-row label > span {
    color: var(--theme-muted, #6e6e73);
    font-size: 11px;
    font-weight: 800;
}

.commerce-form-grid input,
.commerce-form-grid select,
.commerce-form-grid textarea,
.commerce-charge-form input,
.commerce-zone-row input {
    width: 100%;
}

.commerce-field-wide {
    grid-column: span 2;
}

.commerce-field-full {
    grid-column: 1 / -1;
}

.commerce-check-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.commerce-check-row .inline-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.commerce-check-row input[type="checkbox"] {
    width: auto;
}

.form-help {
    margin: 0;
    color: var(--theme-muted, #6e6e73);
    font-size: 11px;
}

.commerce-table-wrap {
    max-height: min(64vh, 680px);
    overflow: auto;
}

.commerce-product-table {
    min-width: 1080px;
}

.commerce-order-table {
    min-width: 1260px;
}

.commerce-order-table-simple {
    min-width: 1040px;
}

.commerce-order-product-summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 230px;
}

.commerce-order-product-summary + .commerce-order-product-summary {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid var(--theme-border, #d2d2d7);
}

.commerce-order-product-summary > div {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.commerce-order-product-thumb {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--theme-border, #d2d2d7);
    border-radius: 6px;
    background: var(--theme-surface-alt-bg, #fbfbfd);
}

.commerce-order-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.commerce-order-product-thumb-empty {
    color: var(--theme-muted, #6e6e73);
    font-size: 8px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

.commerce-product-link {
    color: var(--theme-primary, #0071e3);
    font-size: 10px;
    font-weight: 800;
    text-decoration: underline;
}

.commerce-order-detail-product-thumb {
    width: 72px;
    height: 72px;
}

.commerce-order-filter input:first-child {
    width: 230px;
    flex-basis: 230px;
}

.commerce-order-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.commerce-order-metrics article {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--theme-border, #d2d2d7);
    border-top: 3px solid var(--theme-primary, #0071e3);
    border-radius: 7px;
    background: var(--theme-surface-bg, #fff);
}

.commerce-order-metrics span {
    display: block;
    color: var(--theme-muted, #6e6e73);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.commerce-order-metrics strong {
    display: block;
    margin-top: 3px;
    font-size: 22px;
}

.commerce-order-index {
    align-content: start;
    gap: 10px;
    grid-auto-rows: max-content;
    padding-top: 10px;
}

.commerce-order-header {
    margin-bottom: 0;
}

.commerce-order-header h1 {
    margin: 0;
    font-size: 20px;
}

.commerce-order-header .eyebrow {
    margin-bottom: 2px;
    font-size: 11px;
}

.commerce-admin-page .commerce-order-header p:not(.eyebrow) {
    margin-top: 2px;
    font-size: 12px;
}

.commerce-order-metrics-compact {
    align-self: start;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}

.commerce-order-metrics-compact article {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 9px;
    border-top-width: 2px;
}

.commerce-order-metrics-compact span {
    font-size: 9px;
}

.commerce-order-metrics-compact strong {
    margin-top: 0;
    font-size: 18px;
    line-height: 1;
}

.commerce-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--theme-primary-soft, #eaf4ff);
    color: var(--theme-primary, #0071e3);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.commerce-status-delivered,
.commerce-status-confirmed {
    background: var(--theme-success-bg, #edf8f0);
    color: var(--theme-success, #17643d);
}

.commerce-status-cancelled,
.commerce-status-returned {
    background: var(--theme-error-bg, #fff0f0);
    color: var(--theme-error, #b42318);
}

.commerce-status-shipped,
.commerce-status-processing,
.commerce-status-exchanged {
    background: var(--theme-warning-bg, #fff7e6);
    color: var(--theme-warning, #935c0d);
}

.commerce-zone-list {
    display: grid;
    gap: 10px;
}

.commerce-zone-row {
    align-items: end;
    padding: 12px;
    border: 1px solid var(--theme-border, #d2d2d7);
    border-radius: 7px;
    background: var(--theme-surface-alt-bg, #fbfbfd);
}

.commerce-zone-row .action-row,
.commerce-zone-row .commerce-check-row {
    align-self: end;
    min-height: 36px;
}

.commerce-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 16px;
}

.commerce-order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--theme-border, #d2d2d7);
}

.commerce-order-item-simple {
    grid-template-columns: auto minmax(0, 1fr);
}

.commerce-product-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.commerce-product-images a {
    display: block;
    overflow: hidden;
    border: 1px solid var(--theme-border, #d2d2d7);
    border-radius: 7px;
    background: var(--theme-surface-alt-bg, #fbfbfd);
    aspect-ratio: 1;
}

.commerce-product-images img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.commerce-order-item div,
.commerce-order-item div span {
    display: grid;
    gap: 2px;
}

.commerce-order-item div span,
.commerce-timeline span,
.commerce-timeline small {
    color: var(--theme-muted, #6e6e73);
    font-size: 11px;
}

.commerce-totals,
.commerce-facts {
    display: grid;
    gap: 0;
    margin: 12px 0 0;
}

.commerce-totals div,
.commerce-facts div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--theme-border, #d2d2d7);
}

.commerce-totals dt,
.commerce-facts dt {
    color: var(--theme-muted, #6e6e73);
    font-size: 11px;
    font-weight: 800;
}

.commerce-totals dd,
.commerce-facts dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.commerce-total-final dt,
.commerce-total-final dd {
    color: var(--theme-text, #1d1d1f);
    font-size: 15px;
}

.commerce-fact-full {
    grid-template-columns: 1fr !important;
}

.commerce-fact-full dd {
    text-align: left;
}

.commerce-timeline {
    display: grid;
    gap: 0;
}

.commerce-timeline article {
    display: grid;
    grid-template-columns: 160px minmax(180px, .5fr) minmax(0, 1fr);
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--theme-border, #d2d2d7);
}

@media (max-width: 980px) {
    .commerce-form-grid,
    .commerce-charge-form,
    .commerce-zone-row,
    .commerce-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commerce-order-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commerce-order-metrics-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .commerce-detail-grid > .panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .commerce-form-grid,
    .commerce-charge-form,
    .commerce-zone-row {
        grid-template-columns: 1fr;
    }

    .commerce-order-metrics,
    .commerce-order-metrics-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commerce-field-wide,
    .commerce-field-full {
        grid-column: auto;
    }

    .commerce-order-item,
    .commerce-timeline {
        grid-template-columns: 1fr;
    }

    .commerce-order-item {
        gap: 5px;
    }

    .commerce-timeline article {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
