.tarea-header {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 1.2rem;
}

.tarea-nombre {
    color: #999;
    font-size: 25px;
    font-family: 'Roboto', serif;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
    padding-top: 5px;
}

.tarea-cargo {
    color: #BBB;
    font-size: 18px;
    font-family: 'Roboto', serif;
    margin:0;
    padding: 0;
}

/* ── Formulario de inscripción ──────────────────────────────────────────── */
.tarea-informe {
    padding-left: 0px;
    padding-right: 0px;
}

.tarea-hint {
    font-family: 'Roboto', sans-serif;
    font-size: .85rem;
    color: #6b8fa8;
    margin: 0 0 .8rem;
}

.tarea-titulo {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #1a3a52;
    font-weight: 600;
    letter-spacing: .04em;
    margin: .4rem 0 .4rem 0;
    padding-top: .4rem;
    border-top: 2px solid #b89550;
}

.tarea-visita-info {
    font-family: 'Roboto', sans-serif;
    font-size: .92rem;
    color: #1a3a52;
    background: #e8f0f7;
    border-left: 4px solid #1a3a52;
    padding: .5rem .9rem;
    margin-bottom: .9rem;
    border-radius: 0 6px 6px 0;
}

.tarea-alerta {
    font-family: 'Roboto', sans-serif;
    font-size: .95rem;
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: .6rem 1rem;
}

.tarea-msg {
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    border-radius: 6px;
    padding: .6rem 1rem;
    margin-bottom: .8rem;
}
.tarea-msg--ok    { background: #eaf7ec; color: #1e7e34; border: 1px solid #c3e6cb; }
.tarea-msg--error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

#tblVisitante {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    margin-left: 0;
}
#tblVisitante th:nth-child(2),
#tblVisitante td:nth-child(2) {
    max-width: 250px;
    width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#tblVisitante th {
    background: #1a3a52;
    color: #fff;
    padding: .3rem .7rem;
    text-align: left;
    font-weight: 500;
    font-size: calc(.9rem - 1px);
}
#tblVisitante td {
    padding: .3rem .5rem;
    border-bottom: 1px solid #dce6ed;
    vertical-align: middle;
    font-size: 14px;
}
#tblVisitante tr:nth-child(even) td { background: #f4f8fb; }
#tblVisitante .col-num {
    width: 36px;
    text-align: center;
    color: #6b8fa8;
    font-size: .8rem;
}
#tblVisitante .col-ord { width: 130px; }
#tblVisitante td:nth-child(3) { padding-left: 7px; }

#tblVisitante input[type="text"] {
    width: 100%;
    padding: .35rem .5rem;
    border: 1px solid #b0c8d8;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: .88rem;
    box-sizing: border-box;
}
#tblVisitante input[type="text"]:focus {
    outline: none;
    border-color: #1a3a52;
}
#tblVisitante select {
    width: 100%;
    padding: .35rem .4rem .35rem 7px;
    border: 1px solid #b0c8d8;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: .85rem;
    background: #fff;
}

