/* Solo estructura de PropAnalytix Socios y el acento de la marca. Medidas, colores y movimiento vienen del kit. */
:root { --ps-acento: #2A8A1E; --ps-sobre: #fff; --azul: var(--ps-acento); --mac-acento: var(--ps-acento); --mac-acento-sel-lateral: var(--ps-acento); --tinta-pestana: var(--ps-acento); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ps-acento: #6BF05A; --ps-sobre: #0b0b0b; --azul: var(--ps-acento); --mac-acento: var(--ps-acento); --mac-acento-sel-lateral: var(--ps-acento); --tinta-pestana: var(--ps-acento); } }
:root[data-theme="dark"] { --ps-acento: #6BF05A; --ps-sobre: #0b0b0b; --azul: var(--ps-acento); --mac-acento: var(--ps-acento); --mac-acento-sel-lateral: var(--ps-acento); --tinta-pestana: var(--ps-acento); }

[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body.ps-iphone { overflow: hidden; background: var(--fondo); }
body.ps-mac { overflow: hidden; background: var(--mac-fondo); }
.ak { --ps-sec: var(--subtitulo); --ps-rojo: var(--rojo); }
.mac { --ps-sec: var(--mac-texto-2); --ps-rojo: var(--mac-rojo); }
.ps-ico { display: block; overflow: visible; }
.ps-iphone *, .ps-mac * { text-decoration: none !important; }
a[x-apple-data-detectors] { color: inherit !important; font: inherit !important; pointer-events: none; }
.ps-secreto { -webkit-text-security: disc; }
.ps-escrito { white-space: pre-line; overflow-wrap: anywhere; }
.ps-enlace { color: var(--ps-acento); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.ps-seleccionable { -webkit-user-select: text; user-select: text; }

/* ---------- Entrar y elegir quién eres ---------- */
.ps-entrada { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: var(--fondo); }
.ps-mac .ps-entrada { background: var(--mac-fondo); }
.ps-entrada-caja { width: min(340px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; }
.ps-logo { display: block; width: 220px; height: auto; margin-bottom: 12px; }
.ps-entrada h1 { margin: 0; font-size: 1.3em; font-weight: 700; }
.ps-mac .ps-entrada h1 { font-size: 17px; color: var(--mac-texto); }
.ps-entrada p { margin: 0; color: var(--ps-sec); line-height: 1.35; }
.ps-iphone .ps-entrada p { font-size: calc(1em - 2px); }
.ps-mac .ps-entrada p { font-size: 13px; }
.ps-campo-caja { width: 100%; display: flex; align-items: center; box-sizing: border-box; border-radius: 14px; padding: 0 6px 0 16px; background: var(--tarjeta); }
.ps-mac .ps-campo-caja { border-radius: 8px; padding: 0 4px 0 10px; background: var(--mac-campo-fondo); box-shadow: 0 0 0 1px var(--mac-campo-borde); }
.ps-campo-caja input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: max(1em, 16px); -webkit-user-select: text; user-select: text; }
.ps-mac .ps-campo-caja input { height: 36px; font-size: 13px; color: var(--mac-texto); }
.ps-ojo { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ps-sec); }
.ps-mac .ps-ojo { width: 30px; height: 30px; cursor: default; }
.ps-error { min-height: 1.3em; color: var(--ps-rojo) !important; }
.ps-principal { width: 100%; height: 50px; border: 0; border-radius: 25px; background: var(--ps-acento); color: var(--ps-sobre); font: inherit; font-weight: 600; }
.ps-mac .ps-principal { height: 36px; border-radius: 18px; font-size: 13px; cursor: default; }
.ps-principal:disabled { opacity: .4; }
.ps-opciones { width: 100%; display: grid; gap: 8px; }
.ps-opcion { width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--tarjeta); color: inherit; font: inherit; font-weight: 600; }
.ps-mac .ps-opcion { height: 36px; border-radius: 8px; background: var(--mac-relleno-control); color: var(--mac-texto); font-size: 13px; cursor: default; }

/* ---------- Tareas: el círculo marca, como en Recordatorios ---------- */
.ps-iphone { --ps-punto: 24px; --ps-diana: 44px; }
.ps-mac { --ps-punto: 16px; --ps-diana: 24px; }
.ps-marca { flex: none; width: var(--ps-diana); height: var(--ps-diana); display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: default; }
.ps-punto { display: grid; place-items: center; width: var(--ps-punto); height: var(--ps-punto); box-sizing: border-box; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ps-sec); color: var(--ps-sobre); }
.ps-marca[aria-pressed="true"] .ps-punto { background: var(--ps-acento); box-shadow: none; }
.ps-tit { display: block; overflow-wrap: break-word; }
.ps-tarea.hecha .ps-tit { color: var(--ps-sec); }
.ps-pasada { color: var(--ps-rojo) !important; }
.ps-ahora { color: var(--ps-acento) !important; }
.ps-vacio { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--ps-sec); }
.ps-vacio strong { font-weight: 600; color: var(--texto, var(--mac-texto)); }
.ps-vacio p { margin: 0; }

