/*
 * SendSMS cabinet, client pages part 2 (Claude Design canvas): contacts, templates, plan and balance, API.
 * Every rule is scoped to html[data-brand="sendsms"]; class prefixes: ss-pk- (shared on these pages),
 * ss-ct- (contacts), ss-tp- (templates), ss-bl- (plan and balance), ss-ak- (API keys).
 */

/* ---------- shared: heading, state dot, required mark ---------- */
html[data-brand="sendsms"] .ss-pk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-pk-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
html[data-brand="sendsms"] .ss-pk-head-text h1 { margin: 0; font-size: 32px; letter-spacing: -0.02em; }
html[data-brand="sendsms"] .ss-pk-head-text p { margin: 0; color: var(--text-secondary); font-size: 15px; }
html[data-brand="sendsms"] .ss-pk-head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; }
html[data-brand="sendsms"] .ss-pk-head-actions .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-pk-head-actions a.btn { text-decoration: none; }
html[data-brand="sendsms"] .ss-pk-req { color: var(--danger-strong); font-weight: 700; }

/* ---------- contacts ---------- */
html[data-brand="sendsms"] .ss-ct-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); width: max-content; max-width: 100%; }
html[data-brand="sendsms"] .ss-ct-tab { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-tab:hover { color: var(--text); }
html[data-brand="sendsms"] .ss-ct-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 6px #13213c1a; }
html[data-brand="sendsms"] #aud-content { display: flex; flex-direction: column; gap: 16px; }
/* панель «Контакты» меряется по ширине своего блока (меню открыто или свёрнуто): поиск, фильтры и «Скачать таблицу» переносятся, а не уходят за край */
html[data-brand="sendsms"] #aud-content { container: ss-ct-book / inline-size; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
html[data-brand="sendsms"] .ss-ct-search { position: relative; flex: 1 1 280px; display: flex; align-items: center; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-search > svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-secondary); pointer-events: none; }
html[data-brand="sendsms"] .ss-ct-search .input { width: 100%; padding-left: 40px; border-radius: 12px; border-color: var(--border); }
html[data-brand="sendsms"] .ss-ct-card { padding: 12px 16px; }
html[data-brand="sendsms"] .ss-ct-card .table-wrap { border-radius: 10px; position: relative; }
html[data-brand="sendsms"] .ss-ct-table { width: 100%; min-width: 560px; border-collapse: collapse; }
html[data-brand="sendsms"] .ss-ct-table th { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; white-space: nowrap; border-bottom: 0; }
html[data-brand="sendsms"] .ss-ct-table th:first-child { border-radius: 10px 0 0 10px; }
html[data-brand="sendsms"] .ss-ct-table th:last-child { border-radius: 0 10px 10px 0; }
html[data-brand="sendsms"] .table-wrap > .ss-ct-table :is(th, td):first-child { padding-left: 16px; }
html[data-brand="sendsms"] .table-wrap > .ss-ct-table :is(th, td):last-child { padding-right: 8px; }
html[data-brand="sendsms"] .ss-ct-table tbody tr:last-child td { border-bottom: 0; }
html[data-brand="sendsms"] .ss-ct-table tr.clickable { cursor: pointer; }
html[data-brand="sendsms"] .ss-ct-table tr.clickable:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: -2px; }
html[data-brand="sendsms"] .ss-ct-name { font-weight: 650; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ct-nowrap { white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-end { width: 1%; text-align: right; white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-tag { display: inline-flex; padding: 2px 8px; border-radius: 7px; background: var(--surface-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-filter { font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); }
html[data-brand="sendsms"] .ss-ct-card .pagination { padding: 12px 0 4px; }
html[data-brand="sendsms"] .ss-ct-status:empty { display: none; }
html[data-brand="sendsms"] .ss-ct-status { padding: 4px 0; font-size: 13px; }
html[data-brand="sendsms"] .ss-ct-pick-empty { margin: 0; color: var(--text-secondary); }

/* upload menu */
html[data-brand="sendsms"] .ss-ct-menu { position: relative; }
html[data-brand="sendsms"] .ss-ct-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
html[data-brand="sendsms"] .ss-ct-menu > summary::-webkit-details-marker { display: none; }
html[data-brand="sendsms"] .ss-ct-menu > summary svg:last-child { width: 14px; height: 14px; }
html[data-brand="sendsms"] .ss-ct-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; }
html[data-brand="sendsms"] .ss-ct-menu-title { padding: 10px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
html[data-brand="sendsms"] .ss-ct-menu-item:hover, html[data-brand="sendsms"] .ss-ct-menu-item:focus-visible { background: var(--surface-3); }
html[data-brand="sendsms"] .ss-ct-menu-item small { display: block; font-size: 12px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-file { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 10px; font-weight: 800; }
html[data-brand="sendsms"] .ss-ct-file svg { width: 18px; height: 18px; }
html[data-brand="sendsms"] .ss-ct-file--csv { background: var(--info-soft); color: var(--info); }
html[data-brand="sendsms"] .ss-ct-file--txt { background: var(--surface-3); color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-file--xlsx { background: var(--success-soft); color: var(--success-strong); }
html[data-brand="sendsms"] .ss-ct-file--vcf { background: var(--primary-soft); color: var(--ss-accent-text); }
html[data-brand="sendsms"] .ss-ct-file--tpl { background: var(--surface-3); color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
html[data-brand="sendsms"] .ss-ct-menu-title small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 500; }
html[data-brand="sendsms"] #ss-ct-io .ss-ct-menu-panel { left: 0; right: auto; }
html[data-brand="sendsms"] .ss-ct-page .btn { white-space: nowrap; }

/* contact book (tab "Contacts") */
html[data-brand="sendsms"] .ss-ct-book-tools .ss-select { flex: 0 1 200px; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-book-tools > .btn { flex: 0 0 auto; }
@container ss-ct-book (max-width: 760px) {
  html[data-brand="sendsms"] .ss-ct-book-tools .ss-ct-search { flex: 1 1 100%; }
  html[data-brand="sendsms"] .ss-ct-book-tools .ss-select { flex: 1 1 calc(50% - 5px); }
}
@container ss-ct-book (max-width: 480px) { html[data-brand="sendsms"] .ss-ct-book-tools > .btn { flex: 1 1 100%; } }
html[data-brand="sendsms"] .ss-ct-book-tools .ss-select select { border-radius: 12px; border-color: var(--border); }
html[data-brand="sendsms"] .ss-ct-table.ss-ct-book { min-width: 820px; }
html[data-brand="sendsms"] .ss-ct-book td { vertical-align: middle; }
html[data-brand="sendsms"] .ss-ct-sub { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ct-tags { display: flex; flex-wrap: wrap; gap: 4px; }
html[data-brand="sendsms"] .ss-ct-progress-list:empty { display: none; }
html[data-brand="sendsms"] .ss-ct-progress-list { display: flex; flex-direction: column; gap: 8px; }
html[data-brand="sendsms"] .ss-ct-progress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 240px) auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
html[data-brand="sendsms"] .ss-ct-progress-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
html[data-brand="sendsms"] .ss-ct-progress-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-progress-text span { color: var(--text-secondary); font-size: 13px; }
html[data-brand="sendsms"] .ss-ct-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
html[data-brand="sendsms"] .ss-ct-bar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .4s ease; }
html[data-brand="sendsms"] .ss-ct-bar--wait i { opacity: .45; }

/* import window and the contact card */
html[data-brand="sendsms"] .ss-ct-wiz { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-wiz p { margin: 0; }
html[data-brand="sendsms"] .ss-ct-wiz-file { overflow-wrap: anywhere; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-wiz-file b { color: var(--text); }
html[data-brand="sendsms"] .ss-ct-wiz-status { font-weight: 600; }
html[data-brand="sendsms"] .ss-ct-wiz-h { margin: 6px 0 0; font-size: 15px; }
html[data-brand="sendsms"] .ss-ct-wiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html[data-brand="sendsms"] .ss-ct-wiz-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-brand="sendsms"] .ss-ct-wiz-grid .field, html[data-brand="sendsms"] .ss-ct-card-form .field { margin: 0; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-wiz-grid .ss-select, html[data-brand="sendsms"] .ss-ct-card-form .input { width: 100%; }
html[data-brand="sendsms"] .ss-ct-wiz-msg:empty { display: none; }
html[data-brand="sendsms"] .ss-ct-wiz-msg { color: var(--danger-strong); font-weight: 600; font-size: 14px; }
html[data-brand="sendsms"] .ss-ct-wiz-foot { flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-ct-wiz-foot .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-ct-foot-start { margin-right: auto; }
html[data-brand="sendsms"] .ss-ct-preview { border: 1px solid var(--border); border-radius: 12px; max-height: 260px; }
html[data-brand="sendsms"] .ss-ct-preview table { width: 100%; border-collapse: collapse; font-size: 13px; }
html[data-brand="sendsms"] .ss-ct-preview th, html[data-brand="sendsms"] .ss-ct-preview td { padding: 8px 12px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
html[data-brand="sendsms"] .ss-ct-preview th { background: var(--surface-3); font-weight: 600; }
html[data-brand="sendsms"] .ss-ct-preview th small { display: block; font-size: 11px; font-weight: 700; color: var(--ss-accent-text); text-transform: uppercase; letter-spacing: .05em; }
html[data-brand="sendsms"] .ss-ct-preview td.ss-ct-mapped { background: var(--primary-soft); }
html[data-brand="sendsms"] .ss-ct-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-fs legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 700; }
html[data-brand="sendsms"] .ss-ct-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
html[data-brand="sendsms"] .ss-ct-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; min-height: 28px; }
html[data-brand="sendsms"] .ss-ct-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
html[data-brand="sendsms"] .ss-ct-card-form { display: flex; flex-direction: column; gap: 14px; }
html[data-brand="sendsms"] .ss-ct-card-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
html[data-brand="sendsms"] .ss-ct-card-dates .field { min-width: 0; margin: 0; }
html[data-brand="sendsms"] .ss-ct-card-dates .input { width: 100%; min-width: 0; }
html[data-brand="sendsms"] .ss-ct-card-dates .field-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-brand="sendsms"] .ss-ct-card-dates .field-hint { margin: 4px 0 0; }
html[data-brand="sendsms"] .ss-ct-fs .ss-ct-dates-hint { margin: 10px 0 0; }
@media (max-width: 560px) { html[data-brand="sendsms"] .ss-ct-card-dates { grid-template-columns: minmax(0, 1fr); } }
html[data-brand="sendsms"] .ss-ct-err { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger-strong); font-weight: 600; }
html[data-brand="sendsms"] .ss-ct-err svg { flex-shrink: 0; width: 18px; height: 18px; }
html[data-brand="sendsms"] .ss-ct-res { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
html[data-brand="sendsms"] .ss-ct-res-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
html[data-brand="sendsms"] .ss-ct-res-row b { font-variant-numeric: tabular-nums; }
html[data-brand="sendsms"] .ss-ct-res-row--ok b { color: var(--success-strong); }
html[data-brand="sendsms"] .ss-ct-res-row--warn b { color: var(--warning); }
html[data-brand="sendsms"] .ss-ct-res-sub { background: var(--surface-2); }
html[data-brand="sendsms"] .ss-ct-res-sub .ss-ct-res-row { padding-left: 28px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ct-res-sub .ss-ct-res-row:last-child { border-bottom: 0; }

/* ---------- templates ---------- */
html[data-brand="sendsms"] .ss-tp-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-tp-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
html[data-brand="sendsms"] .ss-tp-card { padding: 0 0 8px; overflow: hidden; }
html[data-brand="sendsms"] .ss-tp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 140px 120px; gap: 16px; padding: 14px 56px 14px 20px; background: var(--surface-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tp-list { display: flex; flex-direction: column; }
html[data-brand="sendsms"] .ss-tp-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); min-width: 0; padding-right: 16px; }
html[data-brand="sendsms"] .ss-tp-row:last-child { border-bottom: 0; }
html[data-brand="sendsms"] .ss-tp-row[data-selected] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
html[data-brand="sendsms"] .ss-tp-row--skeleton { flex-direction: column; align-items: stretch; gap: 8px; padding: 16px 20px; }
html[data-brand="sendsms"] .ss-tp-open { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 140px 120px; align-items: center; gap: 16px; padding: 16px 0 16px 20px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
html[data-brand="sendsms"] .ss-tp-open:focus-visible { outline: 2px solid var(--ss-focus); outline-offset: -2px; }
html[data-brand="sendsms"] .ss-tp-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html[data-brand="sendsms"] .ss-tp-text b { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-tp-line { font-size: 14px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
html[data-brand="sendsms"] .ss-tp-chip { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
html[data-brand="sendsms"] .ss-tp-size { font-size: 13px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tp-state .ss-status { background: none; padding: 0; }
html[data-brand="sendsms"] .ss-tp-tools { display: flex; gap: 2px; flex-shrink: 0; width: 40px; justify-content: flex-end; }
html[data-brand="sendsms"] .ss-tp-card .pagination { padding: 12px 20px 8px; }
html[data-brand="sendsms"] .ss-tp-card .pagination:empty { display: none; }
html[data-brand="sendsms"] .ss-tp-preview { padding: 22px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 16px; }
html[data-brand="sendsms"] .ss-tp-pick { margin: 0; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tp-pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
html[data-brand="sendsms"] .ss-tp-pv-head h2 { margin: 0 0 4px; font-size: 18px; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-tp-pv-head .ss-status { background: none; padding: 0; }
html[data-brand="sendsms"] .ss-tp-facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
html[data-brand="sendsms"] .ss-tp-facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; font-size: 14px; }
html[data-brand="sendsms"] .ss-tp-facts dt { color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tp-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-tp-facts dd small { display: block; font-weight: 400; font-size: 12px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tp-body { white-space: pre-wrap; }
html[data-brand="sendsms"] .ss-tp-pv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 1200px) { html[data-brand="sendsms"] .ss-tp-split { grid-template-columns: minmax(0, 1fr); } html[data-brand="sendsms"] .ss-tp-preview { position: static; } }
@media (max-width: 760px) {
  html[data-brand="sendsms"] .ss-tp-cols { display: none; }
  html[data-brand="sendsms"] .ss-tp-open { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 0 14px 16px; }
  html[data-brand="sendsms"] .ss-tp-row { align-items: flex-start; padding-top: 6px; }
  html[data-brand="sendsms"] .ss-tp-filter > [role="group"] { max-width: 100%; overflow-x: auto; }
}

/* ---------- plan and balance ---------- */
html[data-brand="sendsms"] .ss-bl-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--danger-soft); color: var(--danger-strong); font-size: 14px; font-weight: 550; }
html[data-brand="sendsms"] .ss-bl-alert[hidden] { display: none; }
html[data-brand="sendsms"] .ss-bl-alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
/* Canvas Plans.dc.html: a 2/3 "available" card with actions and a soft strip, a 1/3 card next to it; then a second row. */
html[data-brand="sendsms"] .ss-bl-page { gap: 22px; }
html[data-brand="sendsms"] .ss-bl-stats { display: flex; flex-direction: column; gap: 16px; }
html[data-brand="sendsms"] .ss-bl-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
html[data-brand="sendsms"] .ss-bl-hero:not(:has(> :nth-child(2))) { grid-template-columns: minmax(0, 1fr); }
html[data-brand="sendsms"] .ss-bl-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
html[data-brand="sendsms"] .ss-bl-card { padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
html[data-brand="sendsms"] .ss-bl-main { gap: 14px; }
html[data-brand="sendsms"] .ss-bl-main-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-bl-main-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-brand="sendsms"] .ss-bl-main-actions { display: flex; gap: 10px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-bl-main-actions .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-bl-label { font-size: 14px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-sub { font-size: 14px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-big { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-bl-big span { font-size: 16px; color: var(--text-secondary); font-weight: 650; letter-spacing: 0; }
html[data-brand="sendsms"] .ss-bl-huge { font-size: 40px; letter-spacing: -0.03em; }
html[data-brand="sendsms"] .ss-bl-huge span { font-size: 18px; }
html[data-brand="sendsms"] .ss-bl-debt, html[data-brand="sendsms"] .ss-bl-debt span { color: var(--danger-strong); }
html[data-brand="sendsms"] .ss-bl-note { margin: 0; font-size: 14px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-small { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
html[data-brand="sendsms"] .ss-bl-strip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); font-size: 14px; }
html[data-brand="sendsms"] .ss-bl-strip > .ss-ic { width: 18px; height: 18px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-strip > span { flex: 1 1 200px; min-width: 0; }
html[data-brand="sendsms"] .ss-bl-strip-limit { flex-direction: column; align-items: stretch; gap: 8px; }
html[data-brand="sendsms"] .ss-bl-strip-limit > span { flex: none; }
html[data-brand="sendsms"] .ss-bl-meter { height: 10px; border-radius: 99px; background: var(--surface); overflow: hidden; }
html[data-brand="sendsms"] .ss-bl-meter i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
html[data-brand="sendsms"] .ss-bl-bars { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin-top: 4px; }
html[data-brand="sendsms"] .ss-bl-bars i { display: block; min-width: 4px; }
html[data-brand="sendsms"] .ss-bl-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-legend li { display: inline-flex; align-items: center; gap: 6px; }
html[data-brand="sendsms"] .ss-bl-legend li i { width: 8px; height: 8px; border-radius: 50%; display: block; }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="a"] { background: var(--primary); }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="b"] { background: var(--success); }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="c"] { background: var(--info); }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="d"] { background: var(--warning); }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="e"] { background: var(--text-secondary); }
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="p"] { background: var(--text); } /* message package fee (E14): its own colour, distinct from every channel */
html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="f"], html[data-brand="sendsms"] :is(.ss-bl-bars, .ss-bl-legend) [data-tone="g"] { background: var(--border-strong); }
html[data-brand="sendsms"] .ss-bl-link { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ss-accent-text); cursor: pointer; white-space: nowrap; text-align: left; }
html[data-brand="sendsms"] .ss-bl-link:hover { color: var(--text); }
html[data-brand="sendsms"] .ss-bl-foot { margin-top: auto; padding-top: 8px; align-self: flex-start; }
html[data-brand="sendsms"] .ss-bl-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
html[data-brand="sendsms"] .ss-bl-lines-stack { grid-template-columns: minmax(0, 1fr); }
html[data-brand="sendsms"] .ss-bl-line { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-brand="sendsms"] .ss-bl-line span { font-size: 13px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-line b { font-size: 16px; font-variant-numeric: tabular-nums; }
html[data-brand="sendsms"] .ss-bl-line small { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-bl-scopes { list-style: none; margin: 6px 0 0; padding: 10px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
html[data-brand="sendsms"] .ss-bl-scopes li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
html[data-brand="sendsms"] .ss-bl-scopes li span { color: var(--text-secondary); min-width: 0; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-bl-scopes li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Recent operations: name bold + muted line, amount on the right (+ green); the latest five until "All operations". */
html[data-brand="sendsms"] .ss-bl-head-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-bl-ops-list { display: flex; flex-direction: column; }
html[data-brand="sendsms"] .ss-bl-op-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
html[data-brand="sendsms"] .ss-bl-op-row:last-child { border-bottom: 0; }
html[data-brand="sendsms"] .ss-bl-ops:not([data-expanded]) .ss-bl-op-row:nth-child(n+6) { display: none; }
html[data-brand="sendsms"] .ss-bl-ops:not([data-expanded]) .ss-bl-op-row:nth-child(5) { border-bottom: 0; }
html[data-brand="sendsms"] .ss-bl-ops:not([data-expanded]) .pagination { display: none; }
html[data-brand="sendsms"] .ss-bl-op-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html[data-brand="sendsms"] .ss-bl-op-text b { font-weight: 650; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-bl-op-text span { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
/* Shared "How to top up" window (sendsmsTopup.js, prefix ss-tu-): three ways in one dialog. */
html[data-brand="sendsms"] .ss-tu { display: flex; flex-direction: column; gap: 14px; }
html[data-brand="sendsms"] .ss-tu-way { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
html[data-brand="sendsms"] .ss-tu-way h3 { margin: 0; font-size: 15px; }
html[data-brand="sendsms"] .ss-tu-way p { margin: 0; font-size: 14px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tu-way .btn { align-self: flex-start; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tu-req { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
html[data-brand="sendsms"] .ss-tu-req dt { color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tu-req dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; user-select: all; }
html[data-brand="sendsms"] .ss-tu-way h4 { margin: 0; font-size: 14px; }
html[data-brand="sendsms"] .ss-tu-ask { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
html[data-brand="sendsms"] .ss-tu-ask-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-tu-ask-row .field { flex: 1 1 200px; min-width: 0; }
html[data-brand="sendsms"] .ss-tu-ask-row .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-tu-amount { display: flex; align-items: center; gap: 8px; }
html[data-brand="sendsms"] .ss-tu-amount .input { flex: 1 1 auto; min-width: 0; }
html[data-brand="sendsms"] .ss-tu-amount span { font-weight: 600; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tu-amount .input[aria-invalid="true"] { border-color: var(--danger); }
html[data-brand="sendsms"] p.ss-tu-hint { font-size: 13px; }
html[data-brand="sendsms"] .ss-bl-strip[hidden], html[data-brand="sendsms"] .ss-bl-packages[hidden] { display: none; }
html[data-brand="sendsms"] .ss-tu-contact a { color: var(--ss-accent-text); font-weight: 600; }
html[data-brand="sendsms"] .ss-bl-section { padding: 22px; gap: 12px; }
html[data-brand="sendsms"] .ss-bl-section[hidden] { display: none; }
html[data-brand="sendsms"] .ss-bl-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-bl-section-head h2 { margin: 0; font-size: 18px; }
html[data-brand="sendsms"] .ss-bl-section-head p { margin: 4px 0 0; font-size: 14px; color: var(--text-secondary); max-width: 640px; }
html[data-brand="sendsms"] .ss-bl-section-head .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-bl-wrap { position: relative; border-radius: 10px; }
html[data-brand="sendsms"] .ss-bl-table { width: 100%; min-width: 640px; border-collapse: collapse; }
html[data-brand="sendsms"] .ss-bl-table th { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; white-space: nowrap; border-bottom: 0; }
html[data-brand="sendsms"] .ss-bl-table th:first-child { border-radius: 10px 0 0 10px; }
html[data-brand="sendsms"] .ss-bl-table th:last-child { border-radius: 0 10px 10px 0; }
html[data-brand="sendsms"] .table-wrap > .ss-bl-table :is(th, td):first-child { padding-left: 16px; }
html[data-brand="sendsms"] .table-wrap > .ss-bl-table :is(th, td):last-child { padding-right: 16px; }
html[data-brand="sendsms"] .ss-bl-table tbody tr:last-child td { border-bottom: 0; }
html[data-brand="sendsms"] .ss-bl-op { display: block; font-weight: 650; }
html[data-brand="sendsms"] .ss-bl-op-note { display: block; font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-bl-nowrap { white-space: nowrap; }
html[data-brand="sendsms"] .ss-bl-amount { font-weight: 650; font-variant-numeric: tabular-nums; }
html[data-brand="sendsms"] .ss-bl-plus { color: var(--success-strong); }
html[data-brand="sendsms"] .ss-bl-section .pagination { padding: 8px 0 0; }
html[data-brand="sendsms"] .ss-bl-section .pagination[hidden], html[data-brand="sendsms"] .ss-bl-wrap[hidden], html[data-brand="sendsms"] .ss-bl-empty[hidden] { display: none; }
html[data-brand="sendsms"] .ss-bl-empty { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-3); color: var(--text-secondary); font-size: 14px; }
@media (max-width: 760px) {
  html[data-brand="sendsms"] .ss-bl-hero, html[data-brand="sendsms"] .ss-bl-row2 { grid-template-columns: minmax(0, 1fr); }
  html[data-brand="sendsms"] .ss-tu-req { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  html[data-brand="sendsms"] .ss-tu-req dd { margin-bottom: 6px; }
  html[data-brand="sendsms"] .ss-bl-huge { font-size: 32px; }
  html[data-brand="sendsms"] .ss-bl-op-row { flex-wrap: wrap; gap: 4px 16px; }
  html[data-brand="sendsms"] .ss-bl-card, html[data-brand="sendsms"] .ss-bl-section { padding: 16px; }
}

/* ---------- API keys ---------- */
html[data-brand="sendsms"] .ss-ak-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
html[data-brand="sendsms"] .ss-ak-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-ak-head h2 { margin: 0; font-size: 18px; }
html[data-brand="sendsms"] .ss-ak-head p { margin: 4px 0 0; font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ak-head code { font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); }
html[data-brand="sendsms"] .ss-ak-head .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-ak-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
html[data-brand="sendsms"] .ss-ak-list > .empty-state { grid-column: 1 / -1; }
html[data-brand="sendsms"] .ss-ak-key { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html[data-brand="sendsms"] .ss-ak-key-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
html[data-brand="sendsms"] .ss-ak-key-top b { min-width: 0; overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ak-key-state { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
html[data-brand="sendsms"] .ss-ak-mask { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ak-facts { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
html[data-brand="sendsms"] .ss-ak-card .pagination { padding: 4px 0 0; }
html[data-brand="sendsms"] .ss-ak-head > div:first-child { flex: 1 1 320px; min-width: 0; }
html[data-brand="sendsms"] .ss-ak-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
html[data-brand="sendsms"] .ss-ak-ip { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); min-width: 0; }
html[data-brand="sendsms"] .ss-ak-ip-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ak-ip-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; }
html[data-brand="sendsms"] .ss-ak-ip-row .btn { white-space: nowrap; }
html[data-brand="sendsms"] .ss-ak-ip-row .ss-status { white-space: normal; max-width: 100%; }
html[data-brand="sendsms"] .ss-ak-ip-row .ss-status i { flex: 0 0 8px; }
html[data-brand="sendsms"] .ss-ak-ip-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-ak-ip-list code { font-family: var(--font-mono); font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  html[data-brand="sendsms"] .ss-ak-card { padding: 16px; }
  html[data-brand="sendsms"] .ss-ak-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- header balance pill (canvas Topbar, prefix ss-tb-) and "Top up" at refusals ---------- */
html[data-brand="sendsms"] .ss-tb-balance { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 14px; border-radius: 12px; background: var(--surface-3); font-weight: 600; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tb-balance[hidden] { display: none; }
html[data-brand="sendsms"] .ss-tb-amount { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tb-amount:hover b { color: var(--ss-accent-text); }
html[data-brand="sendsms"] .ss-tb-label { color: var(--text-secondary); font-weight: 500; }
html[data-brand="sendsms"] .ss-tb-balance:not(:has(.ss-tb-topup)) { padding-right: 14px; }
html[data-brand="sendsms"] .ss-tb-topup { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--primary); color: var(--text-on-primary); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tb-topup:hover { background: var(--primary-hover); }
html[data-brand="sendsms"] .ss-tb-topup .ss-ic { width: 15px; height: 15px; stroke-width: 2.2; }
html[data-brand="sendsms"] .ss-tu-refusal { margin-top: 8px; white-space: nowrap; }
html[data-brand="sendsms"] .ss-tu-refusal .ss-ic { width: 15px; height: 15px; }
html[data-brand="sendsms"] .ss-tu-short { margin: 0; color: var(--text-secondary); }
@media (max-width: 900px) {
  html[data-brand="sendsms"] .ss-tb-label { display: none; }
}
@media (max-width: 640px) {
  html[data-brand="sendsms"] .ss-tb-balance { padding-left: 10px; gap: 2px; }
  html[data-brand="sendsms"] .ss-tb-amount { display: none; }
  html[data-brand="sendsms"] .ss-tb-balance { padding: 0 4px; background: transparent; }
  html[data-brand="sendsms"] .ss-tb-topup[data-ss-topup=""] span, html[data-brand="sendsms"] .ss-tb-topup:not([data-ss-topup="invoice"]) span { display: none; }
  html[data-brand="sendsms"] .ss-tb-topup { padding: 0 8px; }
}

@media (max-width: 640px) {
  html[data-brand="sendsms"] .ss-pk-head-text h1 { font-size: 26px; }
  html[data-brand="sendsms"] .ss-pk-head-actions .btn { white-space: nowrap; }
  html[data-brand="sendsms"] .ss-ct-menu-panel { right: auto; left: 0; }
  html[data-brand="sendsms"] .ss-ct-card { padding: 8px 10px; }
  html[data-brand="sendsms"] .ss-ct-card .pagination { padding-left: 6px; padding-right: 6px; }
  html[data-brand="sendsms"] .ss-ct-book-tools .ss-select { flex: 1 1 calc(50% - 5px); }
  html[data-brand="sendsms"] .ss-ct-book-tools > .btn { flex: 1 1 100%; }
  html[data-brand="sendsms"] .ss-ct-progress { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-brand="sendsms"] .ss-ct-progress .ss-ct-bar { grid-column: 1 / -1; grid-row: 2; }
  html[data-brand="sendsms"] .ss-ct-wiz-grid, html[data-brand="sendsms"] .ss-ct-wiz-grid--3 { grid-template-columns: minmax(0, 1fr); }
  html[data-brand="sendsms"] .ss-ct-tabs { width: 100%; }
  html[data-brand="sendsms"] .ss-ct-tab { flex: 1 1 0; padding: 6px 8px; }
}

/* ---------- my prices («Мои тарифы») ---------- */
html[data-brand="sendsms"] .ss-tf-tools { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
html[data-brand="sendsms"] .ss-tf-tools .input { flex: 1 1 260px; min-width: 0; height: 44px; }
html[data-brand="sendsms"] .ss-tf-tools .ss-select { flex: 0 0 200px; }
html[data-brand="sendsms"] .ss-tf-over { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface-3); color: var(--text); font-size: 14px; }
html[data-brand="sendsms"] .ss-tf-kind { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-3); color: var(--text-secondary); white-space: nowrap; }
html[data-brand="sendsms"] .ss-tf-kind[data-kind="individual"] { background: var(--info-soft); color: var(--info); }
html[data-brand="sendsms"] .ss-tf-kind[data-kind="package"] { background: var(--primary-soft); color: var(--ss-accent-text); }
html[data-brand="sendsms"] .ss-tf-pages { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
html[data-brand="sendsms"] .ss-tf-pages:empty { display: none; }
@media (max-width: 600px) { html[data-brand="sendsms"] .ss-tf-tools .ss-select { flex: 1 1 100%; } }
