* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 52px;
    background: var(--ink);
    color: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    gap: 20px;
}

.topbar-brand { font-weight: 700; font-size: 16px; flex-shrink: 0; }

.topbar-nav {
    display: flex;
    gap: 16px;
    flex: 1;
}

.topbar-nav a {
    color: var(--ink-faint);
    text-decoration: none;
    font-size: 14px;
}

.topbar-nav a.active,
.topbar-nav a:hover {
    color: var(--bg-elevated);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--ink-faint);
    flex-shrink: 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-soft);
    cursor: pointer;
    font-size: 14px;
}

.btn-text:hover { text-decoration: underline; }

.inbox-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    min-height: 0;
}

.panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--border);
}

.panel-right {
    border-right: none;
    border-left: 1px solid var(--border);
    background: var(--surface);
}

.panel-left {
    background: var(--bg);
    color: var(--ink);
    min-height: 0;
}

.panel-header {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.panel-header-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.panel-header-row .search-input {
    flex: 1;
}

.btn-new-conversation {
    flex-shrink: 0;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: var(--surface);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-new-conversation:hover {
    background: var(--accent-hover);
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--ink);
    font-size: 14px;
}

.search-input::placeholder { color: var(--ink-faint); }

.conversation-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 6px 8px 8px;
    background: var(--bg);
    scrollbar-color: var(--border) transparent;
    scrollbar-width: thin;
}

.conversation-row-wrap {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 6px;
    overflow: visible;
    box-shadow: 0 1px 2px rgba(11, 31, 26, 0.04);
}

.conversation-row-wrap.menu-open {
    z-index: 25;
}

.conversation-row-wrap.active {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 1px rgba(47, 107, 255, 0.2);
}

.conversation-row-wrap.active .conversation-item {
    background: var(--bg-elevated);
}

.conversation-row-wrap.has-unread .conversation-name,
.conversation-row-wrap.has-unread .conversation-line-label,
.conversation-row-wrap.has-unread .conversation-preview,
.conversation-row-wrap.has-unread .conversation-time {
    font-weight: 700;
    color: var(--ink);
}

.conversation-item {
    display: block;
    flex: 1;
    min-width: 0;
    width: auto;
    text-align: left;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.conversation-item:hover {
    background: var(--bg-elevated);
}

.conversation-item.active {
    background: var(--bg-elevated);
}

.conversation-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.conversation-item.selected {
    background: var(--accent-soft);
}

.conversation-item-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    position: relative;
}

.conversation-item-main {
    min-width: 0;
    flex: 1;
}

.conversation-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.conversation-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.conversation-row-top-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.conversation-line-label {
    font-size: 12px;
    line-height: 1.3;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.conversation-preview {
    font-size: 13px;
    line-height: 1.35;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 11px;
    color: var(--ink-faint);
    white-space: nowrap;
}

.conversation-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--surface);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.conversation-row-wrap.has-unread .conversation-time {
    color: var(--ink-muted);
}

.conversation-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    flex-shrink: 0;
}

.conversation-menu-btn:hover,
.conversation-menu-btn.open {
    background: var(--border);
    color: var(--ink);
}

.conversation-row-menu {
    position: absolute;
    top: 44px;
    right: 8px;
    z-index: 30;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--menu-shadow);
    /* Solid card — avoid broken glass/blur on menus */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.conversation-row-menu[hidden] {
    display: none !important;
}

.conversation-row-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.conversation-row-menu-item:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.conversation-row-menu-item.danger {
    color: var(--danger);
}

.conversation-row-menu-item.danger:hover {
    background: var(--danger-soft);
}

.conversation-row-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.conversation-row-menu-item:hover .conversation-row-menu-icon {
    color: var(--accent);
}

.conversation-row-menu-item.danger:hover .conversation-row-menu-icon {
    color: var(--danger);
}

/* Search match highlight in conversation list */
.search-hit {
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 600;
}

.conversation-row-wrap.is-search-match {
    box-shadow: inset 3px 0 0 var(--accent);
}

.conversation-row-wrap.is-search-match .conversation-preview {
    color: var(--ink);
}

.conversation-indicator {
    display: inline-flex;
    align-items: center;
    color: var(--ink-faint);
}

.panel-center {
    background: var(--surface);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#threadEmpty[hidden],
#threadActive[hidden] {
    display: none !important;
}

.thread-empty, .details-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    font-size: 15px;
    min-height: 0;
}

