.email-test-page{
  min-height:100vh;
}

.email-test-shell{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
  padding:44px 0 36px;
}

.email-test-hero{
  max-width:820px;
  margin-bottom:28px;
}

.email-test-brand{
  display:inline-flex;
  align-items:center;
  gap:14px;
  padding:10px 14px 10px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  margin-bottom:28px;
}

.email-test-brand img{
  width:48px;
  height:48px;
  border-radius:16px;
  object-fit:cover;
}

.email-test-brand strong,
.email-test-brand small{
  display:block;
}

.email-test-brand small{
  color:var(--muted);
  margin-top:2px;
}

.email-test-hero h1{
  max-width:820px;
  font-size:clamp(2.55rem, 7vw, 5.7rem);
  line-height:.9;
  letter-spacing:0;
  margin:0 0 18px;
}

.email-test-grid{
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(340px,.68fr);
  gap:18px;
  align-items:start;
}

.email-test-panel,
.email-preview-panel{
  border:1px solid rgba(255,255,255,.09);
  border-radius:30px;
  background:linear-gradient(160deg, rgba(252,144,3,.08), rgba(255,255,255,.018)), rgba(12,12,12,.86);
  box-shadow:var(--shadow-soft);
  padding:22px;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.panel-head span{
  color:var(--orange-2);
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.panel-head strong{
  color:#fff;
}

.panel-head strong.ready{
  color:var(--success);
}

.panel-head strong.warning{
  color:var(--danger);
}

.email-status-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}

.email-status-grid article{
  min-height:88px;
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
}

.email-status-grid span{
  display:block;
  color:var(--muted);
  font-size:.78rem;
  font-weight:850;
  margin-bottom:8px;
}

.email-status-grid strong{
  display:block;
  color:#fff;
  line-height:1.35;
  word-break:break-word;
}

.editor-shell{
  overflow:hidden;
  border:1px solid rgba(255,255,255,.09);
  border-radius:24px;
  background:rgba(255,255,255,.025);
  margin-bottom:14px;
}

.editor-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"]{
  min-height:36px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.045);
  color:#fff;
  padding:0 11px;
  font-weight:900;
}

.editor-toolbar button:hover,
.editor-toolbar select:hover{
  border-color:rgba(252,144,3,.35);
  background:rgba(252,144,3,.1);
}

.editor-toolbar input[type="color"]{
  width:44px;
  padding:4px;
}

.email-editor{
  min-height:300px;
  padding:20px;
  outline:none;
  color:#fff;
  line-height:1.7;
}

.email-editor:empty::before{
  content:"Escreva sua mensagem aqui...";
  color:var(--muted);
}

.email-editor h2,
.email-editor h3{
  color:#fff;
  letter-spacing:0;
}

.email-editor a{
  color:var(--orange-2);
  text-decoration:underline;
}

.email-editor img{
  max-width:100%;
  height:auto;
  border-radius:18px;
  margin:14px 0;
}

.attachment-list{
  display:grid;
  gap:9px;
  margin-bottom:14px;
}

