:root {
  --navy: #073b67;
  --blue: #0786ad;
  --cyan: #45c7d8;
  --green: #2f855a;
  --amber: #b7791f;
  --red: #c53030;
  --ink: #1f2933;
  --muted: #667785;
  --line: #d9e2e8;
  --surface: #ffffff;
  --canvas: #f4fbff;
  --header-gradient: var(--alj-header-gradient, linear-gradient(118deg, #06365f 0%, #075889 48%, #0786ad 100%));
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--alj-page-bg,
    radial-gradient(circle at top left, rgba(69,199,216,.20), transparent 30%),
    linear-gradient(145deg, #f4fbff 0%, #f7fafc 45%, #eef7f5 100%));
  background-attachment: fixed;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button, a, select { cursor: pointer; }

.topbar { position: relative; height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; overflow: hidden; background: var(--header-gradient); color: #fff; box-shadow: 0 16px 32px rgba(6,54,95,.18); }
.topbar::after { content: ""; position: absolute; inset: -42px -60px auto auto; width: 360px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0)); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 58px; height: 58px; object-fit: contain; background: transparent; padding: 0; border-radius: 0; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 18px; }
.brand small { color: #cce8f2; }
.top-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.brand { position: relative; z-index: 1; }
.text-link { color: #fff; text-decoration: none; font-weight: 600; }
.user-greeting { color: #e7f3f7; font-weight: 650; }
.top-notification { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; background: transparent; color: #fff; }
.top-notification:hover { background: rgba(255,255,255,.1); }
.top-notification .bell-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-notification strong { position: absolute; top: -6px; right: -7px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border: 2px solid #0f618a; border-radius: 999px; background: #e7edf1; color: var(--navy); font-size: 10px; font-weight: 850; }
.top-notification strong[hidden] { display: none; }
.integration-status { padding: 5px 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 4px; color: #dcebf2; font-size: 12px; }
.integration-status.ready { background: #276749; border-color: #68d391; color: #fff; }

.app-shell { min-height: calc(100vh - 84px); display: grid; grid-template-columns: 232px minmax(0, 1fr); background: transparent; }
.sidebar { padding: 22px 16px; background: var(--alj-sidebar-bg, rgba(255,255,255,.88)); border-right: 1px solid var(--line); }
.competition-picker { display: grid; gap: 8px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #edf1f3; }
.competition-picker span, .field span { color: #405463; font-weight: 700; font-size: 12px; }
.competition-picker input, .competition-picker select, .field input, .field select, .field textarea, .toolbar input, .toolbar select, .import-row input, .import-row select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #b8c6cf; border-radius: 4px; color: var(--ink); background: #fff; }
.competition-picker input { min-height: 36px; }
.competition-picker select { min-height: 42px; padding-right: 28px; font-weight: 650; text-overflow: ellipsis; }
.competition-picker small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.sidebar nav { display: grid; gap: 4px; margin-bottom: 22px; }
.nav-item { min-height: 40px; padding: 0 12px; text-align: left; border: 0; border-left: 3px solid transparent; background: transparent; color: #425665; font-weight: 650; }
.nav-item:hover { background: #edf4f7; }
.nav-item.active { background: #e5f4f8; border-left-color: var(--blue); color: var(--navy); }

.workspace { min-width: 0; padding: 28px clamp(20px, 3vw, 44px) 48px; background: transparent; }
.view { display: none; }
.view.active { display: block; }
.page-heading { min-height: 54px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading.compact { min-height: 0; margin-bottom: 16px; }
.page-heading h1 { margin: 0; font-size: 25px; letter-spacing: 0; color: var(--navy); }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-pill { display: inline-flex; min-width: 90px; justify-content: center; padding: 6px 10px; border-radius: 999px; background: #e7edf1; color: #455a68; font-size: 12px; font-weight: 750; text-transform: capitalize; }

.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); background: #fff; margin-bottom: 20px; }
.compact-metrics { margin-bottom: 18px; }
.metric { min-height: 92px; display: grid; align-content: center; gap: 4px; padding: 16px 20px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { font-size: 28px; color: var(--navy); }
.metric span { color: var(--muted); }
.metric:nth-child(1) { box-shadow: inset 0 4px #168aad; }
.metric:nth-child(2) { box-shadow: inset 0 4px #45c7d8; }
.metric:nth-child(3) { box-shadow: inset 0 4px #718096; }
.metric:nth-child(4) { box-shadow: inset 0 4px #38a169; }
.metric:nth-child(5) { box-shadow: inset 0 4px #d69e2e; }
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.all-tournaments-panel { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.global-explainer { margin: -6px 0 18px; max-width: 980px; color: var(--muted); line-height: 1.45; }
.global-overview-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px; margin-bottom: 20px; }
.analytics-panel { min-height: 286px; }
.analytics-panel .panel-heading { margin-bottom: 20px; }
.analytics-panel .panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.donut-and-bars { display: grid; grid-template-columns: 164px minmax(0, 1fr); align-items: center; gap: 26px; }
.donut-block { display: grid; justify-items: center; gap: 10px; }
.donut-block small { color: var(--muted); text-align: center; }
.donut { --percent: 0; --chart-color: #168aad; width: 138px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--chart-color) calc(var(--percent) * 1%), #e5edf1 0); }
.donut-adherence { --chart-color: #27a36a; background: conic-gradient(from 215deg, #21a179 0 calc(var(--percent) * .55%), #49c6c8 calc(var(--percent) * .55%) calc(var(--percent) * 1%), #e5edf1 0); }
.donut-contact { --chart-color: #168aad; background: conic-gradient(from 215deg, #0b6e99 0 calc(var(--percent) * .5%), #45c7d8 calc(var(--percent) * .5%) calc(var(--percent) * 1%), #e5edf1 0); }
.donut-center { width: 94px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(9, 61, 91, .05); }
.donut-center strong { color: var(--navy); font-size: 25px; }
.donut-center span { color: var(--muted); font-size: 11px; }
.bar-list { display: grid; gap: 13px; }
.bar-list-wide { margin-top: 7px; }
.bar-row { display: grid; gap: 6px; }
.bar-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #405463; font-size: 12px; }
.bar-label strong { color: var(--ink); }
.bar-track { height: 9px; overflow: hidden; border-radius: 3px; background: #e7edf1; }
.bar-fill { min-width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b6e99, #45c7d8); }
.bar-fill.success { background: linear-gradient(90deg, #257a54, #55c889); }
.bar-fill.warning { background: linear-gradient(90deg, #b7791f, #f6c453); }
.bar-fill.danger { background: linear-gradient(90deg, #b83b4b, #ed7280); }
.bar-fill.neutral { background: linear-gradient(90deg, #647786, #aab8c1); }
.bar-fill.violet { background: linear-gradient(90deg, #4568a6, #7d93cf); }
.contact-readiness { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 25px; }
.readiness-details { display: grid; }
.readiness-details div, .readiness-action { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e8edef; }
.readiness-details div:last-child { border-bottom: 0; }
.readiness-details span, .readiness-action span { color: var(--muted); }
.readiness-details strong, .readiness-action strong { color: var(--navy); font-size: 17px; }
.readiness-action { width: 100%; border: 0; background: transparent; text-align: left; }
.readiness-action:hover span, .readiness-action:hover strong { color: var(--blue); }
.transport-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.transport-summary div { display: grid; gap: 2px; padding: 12px 14px; border-left: 3px solid #168aad; background: #f1f7f9; }
.transport-summary div:last-child { border-left-color: #d69e2e; background: #fff8e8; }
.transport-summary strong { color: var(--navy); font-size: 20px; }
.transport-summary span { color: var(--muted); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading h2, .import-row h2 { margin: 0; color: var(--navy); font-size: 16px; }
.panel-heading span { color: var(--muted); font-size: 12px; }
.panel-note { margin: 18px 0 0; padding: 10px 12px; border-left: 3px solid #45c7d8; background: #eff8fb; color: #486372; font-size: 12px; line-height: 1.45; }
.activity-panel { margin-top: 20px; }
.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0; }
.definition-list div { border-bottom: 1px solid #edf1f3; padding-bottom: 10px; }
.definition-list dt { color: var(--muted); font-size: 12px; }
.definition-list dd { margin: 5px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.pending-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pending-list li { border-left: 3px solid var(--amber); background: #fff9e8; }
.pending-list li.ok { padding: 10px 12px; border-left-color: #38a169; background: #eefaf3; color: #276749; }
.pending-list button { width: 100%; display: grid; gap: 4px; padding: 10px 12px; border: 0; background: transparent; color: inherit; text-align: left; }
.pending-list button:hover { background: #fff2cf; }
.pending-list strong { color: #543b0b; }
.pending-list span { color: #6c5a2c; font-size: 12px; line-height: 1.35; }
.empty-state { padding: 22px; color: var(--muted); text-align: center; border: 1px dashed #b8c6cf; }
.tournament-list-panel { padding: 0; overflow: hidden; }
.tournament-list-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; list-style: none; }
.tournament-list-panel summary::-webkit-details-marker { display: none; }
.tournament-list-panel summary::after { content: "Expandir"; padding: 6px 10px; border: 1px solid #b8c6cf; border-radius: 4px; color: var(--navy); font-size: 12px; font-weight: 750; }
.tournament-list-panel[open] summary::after { content: "Recolher"; }
.tournament-list-panel summary span { display: grid; gap: 5px; }
.tournament-list-panel summary strong { color: var(--navy); font-size: 16px; }
.tournament-list-panel summary small { color: var(--muted); font-size: 12px; }
.tournament-list-panel summary b { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 650; }
.tournament-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tournament-list-panel .tournament-cards { padding: 0 20px 20px; }
.tournament-card { display: grid; gap: 7px; min-height: 122px; padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: inherit; text-align: left; }
.tournament-card:hover { border-color: #9fc7d7; background: #f8fbfc; }
.tournament-card.active { border-color: var(--blue); box-shadow: inset 3px 0 var(--blue); }
.tournament-card-title { color: var(--navy); font-weight: 800; line-height: 1.25; }
.tournament-card-meta, .tournament-card-foot { color: var(--muted); font-size: 12px; }
.tournament-card-foot { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tournament-card-foot strong { color: var(--navy); }
.tournament-card-hint { color: #7a5a13; font-size: 12px; line-height: 1.35; }
.mini-progress { height: 7px; overflow: hidden; border-radius: 3px; background: #e7edf1; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #257a54, #45c7d8); }
.campaign-entry { display: grid; grid-template-columns: minmax(160px, 1fr) 140px auto; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.campaign-entry:first-child { border-top: 0; }

.primary, .secondary { min-height: 38px; padding: 8px 15px; border-radius: 4px; font-weight: 750; }
.primary { border: 1px solid var(--navy); background: var(--navy); color: #fff; }
.primary:hover { background: #0a527f; }
.primary:disabled { opacity: .48; cursor: not-allowed; }
.secondary { border: 1px solid #9fb0bb; background: #fff; color: var(--navy); }
.secondary:hover { background: #edf4f7; }
.secondary.danger { color: #9b2c2c; border-color: #d9a6a6; }
.secondary.danger:hover { background: #fff0f0; }
.full { width: 100%; }
.link-button { border: 0; background: transparent; color: var(--blue); font-weight: 750; }

.form-layout { max-width: 900px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 24px; border: 1px solid var(--line); background: #fff; }
.field { display: grid; align-content: start; gap: 7px; }
.field textarea { resize: vertical; line-height: 1.45; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.field-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.template-guidance {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-top: -6px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  background: #eff8fb;
  color: #405463;
  font-size: 12px;
  line-height: 1.45;
}
.template-guidance span { min-width: 0; }
.char-counter {
  flex: 0 0 auto;
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
}
.char-counter.warning { color: var(--amber); }
.dialog-grid .template-guidance.span-2 { grid-column: 1 / -1; }

.toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) 170px 170px auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar-count { color: var(--muted); text-align: right; }
.table-wrap { overflow: auto; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; padding: 11px 12px; background: #e9f0f4; color: #324b5b; text-align: left; font-size: 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid #e6ecef; vertical-align: middle; }
tbody tr:hover { background: #f7fafb; }
.table-action { border: 0; background: transparent; color: var(--blue); font-weight: 700; }
.cell-main { display: grid; gap: 2px; min-width: 180px; }
.cell-main small { color: var(--muted); }
.tag { display: inline-flex; padding: 4px 7px; border-radius: 3px; background: #edf1f3; color: #435665; font-size: 11px; font-weight: 750; text-transform: capitalize; white-space: nowrap; }
.tag.sim, .tag.incluido, .tag.clube { background: #e1f3e8; color: #276749; }
.tag.nao, .tag.excluido, .tag.nao_viaja { background: #fbe5e5; color: #9b2c2c; }
.tag.revisao, .tag.pendente, .tag.resposta_invalida { background: #fff3cd; color: #8a5a00; }
.tag.contato_encerrado { background: #fbe5e5; color: #9b2c2c; }

.campaign-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; }
.editor-panel { display: grid; gap: 16px; }
.template-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.template-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preview-panel { align-self: start; }
.message-preview { min-height: 330px; max-height: 520px; overflow: auto; padding: 16px; border: 1px solid #c9d6dc; background: #f8fbfc; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.confirmation { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; color: #405463; }
.confirmation input { margin-top: 2px; }

.import-list { border: 1px solid var(--line); background: #fff; }
.import-row { display: grid; grid-template-columns: minmax(260px, 1fr) 120px minmax(250px, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.import-row:last-child { border-bottom: 0; }
.import-row p { margin: 5px 0 0; color: var(--muted); }
.import-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.contacts-import, .participants-import { margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.contacts-toolbar { grid-template-columns: minmax(260px, 1fr) 180px auto; }
.notice { margin-bottom: 18px; padding: 11px 14px; border: 1px solid #8bc7a5; background: #e7f6ed; color: #22543d; }
.notice.error { border-color: #e0a0a0; background: #fff0f0; color: #9b2c2c; }

dialog { width: min(760px, calc(100vw - 32px)); padding: 0; border: 1px solid #8ea1ad; border-radius: 6px; box-shadow: 0 22px 60px rgba(22, 39, 50, .26); }
dialog::backdrop { background: rgba(14, 34, 46, .56); }
#participantForm, #templateCreateForm, #contactForm { padding: 22px; }
.decision-dialog { width: min(620px, calc(100vw - 32px)); }
.decision-dialog-form { padding: 24px; }
.decision-dialog .dialog-heading { margin-bottom: 14px; }
.decision-text { margin: 0 0 12px; color: var(--ink); font-size: 16px; line-height: 1.45; }
.decision-summary { padding: 14px 16px; border-left: 3px solid var(--accent); background: #eef8fb; color: #355466; line-height: 1.45; }
.decision-actions { justify-content: space-between; align-items: stretch; flex-wrap: wrap; }
.decision-actions button { flex: 1 1 160px; min-height: 44px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.dialog-heading h2 { margin: 0; color: var(--navy); }
.close-button { width: 34px; height: 34px; border: 0; background: #edf1f3; color: #344b59; font-size: 22px; line-height: 1; }
.dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.dialog-grid .span-2 { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.advanced-settings { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); background: #f8fbfc; }
.advanced-settings summary { cursor: pointer; color: var(--navy); font-weight: 750; }
.advanced-settings .dialog-grid { margin-top: 12px; }
.conversation-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.conversation-box .panel-heading { margin-bottom: 10px; }
.conversation-box h3 { margin: 0; color: var(--navy); font-size: 15px; }
.conversation-list { display: grid; gap: 10px; max-height: 280px; overflow: auto; }
.conversation-event { display: grid; gap: 6px; padding: 10px 12px; border-left: 3px solid #718096; background: #f8fbfc; }
.conversation-event.outbound { border-left-color: #168aad; background: #eff8fb; }
.conversation-event.inbound { border-left-color: #2f855a; background: #f0fbf5; }
.conversation-event div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conversation-event strong { color: var(--navy); }
.conversation-event span, .conversation-event small { color: var(--muted); font-size: 12px; }
.conversation-event p { margin: 0; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.pending-dialog { padding: 22px; }
.pending-dialog-body { display: grid; gap: 14px; }
.pending-reason { margin: 0; padding: 12px 14px; border-left: 3px solid var(--blue); background: #eff8fb; color: #365463; line-height: 1.45; }
.pending-records { display: grid; max-height: 420px; overflow: auto; border: 1px solid var(--line); }
.pending-records button { display: grid; gap: 3px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: inherit; text-align: left; }
.pending-records button:last-child { border-bottom: 0; }
.pending-records button:hover { background: #f4f9fb; }
.pending-records strong { color: var(--navy); }
.pending-records span { color: var(--muted); font-size: 12px; line-height: 1.35; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); max-width: 100%; }
  .sidebar { position: static; min-width: 0; max-width: 100%; border-right: 0; border-bottom: 1px solid var(--line); overflow: hidden; }
  .sidebar nav { display: flex; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
  .nav-item { min-width: max-content; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-item.active { border-bottom-color: var(--blue); }
  .competition-picker { max-width: 420px; }
  .campaign-layout, .overview-grid, .analytics-grid, .global-overview-grid { grid-template-columns: 1fr; }
  .import-row { grid-template-columns: 1fr 130px minmax(220px, 1fr) auto; }
}

@media (max-width: 700px) {
  .topbar { height: auto; padding: 12px 16px; align-items: flex-start; }
  .top-actions { display: grid; justify-items: end; gap: 7px; }
  .integration-status { display: none; }
  .workspace { padding: 22px 14px 40px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-bottom: 1px solid var(--line); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:last-child { grid-column: span 2; border-bottom: 0; }
  .donut-and-bars, .contact-readiness { grid-template-columns: 1fr; }
  .donut-block, .contact-readiness { justify-items: center; }
  .bar-list, .readiness-details { width: 100%; }
  .definition-list, .form-layout, .dialog-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar input { grid-column: span 2; }
  .toolbar-count { text-align: left; }
  .import-row { grid-template-columns: 1fr; }
  .page-heading { align-items: center; }
  .template-guidance { flex-direction: column; }
  .decision-dialog-form { padding: 18px; }
  .decision-actions { justify-content: stretch; }
  .decision-actions button { flex-basis: 100%; }
}

.panel-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-action.danger, .link-button.danger { color: #9b2c2c; }
.activity-panel .campaign-entry { grid-template-columns: minmax(160px, 1fr) 130px 150px auto auto; }
.recipient-selector { margin-top: 14px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.recipient-selector-heading, .recipient-actions, .conversation-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.recipient-selector-heading span { color: var(--muted); font-size: 12px; }
.recipient-actions { justify-content: flex-start; margin: 8px 0; }
.recipient-list { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.recipient-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; border: 1px solid #e5edf1; background: #f8fbfc; }
.recipient-option span { display: grid; gap: 2px; min-width: 0; }
.recipient-option small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.conversation-event .conversation-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

@media (max-width: 700px) {
  .activity-panel .campaign-entry { grid-template-columns: 1fr; align-items: start; }
}