.thread-active {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

.thread-header {
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.thread-header h2 { font-size: 18px; }

.thread-subtitle { font-size: 13px; color: var(--ink-muted); }

.message-thread {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 16px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
    background: var(--surface);
}

.message-thread .empty-state {
    padding: 32px 16px;
}

.message-row {
    display: flex;
}

.message-row.in { justify-content: flex-start; }
.message-row.out { justify-content: flex-end; }

.bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.bubble-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bubble-media {
    display: block;
    margin-top: 8px;
}

.bubble-media img {
    display: block;
    max-width: min(280px, 100%);
    border-radius: 10px;
}

.bubble-media-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: inherit;
    text-decoration: none;
}

.bubble.out .bubble-media-file {
    color: var(--accent-soft);
}

.bubble.in {
    background: var(--bubble-in);
    border: 1px solid transparent;
    color: var(--ink);
    border-bottom-left-radius: 4px;
}

.bubble.out {
    background: var(--bubble-out);
    color: var(--bubble-out-text);
    border-bottom-right-radius: 4px;
}

.message-row {
    position: relative;
}

.message-row.is-menu-target .bubble,
.message-row.is-menu-target .call-card {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}

.message-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    max-width: 100%;
}

.message-row.out .message-chips {
    justify-content: flex-end;
}

.message-row.in .message-chips {
    justify-content: flex-start;
}

.message-comment-chip,
.message-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.message-comment-chip {
    color: var(--ink);
}

.message-comment-chip-icon {
    display: inline-flex;
    color: var(--accent);
    flex-shrink: 0;
}

.message-comment-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.message-reaction-chip {
    font-size: 13px;
    padding: 2px 7px;
    min-width: 28px;
    justify-content: center;
}

.call-card {
    width: min(420px, 88%);
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.call-card-compact {
    width: auto;
    max-width: 78%;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.call-card-expanded,
.call-card-recording {
    width: min(420px, 88%);
    padding: 14px 16px;
}

.call-card-recording-compact {
    width: auto;
    max-width: min(340px, 88%);
    padding: 10px 12px;
}

.call-card-recording-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.call-card-recording-compact .call-card-icon {
    width: 24px;
    height: 24px;
}

.call-card-recording-compact .call-card-compact-copy {
    flex: 1;
    min-width: 0;
}

.call-card-recording-compact .call-card-compact-title,
.call-card-recording-compact .call-card-compact-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-card-recording-compact .call-player {
    margin-top: 8px;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.call-card-recording-compact .call-player-play {
    width: 30px;
    height: 30px;
}

.call-card-recording-compact .call-player-icon-play svg,
.call-card-recording-compact .call-player-icon-pause svg {
    width: 16px;
    height: 16px;
}

.call-card-recording-compact .call-transcript-cta,
.call-card-recording-compact .call-transcript-pending {
    margin-top: 6px;
}

.call-card-recording-compact .call-transcript-pending {
    font-size: 11px;
}

.call-card-compact-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.call-card-compact-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.call-card-compact-subtitle {
    font-size: 11px;
    color: var(--ink-muted);
}

.call-card-compact-meta {
    margin-left: auto;
    font-size: 11px;
    color: var(--ink-faint);
    white-space: nowrap;
}

.call-card-compact .call-card-icon {
    width: 24px;
    height: 24px;
}

.call-card-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
}

.call-card-active {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.message-row.in .call-card {
    border-bottom-left-radius: 4px;
}

.message-row.out .call-card {
    border-bottom-right-radius: 4px;
}

.call-card-out {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
}

.call-card-in {
    background: var(--surface);
}

.call-card-missed {
    background: var(--danger-soft);
    border-color: var(--danger-soft);
}

.call-card-header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.call-card-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg);
    color: var(--accent);
}

.call-card-out .call-card-icon {
    background: var(--accent-soft);
}

.call-card-missed .call-card-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.call-card-titles {
    min-width: 0;
    flex: 1;
}

.call-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.call-card-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: var(--ink-muted);
}

.call-card-meta {
    margin-top: 10px;
    font-size: 11px;
    color: var(--ink-faint);
}

.call-progress-indicator {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}

.call-pulse {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    animation: call-pulse 1.4s ease-in-out infinite;
}