.tarea-acciones {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: .8rem;
    flex-wrap: wrap;
}
.btn-sms-todos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 5px;
    border: 1px solid #b0c8d8;
    border-radius: 6px;
    background: #f0f6fa;
    cursor: pointer;
    line-height: 1;
}
.btn-sms-todos:hover { background: #daeaf5; }

/* Panel SMS todos */
.sms-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.sms-panel-box {
    background: #fff;
    border-radius: 10px;
    width: min(420px, 94vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
    overflow: hidden;
}
.sms-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: #1a3a52;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
}
.sms-panel-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}
.sms-panel-list {
    list-style: none;
    overflow-y: auto;
    padding: .5rem 0;
    margin: 0;
}
.sms-panel-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem 1rem;
    border-bottom: 1px solid #eef0f2;
}
.sms-panel-list li:last-child { border-bottom: none; }
.sms-panel-nombre {
    font-size: .88rem;
    color: #333;
}
.sms-panel-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 5px;
    text-decoration: none;
    flex-shrink: 0;
}
.sms-panel-link:hover { background: #e8f4fb; }
.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 .95rem;
    height: 2.35rem;
    line-height: 1.2;
    background: #e8ecf0;
    color: #1a3a52;
    border: 1px solid #b0c8d8;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: .84rem;
    cursor: pointer;
}
.btn-add:hover {
    background: #d0dce6;
}
.btn-lideres {
    padding: .45rem 1.2rem;
    background: #b89550;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: .84rem;
    cursor: pointer;
}
.btn-lideres:hover { background: #9a7a3e; }

.btn-grabar {
    padding: .45rem 1.2rem;
    background: #1a3a52;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: .84rem;
    cursor: pointer;
}
.btn-grabar:hover            { background: #2d5470; }
.btn-grabar:disabled         { background: #9ab0c0; cursor: not-allowed; }
.btn-grabar:disabled:hover   { background: #9ab0c0; }
.btn-add:hover               { background: #d0dce6; }

/* ── Acciones de fila (editar / eliminar) ───────────────────────────────── */
#tblVisitante .col-acc {
    width: 60px;
    text-align: center;
    white-space: nowrap;
}
#tblVisitante .btn-edit,
#tblVisitante .btn-del,
#tblVisitante .btn-save,
#tblVisitante .btn-cancel {
    border: none;
    background: none;
    cursor: pointer;
    font-size: calc(.85rem + 2px);
    padding: 2px 4px;
    border-radius: 3px;
    line-height: 1;
}
#tblVisitante .btn-edit   { color: #2d5470; font-size: calc(.85rem + 4px); }
#tblVisitante .btn-del    { color: #c0392b; }
#tblVisitante .btn-save   { color: #1e7e34; }
#tblVisitante .btn-cancel { color: #888;    }
#tblVisitante .btn-sms           { display:inline-block; padding:2px 3px; border-radius:3px; line-height:1; text-decoration:none; vertical-align:middle; }
#tblVisitante .btn-sms svg       { width:18px; height:18px; }
#tblVisitante .btn-sms:hover     { background: #e8f4fb; }
#tblVisitante .btn-edit:hover    { background: #d0e4f0; }
#tblVisitante .btn-del:hover     { background: #fdecea; }
#tblVisitante .btn-save:hover    { background: #eaf7ec; }
#tblVisitante .btn-cancel:hover  { background: #eee;    }
#tblVisitante .edit-inp {
    width: 100%;
    padding: .25rem .4rem;
    border: 1px solid #1a3a52;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    box-sizing: border-box;
}
#tblVisitante .edit-sel {
    width: 100%;
    padding: .25rem 3px .25rem 7px;
    border: 1px solid #1a3a52;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
}

/* ── Visitantes registrados ─────────────────────────────────────────────── */
.tbl-registrados {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .88rem;
    margin-top: 1.2rem;
}
.tbl-registrados th {
    background: #2d5470;
    color: #fff;
    padding: .35rem .7rem;
    text-align: left;
    font-weight: 500;
}
.tbl-registrados td {
    padding: .3rem .7rem;
    border-bottom: 1px solid #dce6ed;
    color: #2c3e50;
}
.tbl-registrados tr:nth-child(even) td { background: #f4f8fb; }
.tbl-registrados .col-num {
    width: 36px;
    text-align: center;
    color: #6b8fa8;
    font-size: .8rem;
}

/* ── Comité Templo (id_cargo=85) ────────────────────────────────────────── */
#tblComite {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    margin-left: 0;
}
#tblComite th {
    background: #1a3a52;
    color: #fff;
    padding: .3rem .7rem;
    text-align: left;
    font-weight: 500;
    font-size: calc(.9rem - 1px);
}
#tblComite td {
    padding: .3rem .5rem;
    border-bottom: 1px solid #dce6ed;
    vertical-align: middle;
    font-size: 14px;
}
#tblComite tr:nth-child(even) td { background: #f4f8fb; }
#tblComite .col-num  { width: 36px; text-align: center; color: #6b8fa8; font-size: .8rem; }
#tblComite .col-llam { width: 140px; }
#tblComite .col-nom  { width: 250px; }
#tblComite .col-tel  { width: 120px; }
.comite-credencial {
    display: block;
    font-size: 13px;
    color: #A0A0A0;
    font-style: normal;
    letter-spacing: .01em;
    line-height: 1;
    margin-top: 1px;
}
#tblComite .nom-link {
    color: inherit;
    text-decoration: none;
    font-style: normal;
    cursor: pointer;
}
#tblComite .llam-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* ── Celular (max 600px) ────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tarea-header { flex-direction: column; gap: 0; align-items: center; text-align: center; }
    .tarea-titulo { text-align: center; }
    .tarea-nombre { font-size: 22px; white-space: nowrap; overflow: visible; }
    .tarea-cargo  {
        width: calc(100vw - 8px);
        padding: 0 4px;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: visible;
    }
    #tblComite { font-size: .78rem; width: 100%; }
    .comite-credencial { font-size: 14px; }
    #tblComite .col-llam { width: auto; }
    #tblComite .col-nom  { width: auto; }
    #tblComite .col-tel,
    #tblComite th:nth-child(3),
    #tblComite td:nth-child(3) { display: none; }

    #tblVisitante { font-size: .78rem; width: 100%; }
    #tblVisitante .col-num { display: none; }
    #tblVisitante th:nth-child(2),
    #tblVisitante td:nth-child(2) { width: auto; }
    #tblVisitante .col-ord { width: 90px; }
    #tblVisitante .col-acc { width: 40px; }
    #tblVisitante select   { font-size: .75rem; }
    #tblVisitante input[type="text"] { font-size: .75rem; }
    #tblVisitante .btn-del,
    #tblVisitante .btn-save,
    #tblVisitante .btn-cancel { font-size: calc(.75rem + 15px); padding: 2px 2px; }
    #tblVisitante .btn-edit     { font-size: calc(.75rem + 18px); padding: 2px 2px; vertical-align: middle; }
    #tblVisitante .btn-edit,
    #tblVisitante .btn-save   { margin-right: 5px; }
}

