:root {
  color-scheme: light;
  --ink-950: #0b1f1b;
  --ink-900: #132f29;
  --ink-700: #395a51;
  --ink-500: #6d847d;
  --ink-300: #b7c8c2;
  --surface: #ffffff;
  --canvas: #f2f6f4;
  --line: #dce8e3;
  --blue: #087d67;
  --blue-soft: #e5f5f0;
  --cyan: #53e0b5;
  --green: #087d67;
  --green-soft: #e1f5ee;
  --cobalt: #3156d9;
  --cobalt-soft: #e9edff;
  --plum: #6e3cc4;
  --plum-soft: #f1eaff;
  --amber: #9a5b00;
  --amber-soft: #fff2d8;
  --red: #b42336;
  --red-soft: #ffeaed;
  --shadow: 0 22px 64px rgba(12, 47, 38, 0.10);
  font-family: "Segoe UI Variable Text", "Aptos", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink-950);
  background: var(--canvas);
  font-size: 1rem;
  line-height: 1.5;
}

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

:focus-visible {
  outline: 3px solid rgba(8, 127, 104, 0.3);
  outline-offset: 2px;
}

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

.boot-screen,
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(116, 223, 194, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 78%, rgba(8, 127, 104, 0.28), transparent 30rem),
    var(--ink-950);
  color: white;
}

.boot-screen { align-content: center; gap: 0.8rem; }
.boot-screen p { color: var(--ink-300); margin: 0; }

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  color: #10ad88;
  background: linear-gradient(145deg, #d8fff2, #ffffff);
  box-shadow: 0 10px 28px rgba(11, 191, 145, 0.20), inset 0 0 0 1px rgba(8, 125, 103, 0.10);
}
.brand-mark svg { width: 2.35rem; height: 2.35rem; display: block; filter: drop-shadow(0 4px 8px rgba(8, 125, 103, 0.16)); }

.login-card {
  width: min(100%, 27rem);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  background: rgba(17, 24, 44, 0.84);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.login-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 2.5rem; }
.login-brand strong { font-size: 1.1rem; letter-spacing: -0.02em; }
.login-card h1 { margin: 0 0 0.5rem; font-size: clamp(1.8rem, 8vw, 2.45rem); line-height: 1.08; letter-spacing: -0.045em; }
.login-card > p { margin: 0 0 1.75rem; color: var(--ink-300); }