@keyframes call-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.call-player {
    margin-top: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.call-player-play {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.call-player-play:hover:not(:disabled) {
    background: var(--border);
    color: var(--ink);
}

.call-player-play.is-playing {
    background: var(--border);
    color: var(--ink);
}

.call-player-play:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.call-player-icon-play,
.call-player-icon-pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.call-player-icon-play[hidden],
.call-player-icon-pause[hidden] {
    display: none !important;
}

.call-player-icon-play svg,
.call-player-icon-pause svg {
    display: block;
    width: 18px;
    height: 18px;
}

.call-player-track {
    min-width: 0;
}

.call-player-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) 0%, var(--border) 0%, var(--border) 100%);
    cursor: pointer;
}

.call-player-seek::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: transparent;
}

.call-player-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 999px;
    background: var(--accent);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}

.call-player-seek::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: var(--border);
}

.call-player-seek::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.call-player-seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--accent);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}

.call-player-time {
    font-size: 11px;
    color: var(--ink-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.call-player-time-sep {
    margin: 0 2px;
    color: var(--ink-faint);
}

.call-player-speed {
    border: none;
    background: var(--bg);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
    min-width: 36px;
}

.call-player-speed:hover {
    background: var(--border);
}

.call-transcript-pending {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--ink-muted);
    font-style: italic;
}

.call-transcript-timeline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.call-transcript-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.call-transcript-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.call-transcript-line,
.transcript-line {
    display: grid;
    grid-template-columns: 42px minmax(88px, auto) 1fr;
    gap: 10px;
    align-items: baseline;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 8px;
}

.call-transcript-line .transcript-speaker,
.transcript-line .transcript-speaker {
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.call-transcript-line .transcript-text,
.transcript-line .transcript-text {
    color: var(--ink-muted);
    min-width: 0;
}

.call-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.call-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.call-transcript-link {
    border: none;
    background: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.call-transcript-cta {
    margin-top: 10px;
}

.call-summary-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.5;
}

.modal-wide .modal-card,
.modal.modal-wide .modal-card {
    width: min(640px, calc(100vw - 32px));
    max-height: min(80vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.call-transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.call-transcript-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--ink);
}

.btn-icon.is-copied {
    color: #16a34a;
}

.call-transcript-body {
    overflow: auto;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-muted);
}

.transcript-time {
    font-size: 12px;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bubble-meta {
    margin-top: 6px;
    font-size: 11px;
    opacity: .75;
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-pill {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,.2);
}

.status-pill.queued { background: #fef3c7; color: #92400e; }
.status-pill.sent { background: var(--accent-soft); color: var(--accent-hover); }
.status-pill.delivered { background: #d1fae5; color: #065f46; }
.status-pill.failed { background: var(--danger-soft); color: #991b1b; }
.status-pill.undelivered { background: #ffedd5; color: #9a3412; }
.status-pill.received { background: #e0e7ff; color: #3730a3; }

.bubble.in .status-pill { background: var(--bg); color: var(--ink-muted); }

.composer {
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.composer textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.composer textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--surface);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.btn-call {
    background: var(--accent);
    color: var(--on-ink);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-call:hover { background: var(--accent-hover); }
.btn-call:disabled { opacity: .55; cursor: not-allowed; }

.inline-error { color: var(--danger); font-size: 13px; }

.details-content {
    padding: 20px;
    overflow-y: auto;
}

.details-content h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-muted);
    margin: 20px 0 10px;
}

.details-content h3:first-child { margin-top: 0; }

.details-dl { font-size: 14px; }

.details-dl dt {
    color: var(--ink-muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.details-dl dd {
    margin-bottom: 12px;
    word-break: break-all;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--ink);
    color: var(--bg-elevated);
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    transform: translateY(80px);
    opacity: 0;
    transition: all .25s ease;
    z-index: 1000;
    max-width: 360px;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.error { background: #7f1d1d; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 26, 0.55);
}

.modal-card {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(11, 31, 26, 0.2);
}

.modal-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
}

.field-input {
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.combobox {
    position: relative;
    margin-bottom: 14px;
}

.combobox-control {
    display: flex;
    align-items: stretch;
}

.combobox-input {
    flex: 1;
    margin-bottom: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
}

.combobox-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.18);
}

.combobox-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 0 8px 8px 0;
    background: var(--bg-elevated);
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 14px;
}

.combobox-toggle:hover {
    background: var(--bg);
}

.combobox-listbox {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(11, 31, 26, 0.12);
    z-index: 20;
}

.combobox-listbox[hidden] {
    display: none;
}

.combobox-option {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    color: var(--ink);
}

.combobox-option:hover,
.combobox-option.highlighted {
    background: var(--bg);
}

.combobox-option[aria-selected="true"] {
    background: var(--border);
}

.combobox-empty {
    padding: 10px 12px;
    color: var(--ink-faint);
    font-size: 13px;
}

.btn-secondary {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
}

.inbox-layout-v2 {
    grid-template-columns: 360px 1fr;
}

.list-toolbar {
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 62px;
    background: var(--bg);
}

.list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg);
}

.sidebar-toolbar-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sidebar-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-search {
    flex: 1;
    min-width: 0;
}

.sidebar-search.platform-search-field {
    width: 100%;
}

.inbox-search .platform-search-input,
.sidebar-search .platform-search-input {
    height: 38px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
}

.inbox-search .platform-search-input::placeholder,
.sidebar-search .platform-search-input::placeholder {
    color: var(--ink-faint);
}

.inbox-search .platform-search-input:hover,
.sidebar-search .platform-search-input:hover {
    background: var(--surface);
    border-color: var(--border);
}

.inbox-search .platform-search-input:focus,
.sidebar-search .platform-search-input:focus {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14);
}

.inbox-search .platform-search-icon,
.sidebar-search .platform-search-icon {
    color: var(--ink-faint);
}

.sidebar-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-icon-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--ink);
}

