/*
 * Historias clínicas — estilos mobile-first del profesional.
 * Sigue Patron-carga-mobile.md: un solo color de acción, tarjetas blancas sobre gris claro,
 * botones de 44–52 px, inputs de 16 px (iOS no hace zoom), pie fijo con safe-area.
 * Sin framework: lo usan base_app.html.twig y base_carga.html.twig (no app.css ni Metronic).
 */

:root {
    --hc-accion: #2a8c7b;
    --hc-accion-oscuro: #1f6f61;
    --hc-accion-suave: #eaf7f3;
    --hc-fondo: #f3f5f6;
    --hc-tarjeta: #ffffff;
    --hc-texto: #1d2a2f;
    --hc-texto-suave: #5f6f76;
    --hc-borde: #e3e8ea;
    --hc-peligro: #c0392b;
    --hc-peligro-suave: #fdecea;
    --hc-aviso: #b26a00;
    --hc-aviso-suave: #fff4e0;
    --hc-info-suave: #eef3fb;
    --hc-sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --hc-radio: 14px;
    --hc-ancho: 760px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --hc-accion: #3fb39e;
        --hc-accion-oscuro: #7fd8c6;
        --hc-accion-suave: #15312c;
        --hc-fondo: #0f1517;
        --hc-tarjeta: #182124;
        --hc-texto: #e6eef0;
        --hc-texto-suave: #9aabb1;
        --hc-borde: #2a373b;
        --hc-peligro: #ff7b6b;
        --hc-peligro-suave: #3a1d1a;
        --hc-aviso: #ffb547;
        --hc-aviso-suave: #352712;
        --hc-info-suave: #18243a;
        --hc-sombra: 0 1px 2px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--hc-fondo);
    color: var(--hc-texto);
    font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--hc-accion-oscuro); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

[hidden] { display: none !important; }

.hc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell de la app ---------- */

.hc-top {
    position: sticky; top: 0; z-index: 20;
    background: var(--hc-tarjeta);
    border-bottom: 1px solid var(--hc-borde);
}
.hc-top__in {
    max-width: var(--hc-ancho); margin: 0 auto; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px; min-height: 56px;
}
.hc-marca { font-weight: 700; text-decoration: none; color: var(--hc-texto); display: flex; align-items: center; gap: 8px; }
.hc-marca i { font-style: normal; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--hc-accion); color: #fff; }
.hc-top__quien { margin-left: auto; text-align: right; font-size: .85rem; color: var(--hc-texto-suave); line-height: 1.2; }
.hc-top__quien b { display: block; color: var(--hc-texto); font-size: .9rem; }
.hc-salir { flex: none; }
.hc-top__in > .hc-salir:nth-child(2) { margin-left: auto; } /* sin perfil profesional: igual a la derecha */

.hc-main {
    max-width: var(--hc-ancho); margin: 0 auto;
    padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
}

.hc-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--hc-tarjeta); border-top: 1px solid var(--hc-borde);
    padding-bottom: env(safe-area-inset-bottom);
}
.hc-tabs__in { max-width: var(--hc-ancho); margin: 0 auto; display: flex; }
.hc-tabs a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px; min-height: 56px; justify-content: center;
    color: var(--hc-texto-suave); text-decoration: none; font-size: .78rem; font-weight: 600;
}
.hc-tabs a span { font-size: 1.25rem; line-height: 1; }
.hc-tabs a[aria-current="page"] { color: var(--hc-accion); }

@media (min-width: 900px) {
    /* En la PC la barra de abajo pasa arriba, dentro del encabezado */
    .hc-tabs { position: sticky; top: 56px; bottom: auto; border-top: 0; border-bottom: 1px solid var(--hc-borde); }
    .hc-tabs a { flex-direction: row; min-height: 44px; font-size: .9rem; gap: 6px; }
    .hc-tabs a span { font-size: 1rem; }
    .hc-main { padding-bottom: 48px; }
}

/* ---------- Componentes base ---------- */

.hc-card {
    background: var(--hc-tarjeta); border-radius: var(--hc-radio);
    box-shadow: var(--hc-sombra); padding: 16px; margin-bottom: 12px;
}
.hc-card > :last-child { margin-bottom: 0; }

.hc-fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hc-fila--entre { justify-content: space-between; }
.hc-suave { color: var(--hc-texto-suave); }
.hc-chico { font-size: .85rem; }

