/* ═══════════════════════════════════════════════════════════════════
   APP CORREO — Estilos oscuros scoped bajo #win-correo
   Fase 2: Sidebar con perfil + carpetas coloridas + glow
   ═══════════════════════════════════════════════════════════════════ */

#win-correo .correo-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0a0e14;
  color: #e6edf3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

/* ─── LOGIN ──────────────────────────────────────────────────── */
#win-correo .correo-login {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(88,101,242,.08), transparent 70%),
              linear-gradient(180deg, #0a0e14, #131820);
}

#win-correo .correo-login-card {
  background: rgba(18,22,30,.94);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 36px 32px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

#win-correo .correo-login-icon {
  font-size: 42px;
  color: #58a6ff;
  margin-bottom: 12px;
}

#win-correo .correo-login-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

#win-correo .correo-login-sub {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin: 0 0 24px;
}

#win-correo .correo-field {
  text-align: left;
  margin-bottom: 14px;
}

#win-correo .correo-field label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-bottom: 5px;
  margin-left: 2px;
}

#win-correo .correo-field input {
  width: 100%;
  height: 40px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

#win-correo .correo-field input:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88,166,255,.15);
}

#win-correo .correo-manual {
  text-align: left;
  margin-bottom: 14px;
}

#win-correo .correo-manual summary {
  font-size: 12px;
  color: #58a6ff;
  cursor: pointer;
  user-select: none;
  margin-bottom: 10px;
}

#win-correo .correo-manual-fields {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#win-correo .correo-manual-fields .correo-field { flex: 1; }
#win-correo .correo-manual-fields .correo-field:last-child { max-width: 90px; }

#win-correo .correo-save-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
  cursor: pointer;
  text-align: left;
}

#win-correo .correo-save-label input[type="checkbox"] { accent-color: #58a6ff; }

#win-correo .correo-hint {
  background: rgba(88,166,255,.08);
  border: 1px solid rgba(88,166,255,.15);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  text-align: left;
  margin-bottom: 18px;
  line-height: 1.5;
}

#win-correo .correo-hint a { color: #58a6ff; text-decoration: none; }
#win-correo .correo-hint a:hover { text-decoration: underline; }

#win-correo .correo-btn-primary {
  width: 100%;
  height: 42px;
  background: linear-gradient(135deg, #58a6ff 0%, #388bfd 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}

#win-correo .correo-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88,166,255,.3);
}

#win-correo .correo-btn-primary:active { transform: scale(.98); }

#win-correo .correo-btn-back {
  width: 100%;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: background .15s, color .15s;
}
#win-correo .correo-btn-back:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
}

#win-correo .correo-btn-microsoft {
  width: 100%;
  height: 42px;
  background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
#win-correo .correo-btn-microsoft:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,120,212,.35);
}
#win-correo .correo-btn-microsoft:active { transform: scale(.98); }

#win-correo .correo-ms-hint {
  border-color: rgba(0,120,212,.2) !important;
  background: rgba(0,120,212,.06) !important;
}

#win-correo .correo-btn-google {
  width: 100%;
  height: 42px;
  background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
#win-correo .correo-btn-google:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(234,67,53,.35);
}
#win-correo .correo-btn-google:active { transform: scale(.98); }

#win-correo .correo-google-hint {
  border-color: rgba(234,67,53,.2) !important;
  background: rgba(234,67,53,.06) !important;
}

#win-correo .correo-error {
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #f85149;
  margin-top: 12px;
  text-align: left;
}

#win-correo .correo-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

#win-correo .correo-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: correo-spin .8s linear infinite;
}

@keyframes correo-spin { to { transform: rotate(360deg); } }

/* ─── LAYOUT 3 COLUMNAS ─────────────────────────────────────── */
#win-correo .correo-app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#win-correo .correo-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ═══ COLUMN 1: SIDEBAR ═══════════════════════════════════════ */
#win-correo .correo-sidebar {
  width: 230px;
  min-width: 200px;
  background: linear-gradient(180deg, #0f1318 0%, #0a0e14 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Profile card ───────────────────────────────────────────── */
#win-correo .correo-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

#win-correo .correo-profile-card:hover {
  background: rgba(255,255,255,.04);
}

#win-correo .correo-avatar-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #0d1f3c);
  border: 2px solid rgba(88,166,255,.3);
  box-shadow: 0 0 12px rgba(88,166,255,.15);
}

#win-correo .correo-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#win-correo .correo-avatar-img.loaded { display: block; }

#win-correo .correo-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(88,166,255,.7);
}

#win-correo .correo-avatar-img.loaded + .correo-avatar-fallback { display: none; }

#win-correo .correo-avatar-edit {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transition: opacity .2s;
  cursor: pointer;
}

#win-correo .correo-avatar-wrap:hover .correo-avatar-edit { opacity: 1; }

#win-correo .correo-profile-info {
  flex: 1;
  min-width: 0;
}

#win-correo .correo-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

#win-correo .correo-profile-name[contenteditable="true"] {
  outline: none;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 1px 4px;
  margin: -1px -4px;
}

#win-correo .correo-profile-email {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#win-correo .correo-profile-caret {
  font-size: 10px;
  color: rgba(255,255,255,.3);
  transition: transform .2s;
  flex-shrink: 0;
}

#win-correo .correo-profile-caret.open { transform: rotate(180deg); }

/* ── Account dropdown ───────────────────────────────────────── */
#win-correo .correo-account-dropdown {
  background: rgba(18,22,30,.96);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 6px 0;
  max-height: 280px;
  overflow-y: auto;
}

