/* F06 Voluntarios (V360-HTML-03B). Scoped to volunteer classes; the shared shell,
   base, dashboard, voters, registry, referrals and structure styles are not changed.
   Geometry follows the F06 source at 1728 (document 72 section 3): KPI band top 244,
   charts 392 at 680x292, title y16, subtitle y43, divider y72, plot/ring from y80 to y95,
   legend text at x252 and y112/148/184/220, table at 700 with an 18px inset,
   40px header, 44px rows, and seven column proportions over 1340px. */

.volunteer-kpis{margin-bottom:16px;padding-top:14px;}
.volunteer-register{min-width:185px;}

/* Charts: card internals in border-box coordinates, as in the accepted F05 overview. */
.volunteer-charts{margin:0;}
.volunteer-charts .chart-card{min-height:292px;gap:0;padding:15px 18px 5px;}
.volunteer-charts .chart-card h3{font:600 18px/26px Inter,ui-sans-serif,system-ui,sans-serif;}
.volunteer-charts .chart-card .chart-sub{margin:1px 0 0;padding-bottom:9px;border-bottom:1px solid var(--line);font:400 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}

/* Donut: ring 156px at x34 (card padding 18 plus 16), legend at x252 with 36px pitch. */
.volunteer-donut .chart-donut-wrap{min-height:0;margin-top:22px;grid-template-columns:156px minmax(0,1fr);gap:62px;padding-left:16px;justify-content:start;align-items:start;}
.volunteer-donut .chart-donut-wrap > svg{width:156px!important;height:156px!important;}
.volunteer-donut .chart-legend{gap:16px;margin:17px 0 0 -20px;width:auto;}
.volunteer-donut .chart-legend li{font:400 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}

/* Ranking: same geometry as the accepted F05 ranking (14/20 label clear above a 10px track, 41px pitch). */
.volunteer-rank .director-rank-bars{gap:11px;margin-top:7px;}
.volunteer-rank .director-rank-row{gap:0;}
.volunteer-rank .director-rank-copy{font:400 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}
.volunteer-rank .bar-track{height:10px;}
@media (min-width:1181px){
  .volunteer-charts .volunteer-rank{padding-right:10px;}
}

/* Filters, counts and the saved-result panel add height above the list (disclosed in the report). */
.volunteer-toolbar{margin:16px 0 12px;}
.volunteer-toolbar .field-error{grid-column:1/-1;margin:0;}
.volunteer-toolbar .button{height:48px;}
.volunteer-counts{margin:0 0 12px;font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);}

/* Table: source proportions at desktop (160/270/100/86/210/260/254 of 1340px). Intermediate
   widths keep the in-card horizontal scroll; stacked mobile cells follow the approved pattern. */
.volunteer-list{margin-top:16px;position:relative;}
.volunteer-list .table-card__head{padding:14px 18px 10px;border-bottom:0;align-items:center;}
.volunteer-list .table-card__head h2{margin:0;}
.volunteer-chip{min-height:32px;padding:0 12px;font:500 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;}
/* Inset is measured from the card's outer edge (border included): 17px margin + 1px border = 18px. */
.volunteer-table{width:calc(100% - 34px);margin:0 17px 16px;}
.volunteer-table th,.volunteer-table td{padding:6px 14px;overflow-wrap:anywhere;}
.volunteer-table thead th{padding:11px 14px 12.5px;}
.volunteer-table td{height:44px;}
.volunteer-table tbody tr:nth-child(even){background:var(--surface-subtle);}
.volunteer-name{font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}
.volunteer-empty-cell{text-align:center;}
.volunteer-empty-cell .empty{margin:0;}
.volunteer-pill--danger{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;color:#9d2433;background:#fdecef;border-radius:var(--radius-full);font:500 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;}
@media (min-width:1181px){
  .volunteer-table{table-layout:fixed;}
  .volunteer-table th:nth-child(1){width:11.791%;}
  .volunteer-table th:nth-child(2){width:17.313%;}
  .volunteer-table th:nth-child(3){width:6.567%;}
  .volunteer-table th:nth-child(4){width:5.821%;}
  .volunteer-table th:nth-child(5){width:13.881%;}
  .volunteer-table th:nth-child(6){width:16.866%;}
  .volunteer-table th:nth-child(7){width:16.269%;}
  .volunteer-table th:nth-child(8){width:11.493%;}
}

/* Detail dialog (max 760px) and intake dialog (max 640px); both keep 16px viewport clearance. */
.modal--volunteer{width:min(640px,calc(100vw - 32px));}
#volunteer-dialog{width:min(760px,calc(100vw - 32px));}
.volunteer-detail{display:flex;flex-direction:column;min-height:0;}
.volunteer-detail__name{margin:0;font:600 18px/26px Inter,ui-sans-serif,system-ui,sans-serif;}
.volunteer-detail__provenance{margin:0;}
.volunteer-detail__data{display:grid;margin:0;}
.volunteer-detail__row{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid var(--line);}
.volunteer-detail__row dt{font:500 13px/18px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);}
.volunteer-detail__row dd{margin:0;font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;overflow-wrap:anywhere;}
.volunteer-tabs{margin:4px 0 0;}
.volunteer-detail .tab-panel{min-height:0;}
.volunteer-detail .event-note{white-space:pre-wrap;}

