:root {
  --ink: #16233b;
  --ink-2: #22324f;
  --ink-text: #c9d3e6;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --line: #dde2ea;
  --text: #1a2233;
  --muted: #637089;
  --note: #ffd23f;
  --note-soft: #fff4c2;
  --ok: #1f8a5b;
  --bad: #c23b3b;
  --info: #2e5fb8;
  --focus: #2e5fb8;
  --r-s: 6px;
  --r-m: 10px;
  --font-head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --nav-w: 220px;
  --act: #16233b;       /* botón principal y selección */
  --act-hover: #22324f;
  --act-text: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1626; --surface: #172138; --line: #2a3756; --text: #e7ecf5; --muted: #98a4bd;
    --note-soft: #4a4220; --focus: #8fb2ff; --info: #8fb2ff; color-scheme: dark;
    --act: #ffd23f; --act-hover: #ffe06e; --act-text: #2b2300;
  }
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
.acciones-cab { display: flex; gap: 10px; flex-wrap: wrap; }
body { background: var(--paper); color: var(--text); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Botones y campos ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 9px 16px; border-radius: var(--r-s); cursor: pointer; font-weight: 700; min-height: 42px; }
.btn:hover { border-color: var(--muted); }
.btn.primario { background: var(--act); color: var(--act-text); border-color: var(--act); }
.btn.primario:hover { background: var(--act-hover); border-color: var(--act-hover); }
.btn.peligro { color: var(--bad); }
.btn.chico { min-height: 34px; padding: 5px 12px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: wait; }
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label, .etiqueta { font-weight: 700; font-size: .92rem; }
.campo .ayuda { font-size: .85rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.fila { display: flex; gap: 12px; flex-wrap: wrap; }
.fila > * { flex: 1 1 160px; }

/* ── Acceso ── */
.acceso { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.acceso-marca { background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.acceso-marca h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; max-width: 9ch; }
.acceso-marca p { color: var(--ink-text); max-width: 34ch; font-size: 1.1rem; margin-top: 18px; }
.pila-notas { position: relative; height: 210px; margin-top: 40px; }
.pila-notas span { position: absolute; width: 150px; height: 130px; padding: 14px; font: 700 1rem/1.3 var(--font-head); color: #3a2f00; box-shadow: 0 10px 22px rgba(0,0,0,.28); }
.pila-notas span:nth-child(1) { background: var(--note); transform: rotate(-6deg); left: 0; top: 30px; }
.pila-notas span:nth-child(2) { background: #ffe68f; transform: rotate(4deg); left: 120px; top: 0; }
.pila-notas span:nth-child(3) { background: #ffc94d; transform: rotate(-2deg); left: 230px; top: 50px; }
.acceso-form { display: grid; place-items: center; padding: 32px 20px; }
.acceso-form form { width: min(400px, 100%); }
.acceso-form h2 { margin-bottom: 6px; }
.acceso-form .sub { color: var(--muted); margin-bottom: 24px; }
.cambiar { background: none; border: 0; color: var(--info); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.error-form { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); padding: 10px 12px; border-radius: var(--r-s); margin-bottom: 14px; font-weight: 700; }
@media (max-width: 820px) {
  .acceso { grid-template-columns: 1fr; }
  .acceso-marca { padding: 32px 20px 20px; }
  .acceso-marca h1 { font-size: 2.4rem; max-width: none; }
  .pila-notas { display: none; }
}

/* ── Estructura principal ── */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); height: 100%; }
.nav { background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; padding: 20px 12px; gap: 4px; }
.nav .marca { font: 800 1.25rem/1.1 var(--font-head); color: #fff; padding: 4px 10px 22px; display: flex; align-items: center; gap: 10px; }
.nav .marca i { width: 26px; height: 26px; background: var(--note); transform: rotate(-6deg); display: inline-block; flex: none; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: inherit; padding: 11px 12px; border-radius: var(--r-s); cursor: pointer; font-weight: 700; text-align: left; position: relative; }
.nav button:hover { background: var(--ink-2); color: #fff; }
.nav button[aria-current="page"] { background: var(--ink-2); color: #fff; box-shadow: inset 4px 0 0 var(--note); }
.nav svg { width: 22px; height: 22px; flex: none; }
.nav .insignia { margin-left: auto; background: var(--note); color: #2b2300; font-size: .75rem; border-radius: 999px; padding: 1px 8px; }
.nav .pie { margin-top: auto; padding: 12px; border-top: 1px solid var(--ink-2); font-size: .9rem; }
.nav .pie strong { color: #fff; display: block; }
.main { overflow: auto; height: 100%; display: flex; flex-direction: column; }
.vista { padding: 28px 32px 40px; width: 100%; max-width: 1180px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cabecera p { color: var(--muted); margin-top: 6px; }
.tabbar { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .nav { display: none; }
  .vista { padding: 18px 16px 24px; }
  h1 { font-size: 1.6rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar button { background: none; border: 0; color: var(--ink-text); padding: 8px 2px 9px; display: grid; justify-items: center; gap: 2px; font-size: .72rem; font-weight: 700; position: relative; }
  .tabbar button[aria-current="page"] { color: #fff; box-shadow: inset 0 3px 0 var(--note); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .insignia { position: absolute; top: 4px; right: 22%; background: var(--note); color: #2b2300; border-radius: 999px; font-size: .68rem; padding: 0 6px; }
}

/* ── Avatares ── */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; flex: none; position: relative; }
.avatar.en-linea::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #2fbf71; border: 2px solid var(--surface); }

/* ── Chat ── */
.chat { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); flex: 1; min-height: 420px; overflow: hidden; }
.canales { border-right: 1px solid var(--line); overflow: auto; padding: 10px; }
.canales h3 { font-size: .85rem; color: var(--muted); padding: 10px 8px 6px; }
.canal { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--r-s); cursor: pointer; text-align: left; }
.canal:hover { background: var(--paper); }
.canal[aria-current="true"] { background: var(--note-soft); }
.canal .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.canal .insignia { background: var(--act); color: var(--act-text); border-radius: 999px; font-size: .75rem; padding: 0 8px; }
.canal .gato { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--note); color: #2b2300; font-weight: 800; flex: none; }
.conversacion { display: flex; flex-direction: column; min-height: 0; }
.conv-cab { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.conv-cab .volver { display: none; }
.mensajes { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.dia-sep { align-self: center; font-size: .8rem; color: var(--muted); padding: 10px 0 6px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 4px 6px; border-radius: var(--r-s); }
.msg:hover { background: var(--paper); }
.msg .quien { font-weight: 700; }
.msg .hora { color: var(--muted); font-size: .8rem; margin-left: 6px; font-weight: 400; }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .txt a { color: var(--info); }
.msg.seguido { padding-top: 0; }
.msg.seguido .avatar { visibility: hidden; height: 0; }
.msg { position: relative; }
.msg .borrar { opacity: 0; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; font-size: .8rem; position: absolute; top: 4px; right: 6px; padding: 2px 8px; border-radius: var(--r-s); }
@media (hover: none) { .msg .borrar { opacity: .6; } }
.msg:hover .borrar, .msg .borrar:focus { opacity: 1; }
.vacio { color: var(--muted); text-align: center; margin: auto; max-width: 36ch; padding: 30px 10px; }
.escribiendo { font-size: .85rem; color: var(--muted); padding: 0 16px; min-height: 20px; }
.redactar { padding: 12px; border-top: 1px solid var(--line); }
.redactar-normal, .redactar-grabando { display: flex; gap: 10px; align-items: flex-end; }
.redactar-grabando { align-items: center; }
.btn-mic { padding: 0; width: 46px; min-height: 46px; flex: none; }
.btn-mic svg { width: 22px; height: 22px; }
.grab-estado { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 700; justify-content: center; }
.grab-punto { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: latir 1.2s ease-in-out infinite; }
.grab-reloj { font-variant-numeric: tabular-nums; color: var(--muted); }
@keyframes latir { 50% { opacity: .25; } }

/* Reproductor de notas de voz */
.voz { display: flex; align-items: center; gap: 10px; background: var(--note-soft); border-radius: 999px; padding: 6px 8px 6px 6px; max-width: 360px; margin-top: 2px; }
.voz-play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--act); color: var(--act-text); display: grid; place-items: center; cursor: pointer; flex: none; }
.voz-play svg { width: 18px; height: 18px; }
.voz-barra { --avance: 0%; flex: 1; min-width: 80px; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 3px; cursor: pointer;
  background: linear-gradient(to right, var(--text) var(--avance), color-mix(in srgb, var(--text) 22%, transparent) var(--avance)); }
.voz-barra::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.voz-barra::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.voz-tiempo { font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 34px; text-align: right; }
.voz-vel { border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); background: var(--surface); border-radius: 999px; font-weight: 700; font-size: .8rem; padding: 4px 9px; min-width: 46px; cursor: pointer; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .grab-punto { animation: none; } }
.redactar textarea { min-height: 46px; max-height: 160px; resize: none; }
@media (max-width: 820px) {
  .chat { grid-template-columns: 1fr; border-radius: var(--r-m); }
  .chat.abierto .canales { display: none; }
  .chat:not(.abierto) .conversacion { display: none; }
  .canales { border-right: 0; }
  .conv-cab .volver { display: inline-flex; }
}

/* ── Imprimir ── */
.imprimir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; }
.zona-archivo { border: 2px dashed var(--line); border-radius: var(--r-m); padding: 34px 16px; text-align: center; cursor: pointer; display: grid; gap: 8px; justify-items: center; margin-bottom: 16px; background: var(--paper); }
.zona-archivo.sobre { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 8%, var(--paper)); }
.zona-archivo svg { width: 40px; height: 40px; color: var(--muted); }
.zona-archivo .nombre-archivo { font-weight: 700; overflow-wrap: anywhere; }
.zona-archivo small { color: var(--muted); }
.barra { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.barra i { display: block; height: 100%; background: var(--act); width: 0; transition: width .2s; }
.trabajos { list-style: none; padding: 0; margin: 0; display: grid; }
.trabajos li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trabajos li:last-child { border-bottom: 0; }
.trabajos .arch { font-weight: 700; overflow-wrap: anywhere; }
.trabajos .meta { color: var(--muted); font-size: .85rem; }
.trabajos .err { grid-column: 1 / -1; color: var(--bad); font-size: .85rem; }
.estado { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; align-self: start; white-space: nowrap; }
.estado.en_cola { background: var(--note-soft); color: var(--text); }
.estado.imprimiendo { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); }
.estado.impresa, .estado.simulada { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.estado.error { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
@media (max-width: 820px) { .imprimir { grid-template-columns: 1fr; } }

/* ── Ideas: el tablero de notas adhesivas ── */
.herramientas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.segmentos { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.segmentos button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-weight: 700; min-height: 42px; }
.segmentos button[aria-pressed="true"] { background: var(--act); color: var(--act-text); }
.herramientas input[type=search] { flex: 1 1 200px; max-width: 320px; }
.tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px 22px; padding: 6px 4px 20px; }
.postit { --rot: 0deg; position: relative; min-height: 190px; padding: 22px 18px 14px; color: #2c2600; background: var(--c, var(--note)); transform: rotate(var(--rot)); box-shadow: 0 1px 1px rgba(40,30,0,.12), 0 12px 18px -10px rgba(40,30,0,.45); cursor: pointer; display: flex; flex-direction: column; gap: 8px; border: 0; text-align: left; font: inherit; transition: transform .15s ease; }
.postit:hover, .postit:focus-visible { transform: rotate(0deg) scale(1.02); z-index: 1; }
.postit::before { content: ''; position: absolute; top: -9px; left: 50%; width: 70px; height: 20px; margin-left: -35px; background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.08); transform: rotate(-2deg); }
.postit.fijada::before { width: 16px; height: 16px; margin-left: -8px; top: -6px; border-radius: 50%; background: #c23b3b; box-shadow: 0 2px 3px rgba(0,0,0,.35); }
.postit h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.postit .cuerpo { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.postit .pie-nota { margin-top: auto; font-size: .78rem; opacity: .75; display: flex; justify-content: space-between; gap: 8px; }
.postit .tipo { font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .postit { box-shadow: 0 12px 20px -10px rgba(0,0,0,.8); } }
.colores { display: flex; gap: 8px; flex-wrap: wrap; }
.colores button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.colores button[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--surface); }

/* ── Calendario ── */
.calendario { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.mes-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.mes-cab h2 { text-align: center; }
.mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); overflow: hidden; }
.mes .dsem { font-size: .8rem; color: var(--muted); font-weight: 700; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.dia { min-height: 92px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; border-top: 0; border-left: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dia:hover { background: var(--paper); }
.dia .num { font-weight: 700; font-size: .9rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.dia.otro { color: var(--muted); background: color-mix(in srgb, var(--paper) 60%, transparent); }
.dia.hoy .num { background: var(--act); color: var(--act-text); }
.dia[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--focus); }
.dia .ev { font-size: .75rem; background: var(--note-soft); border-left: 3px solid var(--note); padding: 1px 5px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia .mas { font-size: .72rem; color: var(--muted); }
.lista-eventos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-eventos li button { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--note); border-radius: var(--r-s); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.lista-eventos li button:hover { border-color: var(--muted); border-left-color: var(--note); }
.lista-eventos .cuando { color: var(--muted); font-size: .85rem; }
.lista-eventos .tit { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; background: var(--surface); font-size: .9rem; user-select: none; }
.chip:has(input:checked) { background: var(--act); color: var(--act-text); border-color: var(--act); }
.chip input { accent-color: var(--note); }
@media (max-width: 820px) {
  .calendario { grid-template-columns: 1fr; }
  .dia { min-height: 54px; padding: 4px; align-items: center; }
  .dia .ev { display: none; }
  .dia .mas { width: 6px; height: 6px; border-radius: 50%; background: var(--note); font-size: 0; }
}

/* ── Ajustes ── */
.ajustes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.ajustes h2 { margin-bottom: 14px; }
.enlace-publico { display: flex; gap: 8px; align-items: stretch; }
.enlace-publico code { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px; overflow-wrap: anywhere; font-size: .9rem; }
.codigo-inv { font: 800 1.6rem/1 var(--font-head); letter-spacing: .12em; background: var(--note); color: #2b2300; padding: 10px 14px; display: inline-block; transform: rotate(-1.5deg); }
.usuarios { list-style: none; padding: 0; margin: 0; }
.usuarios li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.usuarios li:last-child { border-bottom: 0; }
.usuarios .info { flex: 1; min-width: 140px; }
.usuarios .info small { color: var(--muted); display: block; overflow-wrap: anywhere; }
.aviso { padding: 12px 14px; border-radius: var(--r-s); background: var(--note-soft); margin-bottom: 14px; font-size: .95rem; }

/* ── Modal y avisos ── */
dialog { border: 0; border-radius: var(--r-m); padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10,18,34,.55); }
dialog form { padding: 22px; }
dialog .acciones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
dialog .acciones .izq { margin-right: auto; }
dialog h2 { margin-bottom: 16px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--act); color: var(--act-text); padding: 12px 16px; border-radius: var(--r-s); box-shadow: 0 10px 24px rgba(0,0,0,.3); font-weight: 700; }
.toast.error { background: var(--bad); }
@media (max-width: 820px) { #toasts { bottom: 84px; } }
.conexion { background: var(--bad); color: #fff; text-align: center; padding: 6px; font-size: .9rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .postit, .postit:hover { transform: none; } }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip input { accent-color: #2b2300; } }

/* ── Novedades en el menú ── */
.nav button.hay-nuevo:not([aria-current="page"]) { color: var(--note); }
.nav button.hay-nuevo:not([aria-current="page"]) svg { color: var(--note); }
.tabbar button.hay-nuevo:not([aria-current="page"]) { color: var(--note); }

/* ── Imprimir: varios archivos, programar, en espera ── */
.archivos-elegidos { list-style: none; margin: -4px 0 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); }
.archivos-elegidos li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.archivos-elegidos li:last-child { border-bottom: 0; }
.archivos-elegidos .nombre { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; font-size: .95rem; }
.archivos-elegidos small { color: var(--muted); white-space: nowrap; }
.archivos-elegidos .quitar { border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; }
.archivos-elegidos .quitar:hover { background: var(--paper); color: var(--bad); }
.segmentos-llenos { display: flex; }
.segmentos-llenos button { flex: 1; }
.programar { border-left: 4px solid var(--note); padding: 4px 0 2px 14px; margin-bottom: 14px; }
.col-trabajos { display: grid; gap: 20px; align-content: start; }
.tit-bloque { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.acciones-trabajo { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.nota-trabajo { grid-column: 1 / -1; font-size: .85rem; background: var(--note-soft); padding: 6px 10px; border-radius: var(--r-s); }
.estado.en_espera { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--text); }
.estado.programada { background: var(--note-soft); color: var(--text); }
.estado.cancelada { background: color-mix(in srgb, var(--muted) 12%, transparent); color: var(--muted); }

/* ── Sonido por chat ── */
.conv-cab .btn-sonido { margin-left: auto; gap: 6px; }
.btn-sonido svg { width: 18px; height: 18px; }
.btn-sonido.apagado { color: var(--muted); border-style: dashed; }
.canal .silenciado { color: var(--muted); display: inline-flex; }
.canal .silenciado svg { width: 16px; height: 16px; }
.canal .insignia.apagada { background: var(--muted); }
@media (max-width: 480px) { .btn-sonido .txt-sonido { display: none; } }

/* Aviso para activar notificaciones push */
.banner-push { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--r-s); background: var(--note-soft); border: 1px solid var(--line); }
.banner-push-txt { flex: 1 1 220px; font-size: .95rem; }
.banner-push-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--muted); }

.usuarios .info small.push-estado { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.usuarios .info small.push-estado.sin-push { color: #b5452f; font-weight: 600; }
.modal-push { padding: 22px; }
.modal-push h2 { margin-bottom: 10px; }
.modal-push p { margin: 0 0 8px; line-height: 1.45; }
