/* ═══════════════════════════════════════════════════════════════════
   Mi espacio (15/10/2026): una tarjeta por sección, todas iguales, con lo
   general; al pulsarla, su ventana con el detalle (rediseño del mismo día).
   ═══════════════════════════════════════════════════════════════════ */
/* `grid-auto-rows: 1fr`: todas las filas, y por tanto todas las tarjetas, igual de altas. */
.mi-rejilla { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 1fr; margin-top: 20px; }
.mi-tarjeta { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 16px 18px; min-height: 190px;
  background: var(--card); border-radius: var(--r); box-shadow: var(--sh); border-left: 3px solid var(--verde-claro);
  min-width: 0; color: inherit; text-decoration: none; cursor: pointer;
  transition: box-shadow .15s, transform .12s ease-out; }
a.mi-tarjeta:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); }
a.mi-tarjeta:active { transform: scale(.99); }
a.mi-tarjeta:focus-visible { outline: 2px solid var(--verde-claro); outline-offset: 2px; }
.mi-tarjeta:not([href]) { cursor: default; }

.mi-cab { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mi-cab .tarjeta-inicial { width: 36px; height: 36px; font-size: 16px; flex: none; }
.mi-cab .tarjeta-logo { height: 22px; }
.mi-cab-txt { display: grid; min-width: 0; }
.mi-titulo { font-size: 16px; font-weight: 700; color: var(--verde-oscuro); }
.mi-sistema { font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* Lo general: hasta tres filas «etiqueta … valor» */
.mi-resumen { display: grid; gap: 6px; align-content: start; }
.mi-res-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; font-size: 13px; }
.mi-res-fila > span { color: var(--muted); flex: none; }
.mi-res-fila > strong { font-size: 14px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-res-fila.t-bien > strong { color: #276749; }
.mi-res-fila.t-aviso > strong { color: #b7791f; }
.mi-res-fila.t-mal > strong { color: #c53030; }
.mi-estado-linea { font-size: 12.5px; color: var(--muted); padding-top: 8px; border-top: 1px solid #f0ede8; }
.mi-estado-linea.t-bien { color: #276749; font-weight: 600; }
.mi-estado-linea.t-aviso { color: #b7791f; font-weight: 600; }
.mi-estado-linea.t-mal { color: #c53030; font-weight: 600; }

/* La foto: grande en la ventana de Mis datos, pequeña en su tarjeta */
.mi-foto { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, #00453d, #009485); }
.mi-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mi-foto-inicial { color: #fff; font-size: 32px; font-weight: 800; }
.mi-foto-mini { width: 36px; height: 36px; }
.mi-foto-mini .mi-foto-inicial { font-size: 16px; }

/* ─── La ventana ──────────────────────────────────────────────────── */
.mi-ventana { width: min(760px, calc(100vw - 32px)); max-height: 88vh; margin: auto; padding: 0; border: 0; border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3); background: var(--card); color: inherit; overflow: hidden; }
.mi-ventana[open] { display: flex; flex-direction: column; }
.mi-ventana::backdrop { background: rgba(0,0,0,.45); }
.mi-v-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid #f0ede8; }
.mi-v-cab h2 { margin: 0; font-size: 18px; color: var(--verde-oscuro); }
.mi-v-cuerpo { display: grid; gap: 16px; padding: 16px 18px 22px; overflow-y: auto; }
.mi-ir { justify-self: start; }

/* Mis datos (en su ventana) */
.mi-persona { display: flex; align-items: center; gap: 14px; }
.mi-ident { min-width: 0; }
.mi-ident p { margin: 0; overflow-wrap: anywhere; }
.mi-nombre { font-size: 16px; font-weight: 700; }
.mi-ident .tenue { font-size: 13px; }
.mi-subir { cursor: pointer; position: relative; }
.mi-oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mi-subir:focus-within { outline: 2px solid var(--verde-claro); outline-offset: 2px; }
.mi-form { display: grid; gap: 4px; }
.mi-form label { font-size: 12px; font-weight: 600; color: #718096; }
.mi-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mi-fila input { flex: 1 1 160px; }
.mi-form .acciones { margin-top: 6px; }
.mi-tel { display: grid; grid-template-columns: minmax(0, 170px) 1fr; gap: 8px; }
.mi-msg { margin: 0; font-size: 13px; min-height: 1em; }
.mi-msg.bien { color: #276749; }
.mi-msg.mal { color: #c53030; }
.mi-aprobar { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid #f0ede8; }
.mi-aprobar h3 { font-size: 13px; font-weight: 700; color: #4a5568; margin: 0; }
.mi-aprobar .nota { margin: 0; }
.mi-estado { margin: 2px 0 0; font-size: 12.5px; padding: 6px 10px; border-radius: 6px; background: #fffaf0;
  border-left: 3px solid var(--naranja); overflow-wrap: anywhere; }
.mi-estado button { background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; font-weight: 600;
  color: var(--verde-medio); cursor: pointer; text-decoration: underline; }

/* El detalle de un sistema */
.mi-cifras { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; }
.mi-cifra { padding: 10px 12px; border-radius: 8px; background: #f7faf9; border-left: 3px solid var(--border); min-width: 0; }
.mi-cifra dt { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.mi-cifra dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.mi-cifra .mi-detalle { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.mi-cifra.t-bien { border-left-color: #38a169; }
.mi-cifra.t-aviso { border-left-color: var(--naranja); }
.mi-cifra.t-mal { border-left-color: #e53e3e; background: #fff5f5; }
.mi-lista h3 { font-size: 13px; font-weight: 700; color: #4a5568; margin: 0 0 6px; }
.mi-lista ul { list-style: none; margin: 0; padding: 0; }
.mi-lista li { padding: 6px 0; border-bottom: 1px solid #f0ede8; font-size: 13px; overflow-wrap: anywhere; }
.mi-lista li:last-child { border-bottom: 0; }
.mi-tabla-env { overflow-x: auto; }
.mi-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.mi-tabla th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; }
.mi-tabla td { padding: 7px 8px; border-bottom: 1px solid #f0ede8; vertical-align: top; overflow-wrap: anywhere; }
.mi-celda.t-bien { color: #276749; font-weight: 600; }
.mi-celda.t-aviso { color: #b7791f; font-weight: 600; }
.mi-celda.t-mal { color: #c53030; font-weight: 600; }
.mi-enlace { font-weight: 600; color: var(--verde-medio); }
.mi-texto { margin: 0; font-size: 13.5px; color: var(--muted); }
.mi-texto.t-aviso { color: #b7791f; }
.mi-texto.t-mal { color: #c53030; }

/* ─── En el móvil ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* Los campos, a 16 px: con menos, el iPhone amplía la pantalla al tocarlos */
  .mi-ventana input, .mi-ventana select { font-size: 16px; }
  .mi-rejilla { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .mi-tarjeta { min-height: 150px; }
  /* La ventana, a pantalla completa */
  .mi-ventana { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .mi-v-cab { padding: 10px 16px; }
  .mi-v-cuerpo { padding: 14px 16px 24px; }
  /* Cada fila de una tabla, una ficha: la etiqueta sale de la cabecera */
  .mi-tabla thead { display: none; }
  .mi-tabla tr { display: block; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
  .mi-tabla td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  .mi-tabla td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
}
@media (prefers-reduced-motion: reduce) { .mi-tarjeta { transition: none; } a.mi-tarjeta:active { transform: none; } }

/* ─── Tus correos: varios correos para entrar (sql/48) ─── */
.mi-correos { display: grid; gap: 8px; }
.mi-correos-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mi-correo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px;
  background: #f7faf9; border-left: 3px solid var(--border); font-size: 13.5px; }
.mi-correo-pend { background: #fffaf0; border-left-color: var(--naranja); }
.mi-correo-dir { font-weight: 600; color: var(--txt); overflow-wrap: anywhere; }
.mi-correo-insignia { margin-left: auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--verde-medio); border-radius: 999px; padding: 2px 8px; }
.mi-correo-nota { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.mi-correo-b { margin-left: auto; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: none; border: 0; padding: 2px 4px; color: var(--verde-medio); text-decoration: underline; }
.mi-correo-b ~ .mi-correo-b { margin-left: 0; }
.mi-correo-b-mal { color: #c53030; }