/* Account card in dropdown (avatar + name + email) */
#win-correo .correo-dd-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
}

#win-correo .correo-dd-account:hover { background: rgba(255,255,255,.05); }

#win-correo .correo-dd-account.active {
  background: rgba(88,166,255,.06);
}

#win-correo .correo-dd-avatar-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #0d1f3c);
  border: 1.5px solid rgba(255,255,255,.1);
}

#win-correo .correo-dd-account.active .correo-dd-avatar-wrap {
  border-color: rgba(88,166,255,.35);
}

#win-correo .correo-dd-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#win-correo .correo-dd-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(88,166,255,.5);
}

#win-correo .correo-dd-info {
  flex: 1;
  min-width: 0;
}

#win-correo .correo-dd-name {
  font-size: 12px;
  font-weight: 600;
  color: #e6edf3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

#win-correo .correo-dd-email {
  font-size: 10px;
  color: rgba(255,255,255,.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#win-correo .correo-dd-check {
  font-size: 11px;
  color: #58a6ff;
  flex-shrink: 0;
}

/* Simple action items (add, manage, back) */
#win-correo .correo-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: background .12s, color .12s;
}

#win-correo .correo-dd-item:hover {
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.8);
}

#win-correo .correo-dd-item i {
  width: 16px;
  text-align: center;
  font-size: 11px;
}

#win-correo .correo-dd-sep {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 4px 0;
}

#win-correo .correo-dd-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.25);
  font-weight: 700;
  padding: 8px 14px 4px;
}

/* Manage accounts view */
#win-correo .correo-dd-manage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #c9d1d9;
}

#win-correo .correo-dd-remove-btn {
  background: none;
  border: none;
  color: rgba(248,81,73,.4);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
  margin-left: auto;
}

#win-correo .correo-dd-remove-btn:hover {
  color: #f85149;
  background: rgba(248,81,73,.12);
}

/* ── Sidebar folders label ──────────────────────────────────── */
#win-correo .correo-sidebar-label {
  padding: 14px 14px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.25);
  font-weight: 700;
}

/* ── Folders with colors + glow ─────────────────────────────── */
#win-correo .correo-folders {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
}

#win-correo .correo-folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  color: rgba(255,255,255,.75);
  transition: all .15s;
  margin-bottom: 2px;
}

#win-correo .correo-folder-item:hover {
  background: rgba(255,255,255,.05);
}

#win-correo .correo-folder-item.active {
  font-weight: 600;
}

#win-correo .correo-folder-item .correo-fi {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: box-shadow .2s;
}

#win-correo .correo-folder-item.active .correo-fi {
  box-shadow: 0 0 14px var(--fi-glow);
}

/* Folder colors */
#win-correo .correo-fi-inbox    { background: rgba(59,130,246,.15); color: #60a5fa; --fi-glow: rgba(59,130,246,.4); }
#win-correo .correo-fi-sent     { background: rgba(34,197,94,.15);  color: #4ade80; --fi-glow: rgba(34,197,94,.4); }
#win-correo .correo-fi-drafts   { background: rgba(245,158,11,.15); color: #fbbf24; --fi-glow: rgba(245,158,11,.4); }
#win-correo .correo-fi-trash    { background: rgba(239,68,68,.15);  color: #f87171; --fi-glow: rgba(239,68,68,.4); }
#win-correo .correo-fi-junk     { background: rgba(168,85,247,.15); color: #c084fc; --fi-glow: rgba(168,85,247,.4); }
#win-correo .correo-fi-spam     { background: rgba(249,115,22,.15); color: #fb923c; --fi-glow: rgba(249,115,22,.4); }
#win-correo .correo-fi-archive  { background: rgba(20,184,166,.15); color: #2dd4bf; --fi-glow: rgba(20,184,166,.4); }
#win-correo .correo-fi-starred  { background: rgba(234,179,8,.15);  color: #facc15; --fi-glow: rgba(234,179,8,.4); }
#win-correo .correo-fi-all      { background: rgba(139,92,246,.15); color: #a78bfa; --fi-glow: rgba(139,92,246,.4); }
#win-correo .correo-fi-default  { background: rgba(148,163,184,.12); color: #94a3b8; --fi-glow: rgba(148,163,184,.3); }
#win-correo .correo-fi-notes    { background: rgba(250,204,21,.15); color: #fbbf24; --fi-glow: rgba(250,204,21,.4); }
#win-correo .correo-fi-outbox   { background: rgba(99,102,241,.15); color: #818cf8; --fi-glow: rgba(99,102,241,.4); }
#win-correo .correo-fi-sync     { background: rgba(245,158,11,.15); color: #f59e0b; --fi-glow: rgba(245,158,11,.4); }
#win-correo .correo-fi-conflict { background: rgba(236,72,153,.15); color: #ec4899; --fi-glow: rgba(236,72,153,.4); }
#win-correo .correo-fi-error    { background: rgba(239,68,68,.12);  color: #f87171; --fi-glow: rgba(239,68,68,.3); }
#win-correo .correo-fi-important{ background: rgba(244,63,94,.15);  color: #fb7185; --fi-glow: rgba(244,63,94,.4); }
#win-correo .correo-fi-social   { background: rgba(59,130,246,.15); color: #60a5fa; --fi-glow: rgba(59,130,246,.4); }
#win-correo .correo-fi-promo    { background: rgba(16,185,129,.15); color: #34d399; --fi-glow: rgba(16,185,129,.4); }