@media (max-width:1180px){
  .volunteer-charts{grid-template-columns:minmax(0,1fr);}
}
@media (max-width:720px){
  .volunteer-kpis{padding-top:0;}
  .volunteer-charts .chart-card{min-height:0;}
  .volunteer-donut .chart-donut-wrap{grid-template-columns:minmax(0,1fr);gap:12px;padding-left:0;justify-items:center;margin-top:8px;}
  .volunteer-donut .chart-legend{margin:0;width:100%;}
  .volunteer-table{width:100%;margin:0;}
  .volunteer-list .table-card__head{flex-wrap:wrap;align-items:flex-start;}
  .volunteer-chip{max-width:100%;white-space:normal;overflow-wrap:anywhere;}
  .volunteer-detail__row{grid-template-columns:minmax(0,1fr);gap:2px;}
  .volunteer-toolbar{grid-template-columns:minmax(0,1fr);}
  .volunteer-toolbar .button{width:100%;}
}

/* Volunteer dialogs (V360-HTML-03B correction, Sol finding D): the dialog itself is the
   flex container, so its outer box stays inside the viewport with 16px clearance on every
   side. Header and footer keep their place; only the body scrolls. Scoped by ID so the shared
   modal rules that approved modules use are not changed. */
#volunteer-dialog,#volunteer-intake-dialog{flex-direction:column;box-sizing:border-box;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;}
#volunteer-dialog:not([open]),#volunteer-intake-dialog:not([open]){display:none;}
#volunteer-dialog[open],#volunteer-intake-dialog[open]{display:flex;}
#volunteer-dialog > div,#volunteer-intake-dialog > form{flex:1 1 auto;min-height:0;max-height:100%;}
#volunteer-dialog .volunteer-detail__body,#volunteer-intake-dialog .modal__body{flex:1 1 auto;min-height:0;overflow-y:auto;}
.volunteer-detail__record{margin:0;}

/* V360-HTML-03B.1: list tabs, row badge and action, revealed row, in-dialog confirmation and history. */
.volunteer-list-tabs{margin:0 17px 12px;padding-bottom:10px;border-bottom:1px solid var(--line);}
.volunteer-list-tab{min-height:44px;min-width:0;padding:10px 14px;}
.volunteer-list-note{margin:0 17px 10px;}
.volunteer-name-cell{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;}
.volunteer-new-badge{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;color:var(--navy-950);background:var(--info-bg);border:1px solid var(--line);border-radius:var(--radius-full);font:500 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;}
.volunteer-view-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0 12px;color:var(--navy-950);background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;}
.volunteer-view-action__icon{flex:none;}
.volunteer-row--revealed td{background:#fff3c4;transition:background-color .3s ease;}
@media (prefers-reduced-motion:reduce){.volunteer-row--revealed td{transition:none;}}
.volunteer-success{display:flex;flex-direction:column;min-height:0;max-height:100%;}
.volunteer-success__body{display:grid;gap:14px;justify-items:start;}
.volunteer-success__check{color:var(--green);}
.volunteer-success__name{margin:0;font:600 16px/24px Inter,ui-sans-serif,system-ui,sans-serif;overflow-wrap:anywhere;}
.volunteer-success__data{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:0;width:100%;}
.volunteer-success__data div{display:grid;gap:2px;min-width:0;}
.volunteer-success__data dt{font:500 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);}
.volunteer-success__data dd{margin:0;font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;overflow-wrap:anywhere;}
.volunteer-history{display:grid;margin:0;padding:0;list-style:none;}
.volunteer-history li{display:grid;gap:6px;padding:12px 0;border-bottom:1px solid var(--line);min-width:0;overflow-wrap:anywhere;}
.volunteer-history time{font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}
.volunteer-history p{margin:0;}
@media (max-width:720px){.volunteer-success__data{grid-template-columns:minmax(0,1fr);}.volunteer-list-tabs{margin:0 14px 12px;}}

.volunteer-detail__note{display:grid;gap:4px;min-width:0;}
.volunteer-detail__note-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:400 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);}
.volunteer-table td[data-label="Acción"]{padding-top:0;padding-bottom:0;}

/* V360-HTML-03B.1 Correction A/B: visible disclosure after an automatic filter reset. */
.volunteer-reset-notice{margin:0 17px 10px;padding:8px 12px;color:var(--navy-950);background:var(--info-bg);border:1px solid var(--line);border-radius:var(--radius-md);font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}
@media (max-width:720px){.volunteer-reset-notice{margin:0 14px 10px;}}