/* ---------- Mini calendario ---------- */
.ps-mes-cab { display: flex; align-items: center; gap: 2px; }
.ps-mes-nombre { flex: 1; min-width: 0; font-weight: 600; }
.ps-mes-nombre::first-letter { text-transform: uppercase; }
.ps-flecha { flex: none; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ps-acento); cursor: default; font: inherit; }
.ps-semana, .ps-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ps-semana span { text-align: center; color: var(--ps-sec); font-weight: 600; }
.ps-dia { position: relative; display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; cursor: default; }
.ps-dia .num { display: grid; place-items: center; border-radius: 50%; }
.ps-dia.hoy .num { color: var(--ps-acento); font-weight: 700; }
.ps-dia[aria-pressed="true"] .num { background: var(--ps-acento); color: var(--ps-sobre); font-weight: 700; }
.ps-dia .puntos { position: absolute; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.ps-dia .puntos i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--ps-acento); }
.ps-dia .puntos i.tarea { background: var(--ps-sec); }

/* ---------- iPhone ---------- */
.ps-pantalla { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--fondo); padding: env(safe-area-inset-top, 0px) 0 120px; }
.ps-pantalla::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% + 1px); }   /* una página corta también rebota */
.ps-iphone .ps-sync { padding-top: 0; color: var(--ps-rojo); }
.ps-iphone .ps-sync:empty { display: none; }
.ps-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 20px 0; scrollbar-width: none; }
.ps-chips::-webkit-scrollbar { display: none; }
.ps-chip { flex: none; height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--tarjeta); color: inherit; font: inherit; font-size: calc(1em - 2px); white-space: nowrap; }
.ps-chip small { margin-left: 5px; font-size: 1em; color: var(--ps-sec); font-variant-numeric: tabular-nums; }
.ps-chip[aria-pressed="true"] { background: var(--ps-acento); color: var(--ps-sobre); font-weight: 600; }
.ps-chip[aria-pressed="true"] small { color: inherit; }
.ps-iphone .ps-tarea { padding-left: 8px; gap: 6px; --sep-x: 58px; }
.ps-iphone .ps-reunion { --sep-x: calc(20px + 3.2em); }
.ps-iphone .ps-hora { flex: none; width: 2.7em; font-variant-numeric: tabular-nums; font-weight: 600; }
.ps-iphone .ps-tarea .texto { padding: 11px 0; }
.ps-iphone .ps-reunion .texto { padding: 11px 0; }
.ps-iphone .ps-accion { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.ps-iphone .ps-accion.rojo { color: var(--rojo); }
.ps-iphone .ps-anadir { color: var(--ps-acento); }
.ps-iphone .ps-anadir .texto { padding: 13px 0; }
.ps-iphone .ps-vacio { padding: 72px 40px 0; }
.ps-iphone .ps-dia-vacio { padding: 16px 20px; color: var(--ps-sec); }
.ps-iphone .ps-cal { margin-top: 12px; padding: 10px 10px 8px; }
.ps-iphone .ps-mes-cab { padding: 0 0 6px 10px; }
.ps-iphone .ps-flecha { width: 44px; height: 44px; }
.ps-iphone .ps-hoy-b { width: auto; padding: 0 8px; }
.ps-iphone .ps-semana span { font-size: 13px; padding-bottom: 4px; }
.ps-iphone .ps-dia { height: 46px; }
.ps-iphone .ps-dia .num { width: 36px; height: 36px; font-size: 17px; }
.ps-iphone .ps-dia .puntos { bottom: 0; }
.ps-iphone .ps-nota { display: block; width: 100%; box-sizing: border-box; padding: 12px 20px; }
.ps-iphone .ps-nota .subtitulo { margin-top: 4px; }
.ps-iphone .ps-valor-t { color: var(--ps-sec); text-align: right; }
.ps-iphone .ps-det-fila .texto { padding: 13px 0; }
.ps-iphone .ps-det-fila .dato { flex: 1; min-width: 0; padding: 13px 0; text-align: right; color: var(--ps-sec); }

/* Hojas */
.ps-iphone .ak-hoja { height: calc(100% - max(47px, env(safe-area-inset-top, 0px) + 10px)); }
.ps-iphone .ak-hoja.ps-baja { height: auto; }
.ps-iphone .ps-hoja-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; touch-action: none; }
.ps-iphone .ps-hoja-cab strong { font-weight: 600; }
.ps-iphone .lg-boton:disabled { color: var(--texto-3); }
.ps-iphone .ps-campo { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: max(1em, 16px); padding: 16px 0; -webkit-user-select: text; user-select: text; }
.ps-iphone .ps-area { display: block; resize: none; padding: 12px 0; line-height: 1.3; }
.ps-iphone .ak-hoja > .ak-grupo { background: var(--relleno-campo); }
.ps-iphone .ak-hoja > .ak-grupo + .ak-grupo, .ps-iphone .ak-hoja > .ps-pie + .ak-grupo { margin-top: 20px; }
/* Confirmar va sobre otra hoja: su velo tiene que oscurecerla también */
.ps-iphone #velo-b { z-index: 70; }
.ps-iphone #hoja-b { z-index: 71; }
.ps-iphone .ps-pie { padding: 12px 20px 0; font-size: calc(1em - 4px); color: var(--ps-sec); }
.ps-iphone .ps-pie:empty { display: none; }
.ps-limite { font-variant-numeric: tabular-nums; }
.ps-limite.ps-pasa { color: var(--ps-rojo) !important; }
/* El valor se escribe en español y 24 h; encima va el control nativo, invisible, que abre el selector de iOS */
.ps-iphone .ps-valor { position: relative; flex: none; display: block; min-height: 44px; min-width: 7em; text-align: right; line-height: 44px; color: var(--ps-acento); }
.ps-iphone .ps-valor input, .ps-iphone .ps-valor select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; font-size: 16px; -webkit-appearance: none; appearance: none; }
.ps-iphone .ps-valor input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-iphone .ps-confirma { padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.ps-iphone .ps-confirma h2 { margin: 0 20px 6px; font-size: 1em; font-weight: 600; }
.ps-iphone .ps-confirma p { margin: 0 20px 20px; font-size: calc(1em - 4px); color: var(--texto-2); }
.ps-iphone .ps-confirma .ak-grupo { background: var(--relleno-campo); }

/* ---------- Mac ---------- */
.ps-mac .mac-contenido > .scroll { padding-top: calc(var(--mac-barra-alto) + 8px); padding-bottom: 24px; }
.ps-mac .mac-contenido > .scroll.ps-partida { padding: 0; overflow: hidden; }
.ps-mac .mac-lateral .mac-fila[aria-selected="true"], .ps-mac .mac-lateral .mac-fila[aria-selected="true"] .ico, .ps-mac .mac-lateral .mac-fila[aria-selected="true"] .cuenta { color: var(--ps-sobre); }
.ps-mac .mac-boton.primario, .ps-mac .mac-seg button[aria-pressed="true"] { color: var(--ps-sobre); }
.ps-mac .ps-pagina { padding: 0 24px; color: var(--mac-texto); font-size: 13px; }
.ps-mac .ps-seccion { padding: 16px 0 6px; font-size: 11px; font-weight: 700; color: var(--mac-texto-2); }
.ps-mac .ps-seccion:first-child { padding-top: 4px; }
.ps-mac .ps-tarea { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 5px 8px 5px 4px; box-sizing: border-box; border-bottom: 1px solid var(--mac-separador); }
.ps-mac .ps-tarea .texto { flex: 1; min-width: 0; }
.ps-mac .ps-tarea .subtitulo { display: block; font-size: 11px; color: var(--mac-texto-2); }
.ps-mac .ps-fecha-col { flex: none; width: 104px; text-align: right; color: var(--mac-texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-mac .ps-para-col { flex: none; width: 110px; color: var(--mac-texto-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-mac .ps-mostrar { display: flex; align-items: center; height: 32px; padding: 0 4px; border: 0; background: none; color: var(--ps-acento); font: inherit; cursor: default; }
.ps-mac .ps-vacio { padding-top: 120px; }

/* Reuniones: calendario y lista a la izquierda, la reunión elegida a la derecha */
.ps-mac .ps-dos { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100%; color: var(--mac-texto); font-size: 13px; }
.ps-mac .ps-col { position: relative; overflow-y: auto; padding: calc(var(--mac-barra-alto) + 8px) 20px 24px; min-width: 0; }
.ps-mac .ps-col::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: calc(100% + 1px); pointer-events: none; }
.ps-mac .ps-col + .ps-col { border-left: 1px solid var(--mac-separador); padding-left: 28px; padding-right: 28px; }
.ps-mac .ps-mes-cab { height: 28px; margin-bottom: 4px; }
.ps-mac .ps-flecha { width: 24px; height: 24px; border-radius: var(--mac-r-control); }
.ps-mac .ps-hoy-b { width: auto; padding: 0 6px; font-size: 12px; }
.ps-mac .ps-semana span { padding-bottom: 2px; font-size: 11px; }
.ps-mac .ps-dia { height: 36px; }
.ps-mac .ps-dia .num { width: 28px; height: 28px; }
.ps-mac .ps-dia .puntos { bottom: 0; }
.ps-mac .ps-dia .puntos i { width: 4px; height: 4px; }
.ps-mac .ps-reunion { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: default; }
.ps-mac .ps-reunion[aria-selected="true"] { background: var(--ps-acento); color: var(--ps-sobre); }
.ps-mac .ps-reunion[aria-selected="true"] .subtitulo { color: inherit; opacity: .75; }
.ps-mac .ps-reunion .texto { flex: 1; min-width: 0; }
.ps-mac .ps-reunion .subtitulo { display: block; font-size: 11px; color: var(--mac-texto-2); }
.ps-mac .ps-hora { flex: none; width: 36px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ps-mac .ps-dia-vacio { padding: 4px 8px; color: var(--mac-texto-2); }
.ps-mac .ps-det-cab { display: flex; align-items: flex-start; gap: 12px; }
.ps-mac .ps-det-cab h2 { flex: 1; min-width: 0; margin: 0; font-size: 20px; line-height: 25px; font-weight: 700; overflow-wrap: anywhere; }
.ps-mac .ps-det-meta { margin: 4px 0 20px; color: var(--mac-texto-2); }
.ps-mac .ps-nueva-nota { display: grid; gap: 8px; justify-items: end; }
.ps-mac .ps-nueva-nota textarea { width: 100%; box-sizing: border-box; height: auto; padding: 6px 8px; resize: none; font: inherit; line-height: 17px; -webkit-user-select: text; user-select: text; }
.ps-mac .ps-nota { padding: 10px 0; border-bottom: 1px solid var(--mac-separador); }
.ps-mac .ps-nota-pie { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; color: var(--mac-texto-2); }
.ps-mac .ps-boton-ico { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--mac-r-control); background: none; color: var(--mac-texto-2); cursor: default; }
.ps-mac .ps-boton-ico:active { background: var(--mac-relleno-control); }

/* Formularios y ajustes */
.ps-mac .ps-form { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; color: var(--mac-texto); font-size: 13px; }
.ps-mac .ps-form > label, .ps-mac .ps-form > .ps-rotulo { text-align: right; }
.ps-mac .ps-form .mac-campo { width: 100%; box-sizing: border-box; }
.ps-mac .ps-form .mac-popup { width: 100%; }
.ps-mac .ps-form .mac-popup select { width: 100%; }
.ps-mac .ps-area { height: auto; padding: 4px 7px; resize: none; font: inherit; line-height: 16px; display: block; }
.ps-mac .ps-izquierda { margin-right: auto; }
.ps-mac .ps-pie { margin: 12px 0 0; font-size: 11px; color: var(--mac-texto-2); }
.ps-mac .ps-pie:empty { display: none; }
.ps-mac .ps-nueva-nota .ps-limite { margin: 0; }
.ps-mac .ps-form .ps-limite { grid-column: 2; margin: -6px 0 0; }
.ps-mac .ps-ajuste { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 4px 4px; border-bottom: 1px solid var(--mac-separador); max-width: 520px; }
.ps-mac .ps-ajuste .texto { flex: 1; min-width: 0; }
.ps-mac .ps-bloque { margin-top: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ps-iphone .ak-hoja > .ak-grupo { background: #2c2c2e; } }
:root[data-theme="dark"] .ps-iphone .ak-hoja > .ak-grupo { background: #2c2c2e; }

/* ---------- Contraseñas: la misma pieza que Llavero ---------- */
.ps-cifrado { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.ps-llave { color: var(--ps-acento); }
.ps-bloqueo-caja h2 { margin: 0; font-weight: 700; font-size: 1.2em; }
.ps-iphone .ps-bloqueo-caja { margin: 32px auto 0; padding: 0 20px; box-sizing: border-box; width: min(380px, 100%); }
.ps-iphone .ps-bloqueo-caja p { font-size: calc(1em - 2px); color: var(--ps-sec); margin: 0; line-height: 1.35; }
.ps-mac .ps-bloqueo-mac { display: grid; place-items: center; padding-top: 80px; }
.ps-mac .ps-bloqueo-caja h2 { font-size: 17px; }
.ps-mac .ps-bloqueo-caja p { font-size: 13px; color: var(--mac-texto-2); margin: 0; line-height: 1.35; }
.ps-etapa { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: default; }
.ps-etapa .ps-ico { flex: none; opacity: .7; }
.ps-iphone .ps-entrada-clave:first-child .ps-etapa { padding-top: 16px; }
.ps-iphone .ps-fila-boton { padding-right: 8px; gap: 4px; }
.ps-iphone .ps-fila-boton .texto { padding: 11px 0; }
.ps-iphone .ps-dato { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-iphone .ps-dato.ps-escrito { white-space: pre-line; overflow-wrap: anywhere; text-overflow: clip; }
.ps-iphone .ps-boton { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ps-acento); }
.ps-iphone .ps-boton.gris { color: var(--texto-2); }
.ps-iphone .ps-etiqueta { flex: none; width: 6.2em; }
.ps-iphone .ps-bloquear { margin-top: 34px; }
.ps-mac .ps-tabla { width: 100%; }
.ps-mac .ps-tabla td { height: 36px; padding: 0 8px; border-bottom: 1px solid var(--mac-separador); }
.ps-mac .ps-tabla th:first-child { width: 28%; }
.ps-mac .ps-tabla th:nth-child(2) { width: 34%; }
.ps-mac .ps-celda { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ps-mac .ps-dato { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ps-mac .ps-web { font-weight: 600; max-width: 0; }
.ps-mac .ps-tabla tr:has(+ .ps-fila-notas) td { border-bottom: 0; }
.ps-mac .ps-fila-notas td { height: auto; padding-bottom: 8px; color: var(--mac-texto-2); }
.ps-mac .ps-con-ojo { display: flex; align-items: center; gap: 4px; min-width: 0; }

/* Ideas (15 nov): la fila es la de una nota, con el texto recortado a dos líneas */
.ps-iphone .ps-idea .ps-idea-notas { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; color: var(--ps-sec); white-space: pre-line; overflow-wrap: anywhere; }
.ps-iphone .ps-idea .subtitulo { display: block; }
.ps-mac .ps-idea { padding-left: 12px; cursor: default; }