#win-correo .correo-folder-item.active .correo-fi-inbox  { background: rgba(59,130,246,.25); }
#win-correo .correo-folder-item.active .correo-fi-sent   { background: rgba(34,197,94,.25); }
#win-correo .correo-folder-item.active .correo-fi-drafts { background: rgba(245,158,11,.25); }
#win-correo .correo-folder-item.active .correo-fi-trash  { background: rgba(239,68,68,.25); }
#win-correo .correo-folder-item.active .correo-fi-junk   { background: rgba(168,85,247,.25); }
#win-correo .correo-folder-item.active .correo-fi-spam   { background: rgba(249,115,22,.25); }
#win-correo .correo-folder-item.active .correo-fi-archive{ background: rgba(20,184,166,.25); }
#win-correo .correo-folder-item.active .correo-fi-starred{ background: rgba(234,179,8,.25); }
#win-correo .correo-folder-item.active .correo-fi-all    { background: rgba(139,92,246,.25); }
#win-correo .correo-folder-item.active .correo-fi-default{ background: rgba(148,163,184,.2); }

/* ── Sidebar bottom actions ─────────────────────────────────── */
#win-correo .correo-sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  flex-shrink: 0;
}

#win-correo .correo-sidebar-action {
  background: none;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.25);
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
}

#win-correo .correo-sidebar-action:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.55);
}

#win-correo .correo-btn-danger:hover {
  color: rgba(248,81,73,.7);
  background: rgba(248,81,73,.08);
}

/* ═══ COLUMN 2: MESSAGE LIST ═════════════════════════════════ */
#win-correo .correo-list {
  width: 340px;
  min-width: 280px;
  background: #0c1018;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Draggable dividers ──────────────────────────────────────── */
#win-correo .correo-divider {
  width: 5px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
#win-correo .correo-divider::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 2px;
  width: 1px;
  background: rgba(255,255,255,.06);
  transition: background .15s;
}
#win-correo .correo-divider:hover::after,
#win-correo .correo-divider.dragging::after {
  background: rgba(88,166,255,.4);
}

/* ─── CONFIRM MODAL ─────────────────────────────────────────── */
#win-correo .correo-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: correoFadeIn .15s ease;
}
@keyframes correoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes correoSlideUp { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

#win-correo .correo-modal {
  background: linear-gradient(170deg, rgba(24,28,38,.97), rgba(16,19,28,.98));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 28px 32px 24px;
  width: 360px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  animation: correoSlideUp .2s ease;
}
#win-correo .correo-modal-icon {
  font-size: 32px;
  color: #f85149;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(248,81,73,.3));
}
#win-correo .correo-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 8px;
}
#win-correo .correo-modal-msg {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  line-height: 1.5;
  margin-bottom: 22px;
  word-break: break-word;
}
#win-correo .correo-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
#win-correo .correo-modal-btn {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s;
}
#win-correo .correo-modal-btn:active { transform: scale(.97); }
#win-correo .correo-modal-btn-cancel {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.1);
}
#win-correo .correo-modal-btn-cancel:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
#win-correo .correo-modal-btn-danger {
  background: linear-gradient(135deg, #f85149, #da3633);
  color: #fff;
}
#win-correo .correo-modal-btn-danger:hover {
  box-shadow: 0 4px 16px rgba(248,81,73,.35);
  transform: translateY(-1px);
}

/* ── List top area (header + search + filters) ─────────────── */
#win-correo .correo-list-top {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

#win-correo .correo-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 4px;
  font-size: 14px;
  font-weight: 600;
}

#win-correo .correo-msg-count {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  font-weight: 400;
}

/* ── Search bar ──────────────────────────────────────────────── */
#win-correo .correo-search-bar {
  position: relative;
  padding: 0 10px 6px;
}
#win-correo .correo-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(calc(-50% - 3px));
  font-size: 11px;
  color: rgba(255,255,255,.25);
  pointer-events: none;
}
#win-correo .correo-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 7px 12px 7px 30px;
  font-size: 12px;
  color: #e6edf3;
  outline: none;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
#win-correo .correo-search-input:focus {
  border-color: rgba(88,166,255,.35);
  background: rgba(255,255,255,.06);
}
#win-correo .correo-search-input::placeholder { color: rgba(255,255,255,.2); }

/* ── Filter bar ──────────────────────────────────────────────── */
#win-correo .correo-filters {
  display: flex;
  align-items: center;
  padding: 0 10px 8px;
  gap: 2px;
}
#win-correo .correo-filter-spacer { flex: 1; }
#win-correo .correo-filter-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
#win-correo .correo-filter-btn:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.04); }
#win-correo .correo-filter-btn.active {
  color: #58a6ff;
  background: rgba(88,166,255,.1);
  font-weight: 600;
}
#win-correo .correo-sort-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: rgba(255,255,255,.35);
  cursor: pointer;
  transition: all .12s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
#win-correo .correo-sort-btn:hover { color: rgba(255,255,255,.6); background: rgba(255,255,255,.04); }
#win-correo .correo-sort-btn i { font-size: 10px; }

/* ── Messages list ───────────────────────────────────────────── */
#win-correo .correo-messages {
  flex: 1;
  overflow-y: auto;
}

/* Date group separator */
#win-correo .correo-date-group {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
#win-correo .correo-date-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.06);
}

/* Message item — redesigned */
#win-correo .correo-msg-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  cursor: pointer;
  transition: background .12s;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

#win-correo .correo-msg-item:hover { background: rgba(255,255,255,.025); }

#win-correo .correo-msg-item.active {
  background: rgba(88,166,255,.08);
  border-left: 3px solid #58a6ff;
  padding-left: 11px;
}