.attachment-list article{
  display:grid;
  grid-template-columns:1fr auto auto;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.attachment-list span{
  color:#fff;
  font-weight:900;
  word-break:break-word;
}

.attachment-list small{
  color:var(--muted);
}

.attachment-list button{
  min-height:32px;
  border:1px solid rgba(255,109,109,.25);
  border-radius:999px;
  background:rgba(255,109,109,.1);
  color:#ffb0b0;
  font-weight:900;
  padding:0 12px;
}

.email-test-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.email-preview-panel{
  position:sticky;
  top:24px;
  padding:18px;
}

.mail-preview{
  overflow:hidden;
  border-radius:26px;
  border:1px solid rgba(252,144,3,.2);
  background:#11100f;
  padding:22px;
}

.mail-preview-top{
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:18px;
}

.mail-preview-top img{
  width:68px;
  height:68px;
  border-radius:20px;
  object-fit:cover;
}

.mail-preview-top span{
  color:var(--orange-2);
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.mail-preview h2{
  font-size:2rem;
  letter-spacing:0;
  margin-bottom:12px;
}

.live-preview-content{
  color:#f7f1e8;
  line-height:1.7;
}

.live-preview-content img{
  max-width:100%;
  height:auto;
  border-radius:18px;
}

.live-preview-content a{
  color:var(--orange-2);
}

.preview-button{
  display:block;
  margin-top:18px;
  padding:14px 18px;
  border-radius:999px;
  color:#130e07;
  background:linear-gradient(135deg,var(--orange-2),var(--orange));
  text-align:center;
  font-weight:950;
}

.email-log-panel{
  margin-top:18px;
}

.test-log-list{
  display:grid;
  gap:10px;
}

.test-log-list article{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.test-log-list article.sent{
  border-color:rgba(105,215,138,.28);
}

.test-log-list article.failed{
  border-color:rgba(255,109,109,.3);
}

.test-log-list strong{
  color:#fff;
}

.test-log-list span,
.test-log-list p{
  color:var(--muted);
  margin:0;
  line-height:1.45;
}

@media (max-width:980px){
  .email-test-grid{
    grid-template-columns:1fr;
  }

  .email-status-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .email-preview-panel{
    position:static;
  }
}

@media (max-width:560px){
  .email-test-shell{
    width:min(100% - 20px, 1200px);
    padding-top:24px;
  }

  .email-test-panel,
  .email-preview-panel{
    padding:16px;
    border-radius:24px;
  }

  .email-status-grid,
  .attachment-list article{
    grid-template-columns:1fr;
  }

  .editor-toolbar button,
  .editor-toolbar select{
    flex:1 1 auto;
  }
}

/* V2 - central de e-mail mais compacta e profissional */
.email-test-page{
  background:
    radial-gradient(circle at 10% 0%, rgba(252,144,3,.12), transparent 28%),
    linear-gradient(180deg,#050505,#090909);
}

.ambient-orbs{
  display:none !important;
}

.email-test-shell{
  width:min(1320px, calc(100% - 36px));
  padding:26px 0 30px;
}

.email-test-hero{
  max-width:none;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:18px 24px;
  margin-bottom:18px;
  padding:16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:24px;
  background:rgba(255,255,255,.025);
}

.email-test-brand{
  margin:0;
  padding:8px 12px 8px 8px;
}

.email-test-brand img{
  width:42px;
  height:42px;
  border-radius:14px;
}

.email-test-hero .eyebrow,
.email-test-hero h1,
.email-test-hero .muted{
  grid-column:2;
}

.email-test-hero .eyebrow{
  margin:0 0 2px;
}

.email-test-hero h1{
  font-size:clamp(1.75rem, 3.2vw, 3rem);
  line-height:1;
  margin:0;
}

.email-test-hero .muted{
  max-width:760px;
  margin:0;
  font-size:.96rem;
}

.email-test-grid{
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);
}

.email-test-panel,
.email-preview-panel{
  border-radius:22px;
  padding:18px;
}

.email-status-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.email-status-grid article{
  min-height:72px;
  padding:12px;
  border-radius:16px;
}

.email-status-grid span{
  font-size:.72rem;
}

.email-status-grid strong{
  font-size:.92rem;
}

.field-hint{
  margin:-6px 0 14px;
  color:var(--muted);
  font-size:.86rem;
  line-height:1.45;
}

.editor-shell{
  border-radius:18px;
}

.editor-toolbar{
  gap:6px;
  padding:10px;
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type="color"]{
  min-height:32px;
  border-radius:10px;
  font-size:.82rem;
  padding:0 9px;
}

.email-editor{
  min-height:245px;
  padding:16px;
  font-size:.95rem;
  line-height:1.58;
}

.email-editor h2{
  font-size:1.55rem;
}

.email-editor h3{
  font-size:1.25rem;
}

.mail-preview{
  border-radius:22px;
  padding:18px;
}

.mail-preview-top img{
  width:54px;
  height:54px;
  border-radius:16px;
}

.mail-preview h2{
  font-size:1.45rem;
}

.live-preview-content{
  font-size:.94rem;
  line-height:1.58;
}

.email-test-actions .btn{
  min-height:40px;
  padding:0 15px;
}

@media (max-width:980px){
  .email-test-hero{
    grid-template-columns:1fr;
  }

  .email-test-hero .eyebrow,
  .email-test-hero h1,
  .email-test-hero .muted{
    grid-column:auto;
  }
}

@media (max-width:680px){
  .email-status-grid{
    grid-template-columns:1fr 1fr;
  }
}
