/* Text messages: Settings → Text messages and the Texts inbox (public/js/app/sms.js) */
.sms-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .sms-top { grid-template-columns: 1fr; } }
.sms-top .card, .sms-top + .card, .sms-top ~ .card { margin-bottom: 14px; }
.sms-kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; font-size: 14px; }
.sms-kv > span { color: var(--muted); }
.sms-meter { height: 12px; border-radius: 12px; background: var(--line2); overflow: hidden; }
.sms-meter i { display: block; height: 100%; background: var(--teal); border-radius: 12px; }
.sms-meter i.hot { background: var(--stop-ink); }
.sms-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sms-nums b { display: block; font: 900 24px var(--display); } .sms-nums span { color: var(--muted); font-size: 12.5px; }
.sms-bubble { display: inline-block; max-width: 420px; background: var(--line2); color: var(--ink); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sms-consent-demo { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.field.bad input { border-color: var(--stop-ink); }
/* inbox */
.sms-inbox { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; min-height: 60vh; }
.sms-list { display: flex; flex-direction: column; gap: 6px; max-height: 72vh; overflow-y: auto; }
.sms-th { display: grid; grid-template-columns: 1fr; gap: 2px; text-align: left; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; min-height: 64px; }
.sms-th.on { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); }
.sms-th .nm { display: flex; align-items: center; gap: 8px; } .sms-th .nm b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-th .pv { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-th .at { color: var(--muted); font-size: 12px; }
.sms-th.unread .pv { color: var(--ink); font-weight: 600; }
.sms-dot { background: var(--accent, #e11d2e); color: #fff; border-radius: 10px; font-size: 11.5px; font-weight: 800; padding: 1px 7px; }
.sms-pane { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.sms-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); } .sms-head > div { flex: 1; min-width: 0; }
.sms-back { display: none; }
.sms-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; max-height: 56vh; min-height: 200px; }
.sms-msg { max-width: 78%; } .sms-msg .b { border-radius: 16px; padding: 9px 13px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.sms-msg.in { align-self: flex-start; } .sms-msg.in .b { background: var(--line2); border-bottom-left-radius: 4px; }
.sms-msg.out { align-self: flex-end; text-align: right; } .sms-msg.out .b { background: #0b6670; color: #fff; border-bottom-right-radius: 4px; text-align: left; }
.sms-msg.failed .b { background: var(--stop-bg); color: var(--stop-ink); }
.sms-msg .meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.sms-reply { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sms-reply textarea { width: 100%; resize: vertical; }
@media (max-width: 900px) {
  .sms-inbox { grid-template-columns: 1fr; }
  .sms-inbox .sms-pane { display: none; } .sms-inbox.reading .sms-pane { display: flex; } .sms-inbox.reading .sms-list { display: none; }
  .sms-back { display: inline-flex; } .sms-msg { max-width: 90%; }
}
.sms-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sms-hours input { width: 150px; flex: none; }