.sidebar-icon-btn-primary {
    background: var(--accent-hover);
    border-color: var(--accent);
    color: var(--surface);
}

.sidebar-icon-btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--surface);
}

.sidebar-filter-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.sidebar-filter-chip {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.sidebar-filter-chip:hover {
    background: var(--bg-elevated);
    color: var(--ink);
}

.sidebar-filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--surface);
}

.sidebar-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.sidebar-filters-btn:hover {
    background: var(--bg-elevated);
    color: var(--ink);
}

.sidebar-filters-btn.has-active {
    border-color: var(--accent);
    color: var(--accent-hover);
}

.sidebar-filters-popup {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 16px;
}

.sidebar-filters-popup[hidden] {
    display: none !important;
}

.sidebar-filters-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 20, 0.45);
}

.sidebar-filters-panel {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--menu-shadow);
    overflow: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.sidebar-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-filters-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.sidebar-filters-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
}

.sidebar-filters-close:hover {
    background: var(--bg);
    color: var(--ink);
}

.sidebar-filters-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.sidebar-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.sidebar-filter-select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
}

.sidebar-filters-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}

.sidebar-filters-clear,
.sidebar-filters-apply {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-filters-clear {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
}

.sidebar-filters-apply {
    border: none;
    background: var(--accent);
    color: var(--surface);
}

.sidebar-filters-apply:hover {
    background: var(--accent-hover);
}

.list-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--ink-faint);
    flex-shrink: 0;
}

.list-load-more[hidden] {
    display: none !important;
}

.composer-v2 {
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    padding: 12px 16px 14px;
}

.composer-openphone {
    position: relative;
}

.composer-box {
    border: 1px solid var(--accent-soft);
    border-radius: 14px;
    background: var(--surface);
    overflow: visible;
}

.composer-openphone textarea {
    width: 100%;
    min-height: 44px;
    max-height: 140px;
    padding: 12px 14px 8px;
    border: none;
    background: transparent;
    resize: none;
    font-size: 15px;
    line-height: 1.45;
    font-family: inherit;
    color: var(--ink);
}

.composer-openphone textarea:focus {
    outline: none;
}

.composer-openphone textarea::placeholder {
    color: var(--ink-faint);
}

.composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px 8px;
}

.composer-toolbar-left,
.composer-toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.composer-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    font-size: 18px;
    cursor: pointer;
}

.composer-tool-btn:hover {
    background: var(--bg);
    color: var(--ink-muted);
}

.composer-commands-btn[aria-expanded="true"] {
    background: var(--accent-soft);
    color: var(--accent);
}

.thread-header-phone-btn {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.composer-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--on-ink);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.composer-send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.composer-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    min-height: 16px;
}

.conversation-row-menu-floating {
    min-width: 200px;
}

.composer-emoji-anchor {
    position: relative;
}

.composer-tool-btn svg {
    display: block;
}

