:root {
  --verde: #1f6f4a; --verde-claro: #e7f2ec; --texto: #1d1f21; --suave: #5f6368; --borde: #e1e3e6;
  --fondo: #f5f6f7; --rojo: #b3261e; --carpeta: #f2c14e; --carpeta-borde: #d9a730;
  --n-proyecto: #1f6f4a; --n-reunion: #3b6ea8; --n-concepto: #9aa0a6; --n-compartido: #d9822b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto); background: var(--fondo); }
a { color: var(--verde); }
.barra { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.25rem; background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 5; }
.marca { font-weight: 700; color: var(--verde); text-decoration: none; font-size: 1.1rem; }
.marca span { color: var(--suave); font-weight: 400; font-size: .88rem; margin-left: .35rem; }
.salir { display: flex; gap: .75rem; align-items: center; }
.quien { color: var(--suave); font-size: .88rem; }
main { max-width: 1100px; margin: 1.25rem auto; padding: 0 1rem; }
footer { max-width: 1100px; margin: 0 auto 2rem; padding: 0 1rem; color: var(--suave); font-size: .8rem; }

/* Header row: breadcrumbs and the node switch */
.cabecera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.migas { display: flex; flex-wrap: wrap; align-items: center; font-size: 1.15rem; font-weight: 600; }
.migas a { text-decoration: none; color: var(--suave); }
.migas a:hover { color: var(--verde); }
.migas > * + *::before { content: "›"; color: var(--suave); margin: 0 .5rem; font-weight: 400; }
.interruptor { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--texto); font-weight: 600; font-size: .92rem; background: #fff; border: 1px solid var(--borde); border-radius: 999px; padding: .35rem .8rem .35rem .45rem; }
.interruptor .pista { width: 34px; height: 20px; border-radius: 999px; background: #c8ccd0; position: relative; transition: background .15s; }
.interruptor .pista::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.interruptor.activo .pista { background: var(--verde); }
.interruptor.activo .pista::after { left: 16px; }

/* Home: folders */
.carpetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.carpeta { display: flex; flex-direction: column; gap: .3rem; background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 1rem; text-decoration: none; color: var(--texto); min-height: 150px; transition: border-color .12s, box-shadow .12s; }
a.carpeta:hover, a.carpeta:focus-visible { border-color: var(--verde); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.carpeta .icono { width: 54px; height: 45px; fill: var(--carpeta); stroke: var(--carpeta-borde); stroke-width: 1.5; margin-bottom: .35rem; }
.carpeta .nombre { font-weight: 600; overflow-wrap: anywhere; }
.carpeta .detalle { color: var(--suave); font-size: .82rem; margin-top: auto; }
.carpeta.nueva { border-style: dashed; background: transparent; }
.carpeta.nueva summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: .3rem; color: var(--suave); }
.carpeta.nueva summary::-webkit-details-marker { display: none; }
.carpeta.nueva[open] summary { margin-bottom: .6rem; }
.carpeta.nueva form { display: flex; flex-direction: column; gap: .5rem; }
.mas { font-size: 2rem; line-height: 1; font-weight: 300; color: var(--verde); }

/* Boxes */
.caja { background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 1.1rem 1.35rem; margin-bottom: 1rem; }
.estrecha { max-width: 420px; margin: 3rem auto; }
h1 { font-size: 1.35rem; margin: 0 0 .6rem; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
.fila-titulo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.fila-titulo h1, .fila-titulo h2 { margin-bottom: .5rem; }
.texto-libre { white-space: pre-wrap; margin: .2rem 0 .6rem; }
details.editar { position: relative; }
details.editar summary { list-style: none; }
details.editar summary::-webkit-details-marker { display: none; }
details.editar[open] { position: static; flex-basis: 100%; }
.fila-titulo:has(details.editar[open]) { flex-wrap: wrap; }
details.editar[open] summary { margin-bottom: .75rem; }

/* Meetings as files */
.archivos { list-style: none; margin: 0; padding: 0; }
.archivos li + li { border-top: 1px solid var(--borde); }
.archivos a { display: grid; grid-template-columns: 26px 92px 1fr auto; gap: .8rem; align-items: center; padding: .6rem .4rem; text-decoration: none; color: var(--texto); border-radius: 6px; }
.archivos a:hover { background: var(--fondo); }
.icono-doc { width: 22px; height: 28px; fill: #fff; stroke: var(--n-reunion); stroke-width: 1.6; }
.icono-doc .pliegue { fill: none; }
.archivos .fecha { color: var(--suave); font-variant-numeric: tabular-nums; font-size: .9rem; }
.archivos .titulo { font-weight: 600; }
.estado { font-size: .82rem; color: var(--suave); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; font-weight: 400; }
.chip { font-size: .76rem; background: #eef0f2; color: #3c4043; border-radius: 999px; padding: .05rem .55rem; }
.chip.manual { background: var(--verde-claro); color: var(--verde); }
.mas-chips { background: none; color: var(--suave); }
ul.chips.grandes { list-style: none; padding: 0; margin: 0 0 .8rem; gap: .4rem; }
ul.chips.grandes .chip { display: inline-flex; align-items: center; gap: .2rem; font-size: .88rem; padding: .2rem .3rem .2rem .7rem; }
ul.chips.grandes form { display: inline; margin: 0; }
button.quitar { background: none; color: var(--suave); padding: 0 .35rem; font-size: 1rem; line-height: 1; font-weight: 400; border-radius: 999px; }
button.quitar:hover { background: rgba(0,0,0,.08); color: var(--rojo); }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .7rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .5rem .6rem; font: inherit; font-weight: 400; border: 1px solid #cfd3d7; border-radius: 6px; background: #fff; }
textarea { resize: vertical; }
input[type=file] { display: block; margin-top: .4rem; font-weight: 400; }
fieldset { border: 1px solid var(--borde); border-radius: 6px; padding: .4rem .8rem .1rem; margin: 0 0 .7rem; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.opcion { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.opcion input { margin-top: .3rem; }
.formulario.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.ancho { grid-column: 1 / -1; }
.en-linea { display: flex; gap: .5rem; max-width: 460px; }
.en-linea input { margin: 0; }
details.nueva-reunion > summary { cursor: pointer; font-weight: 600; color: var(--verde); list-style: none; display: flex; align-items: center; gap: .4rem; }
details.nueva-reunion > summary::-webkit-details-marker { display: none; }
details.nueva-reunion > summary .mas { font-size: 1.4rem; }
details.nueva-reunion[open] > summary { margin-bottom: .9rem; }
button, .boton { display: inline-block; background: var(--verde); color: #fff; border: 0; border-radius: 6px; padding: .5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.secundario, .boton.secundario { background: #fff; color: var(--verde); border: 1px solid var(--verde); padding: .35rem .85rem; }
summary.boton { cursor: pointer; }
button.peligro { background: #fff; color: var(--rojo); border: 1px solid var(--rojo); }
button.enlace { background: none; color: var(--verde); padding: 0; font-weight: 600; }
.acciones { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; }
.aviso { background: #eef6f1; border-left: 4px solid var(--verde); padding: .55rem .8rem; border-radius: 4px; }
.aviso.error { background: #fdecea; border-color: var(--rojo); }
.suave { color: var(--suave); }
.pequeno { font-size: .83rem; }
.estado-hecho { color: var(--verde); }
.estado-error { color: var(--rojo); }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1rem; margin: 0 0 .5rem; font-size: .93rem; }
.datos dt { color: var(--suave); }
.datos dd { margin: 0; }
.transcripcion .turno { margin: 0 0 .8rem; }
.marca-tiempo { font-family: ui-monospace, Consolas, monospace; color: var(--suave); font-size: .83rem; margin-right: .3rem; }
.tramo { font-size: .95rem; color: var(--suave); border-top: 1px dashed var(--borde); padding-top: .75rem; }

/* Concept map */
.mapa { background: #fff; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.mapa .vacio { padding: 2rem; color: var(--suave); text-align: center; margin: 0; }
.mapa-barra { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .8rem; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.mapa-buscar { max-width: 260px; margin: 0 !important; }
.leyenda { font-size: .8rem; color: var(--suave); display: flex; align-items: center; gap: .35rem; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: .5rem; }
.l-proyecto { background: var(--n-proyecto); } .l-reunion { background: var(--n-reunion); } .l-concepto { background: var(--n-concepto); }
.mapa-cuerpo { display: grid; grid-template-columns: 1fr 270px; }
.mapa-lienzo { width: 100%; height: 600px; display: block; cursor: grab; touch-action: none; background: #fbfbfc; }
.mapa-lienzo:active { cursor: grabbing; }
.mapa-panel { border-left: 1px solid var(--borde); padding: .9rem 1rem; max-height: 600px; overflow: auto; font-size: .9rem; }
.mapa-panel .tipo { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
.mapa-panel h3 { margin: .1rem 0 .6rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.mapa-panel .boton { font-size: .85rem; padding: .3rem .7rem; margin-bottom: .6rem; }
.vecinos { list-style: none; padding: 0; margin: .3rem 0 0; }
.vecinos li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; border-bottom: 1px solid #f0f1f2; }
.vecinos .enlace { text-align: left; font-weight: 400; text-decoration: none; }
.vecinos .peso { color: var(--suave); font-size: .8rem; }
.arista { stroke: #c9ced3; }
.arista.activa { stroke: var(--verde); }
.nodo { cursor: pointer; }
.nodo circle { stroke: #fff; stroke-width: 1.5; }
.n-proyecto circle { fill: var(--n-proyecto); }
.n-reunion circle { fill: var(--n-reunion); }
.n-concepto circle { fill: var(--n-concepto); }
.n-concepto.compartido circle { fill: var(--n-compartido); }
.nodo text { font-size: calc(12px / var(--z, 1)); fill: #3c4043; paint-order: stroke; stroke: #fbfbfc; stroke-width: calc(3px / var(--z, 1)); pointer-events: none; }
.n-proyecto text, .n-reunion text { font-weight: 600; font-size: calc(13px / var(--z, 1)); }
.nodo text.oculta { display: none; }
.cerca .nodo text.oculta, .nodo.sel text.oculta, .nodo.vecino text.oculta { display: inline; }
.con-seleccion .nodo { opacity: .25; }
.con-seleccion .arista { opacity: .15; }
.con-seleccion .arista.activa { opacity: 1; }
.con-seleccion .nodo.sel, .con-seleccion .nodo.vecino { opacity: 1; }
.nodo.sel circle { stroke: var(--texto); stroke-width: 2.5; }

@media (max-width: 760px) {
  .formulario.dos { grid-template-columns: 1fr; }
  .archivos a { grid-template-columns: 22px 1fr; }
  .archivos .fecha { grid-column: 2; grid-row: 1; }
  .archivos .titulo { grid-column: 2; }
  .archivos .estado { grid-column: 2; }
  .mapa-cuerpo { grid-template-columns: 1fr; }
  .mapa-lienzo { height: 440px; }
  .mapa-panel { border-left: 0; border-top: 1px solid var(--borde); }
}
progress { width: 100%; height: 10px; accent-color: var(--verde); margin-top: .5rem; }
.estado-subida { margin: .5rem 0 0; }
