/* Layouts for individual tabs: login, overview, lists/rows, drafts, conversations, activity. */
.stack > * + * { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-block { width: 100%; }
.form-grid > * + * { margin-top: 12px; }

/* login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login-card { width: min(400px, 100%); text-align: center; }
.login-card .field { text-align: start; }
.login-mark { border-radius: 14px; }

/* overview */
.state-card { border-inline-start: 6px solid var(--live); }
.state-card.is-paused { border-inline-start-color: var(--paused-strong); background: var(--paused-soft); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.25rem; overflow-wrap: anywhere; }
.stat-sub { font-size: .8rem; }
.stat-link { cursor: pointer; border-color: var(--accent); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* generic rows (contacts, conversations, pauses, activity) */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.card .row { background: var(--bg); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.row-wrap { flex-wrap: wrap; align-items: flex-start; }
.row-button { width: 100%; min-height: var(--tap); text-align: start; cursor: pointer; }
.row-button:hover { background: var(--surface-2); }
.row-wrap .row-main .input { width: 100%; }

/* bubbles (user/model text; dir="auto" is set in markup) */
.bubbles { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
.bubble { max-width: 100%; padding: 8px 12px; border-radius: 16px; background: var(--bubble-in); white-space: pre-wrap; text-align: start; }
.bubble-out { background: var(--bubble-out); }
.bubble-bot { background: var(--bubble-bot); }

/* drafts */
.draft .card-title h2 { overflow-wrap: anywhere; }
.quote { padding: 10px 12px; border-inline-start: 3px solid var(--border); background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.quote p { white-space: pre-wrap; }
.quote-label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.send-to { font-size: .95rem; }

/* conversations */
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; max-width: 88%; gap: 2px; }
.msg-in { align-self: flex-start; align-items: flex-start; }
.msg-out, .msg-bot { align-self: flex-end; align-items: flex-end; }

/* activity */
.event { align-items: flex-start; }
.event-detail { font-size: .92rem; }
.event time { white-space: nowrap; font-size: .8rem; }
