/* Control de Diezmos V5.3 - Módulo Libros de Tesorería */
.tes-hidden{display:none!important}.tes-wrap{font-family:inherit;color:var(--text,#1c252c)}
.tes-card{background:#fff;border:1px solid #dfe7eb;border-radius:18px;padding:18px;box-shadow:0 5px 16px rgba(26,55,74,.05)}
.tes-menu-card{cursor:pointer;transition:.16s ease;min-height:132px}.tes-menu-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(26,55,74,.10)}
.tes-menu-icon{width:48px;height:48px;border-radius:14px;background:#eaf6f1;display:grid;place-items:center;font-size:24px;margin-bottom:12px}
.tes-menu-card h3,.tes-card h3{margin:0 0 6px}.tes-muted{color:#66757f}.tes-small{font-size:12px}.tes-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.tes-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tes-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tes-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tes-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.tes-btn{border:0;border-radius:11px;padding:10px 14px;cursor:pointer;font-weight:700}.tes-btn-primary{background:#1f7a5a;color:#fff}.tes-btn-primary:hover{background:#14543e}.tes-btn-secondary{background:#eef2f4;color:#1c252c}.tes-btn-danger{background:#fff0f0;color:#b93838}.tes-btn:disabled{opacity:.5;cursor:not-allowed}
.tes-field{margin:10px 0}.tes-field label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.tes-field input,.tes-field select,.tes-field textarea{width:100%;padding:11px 12px;border:1px solid #cfd9de;border-radius:10px;background:#fff;font:inherit}.tes-field input:focus,.tes-field select:focus{outline:2px solid rgba(31,122,90,.17);border-color:#1f7a5a}
.tes-kpi{background:#fff;border:1px solid #dfe7eb;border-radius:15px;padding:15px}.tes-kpi-label{font-size:12px;color:#66757f;text-transform:uppercase;font-weight:700}.tes-kpi-value{font-size:24px;font-weight:800;margin-top:4px}.tes-kpi.ok{background:#f2fbf7}.tes-kpi.warn{background:#fff9e8}
.tes-progress{height:9px;background:#eef2f4;border-radius:999px;overflow:hidden;margin:8px 0 18px}.tes-progress>div{height:100%;background:#1f7a5a;transition:width .2s ease}
.tes-person{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#f7fafb;border-radius:14px;padding:14px;margin-bottom:12px}.tes-person strong{font-size:18px}.tes-badge{display:inline-block;padding:4px 9px;border-radius:999px;background:#eef2f4;font-size:12px;font-weight:700}.tes-badge.ok{background:#eaf6f1;color:#14543e}.tes-badge.warn{background:#fff3d6;color:#795700}
.tes-table-wrap{overflow:auto;border:1px solid #dfe7eb;border-radius:14px}.tes-table{width:100%;border-collapse:collapse;min-width:680px}.tes-table th,.tes-table td{padding:10px 12px;border-bottom:1px solid #edf1f3;text-align:left;vertical-align:middle}.tes-table th{background:#f7fafb;font-size:12px;text-transform:uppercase;color:#66757f}.tes-amount{text-align:right!important;white-space:nowrap}.tes-empty{text-align:center;padding:28px!important;color:#66757f}
.tes-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.tes-tab{border:1px solid #dfe7eb;background:#fff;border-radius:999px;padding:9px 13px;cursor:pointer;font-weight:700}.tes-tab.active{background:#1f7a5a;color:#fff;border-color:#1f7a5a}
.tes-notice{border-radius:13px;padding:12px 14px;background:#edf7ff;border:1px solid #d1eaff;margin:10px 0}.tes-notice.error{background:#fff0f0;border-color:#ffd0d0;color:#8b2525}.tes-notice.ok{background:#effaf4;border-color:#cfefdc;color:#14543e}
.tes-switch{position:relative;width:48px;height:27px;display:inline-block}.tes-switch input{opacity:0;width:0;height:0}.tes-switch span{position:absolute;inset:0;background:#cbd5da;border-radius:999px;cursor:pointer;transition:.2s}.tes-switch span:before{content:"";position:absolute;width:21px;height:21px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 4px rgba(0,0,0,.2)}.tes-switch input:checked+span{background:#1f7a5a}.tes-switch input:checked+span:before{transform:translateX(21px)}
.tes-divider{height:1px;background:#e7edef;margin:18px 0}.tes-right{text-align:right}.tes-mono{font-variant-numeric:tabular-nums}.tes-section{margin-bottom:18px}
@media(max-width:900px){.tes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tes-grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.tes-grid,.tes-grid-3,.tes-grid-2{grid-template-columns:1fr}.tes-actions .tes-btn{flex:1}.tes-person{align-items:flex-start;flex-direction:column}.tes-kpi-value{font-size:21px}}
.tes-chart{display:grid;gap:11px}.tes-bar-row{display:grid;grid-template-columns:135px 1fr 110px;gap:10px;align-items:center}.tes-bar-label{font-size:13px;font-weight:700}.tes-bar-track{height:16px;background:#eef2f4;border-radius:999px;overflow:hidden}.tes-bar-fill{height:100%;background:#1f7a5a;border-radius:999px}.tes-bar-value{text-align:right;font-size:13px;font-weight:700}.tes-print-sheet{background:#fff;border:1px solid #dfe7eb;border-radius:18px;padding:32px;margin-top:16px}.tes-print-head{text-align:center}.tes-print-head h1{margin:0}.tes-print-head h2{margin:4px 0 22px;font-weight:500}.tes-print-meta{display:flex;gap:20px;justify-content:space-between;flex-wrap:wrap;border-top:1px solid #222;border-bottom:1px solid #222;padding:10px 0;margin-bottom:22px}.tes-print-verse{text-align:center;margin-top:34px;font-style:italic}
@media(max-width:600px){.tes-bar-row{grid-template-columns:1fr}.tes-bar-value{text-align:left}}
@media print{body *{visibility:hidden!important}#tesoreria-app-root,#tesoreria-app-root *{visibility:visible!important}.tes-no-print{display:none!important}#tesoreria-app-root{position:absolute;left:0;top:0;width:100%}.tes-print-sheet{border:0;box-shadow:none;margin:0;padding:10mm}.tes-print-sheet .tes-grid-2{grid-template-columns:1fr 1fr}.tes-print-sheet .tes-muted{color:#333!important}}

/* V5.2 - Permiso de Tesorería directamente en la tabla del administrador */
.tes-admin-inline{display:flex;align-items:center;gap:8px;min-width:130px}.tes-admin-status{font-size:12px;color:#66757f;white-space:nowrap}.tes-admin-inline .tes-switch input:disabled+span{opacity:.55;cursor:wait}


/* V5.3 - Sábados por mes + buscador de hermanos en captura */
.tes-saturday-list{margin:4px 0 14px;padding:12px;background:#f7fafb;border:1px solid #e4ebee;border-radius:13px}
.tes-saturday-buttons{display:flex;gap:8px;flex-wrap:wrap}
.tes-saturday-chip{border:1px solid #cfd9de;background:#fff;color:#1c252c;border-radius:999px;padding:8px 11px;cursor:pointer;font:inherit;font-size:12px;font-weight:700;text-transform:capitalize;transition:.15s ease}
.tes-saturday-chip:hover{border-color:#1f7a5a}.tes-saturday-chip.active{background:#1f7a5a;border-color:#1f7a5a;color:#fff}
.tes-person-search{min-width:min(520px,100%);flex:1}.tes-person-search>label{display:block;font-size:13px;font-weight:800;margin:4px 0 6px}
.tes-autocomplete{position:relative}.tes-autocomplete>input{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #cfd9de;border-radius:10px;background:#fff;font:inherit;font-size:16px;font-weight:700}
.tes-autocomplete>input:focus{outline:2px solid rgba(31,122,90,.17);border-color:#1f7a5a}
.tes-suggestions{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:40;background:#fff;border:1px solid #cfd9de;border-radius:12px;box-shadow:0 12px 30px rgba(26,55,74,.16);max-height:310px;overflow:auto;padding:5px}
.tes-suggestion{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;border:0;background:#fff;text-align:left;padding:10px 11px;border-radius:9px;cursor:pointer;font:inherit;font-weight:700;color:#1c252c}
.tes-suggestion:hover,.tes-suggestion:focus{background:#eef7f3;outline:none}.tes-suggestion small{font-size:11px;color:#66757f;font-weight:600}
.tes-suggestion-add{color:#14543e;border-top:1px solid #edf1f3;margin-top:4px;border-radius:7px}.tes-suggestion-empty{padding:9px 11px;color:#66757f;font-size:12px}
@media(max-width:600px){.tes-saturday-chip{flex:1 1 45%;text-align:center}.tes-person-search{width:100%}}

/* V5.5 - Datos de iglesia + Informe mensual estilo Excel */
.tes-church-card{max-width:850px}.tes-church-card textarea{resize:vertical;min-height:92px}
.tes-report-preview{overflow:auto}.tes-print-controls{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:14px;align-items:end}.tes-print-controls .tes-actions{padding-bottom:10px}
.tes-excel-report{font-family:Arial,Helvetica,sans-serif;color:#111;max-width:1120px;margin:0 auto;background:#fff;padding:8px 10px 14px;box-sizing:border-box}
.tes-excel-head{display:grid;grid-template-columns:190px 1fr 210px;align-items:center;min-height:125px;border-bottom:1px solid #d9dde0;gap:12px}.tes-report-logo{display:flex;align-items:center;justify-content:center}.tes-report-logo img{max-width:100%;height:auto;object-fit:contain}.tes-report-logo-left img{width:125px}.tes-report-logo-right img{width:165px}.tes-report-title{text-align:center}.tes-report-title h1{font-size:27px;line-height:1.1;margin:0 0 6px;font-weight:800}.tes-report-title h2{font-size:25px;line-height:1.1;margin:0;font-weight:800}
.tes-report-meta{display:grid;grid-template-columns:1.4fr 1fr .8fr .6fr;border-bottom:1px solid #111;margin-top:12px}.tes-report-meta>div{display:grid;grid-template-columns:max-content 1fr;gap:5px;align-items:end;padding:6px 10px 5px 0}.tes-report-meta b{font-size:14px}.tes-report-meta span{border-bottom:1px solid #111;min-height:21px;padding:0 4px;font-size:14px}
.tes-report-columns{display:grid;grid-template-columns:1fr 1.08fr;gap:48px;margin-top:30px}.tes-report-block h3{font-size:16px;text-decoration:underline;margin:0 0 9px;font-weight:800}.tes-report-line{display:grid;grid-template-columns:max-content 1fr max-content;gap:6px;align-items:end;padding:3px 0;min-height:22px;font-size:14px}.tes-report-line.strong{font-weight:800}.tes-report-dots{border-bottom:2px dotted #333;transform:translateY(-4px);min-width:12px}.tes-report-line .tes-mono{min-width:92px;text-align:right}.tes-report-detail{display:grid;grid-template-columns:72px 1fr;gap:6px;font-size:14px;border-bottom:1px solid #111;padding:4px 0 2px;margin-top:2px}.tes-report-detail b{font-weight:800}.tes-report-detail span{white-space:pre-line}.tes-report-address{align-items:start;min-height:45px}
.tes-report-footer-row{display:grid;grid-template-columns:1fr 1fr;gap:65px;margin-top:45px}.tes-report-send-date,.tes-report-signature{display:grid;grid-template-columns:max-content 1fr;align-items:end;font-size:14px}.tes-report-send-date b,.tes-report-signature b{padding-right:6px}.tes-report-send-date span,.tes-report-signature span{border-bottom:1px solid #111;min-height:24px;padding:2px 5px}.tes-print-verse{text-align:center;margin-top:18px;font-size:15px;font-style:normal;font-weight:800}
@media(max-width:900px){.tes-excel-head{grid-template-columns:120px 1fr 150px}.tes-report-logo-left img{width:100px}.tes-report-logo-right img{width:135px}.tes-report-title h1{font-size:22px}.tes-report-title h2{font-size:20px}.tes-report-columns{gap:20px}.tes-print-controls{grid-template-columns:1fr 1fr}.tes-print-controls .tes-actions{grid-column:1/-1}}
@media(max-width:700px){.tes-excel-report{min-width:780px}.tes-report-preview{padding:10px}.tes-print-sheet{overflow:auto}.tes-print-controls{grid-template-columns:1fr}.tes-print-controls .tes-actions{grid-column:auto}.tes-report-meta{grid-template-columns:1fr 1fr}.tes-report-columns{grid-template-columns:1fr 1fr}}
@page{size:A4 landscape;margin:8mm}
@media print{.tes-print-sheet{padding:0!important}.tes-excel-report{max-width:none;width:100%;padding:0;font-size:10pt}.tes-excel-head{min-height:90px;grid-template-columns:145px 1fr 170px}.tes-report-logo-left img{width:105px}.tes-report-logo-right img{width:140px}.tes-report-title h1{font-size:20pt}.tes-report-title h2{font-size:18pt}.tes-report-columns{gap:30px;margin-top:18px}.tes-report-line,.tes-report-meta b,.tes-report-meta span,.tes-report-detail,.tes-report-send-date,.tes-report-signature{font-size:9.5pt}.tes-report-block h3{font-size:11pt}.tes-report-footer-row{margin-top:28px}.tes-print-verse{margin-top:12px;font-size:10.5pt}}


/* ================================================================
   V5.6 - Informe mensual: formato visual basado en la hoja Excel
   ================================================================ */
.tes-excel-report{font-family:Arial,Helvetica,sans-serif;color:#050505;max-width:1120px;margin:0 auto;background:#fff;padding:0;box-sizing:border-box;border:7px double #111}
.tes-excel-inner{padding:12px 20px 14px;background-image:linear-gradient(rgba(180,180,180,.27) 1px,transparent 1px),linear-gradient(90deg,rgba(180,180,180,.27) 1px,transparent 1px);background-size:73px 24px;background-position:0 0}
.tes-excel-head{display:grid;grid-template-columns:190px 1fr 220px;align-items:center;min-height:126px;border-bottom:0;gap:12px}
.tes-report-logo{background:rgba(255,255,255,.72);min-height:108px}.tes-report-logo-left img{width:132px}.tes-report-logo-right img{width:178px}
.tes-report-title{background:rgba(255,255,255,.72);padding:10px 4px}.tes-report-title h1{font-size:27px;line-height:1.05;margin:0 0 5px;font-weight:800}.tes-report-title h2{font-size:25px;line-height:1.05;margin:0;font-weight:800}
.tes-report-meta{display:grid;grid-template-columns:1.55fr 1.05fr .85fr .62fr;margin:0 0 24px;border:0;background:rgba(255,255,255,.58)}
.tes-report-meta>div{display:grid;grid-template-columns:max-content 1fr;gap:4px;align-items:end;padding:5px 10px 4px 0}.tes-report-meta b{font-size:14px}.tes-report-meta span{border-bottom:1px solid #111;min-height:20px;padding:0 4px;font-size:14px}
.tes-report-columns{display:grid;grid-template-columns:1fr 1.08fr;gap:70px;margin:0 0 0;background:rgba(255,255,255,.40)}
.tes-report-block{padding:0 2px}.tes-report-block h3{font-size:15px;text-decoration:underline;margin:0 0 7px;font-weight:800}
.tes-report-line{display:grid;grid-template-columns:max-content 1fr 93px;gap:5px;align-items:end;padding:2px 0;min-height:21px;font-size:14px}.tes-report-dots{border-bottom:2px dotted #111;transform:translateY(-4px)}.tes-report-line .tes-mono{text-align:right;font-variant-numeric:tabular-nums}.tes-report-line.strong{font-weight:800}
.tes-report-detail{display:grid;grid-template-columns:72px 1fr;gap:3px;font-size:14px;border-bottom:1px solid #111;padding:2px 0 1px;background:rgba(255,255,255,.45)}.tes-report-address{align-items:start;min-height:43px}.tes-report-detail span{white-space:pre-line}
.tes-report-footer-row{display:grid;grid-template-columns:1fr 1fr;gap:70px;margin-top:47px;background:rgba(255,255,255,.45)}.tes-report-send-date,.tes-report-signature{display:grid;grid-template-columns:max-content 1fr;align-items:end;font-size:14px;font-weight:700}.tes-report-send-date span,.tes-report-signature span{border-bottom:1px solid #111;min-height:24px;padding:2px 5px;font-weight:400}.tes-print-verse{text-align:center;margin:8px 0 0;font-size:15px;font-style:normal;font-weight:800;background:rgba(255,255,255,.65)}
.tes-private-catalog{margin-top:16px;border-left:5px solid #a46a13}
@media(max-width:900px){.tes-report-columns{gap:28px}.tes-excel-inner{padding:10px 12px}.tes-excel-head{grid-template-columns:135px 1fr 165px}.tes-report-logo-left img{width:105px}.tes-report-logo-right img{width:145px}}
@media print{@page{size:landscape;margin:7mm}.tes-excel-report{border:5px double #111!important;width:100%!important;max-width:none!important}.tes-excel-inner{padding:5mm 7mm 4mm!important;background-size:58px 19px!important}.tes-excel-head{min-height:77px!important;grid-template-columns:130px 1fr 160px!important}.tes-report-logo{min-height:70px!important}.tes-report-logo-left img{width:92px!important}.tes-report-logo-right img{width:125px!important}.tes-report-title h1{font-size:17pt!important}.tes-report-title h2{font-size:16pt!important}.tes-report-meta{margin-bottom:14px!important}.tes-report-columns{gap:35px!important}.tes-report-footer-row{margin-top:25px!important}.tes-report-line,.tes-report-meta b,.tes-report-meta span,.tes-report-detail,.tes-report-send-date,.tes-report-signature{font-size:8.6pt!important}.tes-report-block h3{font-size:9.5pt!important}.tes-print-verse{font-size:9.5pt!important;margin-top:5px!important}}
