/* WhatsApp campaigns page. Uses the dashboard's variables; everything is prefixed wc-. */
#pane-wacampaigns, #pane-contacts, #pane-users, .wc-modal {
    --wc-text: var(--text, #0f172a); --wc-muted: var(--text-secondary, #64748b); --wc-faint: #94a3b8;
    --wc-line: var(--border, #e2e8f0); --wc-soft: #f8fafc; --wc-blue: var(--primary, #2563eb); --wc-blue-soft: #eff6ff;
    --wc-green: #047857; --wc-green-soft: #ecfdf5; --wc-amber: #b45309; --wc-amber-soft: #fffbeb;
    --wc-red: #b91c1c; --wc-red-soft: #fef2f2; --wc-wa: #25d366; --wc-r: 12px;
    color: var(--wc-text); font-size: 14px;
}
#pane-wacampaigns [hidden], #pane-contacts [hidden], #pane-users [hidden], .wc-modal [hidden] { display: none !important; }
.wc-empty { padding: 40px 16px; text-align: center; color: var(--wc-muted); }
.wc-muted { color: var(--wc-muted); }
.wc-small { font-size: 12.5px; }

/* The dashboard caps tabs at 1200px; this one is a work surface, so it uses the full width. */
.tab-content:has(> #pane-wacampaigns.active), .tab-content:has(> #pane-contacts.active) { max-width: none; }

/* Header and section switch ---------------------------------------------------------------- */
.wc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.wc-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wc-head p { margin: 0; color: var(--wc-muted); max-width: 640px; line-height: 1.5; }
.wc-head-banner { flex-basis: 100%; margin: 0; }
.wc-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wc-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: #eef2f7; margin-bottom: 18px; }
.wc-switch button { border: 0; background: none; padding: 7px 18px; border-radius: 8px; font: inherit; font-weight: 600;
    color: var(--wc-muted); cursor: pointer; }
.wc-switch button.active { background: #fff; color: var(--wc-text); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.wc-wa-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--wc-wa); color: #fff; display: inline-grid; place-items: center; }
.wc-wa-dot svg { width: 13px; height: 13px; }

.wc-banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px;
    background: var(--wc-amber-soft); color: var(--wc-amber); border: 1px solid #fde68a; line-height: 1.45; }
.wc-banner.info { background: var(--wc-blue-soft); color: #1e40af; border-color: #bfdbfe; }
.wc-banner.red { background: var(--wc-red-soft); color: var(--wc-red); border-color: #fecaca; }
.wc-banner.green { background: var(--wc-green-soft); color: var(--wc-green); border-color: #a7f3d0; }
.wc-banner b { color: inherit; }
.wc-limit { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--wc-line); background: #fff; margin-bottom: 16px; }
.wc-limit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--wc-muted); }
.wc-limit-top > b { color: var(--wc-text); font-size: 13.5px; }
.wc-limit-top span b { color: var(--wc-text); font-weight: 650; }
.wc-limit-bar { height: 7px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin: 8px 0; }
.wc-limit-bar span { display: block; height: 100%; background: var(--wc-wa); }
.wc-limit-note { font-size: 12.5px; color: var(--wc-muted); line-height: 1.45; }
.wc-limit.near .wc-limit-bar span { background: #f59e0b; }
.wc-limit.full { background: var(--wc-amber-soft); border-color: #fde68a; }
.wc-limit.full .wc-limit-bar span { background: #d97706; }
.wc-limit.full .wc-limit-note { color: var(--wc-amber); }

/* Pills ------------------------------------------------------------------------------------ */
.wc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    white-space: nowrap; background: #f1f5f9; color: #475569; }
.wc-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wc-pill.green { background: var(--wc-green-soft); color: var(--wc-green); }
.wc-pill.amber { background: var(--wc-amber-soft); color: var(--wc-amber); }
.wc-pill.red { background: var(--wc-red-soft); color: var(--wc-red); }
.wc-pill.blue { background: var(--wc-blue-soft); color: var(--wc-blue); }
.wc-pill.live::before { animation: wc-pulse 1.4s infinite; }
@keyframes wc-pulse { 50% { opacity: .25; } }
.wc-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: #f1f5f9; color: #475569; }
.wc-chip.mkt { background: #fdf4ff; color: #a21caf; }
.wc-chip.utl { background: #f0f9ff; color: #0369a1; }

/* Cards and lists -------------------------------------------------------------------------- */
.wc-card { background: #fff; border: 1px solid var(--wc-line); border-radius: var(--wc-r); }
.wc-progress { height: 7px; border-radius: 999px; background: #eef2f7; overflow: hidden; display: flex; }
.wc-progress span { display: block; height: 100%; background: var(--wc-wa); }
.wc-progress span.fail { background: #f87171; }
.wc-mini { display: flex; gap: 14px; margin-top: 7px; font-size: 12.5px; color: var(--wc-muted); flex-wrap: wrap; }
.wc-mini b { color: var(--wc-text); font-weight: 650; }

.wc-steps-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px auto 0; max-width: 760px; text-align: left; }
.wc-steps-guide div { padding: 14px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fff; }
.wc-steps-guide b { display: block; margin-bottom: 4px; }
.wc-steps-guide span { color: var(--wc-muted); font-size: 13px; line-height: 1.45; }
.wc-hero-empty { padding: 36px 18px; text-align: center; }
.wc-hero-empty h3 { margin: 0 0 6px; font-size: 17px; }
.wc-hero-empty p { margin: 0 0 18px; color: var(--wc-muted); }

/* Lists (campaigns and templates) ------------------------------------------------------------ */
.wc-listcard { overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .08); }
.wc-tabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--wc-line); overflow-x: auto; scrollbar-width: none; }
.wc-tabs::-webkit-scrollbar { display: none; }
.wc-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--wc-muted);
    padding: 14px 8px 12px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; transition: color .15s; }
.wc-tabs button:hover { color: var(--wc-text); }
.wc-tabs button.active { color: var(--wc-blue); border-bottom-color: var(--wc-blue); }
.wc-tabs button span { font-size: 11.5px; background: #f1f5f9; color: #64748b; border-radius: 999px; padding: 1px 8px; min-width: 14px; text-align: center;
    font-variant-numeric: tabular-nums; }
.wc-tabs button.active span { background: var(--wc-blue-soft); color: var(--wc-blue); }
.wc-tools { display: flex; gap: 8px; padding: 12px 16px; align-items: center; flex-wrap: wrap; background: var(--wc-soft); border-bottom: 1px solid var(--wc-line); }
.wc-search { position: relative; flex: 1 1 260px; max-width: 440px; display: flex; align-items: center; margin: 0; }
.wc-search input { flex: 1; min-width: 0; }
.wc-search svg { position: absolute; left: 11px; color: var(--wc-faint); pointer-events: none; }
#pane-wacampaigns .wc-search input[type=search], #pane-contacts .wc-search input[type=search], .wc-modal .wc-search input[type=search] { width: 100%; padding-left: 34px; border: 1px solid #cbd5e1; border-radius: 9px; padding-top: 8px;
    padding-bottom: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--wc-text); box-sizing: border-box; }
.wc-modal .wc-search input:focus { outline: none; border-color: var(--wc-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wc-select, .wc-modal select.wc-select { border: 1px solid #cbd5e1; border-radius: 9px; padding: 8px 30px 8px 11px; font: inherit; font-size: 13.5px; color: var(--wc-text); cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 11px center;
    appearance: none; -webkit-appearance: none; }
.wc-select:focus { outline: none; border-color: var(--wc-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wc-sort { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; color: var(--wc-muted); font-weight: 500; }
.wc-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 0; }
.wc-chips:empty { display: none; }
.wc-fchip { display: inline-flex; align-items: center; gap: 6px; background: var(--wc-blue-soft); color: #1e40af; border: 1px solid #bfdbfe; border-radius: 999px;
    padding: 3px 4px 3px 12px; font-size: 12.5px; }
.wc-fchip b { color: inherit; }
.wc-fchip button { border: 0; background: none; color: inherit; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; }
.wc-fchip button:hover { background: #dbeafe; }
.wc-fchip svg { width: 13px; height: 13px; }
.wc-results { transition: opacity .15s; }
.wc-listcard.loading .wc-results { opacity: .5; pointer-events: none; }
.wc-list-table th { padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: #fff; border-bottom: 1px solid var(--wc-line); }
.wc-list-table td { padding: 13px 12px; vertical-align: middle; border-top: 0; border-bottom: 1px solid #f1f5f9; }
.wc-list-table tbody tr:last-child td { border-bottom: 0; }
.wc-list-table th.num, .wc-list-table td.num { text-align: right; }
.wc-list-table th.num { letter-spacing: .02em; padding-left: 6px; padding-right: 10px; }
.wc-list-table td.num { padding-left: 6px; padding-right: 10px; }
.wc-list-table .wc-c-sub.wc-ellipsis { max-width: 170px; }
.wc-list-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.wc-list-table td.bad { color: var(--wc-red); }
tr.wc-click { cursor: pointer; transition: background .12s; }
tr.wc-click:hover { background: #f8fafc; }
tr.wc-click:focus-visible { outline: 2px solid var(--wc-blue); outline-offset: -2px; }
.wc-c-main { min-width: 220px; }
.wc-list-table th:first-child, .wc-list-table td:first-child { padding-left: 18px; }
.wc-list-table th:last-child, .wc-list-table td:last-child { padding-right: 18px; }
.wc-c-title { font-weight: 650; font-size: 14px; color: var(--wc-text); overflow-wrap: anywhere; }
.wc-c-sub { font-size: 12.5px; color: var(--wc-muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; min-width: 0; font-weight: 400; }
.wc-c-sub b { color: var(--wc-text); font-weight: 650; }
.wc-c-sub.bad { color: var(--wc-red); }
.wc-c-snip { font-size: 12.5px; color: var(--wc-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(680px, 38vw); }
.wc-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; display: block; }
.wc-c-sub.wc-ellipsis { display: block; }
.wc-nowrap { white-space: nowrap; }
.wc-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.wc-tags span { font-size: 11px; padding: 1px 7px; border: 1px solid var(--wc-line); border-radius: 6px; color: var(--wc-muted); background: #fff; }
.wc-c-prog { min-width: 130px; }
.wc-c-act { text-align: right; white-space: nowrap; width: 1%; }
.wc-icon { border: 1px solid transparent; background: none; width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center;
    color: var(--wc-muted); cursor: pointer; padding: 0; transition: .12s; }
.wc-icon:hover:not(:disabled) { background: #fff; color: var(--wc-text); border-color: var(--wc-line); }
.wc-icon.danger:hover:not(:disabled) { color: var(--wc-red); background: var(--wc-red-soft); border-color: #fecaca; }
.wc-icon:disabled { opacity: .3; cursor: not-allowed; }
.wc-faint { color: var(--wc-faint); font-weight: 400; }
.wc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wc-nomatch { padding: 56px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--wc-muted); }
.wc-nomatch b { color: var(--wc-text); font-size: 15px; }
.wc-nomatch .btn { margin-top: 8px; }
.wc-pager label { display: flex; gap: 6px; align-items: center; margin: 0 10px 0 0; }
.wc-pager .wc-select { padding: 4px 26px 4px 9px; font-size: 13px; background-position: right 8px center; }
.wc-pager > div { align-items: center; }
.wc-pager b { color: var(--wc-text); font-weight: 650; }
.wc-pg { width: 30px; height: 30px; border: 1px solid var(--wc-line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; color: var(--wc-text); }
.wc-pg:hover:not(:disabled) { border-color: #cbd5e1; background: var(--wc-soft); }
.wc-pg:disabled { opacity: .4; cursor: not-allowed; }
#pane-wacampaigns .wc-pg-in { width: 58px; text-align: center; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 13px; }
.wc-tpl-reason { font-size: 12.5px; color: var(--wc-red); background: var(--wc-red-soft); padding: 8px 10px; border-radius: 8px; line-height: 1.45; margin-top: 10px; }

/* WhatsApp preview -------------------------------------------------------------------------- */
.wc-phone { background: #efeae2; border-radius: var(--wc-r); padding: 16px 14px; min-height: 160px; }
.wc-phone-label { font-size: 11.5px; font-weight: 600; color: var(--wc-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.wc-bubble { background: #fff; border-radius: 0 10px 10px 10px; padding: 6px 7px 6px; max-width: 320px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
    font-size: 13.5px; line-height: 1.42; color: #111b21; }
.wc-bubble-media { border-radius: 7px; background: #d1d7db; height: 130px; display: grid; place-items: center; color: #54656f; font-size: 12px;
    font-weight: 600; margin-bottom: 6px; overflow: hidden; }
.wc-bubble-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-bubble-doc { display: flex; gap: 8px; align-items: center; background: #f5f6f6; border-radius: 7px; padding: 10px; margin-bottom: 6px; font-size: 12.5px; }
.wc-bubble-doc i { font-style: normal; background: #e53935; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 4px; border-radius: 3px; }
.wc-bubble-head { font-weight: 700; margin: 2px 3px 4px; }
.wc-bubble-body { margin: 0 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.wc-bubble-body .var { background: #e7f3ff; color: #1d4ed8; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.wc-bubble-foot { margin: 4px 3px 0; color: #667781; font-size: 12px; }
.wc-bubble-time { text-align: right; color: #667781; font-size: 11px; margin-top: 2px; }
.wc-bubble-btns { max-width: 334px; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.wc-bubble-btns div { background: #fff; border-radius: 8px; text-align: center; padding: 8px; color: #027eb5; font-weight: 500; font-size: 13.5px;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }

/* Campaign detail -------------------------------------------------------------------------- */
.wc-back { display: block; border: 0; background: none; color: var(--wc-blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 12px; }
.wc-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.wc-stat { padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s; }
.wc-stat:hover { border-color: #cbd5e1; }
.wc-stat.active { border-color: var(--wc-blue); box-shadow: 0 0 0 2px var(--wc-blue-soft); }
.wc-stat span { display: block; font-size: 12.5px; color: var(--wc-muted); font-weight: 500; }
.wc-stat b { display: block; font-size: 22px; font-weight: 700; margin-top: 2px; }
.wc-stat small { color: var(--wc-faint); font-size: 12px; }
.wc-stat.red b { color: var(--wc-red); }
.wc-stat.green b { color: var(--wc-green); }
.wc-detail-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.wc-section { padding: 16px 18px; }
.wc-section h3 { margin: 0 0 12px; font-size: 15px; }
.wc-facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13.5px; }
.wc-facts dt { color: var(--wc-muted); }
.wc-facts dd { margin: 0; font-weight: 500; }
.wc-reasons { display: flex; flex-direction: column; gap: 8px; }
.wc-reasons div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.wc-table-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--wc-line); }
.wc-table-tools input[type=search] { margin-left: auto; min-width: 220px; }
.wc-filter { border: 1px solid var(--wc-line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px;
    font-weight: 500; color: var(--wc-muted); cursor: pointer; }
.wc-filter.active { background: var(--wc-text); color: #fff; border-color: var(--wc-text); }
.wc-table-wrap { overflow-x: auto; }
.wc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wc-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--wc-muted); padding: 10px 18px; background: var(--wc-soft); white-space: nowrap; }
.wc-table td { padding: 10px 18px; border-top: 1px solid #f1f5f9; vertical-align: top; }
.wc-table td.wc-why { color: var(--wc-muted); max-width: 360px; }
.wc-pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-top: 1px solid var(--wc-line);
    font-size: 13px; color: var(--wc-muted); }
.wc-pager div { display: flex; gap: 6px; }
details.wc-skipped { margin-top: 16px; }
details.wc-skipped summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
details.wc-skipped[open] summary { border-bottom: 1px solid var(--wc-line); }

/* Campaign page: results ------------------------------------------------------------------- */
.wc-overall { margin-bottom: 6px; }
.wc-sections { padding: 0; margin: 4px 0 16px; }
.wc-results-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
#pane-wacampaigns .wc-results-grid + .wc-section, #pane-wacampaigns .wc-section + .wc-section { margin-bottom: 16px; }
.wc-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wc-funnel { display: flex; flex-direction: column; gap: 12px; }
.wc-funnel-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 150px; gap: 12px; align-items: center; font-size: 13.5px; }
.wc-funnel-label { color: var(--wc-muted); font-weight: 500; }
.wc-funnel-bar { height: 22px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.wc-funnel-bar i { display: block; height: 100%; background: var(--wc-blue); border-radius: 0 4px 4px 0; transition: width .4s ease; }
.wc-funnel-num { display: flex; flex-direction: column; line-height: 1.25; }
.wc-funnel-num b { font-variant-numeric: tabular-nums; font-size: 14.5px; }
.wc-funnel-num small { color: var(--wc-muted); font-size: 12px; }
.wc-mcs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.wc-mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
.wc-mc-head span { color: var(--wc-muted); font-size: 12px; }
.wc-mc-plot { height: 96px; display: flex; align-items: flex-end; border-bottom: 1px solid #cbd5e1; }
.wc-mc-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.wc-mc-col i { display: block; width: 100%; background: var(--wc-blue); border-radius: 4px 4px 0 0; opacity: .9; }
.wc-mc-col:hover i { opacity: 1; background: #1d4ed8; }
.wc-mc-col:hover { background: linear-gradient(transparent, rgba(37, 99, 235, .06)); }
.wc-mc-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--wc-faint); margin-top: 6px; gap: 6px; }
.wc-tip { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; background: #0f172a; color: #fff; font-size: 12.5px; font-weight: 500;
    padding: 6px 9px; border-radius: 7px; white-space: nowrap; box-shadow: 0 6px 18px rgba(15, 23, 42, .25); }
.wc-replies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wc-replies > div { border: 1px solid var(--wc-line); border-radius: 10px; padding: 10px 12px; background: var(--wc-soft); }
.wc-reply-who { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; margin-bottom: 4px; flex-wrap: wrap; }
.wc-reply-who span { color: var(--wc-muted); }
.wc-reply-text { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wc-reply-who b.wc-ellipsis { max-width: 60%; }
.wc-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wc-scroll { max-height: 420px; overflow-y: auto; }
.wc-scroll thead th { position: sticky; top: 0; z-index: 1; }
.wc-reasons span { min-width: 0; overflow-wrap: anywhere; }
.wc-reasons small { font-size: 11.5px; }
.wc-help.wc-alert-note, .wc-alert-note { color: var(--wc-red); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.wc-retry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.wc-retry-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--wc-muted); font-weight: 500; margin: 0; }
.wc-modal .wc-retry-grid select.wc-select { width: 100%; }
.wc-errs { border: 1px solid var(--wc-line); border-radius: 10px; margin-top: 14px; background: #fff; overflow: hidden; }
.wc-errs summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; font-size: 13.5px;
    list-style: none; background: var(--wc-soft); }
.wc-errs summary::-webkit-details-marker { display: none; }
.wc-errs summary::after { content: "›"; font-size: 18px; color: var(--wc-muted); transition: transform .15s; margin-left: 6px; }
.wc-errs[open] summary::after { transform: rotate(90deg); }
.wc-errs summary b { flex: 1; }
.wc-errs summary span { font-size: 12px; color: var(--wc-muted); }
.wc-errs summary span.changed { color: var(--wc-amber); font-weight: 600; }
.wc-errs[open] summary { border-bottom: 1px solid var(--wc-line); }
.wc-errs-body { columns: 2 460px; column-gap: 0; column-rule: 1px solid #f1f5f9; }
.wc-err-group { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; break-inside: avoid; }
.wc-err-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.wc-err-head b { font-size: 13px; }
.wc-err-head span { font-size: 12px; color: var(--wc-muted); }
.wc-err-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 270px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; line-height: 1.4; }
.wc-err-row code { font-size: 11.5px; background: #f1f5f9; color: #475569; border-radius: 5px; padding: 2px 6px; text-align: center; }
.wc-err-row.changed code { background: var(--wc-amber-soft); color: var(--wc-amber); }
.wc-modal .wc-err-row select.wc-select { width: 100%; padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
.wc-err-row.changed select.wc-select { border-color: #f59e0b; }
.wc-err-lock { font-size: 12px; color: var(--wc-muted); font-weight: 600; }
.wc-err-foot { padding: 10px 14px; }
.wc-rule-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; font-weight: 400; }
.wc-retry-plan { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 12.5px; }
.wc-retry-plan .try { background: var(--wc-blue-soft); color: var(--wc-blue); font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.wc-retry-plan em { font-style: normal; color: var(--wc-muted); display: inline-flex; align-items: center; gap: 6px; }
.wc-retry-plan em::before, .wc-retry-plan em::after { content: ""; width: 10px; height: 1px; background: #cbd5e1; }
.wc-modal .wc-inline select.wc-select { width: auto; }

/* Inputs ----------------------------------------------------------------------------------- */
#pane-wacampaigns input[type=text], #pane-wacampaigns input[type=search], #pane-contacts input[type=text], #pane-contacts input[type=search], #pane-users input[type=text], #pane-contacts input[type=number], .wc-modal input[type=text], .wc-modal input[type=url],
.wc-modal input[type=tel], .wc-modal input[type=time], .wc-modal input[type=datetime-local], .wc-modal select, .wc-modal textarea {
    border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; background: #fff; color: var(--wc-text);
    width: 100%; box-sizing: border-box; }
.wc-modal input:focus, .wc-modal select:focus, .wc-modal textarea:focus, #pane-wacampaigns input:focus, #pane-contacts input:focus {
    outline: none; border-color: var(--wc-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wc-modal input:disabled, .wc-modal select:disabled { background: #f1f5f9; color: var(--wc-muted); }
.wc-modal textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
#pane-wacampaigns input[type=search] { width: auto; }

/* Modals ----------------------------------------------------------------------------------- */
dialog.wc-modal { margin: auto; border: 0; padding: 0; border-radius: 16px; width: min(1240px, calc(100vw - 48px)); max-height: calc(100vh - 40px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25); overflow: hidden; }
dialog.wc-modal.narrow { width: min(560px, calc(100vw - 32px)); }
dialog.wc-modal.sheet { margin: 0 0 0 auto; width: min(480px, 100vw); height: 100vh; max-height: 100vh; border-radius: 16px 0 0 16px; }
dialog.wc-modal.sheet .wc-modal-inner { height: 100%; max-height: 100vh; }
dialog.wc-modal.sheet[open] { animation: wc-slide .22s ease-out; }
@keyframes wc-slide { from { transform: translateX(48px); opacity: 0; } }
.wc-sheet-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wc-facts code { background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.wc-danger-btn:not(:disabled) { color: var(--wc-red) !important; border-color: #fecaca !important; }
.wc-danger-btn:hover:not(:disabled) { background: var(--wc-red-soft) !important; }
dialog.wc-modal::backdrop { background: rgba(15, 23, 42, .45); }
.wc-modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.wc-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--wc-line); }
.wc-modal-head h2 { margin: 0; font-size: 18px; }
.wc-x { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--wc-muted); line-height: 0; }
.wc-x:hover { background: #f1f5f9; }
.wc-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.wc-modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--wc-line);
    background: var(--wc-soft); flex-wrap: wrap; }
.wc-modal-foot > div { display: flex; gap: 8px; margin-left: auto; }
.wc-modal-msg { padding: 10px 22px; font-size: 13.5px; line-height: 1.45; border-top: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.wc-modal-msg.success { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.wc-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.wc-sticky { position: sticky; top: 0; }
.wc-field { margin-bottom: 18px; }
.wc-field > label, .wc-label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.wc-label em, .wc-field > label em { font-weight: 400; font-style: normal; color: var(--wc-muted); }
.wc-help { font-size: 12.5px; color: var(--wc-muted); margin-top: 5px; line-height: 1.45; }
.wc-help code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.wc-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--wc-line); border-radius: 10px; padding: 11px 13px; cursor: pointer;
    background: #fff; text-align: left; font: inherit; color: inherit; }
.wc-choice:hover { border-color: #cbd5e1; }
.wc-choice.active { border-color: var(--wc-blue); background: var(--wc-blue-soft); }
.wc-choice.disabled { opacity: .55; cursor: not-allowed; }
.wc-choice input { margin-top: 3px; accent-color: var(--wc-blue); }
.wc-choice b { display: block; font-size: 14px; margin-bottom: 2px; }
.wc-choice span { font-size: 12.5px; color: var(--wc-muted); line-height: 1.4; }
.wc-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 9px; overflow: hidden; flex-wrap: wrap; }
.wc-seg button { border: 0; border-right: 1px solid #cbd5e1; background: #fff; padding: 7px 14px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--wc-text); }
.wc-seg button:last-child { border-right: 0; }
.wc-seg button.active { background: var(--wc-blue); color: #fff; }
.wc-toolbar { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; flex-wrap: wrap; }
.wc-tool { border: 1px solid var(--wc-line); background: #fff; border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.wc-tool:hover { background: #f8fafc; }
.wc-count { margin-left: auto; font-size: 12px; color: var(--wc-faint); }
.wc-btn-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.wc-btn-row .wc-chip { min-width: 74px; text-align: center; }
.wc-btn-row input { flex: 1; }
.wc-link { border: 0; background: none; color: var(--wc-blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.wc-file-current { font-size: 13px; margin-top: 6px; color: var(--wc-muted); }

/* Wizard ------------------------------------------------------------------------------------ */
.wc-stepper { display: flex; gap: 6px; align-items: center; }
.wc-stepper span { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--wc-faint); }
.wc-stepper span i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px;
    background: #e2e8f0; color: #64748b; }
.wc-stepper span.on { color: var(--wc-text); }
.wc-stepper span.on i { background: var(--wc-blue); color: #fff; }
.wc-stepper span.done i { background: var(--wc-green); color: #fff; }
.wc-stepper b { width: 22px; height: 1px; background: #cbd5e1; }
.wc-picker { border: 1px solid var(--wc-line); border-radius: 12px; overflow: hidden; background: #fff; }
.wc-picked { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: var(--wc-blue-soft); border-bottom: 1px solid #bfdbfe;
    font-size: 13.5px; color: #1e40af; }
.wc-picked > span:first-child { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.wc-pick-bar { padding: 12px 12px 0; }
.wc-pick-bar .wc-search { max-width: none; }
.wc-pick-tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--wc-line); flex-wrap: wrap; }
.wc-pick-tabs button { border: 1px solid var(--wc-line); background: #fff; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--wc-muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.wc-pick-tabs button span { font-weight: 600; color: var(--wc-faint); font-variant-numeric: tabular-nums; }
.wc-pick-tabs button.active { background: var(--wc-text); border-color: var(--wc-text); color: #fff; }
.wc-pick-tabs button.active span { color: #cbd5e1; }
.wc-pick-list { max-height: 330px; overflow-y: auto; transition: opacity .15s; }
.wc-pick-list.loading { opacity: .55; }
.wc-pick-row { display: flex; width: 100%; gap: 12px; align-items: center; padding: 11px 14px; border: 0; border-bottom: 1px solid #f1f5f9; background: #fff;
    text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .12s; }
.wc-pick-row:last-child { border-bottom: 0; }
.wc-pick-row:hover { background: var(--wc-soft); }
.wc-pick-row.active { background: var(--wc-blue-soft); }
.wc-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cbd5e1; flex: none; box-sizing: border-box; transition: border .12s; }
.wc-pick-row.active .wc-radio { border: 5px solid var(--wc-blue); }
.wc-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wc-pick-main b { font-size: 14px; overflow-wrap: anywhere; }
.wc-pick-main > span { font-size: 12.5px; color: var(--wc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-pick-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.wc-pick-more { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; font-size: 12.5px; color: var(--wc-muted);
    background: var(--wc-soft); border-top: 1px solid var(--wc-line); }
.wc-pick-more:empty { display: none; }
.wc-pick-empty { padding: 28px 14px; text-align: center; color: var(--wc-muted); font-size: 13px; line-height: 1.5; }
.wc-drop { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 30px 16px; text-align: center; cursor: pointer; background: var(--wc-soft); transition: .15s; }
.wc-drop:hover, .wc-drop.over { border-color: var(--wc-blue); background: var(--wc-blue-soft); }
.wc-drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.wc-filebar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--wc-line); border-radius: 10px; margin-bottom: 18px; background: #fff; }
.wc-filebar .wc-file-ico { flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--wc-green-soft); color: var(--wc-green); display: grid;
    place-items: center; font-weight: 700; font-size: 11px; }
.wc-filebar > div:not(.wc-file-ico) { flex: 1; min-width: 0; }
.wc-map { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.wc-var { border: 1px solid var(--wc-line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fff; }
.wc-var-title { font-weight: 600; margin-bottom: 8px; font-size: 13.5px; }
.wc-var-title code { background: #e7f3ff; color: #1d4ed8; padding: 1px 6px; border-radius: 4px; }
.wc-check { border-radius: 10px; padding: 12px 14px; margin-top: 6px; line-height: 1.5; }
.wc-check.ok { background: var(--wc-green-soft); color: var(--wc-green); }
.wc-check.bad { background: var(--wc-red-soft); color: var(--wc-red); }
.wc-check ul { margin: 6px 0 0; padding-left: 18px; color: var(--wc-text); font-size: 13px; }
.wc-settings { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0 32px; align-items: start; }
.wc-settings-wide { margin-top: 4px; }  /* outside the grid, so the pinned summary stops above it */
.wc-settings-wide .wc-errs { margin: 6px 0 4px; }
.wc-settings-side { position: sticky; top: 0; }
.wc-source { align-items: center; }
.wc-source > span:nth-child(2) { flex: 1; }
.wc-set { padding: 4px 0 18px; margin-bottom: 14px; border-bottom: 1px solid #f1f5f9; }
.wc-set:last-of-type { border-bottom: 0; }
.wc-set h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 15px; }
.wc-set h4 i { width: 22px; height: 22px; border-radius: 50%; background: var(--wc-blue-soft); color: var(--wc-blue); font-style: normal; font-size: 12px;
    display: grid; place-items: center; flex: none; }
.wc-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.wc-pill-choice { border: 1.5px solid var(--wc-line); background: #fff; border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer;
    font: inherit; color: inherit; display: flex; flex-direction: column; gap: 2px; transition: border-color .12s, background .12s; }
.wc-pill-choice:hover { border-color: #cbd5e1; }
.wc-pill-choice b { font-size: 14px; }
.wc-pill-choice span { font-size: 12px; color: var(--wc-muted); line-height: 1.35; }
.wc-pill-choice.active { border-color: var(--wc-blue); background: var(--wc-blue-soft); box-shadow: inset 0 0 0 1px var(--wc-blue); }
.wc-pill-choice.active b { color: var(--wc-blue); }
.wc-set-input { margin-top: 10px; }
.wc-modal input.wc-set-input[type=datetime-local] { max-width: 280px; }
.wc-plan-card { background: var(--wc-soft); border: 1px solid var(--wc-line); border-radius: 12px; padding: 16px 18px; }
.wc-plan-card h4 { margin: 0 0 8px; font-size: 14px; }
.wc-plan-card p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; }
.wc-plan-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.wc-plan-card li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.45; }
.wc-plan-card li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--wc-green); font-weight: 700; }
.wc-errs summary b em { font-style: normal; font-weight: 400; color: var(--wc-muted); }
.wc-step3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.wc-step3 > .wc-summary, .wc-step3 > .wc-step3-wide { grid-column: 1 / -1; }
.wc-step3-wide .wc-errs { margin: 0 0 18px; }
.wc-summary { background: var(--wc-soft); border: 1px solid var(--wc-line); border-radius: 12px; padding: 14px 16px; line-height: 1.6; }
.wc-summary b { font-weight: 650; }
.wc-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wc-inline input[type=time] { width: 120px; }
.wc-toggle { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; }
.wc-toggle input { width: 16px; height: 16px; accent-color: var(--wc-blue); }

@media (max-width: 1100px) {
    .wc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hide-md { display: none; }
}
@media (max-width: 860px) {
    .wc-split, .wc-detail-grid, .wc-results-grid, .wc-mcs, .wc-step3, .wc-settings { grid-template-columns: 1fr; }
    .wc-settings-side { position: static; margin-bottom: 14px; }
    .wc-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-pills.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .wc-pills.n3 .wc-pill-choice { padding: 9px 9px; }
    .wc-pills.n3 .wc-pill-choice b { font-size: 13px; }
    .wc-retry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-err-row { grid-template-columns: 62px minmax(0, 1fr); }
    .wc-err-row select, .wc-err-row .wc-err-lock { grid-column: 1 / -1; }
    .wc-funnel-row { grid-template-columns: 70px minmax(0, 1fr) 110px; }
    .wc-steps-guide, .wc-choices, .wc-map { grid-template-columns: 1fr; }
    .wc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-sort { margin-left: 0; }
    .wc-search { flex-basis: 100%; max-width: none; }
    .wc-pager { flex-wrap: wrap; gap: 8px; }
    .wc-pick-side { display: none; }
    .wc-stepper span em { display: none; }
}

/* Phones: tables become stacked cards, nothing scrolls sideways. */
@media (max-width: 760px) {
    .tab-content:has(> #pane-wacampaigns.active), .tab-content:has(> #pane-contacts.active) { padding-left: 12px; padding-right: 12px; }
    .wc-head h2 { font-size: 18px; flex-wrap: wrap; }
    .wc-head-actions { width: 100%; }
    .wc-head-actions .btn { flex: 1 1 auto; justify-content: center; }
    .wc-tools { padding: 10px 12px; }
    .wc-tools .wc-select { flex: 1 1 140px; }
    .wc-sort { flex: 1 1 100%; }
    .wc-sort .wc-select { flex: 1; }
    .wc-list-table thead, .wc-t-contacts thead { display: none; }
    .wc-list-table, .wc-list-table tbody, .wc-t-contacts, .wc-t-contacts tbody { display: block; }
    .wc-list-table tr, .wc-t-contacts tr { display: grid; gap: 10px 12px; padding: 14px 14px; border-bottom: 1px solid var(--wc-line); align-items: start; }
    .wc-list-table td, .wc-t-contacts td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; max-width: none; }
    .wc-list-table td:empty, .wc-list-table td.hide-md { display: none; }
    .wc-list-table td.num, .wc-t-contacts td[data-label] { text-align: left; }
    .wc-list-table td[data-label]::before, .wc-t-contacts td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600;
        text-transform: uppercase; letter-spacing: .04em; color: var(--wc-faint); margin-bottom: 2px; }
    .wc-c-snip { white-space: normal; max-width: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .wc-list-table .wc-c-sub.wc-ellipsis, .wc-ellipsis { max-width: 100%; }
    .wc-t-campaigns tr { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .wc-t-campaigns td.wc-c-main, .wc-t-campaigns td.wc-c-prog { grid-column: 1 / -1; }
    .wc-t-campaigns td:nth-child(2) { grid-column: 1 / -1; }
    .wc-t-campaigns td.wc-c-act { grid-column: 1 / -1; display: flex; gap: 8px; }
    .wc-t-campaigns td.wc-c-act .btn { flex: 1; }
    .wc-t-campaigns tr.wc-unstarted td.num, .wc-t-campaigns tr.wc-unstarted td.wc-c-prog { display: none; }
    .wc-t-templates tr { grid-template-columns: auto minmax(0, 1fr) auto; }
    .wc-t-templates td.wc-c-main { grid-column: 1 / -1; }
    .wc-t-templates td.wc-c-act { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; margin-top: -4px; }
    .wc-t-contacts tr { grid-template-columns: minmax(0, 1fr) auto; }
    .wc-t-contacts td.wc-ct-name { font-weight: 600; }
    .wc-t-contacts td.wc-ct-phone { text-align: right; }
    .wc-t-contacts td.wc-why { grid-column: 1 / -1; max-width: none; }
    .wc-t-contacts td.wc-why:empty { display: none; }
    .wc-table-tools { padding: 12px; }
    .wc-table-tools input[type=search] { min-width: 0; width: 100%; margin-left: 0; }
    .wc-stats { gap: 8px; }
    .wc-stat { padding: 10px 12px; }
    .wc-stat b { font-size: 19px; }
    .wc-funnel-row { grid-template-columns: 64px minmax(0, 1fr) 96px; gap: 8px; }
    .wc-section { padding: 14px; }
    dialog.wc-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
    dialog.wc-modal .wc-modal-inner { max-height: 100dvh; height: 100%; }
    dialog.wc-modal.narrow { height: auto; margin: auto 0 0; border-radius: 16px 16px 0 0; }
    dialog.wc-modal.narrow .wc-modal-inner { height: auto; max-height: 92dvh; }
    .wc-modal-body { padding: 16px; }
    .wc-modal-head, .wc-modal-foot { padding: 12px 16px; }
    .wc-modal-foot > div { width: 100%; }
    .wc-modal-foot > div .btn { flex: 1; justify-content: center; }
    .wc-pager > div { flex-wrap: wrap; }
}
