/* CAF · portal (celular primero: pestañas abajo; en computadora: menú lateral) */
body.app-body { background: var(--bg); }
.app { min-height: 100dvh; }
.main { min-width: 0; padding-bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 40; height: var(--nav-h); display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; padding-top: env(safe-area-inset-top); box-sizing: content-box; backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line-2); }
.top .logo img { height: 30px; } .top .logo .word { font-size: 22px; } .top .logo .sub { display: none; }
.top .grow { min-width: 0; }
.top .quien { display: none; }
.top .avatar { width: 38px; height: 38px; border: 0; padding: 0; cursor: pointer; }
.view { padding: 18px 16px 8px; max-width: 1100px; margin-inline: auto; animation: entra .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } }

.ptitle { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ptitle h1 { font-size: clamp(28px, 6vw, 38px); letter-spacing: -.03em; font-family: var(--serif); font-weight: 600; }
.ptitle p { margin-top: 4px; font-size: 15px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.sec-h h2 { font-size: 20px; letter-spacing: -.02em; }
.sec-h a, .sec-h button.lnk { color: var(--brand); font-weight: 600; font-size: 14.5px; background: none; border: 0; padding: 4px 0; }
.sec-h:first-child { margin-top: 0; }
.cols { display: grid; gap: 14px; }
@media (min-width: 860px) { .cols.dos { grid-template-columns: 1fr 1fr; } .cols.tres { grid-template-columns: repeat(3, 1fr); } .cols.uno-dos { grid-template-columns: 2fr 1fr; align-items: start; } }

/* pestañas inferiores (celular) */
.tabbar { position: fixed; inset: auto 0 0; z-index: 50; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px); border-top: 1px solid var(--line); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 14px; position: relative; }
.tabbar .ic { width: 25px; height: 25px; }
.tabbar .on { color: var(--brand); }
.tabbar .on::before { content: ""; position: absolute; top: 0; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.side { display: none; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 60px; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 22px 14px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 55%, var(--bg)); overflow: hidden; }
  .side .logo { padding: 2px 10px 18px; } .side .logo img { height: 38px; } .side .logo .sub { display: block; }
  .side nav { display: grid; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; align-content: start; padding-bottom: 8px; scrollbar-width: thin; }
  .side h6 { margin: 18px 12px 6px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 560; font-size: 15.5px; }
  .side a .ic { width: 21px; height: 21px; opacity: .85; }
  .side a:hover { background: var(--line-2); color: var(--ink); }
  .side a.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
  .side .yo { flex: none; padding-top: 10px; border-top: 1px solid var(--line-2); }
  .side .salir { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-top: 6px; border: 0; background: none; border-radius: 12px; color: var(--ink-2); font-weight: 560; font-size: 15.5px; text-align: left; }
  .side .salir:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); }
  .yo-chip { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); width: 100%; text-align: left; }
  .top { display: none; }
  .top .logo { display: none; }
  .top .quien { display: block; }
  .view { padding: 14px 32px 8px; }
}