.composer-emoji-panel {
    position: fixed;
    left: 0;
    right: auto;
    bottom: auto;
    z-index: 80;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--menu-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.composer-emoji-panel[hidden] {
    display: none !important;
}

.composer-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.composer-emoji-option {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

.composer-emoji-option:hover {
    background: var(--bg);
}

.char-counter,
.composer-hint {
    font-size: 11px;
    color: var(--ink-faint);
}

.composer-send-hint {
    display: none;
    margin-left: auto;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .composer-send-hint {
        display: inline;
    }
}

.composer-attachment-input {
    display: none;
}

.composer-attachment-preview {
    margin-bottom: 8px;
}

.composer-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 13px;
}

.composer-attachment-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.composer-commands-panel {
    position: fixed;
    z-index: 1200;
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--menu-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.composer-commands-panel[hidden] {
    display: none !important;
}

.composer-commands-header {
    padding: 10px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.composer-commands-empty {
    padding: 12px;
    font-size: 13px;
    color: var(--ink-muted);
}

.composer-command-option {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.composer-command-option:hover,
.composer-command-option.active {
    background: var(--bg-elevated);
}

.composer-command-prefix {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.composer-command-prefix-muted {
    color: var(--ink-faint);
    font-weight: 500;
}

.composer-command-prefix-menu {
    color: var(--ink-muted);
    font-weight: 500;
}

.composer-command-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.composer-command-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.composer-command-desc {
    font-size: 12px;
    line-height: 1.35;
    color: var(--ink-muted);
}

.conversation-tag,
.thread-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--ink-muted);
    color: var(--bg-elevated);
    font-size: 10px;
}

.conversation-indicator {
    font-size: 11px;
}

.thread-header-v2 {
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.thread-header-copy h2,
.thread-header-phone {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.thread-header-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.thread-header-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.thread-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.4;
}

.thread-header-line {
    color: var(--ink-muted);
}

.thread-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.thread-header-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.thread-header-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 1px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.thread-header-back-btn svg {
    display: block;
}

.thread-header-back-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--ink);
}

.thread-header-copy {
    flex: 1;
    min-width: 0;
}

.thread-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.thread-header-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #16a34a;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.thread-header-call-btn:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-hover);
}

.thread-header-call-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.thread-header-menu {
    position: relative;
}

.thread-header-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.thread-header-menu-btn:hover,
.thread-header-menu-btn.open {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--ink);
}

.thread-header-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--menu-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.thread-header-menu-panel[hidden] {
    display: none !important;
}

.thread-header-menu-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.thread-header-menu-item:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.timeline-item {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    align-self: center;
}

.timeline-note {
    background: #F3EEFF;
    border-color: #D4C6F0;
}

@media (prefers-color-scheme: dark) {
    .timeline-note {
        background: #2A2440;
        border-color: #4C3F6E;
    }
}

.timeline-activity,
.timeline-audit,
.timeline-system {
    background: var(--bg-elevated);
}

.timeline-call,
.timeline-call-missed {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 88%;
}

.timeline-call {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
}

.timeline-call-missed {
    background: var(--danger-soft);
    border-color: var(--danger-soft);
}

.timeline-call-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.timeline-call-missed .timeline-call-icon {
    color: var(--danger);
}

.timeline-voicemail {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 88%;
    background: #faf5ff;
    border-color: #e9d5ff;
}

.timeline-voicemail-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
}

.timeline-voicemail-audio {
    width: 100%;
    max-width: 280px;
    margin-top: 8px;
}

.timeline-item-subtle {
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 2px;
}

.timeline-item-copy {
    min-width: 0;
    flex: 1;
}

.timeline-item-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 6px;
}

.timeline-item-body {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.timeline-item-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ink-faint);
}

.drawer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.drawer-tab {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.drawer-tab.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--surface);
}

.drawer-tab.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.drawer-details {
    margin-bottom: 16px;
}

.drawer-placeholders {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

#bulkBarMount .platform-bulk-bar {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--ink);
}

#bulkBarMount .platform-bulk-bar .btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--ink-muted);
}

#bulkBarMount .platform-bulk-bar .btn-secondary:hover {
    background: var(--bg);
}


@media (min-width: 769px) {
    .conversation-menu-btn {
        opacity: 0.55;
    }

    .conversation-row-wrap:hover .conversation-menu-btn,
    .conversation-menu-btn.open {
        opacity: 1;
    }
}

.mobile-footer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(11, 31, 26, 0.12);
    backdrop-filter: blur(12px);
}

.mobile-footer[hidden],
.mobile-fab[hidden] {
    display: none !important;
}

.mobile-footer-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 64px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-footer-tab svg {
    display: block;
}

.mobile-footer-tab.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.mobile-footer-tab:hover:not(.active),
.mobile-footer-tab:focus-visible:not(.active) {
    color: var(--accent);
    background: var(--accent-soft);
}

.mobile-footer-tab:active:not(.active) {
    background: var(--accent-soft);
}

