/* Correos — bandeja unificada de solo lectura */
.mail-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  position: relative;
}
.mail-row.is-unread {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.mail-row .strong {
  font-weight: 650;
  color: var(--ink);
}
.mail-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  align-self: center;
}
.mail-view {
  min-height: 420px;
}
.mail-frame {
  width: 100%;
  height: 70vh;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.mail-text {
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.6 var(--font-mono, ui-monospace, monospace);
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 16px;
  border-radius: 12px;
}

/* Adjuntos */
.mail-attach {
  margin-top: 16px;
  border-top: 1px solid var(--line, var(--border, #e5e7eb));
  padding-top: 14px;
}
.mail-attach-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.mail-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.att-card {
  border: 1px solid var(--line, var(--border, #e5e7eb));
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.att-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.att-img {
  display: flex;
  flex-direction: column;
}
.att-thumb {
  height: 120px;
  background: var(--surface-2, #f3f4f6)
    conic-gradient(from 45deg, #0000 90deg, rgba(0, 0, 0, 0.03) 0 180deg, #0000 0 270deg, rgba(0, 0, 0, 0.03) 0) 0 0 / 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.att-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.att-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--line, var(--border, #e5e7eb));
}
.att-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
}
.att-dl {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--ink-2);
}
.att-dl:hover {
  background: var(--surface-2);
  color: var(--accent);
}
.att-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  text-align: center;
  color: var(--ink-2);
}
.att-file .att-name {
  flex: none;
  width: 100%;
  color: var(--ink);
}

/* Visor de imagen */
.att-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(10, 12, 16, 0.86);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: att-fade 0.15s ease;
}
.att-lightbox-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: #fff;
  font-size: 13px;
}
.att-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
@keyframes att-fade {
  from {
    opacity: 0;
  }
}
