@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0a3da8;
    --primary-soft: #1d4ed8;
    --accent: #f59e0b;
    --bg: #f3f6fb;
    --ink: #0f172a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: "Manrope", "Segoe UI Variable Text", "Aptos", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: .95rem;
    letter-spacing: .1px;
}

.app-body {
    min-height: 100vh;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.app-sidebar {
    background: linear-gradient(180deg, #081a3a 0%, #102a58 40%, #163a74 100%);
    color: #fff;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
}

.brand-block small {
    display: block;
    opacity: .8;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: .5rem;
    object-fit: cover;
    background: #fff;
    padding: .2rem;
}

.menu-nav {
    overflow: auto;
    padding-right: .25rem;
}

.menu-nav::before {
    content: "MEN\00DA";
    display: block;
    margin: .1rem .2rem .55rem;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8fc0ff;
    font-weight: 600;
}

.menu-group {
    margin: .9rem 0 .3rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #b7d5df;
}

.accordion-nav {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.menu-group-wrap {
    border-radius: .62rem;
    padding: .08rem 0 .16rem;
    margin-bottom: .28rem;
}

.menu-group-wrap[open] {
    background: transparent;
}

.menu-group-summary {
    margin: .08rem 0 .08rem;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #d7e6ff;
    list-style: none;
    cursor: pointer;
    padding: .52rem .58rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    border-radius: .5rem;
    font-weight: 600;
}

.menu-group-summary::-webkit-details-marker {
    display: none;
}

.menu-group-summary::after {
    content: "";
    width: 12px;
    height: 12px;
    background: no-repeat center/12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23d9e7ff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
    transform: rotate(90deg);
    transition: transform .2s ease;
    opacity: .9;
}

.menu-group-summary::before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    border-radius: .38rem;
    background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.12));
    border: 1px solid rgba(255,255,255,.26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    flex: 0 0 auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px 13px;
}

.menu-group-wrap:not([open]) > .menu-group-summary::after {
    transform: rotate(0deg);
}

.menu-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: .54rem .7rem;
    border-radius: .5rem;
    margin-bottom: .18rem;
    transition: background-color .2s ease;
    position: relative;
    padding-left: 2.28rem;
    font-weight: 700;
}

.menu-link::before {
    content: "";
    position: absolute;
    left: .58rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.22rem;
    height: 1.22rem;
    border-radius: .35rem;
    background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.14));
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px 13px;
}

.menu-link:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.menu-link.active {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.18);
}

.menu-link.sub {
    margin-left: 1.46rem;
    margin-right: .26rem;
    margin-bottom: .1rem;
    padding: .53rem .74rem .53rem .72rem;
    color: #e6f0ff;
    font-weight: 600;
    border-left: 1px dashed rgba(176, 211, 255, .28);
    border-radius: .44rem;
    background: transparent;
}

.menu-link.sub::before {
    display: none;
}

.menu-link.sub::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    width: 9px;
    height: 1px;
    transform: translateY(-50%);
    border-radius: 1px;
    background: rgba(176, 211, 255, .34);
    box-shadow: none;
}

.menu-link.sub:hover {
    background: rgba(255,255,255,.11);
}

.menu-link.sub.active {
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255,255,255,.2);
    border-left: 1px dashed rgba(176, 211, 255, .34);
}

.menu-link[data-icon="dashboard"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 13h8V3H3v10Zm10 8h8v-6h-8v6Zm0-8h8V3h-8v10ZM3 21h8v-6H3v6Z'/%3E%3C/svg%3E");
}

.menu-link[data-icon="personas"]::before,
.menu-link[data-icon="lider"]::before,
.menu-link[data-icon="red"]::before,
.menu-link[data-icon="celula"]::before,
.menu-link[data-icon="ninos"]::before,
.menu-link[data-icon="nido"]::before,
.menu-link[data-icon="herederos"]::before,
.menu-link[data-icon="marineros"]::before,
.menu-link[data-icon="teens"]::before,
.menu-link[data-icon="rocas"]::before,
.menu-link[data-icon="jovenes"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 21a8 8 0 1 1 16 0'/%3E%3C/svg%3E");
}

.menu-link[data-icon="eventos"]::before,
.menu-link[data-icon="universidad"]::before,
.menu-link[data-icon="escuela"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 2v4M16 2v4M3 10h18M5 5h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
}

.menu-link[data-icon="adoracion"]::before,
.menu-link[data-icon="adoracion-servicios"]::before,
.menu-link[data-icon="adoracion-equipos"]::before,
.menu-link[data-icon="adoracion-canciones"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 18V5l12-2v13M9 9l12-2M6 20a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm12-2a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E");
}