.mobile-fab {
    position: fixed;
    right: 18px;
    bottom: 78px;
    z-index: 41;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-ink);
    box-shadow: 0 12px 28px rgba(47, 107, 255, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mobile-fab:hover {
    background: var(--accent-hover);
}

.mobile-fab:active {
    transform: scale(0.96);
}

.mobile-dial-pad {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 20px 96px;
    background: var(--bg);
    min-height: 0;
}

.mobile-dial-pad[hidden] {
    display: none !important;
}

.inbox-layout-v2.mobile-keypad-open .list-toolbar,
.inbox-layout-v2.mobile-keypad-open .list-filters,
.inbox-layout-v2.mobile-keypad-open .conversation-list,
.inbox-layout-v2.mobile-keypad-open #bulkBarMount,
.inbox-layout-v2.mobile-keypad-open .list-load-more {
    display: none !important;
}

.inbox-layout-v2.mobile-keypad-open .mobile-dial-pad {
    display: flex !important;
}

.dial-pad-display {
    font-size: 28px;
    font-weight: 600;
    color: var(--ink);
    min-height: 36px;
    text-align: center;
}

.dial-pad-keys {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 14px;
    width: min(100%, 320px);
}

.dial-pad-key {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border: none;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(11, 31, 26, 0.08);
    cursor: pointer;
}

.dial-pad-digit {
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.dial-pad-letters {
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin-top: 2px;
}

.dial-pad-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.dial-pad-action {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dial-pad-message {
    width: 44px;
    height: 44px;
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.dial-pad-call {
    width: 64px;
    height: 64px;
    background: #22c55e;
    color: var(--surface);
}

.dial-pad-line-picker {
    width: min(100%, 340px);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.dial-pad-line-picker-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-align: left;
}

.combobox-compact .combobox-input {
    height: 40px;
    font-size: 14px;
}

.combobox-compact .combobox-listbox {
    max-height: 180px;
}

.dial-pad-backspace {
    width: 44px;
    height: 44px;
    background: var(--border);
    color: var(--ink-muted);
}

.dial-pad-backspace:hover {
    background: var(--border);
    color: var(--ink);
}

.dial-pad-backspace svg {
    width: 22px;
    height: 22px;
}

.dial-pad-action svg {
    display: block;
}

/* In-call dialer (Quo-style) */
.call-dialer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: #0b0b0f;
    color: var(--bg-elevated);
    display: flex;
    flex-direction: column;
}

.call-dialer-overlay[hidden] {
    display: none !important;
}

.call-dialer {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.call-dialer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 8px;
    gap: 12px;
}

.call-dialer-back,
.call-dialer-add-person {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--bg-elevated);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.call-dialer-add-person:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.call-dialer-header-meta {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.call-dialer-line {
    display: block;
    font-size: 0.82rem;
    color: var(--ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-dialer-timer {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.call-dialer-contact {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 12px;
    text-align: center;
}

.call-dialer-avatar {
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.call-dialer-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.call-dialer-phone {
    font-size: 0.95rem;
    color: var(--ink-faint);
    margin-bottom: 8px;
}

.call-dialer-status {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

.call-dialer-sheet {
    background: #15151b;
    border-radius: 20px 20px 0 0;
    padding: 8px 16px 24px;
    margin-top: auto;
}

.call-dialer-sheet-toggle {
    display: flex;
    width: 100%;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    padding: 4px 0 10px;
    cursor: pointer;
}

.call-dialer-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.call-dialer-ctrl {
    border: 0;
    background: #26262f;
    color: var(--bg-elevated);
    border-radius: 14px;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 4px;
}

.call-dialer-ctrl-icon {
    width: 22px;
    height: 22px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.call-dialer-ctrl-label {
    font-size: 0.68rem;
    color: var(--border);
}

.call-dialer-ctrl[data-active="true"]:not(.call-dialer-ctrl-mic) {
    background: #22c55e;
    color: #052e16;
}

.call-dialer-ctrl[data-active="true"]:not(.call-dialer-ctrl-mic) .call-dialer-ctrl-label {
    color: #052e16;
}

.call-dialer-ctrl-mic[data-active="true"] {
    background: var(--danger);
    color: var(--surface);
}

.call-dialer-ctrl-mic[data-active="true"] .call-dialer-ctrl-label {
    color: var(--surface);
}

.call-dialer-ctrl-speaker[data-active="true"] {
    background: #22c55e;
    color: #052e16;
}

.call-dialer-ctrl-speaker[data-active="true"] .call-dialer-ctrl-label {
    color: #052e16;
}

.call-dialer-ctrl-end {
    background: var(--danger);
}

.call-dialer-ctrl-end .call-dialer-ctrl-label {
    color: var(--surface);
}

.call-dialer-ctrl-disabled,
.call-dialer-ctrl:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.call-dialer-ctrl.is-busy {
    opacity: 0.7;
}

#callDialerMicBtn .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8'/%3E%3C/svg%3E");
}

#callDialerMicBtn[data-active="true"] .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E");
}

#callDialerSpeakerBtn .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E");
}

#callDialerKeypadBtn .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='5' r='1.5'/%3E%3Ccircle cx='12' cy='5' r='1.5'/%3E%3Ccircle cx='19' cy='5' r='1.5'/%3E%3Ccircle cx='5' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='19' cy='12' r='1.5'/%3E%3Ccircle cx='5' cy='19' r='1.5'/%3E%3Ccircle cx='12' cy='19' r='1.5'/%3E%3Ccircle cx='19' cy='19' r='1.5'/%3E%3C/svg%3E");
}

#callDialerHoldBtn .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3Cpath d='M10 9v6M14 9v6'/%3E%3C/svg%3E");
}

#callDialerEndBtn .call-dialer-ctrl-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    transform: rotate(135deg);
}

.call-dialer-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 8px 4px 4px;
}

.call-dialer-keypad[hidden] {
    display: none !important;
}

.call-dialer-key {
    border: 0;
    border-radius: 999px;
    background: #26262f;
    color: var(--bg-elevated);
    height: 58px;
    font-size: 1.35rem;
    cursor: pointer;
}

.call-dialer-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.call-dialer-menu[hidden] {
    display: none !important;
}

.call-dialer-transfer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 2px 8px;
}

.call-dialer-transfer[hidden] {
    display: none !important;
}

.call-dialer-transfer-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-elevated);
}

