.tpl-page{max-width:1400px;margin:auto;padding:32px;color:var(--et-ink,#1a2236)}.tpl-heading,.tpl-editor-head,.tpl-preview-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.tpl-heading h1{font-size:30px;margin:4px 0 10px}.tpl-heading p{color:#627087}.tpl-eyebrow{font-size:11px;letter-spacing:1.4px;font-weight:700;color:#697997;margin:0}.tpl-tabs{display:flex;gap:8px;margin:26px 0 20px;border-bottom:1px solid #dce3ef;overflow:auto}.tpl-tabs button{white-space:nowrap;background:none;border:0;border-bottom:3px solid transparent;padding:14px 16px;color:#627087}.tpl-tabs button[aria-pressed=true]{border-color:#2a3b6e;color:#2a3b6e;font-weight:700}.tpl-note{background:#edf3fc;border-left:3px solid #4773a9;padding:15px 18px;border-radius:6px;font-size:13px}.tpl-filters{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:22px 0}.tpl-page label,.tpl-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600}.tpl-page input,.tpl-page select,.tpl-form input,.tpl-form select,.tpl-form textarea,.tpl-add select{border:1px solid #cbd5e3;border-radius:7px;background:white;color:#1a2236;padding:9px 10px;max-width:100%;width:100%;font:inherit}.tpl-filters label:first-child{flex:1;min-width:180px}.tpl-table-wrap{overflow:auto;background:white;border:1px solid #e0e6ee;border-radius:10px}.tpl-table{width:100%;border-collapse:collapse}.tpl-table th{font-size:11px;text-transform:uppercase;letter-spacing:.6px;background:#f5f7fb;color:#67758c;text-align:left;padding:14px}.tpl-table td{padding:16px 14px;border-top:1px solid #edf0f5;font-size:13px}.tpl-table td small{display:block;color:#758096;margin-top:4px}.tpl-table button{font-size:12px;margin:2px}.tpl-badge{display:inline-block;border-radius:12px;background:#edf2f9;color:#415470;padding:4px 9px;font-size:11px}.tpl-badge.default{background:#e3f3ed;color:#24644d}.tpl-pager{display:flex;justify-content:end;align-items:center;gap:10px;margin-top:18px}.tpl-pager span{margin-right:auto;font-size:12px;color:#69778b}.tpl-messages{width:100%;height:calc(100vh - 260px);min-height:550px;border:1px solid #e0e6ee;border-radius:10px;background:white}.tpl-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:20px}.tpl-links a{display:flex;flex-direction:column;gap:8px;border:1px solid #dce3ef;border-radius:10px;padding:24px;background:white;color:#2a3b6e}.tpl-links span{font-size:13px;color:#68758c}#editor{border:0;border-radius:14px;width:min(1440px,96vw);max-width:96vw;height:94vh;max-height:94vh;padding:0;color:#1a2236;box-shadow:0 20px 90px #14213d44}#editor::backdrop{background:#15213d88}.tpl-editor-head{padding:20px 24px;border-bottom:1px solid #e1e7ef}.tpl-editor-head h2{font-size:22px;margin:5px 0}.tpl-editor-layout{display:grid;grid-template-columns:1fr 1fr;height:calc(94vh - 165px);overflow:hidden}.tpl-form{overflow:auto;padding:22px}.tpl-form fieldset{border:0;margin:0;padding:0;min-width:0}.tpl-form label{margin-bottom:14px}.tpl-form textarea{resize:vertical;min-height:50px}.tpl-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.tpl-checks{display:flex;gap:22px;margin:15px 0}.tpl-checks label,.tpl-columns label{display:flex;flex-direction:row;align-items:center;font-size:12px}.tpl-checks input,.tpl-columns input{width:auto}.tpl-form details{margin:12px 0;padding:12px;border:1px solid #e1e7ef;border-radius:8px}.tpl-form summary,.tpl-preview-panel summary{cursor:pointer;font-weight:600;font-size:13px;margin-bottom:10px}.tpl-block{border:1px solid #d7e0ed;border-radius:9px;margin:12px 0;padding:14px;background:#fafbfd}.tpl-block-title{display:flex;align-items:center;gap:5px;margin-bottom:12px}.tpl-block-title strong{margin-right:auto;font-size:12px}.tpl-block button{border:1px solid #dce3ef;background:white;border-radius:5px;padding:4px 8px;font-size:12px}.tpl-field-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin:8px 0}.tpl-field-row input{min-width:0}.tpl-columns{display:flex;flex-wrap:wrap;gap:8px 14px;margin:10px 0}.tpl-add{display:flex;gap:8px;align-items:center;margin:12px 0}.tpl-preview-panel{background:#f3f6fa;padding:22px;overflow:auto;border-left:1px solid #e1e7ef}.tpl-preview-panel h3{font-size:16px;margin:0}.tpl-help{font-size:12px;font-weight:400;color:#6b7890;margin:12px 0}.tpl-preview-panel iframe{width:100%;height:540px;border:1px solid #d9e2ee;border-radius:6px;background:white;margin:10px 0 20px}.tpl-variables{display:flex;flex-wrap:wrap;gap:6px}.tpl-variables button{background:white;border:1px solid #d3ddec;border-radius:5px;padding:6px 8px;font-size:11px;color:#354a72}.tpl-editor-footer{padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #e1e7ef}.tpl-error{color:#b43246!important;font-size:13px}#editor-status,#preview-status{font-size:12px}[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #87b0ec;outline-offset:2px}@media(max-width:850px){.tpl-page{padding:18px}.tpl-heading{align-items:start}.tpl-heading h1{font-size:25px}.tpl-editor-layout{grid-template-columns:1fr;overflow:auto;height:calc(94vh - 175px)}.tpl-form,.tpl-preview-panel{overflow:visible;padding:16px}.tpl-editor-head{padding:16px}.tpl-grid{gap:10px}.tpl-heading .btn{font-size:12px}.tpl-editor-footer{padding:14px}.tpl-preview-panel iframe{height:420px}.tpl-table{min-width:660px}}
body.tpl-body{display:block;min-height:100vh}.tpl-page{width:100%;min-width:0;box-sizing:border-box}.tpl-heading>div{min-width:0}.tpl-heading>button{flex-shrink:0}.tpl-editor-layout>*{min-width:0}
.tpl-heading-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}#brand-editor{width:min(1000px,94vw);max-width:94vw;max-height:94vh;padding:0;border:0;border-radius:12px;color:#1a2236}#brand-editor::backdrop{background:#15213d88}.tpl-brand-layout{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding:24px}.tpl-brand-layout>div{min-width:0}.tpl-brand-layout h3{font-size:17px}.tpl-brand-layout p{font-size:13px}.tpl-brand-check{display:flex;gap:8px;align-items:center;margin:18px 0}.tpl-brand-colors{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.tpl-brand-colors label{display:flex;flex-direction:column;gap:9px;font-size:12px}.tpl-brand-colors input{width:100%;height:42px;border:1px solid #dce3ef;border-radius:6px;background:white;padding:3px}.tpl-brand-colors output{font-family:monospace;font-size:12px}#brand-logo{max-width:200px;max-height:90px;margin:10px 0;background:#fff;padding:8px;border:1px solid #dce3ef}#brand-preview{width:100%;height:350px;background:white;border:1px solid #dce3ef;border-radius:8px}@media(max-width:700px){.tpl-brand-layout{grid-template-columns:1fr;padding:18px}.tpl-heading-actions{max-width:155px}#brand-editor .tpl-editor-footer{position:sticky;bottom:0;background:white}#brand-preview{height:260px}}

/* Apariencia compartida con Mi escritorio; limitada al módulo de Plantillas. */
body.tpl-body { background: #f5f7fb; color: #172b4d; }
.tpl-page { max-width: 1600px; padding: 20px 18px 32px; }
.tpl-heading { align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.tpl-heading h1 { position: relative; font-size: 22px; font-weight: 700; margin: 0 0 8px; padding-left: 13px; color: #2a3b6e; }
.tpl-heading h1::before { content: ''; position: absolute; left: 0; top: 3px; width: 4px; height: 20px; border-radius: 3px; background: linear-gradient(#2a3b6e 45%, #ff6b00); }
.tpl-heading .tpl-breadcrumb { font-size: 12px; margin: 0; color: #60769b; }
.tpl-breadcrumb span { padding: 0 10px; color: #98a3b5; }
.tpl-breadcrumb strong { color: #e65f00; font-weight: 600; }
.tpl-heading-actions { gap: 8px; }
.tpl-body .btn { min-height: 36px; border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 600; box-shadow: none; }
.tpl-body .btn-light { background: #fff; border: 1px solid #dfe6f2; color: #52688e; }
.tpl-body .btn-light:hover { background: #f1f4fb; border-color: #a9b8d4; }
.tpl-body .btn-primary { background: #2a3b6e; border: 1px solid #2a3b6e; color: #fff; }
.tpl-body .btn-primary:hover { background: #20305c; }
.tpl-body .btn:disabled { opacity: .45; cursor: default; }
.tpl-heading-actions .btn span, #refresh span { margin-right: 5px; font-size: 17px; line-height: 1; }
.tpl-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; border: 0; margin: 0 0 24px; overflow: visible; }
.tpl-tabs button { --family-color: #2a3b6e; --family-tint: #eef0fa; display: flex; align-items: center; gap: 14px; text-align: left; white-space: normal; min-width: 0; padding: 20px 18px; background: white; border: 1px solid #dfe6f2; border-top: 3px solid var(--family-color); border-radius: 12px; box-shadow: 0 2px 3px #172b4d08; color: #172b4d; transition: box-shadow .15s, background .15s; }
.tpl-tabs button[data-tab=mensajes] { --family-color: #3184ce; --family-tint: #eaf3fc; }
.tpl-tabs button[data-tab=otros] { --family-color: #e99120; --family-tint: #fff4e7; }
.tpl-tabs button:hover { background: #fafbfe; box-shadow: 0 3px 10px #172b4d12; }
.tpl-tabs button[aria-pressed=true] { border-color: #a4afd0; border-top-color: var(--family-color); background: #fdfdff; box-shadow: 0 0 0 1px #2a3b6e12; }
.tpl-family-icon { flex: 0 0 38px; height: 38px; display: grid; place-items: center; background: var(--family-tint); color: var(--family-color); border-radius: 9px; font-size: 23px; }
.tpl-tabs strong { display: block; font-size: 13px; font-weight: 700; }
.tpl-tabs small { display: block; font-size: 12px; font-weight: 400; color: #7d8da8; margin-top: 6px; }
.tpl-note { display: flex; align-items: center; gap: 14px; background: white; border: 1px solid #dfe6f2; border-left: 3px solid #ff6b00; border-radius: 12px; padding: 15px 18px; margin-bottom: 18px; font-size: 12px; }
.tpl-note strong { color: #172b4d; font-size: 12px; }
.tpl-note p { margin: 5px 0 0; color: #7485a1; line-height: 1.6; }
.tpl-note-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 9px; color: #ff6b00; background: #fff0e5; font-size: 23px; }
.tpl-catalog, #tab-mensajes, #tab-otros { background: white; border: 1px solid #dfe6f2; border-radius: 12px; padding: 20px 18px; box-shadow: 0 2px 3px #172b4d08; }
.tpl-catalog-heading h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #172b4d; margin: 0 0 7px; }
.tpl-catalog-heading p, #tab-mensajes > p, #tab-otros > p { margin: 0; font-size: 12px; color: #7d8da8; }
.tpl-filters { gap: 12px; margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid #e2e8f2; }
.tpl-filters label { color: #52688e; font-size: 11px; }
.tpl-filters label:nth-child(2) { min-width: 120px; }
.tpl-filters label:nth-child(3) { flex: 0 1 260px; }
.tpl-filters label:nth-child(4) { min-width: 100px; }
.tpl-filters input, .tpl-filters select { min-height: 36px; border-color: #dbe3f0; font-size: 12px; }
#status:empty { display: none; }
#status { margin: 0 0 16px; font-size: 12px; }
.tpl-table-wrap { border: 0; border-radius: 0; }
.tpl-table th { background: #f7f9fc; color: #8391a8; font-size: 10px; padding: 12px; }
.tpl-table td { background: white; border-color: #e2e8f2; padding: 17px 12px; font-size: 12px; }
.tpl-table tbody tr:hover td { background: #fafbfe; }
.tpl-table td:first-child strong { color: #172b4d; }
.tpl-table td small { font-size: 11px; color: #8290a8; margin-top: 6px; }
.tpl-table .btn { font-size: 11px; min-height: 32px; padding: 6px 11px; }
.tpl-table td:last-child { min-width: 225px; }
.tpl-badge { font-size: 10px; padding: 4px 8px; }
.tpl-badge.default { background: #e3f6ef; color: #008567; }
.tpl-pager { padding-top: 16px; border-top: 1px solid #e2e8f2; margin-top: 0; }
.tpl-links a { border-top: 3px solid #3184ce; box-shadow: 0 2px 3px #172b4d08; padding: 20px; }
.tpl-links a:hover { background: #f7f9fd; border-color: #a8bad8; }
.tpl-links strong { font-size: 13px; }
.tpl-links span { font-size: 12px; }
.tpl-messages { margin-top: 18px; }
#editor, #brand-editor { background: white; box-shadow: 0 20px 90px #14213d44; }
.tpl-editor-head { background: #fff; padding: 18px 22px; border-top: 3px solid #2a3b6e; }
.tpl-editor-head h2 { font-size: 20px; color: #2a3b6e; }
.tpl-editor-head .tpl-eyebrow { font-size: 10px; color: #8190a8; }
.tpl-editor-footer { background: #fff; }
.tpl-preview-panel { background: #f5f7fb; }
.tpl-preview-panel h3, .tpl-brand-layout h3 { text-transform: uppercase; font-size: 12px; font-weight: 700; color: #172b4d; }
.tpl-brand-layout > div:last-child { background: #f5f7fb; padding: 18px; border: 1px solid #e2e8f2; border-radius: 10px; }
.tpl-brand-check { padding: 14px; border: 1px solid #dfe6f2; border-radius: 8px; background: #f8faff; font-size: 13px; }
.tpl-body input[type=checkbox] { accent-color: #2a3b6e; }
@media (max-width: 850px) {
  .tpl-page { padding: 18px 14px; }
  .tpl-heading { flex-wrap: wrap; margin-bottom: 20px; }
  .tpl-heading h1 { font-size: 22px; }
  .tpl-heading-actions { max-width: none; justify-content: flex-start; }
  .tpl-tabs { gap: 10px; }
  .tpl-tabs button { padding: 14px 12px; gap: 10px; align-items: flex-start; }
  .tpl-tabs small { line-height: 1.5; }
  .tpl-family-icon { flex-basis: 30px; height: 30px; font-size: 20px; }
  .tpl-filters label:nth-child(3) { flex: 1; }
}
@media (max-width: 600px) {
  .tpl-tabs { grid-template-columns: 1fr; gap: 9px; margin-bottom: 18px; }
  .tpl-tabs button { align-items: center; padding: 12px; border-top-width: 1px; border-left: 3px solid var(--family-color); }
  .tpl-tabs small { margin-top: 3px; font-size: 11px; }
  .tpl-catalog, #tab-mensajes, #tab-otros { padding: 18px 12px; }
  .tpl-note { align-items: flex-start; padding: 14px 12px; gap: 10px; }
  .tpl-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tpl-filters label:first-child, .tpl-filters label:nth-child(3) { grid-column: 1 / -1; min-width: 0; }
  .tpl-filters label:nth-child(2), .tpl-filters label:nth-child(4) { min-width: 0; }
  .tpl-filters label:nth-child(3) { grid-row: 3; }
  .tpl-filters #refresh { grid-column: 1 / -1; }
  .tpl-pager { flex-wrap: wrap; gap: 8px; }
  .tpl-pager span { flex-basis: 100%; }
  .tpl-brand-layout { gap: 18px; }
}

/* Canales independientes: email, WhatsApp y SMS. */
.tpl-tabs { grid-template-columns: repeat(5,minmax(0,1fr)); gap:12px; }
.tpl-tabs button { padding:16px 12px; gap:10px; }
.tpl-tabs button[data-tab=email] { --family-color:#3184ce; --family-tint:#eaf3fc; }
.tpl-tabs button[data-tab=whatsapp] { --family-color:#00a878; --family-tint:#e3f6ef; }
.tpl-tabs button[data-tab=sms] { --family-color:#7762b6; --family-tint:#f0ebfc; }
@media(max-width:1100px){.tpl-tabs{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.tpl-tabs{grid-template-columns:1fr;}}

/* Filtros alineados, incluido el boton de actualizar. */
.tpl-filters { display:grid; grid-template-columns:minmax(150px,2fr) minmax(110px,1fr) minmax(160px,1.5fr) minmax(90px,.7fr) minmax(125px,1fr) auto; align-items:end; }
.tpl-filters label { min-width:0!important; margin:0; }
.tpl-filters input,.tpl-filters select,.tpl-filters #refresh { height:44px; min-height:44px; margin:0; box-sizing:border-box; }
.tpl-filters #refresh { display:inline-flex; align-items:center; justify-content:center; align-self:end; }
@media(max-width:1100px){.tpl-filters{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.tpl-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.tpl-filters label{grid-row:auto!important;grid-column:auto!important;}.tpl-filters label:first-child,.tpl-filters label:nth-child(3),.tpl-filters #refresh{grid-column:1/-1!important;}}
