.coach-reminder-table{margin-top:18px}
.coach-reminder-table td small{display:block;color:var(--muted);margin-top:4px}
.coach-reminder-table select{min-width:180px;border:1px solid var(--line);border-radius:9px;padding:9px;background:#fff}
.coach-reminder-table .table-wrap{max-height:620px}
.coach-reminder-table thead th{position:sticky;top:0;z-index:1}
.ew-source-labels{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;max-width:300px}
.ew-source-label{display:inline-block;max-width:100%;padding:3px 7px;border:1px solid #cdded3;border-radius:6px;background:#eef5f0;color:var(--green);font-size:9px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.ew-source-link{font-family:inherit;cursor:pointer;text-align:left}
.ew-source-link:hover,.ew-source-link:focus-visible{border-color:var(--green);background:#dfeee4;text-decoration:underline}
.ew-blocked-row{background:#fffafa}
.ew-result-count{padding:6px 10px;border-radius:99px;background:#f0f4f1;color:var(--muted);font-size:11px;font-weight:800}
.ew-more{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 0;color:var(--muted);font-size:12px;font-weight:700}
.ew-row-actions{display:flex;gap:6px;white-space:nowrap}
.ew-bulk-actions{display:flex;align-items:center;gap:10px}
.ew-bulk-summary h3{margin:20px 0 8px;font-size:13px}
.ew-bulk-totals{display:flex;gap:10px;margin-top:16px}
.ew-bulk-totals>*{padding:8px 11px;border-radius:8px;background:#eef5f0;color:var(--green);font-size:11px}
.ew-bulk-totals span{background:#fff1ed;color:#8f332c}
.ew-bulk-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.ew-bulk-list li{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 12px;border:1px solid var(--line);border-radius:9px}
.ew-bulk-list li small{display:block;margin-top:3px;color:var(--muted)}
.ew-bulk-list li strong{font-size:11px;text-align:right}
.ew-bulk-list.excluded li{background:#fffafa}
.ew-bulk-list.excluded li strong{color:#8f332c}
.ew-reminder-controls{margin-bottom:18px;overflow:visible}
.ew-reminder-filter-grid{display:grid;grid-template-columns:minmax(220px,1.4fr) repeat(4,minmax(145px,1fr)) auto;align-items:end;gap:12px;padding:20px}
.ew-reminder-filter-grid label{display:grid;gap:6px;min-width:0}
.ew-reminder-filter-grid label>span{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.ew-reminder-filter-grid input,.ew-reminder-filter-grid select,.ew-sender-row select{width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;padding:10px 11px;background:#fff;color:var(--ink);font:12px 'DM Sans'}
.ew-sender-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;border-top:1px solid var(--line);background:#fbfcfb}
.ew-sender-row>div{display:flex;align-items:center;gap:12px}
.ew-sender-row b,.ew-sender-row small{display:block}
.ew-sender-row small{margin-top:3px;color:var(--muted);font-size:11px}
.ew-sender-row select{max-width:430px}
.ew-fixed-sender{max-width:430px;padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-size:12px;font-weight:700}
.ew-sender-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--green2);color:var(--green);font-size:18px}
.ew-sender-warning{margin:0 20px 18px;padding:11px 13px;border:1px solid #efd1a0;border-radius:9px;background:var(--amber2);color:#704700;font-size:11px}
.ew-sender-warning b{margin-right:4px}
.ew-reminder-kpis{grid-template-columns:repeat(3,1fr)}
.ew-template-page-head{margin-bottom:24px}
.ew-template-section{margin-top:26px}
.ew-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px}
.ew-section-head h3{font-size:18px}
.ew-section-head p:not(.eyebrow){margin:6px 0 0;color:var(--muted);font-size:11px}
.ew-coach-template-section{padding-top:26px;border-top:1px solid var(--line)}
.ew-variable-list{display:inline-flex;flex-wrap:wrap;gap:5px}
.ew-variable-list code{padding:3px 6px;border-radius:5px;background:#eaf2ed;color:var(--green);font:700 10px monospace}
.template-form{padding:20px}
.template-form>label{display:grid;gap:6px;margin-bottom:12px;color:var(--muted);font-size:11px;font-weight:800}
.template-form input,.template-form textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 11px;background:#fff;color:var(--ink);font:12px 'DM Sans'}
.template-form textarea{resize:vertical;line-height:1.55}
.template-card.is-inactive{opacity:.72}
.template-card.is-inactive .template-form{background:#fafafa}
.ew-template-actions{display:flex;align-items:center;gap:7px}
.ew-system-pill{display:inline-flex;padding:5px 8px;border-radius:99px;background:#edf2ef;color:var(--green);font-size:9px;font-weight:800;text-transform:uppercase}
.ew-reminder-preview{width:min(680px,calc(100vw - 30px))}
.ew-reminder-preview form{padding:25px}
.ew-reminder-preview label{display:grid;gap:6px;margin-top:14px;color:var(--muted);font-size:11px;font-weight:800}
.ew-reminder-preview input,.ew-reminder-preview textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px;background:#fafbfa;color:var(--ink);font:12px 'DM Sans';line-height:1.55}
.ew-preview-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.ew-preview-meta span{padding:10px;border-radius:9px;background:#f3f6f4;color:var(--muted);font-size:10px;overflow-wrap:anywhere}
.ew-preview-meta b{display:block;margin-bottom:4px;color:var(--ink)}

@media(max-width:1350px){
  .ew-reminder-filter-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}
  .ew-search-field{grid-column:span 2}
}
@media(max-width:850px){
  .ew-reminder-filter-grid{grid-template-columns:1fr 1fr}
  .ew-search-field{grid-column:1/-1}
  .ew-sender-row{align-items:stretch;flex-direction:column}
  .ew-sender-row select{max-width:none}
  .ew-section-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:620px){
  .ew-reminder-filter-grid{grid-template-columns:1fr;padding:16px}
  .ew-search-field{grid-column:auto}
  .ew-reminder-kpis{grid-template-columns:1fr}
  .ew-preview-meta{grid-template-columns:1fr}
  .ew-row-actions{flex-direction:column}
  .ew-template-actions{align-items:flex-end;flex-direction:column}
}
/* #17: filtri aggiuntivi, invii in background, impostazioni e report */
.coach-reminder-table select{min-width:0;width:150px}
.coach-reminder-table th,.coach-reminder-table td{padding-left:10px;padding-right:10px}
.coach-reminder-table td:nth-child(2) b,.coach-reminder-table td:nth-child(3) b{white-space:nowrap}
.coach-reminder-table .ew-row-actions .btn{padding-left:10px;padding-right:10px}
@media(min-width:1351px){
  .ew-reminder-filter-grid{grid-template-columns:minmax(220px,1.4fr) repeat(4,minmax(140px,1fr))}
  .ew-reminder-kpis{grid-template-columns:repeat(4,1fr)}
}
.ew-filter-actions{display:flex;gap:8px;align-items:flex-end;grid-column:span 2}
.ew-bulk-totals .ew-bulk-sender{background:#f3f6f4;color:var(--muted)}
.coach-reminder-table .ew-identity-note{color:#8a5a00}
.coach-reminder-table .ew-recent-reminder{color:#8f332c;font-weight:700}
.ew-bulk-options{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin-top:10px}
.ew-bulk-options label{margin-top:0}
.ew-bulk-options select{min-width:240px;border:1px solid var(--line);border-radius:9px;padding:9px 10px;background:#fff;font:12px 'DM Sans'}
.ew-check{display:flex!important;align-items:center;gap:8px!important;color:var(--ink)!important;font-size:12px!important;font-weight:600!important}
.ew-check input{width:auto!important}
.ew-bulk-note,.ew-settings-note{margin:12px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.ew-bulk-preview{margin-top:6px}
.ew-bulk-preview summary{cursor:pointer;color:var(--green);font-size:11px;font-weight:700}
.ew-bulk-preview pre{margin:6px 0 0;padding:9px;border-radius:8px;background:#f3f6f4;white-space:pre-wrap;font:11px/1.5 'DM Sans'}
.ew-job-progress{height:9px;margin:12px 0 8px;border-radius:999px;background:#e8eeea;overflow:hidden}
.ew-job-progress i{display:block;height:100%;border-radius:inherit;background:var(--green);transition:width .3s ease}
.ew-job-counts{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;color:var(--muted)}
.ew-job-counts span{padding:6px 9px;border-radius:8px;background:#f3f6f4}
.ew-job-counts b{color:var(--ink)}
.ew-job-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:8px;font-size:12px;color:var(--muted)}
.ew-job-status{display:inline-block;padding:4px 9px;border-radius:999px;background:#eef5f0;color:var(--green);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.ew-job-paused,.ew-job-cancelled{background:#fff1ed;color:#8f332c}
.ew-job-dialog{width:min(900px,calc(100vw - 30px))}
.ew-job-dialog .table-wrap{max-height:48vh;overflow:auto;margin-top:12px}
.ew-job-table{width:100%;font-size:11px}
.ew-job-table td small{display:block;color:var(--muted)}
.ew-job-item-failed td,.ew-job-item-uncertain td{background:#fffafa}
.ew-job-item-excluded td{color:var(--muted)}
.ew-jobs-card{padding-bottom:14px}
.ew-job-active{margin:0 20px;padding:14px;border:1px solid var(--line);border-radius:10px}
.ew-job-active>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ew-job-active .btn{margin-top:10px}
.ew-job-list{display:grid;gap:6px;margin:10px 20px 0;padding:0;list-style:none}
.ew-job-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid var(--line);border-radius:9px}
.ew-job-list small{display:block;margin-top:3px;color:var(--muted)}
.ew-reminder-settings{padding:0}
.ew-reminder-settings summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:16px 20px;cursor:pointer}
.ew-reminder-settings summary span{color:var(--muted);font-size:11px}
.ew-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;padding:0 20px 20px;align-items:end}
.ew-settings-grid label{display:grid;gap:6px;font-size:11px}
.ew-settings-grid label>span{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.ew-settings-grid input,.ew-settings-grid select{width:100%;border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:#fff;font:12px 'DM Sans'}
.ew-settings-note{grid-column:1/-1}
.ew-settings-actions{grid-column:1/-1;display:flex;justify-content:flex-end}
.ew-attribution-note{margin:0 0 14px}
@media(max-width:1350px){
  .ew-filter-actions{grid-column:1/-1}
  .ew-reminder-kpis{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:850px){
  .ew-settings-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .ew-filter-actions{flex-direction:column;align-items:stretch}
  .ew-settings-grid{grid-template-columns:1fr}
  .ew-reminder-kpis{grid-template-columns:1fr}
  .ew-job-list li{flex-direction:column;align-items:flex-start}
}
.billing-status.agreement{background:#e3eefb;color:#1d4f8f}