.hc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 48px; padding: 0 18px; border-radius: 12px;
    border: 2px solid var(--hc-borde); background: var(--hc-tarjeta); color: var(--hc-texto);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hc-btn:focus-visible, .hc-input:focus-visible { outline: 2px solid var(--hc-accion); outline-offset: 2px; }
.hc-btn--primario { background: var(--hc-accion); border-color: var(--hc-accion); color: #fff; }
.hc-btn--peligro { color: var(--hc-peligro); border-color: transparent; background: transparent; }
.hc-btn--chico { min-height: 38px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.hc-btn--bloque { width: 100%; }
.hc-btn--punteado { border-style: dashed; color: var(--hc-texto-suave); }
.hc-btn[disabled] { opacity: .55; cursor: progress; }
.hc-txt-pc { display: none; }
@media (min-width: 600px) { .hc-txt-pc { display: inline; } .hc-txt-movil { display: none; } }

.hc-label { display: block; font-weight: 600; margin-bottom: 6px; }
.hc-input, .hc-select, .hc-textarea {
    width: 100%; min-height: 48px; padding: 10px 14px;
    border: 2px solid var(--hc-borde); border-radius: 12px;
    background: var(--hc-tarjeta); color: var(--hc-texto);
    font: inherit; font-size: 16px;
}
.hc-textarea { min-height: 96px; resize: vertical; }
.hc-input:focus, .hc-select:focus, .hc-textarea:focus { border-color: var(--hc-accion); outline: none; }
.hc-campo-form { margin-bottom: 14px; }
.hc-ayuda { font-size: .85rem; color: var(--hc-texto-suave); margin-top: 4px; }

.hc-flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 600; }
.hc-flash--success { background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); }
.hc-flash--error, .hc-error { background: var(--hc-peligro-suave); color: var(--hc-peligro); }
.hc-error { padding: 12px 14px; border-radius: 12px; margin: 0 0 12px; font-weight: 600; }

.hc-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600;
    background: var(--hc-fondo); color: var(--hc-texto-suave);
}
.hc-chip--alerta { background: var(--hc-peligro-suave); color: var(--hc-peligro); }
.hc-chip--accion { background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); }
.hc-chip--aviso { background: var(--hc-aviso-suave); color: var(--hc-aviso); }

.hc-aviso-caja { background: var(--hc-info-suave); border-radius: var(--hc-radio); padding: 14px 16px; margin-bottom: 12px; }
.hc-aviso-caja p { margin: 0 0 10px; }

/* ---------- Opciones como botones (radio / checkbox) ---------- */

.hc-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-opcion { position: relative; }
.hc-opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hc-opcion span {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    border-radius: 999px; border: 2px solid var(--hc-borde); background: var(--hc-tarjeta);
    font-weight: 600; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.hc-opcion input:checked + span { border-color: var(--hc-accion); background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); }
.hc-opcion input:focus-visible + span { outline: 2px solid var(--hc-accion); outline-offset: 2px; }

/* Segmento: opciones excluyentes en una barra */
.hc-segmento { display: flex; border: 2px solid var(--hc-borde); border-radius: 12px; overflow: hidden; background: var(--hc-tarjeta); }
.hc-segmento .hc-opcion { flex: 1; }
.hc-segmento .hc-opcion span { width: 100%; justify-content: center; border: 0; border-radius: 0; min-height: 46px; }
.hc-segmento .hc-opcion + .hc-opcion span { border-left: 2px solid var(--hc-borde); }