.call-dialer-transfer-label {
    font-size: 0.8rem;
    color: var(--ink-faint);
}

.call-dialer-transfer-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    background: #1a1a22;
    color: var(--bg-elevated);
    padding: 10px 12px;
    font-size: 0.95rem;
}

.call-dialer-transfer-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--border);
    font-size: 0.9rem;
}

.call-dialer-transfer-modes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.call-dialer-transfer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.call-dialer-menu-item {
    border: 0;
    background: transparent;
    color: var(--border);
    text-align: left;
    padding: 12px 4px;
    font-size: 0.92rem;
    cursor: pointer;
}

.call-dialer-menu-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.call-dialer-menu-status {
    color: var(--ink-faint);
    cursor: default;
}

.call-dialer-minibar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 31, 26, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    backdrop-filter: blur(8px);
}

.call-dialer-minibar[hidden] {
    display: none !important;
}

body.call-dialer-minimized .composer-v2 {
    padding-bottom: 76px;
}

.call-dialer-minibar-main {
    flex: 1;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: var(--bg-elevated);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
}

.call-dialer-minibar.is-on-hold .call-dialer-minibar-pulse {
    background: #f59e0b;
}

.call-dialer-minibar.is-on-hold .call-dialer-minibar-label {
    color: #fbbf24;
}


@keyframes call-pulse-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.call-dialer-minibar-copy {
    flex: 1;
    min-width: 0;
}

.call-dialer-minibar-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

.call-dialer-minibar-phone {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-dialer-minibar-timer {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: var(--border);
}

.call-dialer-minibar-end {
    border: 0;
    border-radius: 12px;
    background: var(--danger);
    color: var(--surface);
    padding: 0 18px;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 769px) {
    .sidebar-toolbar-actions .sidebar-icon-btn[aria-label="Open dial pad"] {
        display: none;
    }

    .call-dialer-minibar {
        left: 300px;
    }
}

.incoming-call-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(2, 6, 23, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.incoming-call-overlay[hidden] {
    display: none !important;
}

.incoming-call {
    width: min(100%, 420px);
    color: var(--bg-elevated);
    text-align: center;
}

.incoming-call-avatar {
    width: 108px;
    height: 108px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669, #047857);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.incoming-call-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.incoming-call-phone,
.incoming-call-line {
    font-size: 0.95rem;
    color: var(--ink-faint);
}

.incoming-call-line {
    margin-top: 4px;
}

.incoming-call-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 36px;
}

.incoming-call-btn {
    border: 0;
    border-radius: 16px;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--surface);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}

.incoming-call-btn-icon {
    width: 28px;
    height: 28px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.incoming-call-btn-reject {
    background: var(--ink-muted);
}

.incoming-call-btn-voicemail {
    background: var(--ink-muted);
}

.incoming-call-btn-answer {
    background: #22c55e;
    color: #052e16;
}

#incomingRejectBtn .incoming-call-btn-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    transform: rotate(135deg);
}

#incomingVoicemailBtn .incoming-call-btn-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Ccircle cx='6' cy='12' r='4'/%3E%3Ccircle cx='18' cy='12' r='4'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E");
}

