:root {
  --ivory: #f7f4ed;
  --paper: #fffdf8;
  --ink: #102a43;
  --ink-soft: #3c5165;
  --muted: #6b7885;
  --line: #e4e0d5;
  --blue: #1c4d6c;
  --blue-strong: #123952;
  --green: #2f8a66;
  --green-soft: #e8f4ee;
  --danger: #a94343;
  --danger-soft: #f9ece9;
  --shadow: 0 12px 34px rgba(20, 45, 62, .08);
  --radius: 16px;
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ivory); }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--ivory); line-height: 1.5; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #77bca2; outline-offset: 2px; }
svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; flex: 0 0 auto; }
[hidden] { display: none !important; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(circle at 15% 15%, #e4f0eb 0, transparent 28rem), var(--ivory); }
.auth-card { width: min(100%, 430px); padding: 2.5rem; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 20px; }
.brand-mark, .wordmark-icon { display: grid; place-items: center; color: white; background: var(--blue); border-radius: 13px; }
.brand-mark { width: 3rem; height: 3rem; margin-bottom: 1.35rem; }
.brand-mark svg { width: 1.7rem; height: 1.7rem; fill: currentColor; stroke: none; }
.eyebrow { margin: 0 0 .3rem; color: var(--green); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); line-height: 1.15; margin-bottom: .65rem; }
h2 { font-size: 1.17rem; line-height: 1.25; margin-bottom: .35rem; }
.muted { color: var(--muted); max-width: 62ch; }
.stack-form { display: grid; gap: .65rem; margin-top: 1.6rem; }
label { display: block; color: var(--ink); font-size: .9rem; font-weight: 700; }
input, select { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cbd3d8; border-radius: 9px; padding: .68rem .75rem; }
input::placeholder { color: #8d9aa2; }
input:focus, select:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(28, 77, 108, .13); }
.field-with-icon, .search-field { position: relative; }
.field-with-icon svg, .search-field svg { position: absolute; top: 50%; right: .7rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-with-icon input, .search-field input { padding-right: 2.4rem; }
.form-error { color: #963e3e; font-size: .86rem; margin: .1rem 0; }
.helper-text { color: var(--muted); font-size: .82rem; margin: .35rem 0 0; }
.optional { color: var(--muted); font-size: .78rem; font-weight: 400; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .46rem; min-height: 2.55rem; padding: .57rem .9rem; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: .9rem; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:not(:disabled):hover { background: var(--blue-strong); }
.button-secondary { color: var(--blue); background: transparent; border-color: #b9c7ce; }
.button-secondary:not(:disabled):hover { background: #edf3f4; border-color: var(--blue); }
.button-danger { color: #fff; background: var(--danger); }
.button-danger:not(:disabled):hover { background: #883637; }
.button-alert { color: #7a3f22; background: #fff7e7; border-color: #dca44e; }
.button-alert:not(:disabled):hover { background: #ffedc7; border-color: #bd7920; }

.app-shell { min-height: 100vh; display: flex; direction: rtl; }
.sidebar { width: 255px; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; position: fixed; inset: 0 0 0 auto; z-index: 10; padding: 1.45rem 1rem 1rem; color: #eef6f6; background: var(--ink); box-shadow: -2px 0 12px rgba(0,0,0,.09); }
.sidebar-top { display: grid; gap: 2rem; }
.wordmark { display: flex; align-items: center; gap: .65rem; padding: 0 .35rem; color: inherit; text-decoration: none; }
.wordmark-icon { width: 2.25rem; height: 2.25rem; color: var(--ink); background: #bce0d1; }
.wordmark-icon svg { width: 1.4rem; height: 1.4rem; fill: currentColor; stroke: none; }
.wordmark strong, .wordmark small { display: block; }
.wordmark strong { font-size: 1rem; letter-spacing: .01em; }
.wordmark small { color: #aac0ca; font-size: .74rem; }
.nav-list { display: grid; gap: .35rem; }
.nav-item { width: 100%; display: flex; align-items: center; gap: .75rem; min-height: 2.8rem; padding: .6rem .72rem; color: #d9e7e9; text-align: right; border: 0; border-radius: 9px; background: transparent; font-weight: 700; }
.nav-item:hover { background: rgba(255,255,255,.09); }
.nav-item.is-active { color: #fff; background: rgba(109, 180, 153, .2); box-shadow: inset -3px 0 0 #86c7ac; }
.nav-item-muted { color: #c0d1d5; font-size: .88rem; }
.sidebar-bottom { display: grid; gap: .8rem; }
.secure-note { display: flex; align-items: flex-start; gap: .55rem; padding: .75rem; color: #bad5cf; border: 1px solid rgba(183, 218, 208, .22); border-radius: 10px; font-size: .8rem; }
.secure-note svg { margin-top: .1rem; color: #9ed6bd; }
.secure-note small { color: #92abb4; }
.connected-user { margin: 0; padding: 0 .72rem; color: #b9d0d5; font-size: .78rem; overflow-wrap: anywhere; }
.content-area { width: calc(100% - 255px); min-height: 100vh; margin-right: 255px; padding: 2.1rem clamp(1rem, 3vw, 3rem) 3rem; }
.mobile-header { display: none; }
.view { max-width: 1340px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.page-heading h1 { margin-bottom: .35rem; }
.notice { margin: 0 0 1rem; padding: .72rem .85rem; color: var(--blue-strong); background: #eaf2f4; border: 1px solid #c8dce1; border-radius: 9px; font-size: .9rem; }
.notice.is-error { color: #89393a; background: var(--danger-soft); border-color: #edc3bd; }
.disconnect-alert-banner { max-width: 1340px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto 1.25rem; padding: .85rem 1rem; color: #743d21; background: #fff3dc; border: 1px solid #e5b65f; border-radius: 12px; }
.disconnect-alert-banner strong { display: block; }
.disconnect-alert-banner p { margin: .15rem 0 0; font-size: .9rem; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card, .panel { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 3px 14px rgba(20,45,62,.03); border-radius: var(--radius); }
.metric-card { min-height: 144px; position: relative; padding: 1.2rem; overflow: hidden; }
.metric-card p { margin: .65rem 0 .1rem; color: var(--muted); font-size: .86rem; }
.metric-card strong { display: block; color: var(--ink); font-size: 1.85rem; line-height: 1.2; }
.metric-detail { color: var(--muted); font-size: .78rem; }
.metric-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; }
.metric-icon-blue { color: var(--blue); background: #e9f1f4; }
.metric-icon-green { color: #237554; background: var(--green-soft); }
.metric-icon-ink { color: var(--ink); background: #eceee9; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 1rem; }
.panel { padding: 1.25rem; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.panel-heading h2 { margin: 0; }
.status-badge { display: inline-flex; align-items: center; white-space: nowrap; padding: .26rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.status-unknown { color: #536878; background: #edf0f1; }
.status-connected { color: #226b50; background: var(--green-soft); }
.status-error { color: #963e3e; background: var(--danger-soft); }
.status-info { color: var(--blue); background: #e9f1f4; }
.status-inactive { color: #695e36; background: #f5f0df; }
.status-removed { color: #7a4b4a; background: #f4e9e7; }
.panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.inline-status { color: var(--muted); font-size: .83rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.definition-list { display: grid; gap: .6rem; margin: 1.05rem 0 0; }
.definition-list div { display: flex; justify-content: space-between; gap: .8rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.definition-list dt { color: var(--muted); font-size: .86rem; }
.definition-list dd { margin: 0; font-weight: 700; text-align: left; }
.quiet-panel { margin-top: 1rem; }
.quiet-panel p { margin: .95rem 0 0; }
.disconnect-alerts-panel { margin-top: 1rem; }
.disconnect-alerts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.disconnect-alerts-grid h3 { margin: 0 0 .55rem; font-size: .94rem; }
.disconnect-alert-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.disconnect-alert-event { padding: .8rem; background: #fcfaf5; border: 1px solid #e5dfd3; border-radius: 10px; }
.disconnect-alert-event-heading { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.disconnect-alert-event-heading strong { overflow-wrap: anywhere; }
.disconnect-alert-details { display: grid; gap: .32rem; margin: .65rem 0 0; }
.disconnect-alert-details div { display: flex; justify-content: space-between; gap: .7rem; font-size: .82rem; }
.disconnect-alert-details dt { color: var(--muted); }
.disconnect-alert-details dd { margin: 0; color: var(--ink-soft); font-weight: 700; text-align: left; }
.alert-list-empty { padding: .8rem; color: var(--muted); background: #fafaf7; border: 1px dashed #d9ddd8; border-radius: 10px; font-size: .85rem; }

.device-list { display: grid; gap: 1rem; }
.archive-toggle { display: inline-flex; align-items: center; gap: .5rem; margin: -1rem 0 1rem; color: var(--ink-soft); font-size: .88rem; font-weight: 700; }
.archive-toggle input { width: 1rem; height: 1rem; accent-color: var(--blue); }
.device-archive { display: grid; gap: 1rem; margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.archive-heading h2 { margin: 0; font-size: 1rem; }
.archive-heading p, .archive-empty { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; }
.device-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.device-card.is-removed { background: #fcfaf6; border-style: dashed; }
.device-main { min-width: 0; }
.device-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.device-title-row h2 { margin: 0; word-break: break-word; }
.device-meta { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin: .75rem 0 0; color: var(--muted); font-size: .87rem; }
.device-meta span { display: inline-flex; align-items: center; gap: .32rem; }
.dot { width: .55rem; height: .55rem; display: inline-block; border-radius: 100%; background: currentColor; }
.device-actions { display: flex; justify-content: flex-end; align-items: flex-start; flex-wrap: wrap; gap: .5rem; }
.qr-panel { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1rem; background: #f4f7f4; border: 1px solid #dce7e1; border-radius: 12px; }
.qr-image { width: 144px; height: 144px; padding: .35rem; object-fit: contain; background: #fff; border: 1px solid #d6ded8; border-radius: 7px; }
.qr-panel h3 { margin: 0 0 .35rem; font-size: 1rem; }
.qr-panel p { margin: 0; color: var(--muted); font-size: .86rem; }
.empty-state { display: grid; place-items: center; align-content: center; min-height: 240px; padding: 2rem; color: var(--muted); text-align: center; }
.empty-state svg { width: 2rem; height: 2rem; margin-bottom: .7rem; color: var(--green); }
.empty-state h2 { color: var(--ink); }
.empty-state p { max-width: 35ch; margin: 0; }

.conversation-layout { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.accounts-panel { position: sticky; top: 1rem; }
.accounts-panel label { margin-bottom: .42rem; }
.accounts-list { display: grid; gap: .4rem; margin-top: .9rem; }
.account-result { width: 100%; padding: .74rem .7rem; color: var(--ink); text-align: right; background: transparent; border: 1px solid transparent; border-radius: 9px; }
.account-result:hover, .account-result.is-selected { background: #edf4f2; border-color: #cfdfd8; }
.account-result strong, .account-result span { display: block; }
.account-result strong { font-size: .9rem; }
.account-result span { margin-top: .1rem; color: var(--muted); font-size: .78rem; }
.conversation-panel { min-height: 530px; }
.conversation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.conversation-header h1, .conversation-header h2 { margin: 0 0 .25rem; word-break: break-word; }
.compact-counts { display: flex; gap: .75rem; margin: 0; text-align: center; }
.compact-counts div { min-width: 3.5rem; padding: .36rem .48rem; background: #f2f5f3; border-radius: 8px; }
.compact-counts dt { color: var(--muted); font-size: .7rem; }
.compact-counts dd { margin: 0; font-size: 1rem; font-weight: 700; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; padding: 1rem 0 .7rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .66rem; color: var(--ink-soft); background: #fff; border: 1px solid #ccd8d8; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.filter-chip:hover, .filter-chip.is-active { color: var(--blue-strong); background: #e9f3ef; border-color: #88bda7; }
.color-token { width: .52rem; height: .52rem; display: inline-block; border-radius: 50%; background: var(--tag-color, var(--blue)); }
.timeline { display: grid; gap: .65rem; padding: .55rem 0 1rem; }
.message-row { position: relative; padding: .9rem 1rem .84rem; border-right: 4px solid var(--message-color, var(--blue)); background: #fcfbf7; border-radius: 9px 3px 3px 9px; }
.message-row.is-hidden { display: none; }
.message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .48rem; color: var(--muted); font-size: .78rem; }
.speaker { color: var(--ink); font-weight: 700; }
.message-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .46rem; color: var(--ink-soft); background: #eef4f1; border: 1px solid #d2e2da; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.message-tag:hover { background: #dcece4; }
.message-text { margin: 0; color: #243f52; white-space: pre-wrap; overflow-wrap: anywhere; text-align: right; }
.message-empty { padding: 1.5rem 0; color: var(--muted); text-align: center; }
.load-older { margin: .3rem auto 0; }

.admin-panel { padding-bottom: .8rem; }
.admin-table-wrap { margin-top: 1rem; overflow-x: auto; }
.admin-table { width: 100%; min-width: 660px; border-collapse: collapse; text-align: right; }
.admin-table th, .admin-table td { padding: .78rem .68rem; vertical-align: middle; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-size: .76rem; font-weight: 700; }
.admin-table td { color: var(--ink-soft); font-size: .86rem; }
.admin-table td:first-child { min-width: 190px; color: var(--ink); }
.admin-table td > strong, .admin-username { display: block; }
.admin-table td > strong { color: var(--ink); font-size: .9rem; }
.admin-username { margin-top: .12rem; color: var(--muted); direction: ltr; text-align: right; unicode-bidi: plaintext; font-size: .78rem; }
.admin-actions { width: 1%; white-space: nowrap; }
.admin-empty { padding: 2rem !important; color: var(--muted) !important; text-align: center; }
.admin-options { display: flex; flex-wrap: wrap; gap: .55rem 1rem; padding: .8rem; background: #f4f7f4; border: 1px solid #dce7e1; border-radius: 10px; }
.admin-options .checkbox-label { color: var(--ink); }
.admin-options .checkbox-label input { accent-color: var(--blue); }
input:disabled { color: var(--muted); background: #f1f2ee; cursor: not-allowed; }

.dialog { width: min(100% - 2rem, 625px); max-height: calc(100vh - 2rem); padding: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 60px rgba(13,32,44,.28); }
.dialog-small { width: min(100% - 2rem, 480px); }
.dialog::backdrop { background: rgba(10, 31, 45, .54); }
.dialog-content { display: grid; gap: 1rem; padding: 1.4rem; overflow: auto; }
.dialog-content > p { margin: 0; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dialog-heading h2 { margin: 0; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 2.4rem; height: 2.4rem; color: var(--ink); background: transparent; border: 1px solid #cbd6d7; border-radius: 8px; }
.icon-button:hover { background: #edf3f1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form-grid label { margin-bottom: .38rem; }
.consent-box { display: flex; align-items: flex-start; gap: .62rem; padding: .85rem; color: #245944; background: var(--green-soft); border: 1px solid #cde3d7; border-radius: 10px; }
.consent-box svg { margin-top: .1rem; color: #277357; }
.consent-box p { margin: .35rem 0 0; color: #527263; font-size: .8rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: .55rem; color: #245944; line-height: 1.45; }
.checkbox-label input { width: 1rem; height: 1rem; flex: 0 0 auto; margin: .17rem 0 0; accent-color: var(--green); }
.dialog-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: .6rem; padding-top: .25rem; }

.record-body { height: 100vh; height: 100dvh; min-height: 0; margin: 0; overflow: hidden; background: #efeae2; color: #111b21; }
.record-body .record-shell { width: 100%; height: 100%; min-height: 0; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.record-body .record-state { width: min(calc(100% - 1rem), 500px); margin: auto; padding: 1.25rem; background: #fff; border: 1px solid #e9edef; border-radius: 12px; box-shadow: none; text-align: right; }
.record-body .record-viewer { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; height: auto; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; background: #f6f5f0; }
.record-body .record-chat-header { flex: 0 0 auto; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px clamp(18px, 4.5vw, 36px); background: #fff; border-bottom: 1px solid #eef0f1; }
.record-body .record-chat-header h1 { margin: 0; color: #17212b; font-size: 15px; line-height: 1.25; font-weight: 600; }
.record-body .record-loading-indicator { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #667781; font-size: 12px; line-height: 1.25; white-space: nowrap; }
.record-body .record-loading-indicator::before { width: 6px; height: 6px; content: ''; border-radius: 50%; background: currentColor; opacity: .65; }
.record-body .record-loading-indicator.is-error { color: #9b4a45; }
.record-body .record-tabs { flex: 0 0 auto; display: flex; gap: 6px; padding: 6px clamp(14px, 3.5vw, 30px) 0; overflow-x: auto; overflow-y: hidden; background: #fff; border-bottom: 1px solid #e9edef; scrollbar-width: thin; }
.record-body .record-tab { --representative-color: #247BA0; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; color: #65727c; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; box-shadow: none; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; }
.record-body .record-tab:hover { background: #f7f9fa; }
.record-body .record-tab.is-active { color: #17212b; background: color-mix(in srgb, var(--representative-color) 6%, #fff); border-bottom-color: var(--representative-color); box-shadow: none; font-weight: 600; }
.record-body .record-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--representative-color); }
.record-body .record-notice { flex: 0 0 auto; margin: 6px 8px 0; padding: 6px 8px; font-size: 13px; }
.record-body .record-chat-stage { position: relative; flex: 1 1 auto; min-height: 0; }
.record-body .record-scrollcontainer { height: 100%; min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; padding: 12px clamp(18px, 4.5vw, 36px); }
.record-body .record-timeline { display: flex; flex: 0 0 auto; flex-direction: column; gap: 7px; min-width: 0; margin-top: 0; }
.record-body .record-older-button { align-self: center; min-height: 29px; padding: 4px 9px; font-size: 12px; background: #fff; border-color: #e2e6e9; box-shadow: none; }
.record-body .chat-day-separator { align-self: center; margin: 5px 0; padding: 4px 10px; color: #77818a; background: #ffffffc4; border: 1px solid #e7e9e6; border-radius: 7px; font-size: 11px; line-height: 1.3; box-shadow: none; }
.record-body .chat-bubble { --conversation-color: #247BA0; width: fit-content; max-width: min(78%, 620px); padding: 8px 10px 6px; border: 1px solid #e8ece6; border-inline-start: 2px solid color-mix(in srgb, var(--conversation-color) 55%, transparent); border-radius: 10px; box-shadow: none; font-size: 14px; line-height: 1.38; }
.record-body .chat-bubble--out { align-self: flex-start; background: #d9fdd3; }
.record-body .chat-bubble--in { align-self: flex-end; background: #fff; }
.record-body .chat-message-text { margin: 0; color: #111b21; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.record-body .chat-bubble-meta { display: flex; justify-content: flex-end; min-width: 100%; margin-top: 2px; color: #667781; font-size: 11px; line-height: 1; direction: ltr; }
.record-body .chat-empty { margin: auto; padding: 12px; color: #667781; font-size: 14px; text-align: center; }
.record-body .record-jump-latest { position: absolute; inset-inline-start: 18px; bottom: 12px; z-index: 1; min-height: 29px; padding: 5px 10px; color: #075e54; background: #fff; border: 1px solid #dfe5e7; border-radius: 999px; box-shadow: none; font-size: 12px; }
.record-body .record-jump-latest:hover { background: #f0f7f5; }

@media (max-width: 900px) {
  .sidebar { width: 225px; }
  .content-area { width: calc(100% - 225px); margin-right: 225px; }
  .metric-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .disconnect-alerts-grid, .conversation-layout { grid-template-columns: 1fr; }
  .accounts-panel { position: static; }
}
@media (max-width: 700px) {
  .sidebar { width: min(85vw, 285px); transform: translateX(105%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .content-area { width: 100%; margin-right: 0; padding: 0 1rem 2rem; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.4rem; margin: 0 -1rem 1.35rem; padding: .8rem 1rem; color: var(--ink); background: rgba(247,244,237,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  .mobile-header strong { font-size: .95rem; }
  .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 1.35rem; }
  .page-heading > .button { align-self: flex-start; }
  .disconnect-alert-banner { align-items: stretch; flex-direction: column; }
  .disconnect-alert-banner .button { align-self: flex-start; }
  .device-card { grid-template-columns: 1fr; }
  .device-actions { justify-content: flex-start; }
  .qr-panel { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .conversation-header { flex-direction: column; }
  .compact-counts { align-self: stretch; }
  .compact-counts div { flex: 1; }
  .auth-card { padding: 1.6rem; }
  .record-body .chat-bubble { max-width: 86%; }
}
@media (max-width: 410px) {
  .button { width: 100%; }
  .device-actions .button, .panel-actions .button, .dialog-actions .button { width: auto; }
  .page-heading > .button { width: 100%; }
  .qr-image { width: 128px; height: 128px; }
  .record-body .record-tab { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
  .record-body .record-older-button { width: auto; }
}
