.sms-dialog{width:min(800px,95vw);max-height:92vh;overflow:auto}.sms-dialog label{display:block;margin:12px 0;font-size:13px}.sms-dialog textarea,.sms-dialog select{width:100%;margin-top:6px}.sms-dialog textarea{font:inherit;padding:12px;resize:vertical}.sms-note{font-size:13px;line-height:1.7;margin:8px 0;color:#81705f}.sms-compose-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.sms-check{display:flex!important;align-items:center;gap:8px;line-height:1.6}.sms-check input{width:auto;margin:0}.sms-preview-box{margin:16px 0;padding:16px;border:2px solid #b69a79;border-radius:7px;background:#faf5ec}.sms-preview-box pre{white-space:pre-wrap;font:inherit;background:#fff;border:1px solid #ddd1c0;padding:12px;margin:12px 0}.sms-preview-box details{margin-top:10px}.sms-number-list{max-height:130px;overflow:auto;overflow-wrap:anywhere;background:white;padding:10px;font-size:13px}.sms-error{color:#a1382f;font-size:13px;margin:10px 0;line-height:1.7}.sms-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.sms-config-grid input{width:100%;margin-top:6px}.sms-result-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.sms-preview-box .table-wrap{max-height:280px;overflow:auto}.sms-preview-box td,.sms-preview-box th{font-size:13px;padding:6px 9px}#sms-pool-compose{margin-top:12px}#sms-template-save input{margin-right:8px}@media(max-width:600px){.sms-config-grid{grid-template-columns:1fr}}

.sms-recent-item{display:block;width:100%;text-align:left;margin:6px 0;font-size:13px}

#account-sms-settings{margin-top:24px;padding:18px;border:2px solid #b79b78;border-radius:7px;background:#faf5ec}
#account-sms-settings>h3{font-size:17px;color:#704b34;margin:0 0 8px}
#accounts-dialog #account-sms-settings #sms-settings-form{border-top:0;margin-top:8px;padding-top:0}
#account-sms-settings label{display:block;font-size:13px;margin:12px 0}
#account-sms-settings .sms-config-grid input{width:100%;margin-top:6px}
#account-sms-settings .sms-check{display:flex;align-items:center}

body aside nav.top-primary-nav{grid-template-columns:repeat(7,minmax(0,1fr))}
#messages-view{border:2px solid #a77b58;border-radius:7px}
#messages-view>.panel-head{background:#eee1d1;border-bottom:1px solid #c4a586}
.messages-toolbar{display:flex;gap:8px;flex-wrap:wrap}
#messages-view>.table-wrap{max-height:650px;overflow:auto}
.messages-table{width:100%;min-width:1050px;table-layout:fixed}
.messages-table th{position:sticky;top:0;z-index:1}
.messages-table th,.messages-table td{font-size:13px;padding:7px 9px;vertical-align:top}
.messages-table th:nth-child(1){width:110px}.messages-table th:nth-child(2){width:100px}.messages-table th:nth-child(3){width:100px}.messages-table th:nth-child(4){width:130px}.messages-table th:nth-child(5){width:75px}.messages-table th:nth-child(7){width:110px}.messages-table th:nth-child(8){width:100px}
.messages-content{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:900px){body aside nav.top-primary-nav{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:500px){body aside nav.top-primary-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}

#sms-bank-open{margin:7px 0 0}
#sms-bank-dialog{width:min(1000px,95vw)}
.sms-bank-layout{display:grid;grid-template-columns:minmax(240px,1fr) minmax(320px,1.5fr);gap:18px;margin-top:16px}
.sms-bank-list{max-height:420px;overflow:auto;border:1px solid #d8c8b4;border-radius:5px;background:#fff;margin-top:10px}
.sms-bank-list .sms-bank-item{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #e4d8ca;border-radius:0;background:#fff;padding:11px 13px;color:#514235}
.sms-bank-item strong,.sms-bank-item small{display:block;line-height:1.6}
.sms-bank-item strong{font-size:14px}.sms-bank-item small{font-size:12px;white-space:pre-wrap;color:#8b7966}
.sms-bank-list .sms-bank-item:hover,.sms-bank-list .sms-bank-item.active{background:#f0e2cf;box-shadow:inset 3px 0 #936442}
#sms-bank-name{width:100%}
@media(max-width:700px){.sms-bank-layout{grid-template-columns:1fr}.sms-bank-list{max-height:200px}}

#sms-bank-dialog{width:min(1120px,95vw)}
.sms-bank-layout{grid-template-columns:minmax(300px,1fr) minmax(330px,1fr);align-items:start}
.sms-bank-table{width:100%;table-layout:fixed;border-collapse:collapse}
.sms-bank-table th:first-child{width:35%}
.sms-bank-table th{position:sticky;top:0;z-index:1;background:#eee3d4;text-align:left;color:#785e45}
.sms-bank-table th,.sms-bank-table td{padding:9px 11px;border-bottom:1px solid #dfd2c1;border-right:1px solid #e5d9c9;font-size:13px;vertical-align:top}
.sms-bank-table th:last-child,.sms-bank-table td:last-child{border-right:0}
.sms-bank-table tr[data-bank-item]{cursor:pointer}
.sms-bank-table tr[data-bank-item]:hover td{background:#f7eddf}
.sms-bank-table tr.active td{background:#efe0cb}
.sms-bank-table tr.active td:first-child{box-shadow:inset 3px 0 #936442}
.sms-bank-table .text-link{font-size:13px;font-weight:700;text-align:left;white-space:normal;overflow-wrap:anywhere;padding:0}
.sms-bank-preview{white-space:pre-wrap;overflow-wrap:anywhere;color:#86715b;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;line-height:1.6}
.sms-bank-detail{border:1px solid #d8c8b4;border-radius:6px;padding:15px;background:#faf6ee}
.sms-bank-detail>h3{font-size:16px;color:#704b34;margin:0 0 12px}
@media(max-width:700px){.sms-bank-layout{grid-template-columns:1fr}}

/* Compact one-line rows in the standard message list. */
.sms-bank-table .sms-bank-preview{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset;line-height:1.5}
.sms-bank-table .text-link{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}
.sms-bank-table td{padding:7px 10px;vertical-align:middle}

body #completed-list .today-table th:first-child{width:140px}
.today-sms-check{width:17px;height:17px;margin:0 8px 0 0;vertical-align:middle;accent-color:#7d633d;cursor:pointer}
.today-sms-check:disabled{cursor:default;opacity:.45}
.today-sms-recipients{margin:0;padding:13px 16px;border-top:1px solid #afbf98;background:#f4f7ee}
.today-sms-recipient-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.today-sms-recipient-head strong{margin-right:auto;font-size:14px;color:#52653e}
.today-sms-recipient-head span{font-size:13px;font-weight:400;margin-left:8px}
.today-sms-recipients p{font-size:12px;margin:8px 0;color:#7b866e}
.today-sms-recipients textarea{width:100%;padding:8px;font:inherit;font-size:13px;border:1px solid #cbd6be;border-radius:4px;resize:vertical;background:#fff}

.today-sms-unavailable{display:block;margin-top:3px;font-size:11px;line-height:1.4;color:#9a705a;white-space:normal}.today-sms-unavailable[hidden]{display:none}

/* Use one column definition and scrollbar gutter for both reception tables. */
body #today-view :is(#today-list,#completed-list)>.table-wrap{scrollbar-gutter:stable;overflow:auto}
body #today-view :is(#today-list,#completed-list) .today-table{width:100%;min-width:1370px;table-layout:fixed}
body #today-view :is(#today-list,#completed-list) .today-table thead th{width:auto}
body #today-view .reception-shared-columns col:nth-child(1){width:140px}
body #today-view .reception-shared-columns col:nth-child(2){width:165px}
body #today-view .reception-shared-columns col:nth-child(3){width:135px}
body #today-view .reception-shared-columns col:nth-child(4){width:110px}
body #today-view .reception-shared-columns col:nth-child(5){width:330px}
body #today-view .reception-shared-columns col:nth-child(6){width:110px}
body #today-view .reception-shared-columns col:nth-child(7){width:130px}
body #today-view .reception-shared-columns col:nth-child(8){width:250px}

/* One-line message history; full content appears below the list. */
#messages-view .messages-table th:first-child{width:175px}
#messages-view .messages-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;height:35px;padding:6px 9px}
#messages-view .messages-table .messages-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#messages-view .message-preview-button{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:13px;padding:0;font-weight:400}
#messages-view tr[data-message-index]{cursor:pointer}
#messages-view tr[data-message-index]:hover td{background:#f6edde}
#messages-view tr.message-selected td{background:#eddfcb}
#messages-view tr[data-message-index]:focus-visible{outline:2px solid #ad855a;outline-offset:-2px}
.message-detail-panel{margin:16px;padding:16px;border:2px solid #baa17f;border-radius:7px;background:#faf5ec}
.message-detail-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0}
.message-detail-info span{display:block;font-size:12px;color:#95806a;margin-bottom:4px}
.message-detail-info strong{font-size:13px;color:#514235;overflow-wrap:anywhere}
#message-detail-subject{font-size:15px;font-weight:700;margin:8px 0}
#message-detail-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:14px;line-height:1.8;padding:14px;border:1px solid #dfd0bd;border-radius:5px;background:white;margin:0}
@media(max-width:650px){.message-detail-info{grid-template-columns:repeat(2,minmax(0,1fr))}}

.sms-direct-fields{padding:12px 15px;border:1px solid #d7c3aa;border-radius:6px;background:#faf4e9;margin:12px 0}
.sms-direct-fields input[type=tel],.sms-direct-fields input[type=text]{width:100%}