#incomingAnswerBtn .incoming-call-btn-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23052e16' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    body.call-dialer-minimized .mobile-footer {
        bottom: 68px;
    }

    body.call-dialer-minimized .composer-v2 {
        padding-bottom: 140px;
    }
}

@media (max-width: 1024px) {
    .inbox-layout-v2 {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .topbar {
        padding: 0 12px;
        gap: 12px;
        min-width: 0;
    }

    .topbar-nav {
        gap: 12px;
    }

    .inbox-layout-v2 {
        grid-template-columns: 1fr;
    }

    /* Default: conversation list only */
    .inbox-layout-v2 .panel-left {
        display: flex;
        min-width: 0;
    }

    .inbox-layout-v2 .panel-center {
        display: none;
        min-width: 0;
    }

    /* Thread open: timeline only */
    .inbox-layout-v2.mobile-thread-open .panel-left {
        display: none;
    }

    .inbox-layout-v2.mobile-thread-open .panel-center {
        display: flex;
        padding-bottom: 0;
    }

    .thread-header-back-btn {
        display: inline-flex;
    }

    .thread-header-main {
        align-items: center;
    }

    .thread-header-copy h2,
    .thread-header-phone {
        font-size: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .thread-subtitle {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .composer-send-btn {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    .panel-left {
        padding-bottom: 88px;
    }

    .inbox-layout-v2.mobile-thread-open .panel-left {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    /* Native-app-like mobile chrome — same palette; denser list/thread surfaces */
    body {
        background: var(--bg);
        color: var(--ink);
    }

    .panel-left,
    .panel-center {
        background: var(--bg);
    }

    .conversation-list {
        padding: 8px 10px 96px;
        gap: 6px;
    }

    .conversation-row-wrap {
        border-radius: 14px;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        overflow: hidden;
    }

    .conversation-row-wrap.active,
    .conversation-row-wrap:hover {
        background: var(--accent-soft);
        border-color: var(--accent-soft);
    }

    .conversation-item,
    .conversation-item:hover,
    .conversation-item.active {
        background: transparent;
    }

    .thread-header,
    .thread-header-v2 {
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
    }

    .composer-openphone,
    .composer-box {
        background: var(--bg-elevated);
        border-color: var(--border);
    }

    .mobile-footer {
        background: var(--bg-elevated);
        border-top: 1px solid var(--border);
    }

    .bubble.in {
        background: var(--bubble-in);
        border-color: var(--border);
        color: var(--ink);
    }

    .bubble.out {
        background: var(--bubble-out);
        color: var(--bubble-out-text);
        border-color: var(--bubble-out);
    }

    .inbox-ctx-menu {
        min-width: min(260px, calc(100vw - 24px));
    }
}

/* Quo-inspired timeline / row context menu (solid card, reaction strip) */
.inbox-ctx-menu {
    position: fixed;
    z-index: 1400;
    min-width: 220px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--menu-shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--ink);
}

.inbox-ctx-menu[hidden] {
    display: none !important;
}

.inbox-ctx-reactions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 2px 8px;
}

.inbox-ctx-reaction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}

.inbox-ctx-reaction:hover,
.inbox-ctx-reaction.is-active {
    background: var(--accent-soft);
    transform: scale(1.06);
}

.inbox-ctx-divider {
    height: 1px;
    margin: 2px 4px 6px;
    background: var(--border);
}

.inbox-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.inbox-ctx-item:hover {
    background: var(--accent-soft);
}

.inbox-ctx-item.danger {
    color: var(--danger);
}

.inbox-ctx-item.danger:hover {
    background: var(--danger-soft);
}

.inbox-ctx-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.inbox-ctx-item:hover .inbox-ctx-item-icon {
    color: var(--accent);
}

.inbox-ctx-item.danger:hover .inbox-ctx-item-icon {
    color: var(--danger);
}

@media (prefers-color-scheme: dark) {
    .mobile-fab {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    }

    .message-comment-chip,
    .message-reaction-chip {
        background: var(--bg-elevated);
    }
}