/* Unread: bold text + left blue indicator */
#win-correo .correo-msg-item.unread {
  border-left: 3px solid #58a6ff;
  padding-left: 11px;
}
#win-correo .correo-msg-item.unread.active {
  border-left-color: #79c0ff;
}
#win-correo .correo-msg-item.unread .correo-msg-subject {
  font-weight: 700;
  color: #fff;
}
#win-correo .correo-msg-item.unread .correo-msg-from {
  font-weight: 700;
  color: #fff;
}
#win-correo .correo-msg-item.unread .correo-msg-time {
  color: rgba(255,255,255,.45);
}
/* Read: dimmer, lighter */
#win-correo .correo-msg-item:not(.unread) .correo-msg-from {
  font-weight: 500;
  color: rgba(255,255,255,.5);
}
#win-correo .correo-msg-item:not(.unread) .correo-msg-subject {
  font-weight: 400;
  color: rgba(255,255,255,.35);
}

/* Avatar in message */
#win-correo .correo-msg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
#win-correo .correo-msg-avatar-fallback {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

/* Message text body */
#win-correo .correo-msg-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
#win-correo .correo-msg-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 1px;
}
#win-correo .correo-msg-from {
  font-size: 13px;
  font-weight: 600;
  color: #c9d1d9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
#win-correo .correo-msg-time {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
  white-space: nowrap;
}
#win-correo .correo-msg-subject {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#win-correo .correo-msg-date {
  font-size: 11px;
  color: rgba(255,255,255,.25);
}

/* Account badge in unified mode */
#win-correo .correo-msg-account {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(255,255,255,.35);
  margin-top: 1px;
}
#win-correo .correo-msg-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* Legacy compat for non-unified */
#win-correo .correo-msg-from-row {
  display: flex;
  align-items: center;
  overflow: hidden;
}
#win-correo .correo-msg-from-row .correo-msg-from {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#win-correo .correo-msg-date-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.3);
}

/* Pagination */
#win-correo .correo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}

#win-correo .correo-pagination button {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  color: #c9d1d9;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s;
}

#win-correo .correo-pagination button:hover:not(:disabled) { background: rgba(255,255,255,.1); }
#win-correo .correo-pagination button:disabled { opacity: .3; cursor: default; }
#win-correo .correo-pagination span { font-size: 11px; color: rgba(255,255,255,.35); }

/* ═══ COLUMN 3: PREVIEW ═════════════════════════════════════ */
#win-correo .correo-preview {
  flex: 1;
  background: #0a0e14;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#win-correo .correo-preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,.15);
}

#win-correo .correo-preview-empty i { font-size: 48px; }
#win-correo .correo-preview-empty p { font-size: 14px; margin: 0; }
#win-correo .correo-empty-sub {
  font-size: 11px;
  color: rgba(255,255,255,.18);
  margin-top: 12px;
}
#win-correo .correo-empty-new-btn {
  margin-top: 4px;
  background: none;
  color: #58a6ff;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: color .15s;
}
#win-correo .correo-empty-new-btn:hover {
  color: #79bbff;
  text-decoration: underline;
}

#win-correo .correo-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Action bar ──────────────────────────────────────────────── */
#win-correo .correo-prev-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
  background: rgba(255,255,255,.015);
}
#win-correo .correo-prev-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
  white-space: nowrap;
}
#win-correo .correo-prev-action:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.06);
}
#win-correo .correo-prev-action i { font-size: 12px; }
#win-correo .correo-prev-action-spacer { flex: 1; }

/* Botón Nuevo — azul */
#win-correo .correo-prev-new {
  background: #2563eb;
  color: #fff !important;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
}
#win-correo .correo-prev-new:hover { background: #1d4ed8; }

/* Separador vertical */
#win-correo .correo-prev-action-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,.08);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Botón peligro — Eliminar */
#win-correo .correo-prev-danger:hover {
  color: #f87171 !important;
  background: rgba(248,113,113,.1);
}

/* ── Preview header ──────────────────────────────────────────── */
#win-correo .correo-preview-header {
  padding: 14px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}

#win-correo .correo-preview-header h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

/* Sender row with avatar */
#win-correo .correo-prev-sender {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
#win-correo .correo-prev-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  overflow: hidden;
}
#win-correo .correo-prev-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
#win-correo .correo-prev-sender-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
#win-correo .correo-prev-sender-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
#win-correo .correo-prev-from-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #e6edf3;
}
#win-correo .correo-prev-from-email {
  font-size: 12px;
  color: rgba(255,255,255,.3);
}
#win-correo .correo-prev-to-row {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#win-correo .correo-prev-date {
  font-size: 11.5px;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 2px;
}

/* ── Preview body ────────────────────────────────────────────── */
#win-correo .correo-preview-body { flex: 1; overflow: hidden; position: relative; }

#win-correo .correo-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

#win-correo .correo-prev-attachments {
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,.05);
  flex-shrink: 0;
}

#win-correo .correo-prev-attachments .correo-att-title {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: 6px;
  font-weight: 600;
}

#win-correo .correo-att-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #c9d1d9;
  margin-right: 6px;
  margin-bottom: 4px;
}

/* ─── Scrollbar styling ──────────────────────────────────────── */
#win-correo .correo-folders::-webkit-scrollbar,
#win-correo .correo-messages::-webkit-scrollbar { width: 4px; }

#win-correo .correo-folders::-webkit-scrollbar-track,
#win-correo .correo-messages::-webkit-scrollbar-track { background: transparent; }

#win-correo .correo-folders::-webkit-scrollbar-thumb,
#win-correo .correo-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08);
  border-radius: 3px;
}