.menu-link[data-icon="contribuciones"]::before,
.menu-link[data-icon="sobres"]::before,
.menu-link[data-icon="donaciones"]::before,
.menu-link[data-icon="contabilidad"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 7h18v10H3zM3 10h18M7 15h2'/%3E%3C/svg%3E");
}

.menu-link[data-icon="configuracion"]::before,
.menu-link[data-icon="seguridad"]::before,
.menu-link[data-icon="relaciones"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m12 15 3.5 2-.7-4.1L18 9.8l-4.1-.6L12 5.5l-1.9 3.7-4.1.6 3 3.1-.7 4.1L12 15Z'/%3E%3C/svg%3E");
}

.menu-group-summary[data-icon="personas"]::before,
.menu-group-summary[data-icon="ninos"]::before,
.menu-group-summary[data-icon="relaciones"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 21a8 8 0 1 1 16 0'/%3E%3C/svg%3E");
}

.menu-group-summary[data-icon="eventos"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 2v4M16 2v4M3 10h18M5 5h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
}

.menu-group-summary[data-icon="adoracion"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 18V5l12-2v13M9 9l12-2M6 20a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm12-2a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E");
}

.menu-group-summary[data-icon="contribuciones"]::before,
.menu-group-summary[data-icon="contabilidad"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 7h18v10H3zM3 10h18M7 15h2'/%3E%3C/svg%3E");
}

.menu-group-summary[data-icon="configuracion"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m12 15 3.5 2-.7-4.1L18 9.8l-4.1-.6L12 5.5l-1.9 3.7-4.1.6 3 3.1-.7 4.1L12 15Z'/%3E%3C/svg%3E");
}

.logout-form {
    margin-top: auto;
}

.session-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .08) 100%);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .75rem;
    padding: .65rem;
}

.session-user {
    font-weight: 700;
    line-height: 1.2;
    color: #f8fbff;
    margin-bottom: .12rem;
}

.session-state {
    color: #d7ebff;
    font-size: .82rem;
    margin-bottom: .45rem;
}

.session-btn {
    border-radius: 999px;
    font-weight: 600;
    padding: .42rem .8rem;
}

.session-btn-light {
    background: #ffffff;
    color: #0f2a63;
    border: 1px solid #ffffff;
}

.session-btn-light:hover {
    background: #eef4ff;
    color: #0f2a63;
}

.session-btn-danger {
    background: #de2a2a;
    color: #ffffff;
    border: 1px solid #de2a2a;
}

.session-btn-danger:hover {
    background: #bf1d1d;
    color: #ffffff;
}

.app-main {
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #d9e2ec;
    color: #475569;
    font-weight: 500;
}

.app-main h1,
.app-main h2,
.app-main h3,
.app-main h4 {
    font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI Semibold", sans-serif;
}

.page-header {
    background: #fff;
    border-radius: .85rem;
    padding: 1rem 1.2rem;
    border-left: 5px solid var(--accent);
}