/* tarjeta de bienvenida y versículo del día */
.hero-app { position: relative; overflow: hidden; border-radius: 28px; padding: 24px 22px; color: #fff; background: radial-gradient(130% 140% at 0% 0%, #a3202f 0%, #6d1220 58%, #45091a 100%); box-shadow: 0 24px 50px -26px rgba(80, 8, 24, .7); isolation: isolate; }
.hero-app::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: radial-gradient(circle at 86% 18%, rgba(255, 226, 150, .95) 0 1.5px, transparent 2px), radial-gradient(circle at 70% 78%, rgba(255, 226, 150, .8) 0 1.2px, transparent 2px), radial-gradient(circle at 94% 60%, rgba(255, 226, 150, .7) 0 1.4px, transparent 2px), radial-gradient(60% 80% at 100% 0%, rgba(241, 211, 138, .28), transparent 60%); }
.hero-app .hola { font-size: 15px; font-weight: 600; color: #f1d38a; }
.hero-app h1 { font-size: clamp(26px, 6vw, 34px); letter-spacing: -.03em; margin: 4px 0 14px; font-family: var(--serif); font-weight: 600; }
.dia-verso { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 3.8vw, 23px); line-height: 1.4; max-width: 640px; text-wrap: pretty; }
.dia-cita { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.dia-cita b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #f1d38a; }
.dia-cita a { color: #fff; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.dia-cita a .ic { width: 16px; height: 16px; }
.eti-dia { display: inline-flex; padding: 4px 11px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.bienv { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.bienv .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--gold-soft); color: #8a6410; display: grid; place-items: center; flex: none; }
.pasos { display: grid; gap: 8px; margin-top: 12px; }
.paso { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); color: inherit; text-decoration: none; }
.paso .ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; flex: none; }
.paso.hecho .ck { background: var(--good); border-color: var(--good); }
.paso.hecho span { text-decoration: line-through; color: var(--muted); }
.paso .ck .ic { width: 14px; height: 14px; }

/* filas de actividad */
.fila { display: flex; align-items: center; gap: 14px; padding: 13px 14px; width: 100%; text-align: left; background: transparent; border: 0; color: inherit; }
button.fila:active, a.fila:active { background: var(--line-2); }
.fila .t { font-weight: 620; letter-spacing: -.01em; }
.fila .s { font-size: 13.5px; color: var(--muted); }
.fila .dblock { width: 48px; height: 52px; }
.fila .dblock b { font-size: 19px; }

/* calendario */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-bar h2 { font-size: 22px; letter-spacing: -.02em; flex: 1; min-width: 140px; text-transform: capitalize; font-family: var(--serif); font-weight: 600; }
.cal { background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-h div { padding: 9px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line-2); }
.cd { position: relative; min-height: 58px; padding: 5px 3px; border: 0; background: transparent; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); text-align: center; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cd:nth-child(7n) { border-right: 0; }
.cd.fuera { opacity: .35; }
.cd .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14.5px; font-weight: 600; }
.cd.hoy .n { background: var(--brand); color: #fff; }
.cd.sel { background: var(--brand-soft); }
.cd .pts { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cd .ch { display: none; }
.dot.turno { background: var(--good); }
@media (min-width: 760px) {
  .cd { min-height: 108px; align-items: stretch; text-align: left; padding: 6px; }
  .cd .n { margin-bottom: 2px; }
  .cd .pts { display: none; }
  .cd .ch { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c, var(--a-general)); background: color-mix(in srgb, var(--c, var(--a-general)) 12%, transparent); border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cd .mas { font-size: 11.5px; color: var(--muted); padding-left: 4px; }
}
.dia-lista { margin-top: 14px; }

/* material y tarjetas de lista */
.tarj { display: flex; gap: 14px; padding: 15px; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow); align-items: flex-start; }
.tarj .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.tarj .ico .ic { width: 24px; height: 24px; }
.tarj h3 { font-size: 17px; letter-spacing: -.015em; }
.tarj .acc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.buscar { position: relative; flex: 1; min-width: 180px; }
.buscar .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; height: 19px; }
.buscar .input { padding-left: 40px; }
.barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* canciones y acordes */
.chart { font: 14.5px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; margin: 0; -webkit-overflow-scrolling: touch; }
.chart .ac { color: var(--brand); font-weight: 700; }
.chart .sec { display: block; margin: 10px 0 2px; font-weight: 700; color: var(--a-alabanza); font-family: var(--sans); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; padding: 0; }
.trans { display: inline-flex; align-items: center; gap: 4px; background: var(--line-2); border-radius: 12px; padding: 3px; }
.trans button { width: 36px; height: 34px; border: 0; background: var(--card); border-radius: 9px; font-weight: 700; font-size: 17px; }
.trans b { min-width: 52px; text-align: center; }
.estado { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.estado.confirmado { background: var(--good); } .estado.no_puede { background: var(--bad); }

/* finanzas */
.grafico { width: 100%; height: auto; display: block; }
.grafico text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.cat-row { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cat-row:last-child { border: 0; }
.print-only { display: none; }

/* proyectos */
.tablero { display: grid; gap: 14px; }
@media (min-width: 900px) { .tablero { grid-template-columns: repeat(4, 1fr); align-items: start; } }
.col { background: var(--bg-2); border-radius: 20px; padding: 10px; display: grid; gap: 10px; }
.col > h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; display: flex; justify-content: space-between; }
.pj { text-align: left; border: 1px solid var(--line-2); background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; width: 100%; color: inherit; }
.tarea { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.tarea.hecha .tt { text-decoration: line-through; color: var(--muted); }
.tarea input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }

/* galería del portal */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fotos .f { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 0; padding: 0; }
.fotos img { width: 100%; height: 100%; object-fit: cover; }
.fotos .m { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; }
.fotos .m .badge { background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 2px 8px; }
.albumes-g { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .albumes-g { grid-template-columns: repeat(4, 1fr); } }
.alb { text-align: left; background: none; border: 0; padding: 0; display: grid; gap: 7px; color: inherit; }
.alb .cov { aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; color: var(--muted); }
.alb .cov img { width: 100%; height: 100%; object-fit: cover; }

/* acceso */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--brand) 12%, var(--bg)), var(--bg) 70%); }
.auth-card { width: min(460px, 100%); background: var(--card); border: 1px solid var(--line-2); border-radius: 30px; box-shadow: var(--shadow-lg); padding: 28px 22px 24px; }
.auth-card.ancha { width: min(640px, 100%); }
.auth-card h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 14px 0 6px; letter-spacing: -.025em; }
.auth-logo { display: flex; justify-content: center; }
.auth-v { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--ink-2); text-align: center; }
.auth-v cite { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.grupo-t { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 700; margin: 8px 0 -4px; grid-column: 1 / -1; }

/* panel de servidores */
.area-card { display: grid; gap: 12px; }
.area-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.chips-p { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-p { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 6px; padding-right: 10px; border-radius: 999px; background: var(--bg-2); font-size: 14px; font-weight: 560; }
.chip-p .avatar { width: 26px; height: 26px; font-size: 11px; }
.chip-p button { border: 0; background: none; color: var(--muted); padding: 0; display: grid; place-items: center; width: 20px; height: 20px; }
.chip-p button .ic { width: 15px; height: 15px; }
.ve-puede { display: grid; gap: 14px; }
@media (min-width: 640px) { .ve-puede { grid-template-columns: 1fr 1fr; } }
.ve-puede h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ve-puede ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 3px; }
.turno { display: flex; gap: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; }
.turno-p { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.turno-p:last-child { border: 0; }

@media print {
  .side, .tabbar, .top, .no-print, .asis-fab { display: none !important; }
  .view { padding: 0; max-width: none; }
  .main { padding: 0; }
  .app { display: block; }
  .print-only { display: block; }
}