/* Escala 0–10 */
.hc-diez { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hc-diez .hc-opcion span { width: 100%; justify-content: center; min-height: 52px; border-radius: 12px; font-size: 1.1rem; padding: 0; }
@media (min-width: 600px) { .hc-diez { grid-template-columns: repeat(11, 1fr); } }

/* ---------- Pantalla de carga por pasos ---------- */

.hc-carga-top {
    position: sticky; top: 0; z-index: 20;
    background: var(--hc-tarjeta); border-bottom: 1px solid var(--hc-borde);
}
.hc-carga-top__in { max-width: var(--hc-ancho); margin: 0 auto; padding: 8px 16px 10px; }
.hc-carga-cab { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.hc-cerrar {
    display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -10px;
    border-radius: 12px; text-decoration: none; color: var(--hc-texto); font-size: 1.4rem;
}
.hc-carga-cab b { display: block; }
.hc-carga-cab small { color: var(--hc-texto-suave); }
.hc-carga-alertas { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }

.hc-pasos-nav { display: flex; gap: 6px; margin-top: 6px; }
.hc-pasos-nav button {
    flex: 1; border: 0; background: none; padding: 6px 0 2px; cursor: pointer;
    font: inherit; font-size: .78rem; font-weight: 600; color: var(--hc-texto-suave); text-align: left;
}
.hc-pasos-nav button::before {
    content: ""; display: block; height: 5px; border-radius: 3px; background: var(--hc-borde); margin-bottom: 4px;
}
.hc-pasos-nav button.hecho::before { background: var(--hc-accion); }
.hc-pasos-nav button.actual { color: var(--hc-texto); }

.hc-carga { max-width: var(--hc-ancho); margin: 0 auto; padding: 16px 16px calc(120px + env(safe-area-inset-bottom)); }
.hc-paso { display: none; }
.hc-paso.actual { display: block; }
.hc-paso > h2 { font-size: 1.3rem; margin: 4px 0 14px; }

.hc-pie {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--hc-tarjeta); border-top: 1px solid var(--hc-borde);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.hc-pie__in { max-width: var(--hc-ancho); margin: 0 auto; display: flex; gap: 10px; }
.hc-pie .hc-btn { min-height: 52px; }
.hc-pie .hc-btn--primario { flex: 1; }

/* Un campo de la carga */
.hc-campo { background: var(--hc-tarjeta); border-radius: var(--hc-radio); box-shadow: var(--hc-sombra); padding: 14px 16px; margin-bottom: 12px; }
.hc-preg { font-weight: 700; margin-bottom: 2px; }
.hc-ant { font-size: .85rem; color: var(--hc-texto-suave); margin-bottom: 10px; }
.hc-ant b { color: var(--hc-texto); }
.hc-campo .hc-opciones, .hc-campo .hc-segmento, .hc-campo .hc-diez, .hc-campo .hc-input, .hc-campo .hc-textarea { margin-top: 8px; }
.hc-con-unidad { position: relative; }
.hc-con-unidad .hc-input { padding-right: 64px; }
.hc-con-unidad em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--hc-texto-suave); pointer-events: none; }
.hc-campo .hc-con-unidad { margin-top: 8px; }
.hc-campo .hc-con-unidad .hc-input { margin-top: 0; }
.hc-fuera { display: block; margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--hc-aviso); }
.hc-calc { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); font-weight: 600; }

/* Grilla compacta para signos vitales */
.hc-grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.hc-grilla .hc-campo { box-shadow: none; padding: 0; margin-bottom: 14px; background: none; }
.hc-grilla .hc-preg { font-size: .9rem; }
.hc-grilla .hc-ant { margin-bottom: 0; font-size: .8rem; }
@media (min-width: 600px) { .hc-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Medición bilateral + simetría */
.hc-lados { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.hc-lado { font-size: .85rem; font-weight: 600; color: var(--hc-texto-suave); }
.hc-lado .hc-input { margin-top: 4px; font-size: 1.1rem; font-weight: 600; }
.hc-lado.afectado { color: var(--hc-aviso); }
.hc-lado.afectado .hc-input { border-color: var(--hc-aviso); }
.hc-sim { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .85rem; font-weight: 700; }
.hc-sim__barra { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--hc-borde); overflow: hidden; }
.hc-sim__barra i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--hc-aviso); transition: width .2s; }
.hc-sim__barra i.ok { background: var(--hc-accion); }
.hc-sim__barra em { position: absolute; left: 90%; top: -2px; bottom: -2px; width: 2px; background: var(--hc-texto-suave); }

/* "+ Otro dato…" */
.hc-agregar { border-style: dashed; color: var(--hc-texto-suave); }

/* Sugerencias de texto */
.hc-sugerir { position: relative; }
.hc-sugerencias {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none;
    background: var(--hc-tarjeta); border: 1px solid var(--hc-borde); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 260px; overflow: auto;
}
.hc-sugerencias li { padding: 12px; border-radius: 8px; cursor: pointer; }
.hc-sugerencias li[aria-selected="true"], .hc-sugerencias li:hover { background: var(--hc-accion-suave); }