#win-correo .correo-folders::-webkit-scrollbar-thumb:hover,
#win-correo .correo-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.15); }

/* ─── Refresh button in header ───────────────────────────────── */
#win-correo .correo-list-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
#win-correo .correo-btn-refresh {
  background: transparent;
  border: none;
  border-radius: 6px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .15s;
  font-size: 12px;
  padding: 0;
}
#win-correo .correo-btn-refresh:hover {
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.06);
}
#win-correo .correo-btn-refresh:active i {
  transform: rotate(180deg);
}

/* ─── Loading progress overlay ──────────────────────────────── */
#win-correo .correo-load-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  gap: 12px;
}
#win-correo .correo-load-spinner {
  font-size: 28px;
  color: #58a6ff;
  animation: correo-spin-3d 2s ease-in-out infinite;
}
@keyframes correo-spin-3d {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}
#win-correo .correo-load-text {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  text-align: center;
}
#win-correo .correo-load-bar-bg {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
}
#win-correo .correo-load-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #a78bfa);
  border-radius: 3px;
  transition: width .3s ease;
  box-shadow: 0 0 8px rgba(88,166,255,.3);
}
#win-correo .correo-load-pct {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  font-variant-numeric: tabular-nums;
}

/* ─── Messages loading skeleton ──────────────────────────────── */
#win-correo .correo-msg-skeleton {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
}

#win-correo .correo-msg-skeleton .skel-line {
  height: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 4px;
  margin-bottom: 6px;
  animation: correo-pulse 1.4s ease-in-out infinite;
}

#win-correo .correo-msg-skeleton .skel-line:nth-child(1) { width: 40%; }
#win-correo .correo-msg-skeleton .skel-line:nth-child(2) { width: 75%; }
#win-correo .correo-msg-skeleton .skel-line:nth-child(3) { width: 25%; }

@keyframes correo-pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ─── Dropdown unified row ───────────────────────────────────── */
#win-correo .correo-dd-unified {
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ─── Star indicator in message list ──────────────────────── */
#win-correo .correo-msg-star {
  color: #facc15;
  font-size: 10px;
  flex-shrink: 0;
}
#win-correo .correo-msg-time-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* ─── Context menu ───────────────────────────────────────── */
.correo-ctx-menu {
  position: fixed;
  z-index: 99999;
  min-width: 200px;
  background: #1c2128;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 5px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  font-size: 13px;
  backdrop-filter: blur(20px);
  animation: correo-ctx-in .12s ease-out;
}
@keyframes correo-ctx-in {
  from { opacity: 0; transform: scale(.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.correo-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  color: #c9d1d9;
  transition: background .1s;
  user-select: none;
}
.correo-ctx-item:hover {
  background: rgba(88,166,255,.1);
}
.correo-ctx-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.45);
}
.correo-ctx-item:hover i { color: #58a6ff; }
.correo-ctx-item.danger { color: #f87171; }
.correo-ctx-item.danger i { color: #f8717188; }
.correo-ctx-item.danger:hover { background: rgba(248,113,113,.1); }
.correo-ctx-item.danger:hover i { color: #f87171; }
.correo-ctx-sep {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 4px 10px;
}

/* ─── COMPOSE PANEL ──────────────────────────────────────────── */
#win-correo .correo-compose {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0d1117;
}

#win-correo .correo-compose-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
#win-correo .correo-compose-toolbar-spacer { flex: 1; }

#win-correo .correo-compose-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: #c9d1d9;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, border-color .15s;
}
#win-correo .correo-compose-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.12);
}
#win-correo .correo-compose-btn.primary {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
}
#win-correo .correo-compose-btn.primary:hover {
  background: #1d4ed8;
}

#win-correo .correo-compose-fields {
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

#win-correo .correo-compose-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.04);
  padding: 0 16px;
}
#win-correo .correo-compose-row:last-child { border-bottom: none; }

#win-correo .correo-compose-row label {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  width: 55px;
  flex-shrink: 0;
  padding: 9px 0;
}

#win-correo .correo-compose-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e6edf3;
  font-size: 13px;
  padding: 9px 4px;
  outline: none;
  font-family: inherit;
}
#win-correo .correo-compose-input::placeholder { color: rgba(255,255,255,.2); }
#win-correo select.correo-compose-input {
  appearance: none;
  cursor: pointer;
}
#win-correo select.correo-compose-input option {
  background: #1c2128;
  color: #e6edf3;
}

#win-correo .correo-compose-body-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 80px;
}

#win-correo .correo-compose-body {
  min-height: 100px;
  padding: 14px 16px;
  font-size: 14px;
  color: #e6edf3;
  line-height: 1.6;
  outline: none;
  font-family: system-ui, sans-serif;
}
#win-correo .correo-compose-body:empty::before {
  content: 'Escribe tu mensaje...';
  color: rgba(255,255,255,.2);
  pointer-events: none;
}

#win-correo .correo-compose-quote {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 16px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
#win-correo .correo-compose-quote:empty { display: none; }

#win-correo .correo-compose-quote-header {
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border-left: 3px solid rgba(255,255,255,.1);
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255,255,255,.45);
}

#win-correo .correo-compose-quote-body {
  padding: 8px 12px;
  border-left: 3px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.4);
  font-size: 13px;
  line-height: 1.5;
}
#win-correo .correo-compose-quote-body img {
  max-width: 100%;
  height: auto;
}

#win-correo .correo-compose-status {
  padding: 8px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