.theme-dashboard .page-header { border-left-color: #0ea5e9; background: #f0f9ff; }
.theme-personas .page-header { border-left-color: #2563eb; background: #eff6ff; }
.theme-miembros .page-header { border-left-color: #2563eb; background: #eff6ff; }
.theme-lider .page-header { border-left-color: #7c3aed; background: #f5f3ff; }
.theme-red .page-header { border-left-color: #f59e0b; background: #fffbeb; }
.theme-celula .page-header { border-left-color: #14b8a6; background: #f0fdfa; }
.theme-eventos .page-header { border-left-color: #16a34a; background: #f0fdf4; }
.theme-adoracion .page-header { border-left-color: #9333ea; background: #faf5ff; }
.theme-contribuciones .page-header { border-left-color: #d97706; background: #fff7ed; }
.theme-sobres .page-header { border-left-color: #d97706; background: #fff7ed; }
.theme-donaciones .page-header { border-left-color: #ea580c; background: #fff7ed; }
.theme-contabilidad .page-header { border-left-color: #0f766e; background: #f0fdfa; }
.theme-ninos .page-header { border-left-color: #db2777; background: #fdf2f8; }
.theme-herederos .page-header { border-left-color: #ec4899; background: #fdf2f8; }
.theme-marineros .page-header { border-left-color: #0ea5e9; background: #f0f9ff; }
.theme-teens .page-header { border-left-color: #4f46e5; background: #eef2ff; }
.theme-rocas .page-header { border-left-color: #16a34a; background: #f0fdf4; }
.theme-jovenes .page-header { border-left-color: #f97316; background: #fff7ed; }
.theme-configuracion .page-header { border-left-color: #475569; background: #f8fafc; }
.theme-general .page-header { border-left-color: #f59e0b; background: #fff; }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(155deg, #194657 0%, #2d7e95 55%, #f3b95f 100%);
}

.login-wrap {
    width: min(460px, 92vw);
}

.login-card {
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        z-index: 10;
        max-height: 45vh;
    }
}

.personas-wrap {
    display: grid;
    grid-template-columns: 0.95fr 1.2fr;
    gap: 1rem;
}

.panel-left,
.panel-right {
    min-width: 0;
}

.left-toolbar {
    display: flex;
    gap: .6rem;
    margin-bottom: .75rem;
}

.kpi-inline {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.kpi-inline-pill {
    background: #eef4ff;
    color: #1e3a8a;
    border: 1px solid #c7d7fe;
    border-radius: 999px;
    padding: .18rem .6rem;
    font-size: .78rem;
}

.search-box {
    display: flex;
    gap: .4rem;
    flex: 1;
}

.list-card {
    border-radius: .7rem;
    border: 1px solid #ccd4dc;
    overflow: hidden;
    background: #fff;
}

.person-row {
    display: block;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #e5e9ef;
    padding: .85rem .9rem;
}

.person-row:last-child {
    border-bottom: 0;
}

.person-row.active {
    background: #0c62b4;
    color: #fff;
}

.person-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.person-name {
    font-size: 1.02rem;
}

.person-badges {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill,
.role-pill {
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .72rem;
}

.status-pill {
    background: #edf2f7;
    color: #334e68;
}

.person-row.active .status-pill {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.role-pill.server {
    background: #dbeafe;
    color: #1d4ed8;
}

.role-pill.leader {
    background: #ede9fe;
    color: #6d28d9;
}

.person-row.active .role-pill.server,
.person-row.active .role-pill.leader {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
}

.detail-header h2 {
    font-size: 2rem;
    color: #5d6f82;
}

.personas-tabs {
    background: #fff;
    border: 1px solid #d2d8e1;
    border-radius: 999px;
    padding: .22rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: .9rem;
}

.personas-tabs .nav-link {
    text-align: center;
    border-radius: 999px;
    color: #1f4f83;
}

.personas-tabs .nav-link.active {
    background: #2f89e3;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
}

.info-card,
.family-card,
.tab-card {
    background: #fff;
    border: 1px solid #cfd6df;
    border-radius: .65rem;
    overflow: hidden;
}

.row-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e5ebf2;
    padding: .75rem 1rem;
}

.row-line:last-child {
    border-bottom: 0;
}

.row-line small {
    display: block;
    color: #68778a;
}

.row-line p {
    margin: 0;
    font-size: 1.05rem;
    color: #4c5a6a;
}

.avatar-photo {
    width: 104px;
    height: 104px;
    border-radius: .75rem;
    object-fit: cover;
    border: 1px solid #d6dde7;
}

.family-card h3 {
    margin: 0;
    padding: .95rem 1rem;
    font-size: 1.95rem;
    color: #68778a;
}

.family-members {
    padding: .5rem 1rem 1rem;
}

.member-row {
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
    border-bottom: 1px solid #eceff4;
}

.member-row:last-child {
    border-bottom: 0;
}

.member-link {
    color: #0b4fca;
    text-decoration: none;
    font-weight: 600;
}

.member-link:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.role-toggle-form {
    margin-top: .55rem;
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid #e8edf5;
    padding: .7rem 1rem .95rem;
}

.role-toggle-form .status-pill {
    max-width: 100%;
    white-space: nowrap;
}

.tab-card {
    padding: .95rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #5f7285;
}

.note-row {
    display: grid;
    grid-template-columns: 150px 1fr 170px;
    gap: .7rem;
    border: 1px solid #d4dbe5;
    border-radius: .55rem;
    padding: .8rem;
    margin-bottom: .65rem;
    background: #fff;
}

.group-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.group-pill {
    border: 1px solid #d3dce6;
    border-radius: .55rem;
    padding: .6rem .8rem;
    display: flex;
    flex-direction: column;
    min-width: 220px;
}

.contribution-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: .65rem;
}

.contrib-row {
    display: grid;
    grid-template-columns: 130px 130px 130px 1fr;
    gap: .8rem;
    padding: .7rem .5rem;
    border-bottom: 1px solid #e6ecf3;
}

.form-tabs,
.family-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    border: 1px solid #d2d8e2;
    border-radius: 999px;
    padding: .2rem;
}

.btn-pill {
    border-radius: 999px;
    color: #0f5094;
    background: transparent;
}

.btn-pill.active {
    background: #0f65b7;
    color: #fff;
}

@media (max-width: 1200px) {
    .personas-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .note-row {
        grid-template-columns: 1fr;
    }

    .contribution-filter {
        grid-template-columns: 1fr;
    }

    .contrib-row {
        grid-template-columns: 1fr 1fr;
    }
}

.login-split-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    background:
        radial-gradient(circle at 8% 10%, rgba(20, 184, 166, 0.12), transparent 24%),
        radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.08), transparent 26%),
        #f8fafc;
}

.login-split-wrap.ministry {
    background:
        radial-gradient(circle at 9% 11%, rgba(30, 95, 116, 0.16), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(243, 185, 95, 0.12), transparent 26%),
        #f5f8fb;
}

.login-left-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.login-pro-card {
    width: min(92%, 420px);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    border: 1px solid #d8e1ee;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
    padding: 1.35rem 1.25rem;
}

.login-brand {
    font-weight: 800;
    color: #0f172a;
    letter-spacing: .4px;
    margin-bottom: .4rem;
    font-size: .8rem;
}

.login-pro-card h2 {
    font-weight: 800;
    margin-bottom: .2rem;
    color: #0f172a;
}

.login-muted {
    color: #64748b;
    margin-bottom: 0;
}

.login-badges {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
}

.login-badge {
    border: 1px solid #93c5fd;
    border-radius: 999px;
    padding: .25rem .65rem;
    color: #0f766e;
    font-size: .8rem;
    background: #eff6ff;
}

.login-footer-note {
    margin-top: 1rem;
    color: #334155;
    font-size: .9rem;
}

.login-right-pane {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.22), transparent 36%),
        radial-gradient(circle at 80% 14%, rgba(245, 158, 11, 0.2), transparent 34%),
        linear-gradient(140deg, #0b1322 0%, #1f2937 54%, #0f172a 100%);
}

.login-ministry-photo {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.55)),
        url('https://images.unsplash.com/photo-1438232992991-995b7058bbb3?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    mix-blend-mode: luminosity;
    opacity: .88;
}

.login-right-overlay {
    position: absolute;
    left: 2rem;
    right: 2rem;
    bottom: 2rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    padding: 1rem;
}

.login-right-overlay h3 {
    margin: 0 0 .35rem;
    font-weight: 800;
}

.login-right-overlay p {
    margin: 0;
    color: #dbeafe;
}

@media (max-width: 992px) {
    .login-split-wrap {
        grid-template-columns: 1fr;
    }

    .login-right-pane {
        display: none;
    }
}

.list-card.compact {
    padding: .35rem;
    background: #f8fbff;
}

.person-row.compact {
    margin: .28rem 0;
    border: 1px solid #e2e8f0;
    border-radius: .55rem;
    background: #fff;
    padding: .7rem .75rem;
}

.person-row.compact.active {
    background: #0d63b6;
    border-color: #0d63b6;
}

.status-pill.status-miembro {
    background: #dcfce7;
    color: #166534;
}

.status-pill.status-visita {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.status-nino {
    background: #fef9c3;
    color: #a16207;
}

.status-pill.status-prospecto {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-pill.status-contribuyente {
    background: #cffafe;
    color: #155e75;
}

.status-pill.status-difunto {
    background: #e2e8f0;
    color: #334155;
}

.compact-grid {
    grid-template-columns: 1fr;
}

.compact-card {
    padding-bottom: .6rem;
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1rem;
    border-bottom: 1px solid #e7edf4;
}

.avatar-photo.small {
    width: 74px;
    height: 74px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: .35rem .8rem;
    padding: .8rem 1rem;
}

.mini-grid div {
    border: 1px solid #e9eef5;
    border-radius: .45rem;
    padding: .45rem .55rem;
    background: #fbfdff;
}

.mini-grid small {
    display: block;
    color: #607287;
}

.mini-grid p {
    margin: 0;
    font-size: .95rem;
}

@media (max-width: 900px) {
    .mini-grid {
        grid-template-columns: 1fr;
    }
}

.module-card-soft {
    border-radius: .9rem;
}

.module-table {
    margin-bottom: 0;
}

.module-table > :not(caption) > * > * {
    padding: .78rem .65rem;
    vertical-align: middle;
}

.module-table thead th {
    border-bottom: 2px solid #dbe4f2;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.module-table tbody tr:hover {
    background: #f8fbff;
}

.dashboard-wrap {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.kpi-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.kpi-card {
    border-radius: 1rem;
    color: #fff;
    padding: 1rem 1rem .9rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.kpi-card small {
    opacity: .95;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .08em;
}

.kpi-card h2 {
    margin: .45rem 0 .2rem;
    font-size: 1.7rem;
}

.kpi-card p {
    margin: 0;
    opacity: .92;
}

.bg-kpi-blue { background: linear-gradient(140deg, #2563eb, #1d4ed8); }
.bg-kpi-violet { background: linear-gradient(140deg, #7c3aed, #5b21b6); }
.bg-kpi-teal { background: linear-gradient(140deg, #0f766e, #0e7490); }
.bg-kpi-amber { background: linear-gradient(140deg, #d97706, #b45309); }
.bg-kpi-green { background: linear-gradient(140deg, #16a34a, #15803d); }
.bg-kpi-sky { background: linear-gradient(140deg, #0284c7, #0369a1); }
.bg-kpi-rose { background: linear-gradient(140deg, #e11d48, #be123c); }

.dashboard-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.module-card {
    background: #fff;
    border: 1px solid #dce4f0;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.module-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .8rem;
}

.module-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.dot-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}

.donut-wrap {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: .9rem;
    align-items: center;
}

.donut {
    --pct: 0;
    width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(#2563eb calc(var(--pct) * 1%), #e2e8f0 0);
    display: grid;
    place-items: center;
}

.donut span {
    width: 74px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #1e3a8a;
}

.bars {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 34px;
    gap: .55rem;
    align-items: center;
    font-size: .88rem;
}

.bar-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.bar-track.warm {
    background: #ffedd5;
}

.bar-fill.warm {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.list-stack {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: .65rem;
    padding: .55rem .65rem;
    background: #f8fbff;
}

.list-item small {
    display: block;
    color: #64748b;
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .donut-wrap {
        grid-template-columns: 1fr;
    }
}

.children-kpi-grid {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
}

.perm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.perm-chip {
    border: 1px solid #c7d2fe;
    color: #1e40af;
    background: #eef2ff;
    border-radius: 999px;
    padding: .25rem .7rem;
    font-size: .78rem;
}

.perm-chip.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.perm-card {
    border-radius: 1rem;
    box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.perm-card .card-header {
    border-bottom: 1px solid #e6ebf4;
}

.perm-card .module-table td:first-child {
    min-width: 200px;
}

.children-filter-wrap {
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
}

.children-filter-wrap .btn {
    font-size: .78rem;
    padding: .35rem .35rem;
}

.label-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}

.kid-label {
    border: 2px dashed #1e3a8a;
    border-radius: .7rem;
    padding: .8rem;
    text-align: center;
    background: #fff;
}

.kid-label-head {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: .35rem;
}

.family-members.drag-zone {
    border: 1px dashed #bfdbfe;
    border-radius: .6rem;
    background: #f8fbff;
}

.family-member-item {
    display: flex;
    justify-content: space-between;
    gap: .7rem;
    align-items: center;
    padding: .5rem .55rem;
    border-bottom: 1px solid #eceff4;
    cursor: move;
}

.family-member-item:last-child {
    border-bottom: 0;
}

.family-member-item.dragging {
    opacity: .6;
    background: #dbeafe;
}

@media print {
    body * {
        visibility: hidden;
    }

    #labelPrintArea,
    #labelPrintArea * {
        visibility: visible;
    }

    #labelPrintArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.adoracion-top-tabs {
    background: #fff;
    border: 1px solid #d9e2ee;
    border-radius: 999px;
    padding: .25rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .25rem;
}

.adoracion-top-tabs a {
    text-decoration: none;
    text-align: center;
    border-radius: 999px;
    padding: .45rem .55rem;
    color: #1d4f97;
    font-weight: 600;
}

.adoracion-top-tabs a.active {
    background: #2563eb;
    color: #fff;
}

.contrib-tabs {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    max-width: 520px;
}

.adoracion-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
}

.adoracion-left .card-body {
    padding: .8rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    max-height: 470px;
    overflow: auto;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .65rem;
    border: 1px solid #d6ddeb;
    border-radius: .7rem;
    padding: .62rem .72rem;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
}

.service-item small {
    display: block;
    color: #64748b;
}

.service-item.active {
    background: #eaf2ff;
    border-color: #8bb2f8;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: .8rem;
}

.song-card {
    border: 1px solid #d9e2f0;
    border-radius: .8rem;
    padding: .75rem .85rem;
    background: #fff;
}

.song-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.song-card p {
    margin: .5rem 0 .7rem;
    color: #334155;
}

@media (max-width: 1100px) {
    .adoracion-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .adoracion-top-tabs {
        grid-template-columns: 1fr 1fr;
        border-radius: .8rem;
    }

    .songs-grid {
        grid-template-columns: 1fr;
    }
}
