/* CHB_EMAILS_MASIVOS_V1 · estilos de la sección, sobre las variables del Admin */
/* CHB_EMAILS_MASIVOS_UI_V2 · filtros compactos y controles sin solaparse */
/* CHB_EMAILS_MASIVOS_UI_V3 · audiencia con aire y pestañas */
.em-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:22px}
.em-tools .card-action{min-height:78px;margin:0}
.em-template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.em-template{background:#0b1721;border:1px solid var(--line);border-radius:11px;padding:17px 17px 15px;display:flex;flex-direction:column;gap:9px}
.em-template .badge{align-self:flex-start}
.em-template h3{margin:0;font-size:14px;font-weight:650;letter-spacing:-.2px}
.em-template p{margin:0;color:var(--muted);font-size:12px;line-height:1.6;flex:1}
.em-template button{align-self:flex-start;margin-top:4px}

.em-builder{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.85fr);gap:18px;align-items:start}
.em-builder-main{min-width:0}
.em-builder-side{position:sticky;top:18px;min-width:0}
.em-builder .panel-head{padding:15px 18px}
.em-builder .panel-head p{font-size:11px;margin-top:4px}
.em-builder .panel-body{padding:18px}

.em-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.em-filters .field{margin-bottom:9px}
.em-filters .field>label{font-size:11px;margin-bottom:4px}
.em-filters .field>small{margin-top:3px;font-size:10px;line-height:1.35}
.em-filters input,.em-filters select{min-height:35px;padding:6px 10px;font-size:12px;line-height:1.2}
.em-filters select{
 appearance:none;-webkit-appearance:none;-moz-appearance:none;
 padding-right:34px;cursor:pointer;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238fa7b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat;background-position:right 11px center;background-size:12px 8px;
}
.em-filters input[type=date]{padding-right:38px}
.em-filters input[type=date]::-webkit-calendar-picker-indicator{opacity:.7;margin-right:2px;cursor:pointer}
.em-filters .form-row{grid-column:span 2;gap:12px}
.em-filters .form-row .field{margin-bottom:9px}

.em-presets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-top:10px;border-top:1px solid var(--line)}
.em-presets .fineprint{margin-right:2px}
.em-pill{display:inline-flex;align-items:center;min-height:26px;padding:3px 8px;border-radius:999px;
 border:1px solid #2b4253;background:#0c1a25;color:#b9cedc;font-size:10px;font-weight:550;gap:5px}
.em-pill:hover{border-color:#4f7b91;background:#132737;color:#fff}
.em-placeholders{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:-4px 0 16px}
.em-cta{margin:0 0 4px;border:1px solid var(--line);border-radius:9px;padding:12px 14px;background:#0b1721}
.em-cta summary{color:var(--cyan)}
.em-cta .form-row{margin-top:12px}
.em-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin:2px 0 18px}
.em-actions .quiet{margin-right:auto}

.em-builder-side .panel-head{padding:19px 22px}
.em-builder-side .panel-body{padding:22px 22px 20px}
.em-audience{display:flex;flex-direction:column}
.em-aud-count{display:flex;flex-direction:column;gap:4px;padding:2px 0 16px;border-bottom:1px solid var(--line);margin:0 0 16px}
.em-aud-count span{font-size:42px;font-weight:650;letter-spacing:-1.8px;line-height:1;color:#f2fbff}
.em-aud-count small{color:var(--muted);font-size:12px;line-height:1.45}
.em-aud-summary{margin:0 0 16px;color:var(--muted);font-size:11.5px;line-height:1.55}
.em-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 17px}
.em-chip{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;border:1px solid #2b4253;border-radius:7px;
 background:#122430;color:#b9cedc;font-size:11px;line-height:1.2}
.em-chip b{color:#fff;font-weight:650}
.em-mini{display:grid;gap:8px;margin:0 0 17px;font-size:12px}
.em-mini div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border-radius:8px;background:#0b1721;border:1px solid #1b2d3b}
.em-mini span{color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.35}
.em-mini b{font-weight:650;flex:0 0 auto;font-size:13px}
.em-aud-actions{display:grid;gap:8px;padding-top:16px;border-top:1px solid var(--line)}
.em-aud-actions button{width:100%;min-height:40px;justify-content:center}
.em-sample{display:grid;gap:4px;margin:9px 0}
.em-person{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-radius:7px;background:#0b1721;border:1px solid #1b2d3b;font-size:11px;min-width:0}
.em-person>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.em-person small{display:block;color:var(--muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.em-person .badge{flex:0 0 auto}
.em-tabs{margin:0 0 18px}

.em-preview-wrap{background:#060e15;border:1px solid #203442;border-radius:10px;padding:8px;overflow:hidden}
.em-preview{display:block;width:100%;height:520px;border:0;border-radius:6px;background:#060e15}
.em-body-preview{white-space:pre-wrap;word-break:break-word;margin:0;max-height:320px;overflow:auto;
 color:#c4d8e6;font:13px/1.7 Arial,Helvetica,sans-serif;background:#08131d;border:1px solid #1d303e;border-radius:8px;padding:16px}

.em-progress{display:flex;align-items:center;gap:12px;margin:2px 0 12px}
.em-progress progress{appearance:none;width:100%;height:12px;border:0;border-radius:999px;overflow:hidden;background:#12222e}
.em-progress progress::-webkit-progress-bar{background:#12222e;border-radius:999px}
.em-progress progress::-webkit-progress-value{background:linear-gradient(90deg,#35d7ef,#086fed);border-radius:999px}
.em-progress progress::-moz-progress-bar{background:linear-gradient(90deg,#35d7ef,#086fed);border-radius:999px}
.em-progress span{font-size:11px;color:var(--muted);min-width:36px;text-align:right}
.em-progress-legend{display:flex;flex-wrap:wrap;gap:6px 16px;color:var(--muted);font-size:11px;margin-bottom:20px}

@media(min-width:1560px){
 .em-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 .em-filters .form-row{grid-column:span 2}
}
@media(max-width:1180px){
 .em-builder{grid-template-columns:1fr}
 .em-builder-side{position:static}
 .em-preview{height:480px}
}
@media(max-width:900px){
 .em-tools{grid-template-columns:1fr}
 .em-filters{grid-template-columns:1fr}
 .em-filters .form-row{grid-column:auto}
 .em-actions .quiet{margin-right:0;width:100%;justify-content:flex-start}
}
@media(max-width:620px){
 .em-aud-count span{font-size:30px}
 .em-preview{height:420px}
 .em-pill{font-size:10px}
 .em-actions{flex-direction:column;align-items:stretch}
 .em-actions button,.em-actions .quiet{width:100%}
}
