/* ===========================================================================
   NUBE — estilos
   Mismo lenguaje que el asistente y el correo: blanco, azul del tema (--ac),
   esquinas de 2px (nunca redondeadas), botones SÓLIDOS con fondo. El rojo se
   reserva para lo que de verdad es un problema.
   =========================================================================== */

.nube { display: flex; height: 100%; min-height: 0; background: #fff; color: #17323d; overflow: hidden; }

/* ---- La nube DENTRO del correo (como el calendario) ----
   No es una ventana aparte: se mete en .mail y el carril de la izquierda
   alterna Correo · Calendario · Nube · Asistente sin sacarte de donde estás. */
.nb-wrap { display: none; flex: 1 1 auto; min-width: 0; min-height: 0; }
.mail.nubemode .nb-wrap { display: flex; }
/* 🚨 Sin esto la nube se queda del ancho de su contenido y sobra un vacío
   negro a la derecha: .nb-wrap es flex, y un hijo flex NO crece si nadie se
   lo dice. Medido: ventana 914 px, nube 690 px, 159 px en negro. */
.nb-wrap > .nube { flex: 1 1 auto; min-width: 0; width: 100%; }
/* Con la nube encendida se apaga lo del correo — menos el carril, el asistente
   y la barra de abajo del celular, que siguen siendo la forma de SALIR.
   🚨 La clase es `m-tabbar` con guion: escribirla mal deja a la persona
   encerrada en la nube sin ningún botón para volver. */
.mail.nubemode > *:not(.mvrail):not(.nb-wrap):not(.agente):not(.m-tabbar):not(.mdrawer-bg):not(.m-drawer-bg) { display: none !important; }
/* En el celular la barra de abajo manda: la pantalla de archivos le deja el sitio. */
@media (max-width: 760px) { .mail.nubemode .nb-wrap { padding-bottom: 57px; } }
.mail.nubemode .nb-wrap .nube { border-left: 0; }
/* Dentro del correo la barra de secciones se alinea con el ancho de Carpetas */
.mail.nubemode .nb-lado { flex-basis: 216px; }

/* ---- Barra lateral (igual que la del asistente) ---- */
.nb-lado { flex: 0 0 214px; border-right: 1px solid #e4ebef; background: #fafcfd;
  padding: 11px 9px 9px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.nb-subir { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  background: var(--ac); color: #fff; border: 0; border-radius: 2px; padding: 10px 12px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 6px; }
.nb-subir:hover { filter: brightness(1.08); }
/* Crear carpeta estaba escondido en un ícono de la barra de arriba: nadie lo
   encontraba. Ahora es un botón con nombre, debajo de Subir. */
.nb-nueva { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  background: #fff; color: #3d5560; border: 1px solid #cfdde5; border-radius: 2px; padding: 8px 12px;
  font: inherit; font-size: 12.5px; cursor: pointer; }
.nb-nueva:hover { border-color: var(--ac); color: var(--ac); }
.nb-nueva i { color: var(--ac); font-size: 15px; }
.nb-sh { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: #7c929c; padding: 10px 8px 4px; }
.nb-nav { display: flex; align-items: center; width: 100%; text-align: left; background: transparent;
  border: 0; border-radius: 2px; padding: 7px 9px; font: inherit; font-size: 13px; color: #3d5560;
  cursor: pointer; white-space: nowrap; }
.nb-nav:hover { background: #eaf1f5; }
.nb-nav.on { background: color-mix(in srgb, var(--ac) 13%, #fff); color: var(--ac); font-weight: 600; }
.nb-nav i { margin-right: 7px; color: var(--ac); font-size: 15px; flex: 0 0 auto; }
.nb-nav em { margin-left: auto; font-style: normal; font-size: 11.5px; color: #7c929c; font-weight: 600; }
.nb-nav em.corto { display: none; }                      /* el nombre corto solo sale en el teléfono */

/* Espacio usado: abajo del todo, siempre visible */
.nb-espacio { margin-top: auto; padding-top: 12px; border-top: 1px solid #e4ebef; }
.nb-esp-t { font-size: 11.5px; color: #5b7683; display: flex; justify-content: space-between; margin-bottom: 5px; }
.nb-esp-b { height: 5px; background: #e4ebef; border-radius: 2px; overflow: hidden; }
.nb-esp-b i { display: block; height: 100%; background: var(--ac); border-radius: 2px; transition: width .3s; }
.nb-esp-b.lleno i { background: #c0392b; }             /* rojo SOLO cuando de verdad se está quedando sin espacio */
.nb-esp-n { font-size: 11px; color: #93a7b1; margin-top: 5px; }
.nb-pie-l { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0;
  padding: 5px 0 0; font: inherit; font-size: 11.5px; color: #93a7b1; cursor: pointer; text-align: left; }
.nb-pie-l:hover { color: var(--ac); }
.nb-pie-l i { font-size: 14px; }
.nb-pie-l:last-child:hover { color: #c0392b; }

/* Tabla de atajos */
.nb-atajos { display: grid; grid-template-columns: 1fr; gap: 1px; }
.nb-atajo { display: flex; align-items: center; gap: 12px; padding: 7px 2px; border-bottom: 1px solid #f0f4f6; }
.nb-atajo:last-child { border-bottom: 0; }
.nb-atajo kbd { flex: 0 0 132px; font: inherit; font-size: 11.5px; font-weight: 600; color: #3d5560;
  background: #f2f6f8; border: 1px solid #dbe5ea; border-bottom-width: 2px; border-radius: 3px;
  padding: 3px 7px; text-align: center; }
.nb-atajo span { font-size: 12.5px; color: #5b7683; }

/* ---- Columna central ---- */
.nb-col { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }

.nb-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-bottom: 1px solid #e4ebef; flex: 0 0 auto; }
.nb-migas { display: flex; align-items: center; gap: 3px; font-size: 13.5px; min-width: 0; overflow: hidden; flex: 1 1 auto; }
.nb-miga { background: none; border: 0; padding: 4px 6px; border-radius: 2px; font: inherit; font-size: 13.5px;
  color: #4a6270; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.nb-miga:hover { background: #eef3f6; color: var(--ac); }
.nb-miga.fin { color: #0d2a35; font-weight: 600; cursor: default; }
.nb-miga.fin:hover { background: none; color: #0d2a35; }
.nb-sep { color: #b6c6ce; font-size: 12px; flex: 0 0 auto; }
/* Cambiar el alcance de la búsqueda sin volver a escribirla */
.nb-alcance { flex: 0 0 auto; padding: 4px 10px; font-size: 12px; margin-left: 10px; }
.nb-miga.fin b { color: var(--ac); }

/* Qué hay en esta carpeta, al lado de la ruta */
.nb-resumen { font-size: 11.5px; color: #93a7b1; margin-left: 12px; white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 860px) { .nb-resumen { display: none; } }

/* Lo que está cortado se ve a media luz hasta que se pegue */
.nb-fila.cortada, .nb-tar.cortada { opacity: .5; }

.nb-buscar { display: flex; align-items: center; gap: 6px; border: 1px solid #cfdde5; background: #fff;
  border-radius: 2px; padding: 5px 8px; flex: 0 0 250px; }
.nb-buscar i { color: #7c929c; font-size: 14px; }
.nb-buscar input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 12.5px;
  color: #17323d; background: transparent; }
.nb-buscar:focus-within { border-color: var(--ac); }
.nb-buscar button { border: 0; background: transparent; cursor: pointer; color: #7c929c; padding: 0; display: none; }
.nb-buscar.hay button { display: flex; }

.nb-ico { width: 30px; height: 30px; border: 0; border-radius: 2px; background: transparent; color: #4a6270;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto; }
.nb-ico:hover { background: #eef3f6; color: #0d2a35; }
.nb-ico.on { background: var(--ac); color: #fff; }
.nb-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfdde5; background: #fff;
  border-radius: 2px; padding: 6px 11px; font: inherit; font-size: 12.5px; color: #3d5560; cursor: pointer; }
.nb-btn:hover { border-color: var(--ac); color: var(--ac); }
.nb-btn.fuerte { background: var(--ac); border-color: var(--ac); color: #fff; font-weight: 600; }
.nb-btn.fuerte:hover { filter: brightness(1.08); color: #fff; }
.nb-btn.malo { border-color: #e2b5ae; color: #c0392b; }
.nb-btn.malo:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.nb-btn:disabled { opacity: .5; cursor: default; }

/* ---- Lista de archivos ---- */
.nb-cuerpo { flex: 1 1 auto; overflow: auto; min-height: 0; }
.nb-lista { display: block; }
/* 🚨 El NOMBRE es lo único que la gente lee. Antes las acciones reservaban
   124 px fijos aunque estuvieran invisibles, y con el tamaño y la fecha se
   comían casi la mitad de la fila: los nombres quedaban en "PRES…", "Resol…".
   Ahora las acciones FLOTAN encima de la fila (no ocupan columna) y el nombre
   se queda con todo lo que sobra. */
.nb-fila { position: relative; display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) 78px 118px;
  align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #f0f4f6; cursor: pointer; }
.nb-fila:hover { background: #f6fafc; }
.nb-fila.on { background: color-mix(in srgb, var(--ac) 10%, #fff); }

/* Acciones a la mano, encima de la fila. El degradado evita que se lean
   encima del texto cuando el nombre es largo. */
.nb-acc { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 1px; opacity: 0; padding-left: 26px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(246,250,252,0), #f6fafc 26px); }
.nb-fila:hover .nb-acc, .nb-fila.on .nb-acc { opacity: 1; }
.nb-fila.on .nb-acc { background: linear-gradient(90deg, rgba(255,255,255,0), color-mix(in srgb, var(--ac) 10%, #fff) 26px); }
.nb-fila.marcada .nb-acc { background: linear-gradient(90deg, rgba(255,255,255,0), color-mix(in srgb, var(--ac) 12%, #fff) 26px); }
.nb-acc button { width: 28px; height: 28px; border: 0; border-radius: 2px; background: transparent;
  color: #6b8592; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.nb-acc button:hover { background: var(--ac); color: #fff; }
@media (hover: none) { .nb-acc { opacity: 1; } }        /* en pantallas táctiles siempre visibles */

.nb-cab { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) 78px 118px; gap: 10px; padding: 6px 12px;
  border-bottom: 1px solid #e4ebef; font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: #93a7b1; position: sticky; top: 0; background: #fff; z-index: 2; }
.nb-cab span { cursor: pointer; user-select: none; }
.nb-cab span:hover { color: var(--ac); }
.nb-cab i { font-size: 12px; margin-left: 2px; }

.nb-ic { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #7c929c; overflow: hidden; border-radius: 2px; }
.nb-ic.carpeta { color: var(--ac); }
.nb-ic img { width: 30px; height: 30px; object-fit: cover; border-radius: 2px; display: block; }
.nb-nom { font-size: 13.5px; color: #17323d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-fila.on .nb-nom { font-weight: 600; }
.nb-nom .fav { color: #e0a020; font-size: 12px; margin-left: 5px; }
.nb-nom small { display: block; font-size: 11.5px; color: #93a7b1; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-tam, .nb-fec { font-size: 12.5px; color: #6b8592; font-variant-numeric: tabular-nums; }
.nb-mas { border: 0; background: transparent; color: #a8bcc6; cursor: pointer; font-size: 16px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 2px; }
.nb-fila:hover .nb-mas { color: #4a6270; }
.nb-mas:hover { background: #e4ebef; }

/* Barra de orden de la cuadrícula (la lista lo tiene en sus cabeceras) */
.nb-gbar { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-bottom: 1px solid #e4ebef;
  font-size: 12px; color: #93a7b1; position: sticky; top: 0; background: #fff; z-index: 2; }
.nb-gbar > span { margin-right: 2px; }
.nb-gbar button { display: inline-flex; align-items: center; gap: 3px; border: 1px solid transparent;
  background: transparent; border-radius: 2px; padding: 4px 9px; font: inherit; font-size: 12px;
  color: #5b7683; cursor: pointer; }
.nb-gbar button:hover { background: #eef3f6; }
.nb-gbar button.on { background: color-mix(in srgb, var(--ac) 13%, #fff); color: var(--ac); font-weight: 600; }
.nb-gbar .nb-ck1 { opacity: 1; margin-right: 4px; }

/* Soltar sobre Favoritos o Papelera en la barra de la izquierda */
.nb-nav.recibe { background: var(--ac); color: #fff; }
.nb-nav.recibe i { color: #fff; }

/* ---- Cuadrícula ---- */
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; padding: 14px; }
.nb-tar { position: relative; border: 1px solid #e4ebef; border-radius: 2px; overflow: hidden;
  cursor: pointer; background: #fff; user-select: none; }
.nb-tar:hover { border-color: var(--ac); }
.nb-tar.on { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 7%, #fff); }
.nb-tar.marcada { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 11%, #fff); }
/* Casilla y acciones flotan sobre la miniatura, con una sombrita para que se
   vean tanto sobre una foto clara como sobre una oscura. */
.nb-tar-ck { position: absolute; top: 6px; left: 6px; z-index: 2; width: 22px; height: 22px;
  background: rgba(255,255,255,.94); border-radius: 2px; box-shadow: 0 1px 4px rgba(13,42,53,.22); opacity: 0; }
.nb-tar:hover .nb-tar-ck, .nb-tar.marcada .nb-tar-ck { opacity: 1; }
.nb-tar-acc { position: absolute; top: 6px; right: 6px; z-index: 2; gap: 2px; }
.nb-tar-acc button { background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(13,42,53,.22); width: 26px; height: 26px; }
.nb-tar-t .fav { color: #e0a020; font-size: 11px; }
@media (hover: none) { .nb-tar-ck { opacity: 1; } }
.nb-tar-img { height: 104px; display: flex; align-items: center; justify-content: center;
  background: #f6fafc; border-bottom: 1px solid #eef3f6; font-size: 34px; color: #a8bcc6; overflow: hidden; }
.nb-tar-img.carpeta { color: var(--ac); }
.nb-tar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nb-tar-t { padding: 7px 9px; font-size: 12.5px; color: #17323d; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.nb-tar-t small { display: block; font-size: 11px; color: #93a7b1; margin-top: 2px; }

/* ---- Panel de detalle ---- */
.nb-det { flex: 0 0 288px; border-left: 1px solid #e4ebef; background: #fafcfd; display: none;
  flex-direction: column; min-height: 0; overflow: hidden; }
.nb-det.on { display: flex; }
.nb-det-x { position: absolute; top: 6px; right: 6px; }
.nb-det-cab { position: relative; padding: 14px 14px 10px; border-bottom: 1px solid #e4ebef; text-align: center; }
.nb-det-img { height: 132px; display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1px solid #e4ebef; border-radius: 2px; margin-bottom: 10px; font-size: 44px; color: #a8bcc6; overflow: hidden; }
.nb-det-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.nb-det-n { font-size: 13.5px; font-weight: 600; color: #0d2a35; word-break: break-word; line-height: 1.35; }
.nb-det-s { font-size: 11.5px; color: #7c929c; margin-top: 3px; }
.nb-det-cuerpo { flex: 1 1 auto; overflow-y: auto; padding: 12px 14px; min-height: 0; }
.nb-det-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.nb-det-acc .nb-btn { justify-content: center; }
.nb-det-acc .ancho { grid-column: 1 / -1; }
/* Lista de lo marcado, en el panel de varios */
.nb-det-lista { border-top: 1px solid #eef3f6; padding-top: 8px; }
.nb-det-it { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #3d5560; padding: 4px 0; }
.nb-det-it i { font-size: 15px; color: #93a7b1; flex: 0 0 auto; }
.nb-det-it span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-det-it.mas { color: #93a7b1; font-size: 12px; padding-left: 23px; }

.nb-dato { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0;
  border-bottom: 1px solid #eef3f6; }
.nb-dato b { color: #5b7683; font-weight: 500; flex: 0 0 auto; }
.nb-dato span { color: #17323d; text-align: right; word-break: break-word; }

/* ---- Estado vacío / conectar ---- */
.nb-centro { display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 34px; text-align: center; }
.nb-centro .gr { width: 66px; height: 66px; border-radius: 3px; display: flex; align-items: center;
  justify-content: center; font-size: 33px; color: #fff; background: var(--ac); margin-bottom: 16px; }
.nb-centro h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: #0d2a35; }
.nb-centro p { margin: 0 0 6px; font-size: 13.5px; color: #5b7683; max-width: 430px; line-height: 1.55; }
.nb-centro .chico { font-size: 12px; color: #93a7b1; max-width: 400px; }
.nb-centro .nb-btn { margin-top: 16px; padding: 10px 20px; font-size: 13.5px; }
.nb-pasos { text-align: left; margin: 14px 0 0; padding: 0; list-style: none; max-width: 400px; }
.nb-pasos li { display: flex; gap: 9px; font-size: 12.5px; color: #5b7683; padding: 5px 0; line-height: 1.5; }
.nb-pasos b { flex: 0 0 19px; height: 19px; border-radius: 2px; background: color-mix(in srgb, var(--ac) 15%, #fff);
  color: var(--ac); font-size: 11.5px; display: flex; align-items: center; justify-content: center; }

/* ---- Soltar archivos ---- */
.nb-soltar { position: absolute; inset: 0; z-index: 30; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; background: color-mix(in srgb, var(--ac) 12%, #fff);
  border: 2px dashed var(--ac); font-size: 15px; font-weight: 600; color: var(--ac); }
.nb-soltar.on { display: flex; }
.nb-soltar i { font-size: 40px; }

/* ---- Subidas en curso ---- */
.nb-subidas { flex: 0 0 auto; border-top: 1px solid #e4ebef; background: #fafcfd; max-height: 190px; overflow-y: auto; }
.nb-sub-top { display: flex; align-items: center; gap: 10px; padding: 7px 12px; font-size: 12.5px;
  color: #3d5560; border-bottom: 1px solid #e4ebef; background: #f2f6f8; position: sticky; top: 0; z-index: 2; }
.nb-sub-top .t { flex: 1 1 auto; }
.nb-sub-top .nb-btn { padding: 3px 9px; font-size: 11.5px; background: #fff; }

/* Aviso con Deshacer */
.nb-deshacer { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9500;
  display: flex; align-items: center; gap: 14px; background: #0d2a35; color: #fff; padding: 10px 12px 10px 16px;
  border-radius: 3px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.32); max-width: 92vw;
  animation: nbsube .22s ease; }
.nb-deshacer.fue { opacity: 0; transition: opacity .25s; }
.nb-deshacer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-deshacer button { flex: 0 0 auto; background: transparent; border: 1px solid rgba(255,255,255,.34);
  color: #fff; border-radius: 2px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.nb-deshacer button:hover { background: #fff; color: #0d2a35; }
@keyframes nbsube { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nb-deshacer { animation: none; } }

/* Atajo escrito al lado de la opción del menú */
.nb-menu button em { margin-left: auto; font-style: normal; font-size: 11px; color: #a8bcc6; font-weight: 600; }
.nb-menu button.on { background: color-mix(in srgb, var(--ac) 13%, #fff); color: var(--ac); font-weight: 600; }
.nb-menu button.on i { color: var(--ac); }
.nb-menu button:disabled { opacity: .42; cursor: default; }
.nb-menu button:disabled:hover { background: transparent; color: #3d5560; }
.nb-menu button:hover em { color: #6b8592; }
.nb-menu button.malo:hover em { color: rgba(255,255,255,.8); }
.nb-sub-f { display: grid; grid-template-columns: 1fr 74px 24px; align-items: center; gap: 9px;
  padding: 7px 12px; border-bottom: 1px solid #eef3f6; font-size: 12.5px; }
.nb-sub-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3d5560; }
.nb-sub-b { height: 4px; background: #e4ebef; border-radius: 2px; overflow: hidden; margin-top: 3px; }
.nb-sub-b i { display: block; height: 100%; background: var(--ac); width: 0; transition: width .2s; }
.nb-sub-p { font-size: 11.5px; color: #7c929c; text-align: right; font-variant-numeric: tabular-nums; }
.nb-sub-f.malo .nb-sub-p { color: #c0392b; }
.nb-sub-f.malo .nb-sub-b i { background: #c0392b; }

/* ---- Menú de un archivo ---- */
.nb-menu { position: fixed; z-index: 9000; background: #fff; border: 1px solid #d8e2e8; border-radius: 2px;
  box-shadow: 0 8px 26px rgba(13,42,53,.17); padding: 4px; min-width: 194px; }
.nb-menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0;
  background: transparent; padding: 8px 10px; font: inherit; font-size: 13px; color: #3d5560;
  cursor: pointer; border-radius: 2px; }
.nb-menu button:hover { background: #eef3f6; color: #0d2a35; }
.nb-menu button i { font-size: 15px; color: #7c929c; width: 17px; }
.nb-menu button:hover i { color: var(--ac); }
.nb-menu button.malo:hover { background: #c0392b; color: #fff; }
.nb-menu button.malo:hover i { color: #fff; }
.nb-menu hr { border: 0; border-top: 1px solid #eef3f6; margin: 4px 0; }

/* ---- Ventanas de diálogo (crear carpeta, renombrar, compartir) ---- */
.nb-modal { position: fixed; inset: 0; z-index: 9100; background: rgba(8,26,36,.42);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.nb-caja { background: #fff; border-radius: 3px; width: 100%; max-width: 458px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(8,26,36,.34); }
.nb-caja-h { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px;
  border-bottom: 1px solid #e4ebef; font-size: 14.5px; font-weight: 600; color: #0d2a35; }
.nb-caja-b { padding: 16px; }
.nb-caja-p { padding: 12px 16px; border-top: 1px solid #e4ebef; display: flex; justify-content: flex-end; gap: 8px;
  background: #fafcfd; }
.nb-campo { margin-bottom: 13px; }
.nb-campo:last-child { margin-bottom: 0; }
.nb-campo label { display: block; font-size: 12px; font-weight: 600; color: #5b7683; margin-bottom: 5px; }
.nb-campo input[type=text], .nb-campo input[type=date], .nb-campo input[type=password] {
  width: 100%; border: 1px solid #cfdde5; border-radius: 2px; padding: 8px 10px; font: inherit;
  font-size: 13.5px; color: #17323d; outline: 0; background: #fff; }
.nb-campo input:focus { border-color: var(--ac); }
.nb-ck { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3d5560; cursor: pointer; }
.nb-ck input { width: 15px; height: 15px; accent-color: var(--ac); }
.nb-err { font-size: 12.5px; color: #c0392b; margin-top: 9px; display: none; }
.nb-err.on { display: block; }

/* Enlace ya creado */
.nb-enlace { display: flex; gap: 6px; margin-bottom: 12px; }
.nb-enlace input { flex: 1 1 auto; min-width: 0; border: 1px solid #cfdde5; border-radius: 2px;
  padding: 8px 10px; font: inherit; font-size: 12.5px; color: #17323d; background: #f6fafc; }
.nb-lista-en { border: 1px solid #e4ebef; border-radius: 2px; margin-bottom: 13px; }
.nb-en-f { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-bottom: 1px solid #eef3f6; font-size: 12.5px; }
.nb-en-f:last-child { border-bottom: 0; }
.nb-en-f .t { flex: 1 1 auto; min-width: 0; color: #3d5560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-en-f .t small { display: block; font-size: 11px; color: #93a7b1; }
.nb-en-f.vencido { background: #fdf7f6; }
.nb-en-f.vencido .t { color: #a8bcc6; text-decoration: line-through; }
.nb-en-f.vencido .t small { color: #c0392b; text-decoration: none; font-weight: 600; }

/* Contraseña del enlace: escribirla, verla o generarla */
.nb-pwrow { display: flex; gap: 6px; margin-top: 7px; }
.nb-pwrow input { flex: 1 1 auto; min-width: 0; }
.nb-pwrow .nb-ico { flex: 0 0 auto; border: 1px solid #cfdde5; height: auto; }
.nb-pwrow .nb-btn { flex: 0 0 auto; }
/* Vencimiento: los plazos de siempre a un clic, y la fecha exacta si hace falta */
.nb-fechas { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.nb-fechas .nb-btn { padding: 6px 10px; font-size: 12px; }
.nb-fechas input[type=date] { flex: 1 1 130px; min-width: 0; }

/* ---- Visor a pantalla completa ---- */
.nb-visor { position: fixed; inset: 0; z-index: 9200; background: rgba(6,18,26,.94);
  display: flex; flex-direction: column; }
.nb-visor-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #dfe9ee;
  font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.1); flex: 0 0 auto; }
.nb-visor-h .t { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.nb-visor-h button { background: transparent; border: 0; color: #cfdde5; cursor: pointer; font-size: 18px;
  width: 32px; height: 32px; border-radius: 2px; display: flex; align-items: center; justify-content: center; }
.nb-visor-h button:hover { background: rgba(255,255,255,.13); color: #fff; }
.nb-visor-c { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 14px; }
.nb-visor-c img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nb-visor-c iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 2px; }

/* ---- Dónde está parado el teclado ----
   Un borde, no un relleno: el relleno se confunde con "marcado" y con
   "seleccionado", que son tres cosas distintas que pueden pasar a la vez. */
.nb-fila.enfocada, .nb-tar.enfocada { outline: 2px solid var(--ac); outline-offset: -2px; }
.nb-fila.enfocada { background: #f2f8fb; }
/* El foco por teclado (Tab) tiene que verse SIEMPRE, aunque el navegador lo
   dibuje distinto. Sin esto, quien navega con Tab no sabe dónde está parado. */
.nb-fila:focus-visible, .nb-tar:focus-visible,
.nb-nav:focus-visible, .nb-btn:focus-visible, .nb-ico:focus-visible,
.nb-subir:focus-visible, .nb-nueva:focus-visible, .nb-miga:focus-visible {
  outline: 2px solid var(--ac); outline-offset: 1px; }
.nb-fila:focus-visible { background: #f2f8fb; }

/* ---- Aviso de "ya existe ese archivo" ---- */
.nb-choques { border: 1px solid #e2b5ae; border-radius: 2px; background: #fdf7f6; max-height: 190px; overflow-y: auto; }
.nb-choque { display: flex; align-items: center; gap: 9px; padding: 8px 11px; font-size: 12.5px;
  color: #17323d; border-bottom: 1px solid #f6e9e7; }
.nb-choque:last-child { border-bottom: 0; }
.nb-choque i { color: #c0392b; font-size: 16px; flex: 0 0 auto; }
.nb-choque span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-choque.mas { color: #93a7b1; font-size: 12px; justify-content: center; }

/* ---- Cuando el navegador no sabe reproducir el archivo ---- */
.nb-nopuede { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 28px;
  text-align: center; background: rgba(255,255,255,.07); border-radius: 3px; max-width: 430px; }
.nb-nopuede i { font-size: 46px; color: #9db4bf; }
.nb-nopuede h4 { margin: 0; font-size: 15px; font-weight: 600; color: #dfe9ee; }
.nb-nopuede p { margin: 0; font-size: 13px; color: #9db4bf; line-height: 1.55; }

/* ---- Lo que no aplica aquí: apagado, no escondido ---- */
.nb-subir.apagado, .nb-nueva.apagado { opacity: .4; cursor: default; filter: grayscale(1); }
.nb-subir.apagado:hover, .nb-nueva.apagado:hover { filter: grayscale(1); border-color: #cfdde5; color: #3d5560; }
.nb-menu-nota, .nb-det-nota { display: flex; gap: 7px; align-items: flex-start; font-size: 11.5px;
  color: #7c929c; line-height: 1.45; padding: 8px 10px; border-top: 1px solid #eef3f6; margin-top: 4px; }
.nb-det-nota { border: 0; border-radius: 2px; background: #f6fafc; margin: -4px 0 12px; }
.nb-menu-nota i, .nb-det-nota i { color: var(--ac); font-size: 14px; flex: 0 0 auto; margin-top: 1px; }

/* Al llegar desde "ir a la carpeta donde está", el archivo parpadea una vez
   para que la persona lo ubique sin buscarlo con los ojos. */
@keyframes nbllega { 0%, 100% { background: transparent; } 30% { background: color-mix(in srgb, var(--ac) 26%, #fff); } }
.nb-fila.recienllegado, .nb-tar.recienllegado { animation: nbllega 1.6s ease; }
@media (prefers-reduced-motion: reduce) { .nb-fila.recienllegado, .nb-tar.recienllegado { animation: none;
  outline: 2px solid var(--ac); outline-offset: -2px; } }

/* ---- Botón "guardar en mi nube" en los adjuntos del correo ---- */
.att-nube { border: 0; background: transparent; color: #6b8592; cursor: pointer; padding: 0 3px;
  display: inline-flex; align-items: center; font-size: 14px; }
.att-nube:hover { color: var(--ac); }
.att-nube.listo { color: #2f7d55; }

.catt-nube i:first-child { color: var(--ac); }
.nb-mv-f.on { background: color-mix(in srgb, var(--ac) 12%, #fff); }
.nb-mv-f .pes { font-style: normal; font-size: 11.5px; color: #93a7b1; flex: 0 0 auto; }

/* ---- Papelera ---- */
.nb-papbar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; flex: 0 0 auto;
  background: #fafcfd; border-bottom: 1px solid #e4ebef; font-size: 12.5px; color: #5b7683; }
.nb-papbar span { flex: 1 1 auto; }
.nb-fila.pap, .nb-cab.pap { grid-template-columns: 34px minmax(0, 1fr) 78px 118px 68px; }
.nb-fila.pap .nb-acc { position: static; transform: none; opacity: 1; background: none; padding-left: 0; }
@media (max-width: 860px) { .nb-fila.pap, .nb-cab.pap { grid-template-columns: 30px minmax(0, 1fr) 62px 68px; }
  .nb-fila.pap .nb-acc button { display: flex; } }

/* ---- Marcar varios a la vez ---- */
.nb-ck1 { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.nb-ck1 input { width: 15px; height: 15px; accent-color: var(--ac); cursor: pointer; margin: 0; }
/* La casilla solo aparece al pasar el mouse o cuando ya hay algo marcado:
   con 200 archivos, 200 casillas siempre visibles son ruido. */
.nb-lista .nb-ck1 { opacity: 0; }
.nb-fila:hover .nb-ck1, .nb-fila.marcada .nb-ck1, .nb-cab .nb-ck1 { opacity: 1; }
.nb-fila.marcada { background: color-mix(in srgb, var(--ac) 12%, #fff); }
.nb-fila.marcada:hover { background: color-mix(in srgb, var(--ac) 16%, #fff); }
@media (hover: none) { .nb-lista .nb-ck1 { opacity: 1; } }

/* Barra de "estás viendo solo X" — ámbar, no azul: es un aviso de que la
   lista NO está completa, no una acción. */
.nb-filbar { display: flex; align-items: center; gap: 9px; padding: 7px 12px; flex: 0 0 auto;
  background: #fdf8ec; border-bottom: 1px solid #f0e0bd; font-size: 12.5px; color: #7a5c1e; }
.nb-filbar > i { color: #c08a1e; font-size: 15px; }
.nb-filbar span { flex: 1 1 auto; }
.nb-filbar .nb-btn { background: #fff; border-color: #e2cc98; color: #7a5c1e; }
.nb-filbar .nb-btn:hover { border-color: #c08a1e; color: #7a5c1e; }

/* Barra de "N seleccionados" */
.nb-selbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--ac) 9%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--ac) 26%, #fff); }
.nb-selbar .n { font-size: 13px; font-weight: 600; color: var(--ac); margin-right: auto; }
.nb-selbar .n em { font-style: normal; font-weight: 400; color: #5b7683; }
.nb-selbar .nb-btn { background: #fff; }

/* ---- Arrastrar para mover ---- */
.nb-fila.volando, .nb-tar.volando { opacity: .45; }
.nb-fila.recibe, .nb-tar.recibe { background: color-mix(in srgb, var(--ac) 18%, #fff);
  outline: 2px solid var(--ac); outline-offset: -2px; }
.nb-miga.recibe { background: var(--ac); color: #fff; }
.nb-fila[draggable="true"] { user-select: none; }

/* ---- Mover a… ---- */
.nb-mv-ruta { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-bottom: 9px;
  font-size: 12.5px; color: #5b7683; }
.nb-mv-ruta button { border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ac);
  cursor: pointer; padding: 3px 5px; border-radius: 2px; }
.nb-mv-ruta button:hover { background: #eef3f6; }
.nb-mv-ruta i { color: #b6c6ce; font-size: 12px; }
.nb-mv-lista { border: 1px solid #e4ebef; border-radius: 2px; max-height: 234px; overflow-y: auto; }
.nb-mv-f { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-bottom: 1px solid #f0f4f6;
  background: #fff; padding: 9px 11px; font: inherit; font-size: 13px; color: #17323d; cursor: pointer; text-align: left; }
.nb-mv-f:last-child { border-bottom: 0; }
.nb-mv-f:hover { background: #f6fafc; }
.nb-mv-f > i:first-child { color: var(--ac); font-size: 17px; }
.nb-mv-f span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-mv-f .ch { color: #b6c6ce; font-size: 14px; }
.nb-mv-vacio { padding: 18px; text-align: center; font-size: 12.5px; color: #93a7b1; }
.nb-mv-pie { margin: 10px 0 0; font-size: 12.5px; color: #5b7683; }

/* ---- Reproductores y texto en el visor ---- */
.nb-visor-c video { max-width: 100%; max-height: 100%; background: #000; border-radius: 2px; outline: 0; }
.nb-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px 24px;
  background: rgba(255,255,255,.06); border-radius: 3px; min-width: min(440px, 88vw); }
.nb-audio > i { font-size: 58px; color: #7fc4f2; }
.nb-audio-t { color: #dfe9ee; font-size: 14px; text-align: center; word-break: break-word; max-width: 400px; }
.nb-audio audio { width: 100%; }
.nb-texto { width: 100%; max-width: 1000px; height: 100%; overflow: auto; margin: 0; padding: 20px 22px;
  background: #fff; color: #17323d; border-radius: 2px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.nb-visor-n { font-size: 12px; color: #9db4bf; font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* ---- Cargando ---- */
.nb-cargando { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 34px;
  color: #93a7b1; font-size: 13px; }
.nb-cargando i { font-size: 17px; animation: nbgira 1s linear infinite; }
@keyframes nbgira { to { transform: rotate(360deg); } }

/* ---- Móvil: la barra lateral se vuelve una fila de arriba ---- */
@media (max-width: 860px) {
  .nube { flex-direction: column; }
  /* 🚨 Al girar la columna, el flex-basis de 216px pasa a ser ALTO y la barra
     de secciones se come un cuarto de la pantalla. Medido: 375x216. */
  .nb-lado, .mail.nubemode .nb-lado { flex: 0 0 auto; flex-basis: auto; }
  .nb-lado { flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-bottom: 1px solid #e4ebef; padding: 7px 9px; }
  .nb-nav { width: auto; padding: 6px 10px; font-size: 12.5px; flex: 0 0 auto; }
  .nb-nav em, .nb-espacio, .nb-sh, .nb-nueva { display: none; }
  .nb-subir { width: auto; margin: 0 4px 0 0; padding: 7px 12px; flex: 0 0 auto; }
  .nb-det { position: absolute; inset: 0; z-index: 25; flex: 1 1 auto; border-left: 0; }
  .nb-buscar { flex: 1 1 120px; }
  /* En el teléfono el nombre manda: fuera la fecha, el tamaño más angosto, y
     las acciones se reducen al menú (lo demás está en el propio menú). */
  /* El tamaño baja a una segunda línea bajo el nombre y su columna desaparece:
     esos 62 px se los queda el nombre, que es lo que la gente lee. */
  .nb-fila, .nb-cab { grid-template-columns: 22px 30px minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
  .nb-fec, .nb-tam { display: none; }
  .nb-nom { font-size: 13px; }
  .nb-nom::after { content: attr(data-tam); display: block; font-size: 11px; color: #93a7b1; margin-top: 1px; }
  .nb-nom small { margin-top: 0; }
  .nb-acc { padding-left: 18px; }
  .nb-acc button:not(:last-child) { display: none; }     /* solo el menú ⋮ */
  .nb-selbar { flex-wrap: wrap; }
  .nb-selbar .n { flex: 1 0 100%; margin-bottom: 2px; }
  /* La fila de secciones no cabe entera (508 px medidos en 375 de pantalla).
     Se desliza, y una sombrita en el borde derecho avisa que hay más — sin
     eso parece que la lista se acaba en "Favoritos". */
  .nb-lado { gap: 2px; padding: 6px; position: relative;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
  .nb-lado::-webkit-scrollbar { height: 0; }
  .nb-nav { padding: 6px 9px; font-size: 12px; }
  .nb-nav i { margin-right: 5px; }
  .nb-subir { padding: 7px 11px; font-size: 12.5px; }
  .nb-subir span { display: none; }                      /* queda solo la flecha de subir */
  .nb-nav span { display: none; }                        /* "Compartidos conmigo" no cabe… */
  .nb-nav em.corto { display: inline; font-style: normal; margin-left: 0; color: inherit; font-weight: inherit; font-size: 12px; }
}