/* Adjuntos elegidos */
.hc-archivos { list-style: none; padding: 0; margin: 8px 0 0; font-size: .9rem; }
.hc-archivos li { padding: 6px 0; border-bottom: 1px solid var(--hc-borde); }

/* ---------- Inicio / listas ---------- */

.hc-buscar { position: relative; margin-bottom: 12px; }
.hc-buscar .hc-input { padding-left: 44px; min-height: 52px; font-size: 17px; }
.hc-buscar::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; opacity: .6; }

.hc-lista { list-style: none; margin: 0; padding: 0; background: var(--hc-tarjeta); border-radius: var(--hc-radio); box-shadow: var(--hc-sombra); overflow: hidden; }
.hc-lista li + li { border-top: 1px solid var(--hc-borde); }
.hc-lista a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; color: inherit; text-decoration: none; }
.hc-lista a:active { background: var(--hc-fondo); }
.hc-avatar {
    flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); font-weight: 700; font-size: .9rem;
}
.hc-lista b { display: block; }
.hc-lista small { color: var(--hc-texto-suave); }
.hc-lista .hc-flecha { margin-left: auto; color: var(--hc-texto-suave); }
.hc-vacio { text-align: center; color: var(--hc-texto-suave); padding: 24px 8px; }

/* ---------- Ficha ---------- */

.hc-ficha-cab { display: flex; gap: 14px; align-items: center; }
.hc-ficha-cab .hc-avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.hc-ficha-cab h1 { margin: 0; font-size: 1.3rem; }
.hc-datos { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--hc-texto-suave); margin-top: 2px; }
.hc-acciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.hc-bloque-dato { margin-top: 12px; font-size: .92rem; }
.hc-bloque-dato span { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--hc-texto-suave); }

.hc-filtros { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; }
.hc-filtros button { flex: none; }
.hc-filtros button[aria-pressed="true"] { border-color: var(--hc-accion); background: var(--hc-accion-suave); color: var(--hc-accion-oscuro); }

.hc-consulta { display: block; color: inherit; text-decoration: none; }
.hc-consulta__cab { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hc-consulta__cab b { font-size: 1rem; }
.hc-consulta__meta { font-size: .85rem; color: var(--hc-texto-suave); }
.hc-consulta__dx { margin: 8px 0 4px; font-weight: 600; }
.hc-valores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hc-ajena { border-left: 4px solid var(--hc-texto-suave); }

.hc-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hc-tabla th { text-align: left; font-weight: 600; color: var(--hc-texto-suave); padding: 8px 12px 8px 0; vertical-align: top; width: 45%; }
.hc-tabla td { padding: 8px 0; vertical-align: top; }
.hc-tabla tr + tr th, .hc-tabla tr + tr td { border-top: 1px solid var(--hc-borde); }

.hc-adenda { border-left: 4px solid var(--hc-aviso); padding: 8px 12px; margin: 8px 0; background: var(--hc-aviso-suave); border-radius: 0 10px 10px 0; }

.hc-adjuntos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.hc-adjuntos a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--hc-fondo); text-decoration: none; color: inherit; }
.hc-adjuntos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-adjuntos span { display: grid; place-items: center; height: 100%; padding: 6px; text-align: center; font-size: .75rem; word-break: break-word; }

/* ---------- Mis campos ---------- */

.hc-switch { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.hc-switch + .hc-switch { border-top: 1px solid var(--hc-borde); }
.hc-switch input { appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--hc-borde); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.hc-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.hc-switch input:checked { background: var(--hc-accion); }
.hc-switch input:checked::after { transform: translateX(18px); }
.hc-switch input:focus-visible { outline: 2px solid var(--hc-accion); outline-offset: 2px; }
.hc-switch__txt { flex: 1; min-width: 0; }
.hc-switch__txt small { display: block; color: var(--hc-texto-suave); }

details.hc-card summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }

/* ---------- Páginas sueltas (login, acceso del paciente) ---------- */