/* ── Modal comité ───────────────────────────────────────────────────────── */
.modal-comite-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}
.modal-comite-caja {
    background: #fff;
    border-radius: 10px;
    padding: 1.2rem 1.4rem 1rem;
    width: calc(100vw - 32px);
    max-width: 380px;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.modal-comite-titulo {
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    color: #1a3a52;
    font-weight: 600;
    margin-bottom: .8rem;
    border-bottom: 2px solid #b89550;
    padding-bottom: .4rem;
}
.modal-lbl {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: .78rem;
    color: #6b8fa8;
    margin: .6rem 0 .2rem;
}
.modal-inp {
    width: 100%;
    padding: .4rem .5rem;
    border: 1px solid #b0c8d8;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    box-sizing: border-box;
}
.modal-inp:focus { outline: none; border-color: #1a3a52; }
.modal-comite-botones {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}
.modal-btn {
    flex: 1;
    padding: .5rem .4rem;
    border-radius: 6px;
    font-size: .82rem;
    cursor: pointer;
    border: none;
}
.modal-btn-guardar  { background: #1a3a52; color: #fff; font-family: 'Cinzel', serif; }
.modal-btn-eliminar { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb !important; }
.modal-btn-cerrar   { background: #e8ecf0; color: #1a3a52; border: 1px solid #b0c8d8 !important; }
.modal-btn-guardar:hover  { background: #2d5470; }
.modal-btn-eliminar:hover { background: #f9d6d3; }
.modal-btn-cerrar:hover   { background: #d0dce6; }

/* ── Reporte de Visita al Templo (id_cargo=85) ──────────────────────────── */
#tblReporte {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .9rem;
    margin-left: 0;
    margin-top: .4rem;
}
#tblReporte th {
    background: #1a3a52;
    color: #fff;
    padding: .3rem .7rem;
    text-align: left;
    font-weight: 500;
    font-size: calc(.9rem - 1px);
}
#tblReporte td {
    padding: .3rem .5rem;
    border-bottom: 1px solid #dce6ed;
    vertical-align: middle;
    font-size: 14px;
}
#tblReporte tr:nth-child(even) td { background: #f4f8fb; }
#tblReporte .col-forma { width: 160px; }
#tblReporte .col-cant  { width: 80px; text-align: right; padding-right: .9rem; }
#tblReporte .tr-divider td { border-bottom: 2px solid #1a3a52; }

/* ── Reporte Estaca (id_cargo 42,43) ────────────────────────────────────── */
#tblEstaca {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .85rem;
    margin-top: .4rem;
}
#tblEstaca th {
    background: #1a3a52;
    color: #fff;
    padding: .3rem .5rem;
    text-align: center;
    font-weight: 500;
    font-size: .8rem;
    white-space: nowrap;
}
#tblEstaca td {
    padding: .28rem .4rem;
    border-bottom: 1px solid #dce6ed;
    vertical-align: middle;
    font-size: 13px;
}
#tblEstaca tr:nth-child(even) td { background: #f4f8fb; }
#tblEstaca .col-est-uni { text-align: left; min-width: 120px; }
#tblEstaca .col-est-n   { text-align: right; width: 38px; padding-right: .5rem; }

/* ── Directorio (id_cargo=44) ───────────────────────────────────────────── */
.dir-subtitulo {
    font-family: 'Cinzel', serif;
    font-size: .82rem;
    color: #fff;
    background: #2d5470;
    padding: .3rem .8rem;
    margin: .9rem 0 0;
    border-radius: 4px 4px 0 0;
    letter-spacing: .04em;
}
.dir-empty {
    font-family: 'Roboto', sans-serif;
    font-size: .88rem;
    color: #6b8fa8;
    margin: .4rem 0 .8rem;
}
.tbl-dir {
    width: auto;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: .88rem;
    margin-bottom: .4rem;
}
.tbl-dir th {
    background: #1a3a52;
    color: #fff;
    padding: .3rem .7rem;
    text-align: left;
    font-weight: 500;
    font-size: .8rem;
    white-space: nowrap;
}
.tbl-dir td {
    padding: .28rem .6rem;
    border-bottom: 1px solid #dce6ed;
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
}
.tbl-dir tr.dir-par td { background: #f4f8fb; }
.dir-edit-link { color: inherit; text-decoration: none; cursor: pointer; }
.dir-edit-link:hover { text-decoration: underline; }
.dir-col-id   { width: 36px; text-align: center; color: #6b8fa8; font-size: .8rem; }
.dir-col-llam { min-width: 160px; }
.dir-col-nom  { min-width: 200px; }
.dir-col-uni  { min-width: 100px; }
.dir-col-tel  { min-width: 90px; }

@media (max-width: 600px) {
    .tbl-dir { font-size: .78rem; width: 100%; }
    .dir-col-tel { display: none; }
}