#win-correo .correo-compose-status.sending { color: #58a6ff; }
#win-correo .correo-compose-status.success { color: #34d399; }
#win-correo .correo-compose-status.error { color: #f87171; }

/* ─── REFRESH BAR (inline, subtle) ───────────────────────────── */
#win-correo .correo-refresh-bar {
  height: 2px;
  background: rgba(255,255,255,.04);
  flex-shrink: 0;
  overflow: hidden;
}
#win-correo .correo-refresh-bar-fill {
  height: 100%;
  width: 30%;
  background: #58a6ff;
  border-radius: 2px;
  animation: correoRefreshSlide 1s ease-in-out infinite;
}
@keyframes correoRefreshSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ─── AUTOCOMPLETE DROPDOWN ──────────────────────────────────── */
#win-correo .correo-ac-dropdown {
  position: absolute;
  z-index: 999;
  background: #1c2128;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  padding: 4px 0;
}
#win-correo .correo-ac-item {
  padding: 7px 14px;
  font-size: 12.5px;
  color: #e6edf3;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .1s;
}
#win-correo .correo-ac-item:hover,
#win-correo .correo-ac-item.active {
  background: rgba(88,166,255,.15);
}
#win-correo .correo-ac-email {
  color: rgba(255,255,255,.35);
  font-size: 11.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   MILTHON MAIL — AI Panel (Column 4)
   ═══════════════════════════════════════════════════════════════════ */

#win-correo .correo-ai {
  width: 320px;
  min-width: 260px;
  background: linear-gradient(180deg, #0d1117 0%, #090d13 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,.04);
}

