/* Estilo de mensajes, fotos y app — mismos colores que el Área de Familias */
* { box-sizing: border-box; }
body { font-family: "Poppins", Arial, sans-serif; margin: 0; background: #f7f2ea; color: #333; }
header { background: #4f6b43; color: #fff; padding: 14px 16px; text-align: center; font-size: 19px; font-weight: 600; position: sticky; top: 0; z-index: 10; }
header .volver { position: absolute; left: 12px; top: 6px; color: #fff; text-decoration: none; font-size: 30px; line-height: 1; padding: 4px 10px; }
.container { max-width: 900px; margin: 16px auto; padding: 0 12px 60px; }
.box { background: #fff; padding: 16px; border-radius: 16px; margin-bottom: 16px; border: 2px solid #f2e6d5; }
h2 { color: #4f6b43; margin: 0 0 10px; font-size: 18px; }
p { margin: 6px 0; }
.peq { font-size: 12px; color: #777; }
.btn { display: inline-block; background: #4f6b43; color: #fff; border: 0; border-radius: 12px; padding: 11px 18px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn.sec { background: #fff; color: #4f6b43; border: 2px solid #4f6b43; }
.btn.mini { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .5; }
input[type=text], input[type=email], input[type=password], select, textarea { width: 100%; padding: 11px; border: 2px solid #e6dccb; border-radius: 12px; font-size: 16px; font-family: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 14px; color: #4f6b43; font-weight: 600; margin: 10px 0 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.chip { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid #e6dccb; color: #4f6b43; text-decoration: none; font-size: 14px; white-space: nowrap; }
.chip.activo { background: #4f6b43; color: #fff; border-color: #4f6b43; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: #fff; border: 2px solid #e6dccb; color: #4f6b43; text-decoration: none; font-weight: 600; }
.tab.activo { background: #a9d8c8; border-color: #a9d8c8; }
.badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 13px; text-align: center; margin-left: 6px; }
.pub { background: #fff; border: 2px solid #f2e6d5; border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.pub .meta { font-size: 12px; color: #888; margin-bottom: 6px; }
.pub .dest { display: inline-block; background: #e6f3ee; color: #345c41; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.pub .texto { white-space: pre-wrap; font-size: 16px; }
.pub.nuevo { border-color: #a9d8c8; box-shadow: 0 0 0 2px #a9d8c8 inset; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-top: 10px; }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: #eee; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.burbuja { max-width: 82%; padding: 10px 13px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; }
.burbuja.mia { align-self: flex-end; background: #a9d8c8; border-bottom-right-radius: 4px; }
.burbuja.suya { align-self: flex-start; background: #fff; border: 2px solid #f2e6d5; border-bottom-left-radius: 4px; }
.burbuja .meta { font-size: 11px; color: #666; margin-top: 4px; }
.escribir { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.escribir textarea { min-height: 48px; }
.lista a.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #fcfaf7; border: 2px solid #f2e6d5; margin-bottom: 8px; text-decoration: none; color: #333; }
.lista .ult { font-size: 13px; color: #777; }
#avisos-movil { display: none; background: #fff7e0; border: 2px solid #f5e49c; border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; }
#visor { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 50; flex-direction: column; }
#visor img { max-width: 100%; max-height: 82vh; }
#visor .pie { color: #fff; max-width: 92%; margin: 10px 0 0; font-size: 15px; line-height: 1.35; text-align: center; white-space: pre-wrap; }
#visor .acciones { margin-top: 12px; display: flex; gap: 12px; }
#visor .acciones a, #visor .acciones button { color: #fff; background: rgba(255,255,255,.15); border: 0; padding: 10px 16px; border-radius: 10px; font-size: 16px; text-decoration: none; }
.previas { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin-top: 8px; }
.previas img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.progreso { height: 8px; background: #eee; border-radius: 99px; overflow: hidden; margin-top: 8px; display: none; }
.progreso div { height: 100%; width: 0; background: #4f6b43; transition: width .2s; }
.aviso-ok { background: #e6f3ee; border-left: 4px solid #4f6b43; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.aviso-error { background: #fdecea; border-left: 4px solid #c0392b; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
/* Iconos de línea Dreams (lib/iconos.php) dentro de pestañas, botones y títulos */
.tab svg, .btn svg, h1 svg, h2 svg, h3 svg { vertical-align: -4px; }
.tab svg { display: block; margin: 0 auto 2px; }
.ic-redondo { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: #e6f3ee; color: #4f6b43; flex-shrink: 0; }
/* Panel del personal: color por sección (--sec / --sec-f los pone estilo_seccion(); sin ellos, el verde Dreams) */
.btn { background: var(--sec, #4f6b43); }
.btn.sec { background: #fff; color: var(--sec, #4f6b43); border-color: var(--sec, #4f6b43); }
.chip.activo { background: var(--sec, #4f6b43); border-color: var(--sec, #4f6b43); }
h2 { color: var(--sec, #4f6b43); }
.ic-caja { display: inline-flex; align-items: center; justify-content: center; border-radius: 30%; flex-shrink: 0; }
.menu-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; margin-bottom: 12px; }
.menu-p a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 1px 6px; min-width: 0; border-radius: 14px; background: #fff; border: 2px solid transparent; text-decoration: none; color: #444; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.15; }
.menu-p a.activo { border-color: var(--c); background: var(--f); color: #2c2c2a; font-weight: 700; }
.menu-p .badge { position: absolute; top: 2px; right: 4px; margin: 0; font-size: 11px; min-width: 18px; padding: 0 5px; }
@media (min-width: 700px) { .menu-p a { font-size: 13px; } }
.tab.activo { background: var(--sec-f, #a9d8c8); border-color: var(--sec, #a9d8c8); color: var(--sec, #4f6b43); }
label, .chip { color: var(--sec, #4f6b43); }
.chip.activo { color: #fff; }
/* Cabecera: logotipo y etiqueta de qué app es (EQUIPO / ADMINISTRACIÓN / FAMILIAS) */
header { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px 12px; }
header .area, .cab .area { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #2c2c2a; border-radius: 999px; padding: 3px 12px 3px 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
header .area img, .cab .area img { height: 30px; width: auto; border-radius: 10px; display: block; }
.area.equipo span { color: #c77f00; } .area.admin span { color: #7b2b25; } .area.familias span { color: #2e8a34; }
header .titulo { font-size: 18px; line-height: 1.2; }
header .volver { top: 50%; transform: translateY(-50%); }
.ic-acu { border: 2px solid; border-radius: 26%; background: #fff; overflow: hidden; box-sizing: border-box; }
.ic-acu img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Menú fijo de abajo (equipo y familias), con los dibujos en acuarela */
body:has(.barra-app) { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.barra-hueco { height: calc(84px + env(safe-area-inset-bottom)); }
body:has(.barra-app) .barra-hueco { display: none; }
.barra-app { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid #eee3cf; display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(80,60,20,.06); }
.barra-app a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: #8a877f; font-size: 11px; font-weight: 600; max-width: 90px; }
.barra-app .acu { width: 36px; height: 36px; border-radius: 28%; background: #fff; object-fit: cover; opacity: .85; display: inline-flex; align-items: center; justify-content: center; color: #4f6b43; }
.barra-app a.on { color: #4f6b43; }
.barra-app a.on .acu { opacity: 1; box-shadow: 0 0 0 2px #4f6b43; }
.barra-app .num { position: absolute; top: -2px; left: 56%; background: #c0392b; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; line-height: 17px; }
/* Barra de arriba clara con el logotipo, como en familias, y una raya en el verde Dreams */
header { background: #fff; color: #2c2c2a; border-bottom: 3px solid #4f6b43; box-shadow: 0 2px 10px rgba(80,60,20,.05); padding: 8px 16px 9px; }
header .volver { color: #4f6b43; }
header .area { background: none; padding: 0; gap: 10px; }
header .area img { height: 38px; border-radius: 0; }
header .titulo { color: #4f6b43; font-size: 16px; }
header .hoy-linea, .cab .hoy-linea { display: block; font-size: 12.5px; font-weight: 500; color: #6f6c64; margin-top: 1px; }

/* App del equipo (05-10-2026): logo a la izquierda, nombre a la derecha; debajo el título y el día */
header.hq { display: block; text-align: left; font-size: 15px; padding: 8px 14px 9px; padding-top: calc(8px + env(safe-area-inset-top)); }
.hq-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hq-tit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; min-height: 18px; }
header.hq .titulo { font-size: 16px; font-weight: 700; margin-right: auto; }
header.hq .hoy-linea { margin: 0; }
header.hq .volver { position: static; transform: none; font-size: 28px; line-height: 1; padding: 0 4px 0 0; }
.yo { position: relative; }
.yo summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; font-weight: 700; color: #2c2c2a; }
.yo summary::-webkit-details-marker { display: none; }
.yo .ini { width: 36px; height: 36px; border-radius: 50%; background: #4f6b43; color: #fff; display: grid; place-items: center; font-size: 16px; }
.yo[open] .ini { box-shadow: 0 0 0 3px #cfe0c4; }
.yo-menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1.5px solid #efe4d2; border-radius: 16px; box-shadow: 0 12px 30px rgba(60,45,30,.18); padding: 6px; min-width: 220px; z-index: 40; }
.yo-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #333; text-decoration: none; font-size: 15px; font-weight: 500; }
.yo-menu a:hover { background: #f6f1e7; }
.yo-menu img { width: 32px; height: 32px; border-radius: 9px; }
header.hq .area { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
header.hq .area img { height: 34px; }
header.hq .area span { font-size: 9.5px; letter-spacing: .12em; padding-left: 3px; }
.yo .nom { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Logo de la app (Dreams Team / Dreams Admin) en la cabecera */
header .area.con-logo img, .cab .area.con-logo img { height: 60px; width: auto; border-radius: 0; }

/* Cabecera del equipo en una fila (07-10-2026): logo | título + día | ☰ Menú */
header.hq { padding: 6px 12px 7px; padding-top: calc(6px + env(safe-area-inset-top)); }
header.hq .hq-fila { flex-wrap: nowrap; }
header.hq .area.con-logo img { height: 50px; }
header.hq .hq-tit { flex: 1; min-width: 0; margin: 0; display: flex; align-items: center; gap: 4px; }
header.hq .hq-txt { min-width: 0; display: flex; flex-direction: column; }
header.hq .hq-txt .titulo { font-size: 15.5px; font-weight: 700; color: #4f6b43; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
header.hq .hq-txt .hoy-linea { font-size: 11.5px; line-height: 1.3; }
header.hq .volver { font-size: 26px; padding: 0 2px 0 0; }
.yo summary { flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; color: #4f6b43; padding: 2px 4px; }
.yo .hamb { display: flex; flex-direction: column; gap: 4px; width: 26px; }
.yo .hamb i { display: block; height: 3px; border-radius: 3px; background: #4f6b43; }
.yo .nom { max-width: none; }
.yo-menu { top: 52px; }
.yo-hola { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid #f0e9dc; margin-bottom: 4px; font-weight: 700; color: #2c2c2a; }
.yo-hola .ini { width: 32px; height: 32px; font-size: 15px; }
