:root{
  --bg:#f3f6f5;
  --surface:#ffffff;
  --surface-soft:#f8faf9;
  --surface-tint:#eef7f3;
  --ink:#13231d;
  --ink-2:#34443d;
  --muted:#738079;
  --line:#dfe7e3;
  --line-strong:#cfdad5;
  --accent:#11684f;
  --accent-2:#178565;
  --accent-soft:#e8f4ef;
  --sidebar:#10241c;
  --sidebar-2:#0c1d16;
  --sidebar-ink:#dce9e3;
  --danger:#b2353b;
  --danger-soft:#fff0f1;
  --warn:#8a640c;
  --warn-soft:#fff8e8;
  --success:#14734f;
  --shadow:0 18px 50px rgba(24,55,43,.10);
  --shadow-sm:0 7px 22px rgba(24,55,43,.07);
  --radius:18px;
  --radius-sm:11px;
  --sidebar-width:248px;
}
*{box-sizing:border-box}
html{background:var(--bg);scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh;-webkit-font-smoothing:antialiased}
a{color:var(--accent)}
svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.app-shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);display:flex;flex-direction:column;min-width:0;padding:22px 15px 16px;background:linear-gradient(180deg,var(--sidebar) 0,var(--sidebar-2) 100%);color:var(--sidebar-ink);z-index:50;box-shadow:10px 0 35px rgba(9,28,20,.08);overflow:hidden}
.brand{display:flex;align-items:center;gap:11px;padding:2px 7px 24px;color:#fff!important;text-decoration:none}
.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#1b936f,#0e654c);box-shadow:0 10px 24px rgba(20,151,111,.24);font-weight:950;font-size:13px;letter-spacing:.02em}
.brand-copy{display:flex;flex-direction:column;line-height:1.05}.brand-copy b{font-size:19px;letter-spacing:-.035em}.brand-copy small{margin-top:5px;color:#93ab9f;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.nav-label{margin:17px 10px 7px;color:#789386;font-size:9px;font-weight:900;letter-spacing:.15em;text-transform:uppercase}
.side-nav{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}.side-nav::-webkit-scrollbar{width:0;height:0;display:none}
.nav-item{min-width:0;display:flex;align-items:center;gap:11px;min-height:42px;padding:10px 11px;border-radius:11px;color:#bdd0c7;text-decoration:none;font-size:13px;font-weight:760;transition:.16s ease}
.nav-item svg{width:18px;height:18px;opacity:.85}.nav-item:hover{background:rgba(255,255,255,.065);color:#fff;transform:translateX(2px)}
.nav-item.active{background:linear-gradient(90deg,rgba(31,143,107,.26),rgba(31,143,107,.10));color:#fff;box-shadow:inset 3px 0 0 #33b78c}
.nav-item.active svg{color:#56cda6;opacity:1}.sidebar-foot{margin-top:auto;padding:14px 9px 0;border-top:1px solid rgba(255,255,255,.08)}.version{font-size:10px;color:#6f8d7f}
.app-stage{min-height:100vh;margin-left:var(--sidebar-width)}
.topbar{position:sticky;top:0;z-index:35;display:flex;align-items:center;gap:14px;min-height:68px;padding:10px 28px;background:rgba(255,255,255,.90);backdrop-filter:saturate(140%) blur(14px);border-bottom:1px solid rgba(214,225,220,.88);box-shadow:0 4px 18px rgba(21,48,38,.035)}
.nav-toggle{display:none;width:40px;height:40px;padding:0;background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:none}.nav-toggle svg{width:19px;height:19px}
.topbar-context{display:flex;align-items:center;gap:11px}.context-label{color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.profilepick{margin:0}.profilepick select{width:240px;margin:0;padding:9px 34px 9px 12px;border-radius:10px;background:#fbfcfc;font-weight:750;color:var(--ink)}
.topbar-spacer{flex:1}.user-menu{display:flex;align-items:center;gap:9px}.user-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:950}.user-copy{display:flex;flex-direction:column;line-height:1.05}.user-copy b{font-size:12px}.user-copy small{margin-top:4px;color:var(--muted);font-size:10px}.logout-link{display:flex;align-items:center;gap:6px;margin-left:6px;padding:8px 9px;border-radius:9px;color:var(--muted);text-decoration:none;font-size:11px;font-weight:800}.logout-link:hover{background:#f2f5f4;color:var(--ink)}.logout-link svg{width:16px;height:16px}
.sidebar-scrim{display:none}

.container{width:min(1320px,calc(100% - 48px));margin:34px auto 72px}
.public-stage{min-height:100vh;padding:22px;background:radial-gradient(circle at 18% 10%,rgba(27,147,111,.10),transparent 32%),linear-gradient(180deg,#f7faf9 0,#eff4f2 100%)}
h1{font-size:34px;line-height:1.12;letter-spacing:-.045em;margin:0 0 18px}h2{font-size:20px;letter-spacing:-.025em;margin:0 0 15px}h3{font-size:15px;letter-spacing:-.01em;margin:22px 0 10px}.eyebrow{display:block;margin-bottom:7px;color:var(--accent-2);font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.15em}.pagelead{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.55;max-width:760px}

.pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin-bottom:20px}.pagehead h1{margin:0}.head-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.backlink{display:inline-flex;align-items:center;margin:0 0 11px;color:var(--muted);font-size:11px;font-weight:800;text-decoration:none}.backlink:hover{color:var(--accent)}
.section-head{display:flex;align-items:end;justify-content:space-between;margin:28px 0 12px}.section-head h2{margin:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin:0 0 20px;box-shadow:var(--shadow-sm)}.card>h2{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid #edf1ef;margin-bottom:16px}
.authbox{width:min(620px,calc(100% - 30px));margin:7vh auto;background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:var(--shadow)}.authbox.wide{width:min(780px,calc(100% - 30px))}.authbox h1{font-size:31px}
.grid2,.grid3,.twocol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.twocol{align-items:start}.twocol>.card{height:100%}
label{display:block;font-size:11px;font-weight:850;color:#3b4943;margin:0 0 14px;letter-spacing:.01em}
input,select,textarea{display:block;width:100%;margin-top:7px;border:1px solid var(--line-strong);border-radius:10px;padding:11px 12px;background:#fff;color:var(--ink);font:inherit;font-size:13px;transition:.15s ease}textarea{min-height:112px;resize:vertical}input:hover,select:hover,textarea:hover{border-color:#b8c8c1}input:focus,select:focus,textarea:focus,.editor:focus{outline:3px solid rgba(17,104,79,.10);border-color:var(--accent);box-shadow:0 0 0 1px rgba(17,104,79,.03)}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid transparent;border-radius:10px;background:linear-gradient(180deg,#178261,var(--accent));color:#fff;padding:9px 14px;font:inherit;font-size:12px;font-weight:850;text-decoration:none;cursor:pointer;box-shadow:0 6px 16px rgba(17,104,79,.17);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}button:hover,.button:hover{filter:brightness(.98);transform:translateY(-1px);box-shadow:0 9px 20px rgba(17,104,79,.20)}button:active,.button:active{transform:translateY(0)}button svg,.button svg,.actionbtn svg,.empty-state svg,.metric-icon svg,.profile-card svg,.hero-art svg{width:16px;height:16px}
button.secondary,.button.secondary{background:#f8faf9;color:#30413a;border-color:var(--line);box-shadow:none}button.secondary:hover,.button.secondary:hover{background:#eef4f1;border-color:#cad8d2}.button.danger,button.danger{background:var(--danger)}.inline{display:inline}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:18px}.icon-only{width:38px;padding:0}.icon-only.copied{background:var(--accent-soft);color:var(--accent)}
.notice{padding:13px 15px;border-radius:12px;margin:0 0 18px;border:1px solid;box-shadow:0 4px 12px rgba(0,0,0,.02);font-size:13px}.notice.success{background:#eaf7ef;border-color:#bfe3cd;color:#184c37}.notice.error{background:#fff0f0;border-color:#efc5c5;color:#7c2222}.notice.warn{background:var(--warn-soft);border-color:#ead8a6;color:#624707}.muted{color:var(--muted);font-size:12px}.check{display:flex;gap:9px;align-items:flex-start;font-weight:600;color:#45534d}.check input{width:auto;margin:3px 0 0}.checkgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px}

.dashboard-hero{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;min-height:170px;margin-bottom:20px;padding:30px 34px;border-radius:24px;background:linear-gradient(120deg,#12372a 0,#0e5f47 58%,#168461 100%);color:#fff;box-shadow:0 18px 45px rgba(17,72,52,.20)}.dashboard-hero::after{content:"";position:absolute;width:310px;height:310px;right:-110px;top:-120px;border-radius:50%;background:rgba(255,255,255,.07)}.dashboard-hero .eyebrow{color:#83e0bf}.dashboard-hero h1{margin:0 0 10px;font-size:36px}.dashboard-hero p{max-width:640px;margin:0;color:#d7e8e1;font-size:14px;line-height:1.6}.hero-art{display:grid;place-items:center;width:86px;height:86px;border-radius:24px;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.14);z-index:1}.hero-art svg{width:40px;height:40px;color:#c8f4e4}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:28px}.metrics>a,.metrics>div{position:relative;display:block;background:linear-gradient(180deg,#fff,#fbfcfc);border:1px solid var(--line);border-radius:17px;padding:18px 19px;text-decoration:none;color:var(--ink);box-shadow:var(--shadow-sm);transition:.16s ease}.metrics>a:hover{transform:translateY(-2px);border-color:#c9d8d2;box-shadow:var(--shadow)}.metrics b{display:block;margin-top:11px;font-size:29px;letter-spacing:-.045em}.metrics span,.metrics small{color:var(--muted);font-size:11px}.metric-icon{display:grid!important;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}.metric-icon svg{width:17px;height:17px}.metrics.compact{margin:0 0 20px}.metrics.compact>div{padding:16px}.metrics.compact b{margin-top:0}
.profilecards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.profile-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:15px;background:#fff;text-decoration:none;color:var(--ink);box-shadow:var(--shadow-sm);transition:.16s ease}.profile-card:hover{transform:translateY(-2px);border-color:#c5d5ce;box-shadow:var(--shadow)}.profile-card.active{border-color:#a9d0c1;background:linear-gradient(180deg,#fff,#f3faf7)}.profile-card-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#edf5f2;color:var(--accent)}.profile-card-icon svg{width:19px;height:19px}.profile-card b{display:block;font-size:13px}.profile-card small{display:block;margin-top:4px;color:var(--muted);font-size:10px}.profile-card>svg{color:#94a49d}

.table-wrap{width:100%;overflow:auto;border:1px solid #e3ebe7;border-radius:14px;background:#fff}.data-table,table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px}.data-table th,.data-table td,th,td{text-align:left;padding:12px 13px;border-bottom:1px solid #edf1ef;vertical-align:middle}.data-table th,th{background:#f7f9f8;font-size:9px;text-transform:uppercase;letter-spacing:.09em;color:#77847e;font-weight:950;white-space:nowrap}.data-table tbody tr{transition:background .12s ease}.data-table tbody tr:hover{background:#fbfdfc}.table-wrap tr:last-child td{border-bottom:0}.table-title{font-weight:850;color:var(--ink);text-decoration:none}.table-title:hover{color:var(--accent)}.table-subtitle{margin-top:4px;color:var(--muted);font-size:10px;max-width:520px;line-height:1.4}.actions-col{width:1%;text-align:right}.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}.actionbtn{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:6px 9px;border-radius:9px;border:1px solid var(--line);background:#fff;color:#3b4a43;text-decoration:none;font-size:10px;font-weight:850;box-shadow:none;transition:.14s ease}.actionbtn:hover{transform:translateY(-1px);background:#f5f8f7;border-color:#cbd8d2;color:var(--accent)}.actionbtn.delete{color:var(--danger);border-color:#efd4d4;background:#fffafa}.actionbtn.delete:hover{background:var(--danger-soft);border-color:#e7bbbb}.actionbtn.view{color:#27644f}.actionbtn.edit{color:#405d76}.actionbtn svg{width:13px;height:13px}.count-pill,.status-pill{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:850;background:var(--accent-soft);color:var(--accent);white-space:nowrap}.status-pill{min-width:0;text-transform:capitalize}.status-disabled,.status-error,.status-failed,.status-unsubscribed,.status-blocked{background:#fff0f0;color:#9d3030}.status-pending,.status-stale,.status-paused,.status-invited,.status-pending_identity{background:#fff6dd;color:#80600d}.status-live,.status-sending,.status-processing{background:#eaf2ff;color:#365f9a}.status-simulate,.status-draft,.status-queued{background:#f0f2f4;color:#5c6972}.status-ok,.status-active,.status-completed,.status-sent,.status-manager{background:#e8f6ef;color:#1b6e4c}.status-admin{background:#eee9fb;color:#6542a8}.status-viewer{background:#eef2f4;color:#54646d}.status-editor{background:#eaf2ff;color:#3d6799}.empty-state{display:flex;min-height:155px;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:var(--muted);gap:7px;padding:25px}.empty-state svg{width:28px;height:28px;color:#97aaa1}.empty-state b{color:#3b4b44;font-size:13px}.empty-state span{font-size:11px}.table-error{display:block;max-width:320px;color:#9a4040;white-space:normal}

.detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.detail-grid>div{padding:14px;border:1px solid #e8eeeb;border-radius:12px;background:#fbfcfc}.detail-grid span{display:block;margin-bottom:6px;color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.detail-grid b{display:block;font-size:12px;line-height:1.45;word-break:break-word}.health-row{display:grid;grid-template-columns:150px 1fr;gap:12px;align-items:flex-start;padding:11px 0;border-bottom:1px solid #edf1ef}.health-row:last-child{border-bottom:0}.health-row p{margin:2px 0;color:var(--ink-2);font-size:12px;line-height:1.45}.copy-line,.copy-card{display:flex;align-items:center;gap:8px}.copy-line{margin-top:9px}.copy-line code{flex:1;overflow:auto}.copy-card{padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfcfc;margin-bottom:9px}.copy-card span{min-width:90px;color:var(--muted);font-size:10px;font-weight:850}.copy-card code{flex:1;overflow:auto}.newsletter-preview{max-width:760px;margin:0 auto;padding:28px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 6px 20px rgba(25,50,40,.05);line-height:1.6}.newsletter-preview img{max-width:100%;height:auto}
.form-clean{max-width:900px}.form-clean .actions{padding-top:4px}
code,pre{background:#f0f3f2;border:1px solid var(--line);border-radius:7px;padding:2px 5px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}pre{padding:14px;overflow:auto;white-space:pre-wrap}
.editorbar{display:flex;gap:6px;flex-wrap:wrap;padding:8px;background:#f4f7f6;border:1px solid var(--line);border-bottom:0;border-radius:11px 11px 0 0}.editorbar button{min-height:32px;background:#fff;color:#26352f;border:1px solid var(--line);padding:6px 9px;box-shadow:none}.editor{min-height:380px;background:#fff;border:1px solid var(--line);border-radius:0 0 11px 11px;padding:22px;line-height:1.6}.hp{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}ul{line-height:1.6}.empty-panel{padding:20px;border:1px dashed var(--line-strong);border-radius:14px;color:var(--muted);background:#fff}

@media(max-width:1100px){.profilecards{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3,.checkgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.context-label{display:none}.profilepick select{width:210px}}
@media(max-width:880px){.sidebar{transform:translateX(-102%);transition:transform .2s ease}.app-stage{margin-left:0}.nav-toggle{display:inline-flex}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-scrim{display:block;position:fixed;inset:0;background:rgba(7,20,15,.42);opacity:0;pointer-events:none;transition:.2s ease;z-index:45}.sidebar-open .sidebar-scrim{opacity:1;pointer-events:auto}.topbar{padding:10px 16px}.container{width:min(100% - 28px,1320px);margin-top:25px}.user-copy{display:none}.logout-link span{display:none}.profilepick select{width:190px}.dashboard-hero{padding:26px}.hero-art{display:none}}
@media(max-width:680px){.grid2,.grid3,.twocol,.profilecards,.checkgrid,.detail-grid{grid-template-columns:1fr}.metrics{grid-template-columns:1fr 1fr}.card,.authbox{padding:17px;border-radius:15px}.pagehead{align-items:flex-start;flex-direction:column}.head-actions{width:100%;justify-content:flex-start}.dashboard-hero{padding:22px;border-radius:18px}.dashboard-hero h1{font-size:29px}.profilepick select{width:155px;max-width:44vw}.topbar{gap:8px}.user-avatar{display:none}.actionbtn span{display:none}.actionbtn{width:33px;height:33px;padding:0;justify-content:center}.row-actions{gap:4px}.table-wrap{border-radius:10px}.data-table th,.data-table td,th,td{padding:10px 10px}.copy-card{align-items:flex-start;flex-wrap:wrap}.copy-card span{width:100%}.copy-card code{max-width:calc(100% - 48px)}.health-row{grid-template-columns:1fr}.authbox{margin:3vh auto}.container{width:min(100% - 18px,1320px)}.metrics b{font-size:25px}}

/* Confirmación double opt-in: estado persistente tras enviar desde administración. */
.actionbtn.sent{background:#e8f6ef;color:#176b4a;border-color:#b9dfcc}
.actionbtn.sent:hover{background:#ddf2e7;border-color:#a8d6bf;color:#105d3f}
.button.confirmation-sent,button.confirmation-sent{background:#e8f6ef;color:#176b4a;border-color:#b9dfcc;box-shadow:none}
.button.confirmation-sent:hover,button.confirmation-sent:hover{background:#ddf2e7;border-color:#a8d6bf;color:#105d3f}

/* Queue console */
.queue-console{margin:0 0 24px;padding:20px;background:linear-gradient(180deg,#fff,#fbfcfc);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-sm)}
.queue-console-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}.queue-console-head h3{margin:0;font-size:18px}.queue-policy{display:flex;flex-direction:column;align-items:flex-end;padding:10px 13px;border-radius:12px;background:var(--accent-soft);color:var(--accent)}.queue-policy b{font-size:20px;line-height:1}.queue-policy span{margin-top:4px;font-size:10px;font-weight:800}
.queue-now{display:flex;align-items:center;gap:11px;padding:12px 14px;margin-bottom:13px;border:1px solid #e6ece9;border-radius:13px;background:#f9fbfa}.queue-now div{display:flex;flex-direction:column;gap:3px;min-width:0}.queue-now b{font-size:12px}.queue-now span:not(.queue-live-dot){color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.queue-live-dot{width:10px;height:10px;min-width:10px;border-radius:50%;background:#9ba7a1;box-shadow:0 0 0 4px rgba(100,120,110,.08)}.queue-live-dot.is-live{background:#21a876;box-shadow:0 0 0 4px rgba(33,168,118,.12);animation:queuePulse 1.5s infinite}.queue-live-dot.is-waiting{background:#d59a1b;box-shadow:0 0 0 4px rgba(213,154,27,.12)}.queue-live-dot.is-error{background:#c64c52;box-shadow:0 0 0 4px rgba(198,76,82,.10)}@keyframes queuePulse{50%{box-shadow:0 0 0 8px rgba(33,168,118,.03)}}
.queue-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.queue-metrics>div{padding:12px 14px;border:1px solid #e6ece9;border-radius:12px;background:#fff}.queue-metrics b{display:block;font-size:21px;letter-spacing:-.03em}.queue-metrics span{display:block;margin-top:3px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.queue-progress{height:6px;margin-top:8px;overflow:hidden;border-radius:999px;background:#e8eeeb}.queue-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.queue-table td{vertical-align:middle}.queue-empty{display:flex;align-items:center;justify-content:center;gap:12px;min-height:92px;border:1px dashed var(--line-strong);border-radius:13px;color:var(--muted)}.queue-empty svg{width:26px;height:26px;color:var(--accent)}.queue-empty div{display:flex;flex-direction:column;gap:3px}.queue-empty b{color:var(--ink);font-size:13px}.queue-empty span{font-size:11px}.queue-console-foot{display:flex;justify-content:flex-end;margin-top:12px}.queue-console-foot a{font-size:11px;font-weight:850;text-decoration:none}.queue-recent{margin-top:20px}.queue-recent h3{margin:0 0 10px}.send-policy-form{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;align-items:end;gap:16px}.send-policy-form label{margin:0}.send-policy-form button{margin-bottom:0}.policy-check{align-self:center}.is-disabled{opacity:.55}
@media(max-width:880px){.queue-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.send-policy-form{grid-template-columns:1fr}.queue-console-head{align-items:flex-start}.queue-policy{align-items:flex-start}}
@media(max-width:560px){.queue-metrics{grid-template-columns:1fr 1fr}.queue-console{padding:15px}.queue-console-head{flex-direction:column}.queue-policy{width:100%}.queue-now span:not(.queue-live-dot){white-space:normal}.queue-table th:nth-child(4),.queue-table td:nth-child(4),.queue-table th:nth-child(5),.queue-table td:nth-child(5){display:none}}
.queue-rules{display:flex;gap:8px 18px;flex-wrap:wrap;margin:-2px 0 14px;padding:9px 12px;border-radius:10px;background:#f5f8f7;color:var(--muted);font-size:10px}.queue-rules b{color:var(--ink-2)}

/* Newsletter audience, editor, preview and attachments */
.audience-sendbar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;margin:20px 0;background:linear-gradient(135deg,#f4fbf8,#eef7f3);border:1px solid #d7e7df;border-radius:18px}.audience-sendbar h3{margin:4px 0 6px}.audience-sendbar p{margin:0;color:#66756e}
.filter-drawer{margin:18px 0 24px;border:1px solid #dce7e1;border-radius:16px;background:#fff;overflow:hidden}.filter-drawer summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;cursor:pointer;list-style:none;background:#f8fbf9}.filter-drawer summary::-webkit-details-marker{display:none}.filter-drawer summary>span:first-child{display:flex;align-items:center;gap:10px}.filter-drawer summary svg{width:20px;height:20px}.filter-drawer-body{padding:20px;border-top:1px solid #e5ece8}.filter-help{padding:12px 14px;border-radius:10px;background:#f4f7f5;color:#53625b;line-height:1.45}
.section-head.compact{margin-top:24px;margin-bottom:12px}.section-head.compact h3{margin:2px 0}
.audience-filter-inline{margin:14px 0 18px;padding:18px;border:1px solid #dce7e1;border-radius:14px;background:#f8fbf9}.audience-filter-inline[hidden]{display:none!important}.admin-copy-check{align-self:end;margin-bottom:10px!important}

.rich-editor{position:relative;border:1px solid #d7e2dc;border-radius:14px;background:#fff;overflow:hidden}.rich-editorbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px;background:#f4f8f6;border-bottom:1px solid #dce5e0;position:sticky;top:0;z-index:3}.rich-editorbar button{min-width:38px;height:34px;padding:0 10px;border-radius:8px;background:#fff;color:#23332b;border:1px solid #d4dfd9;font-size:13px;font-weight:700}.rich-editorbar button:hover,.rich-editorbar button.active{background:#e8f5ef;border-color:#9bcbb7}.editor-sep{width:1px;height:24px;background:#d2ddd7;margin:0 2px}.editor-color{display:flex;align-items:center;margin:0!important}.editor-color input{width:36px;height:34px;padding:2px;border:1px solid #d4dfd9;border-radius:8px;background:#fff}
.rich-editor-surface{min-height:460px;padding:28px 30px!important;border:0!important;border-radius:0!important;outline:none;background:#fff;font-family:Arial,sans-serif;line-height:1.55}.rich-editor-surface:focus{box-shadow:inset 0 0 0 2px #1b8e68}.rich-editor-surface img{max-width:100%;height:auto}.rich-editor-surface table{max-width:100%}
.html-source-editor{display:block;width:100%;min-height:460px;padding:20px;border:0;outline:none;background:#111b17;color:#d7f7e9;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.55;resize:vertical}.html-source-editor[hidden]{display:none!important}
.rich-editor.is-fullscreen{position:fixed;inset:0;z-index:9999;border-radius:0;background:#fff;display:flex;flex-direction:column}.rich-editor.is-fullscreen .rich-editorbar{position:relative;flex:0 0 auto}.rich-editor.is-fullscreen .rich-editor-surface,.rich-editor.is-fullscreen .html-source-editor{flex:1;min-height:0;height:auto;overflow:auto}.editor-fullscreen-open{overflow:hidden}

.attachments-panel{display:grid;gap:14px;margin:22px 0;padding:20px;border:1px solid #dce7e1;border-radius:14px;background:#fbfcfb}.attachments-panel h3{margin:2px 0}.attachment-list{display:grid;gap:8px}.attachment-item{display:flex!important;align-items:center!important;justify-content:space-between;gap:16px;padding:11px 13px;border:1px solid #e0e7e3;border-radius:10px;background:#fff;margin:0!important}.attachment-item>span:first-child{display:flex;align-items:center;gap:9px;min-width:0}.attachment-item svg{width:18px;height:18px}.attachment-item b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-item small{color:#7a8881;font-weight:400}.test-send{display:flex;align-items:end;gap:12px;margin:20px 0}.test-send label{flex:1;max-width:420px}.sticky-actions{position:sticky;bottom:0;z-index:4;padding:12px 0;background:linear-gradient(to top,#fff 80%,rgba(255,255,255,0));border-top:1px solid #eef2ef}

.preview-modal{position:fixed;inset:0;z-index:10000;background:rgba(8,20,15,.72);display:grid;place-items:center;padding:24px}.preview-modal[hidden]{display:none!important}.preview-dialog{width:min(1180px,96vw);height:min(900px,94vh);display:flex;flex-direction:column;background:#fff;border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.36);overflow:hidden}.preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid #e2e9e5}.preview-head h2{margin:3px 0 2px}.preview-head p{margin:0;color:#69776f}.preview-controls{display:flex;gap:8px;flex-wrap:wrap}.preview-device{flex:1;display:flex;justify-content:center;align-items:flex-start;padding:22px;background:#edf1ef;overflow:auto}.preview-device iframe{width:100%;max-width:760px;min-height:720px;border:0;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.1);transition:width .2s ease}.preview-device.mobile iframe{width:390px}.preview-attachments{padding:12px 22px;border-top:1px solid #e2e9e5;background:#fafcfb;font-size:13px}.preview-open{overflow:hidden}

@media(max-width:900px){.audience-sendbar{align-items:flex-start;flex-direction:column}.test-send{align-items:stretch;flex-direction:column}.test-send label{max-width:none}.rich-editorbar{position:relative}.preview-modal{padding:8px}.preview-dialog{width:100%;height:98vh}.preview-head{flex-direction:column}.preview-device{padding:10px}.preview-device.mobile iframe{width:100%}}


/* Branding de newsletter e importador inteligente */
.newsletter-preview-branded{padding:0!important;overflow:hidden}
.import-source-grid{display:grid;grid-template-columns:minmax(0,1fr) 54px minmax(0,1.4fr);gap:16px;align-items:start}.import-or{display:grid;place-items:center;min-height:118px;color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase}
.import-analysis-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}.import-analysis-head h3{margin:2px 0}.import-map-form{margin-bottom:20px}.import-map-form select{margin:0;min-width:190px}
.import-metrics{margin:0 0 18px}.import-review-tools{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:12px}.import-review-tools>label{flex:1;max-width:440px;margin:0}.import-preview-table{max-height:520px;overflow:auto}.import-preview-table thead th{position:sticky;top:0;z-index:2}.import-preview-table td:first-child,.import-preview-table th:first-child{width:42px;text-align:center}.import-preview-table input[type=checkbox]{width:18px;height:18px;margin:0 auto}
.import-scope{display:flex;gap:22px;flex-wrap:wrap;margin:16px 0 12px;padding:14px;border-radius:12px;background:#f6f9f7;border:1px solid #e3eae6}.import-scope .check{margin:0}.legal-confirm{margin:14px 0!important;padding:14px;border:1px solid #d9e4df;border-radius:12px;background:#fbfcfc}
.status-new{background:#e8f6ef;color:#1b6e4c}.status-existing_profile,.status-subscribed{background:#eaf2ff;color:#365f9a}.status-protected,.status-invalid,.status-duplicate_file{background:#fff0f0;color:#9d3030}
@media(max-width:900px){.import-source-grid{grid-template-columns:1fr}.import-or{min-height:auto}.import-analysis-head,.import-review-tools{align-items:stretch;flex-direction:column}.import-review-tools>label{max-width:none}}