/* Header */
.correo-ai-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.correo-ai-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #e6edf3;
}
.correo-ai-title i {
  color: #a78bfa; font-size: 15px;
}
.correo-ai-toggle {
  background: none; border: none; color: rgba(255,255,255,.4);
  cursor: pointer; font-size: 14px; padding: 4px;
}
.correo-ai-toggle:hover { color: #e6edf3; }

/* Chat messages area */
.correo-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Chat bubbles */
.correo-ai-msg {
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-word;
}
.correo-ai-msg.user {
  align-self: flex-end;
  background: rgba(88,166,255,.15);
  color: #c8d9f0;
  border-bottom-right-radius: 4px;
}
.correo-ai-msg.assistant {
  align-self: flex-start;
  background: rgba(167,139,250,.1);
  color: #d4d4d8;
  border-bottom-left-radius: 4px;
}
.correo-ai-msg.assistant strong { color: #c4b5fd; }
.correo-ai-msg.action {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(167,139,250,.12));
  border: 1px solid rgba(167,139,250,.25);
  color: #c4b5fd;
  border-bottom-left-radius: 4px;
  font-size: 12px;
}
.correo-ai-msg.action i { color: #a78bfa; margin-right: 4px; font-size: 11px; }
.correo-ai-msg.action strong { color: #e0d4ff; }

/* Typing indicator */
.correo-ai-typing {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  color: rgba(255,255,255,.3);
  font-size: 11px;
  align-self: flex-start;
}
.correo-ai-typing-dots {
  display: flex; gap: 3px;
}
.correo-ai-typing-dots span {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #a78bfa;
  animation: correoAiDot 1.2s ease-in-out infinite;
}
.correo-ai-typing-dots span:nth-child(2) { animation-delay: .2s; }
.correo-ai-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes correoAiDot {
  0%, 60%, 100% { opacity: .2; transform: scale(.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Input area */
.correo-ai-input-wrap {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.correo-ai-input {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #e6edf3;
  font-size: 12.5px;
  padding: 8px 12px;
  resize: none;
  max-height: 100px;
  font-family: inherit;
  line-height: 1.4;
}
.correo-ai-input::placeholder { color: rgba(255,255,255,.25); }
.correo-ai-input:focus { outline: none; border-color: rgba(167,139,250,.4); }
.correo-ai-send {
  background: #a78bfa;
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 32px; height: 32px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .15s;
}
.correo-ai-send:hover { background: #8b5cf6; }

/* Panel oculto */
#win-correo .correo-ai.collapsed {
  width: 0; min-width: 0; padding: 0; border: none; overflow: hidden;
}

/* Botón para abrir el panel cuando está cerrado */
.correo-ai-open-btn {
  position: absolute;
  right: 8px; bottom: 8px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(167,139,250,.3);
  z-index: 10;
  transition: transform .2s, box-shadow .2s;
}
.correo-ai-open-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(167,139,250,.5);
}

/* Scrollbar for AI messages */
.correo-ai-messages::-webkit-scrollbar { width: 4px; }
.correo-ai-messages::-webkit-scrollbar-track { background: transparent; }
.correo-ai-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }
.correo-ai-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.15); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  #win-correo .correo-sidebar { width: 180px; min-width: 160px; }
  #win-correo .correo-list { width: 260px; min-width: 200px; }
  #win-correo .correo-ai { width: 0; min-width: 0; overflow: hidden; border: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   TEMA CLARO — overrides (solo html[data-theme="light"]). Aditivo, no
   toca el tema oscuro. Mantiene el acento azul/morado en ambos temas.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Raíz y fondos de columnas ── */
html[data-theme="light"] #win-correo .correo-root {
  background: #eef1f7;
  color: #1e293b;
}
html[data-theme="light"] #win-correo .correo-login {
  background: radial-gradient(ellipse at 50% 30%, rgba(88,101,242,.06), transparent 70%),
              linear-gradient(180deg, #f3f5fa, #e8ecf4);
}
html[data-theme="light"] #win-correo .correo-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
}
html[data-theme="light"] #win-correo .correo-list { background: #f7f9fc; }
html[data-theme="light"] #win-correo .correo-preview { background: #ffffff; }
html[data-theme="light"] #win-correo .correo-compose { background: #ffffff; }

/* ── Bordes / divisores blancos -> oscuros ── */
html[data-theme="light"] #win-correo .correo-profile-card,
html[data-theme="light"] #win-correo .correo-account-dropdown,
html[data-theme="light"] #win-correo .correo-dd-unified,
html[data-theme="light"] #win-correo .correo-list-top,
html[data-theme="light"] #win-correo .correo-pagination,
html[data-theme="light"] #win-correo .correo-prev-actions,
html[data-theme="light"] #win-correo .correo-preview-header,
html[data-theme="light"] #win-correo .correo-prev-attachments,
html[data-theme="light"] #win-correo .correo-compose-toolbar,
html[data-theme="light"] #win-correo .correo-compose-fields,
html[data-theme="light"] #win-correo .correo-compose-status,
html[data-theme="light"] #win-correo .correo-ai-header,
html[data-theme="light"] #win-correo .correo-ai-input-wrap,
html[data-theme="light"] #win-correo .correo-ai { border-color: rgba(0,0,0,.08) !important; }
html[data-theme="light"] #win-correo .correo-msg-item,
html[data-theme="light"] #win-correo .correo-compose-row,
html[data-theme="light"] #win-correo .correo-msg-skeleton { border-bottom-color: rgba(0,0,0,.06); }
html[data-theme="light"] #win-correo .correo-dd-sep,
html[data-theme="light"] #win-correo .correo-prev-action-sep { background: rgba(0,0,0,.08); }
html[data-theme="light"] #win-correo .correo-divider::after { background: rgba(0,0,0,.08); }
html[data-theme="light"] #win-correo .correo-date-group::after { background: rgba(0,0,0,.08); }

/* ── Textos fuertes (#fff / #e6edf3) -> oscuro ── */
html[data-theme="light"] #win-correo .correo-login-card h2,
html[data-theme="light"] #win-correo .correo-profile-name,
html[data-theme="light"] #win-correo .correo-dd-name,
html[data-theme="light"] #win-correo .correo-modal-title,
html[data-theme="light"] #win-correo .correo-msg-item.unread .correo-msg-subject,
html[data-theme="light"] #win-correo .correo-msg-item.unread .correo-msg-from,
html[data-theme="light"] #win-correo .correo-preview-header h3,
html[data-theme="light"] #win-correo .correo-prev-from-name,
html[data-theme="light"] #win-correo .correo-msg-from,
html[data-theme="light"] #win-correo .correo-list-header,
html[data-theme="light"] #win-correo .correo-dd-manage-item,
html[data-theme="light"] #win-correo .correo-att-item,
html[data-theme="light"] #win-correo .correo-compose-input,
html[data-theme="light"] #win-correo .correo-compose-body,
html[data-theme="light"] #win-correo .correo-search-input,
html[data-theme="light"] #win-correo .correo-ai-title,
html[data-theme="light"] #win-correo .correo-ai-input { color: #1e293b; }

/* ── Textos atenuados (rgba(255,255,255,.x)) -> grises oscuros ── */
html[data-theme="light"] #win-correo .correo-login-sub,
html[data-theme="light"] #win-correo .correo-field label,
html[data-theme="light"] #win-correo .correo-save-label,
html[data-theme="light"] #win-correo .correo-hint,
html[data-theme="light"] #win-correo .correo-profile-email,
html[data-theme="light"] #win-correo .correo-dd-email,
html[data-theme="light"] #win-correo .correo-dd-item,
html[data-theme="light"] #win-correo .correo-modal-msg,
html[data-theme="light"] #win-correo .correo-msg-subject,
html[data-theme="light"] #win-correo .correo-msg-item:not(.unread) .correo-msg-from,
html[data-theme="light"] #win-correo .correo-prev-from-email,
html[data-theme="light"] #win-correo .correo-prev-to-row,
html[data-theme="light"] #win-correo .correo-prev-date,
html[data-theme="light"] #win-correo .correo-prev-action,
html[data-theme="light"] #win-correo .correo-compose-row label,
html[data-theme="light"] #win-correo .correo-compose-quote,
html[data-theme="light"] #win-correo .correo-ai-msg.assistant { color: rgba(30,41,59,.6); }

/* ── Textos muy tenues ── */
html[data-theme="light"] #win-correo .correo-msg-count,
html[data-theme="light"] #win-correo .correo-msg-time,
html[data-theme="light"] #win-correo .correo-msg-date,
html[data-theme="light"] #win-correo .correo-profile-caret,
html[data-theme="light"] #win-correo .correo-dd-title,
html[data-theme="light"] #win-correo .correo-sidebar-label,
html[data-theme="light"] #win-correo .correo-date-group,
html[data-theme="light"] #win-correo .correo-msg-item:not(.unread) .correo-msg-subject,
html[data-theme="light"] #win-correo .correo-pagination span,
html[data-theme="light"] #win-correo .correo-load-pct { color: rgba(30,41,59,.42); }

/* Texto con color inline en el HTML (#correo-ai-clear) — necesita !important */
html[data-theme="light"] #win-correo #correo-ai-clear { color: rgba(30,41,59,.42) !important; }

/* ── Folder items / hover ── */
html[data-theme="light"] #win-correo .correo-folder-item { color: rgba(30,41,59,.75); }
html[data-theme="light"] #win-correo .correo-folder-item:hover,
html[data-theme="light"] #win-correo .correo-profile-card:hover,
html[data-theme="light"] #win-correo .correo-dd-account:hover,
html[data-theme="light"] #win-correo .correo-dd-item:hover,
html[data-theme="light"] #win-correo .correo-msg-item:hover,
html[data-theme="light"] #win-correo .correo-prev-action:hover,
html[data-theme="light"] #win-correo .correo-sidebar-action:hover,
html[data-theme="light"] #win-correo .correo-btn-refresh:hover { background: rgba(0,0,0,.04); }

/* ── Inputs / selects / textareas oscuros -> claros ── */
html[data-theme="light"] #win-correo .correo-field input,
html[data-theme="light"] #win-correo .correo-search-input,
html[data-theme="light"] #win-correo .correo-ai-input {
  background: #ffffff;
  border-color: rgba(0,0,0,.14);
  color: #1e293b;
}
html[data-theme="light"] #win-correo select.correo-compose-input option,
html[data-theme="light"] #win-correo .correo-ac-item { color: #1e293b; }
html[data-theme="light"] #win-correo select.correo-compose-input option { background: #ffffff; }
html[data-theme="light"] #win-correo .correo-search-input::placeholder,
html[data-theme="light"] #win-correo .correo-compose-input::placeholder,
html[data-theme="light"] #win-correo .correo-ai-input::placeholder { color: rgba(30,41,59,.35); }
html[data-theme="light"] #win-correo .correo-compose-body:empty::before { color: rgba(30,41,59,.3); }

/* ── Modales / overlays / menús / toasts oscuros -> blancos ── */
html[data-theme="light"] #win-correo .correo-login-card,
html[data-theme="light"] #win-correo .correo-account-dropdown,
html[data-theme="light"] #win-correo .correo-ac-dropdown { background: #ffffff; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] #win-correo .correo-modal-overlay { background: rgba(15,23,42,.35); }
html[data-theme="light"] #win-correo .correo-modal {
  background: linear-gradient(170deg, #ffffff, #f6f8fc);
  border-color: rgba(0,0,0,.1);
  box-shadow: 0 20px 60px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.04);
}
html[data-theme="light"] .correo-ctx-menu {
  background: #ffffff;
  border-color: rgba(0,0,0,.1);
  box-shadow: 0 12px 40px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.04);
}
html[data-theme="light"] .correo-ctx-item { color: #334155; }
html[data-theme="light"] .correo-ctx-item i { color: rgba(30,41,59,.45); }
html[data-theme="light"] .correo-ctx-sep { background: rgba(0,0,0,.08); }

/* ── Botones / chips / acciones oscuros ── */
html[data-theme="light"] #win-correo .correo-btn-back {
  border-color: rgba(0,0,0,.12);
  color: rgba(30,41,59,.6);
}
html[data-theme="light"] #win-correo .correo-btn-back:hover { background: rgba(0,0,0,.05); color: #1e293b; }
html[data-theme="light"] #win-correo .correo-sidebar-action { color: rgba(30,41,59,.4); }
html[data-theme="light"] #win-correo .correo-modal-btn-cancel {
  background: rgba(0,0,0,.05);
  color: rgba(30,41,59,.7);
  border-color: rgba(0,0,0,.1);
}
html[data-theme="light"] #win-correo .correo-modal-btn-cancel:hover { background: rgba(0,0,0,.09); color: #0f172a; }
html[data-theme="light"] #win-correo .correo-compose-btn {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.1);
  color: #334155;
}
html[data-theme="light"] #win-correo .correo-compose-btn:hover { background: rgba(0,0,0,.08); }
html[data-theme="light"] #win-correo .correo-att-item,
html[data-theme="light"] #win-correo .correo-pagination button {
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.1);
  color: #334155;
}
html[data-theme="light"] #win-correo .correo-pagination button:hover:not(:disabled) { background: rgba(0,0,0,.08); }