.form-field { display: grid; gap: 0.45rem; margin-top: 1rem; }
.form-field label { color: #eef2ff; font-size: 0.9rem; font-weight: 650; }
.form-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #3a4562;
  border-radius: 0.75rem;
  color: white;
  background: #0c1326;
}
.form-field input::placeholder { color: #7f8aa4; }
.form-field input:focus { border-color: var(--cyan); }

.primary-button {
  min-height: 3rem;
  width: 100%;
  margin-top: 1.4rem;
  border: 0;
  border-radius: 0.75rem;
  color: white;
  background: var(--blue);
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(8, 127, 104, 0.24);
}
.primary-button:hover { background: #066b58; }
.primary-button:disabled { cursor: wait; opacity: 0.62; }

.form-error {
  margin: 1rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  color: #ffd8de;
  background: rgba(180, 35, 54, 0.22);
  font-size: 0.9rem;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 17.25rem minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1rem;
  color: white;
  background:
    radial-gradient(circle at 20% 4%, rgba(83, 224, 181, 0.16), transparent 16rem),
    linear-gradient(180deg, #102d27 0%, #071d19 58%, #061714 100%);
  box-shadow: 16px 0 48px rgba(5, 29, 23, 0.08);
}

.sidebar-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.5rem 1.75rem; }
.sidebar-brand strong { font-size: 1.08rem; letter-spacing: -0.025em; }

.nav-label { margin: 0.25rem 0.65rem 0.45rem; color: #7fa197; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.12em; }
.nav { display: grid; gap: 0.3rem; }
.nav-item {
  min-height: 2.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  color: #a4bcb5;
  background: transparent;
  text-align: left;
  text-decoration: none;
}
.nav-item svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.nav-item:hover { color: white; background: rgba(255, 255, 255, 0.055); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(83, 224, 181, 0.18), rgba(83, 224, 181, 0.07)); box-shadow: inset 3px 0 var(--cyan), 0 8px 24px rgba(0, 0, 0, 0.08); }
.nav-item[aria-disabled="true"] { cursor: default; opacity: 0.62; }
.nav-soon { margin-left: auto; font-size: 0.72rem; color: #8792ac; }

.sidebar-footer { margin-top: auto; padding: 1rem 0.5rem 0; border-top: 1px solid #252d42; }
.user-block { display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: center; gap: 0.65rem; min-width: 0; }
.avatar { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: #2e3a5c; color: var(--cyan); font-weight: 800; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 0.86rem; }
.user-copy span { color: #8490aa; font-size: 0.75rem; }
.icon-button { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 0; border-radius: 0.7rem; color: #aab4ca; background: transparent; }
.icon-button:hover { color: white; background: rgba(116, 223, 194, 0.13); }
.icon-button svg { width: 1.15rem; height: 1.15rem; }

.main { min-width: 0; padding: clamp(1.25rem, 2.4vw, 2.15rem); background: radial-gradient(circle at 78% 8%, rgba(83, 224, 181, 0.08), transparent 28rem); }
.content { width: min(100%, 96rem); margin: 0 auto; }

.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #b9c9ff;
  border-radius: 0.75rem;
  color: #173493;
  background: var(--blue-soft);
  font-weight: 650;
  font-size: 0.88rem;
}

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.eyebrow { margin: 0 0 0.3rem; color: var(--blue); font-size: 0.78rem; font-weight: 850; letter-spacing: 0.12em; }
.page-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.055em; }
.page-meta { display: flex; align-items: center; gap: 0.45rem; color: var(--ink-500); font-size: 0.85rem; white-space: nowrap; }
.connection-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(13, 138, 97, 0.11); }
.connection-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(180, 35, 54, 0.11); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.8rem 0 1rem; }
.stat {
  min-width: 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.stat span { display: block; color: var(--ink-500); font-size: 0.82rem; font-weight: 700; }
.stat strong { display: block; margin-top: 0.2rem; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.04em; }
.stat:first-child { color: white; border-color: var(--ink-900); background: var(--ink-900); }
.stat:first-child span { color: #aeb8cf; }

.inbox-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 1.15rem; background: var(--surface); box-shadow: var(--shadow); }
.toolbar { display: grid; grid-template-columns: minmax(14rem, 1fr) repeat(5, minmax(8.5rem, auto)); gap: 0.7rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.control { min-height: 2.8rem; width: 100%; padding: 0.62rem 0.75rem; border: 1px solid var(--line); border-radius: 0.7rem; color: var(--ink-900); background: #fbfcff; }
.control::placeholder { color: #8a94a8; }
.control:focus { border-color: var(--blue); }

.call-table { width: 100%; border-collapse: collapse; }
.call-table th { padding: 0.75rem 1rem; color: var(--ink-500); background: #f9faff; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.035em; text-align: left; }
.call-table td { padding: 0.95rem 1rem; border-top: 1px solid #edf0f5; vertical-align: middle; }
.call-table tbody tr { cursor: pointer; transition: background 120ms ease; }
.call-table tbody tr:hover { background: #f8faff; }
.caller { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); align-items: center; gap: 0.75rem; min-width: 12rem; }
.caller-icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 0.75rem; color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.caller-copy strong, .caller-copy span { display: block; }
.caller-copy strong { font-size: 0.93rem; }
.caller-copy span { color: var(--ink-500); font-size: 0.78rem; }
.cell-main { display: block; color: var(--ink-900); font-size: 0.88rem; font-weight: 650; }
.cell-sub { display: block; margin-top: 0.1rem; color: var(--ink-500); font-size: 0.76rem; }

.pill { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.pill.new { color: #2446bf; background: var(--blue-soft); }
.pill.review { color: var(--amber); background: var(--amber-soft); }
.pill.done { color: var(--green); background: var(--green-soft); }
.pill.failed { color: var(--red); background: var(--red-soft); }

.message-state { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-700); font-size: 0.84rem; font-weight: 650; }
.message-state svg { width: 1rem; height: 1rem; color: var(--blue); }

.empty-state,
.error-state { display: grid; justify-items: center; padding: 4.5rem 1.5rem; text-align: center; }
.empty-state h2, .error-state h2 { margin: 0.9rem 0 0.3rem; font-size: 1.2rem; }
.empty-state p, .error-state p { max-width: 28rem; margin: 0; color: var(--ink-500); }
.empty-symbol { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 1rem; color: var(--blue); background: var(--blue-soft); font-size: 1.4rem; }
.retry-button { min-height: 2.7rem; margin-top: 1rem; padding: 0.55rem 1rem; border: 0; border-radius: 0.7rem; color: white; background: var(--ink-900); font-weight: 750; }

.skeleton-list { padding: 0.5rem 1rem; }
.skeleton-row { height: 4.9rem; margin: 0.5rem 0; border-radius: 0.75rem; background: linear-gradient(90deg, #f0f2f7 25%, #fafbfe 45%, #f0f2f7 65%); background-size: 300% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }

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

.drawer-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(6, 10, 22, 0.52);
  backdrop-filter: blur(2px);
}

.call-drawer {
  width: min(100%, 42rem);
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(4, 10, 25, 0.22);
}

.drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}
.drawer-header h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.1; letter-spacing: -0.045em; }
.drawer-header > div > p:last-child { margin: 0.3rem 0 0; color: var(--ink-500); }
.drawer-close { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 0.75rem; color: var(--ink-700); background: white; font-size: 1.7rem; line-height: 1; }
.drawer-body { padding: 0 clamp(1rem, 4vw, 2rem) 3rem; }
.drawer-loading { padding: 3rem 2rem; color: var(--ink-500); }
.detail-error { margin: 1rem 0 0; padding: 0.75rem 0.9rem; border-radius: 0.7rem; color: var(--red); background: var(--red-soft); font-weight: 650; }

.detail-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1.25rem 0; }
.detail-summary > div { min-width: 0; padding: 0.9rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fafbfe; }
.detail-summary span, .recording-box span { display: block; color: var(--ink-500); font-size: 0.76rem; font-weight: 700; }
.detail-summary strong { display: block; margin-top: 0.2rem; overflow-wrap: anywhere; font-size: 0.9rem; }
.detail-section { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 0.9rem; font-size: 1rem; letter-spacing: -0.015em; }
.detail-muted { margin: 0; color: var(--ink-500); }
.recording-box { display: grid; gap: 0.75rem; padding: 1rem; border-radius: 0.9rem; background: var(--blue-soft); }
.recording-box audio { width: 100%; }
.preview-audio { margin: 0; color: var(--ink-500); font-size: 0.85rem; }
.download-link { width: max-content; color: var(--blue); font-size: 0.85rem; font-weight: 750; }

.work-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: end; }
.work-form label { color: var(--ink-500); font-size: 0.78rem; font-weight: 750; }
.work-form .control { display: block; margin-top: 0.35rem; color: var(--ink-900); font-weight: 500; }
.primary-button.compact { width: max-content; min-height: 2.8rem; margin: 0; padding: 0.55rem 1rem; box-shadow: none; }
.work-form .primary-button { grid-column: 1 / -1; }
.notes { display: grid; gap: 0.65rem; }
.notes article { padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.notes p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes span { display: block; margin-top: 0.45rem; color: var(--ink-500); font-size: 0.76rem; }
.note-form { display: grid; justify-items: end; gap: 0.6rem; margin-top: 0.8rem; }
.note-form textarea { min-height: 6rem; resize: vertical; }
.timeline { display: grid; gap: 0.85rem; margin: 0; padding: 0 0 0 1.25rem; }
.timeline li { padding-left: 0.2rem; }
.timeline strong, .timeline span { display: block; }
.timeline strong { font-size: 0.9rem; }
.timeline span { color: var(--ink-500); font-size: 0.76rem; }
.transcript { margin: 0; padding: 1rem; border-radius: 0.8rem; background: #f7f8fb; white-space: pre-wrap; overflow-wrap: anywhere; }

.settings-loading { margin-top: 1.5rem; padding: 3rem; border: 1px solid var(--line); border-radius: 1rem; color: var(--ink-500); background: white; text-align: center; }
.active-version { min-width: 7rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 0.8rem; background: white; text-align: right; }
.active-version span, .active-version strong { display: block; }
.active-version span { color: var(--ink-500); font-size: 0.72rem; font-weight: 750; }
.active-version strong { font-size: 1.05rem; }
.settings-message { margin: 1rem 0 0; padding: 0.8rem 1rem; border: 1px solid #bad9cd; border-radius: 0.75rem; color: var(--green); background: var(--green-soft); font-weight: 650; }
.settings-layout { display: grid; gap: 1rem; margin-top: 1.5rem; }
.settings-card { padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.section-heading h2, .settings-card > h2 { margin: 0; font-size: 1.15rem; }
.section-heading p { margin: 0.2rem 0 0; color: var(--ink-500); }
.secondary-button { min-height: 2.65rem; padding: 0.5rem 0.85rem; border: 1px solid var(--line); border-radius: 0.7rem; color: var(--ink-700); background: white; font-weight: 700; white-space: nowrap; }
.secondary-button:hover { border-color: #aeb9cd; background: #f8faff; }
.upload-form { display: grid; grid-template-columns: minmax(10rem, 0.7fr) minmax(14rem, 1.5fr) auto; align-items: end; gap: 0.75rem; padding: 1rem; border-radius: 0.9rem; background: #f7f9fd; }
.upload-form label, .flow-form label, .flow-option label { min-width: 0; color: var(--ink-500); font-size: 0.78rem; font-weight: 750; }
.upload-form .control, .flow-form label > .control, .flow-option .control { display: block; margin-top: 0.35rem; color: var(--ink-900); font-weight: 500; }
.file-control { padding: 0.45rem; background: white; }
.file-control::file-selector-button { min-height: 2rem; margin-right: 0.65rem; padding: 0.3rem 0.7rem; border: 0; border-radius: 0.5rem; color: var(--blue); background: var(--blue-soft); font-weight: 750; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.65rem; margin-top: 1rem; }
.asset-card { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-width: 0; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.asset-card > div { min-width: 0; }
.asset-card span, .asset-card strong, .asset-card small { display: block; }
.asset-card > div span, .asset-card small { color: var(--ink-500); font-size: 0.72rem; }
.asset-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.asset-status { flex: 0 0 auto; padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; }
.asset-status.ready { color: var(--green); background: var(--green-soft); }
.asset-status.processing, .asset-status.uploaded { color: var(--amber); background: var(--amber-soft); }
.asset-status.failed { color: var(--red); background: var(--red-soft); }
.asset-status.retired { color: var(--ink-500); background: #edf0f5; }
.flow-form { display: grid; gap: 1.25rem; }
.flow-form fieldset { min-width: 0; margin: 0; padding: 1.1rem 0 0; border: 0; border-top: 1px solid var(--line); }
.flow-form legend { padding: 0 0.5rem 0 0; color: var(--ink-900); font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.compact-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#flow-options { display: grid; gap: 0.65rem; }
.flow-option { display: grid; grid-template-columns: 5rem minmax(10rem, 1fr) minmax(9rem, 0.8fr) minmax(12rem, 1fr) auto; align-items: end; gap: 0.65rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fafbfe; }
.remove-option { min-height: 2.8rem; padding: 0.45rem 0.7rem; border: 0; border-radius: 0.65rem; color: var(--red); background: var(--red-soft); font-size: 0.78rem; font-weight: 750; }
#add-option { margin-top: 0.75rem; }
.check-row { display: flex; align-items: center; gap: 0.55rem; min-height: 2.5rem; color: var(--ink-700) !important; }
.check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.schedule-grid { display: grid; gap: 0.45rem; margin-top: 0.8rem; }
.schedule-row { display: grid; grid-template-columns: minmax(9rem, 1fr) 8rem 8rem; align-items: center; gap: 0.65rem; }
.publish-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.publish-row p { margin: 0; color: var(--ink-500); }
.version-card { box-shadow: none; }
.management-layout { display: grid; grid-template-columns: minmax(18rem, 0.75fr) minmax(28rem, 1.5fr); align-items: start; gap: 1rem; margin-top: 1.5rem; }
.create-user-form { display: grid; gap: 0.75rem; }
.create-user-form label, .user-update-form label, .password-reset-form label { color: var(--ink-500); font-size: 0.78rem; font-weight: 750; }
.create-user-form .control, .user-update-form .control, .password-reset-form .control { display: block; margin-top: 0.3rem; color: var(--ink-900); font-weight: 500; }
.team-list { display: grid; gap: 0.75rem; }
.team-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: white; }
.team-identity { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
.team-identity strong, .team-identity span { display: block; }
.team-identity > div:nth-child(2) { min-width: 0; }
.team-identity > div:nth-child(2) strong, .team-identity > div:nth-child(2) span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-identity > div:nth-child(2) span { color: var(--ink-500); font-size: 0.78rem; }
.user-update-form { display: grid; grid-template-columns: minmax(10rem, 1fr) 9rem 9rem auto; align-items: end; gap: 0.65rem; margin-top: 0.9rem; }
.password-reset { margin-top: 0.8rem; color: var(--ink-500); font-size: 0.8rem; }
.password-reset summary { width: max-content; cursor: pointer; color: var(--blue); font-weight: 750; }
.password-reset-form { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; align-items: end; gap: 0.65rem; margin-top: 0.65rem; padding: 0.75rem; border-radius: 0.7rem; background: #f7f9fd; }
.audit-panel { margin-top: 1.5rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.audit-cards { display: none; }
.readiness-banner { display: flex; align-items: flex-start; gap: 0.85rem; margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px solid #efb7c0; border-radius: 0.9rem; color: var(--red); background: var(--red-soft); }
.readiness-banner.good { border-color: #bad9cd; color: var(--green); background: var(--green-soft); }
.readiness-banner.warning { border-color: #ead29d; color: var(--amber); background: var(--amber-soft); }
.readiness-banner .status-indicator { margin-top: 0.3rem; }
.readiness-banner strong { display: block; }
.readiness-banner p { margin: 0.2rem 0 0; color: currentColor; }
.release-blockers { display: grid; grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr); gap: 1rem; margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid rgba(180, 35, 54, 0.14); border-radius: 1rem; background: rgba(255, 247, 249, 0.9); }
.release-blockers.ready { border-color: rgba(8, 125, 103, 0.15); background: rgba(235, 249, 244, 0.92); }
.release-blockers > div > span, .release-blockers > div > strong { display: block; }
.release-blockers > div > span { color: var(--red); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.08em; }
.release-blockers.ready > div > span { color: var(--green); }
.release-blockers > div > strong { margin-top: 0.18rem; font-size: 0.92rem; }
.release-blockers ol { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.release-blockers li { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.48rem 0.6rem; border-radius: 0.65rem; background: white; font-size: 0.75rem; }
.release-blockers code { flex: 0 0 auto; color: var(--ink-500); font-size: 0.58rem; }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.status-card { display: flex; align-items: flex-start; gap: 0.75rem; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: white; box-shadow: var(--shadow); }
.status-card > div:last-child { min-width: 0; }
.status-card span, .status-card strong, .status-card small { display: block; overflow-wrap: anywhere; }
.status-card span { color: var(--ink-500); font-size: 0.75rem; font-weight: 750; }
.status-card strong { margin-top: 0.1rem; font-size: 0.95rem; }
.status-card small { margin-top: 0.25rem; color: var(--ink-500); }
.status-indicator { width: 0.7rem; height: 0.7rem; flex: 0 0 auto; border-radius: 999px; background: var(--ink-300); box-shadow: 0 0 0 4px rgba(185, 193, 209, 0.2); }
.status-indicator.good { background: var(--green); box-shadow: 0 0 0 4px rgba(13, 138, 97, 0.13); }
.status-indicator.warning { background: var(--amber); box-shadow: 0 0 0 4px rgba(154, 91, 0, 0.13); }
.status-indicator.bad { background: var(--red); box-shadow: 0 0 0 4px rgba(180, 35, 54, 0.13); }
.queue-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 1rem; }
.queue-card h2 { margin: 0; font-size: 1.1rem; }
.queue-card p { margin: 0.2rem 0 0; color: var(--ink-500); }
.queue-metrics { display: grid; grid-template-columns: repeat(4, minmax(4.5rem, 1fr)); gap: 0.7rem; }
.queue-metrics span { color: var(--ink-500); font-size: 0.72rem; text-align: center; }
.queue-metrics strong { display: block; color: var(--ink-900); font-size: 1.25rem; }
.system-timestamp { margin: 1rem 0 0; color: var(--ink-500); font-size: 0.78rem; }

.messages-heading { margin-bottom: 1.25rem; }
.messenger-shell {
  position: relative;
  min-height: min(76vh, 55rem);
  height: calc(100vh - 10.4rem);
  display: grid;
  grid-template-columns: minmax(17rem, 21rem) minmax(26rem, 1fr) minmax(18rem, 21rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(10, 49, 39, 0.12), 0 2px 8px rgba(10, 49, 39, 0.05);
}
.conversation-panel { min-width: 0; border-right: 1px solid var(--line); background: rgba(252, 254, 253, 0.96); }
.conversation-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.75rem 1rem 0; background: rgba(245, 250, 248, 0.86); }
.conversation-scope button { min-height: 2.45rem; border: 0; border-radius: 0.75rem; color: var(--ink-500); background: transparent; font-size: 0.78rem; font-weight: 800; }
.conversation-scope button.active { color: #076d59; background: white; box-shadow: 0 6px 18px rgba(11, 79, 62, 0.08); }
.conversation-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; padding: 1rem; border-bottom: 1px solid var(--line); background: rgba(245, 250, 248, 0.86); }
.conversation-search .control { border-radius: 0.9rem; background: white; }
.conversation-search .secondary-button { border-radius: 0.9rem; }
.conversation-list { max-height: calc(100% - 8rem); overflow-y: auto; }
.conversation-row { width: calc(100% - 1rem); margin: 0.35rem 0.5rem; display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); align-items: center; gap: 0.75rem; padding: 0.78rem; border: 1px solid transparent; border-radius: 1rem; color: var(--ink-900); background: transparent; text-align: left; transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease; }
.conversation-row:hover { transform: translateY(-1px); background: #f2f8f5; }
.conversation-row.selected { border-color: rgba(8, 125, 103, 0.10); background: linear-gradient(135deg, #e6f7f1, #f7fbf9); box-shadow: 0 9px 24px rgba(11, 79, 62, 0.08); }
.conversation-avatar { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: 1rem; color: #076d59; background: linear-gradient(145deg, #d4f8ec, #ebfff8); box-shadow: inset 0 0 0 1px rgba(8, 125, 103, 0.08); font-weight: 850; }
.conversation-copy { min-width: 0; }
.conversation-copy > span { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-width: 0; }
.conversation-copy strong, .conversation-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy strong { font-size: 0.9rem; }
.conversation-copy time { flex: 0 0 auto; color: var(--ink-500); font-size: 0.68rem; }
.conversation-copy small { color: var(--ink-500); font-size: 0.76rem; }
.conversation-copy b { min-width: 1.25rem; height: 1.25rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: 999px; color: white; background: var(--green); font-size: 0.68rem; }
.conversation-loading { padding: 2rem 1rem; color: var(--ink-500); text-align: center; }
.chat-panel { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: #eff3f1; }
.chat-panel:not(.has-conversation) { display: grid; place-items: center; background: #f7f9fc; }
.chat-header { min-height: 4.65rem; display: flex; align-items: center; gap: 0.75rem; padding: 0.78rem 1.15rem; border-bottom: 1px solid #d8e2de; background: rgba(251, 253, 252, 0.92); backdrop-filter: blur(18px); }
.chat-header > div { min-width: 0; }
.chat-identity { flex: 1 1 auto; }
.chat-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; margin-left: auto; }
.chat-actions > button { min-height: 2.35rem; padding: 0.4rem 0.72rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-700); background: white; font-size: 0.72rem; font-weight: 800; }
.chat-actions > button:hover { color: var(--green); border-color: rgba(8, 125, 103, 0.28); background: var(--green-soft); }
.chat-header strong, .chat-header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header strong { font-size: 0.95rem; }
.chat-header span { color: var(--ink-500); font-size: 0.75rem; }
.chat-back { display: none; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; color: var(--ink-700); background: transparent; font-size: 1.8rem; }
.chat-info { display: none; color: var(--green) !important; }
.service-window { padding: 0.5rem 1rem; border-bottom: 1px solid rgba(0, 0, 0, 0.07); font-size: 0.74rem; text-align: center; }
.service-window.open { color: #08785f; background: #e2f6ef; }
.service-window.closed { color: #8a4f00; background: #fff1d3; }
.chat-stream { min-height: 24rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.65rem; padding: 1.5rem clamp(0.85rem, 3vw, 2.6rem); background: radial-gradient(circle at 12% 18%, rgba(8, 125, 103, 0.052) 0 0.1rem, transparent 0.12rem) 0 0 / 1.6rem 1.6rem, linear-gradient(145deg, #f7f4ed, #edf3ef 72%); }
.message-bubble { position: relative; width: fit-content; max-width: min(76%, 38rem); padding: 0.68rem 0.8rem 0.48rem; border: 1px solid rgba(17, 50, 40, 0.055); border-radius: 1rem; color: #14231e; background: rgba(255, 255, 255, 0.96); box-shadow: 0 5px 18px rgba(17, 50, 40, 0.08); overflow-wrap: anywhere; }
.message-bubble.inbound { align-self: flex-start; border-top-left-radius: 0.15rem; }
.message-bubble.outbound { align-self: flex-end; border-top-right-radius: 0.2rem; background: linear-gradient(145deg, #d8f7e9, #cbf1e2); }
.message-bubble p { margin: 0; white-space: pre-wrap; }
.message-reply { position: absolute; top: 0.2rem; right: 0.25rem; width: 1.8rem; min-height: 1.8rem; padding: 0; border: 0; border-radius: 50%; color: #54656f; background: rgba(255, 255, 255, 0.88); opacity: 0; transform: translateY(-0.2rem); transition: opacity 120ms ease, transform 120ms ease; }
.message-bubble:hover .message-reply, .message-reply:focus-visible { opacity: 1; transform: translateY(0); }
@media (hover: none) { .message-reply { opacity: 1; transform: translateY(0); } }
.quoted-message { min-width: 10rem; display: grid; gap: 0.1rem; margin: 0 2rem 0.45rem 0; padding: 0.5rem 0.65rem; border-left: 3px solid #00a884; border-radius: 0.3rem; color: #54656f; background: rgba(0, 0, 0, 0.045); }
.quoted-message strong { color: #08785f; font-size: 0.72rem; }
.quoted-message span { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; }
.message-bubble footer { display: flex; justify-content: flex-end; align-items: center; gap: 0.45rem; margin-top: 0.3rem; color: #667781; font-size: 0.65rem; }
.retry-draft { min-height: 1.55rem; margin-right: auto; padding: 0 0.45rem; border: 1px solid rgba(180, 35, 54, 0.22); border-radius: 999px; color: var(--red); background: rgba(255, 255, 255, 0.72); font-size: 0.67rem; font-weight: 800; }
.message-status.failed { color: var(--red); font-weight: 750; }
.message-image, .message-video { display: block; max-width: min(100%, 27rem); max-height: 28rem; border-radius: 0.45rem; object-fit: contain; background: #dfe4e3; }
.message-image.sticker { width: min(11rem, 100%); background: transparent; }
.message-audio { width: min(22rem, 100%); display: block; }
.audio-transcript { margin-top: 0.55rem; padding: 0.65rem; border-left: 3px solid #00a884; border-radius: 0.35rem; background: rgba(255, 255, 255, 0.58); }
.audio-transcript > span { display: block; margin-bottom: 0.2rem; color: #08785f; font-size: 0.68rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; }
.audio-transcript p { font-size: 0.85rem; }
.audio-transcript details { margin-top: 0.45rem; color: var(--ink-500); font-size: 0.72rem; }
.audio-transcript summary { cursor: pointer; font-weight: 700; }
.audio-transcript details p { margin-top: 0.35rem; color: var(--ink-700); font-size: 0.78rem; }
.transcript-state { margin-top: 0.45rem; color: #08785f; font-size: 0.72rem; }
.transcript-state.failed { color: var(--red); }
.message-attachment { padding: 0.7rem; border-radius: 0.45rem; color: var(--ink-500); background: rgba(255, 255, 255, 0.55); font-size: 0.8rem; }
.document-link { min-width: min(20rem, 100%); display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem; border-radius: 0.45rem; color: inherit; background: rgba(255, 255, 255, 0.62); text-decoration: none; }
.document-link > span { font-size: 1.25rem; }
.document-link strong, .document-link small { display: block; }
.document-link small { color: var(--ink-500); }
.unsupported-message { color: var(--ink-500); font-style: italic; }
.message-compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 0.65rem; padding: 0.85rem 1rem; border-top: 1px solid #d8e2de; background: rgba(249, 252, 251, 0.95); backdrop-filter: blur(18px); }
.attach-button { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; cursor: pointer; border-radius: 50%; color: #54656f; font-size: 1.55rem; }
.attach-button:hover { color: #008069; background: #e1e7e5; }
.attach-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.attachment-chip, .reply-chip, .retry-chip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0.75rem; border-radius: 0.65rem; color: #123b33; background: #d9f3eb; }
.reply-chip { border-left: 4px solid #00a884; background: #fff; }
.retry-chip { border-left: 4px solid var(--amber); background: #fff8e9; }
.attachment-chip strong, .attachment-chip span, .reply-chip strong, .reply-chip span, .retry-chip strong, .retry-chip span { display: block; max-width: min(68vw, 38rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip span, .reply-chip span, .retry-chip span { color: #52736b; font-size: 0.72rem; }
.attachment-chip button, .reply-chip button, .retry-chip button { width: 2rem; min-height: 2rem; padding: 0; border: 0; border-radius: 50%; color: #355c53; background: transparent; font-size: 1.25rem; }
.message-compose textarea { min-height: 2.85rem; max-height: 8rem; padding: 0.72rem 1rem; resize: vertical; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: inset 0 1px 2px rgba(11, 49, 40, 0.035); }
.message-compose textarea:disabled { background: #e4e7e9; }
.message-compose button { min-height: 2.85rem; padding: 0.55rem 1.05rem; border: 0; border-radius: 1rem; color: white; background: linear-gradient(145deg, #0c9b7b, #08725f); font-weight: 800; box-shadow: 0 8px 20px rgba(8, 125, 103, 0.2); }
.message-compose button:disabled { cursor: not-allowed; opacity: 0.45; }
.conversation-details { min-width: 0; overflow-y: auto; border-left: 1px solid var(--line); background: #fbfdfc; }
.details-close { display: none; position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; color: var(--ink-700); background: #edf4f1; font-size: 1.25rem; }
.details-loading { padding: 2rem 1rem; color: var(--ink-500); text-align: center; }
.details-loading.error { color: var(--red); }
.contact-hero { display: grid; justify-items: center; padding: 2rem 1rem 1.4rem; border-bottom: 1px solid var(--line); text-align: center; }
.contact-avatar { width: 5.2rem; height: 5.2rem; display: grid; place-items: center; border-radius: 50%; color: #075f4f; background: linear-gradient(145deg, #d6f4e9, #bfe5d8); box-shadow: 0 12px 28px rgba(8, 127, 104, 0.14); font-size: 1.45rem; font-weight: 850; }
.contact-hero h2 { margin: 0.9rem 0 0.12rem; font-size: 1.1rem; letter-spacing: -0.025em; }
.contact-hero > a { color: var(--ink-500); text-decoration: none; font-size: 0.82rem; }
.contact-state { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.75rem; color: var(--green); font-size: 0.7rem; font-weight: 750; }
.contact-state i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(8, 127, 104, 0.1); }
.contact-metrics { display: grid; grid-template-columns: repeat(3, 1fr); padding: 1rem 0.75rem; border-bottom: 1px solid var(--line); }
.contact-metrics div { display: grid; justify-items: center; border-left: 1px solid var(--line); }
.contact-metrics div:first-child { border-left: 0; }
.contact-metrics strong { font-size: 1.05rem; }
.contact-metrics span { color: var(--ink-500); font-size: 0.68rem; }
.contact-section { padding: 1rem; border-bottom: 1px solid var(--line); }
.contact-section > p { margin: 0.55rem 0 0; color: var(--ink-500); font-size: 0.76rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; }
.section-heading div > span, .section-heading div > strong { display: block; }
.section-heading div > span { color: var(--ink-500); font-size: 0.63rem; font-weight: 850; letter-spacing: 0.08em; }
.section-heading div > strong { margin-top: 0.05rem; font-size: 0.9rem; }
.window-badge { padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.65rem; font-weight: 800; }
.window-badge.open { color: #076c58; background: var(--green-soft); }
.window-badge.closed { color: #8a4f00; background: var(--amber-soft); }
.calls-section { display: grid; gap: 0.7rem; }
.contact-call { padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.8rem; background: white; }
.contact-call header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.contact-call header strong, .contact-call header span { display: block; }
.contact-call header strong { font-size: 0.76rem; }
.contact-call header div > span { color: var(--ink-500); font-size: 0.68rem; }
.call-workflow { padding: 0.2rem 0.4rem; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 0.6rem !important; font-weight: 800; }
.detail-audio-link { display: inline-flex; margin-top: 0.55rem; color: var(--green); font-size: 0.72rem; font-weight: 800; text-decoration: none; }
.detail-audio-link.disabled { color: var(--ink-500); }
.call-transcript { margin-top: 0.55rem; color: var(--ink-500); font-size: 0.7rem; }
.call-transcript summary { cursor: pointer; font-weight: 750; }
.call-transcript p { margin: 0.45rem 0 0; padding: 0.55rem; border-radius: 0.55rem; color: var(--ink-700); background: #f0f6f3; font-size: 0.72rem; }
.detail-muted.compact { margin: 0.45rem 0 0; font-size: 0.7rem; }
.chat-placeholder, .chat-empty { align-self: center; justify-self: center; padding: 2rem; color: var(--ink-500); text-align: center; }
.chat-placeholder h2 { margin: 0.8rem 0 0.25rem; color: var(--ink-900); }
.chat-placeholder p { margin: 0; }
.chat-empty.error { color: var(--red); }
.message-notice { margin-bottom: 1rem; }
.queue-metrics.three { grid-template-columns: repeat(3, minmax(4.5rem, 1fr)); }

.call-event-card {
  width: min(88%, 43rem);
  align-self: flex-start;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.9rem;
  margin: 0.35rem 0;
  padding: 1rem;
  border: 1px solid rgba(91, 49, 174, 0.14);
  border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
  color: #291a47;
  background: linear-gradient(145deg, rgba(250, 247, 255, 0.98), rgba(238, 229, 255, 0.97));
  box-shadow: 0 14px 32px rgba(84, 48, 151, 0.12);
}
.call-event-card.callback {
  align-self: flex-end;
  border-color: rgba(49, 86, 217, 0.16);
  border-radius: 1.25rem 1.25rem 0.35rem 1.25rem;
  color: #15255f;
  background: linear-gradient(145deg, rgba(247, 249, 255, 0.98), rgba(226, 233, 255, 0.97));
  box-shadow: 0 14px 32px rgba(49, 86, 217, 0.12);
}
.call-event-icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; color: white; background: linear-gradient(145deg, #8b57dd, #6033ad); box-shadow: 0 9px 20px rgba(93, 51, 170, 0.22); font-size: 1.35rem; font-weight: 900; }
.call-event-card.callback .call-event-icon { background: linear-gradient(145deg, #5275ee, #2946b4); box-shadow: 0 9px 20px rgba(49, 86, 217, 0.24); }
.call-event-content { min-width: 0; }
.call-event-content > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.call-event-content > header span { display: block; color: #7950b2; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em; }
.call-event-card.callback .call-event-content > header span { color: #4965c9; }
.call-event-content h3 { margin: 0.08rem 0 0; font-size: 1rem; letter-spacing: -0.02em; }
.call-event-content time { flex: 0 0 auto; color: rgba(41, 26, 71, 0.58); font-size: 0.68rem; }
.call-event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-top: 0.55rem; color: rgba(41, 26, 71, 0.68); font-size: 0.72rem; }
.recording-quality { width: fit-content; display: inline-flex; margin-top: 0.45rem; padding: 0.22rem 0.48rem; border-radius: 999px; color: #076d59; background: #ddf6ed; font-size: 0.66rem; font-weight: 850; }
.recording-quality.acceptable { color: #8a5800; background: #fff0cc; }
.recording-quality.degraded { color: #a52b3f; background: #ffe1e7; }
.call-outcome { display: inline-flex; align-items: center; gap: 0.38rem; padding: 0.22rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.62); font-weight: 780; }
.call-outcome i { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: #8b57dd; box-shadow: 0 0 0 3px rgba(139, 87, 221, 0.11); }
.call-outcome.reached i { background: #0c9b73; box-shadow: 0 0 0 3px rgba(12, 155, 115, 0.12); }
.call-outcome.missed i { background: #c84b5e; box-shadow: 0 0 0 3px rgba(200, 75, 94, 0.11); }
.call-recording-audio { width: min(100%, 28rem); display: block; margin-top: 0.75rem; }
.call-audio-demo { display: grid; grid-template-columns: 2.2rem minmax(5rem, 1fr) auto; align-items: center; gap: 0.65rem; margin-top: 0.75rem; padding: 0.6rem 0.7rem; border-radius: 0.85rem; background: rgba(255, 255, 255, 0.64); }
.call-audio-demo button { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: #7544c3; }
.call-audio-demo > span { height: 1.5rem; display: flex; align-items: center; gap: 0.18rem; overflow: hidden; }
.call-audio-demo i { width: 0.18rem; height: 36%; border-radius: 999px; background: #9b78cf; }
.call-audio-demo i:nth-child(2n) { height: 72%; }
.call-audio-demo i:nth-child(3n) { height: 100%; }
.call-audio-demo small { color: #684d91; font-size: 0.68rem; }
.call-event-transcript { margin-top: 0.7rem; padding: 0.72rem 0.8rem; border: 1px solid rgba(111, 71, 178, 0.11); border-radius: 0.85rem; background: rgba(255, 255, 255, 0.62); }
.call-event-transcript > span { display: block; margin-bottom: 0.22rem; color: #7650ae; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.call-event-transcript p { margin: 0; color: #352552; font-size: 0.84rem; line-height: 1.55; }
.call-event-card.callback .call-event-transcript { border-color: rgba(49, 86, 217, 0.12); }
.call-event-card.callback .call-event-transcript > span { color: #4965c9; }

@media (max-width: 680px) {
  .call-event-card { width: 96%; grid-template-columns: 2.55rem minmax(0, 1fr); padding: 0.85rem; }
  .call-event-icon { width: 2.55rem; height: 2.55rem; border-radius: 0.85rem; }
  .call-event-content > header { display: block; }
  .call-event-content time { display: block; margin-top: 0.2rem; }
}

@media (max-width: 1280px) {
  .messenger-shell { grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr); }
  .chat-info { display: inline-flex; align-items: center; }
  .conversation-details { display: none; position: absolute; z-index: 8; inset: 0 0 0 auto; width: min(23rem, 92%); box-shadow: -18px 0 44px rgba(18, 55, 44, 0.16); }
  .messenger-shell.details-open::after { content: ""; position: absolute; z-index: 7; inset: 0; background: rgba(10, 35, 28, 0.28); backdrop-filter: blur(2px); }
  .messenger-shell.details-open .conversation-details { display: block; }
  .details-close { display: grid; place-items: center; }
}

@media (max-width: 900px) {
  .app-shell { display: block; padding-bottom: 5rem; }
  .sidebar { display: none; }
  .main { padding: 1.25rem 1rem; }
  .page-header { align-items: flex-start; }
  .page-meta { margin-top: 0.45rem; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
  .stat { padding: 0.9rem; }
  .stat strong { font-size: 1.45rem; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar .search { grid-column: 1 / -1; }
  .call-table { display: none; }
  .mobile-cards { display: grid; gap: 0; }
  .call-card { padding: 1rem; border-top: 1px solid #edf0f5; background: white; }
  .call-card:first-child { border-top: 0; }
  .call-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
  .call-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 1rem; }
  .call-card-grid > div { min-width: 0; }
  .mobile-nav {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 0.45rem max(0.45rem, env(safe-area-inset-right)) calc(0.45rem + env(safe-area-inset-bottom)) max(0.45rem, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
  }
  .mobile-nav button { min-height: 3.4rem; display: grid; justify-items: center; align-content: center; gap: 0.15rem; border: 0; color: var(--ink-500); background: transparent; font-size: 0.7rem; font-weight: 700; }
  .mobile-nav button.active { color: var(--blue); }
  .mobile-nav svg { width: 1.2rem; height: 1.2rem; }
  .upload-form { grid-template-columns: 1fr 1fr; }
  .upload-form .primary-button { width: 100%; }
  .form-grid, .compact-grid { grid-template-columns: 1fr 1fr; }
  .flow-option { grid-template-columns: 5rem 1fr; }
  .flow-option label:nth-child(2), .flow-option label:nth-child(4) { grid-column: span 1; }
  .management-layout { grid-template-columns: 1fr; }
  .user-update-form { grid-template-columns: 1fr 1fr; }
  .user-update-form label:first-child { grid-column: 1 / -1; }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-card { align-items: flex-start; flex-direction: column; }
  .queue-metrics { width: 100%; }
  .messenger-shell { min-height: calc(100vh - 12rem); grid-template-columns: 1fr; }
  .conversation-panel { border-right: 0; }
  .chat-panel { display: none; }
  .messenger-shell.mobile-chat-open .conversation-panel { display: none; }
  .messenger-shell.mobile-chat-open .chat-panel { display: grid; min-height: calc(100vh - 12rem); }
  .messenger-shell.details-open .conversation-details { min-height: calc(100vh - 12rem); }
  .chat-back { display: grid; place-items: center; }
  .conversation-list { max-height: calc(100vh - 17rem); }
  .chat-actions { gap: 0.25rem; }
  .chat-actions > button { padding-inline: 0.55rem; font-size: 0.66rem; }
  .chat-stream { min-height: 0; }
}

@media (max-width: 560px) {
  .page-header { display: block; }
  .page-header h1 { font-size: 2.25rem; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; justify-content: space-between; align-items: center; }
  .stat strong { margin: 0; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar .search { grid-column: auto; }
  .call-drawer { width: 100%; }
  .detail-summary, .work-form { grid-template-columns: 1fr; }
  .work-form .primary-button { grid-column: auto; width: 100%; }
  .upload-form, .form-grid, .compact-grid, .flow-option { grid-template-columns: 1fr; }
  .flow-option label:nth-child(2), .flow-option label:nth-child(4) { grid-column: auto; }
  .schedule-row { grid-template-columns: 1fr 1fr; }
  .schedule-row .check-row { grid-column: 1 / -1; }
  .publish-row { display: grid; }
  .publish-row .primary-button { width: 100%; }
  .user-update-form, .password-reset-form { grid-template-columns: 1fr; }
  .user-update-form label:first-child { grid-column: auto; }
  .user-update-form .secondary-button, .password-reset-form .secondary-button { width: 100%; }
  .audit-panel .call-table { display: none; }
  .audit-cards { display: grid; }
  .audit-cards article { display: grid; gap: 0.2rem; padding: 1rem; border-top: 1px solid var(--line); }
  .audit-cards article:first-child { border-top: 0; }
  .audit-cards span, .audit-cards small { color: var(--ink-500); }
  .audit-cards span { font-size: 0.8rem; }
  .audit-cards small { font-size: 0.72rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  .status-grid { grid-template-columns: 1fr; }
  .release-blockers { grid-template-columns: 1fr; }
  .release-blockers li { display: grid; }
  .queue-metrics { grid-template-columns: 1fr 1fr; }
  .message-bubble { max-width: 88%; }
  .mobile-nav button { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 2026 communication workspace — compact, conversation-first desktop UI */
@media (min-width: 901px) {
  .app-shell { grid-template-columns: 4.75rem minmax(0, 1fr); }
  .sidebar {
    z-index: 30;
    align-items: center;
    padding: 0.9rem 0.65rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: #111b21;
    box-shadow: none;
  }
  .sidebar-brand { justify-content: center; padding: 0 0 1.2rem; }
  .sidebar-brand .brand-mark { width: 2.8rem; height: 2.8rem; border-radius: 50%; }
  .sidebar-brand .brand-mark svg { width: 2.25rem; height: 2.25rem; }
  .sidebar-brand strong, .nav-label, .nav-item > span, .user-copy, .nav-soon { display: none; }
  .nav { width: 100%; gap: 0.45rem; }
  .nav-item {
    width: 3.25rem;
    min-height: 3.25rem;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    border-radius: 0.9rem;
    color: #aebac1;
  }
  .nav-item svg { width: 1.35rem; height: 1.35rem; }
  .nav-item:hover { color: #e9edef; background: #202c33; }
  .nav-item.active { color: #00a884; background: #202c33; box-shadow: none; }
  .sidebar-footer { width: 100%; display: grid; justify-items: center; padding: 0.9rem 0 0; border-color: #28363e; }
  .user-block { display: grid; justify-items: center; gap: 0.55rem; }
  .avatar { width: 2.65rem; height: 2.65rem; color: #d9fdd3; background: #364750; }
  .icon-button { width: 2.65rem; height: 2.65rem; border-radius: 50%; color: #aebac1; }
  .icon-button:hover { background: #202c33; }

  .messages-mode .main { height: 100vh; padding: 0; overflow: hidden; background: #e9edef; }
  .messages-mode .content { width: 100%; height: 100%; max-width: none; margin: 0; }
}

.messenger-shell {
  height: 100vh;
  min-height: 42rem;
  grid-template-columns: minmax(20rem, 23.5rem) minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.conversation-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid #e9edef;
  background: #fff;
}

.conversation-toolbar {
  min-height: 4.7rem;
  display: flex;
  align-items: center;
  padding: 0.9rem 1.25rem 0.55rem;
  background: #fff;
}
.conversation-toolbar > div { width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.conversation-toolbar h1 { margin: 0; color: #111b21; font-size: 1.55rem; line-height: 1.15; letter-spacing: -0.035em; }
.conversation-toolbar span { display: flex; align-items: center; gap: 0.4rem; color: #667781; font-size: 0.72rem; }
.conversation-toolbar b { font-weight: 600; }
.conversation-toolbar .connection-dot { width: 0.42rem; height: 0.42rem; box-shadow: none; }

.conversation-search {
  min-height: auto;
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  gap: 0;
  margin: 0 0.75rem 0.65rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.55rem;
  background: #f0f2f5;
}
.conversation-search button { display: grid; place-items: center; padding: 0; border: 0; color: #667781; background: transparent; }
.conversation-search button svg { width: 1.05rem; height: 1.05rem; }
.conversation-search input { width: 100%; min-height: 2.35rem; padding: 0.55rem 0.75rem 0.55rem 0; border: 0; outline: 0; color: #111b21; background: transparent; font-size: 0.82rem; }
.conversation-search input::placeholder { color: #667781; }

.conversation-scope {
  display: flex;
  grid-template-columns: none;
  gap: 0.45rem;
  padding: 0 0.75rem 0.65rem;
  border-bottom: 1px solid #e9edef;
  background: #fff;
}
.conversation-scope button { min-height: 1.95rem; padding: 0.25rem 0.72rem; border-radius: 999px; color: #54656f; background: #f0f2f5; font-size: 0.72rem; font-weight: 650; }
.conversation-scope button.active { color: #008069; background: #e7fce9; box-shadow: none; }
.conversation-list { max-height: none; flex: 1 1 auto; overflow-y: auto; scrollbar-width: thin; }
.conversation-row {
  width: 100%;
  min-height: 4.65rem;
  margin: 0;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-radius: 0;
  color: #111b21;
  background: #fff;
  transition: background 110ms ease;
}
.conversation-row:hover { transform: none; background: #f5f6f6; }
.conversation-row.selected { border-color: transparent; background: #f0f2f5; box-shadow: none; }
.conversation-avatar { width: 3rem; height: 3rem; border-radius: 50%; color: #08785f; background: #d9fdd3; box-shadow: none; font-weight: 750; }
.conversation-copy { padding: 0.22rem 0; border-bottom: 1px solid #f0f2f5; }
.conversation-row:last-child .conversation-copy { border-bottom: 0; }
.conversation-copy strong { color: #111b21; font-size: 0.9rem; font-weight: 600; }
.conversation-copy time { color: #667781; font-size: 0.67rem; }
.conversation-copy small { color: #667781; font-size: 0.76rem; }
.conversation-copy b { min-width: 1.15rem; height: 1.15rem; background: #25d366; font-size: 0.62rem; }

.chat-panel { height: 100vh; grid-template-rows: 4.7rem auto minmax(0, 1fr) auto; background: #efeae2; }
.chat-panel:not(.has-conversation) { background: #f7f9fa; border-bottom: 6px solid #25d366; }
.chat-header { min-height: 4.7rem; padding: 0.65rem 1rem; border-color: #dfe3e5; background: #f0f2f5; backdrop-filter: none; }
.chat-header .conversation-avatar { width: 2.85rem; height: 2.85rem; }
.chat-header strong { color: #111b21; font-size: 0.92rem; font-weight: 600; }
.chat-header span { color: #667781; font-size: 0.73rem; }
.chat-actions { gap: 0.25rem; }
.chat-actions > button {
  width: 2.65rem;
  height: 2.65rem;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #54656f;
  background: transparent;
}
.chat-actions > button:hover { color: #111b21; border-color: transparent; background: #dfe3e5; }
.chat-actions svg { width: 1.2rem; height: 1.2rem; }
.chat-info { display: grid; color: #54656f !important; }

.service-window { padding: 0.38rem 1rem; border-color: rgba(17, 27, 33, 0.06); font-size: 0.69rem; }
.service-window.open { color: #54656f; background: #e8f8f3; }
.service-window.closed { color: #805300; background: #fff4d5; }
.chat-stream {
  min-height: 0;
  gap: 0.28rem;
  padding: 1.25rem clamp(1rem, 5vw, 5rem);
  background-color: #efeae2;
  background-image: radial-gradient(rgba(84, 101, 111, 0.075) 0.75px, transparent 0.75px);
  background-size: 1.1rem 1.1rem;
}
.message-bubble { max-width: min(68%, 39rem); padding: 0.45rem 0.55rem 0.3rem; border: 0; border-radius: 0.5rem; color: #111b21; background: #fff; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13); font-size: 0.87rem; }
.message-bubble.inbound { border-top-left-radius: 0; }
.message-bubble.outbound { border-top-right-radius: 0; background: #d9fdd3; }
.message-bubble footer { margin-top: 0.18rem; color: #667781; font-size: 0.61rem; }
.message-image, .message-video { border-radius: 0.35rem; }
.audio-transcript { border-radius: 0.3rem; background: rgba(255, 255, 255, 0.52); }

.message-compose { gap: 0.45rem; padding: 0.62rem 0.85rem; border-color: #dfe3e5; background: #f0f2f5; backdrop-filter: none; }
.attach-button { width: 2.75rem; height: 2.75rem; color: #54656f; font-size: inherit; }
.attach-button svg { width: 1.35rem; height: 1.35rem; }
.attach-button:hover { color: #111b21; background: #dfe3e5; }
.message-compose textarea { min-height: 2.75rem; max-height: 7.5rem; padding: 0.7rem 1rem; resize: none; border: 0; border-radius: 0.6rem; background: #fff; box-shadow: none; }
.message-compose textarea:focus { outline: 0; }
.message-compose button.compose-send { width: 2.75rem; height: 2.75rem; min-height: 0; display: grid; place-items: center; padding: 0; border-radius: 50%; background: #00a884; box-shadow: none; }
.message-compose button.compose-send:hover { background: #008f72; }
.message-compose button.compose-send svg { width: 1.25rem; height: 1.25rem; }

.chat-placeholder { max-width: 27rem; padding: 2rem; }
.chat-placeholder .brand-mark { width: 4.5rem; height: 4.5rem; margin: 0 auto 1.35rem; border-radius: 50%; box-shadow: none; }
.chat-placeholder .brand-mark svg { width: 3.65rem; height: 3.65rem; }
.chat-placeholder h2 { color: #41525d; font-size: 1.55rem; font-weight: 350; letter-spacing: -0.025em; }
.chat-placeholder p { color: #667781; font-size: 0.86rem; }
.chat-placeholder > span { display: block; margin-top: 1.5rem; color: #8696a0; font-size: 0.72rem; }

.conversation-details {
  display: none;
  position: absolute;
  z-index: 9;
  inset: 0 0 0 auto;
  width: min(27rem, 92%);
  height: 100%;
  border-left: 1px solid #dfe3e5;
  background: #fff;
  box-shadow: -12px 0 36px rgba(11, 20, 26, 0.16);
}
.messenger-shell.details-open::after { content: ""; position: absolute; z-index: 8; inset: 0; background: rgba(11, 20, 26, 0.36); }
.messenger-shell.details-open .conversation-details { display: block; }
.details-close { display: grid; place-items: center; top: 0.9rem; right: 0.9rem; color: #54656f; background: #f0f2f5; }
.contact-avatar { border-radius: 50%; color: #08785f; background: #d9fdd3; box-shadow: none; }
.message-notice { position: fixed; z-index: 40; top: 1rem; left: 50%; max-width: min(34rem, calc(100vw - 2rem)); margin: 0; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(11, 20, 26, 0.18); }

.call-event-card, .call-event-card.callback { width: min(78%, 39rem); gap: 0.7rem; margin: 0.2rem 0; padding: 0.72rem; border: 0; border-radius: 0.65rem; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.13); }
.call-event-icon { width: 2.55rem; height: 2.55rem; border-radius: 50%; box-shadow: none; font-size: 1rem; }
.call-event-card.callback .call-event-icon { box-shadow: none; }
.call-event-content h3 { font-size: 0.91rem; }
.call-event-transcript { border-radius: 0.45rem; }

@media (max-width: 1100px) and (min-width: 901px) {
  .messenger-shell { grid-template-columns: minmax(18rem, 20.5rem) minmax(0, 1fr); }
  .chat-stream { padding-inline: 1.4rem; }
}

@media (max-width: 900px) {
  .app-shell.messages-mode { min-height: 100vh; padding-bottom: 0; }
  .messages-mode .main { min-height: 100vh; padding: 0; }
  .messages-mode .content { width: 100%; height: 100vh; }
  .messages-mode .mobile-nav { display: none; }
  .messages-mode .messenger-shell { height: 100vh; min-height: 100vh; border-radius: 0; }
  .messages-mode .conversation-list { max-height: none; }
  .messages-mode .chat-panel, .messages-mode .messenger-shell.mobile-chat-open .chat-panel { min-height: 100vh; height: 100vh; }
  .messages-mode .conversation-details { min-height: 100vh; }
  .conversation-toolbar { min-height: 4.25rem; }
  .conversation-row { min-height: 4.4rem; }
  .chat-stream { padding-inline: 0.75rem; }
  .message-bubble { max-width: 88%; }
}

/* WhatsApp-grade messaging interactions */
.message-bubble {
  isolation: isolate;
  padding-right: 1.95rem;
  outline: 0;
}
.message-bubble::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  width: 0.65rem;
  height: 0.75rem;
  background: inherit;
}
.message-bubble.inbound::before {
  left: -0.45rem;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.message-bubble.outbound::before {
  right: -0.45rem;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.message-bubble:focus-visible,
.message-bubble.menu-open {
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.25), 0 1px 1px rgba(11, 20, 26, 0.13);
}
.message-menu-trigger {
  position: absolute;
  z-index: 3;
  top: 0.12rem;
  right: 0.18rem;
  width: 1.75rem;
  height: 1.75rem;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #54656f;
  background: color-mix(in srgb, var(--bubble-menu-bg, #fff) 92%, transparent);
  box-shadow: -0.55rem 0 0.7rem var(--bubble-menu-bg, #fff);
  opacity: 0;
  transform: translateY(-0.15rem);
  transition: opacity 110ms ease, transform 110ms ease, background 110ms ease;
}
.message-bubble.outbound { --bubble-menu-bg: #d9fdd3; }
.message-bubble:hover .message-menu-trigger,
.message-bubble:focus-within .message-menu-trigger,
.message-bubble.menu-open .message-menu-trigger {
  opacity: 1;
  transform: translateY(0);
}
.message-menu-trigger:hover { background: rgba(255, 255, 255, 0.8); }
.message-menu-trigger svg { width: 1.1rem; height: 1.1rem; }
.message-action-menu {
  position: fixed;
  z-index: 120;
  min-width: 13.25rem;
  overflow: hidden;
  padding: 0.42rem 0;
  border: 1px solid rgba(11, 20, 26, 0.08);
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 6px 24px rgba(11, 20, 26, 0.22);
  animation: message-menu-in 110ms ease-out;
}
.message-action-menu button {
  width: 100%;
  min-height: 2.75rem;
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border: 0;
  color: #111b21;
  background: transparent;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 450;
}
.message-action-menu button:hover,
.message-action-menu button:focus-visible { outline: 0; background: #f0f2f5; }
.message-action-menu svg { width: 1.15rem; height: 1.15rem; color: #54656f; }
.message-star { width: 0.82rem; height: 0.82rem; display: inline-grid; color: #8696a0; }
.message-star svg { width: 100%; height: 100%; }
.message-status { min-width: 1.05rem; display: inline-grid; place-items: center; color: #667781; line-height: 1; }
.message-status svg { width: 1.05rem; height: 0.75rem; }
.message-status.read { color: #53bdeb; }
.message-status.queued { font-size: 0.74rem; }
.message-status.failed { width: 1rem; height: 1rem; border: 1px solid currentColor; border-radius: 50%; font-size: 0.62rem; }
@keyframes message-menu-in { from { opacity: 0; transform: translateY(-0.2rem) scale(0.98); } }

.message-compose {
  position: relative;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: end;
}
.message-compose .compose-icon-button {
  width: 2.75rem;
  height: 2.75rem;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #54656f;
  background: transparent;
  box-shadow: none;
}
.message-compose .compose-icon-button:hover { color: #111b21; background: #dfe3e5; }
.message-compose .compose-icon-button svg { width: 1.35rem; height: 1.35rem; }
.emoji-popover {
  position: absolute;
  z-index: 15;
  bottom: 4.15rem;
  left: 0.75rem;
  width: 15.25rem;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.2rem;
  padding: 0.55rem;
  border: 1px solid rgba(11, 20, 26, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.2);
}
.emoji-popover.open { display: grid; }
.message-compose .emoji-popover button {
  width: 2.1rem;
  height: 2.1rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: 1.18rem;
}
.message-compose .emoji-popover button:hover,
.message-compose .emoji-popover button:focus-visible { outline: 0; background: #f0f2f5; }
.message-compose textarea { overflow-y: hidden; line-height: 1.38; }
.message-compose button.compose-send:disabled { color: #8696a0; background: #dfe3e5; opacity: 1; }
.compose-hint {
  position: absolute;
  right: 0.9rem;
  bottom: 4rem;
  padding: 0.33rem 0.55rem;
  border-radius: 0.35rem;
  color: #fff;
  background: rgba(17, 27, 33, 0.86);
  box-shadow: 0 4px 14px rgba(11, 20, 26, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.2rem);
  transition: opacity 120ms ease, transform 120ms ease;
  font-size: 0.66rem;
  white-space: nowrap;
}
.message-compose:focus-within .compose-hint { opacity: 1; transform: translateY(0); }
.ux-toast {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: 5.4rem;
  padding: 0.62rem 0.9rem;
  border-radius: 0.45rem;
  color: #fff;
  background: rgba(17, 27, 33, 0.9);
  box-shadow: 0 6px 20px rgba(11, 20, 26, 0.2);
  transform: translateX(-50%);
  font-size: 0.78rem;
}

/* Workspace v2: consistent sizing, identities, menus and accessible dialogs. */
:root { --workspace-accent: #008069; --workspace-text: #172d2a; }
.workspace-icon {
  width: 2.5rem; height: 2.5rem; min-height: 0; flex: 0 0 auto;
  display: inline-grid; place-items: center; padding: .6rem;
  border: 0; border-radius: 50%; background: transparent; color: #60716d;
}
.workspace-icon svg { width: 1.25rem; height: 1.25rem; }
.workspace-icon:hover { color: #065d4d; background: #e4eeea; }
.workspace-icon:disabled { opacity: .4; cursor: default; }
.workspace-icon:focus-visible, .contact-heading:focus-visible { outline: 2px solid #008069; outline-offset: -2px; }
.workspace-subtitle { display: block !important; margin-top: .35rem; font-size: .72rem !important; font-weight: 400; letter-spacing: 0; color: #71817c !important; }
.conversation-toolbar { min-height: 5.15rem; padding: 1.1rem 1.1rem .85rem; }
.conversation-toolbar > div { align-items: center; }
.conversation-toolbar h1 { font-size: 1.5rem; letter-spacing: -.04em; }
.conversation-search { border-radius: .65rem; margin: 0 1rem .75rem; background: #f3f6f4; }
.conversation-search input { font-size: .83rem; min-height: 2.6rem; }
.conversation-search:focus-within { box-shadow: 0 0 0 2px #00806933; }
.conversation-scope { padding: 0 1rem .85rem; gap: .35rem; flex-wrap: wrap; }
.conversation-scope button { border: 1px solid transparent; font-weight: 500; font-size: .74rem; }
.conversation-scope button.active { color: #006b55; background: #ddf4e9; border-color: #c7e8d8; }
.conversation-row-wrap { position: relative; }
.conversation-row-wrap.active { background: #e9f2ee; }
.conversation-row { min-height: 5.15rem; padding: .7rem 1rem; gap: .85rem; }
.conversation-row.selected { background: #e9f2ee; }
.conversation-copy { border-bottom: 0; }
.conversation-row-wrap:not(:last-child)::after { content: ""; position: absolute; left: 4.85rem; right: 1rem; bottom: 0; height: 1px; background: #edf1ee; pointer-events: none; }
.conversation-copy strong { font-size: .91rem; font-weight: 600; }
.conversation-copy small { font-size: .8rem; }
.conversation-copy em { color: #008069; font-style: normal; }
.conversation-copy > span { gap: .4rem; }
.row-badges { display: flex !important; justify-content: flex-end; gap: .3rem !important; align-items: center; }
.row-badges i { display: inline-flex; width: .85rem; height: .85rem; color: #6a8277; }
.row-badges svg { width: 100%; height: 100%; }
.row-badges b { color: #fff; background: #008069; }
.conversation-menu-trigger { position: absolute; right: .55rem; bottom: .5rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; padding: .15rem; border: 0; border-radius: 50%; color: #536c61; background: #e4eee8; opacity: 0; }
.conversation-menu-trigger svg { width: 1rem; height: 1rem; }
.conversation-row-wrap:hover .conversation-menu-trigger, .conversation-row-wrap:focus-within .conversation-menu-trigger { opacity: 1; }
.conversation-row-wrap:hover .row-badges { margin-right: 1.2rem; }
.workspace-connection { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem; border-top: 1px solid #edf1ee; color: #70827a; background: #fbfcfb; font-size: .7rem; }
.workspace-connection .connection-dot { width: .4rem; height: .4rem; box-shadow: none; }
.conversation-empty { padding: 3rem 1.5rem; display: grid; justify-items: center; gap: .55rem; text-align: center; color: #718179; font-size: .82rem; }
.conversation-empty > svg { width: 2rem; height: 2rem; color: #9db9ac; margin-bottom: .5rem; }
.conversation-empty strong { color: #355247; font-weight: 600; }
.folder-caption { padding: .65rem 1rem; color: #65756e; font-size: .75rem; background: #f6f8f7; }
.conversation-avatar, .chat-header .conversation-avatar {
  width: 3rem; height: 3rem; min-width: 3rem; min-height: 3rem;
  display: grid; place-items: center; flex: 0 0 3rem;
  overflow: hidden; border-radius: 50%; line-height: 1; font-size: 1rem; font-weight: 650;
  text-overflow: clip; white-space: nowrap; color: #2d6453; background: #dceee4;
}
.conversation-avatar svg { width: 1.6rem; height: 1.6rem; }
.avatar-tone-1, .chat-header .avatar-tone-1 { background: #e5e6f6; color: #69618f; }
.avatar-tone-2, .chat-header .avatar-tone-2 { background: #e1eef2; color: #496d7c; }
.avatar-tone-3, .chat-header .avatar-tone-3 { background: #f5e8d8; color: #8e704e; }
.avatar-tone-4, .chat-header .avatar-tone-4 { background: #f4e2e6; color: #8d5f6a; }
.avatar-tone-5, .chat-header .avatar-tone-5 { background: #e6edd5; color: #627b43; }
.contact-heading { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; border-radius: .75rem; }
.contact-heading .chat-identity { display: block; min-width: 0; flex: 1; overflow: hidden; }
.chat-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; font-size: .95rem; color: #213c31; }
.chat-identity > span { display: block; margin-top: .12rem; font-size: .75rem; color: #73847b; }
.chat-header { display: flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; background: #f8faf9; min-width: 0; }
.chat-actions { margin-left: auto; flex: 0 0 auto; }
.chat-utility { min-width: 0; background: #f4f7f4; }
.chat-panel { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.service-window { padding: .35rem 1.25rem; font-size: .7rem; }
.service-window.open { color: #3d6b58; background: #edf7ef; }
.service-window span { display: inline; color: #708578; }
.in-chat-search { display: flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-bottom: 1px solid #e4ebe5; background: #fff; }
.in-chat-search > svg { width: 1.1rem; height: 1.1rem; color: #678375; }
.in-chat-search input { min-width: 0; flex: 1; padding: .5rem; border: 0; background: transparent; outline: 0; font-size: .85rem; }
.pinned-strip { display: flex; align-items: center; gap: .6rem; min-width: 0; padding: .55rem 1.25rem; background: #f7faf7; border-bottom: 1px solid #e0e9e2; color: #507b62; font-size: .75rem; }
.pinned-strip > svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.pinned-strip > button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 0; border: 0; color: inherit; background: none; }
.pinned-strip > span { flex: 0 0 auto; }
.chat-stream { padding: 1.25rem clamp(1.4rem, 6vw, 6rem) 1.5rem; background-color: #f1f0e9; background-image: radial-gradient(#95ab9820 .7px, transparent .7px); background-size: 20px 20px; }
.chat-date { align-self: center; margin: .8rem auto 1rem; text-align: center; width: 100%; }
.chat-date span { display: inline-block; padding: .3rem .7rem; border-radius: .5rem; color: #6c7971; background: #fff9; font-size: .69rem; box-shadow: 0 1px 2px #233c2110; }
.message-bubble { font-size: .9rem; line-height: 1.55; margin-bottom: .25rem; padding: .55rem 1.9rem .35rem .65rem; max-width: min(76%, 40rem); border-radius: .7rem; }
.message-bubble p { overflow-wrap: anywhere; }
.message-bubble.outbound { --bubble-menu-bg: #dbf4d5; background: #dbf4d5; }
.message-bubble footer { line-height: 1.2; font-size: .65rem; gap: .35rem; }
.message-bubble .quoted-message { display: block; width: 100%; border: 0; border-left: 3px solid #00a884; border-radius: .3rem; padding: .5rem .65rem; margin: 0 0 .4rem; text-align: left; color: #436456; background: #7fa68518; }
.quoted-message span, .quoted-message strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-private-note { padding: .5rem .65rem; margin-top: .55rem; border: 1px dashed #b2c7b7; border-radius: .5rem; font-size: .78rem; color: #59715f; }
.message-private-note summary { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.message-private-note svg { width: .95rem; height: .95rem; }
.message-select { position: absolute; left: -1.85rem; top: .6rem; width: 1rem; height: 1rem; accent-color: #008069; }
.message-selected, .message-highlight { box-shadow: 0 0 0 3px #00806960; }
.selection-toolbar { display: flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-bottom: 1px solid #dfe8e2; background: #edf5ef; }
.selection-toolbar strong { flex: 1; font-size: .82rem; font-weight: 550; }
.load-older { align-self: center; margin: .25rem auto; padding: .45rem .85rem; border: 1px solid #dae5dc; border-radius: 99px; background: #fffc; color: #517760; font-size: .74rem; }
.message-image { min-height: 5rem; object-fit: cover; }
.media-error { display: block; max-width: 16rem; padding: 1rem; color: #65776b; background: #e6ece4; font-size: .8rem; }
.document-link { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .6rem; background: #ffffff60; border-radius: .45rem; text-decoration: none; color: #375947; }
.document-link > span { display: grid; place-items: center; width: 2.25rem; height: 2.7rem; flex: 0 0 auto; border-radius: .3rem; color: #58806a; background: #f9fcf8; }
.document-link > span svg { width: 1.4rem; height: 1.4rem; }
.document-link > div { min-width: 0; }
.document-link strong { display: block; font-size: .85rem; overflow-wrap: anywhere; }
.document-link small { font-size: .7rem; color: #728577; }
.document-link > svg { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin-left: .4rem; }
.message-compose { padding: .75rem 1.1rem .4rem; background: #f8faf9; border-top: 1px solid #e1e8e2; }
.message-compose textarea { background: #fff; border: 1px solid #e2e9e3; border-radius: 1.25rem; font-size: .9rem; }
.message-compose textarea:focus { box-shadow: 0 0 0 2px #00806914; }
.message-compose .compose-send { background: #008069; }
.compose-hint { font-size: .62rem; color: #8a9b90; }
.compose-notice { display: flex; align-items: center; grid-column: 1/-1; gap: .5rem; color: #856128; background: #fff2d8; border-radius: .6rem; padding: .35rem .65rem; font-size: .78rem; }
.compose-notice .workspace-icon { margin-left: auto; width: 1.75rem; height: 1.75rem; padding: .25rem; }
.reply-chip > button svg, .attachment-chip > button svg { width: 1rem; height: 1rem; }
.sending-spinner { width: 1.2rem; height: 1.2rem; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: sending-turn .8s linear infinite; }
@keyframes sending-turn { to { transform: rotate(360deg); } }
.message-action-menu { width: 15.5rem; min-width: 0; max-height: calc(100dvh - 16px); overflow-y: auto; border-radius: .8rem; padding: .35rem; border: 1px solid #e1e8e3; box-shadow: 0 12px 40px #122f2526, 0 2px 8px #122f2512; }
.message-action-menu button { min-height: 2.5rem; padding: .6rem .65rem; gap: .5rem; border-radius: .4rem; font-size: .82rem; font-weight: 450; }
.message-action-menu button:hover, .message-action-menu button:focus-visible { background: #eaf3ed; }
.message-action-menu button svg { width: 1.1rem; height: 1.1rem; color: #688074; }
.menu-heading { padding: .5rem .75rem .4rem; color: #8a9b91; font-size: .65rem; font-weight: 600; letter-spacing: .02em; }
.message-action-menu .danger, .message-action-menu .danger svg, .workspace-icon.danger { color: #b34349; }
.menu-separated { margin-top: .25rem; border-top: 1px solid #edf0ed !important; border-radius: 0 0 .4rem .4rem !important; }
.workspace-dialog { width: min(30rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 0; border: 1px solid #dbe7dd; border-radius: 1.1rem; color: #264337; background: #fff; box-shadow: 0 24px 80px #122c2940; }
.workspace-dialog::backdrop { background: #102b2855; backdrop-filter: blur(3px); }
.workspace-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.1rem .85rem 1.5rem; border-bottom: 1px solid #eaf0ea; }
.workspace-dialog h2 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.workspace-dialog-body { padding: 1.25rem 1.5rem; font-size: .86rem; line-height: 1.65; overflow-wrap: anywhere; }
.workspace-dialog-body > p:first-child { margin-top: 0; }
.workspace-dialog > footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.5rem 1.25rem; }
.workspace-dialog > footer button { min-height: 2.5rem; padding: .55rem 1rem; border-radius: .6rem; font-size: .82rem; border: 1px solid #d9e5dc; color: #496857; background: #fff; }
.workspace-dialog > footer .primary { background: #008069; border-color: #008069; color: white; }
.workspace-dialog > footer .danger { background: #ac3f48; border-color: #ac3f48; color: white; }
.workspace-dialog > footer button:disabled { opacity: .5; }
.dialog-field { display: grid; gap: .4rem; margin: 1rem 0; font-weight: 600; color: #52705f; font-size: .8rem; }
.dialog-field input, .dialog-field textarea, .dialog-field select { width: 100%; min-width: 0; padding: .7rem .8rem; border: 1px solid #cdded1; border-radius: .5rem; background: #fafcf9; color: #243c2c; font-weight: 400; font-size: .9rem; }
.dialog-field textarea { resize: vertical; }
.dialog-muted, .workspace-dialog small { color: #7e9183; font-size: .76rem; }
.dialog-error { margin: 0 1.5rem; padding: .6rem; color: #a43a44; background: #fff0f1; font-size: .8rem; }
.message-info-preview { padding: .75rem 1rem; background: #f1f6f0; border-left: 3px solid #9ac6a2; border-radius: .4rem; white-space: pre-wrap; font-size: .84rem; max-height: 12rem; overflow: auto; }
.message-info-list { margin: 1rem 0; }
.message-info-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #edf2ed; }
.message-info-list dt { color: #7b8e7f; }
.message-info-list dd { margin: 0; text-align: right; }
.profile-card { text-align: center; }
.profile-card .conversation-avatar { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; margin: 0 auto; }
.profile-card h3 { margin: .7rem 0 .2rem; }
.profile-card p { margin: 0 0 .5rem; color: #7b8e7f; }
.profile-card > span:not(.conversation-avatar) { display: inline-block; padding: .2rem .65rem; border-radius: 99px; color: #008069; background: #e4f4eb; font-size: .75rem; }
.contact-hero .conversation-avatar { width: 5.5rem; height: 5.5rem; min-height: 5.5rem; margin: 0 auto 1rem; font-size: 1.8rem; }
.sidebar-footer .avatar svg { width: 1.3rem; height: 1.3rem; }
.chat-placeholder > span > svg { width: .9rem; height: .9rem; vertical-align: middle; }
.ux-undo-toast { position: fixed; z-index: 140; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .8rem; max-width: calc(100vw - 2rem); padding: .8rem 1rem; color: #fff; background: #243c32; border-radius: .7rem; box-shadow: 0 8px 30px #163d322b; font-size: .8rem; }
.ux-undo-toast button { flex-shrink: 0; border: 0; padding: .25rem; color: #88edbb; background: none; font-weight: 600; }
@media (min-width: 901px) {
  .chat-header .chat-back { display: none; }
  .sidebar { background: #142d29; }
  .sidebar-footer .user-block { width: 100%; grid-template-columns: 1fr; justify-items: center; gap: .8rem; }
  .sidebar-footer .avatar { width: 2.55rem; height: 2.55rem; min-width: 2.55rem; border: 2px solid #b4d3c033; color: #d7f5e6; background: #33574a; font-size: .8rem; font-weight: 600; }
  .sidebar-footer .avatar:hover { border-color: #74bba1; }
  .sidebar-footer { border-color: #385449; padding-top: .9rem; }
  .sidebar .nav-item.active { color: #8edbbb; background: #2a493f; }
  .sidebar .nav-item:hover { background: #264338; }
  .messenger-shell { min-height: 0; height: 100dvh; grid-template-columns: minmax(19rem, 24rem) minmax(0, 1fr); }
  .chat-panel { height: 100dvh; }
}
@media (max-width: 900px) {
  .messages-mode .main { height: 100dvh; min-height: 0; overflow: hidden; }
  .messages-mode .content { height: 100%; }
  .messages-mode .mobile-nav { display: grid; height: calc(4.5rem + env(safe-area-inset-bottom)); }
  .messages-mode .messenger-shell, .messages-mode .chat-panel, .messages-mode .messenger-shell.mobile-chat-open .chat-panel { height: calc(100dvh - 4.5rem - env(safe-area-inset-bottom)); min-height: 0; }
  .messages-mode .conversation-details { min-height: 0; height: calc(100dvh - 4.5rem - env(safe-area-inset-bottom)); }
  .messages-mode .messenger-shell { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .chat-header { padding: .5rem; }
  .chat-actions { gap: 0; }
  .chat-actions > button { width: 2.2rem; height: 2.2rem; }
  .chat-header .conversation-avatar { width: 2.4rem; height: 2.4rem; min-width: 2.4rem; min-height: 2.4rem; flex-basis: 2.4rem; font-size: .85rem; }
  .contact-heading { gap: .55rem; }
  .chat-identity strong { max-width: 35vw; font-size: .85rem; }
  .chat-stream { padding: .65rem 1rem; }
  .chat-stream.selecting { padding-left: 2.5rem; }
  .message-bubble { max-width: 90%; }
  .message-compose { padding: .5rem; gap: .15rem; }
  .compose-hint { display: none; }
  .conversation-menu-trigger { opacity: 1; bottom: .35rem; }
  .service-window { padding: .3rem .75rem; }
  .service-window span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (hover: none) {
  .message-menu-trigger { opacity: 1; transform: none; }
  .compose-hint { display: none; }
}

@media (max-width: 560px) {
  .message-compose { grid-template-columns: auto auto minmax(0, 1fr) auto; padding-inline: 0.35rem; gap: 0.1rem; }
  .message-compose .compose-icon-button, .attach-button, .message-compose button.compose-send { width: 2.55rem; height: 2.55rem; }
  .message-action-menu { min-width: 12.25rem; }
}