.hc-suelta { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.hc-suelta .hc-card { width: 100%; max-width: 420px; padding: 24px; }
.hc-suelta h1 { text-align: center; }

/* ---------- Visor de fotos y estudios (modal) ---------- */

.hc-visor {
    width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden;
}
.hc-visor::backdrop { background: rgba(0, 0, 0, .9); }
.hc-visor[open] { display: flex; flex-direction: column; }
.hc-visor__barra {
    display: flex; align-items: center; gap: 8px; flex: none;
    padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; background: rgba(0, 0, 0, .6);
}
.hc-visor__nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.hc-visor__cuenta { color: #bbb; font-size: .85rem; }
.hc-visor__btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255, 255, 255, .12); color: #fff; border: 0; font-size: 1.2rem; text-decoration: none; cursor: pointer;
}
.hc-visor__cuerpo { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); touch-action: pan-y pinch-zoom; }
.hc-visor__cuerpo img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.hc-visor__cuerpo iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 8px; }
.hc-visor__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 64px; border: 0; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1;
}
.hc-visor__nav--ant { left: 8px; }
.hc-visor__nav--sig { right: 8px; }
.hc-visor__nav[hidden] { display: none; }
.hc-visor__pdf { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 320px; }
.hc-visor__pdf span { font-size: 3.5rem; }
.hc-visor__pdf .hc-btn { width: 100%; }

/* ---------- Lugares de atención (Mi cuenta) ---------- */

.hc-lugar { padding: 12px 0; border-bottom: 1px solid var(--hc-borde); }
.hc-lugar:first-of-type { border-top: 1px solid var(--hc-borde); }
.hc-lugar__nombre { font-weight: 700; }
.hc-lugar__acciones { margin-top: 8px; gap: 6px; }
.hc-lugar__editar summary { cursor: pointer; margin-top: 8px; font-size: .9rem; font-weight: 600; color: var(--hc-accion-oscuro); }
.hc-lugar__nuevo { margin-top: 14px; }
.hc-lugar__nuevo summary { list-style: none; }
.hc-lugar__nuevo summary::-webkit-details-marker { display: none; }
.hc-lugar__nuevo[open] summary { display: none; }

/* ---------- Portada + login (usuario/login.html.twig) ---------- */

.hc-portada { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; background: #071a1f; color: #e9f5f2; }
.hc-portada__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-portada__velo {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(4, 16, 19, .92) 0%, rgba(4, 16, 19, .72) 48%, rgba(4, 16, 19, .35) 100%);
}
.hc-portada__in {
    position: relative; max-width: 1180px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
    display: grid; gap: 22px; align-content: center;
    grid-template-areas: "hero" "login" "puntos";
}
.hc-portada__hero { grid-area: hero; }
.hc-portada__login { grid-area: login; }
.hc-portada__puntos { grid-area: puntos; }

.hc-marca--clara { color: #fff; font-size: 1.1rem; margin-bottom: 26px; }
.hc-portada__ceja {
    display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
    background: rgba(63, 179, 158, .18); border: 1px solid rgba(127, 216, 198, .35);
    color: #9ff0de; font-size: .82rem; font-weight: 600; letter-spacing: .02em;
}
.hc-portada h1 { font-size: clamp(1.9rem, 6.5vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; color: #fff; }
.hc-portada h1 em { font-style: normal; color: #7fe3cd; }
.hc-portada__bajada { margin: 0; max-width: 36em; font-size: 1.05rem; color: #c3d8d4; }

.hc-portada__puntos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hc-portada__puntos li {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px;
    border-radius: var(--hc-radio); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09);
    font-size: .92rem; color: #b6ccc8; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hc-portada__puntos li > span { font-size: 1.3rem; line-height: 1; }
.hc-portada__puntos b { display: block; color: #fff; margin-bottom: 2px; font-size: .98rem; }

.hc-portada__login { color: var(--hc-texto); width: 100%; max-width: 440px; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); border: 0; }
.hc-portada__login h2 { font-size: 1.25rem; margin-bottom: 16px; }

@media (min-width: 960px) {
    .hc-portada__in {
        grid-template-columns: minmax(0, 1fr) 400px; column-gap: 56px; row-gap: 32px;
        grid-template-areas: "hero login" "puntos login";
        padding: 48px 32px;
    }
    .hc-portada__login { align-self: center; justify-self: end; padding: 32px; }
    .hc-portada__puntos { grid-template-columns: 1fr 1fr; align-self: start; }
    .hc-portada__hero { align-self: end; }
}

@media (max-width: 959px) {
    .hc-portada__velo { background: linear-gradient(180deg, rgba(4, 16, 19, .78) 0%, rgba(4, 16, 19, .9) 60%, rgba(4, 16, 19, .96) 100%); }
    .hc-portada__login { justify-self: center; }
}