/* ── Burbujas de mensaje (lista) seleccionadas / no leídas en claro ── */
html[data-theme="light"] #win-correo .correo-msg-item.active,
html[data-theme="light"] #win-correo .correo-dd-account.active { background: rgba(37,99,235,.08); }

/* ── Quote / cita del compositor ── */
html[data-theme="light"] #win-correo .correo-compose-quote-header {
  background: rgba(0,0,0,.03);
  border-left-color: rgba(0,0,0,.12);
  color: rgba(30,41,59,.55);
}
html[data-theme="light"] #win-correo .correo-compose-quote-body {
  border-left-color: rgba(0,0,0,.08);
  color: rgba(30,41,59,.5);
}

/* ── Panel IA Milthon en claro ── */
html[data-theme="light"] #win-correo .correo-ai {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
}
html[data-theme="light"] #win-correo .correo-ai-msg.assistant { background: rgba(124,58,237,.08); }
html[data-theme="light"] #win-correo .correo-ai-msg.user { background: rgba(37,99,235,.1); color: #1e3a8a; }
html[data-theme="light"] #win-correo .correo-ai-input { background: #ffffff; }
html[data-theme="light"] #win-correo .correo-ai-toggle { color: rgba(30,41,59,.45); }
html[data-theme="light"] #win-correo .correo-ai-toggle:hover { color: #1e293b; }

/* ── Skeleton / barras de carga ── */
html[data-theme="light"] #win-correo .correo-msg-skeleton .skel-line,
html[data-theme="light"] #win-correo .correo-load-bar-bg,
html[data-theme="light"] #win-correo .correo-refresh-bar { background: rgba(0,0,0,.06); }
html[data-theme="light"] #win-correo .correo-load-text { color: rgba(30,41,59,.5); }
