.volunteer-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.volunteer-page > * {
    flex: 0 0 auto;
}

.volunteer-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: clamp(26px, 3vw, 38px);
    color: #fff;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    box-shadow: var(--gamify-shadow-purple);
}

.volunteer-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(30, 10, 70, 0.18));
}

.volunteer-hero-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.16;
    background-image:
        radial-gradient(circle at 15% 30%, #fff 1px, transparent 1.5px),
        radial-gradient(circle at 85% 70%, #fff 1px, transparent 1.5px);
    background-size: 38px 38px, 52px 52px;
}

.volunteer-hero-copy {
    align-self: center;
}

.volunteer-hero-badge,
.volunteer-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.volunteer-hero-badge {
    padding: 6px 11px;
    margin-bottom: 13px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.14);
}

.volunteer-hero-badge svg {
    width: 16px;
    height: 16px;
}

.volunteer-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3.2vw, 2.7rem);
    line-height: 1;
}

.volunteer-hero p {
    max-width: 660px;
    margin: 0;
    line-height: 1.5;
    opacity: 0.9;
}

.volunteer-hero-action,
.volunteer-primary-btn,
.volunteer-secondary-btn,
.volunteer-icon-btn {
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.volunteer-hero-action,
.volunteer-primary-btn,
.volunteer-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    font-weight: 750;
    border-radius: var(--control-radius);
}

.volunteer-hero-action {
    align-self: start;
    min-height: 50px;
    padding-inline: 20px;
    color: var(--primary-700);
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.volunteer-primary-btn {
    color: #fff;
    background: var(--primary-600);
}

.volunteer-primary-btn:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.volunteer-secondary-btn {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.volunteer-hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(135px, 0.7fr)) minmax(240px, 1.25fr);
    gap: 10px;
}

.volunteer-hero-stats article {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(10px);
}

.volunteer-hero-stats span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.78;
}

.volunteer-hero-stats strong {
    display: block;
    overflow: hidden;
    font-size: 1.34rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volunteer-next-stat strong {
    font-size: 1rem;
}

.volunteer-chart-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.volunteer-mini-chart {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 5px;
    width: 108px;
    height: 42px;
}

.volunteer-mini-chart span {
    width: 9px;
    min-height: 5px;
    margin: 0;
    border-radius: 4px 4px 2px 2px;
    background: rgba(255, 255, 255, 0.76);
}

.volunteer-tabs {
    display: inline-flex;
    align-self: flex-start;
    gap: 5px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.volunteer-tabs button,
.volunteer-filter-chips button {
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.volunteer-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    color: var(--text-secondary);
    font-weight: 750;
    border-radius: 11px;
    background: transparent;
}

.volunteer-tabs button.active {
    color: var(--primary-700);
    background: var(--primary-50);
}

.volunteer-tabs svg {
    width: 18px;
    height: 18px;
}

.volunteer-tab-panel:not(.active) {
    display: none;
}

.volunteer-people-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: start;
    gap: 22px;
}

.volunteer-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.volunteer-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.volunteer-card-head h2 {
    margin: 5px 0 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.volunteer-card-head p,
.volunteer-section-heading p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.volunteer-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.volunteer-import-panel {
    margin: -4px 0 18px;
    padding: 16px;
    border: 1px solid var(--primary-200);
    border-radius: 15px;
    background: var(--primary-50);
}

.volunteer-import-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.volunteer-import-summary div {
    padding: 10px;
    border-radius: 11px;
    background: var(--bg-primary);
}

.volunteer-import-summary span,
.volunteer-import-panel p {
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.volunteer-import-summary strong {
    display: block;
    font-size: 1.1rem;
}

.volunteer-import-actions {
    display: flex;
    justify-content: flex-end;
}

.volunteer-kicker {
    color: var(--primary-600);
}

.volunteer-count-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: var(--primary-700);
    font-size: 0.76rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    background: var(--primary-50);
}

.volunteer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.volunteer-search {
    position: relative;
    display: block;
    flex: 1 1 220px;
}

.volunteer-search svg {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    transform: translateY(-50%);
    pointer-events: none;
}

.volunteer-search input,
.volunteer-field input,
.volunteer-field textarea {
    width: 100%;
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    outline: none;
    background: var(--input-bg);
    transition: var(--transition);
}

.volunteer-search input {
    min-height: 42px;
    padding: 0 13px 0 40px;
    border-radius: 12px;
}

.volunteer-search input:focus,
.volunteer-field input:focus,
.volunteer-field textarea:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.volunteer-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.volunteer-filter-chips button {
    min-height: 36px;
    padding: 0 11px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 750;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-primary);
}

.volunteer-filter-chips button.active {
    color: var(--primary-700);
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.volunteer-table-wrap {
    overflow-x: auto;
}

.volunteer-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.volunteer-table th {
    padding: 11px 12px;
    color: var(--text-secondary);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.volunteer-table td {
    padding: 13px 12px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    border-bottom: 1px solid var(--border-color);
}

.volunteer-table tbody tr {
    cursor: pointer;
    transition: var(--transition);
}

.volunteer-table tbody tr:hover,
.volunteer-table tbody tr.selected {
    background: var(--primary-50);
}

.volunteer-person-cell,
.volunteer-account-cell,
.volunteer-detail-identity,
.volunteer-responsible-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.volunteer-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    color: var(--primary-700);
    font-size: 0.78rem;
    font-weight: 850;
    border: 2px solid var(--primary-100);
    border-radius: 50%;
    background: var(--primary-50);
}

.volunteer-avatar.large {
    width: 62px;
    height: 62px;
    font-size: 1rem;
}

.volunteer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.volunteer-person-cell strong,
.volunteer-detail-identity strong,
.volunteer-responsible-identity strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volunteer-person-cell small,
.volunteer-detail-identity small,
.volunteer-responsible-identity small {
    display: block;
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.volunteer-account-cell svg {
    width: 15px;
    height: 15px;
    color: var(--success);
}

.volunteer-progress {
    display: inline-flex;
    gap: 4px;
}

.volunteer-progress i {
    display: block;
    width: 8px;
    height: 8px;
    border: 1px solid var(--primary-300);
    border-radius: 50%;
    background: transparent;
}

.volunteer-progress i.filled {
    border-color: var(--primary-500);
    background: var(--primary-500);
}

.volunteer-status {
    display: inline-flex;
    padding: 5px 9px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
}

.volunteer-status.recommended,
.volunteer-status.main-admin {
    color: var(--primary-700);
    background: var(--primary-100);
}

.volunteer-status.active {
    color: var(--success-600);
    background: var(--success-50);
}

.volunteer-detail-card {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.volunteer-empty-detail,
.volunteer-empty {
    color: var(--text-secondary);
    text-align: center;
}

.volunteer-empty-detail {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.volunteer-empty {
    padding: 36px 18px !important;
}

.volunteer-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    color: var(--primary-600);
    border-radius: 16px;
    background: var(--primary-50);
}

.volunteer-empty-detail h2 {
    margin: 0 0 6px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.volunteer-empty-detail p {
    max-width: 260px;
    margin: 0;
    font-size: 0.86rem;
}

.volunteer-detail-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.volunteer-detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0 20px;
}

.volunteer-detail-metrics div {
    padding: 12px;
    border-radius: 13px;
    background: var(--bg-secondary);
}

.volunteer-detail-metrics span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.volunteer-detail-metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

.volunteer-detail-history h3 {
    margin: 0 0 14px;
    font-size: 0.96rem;
}

.volunteer-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.volunteer-timeline-item {
    position: relative;
    padding: 0 0 18px 24px;
}

.volunteer-timeline-item::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: -5px;
    left: 6px;
    width: 1px;
    background: var(--primary-200);
}

.volunteer-timeline-item:last-child::before {
    display: none;
}

.volunteer-timeline-item::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 2px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    background: var(--primary-500);
    box-shadow: 0 0 0 2px var(--primary-200);
}

.volunteer-timeline-item strong {
    display: block;
    font-size: 0.87rem;
}

.volunteer-timeline-item span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.volunteer-activity-list,
.volunteer-responsible-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.volunteer-activity-row,
.volunteer-responsible-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-secondary);
}

.volunteer-activity-row {
    grid-template-columns: minmax(220px, 1.5fr) minmax(130px, 0.8fr) minmax(110px, 0.55fr) minmax(110px, 0.65fr) auto;
}

.volunteer-activity-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.volunteer-activity-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--primary-600);
    border-radius: 13px;
    background: var(--primary-50);
}

.volunteer-activity-main strong,
.volunteer-activity-meta strong {
    display: block;
    color: var(--text-primary);
}

.volunteer-activity-main small,
.volunteer-activity-meta span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.77rem;
}

.volunteer-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.volunteer-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
}

.volunteer-icon-btn:hover {
    color: var(--primary-700);
    border-color: var(--primary-200);
}

.volunteer-icon-btn.danger:hover {
    color: var(--danger);
    border-color: var(--danger-200);
    background: var(--danger-50);
}

.volunteer-icon-btn svg,
.volunteer-primary-btn svg,
.volunteer-secondary-btn svg {
    width: 17px;
    height: 17px;
}

.volunteer-responsible-row {
    grid-template-columns: minmax(200px, 1.15fr) minmax(170px, 0.8fr) minmax(250px, 1.3fr) auto;
}

.volunteer-responsible-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.volunteer-responsible-capabilities span {
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
}

.volunteer-modal-compact {
    width: min(560px, 100%);
}

.volunteer-user-options {
    display: flex;
    max-height: 220px;
    flex-direction: column;
    gap: 7px;
    margin: 10px 0 18px;
    overflow-y: auto;
}

.volunteer-user-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--text-primary);
    text-align: left;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg-secondary);
}

.volunteer-user-option.selected {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.volunteer-user-option strong,
.volunteer-user-option small {
    display: block;
}

.volunteer-user-option small {
    color: var(--text-secondary);
}

.volunteer-permission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.volunteer-permission-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.82rem;
    border-radius: 11px;
    background: var(--bg-secondary);
}

.volunteer-permission-grid input {
    accent-color: var(--primary-600);
}

.volunteer-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
}

.volunteer-modal-overlay[hidden] {
    display: none;
}

.volunteer-modal {
    width: min(760px, 100%);
    max-height: min(90vh, 860px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
}

.volunteer-modal form {
    display: flex;
    max-height: inherit;
    flex-direction: column;
}

.volunteer-modal-header,
.volunteer-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
}

.volunteer-modal-header {
    border-bottom: 1px solid var(--border-color);
}

.volunteer-modal-header h2 {
    margin: 4px 0 0;
    font-size: 1.25rem;
}

.volunteer-modal-body {
    overflow-y: auto;
    padding: 22px;
}

.volunteer-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.volunteer-field-grid {
    display: grid;
    grid-template-columns: 1fr 0.38fr;
    gap: 14px;
}

.volunteer-field-wide {
    grid-column: 1 / -1;
}

.volunteer-field span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 0.79rem;
    font-weight: 750;
}

.volunteer-field input,
.volunteer-field textarea {
    min-height: 43px;
    padding: 10px 12px;
    border-radius: 11px;
    resize: vertical;
}

.volunteer-participant-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.volunteer-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.volunteer-section-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.volunteer-section-heading > strong {
    color: var(--primary-700);
    font-size: 0.8rem;
}

.volunteer-participant-section .volunteer-filter-chips {
    margin: 10px 0;
}

.volunteer-participant-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: 270px;
    overflow-y: auto;
}

.volunteer-participant-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg-secondary);
}

.volunteer-participant-option:has(input:checked) {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.volunteer-participant-option input {
    accent-color: var(--primary-600);
}

.volunteer-participant-option .volunteer-avatar {
    width: 34px;
    height: 34px;
}

.volunteer-participant-option strong {
    display: block;
    font-size: 0.8rem;
}

.volunteer-participant-option small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

@media (max-width: 1180px) {
    .volunteer-hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .volunteer-chart-stat {
        grid-column: 1 / -1;
    }

    .volunteer-people-layout {
        grid-template-columns: 1fr;
    }

    .volunteer-detail-card {
        position: static;
    }

    .volunteer-activity-row,
    .volunteer-responsible-row {
        grid-template-columns: 1fr 1fr;
    }

    .volunteer-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .volunteer-page {
        gap: 16px;
    }

    .volunteer-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .volunteer-hero-action {
        width: 100%;
    }

    .volunteer-hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .volunteer-chart-stat {
        grid-column: 1 / -1;
    }

    .volunteer-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .volunteer-tabs button {
        flex: 1 0 auto;
        justify-content: center;
        padding-inline: 12px;
    }

    .volunteer-card {
        padding: 16px;
    }

    .volunteer-card-head {
        flex-direction: column;
    }

    .volunteer-card-head .volunteer-primary-btn {
        width: 100%;
    }

    .volunteer-admin-actions,
    .volunteer-admin-actions > button {
        width: 100%;
    }

    .volunteer-table {
        min-width: 0;
    }

    .volunteer-table thead {
        display: none;
    }

    .volunteer-table,
    .volunteer-table tbody,
    .volunteer-table tr,
    .volunteer-table td {
        display: block;
        width: 100%;
    }

    .volunteer-table tr {
        position: relative;
        margin-bottom: 10px;
        padding: 13px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
    }

    .volunteer-table td {
        padding: 5px 0;
        border: 0;
    }

    .volunteer-table td:nth-child(2),
    .volunteer-table td:nth-child(4) {
        display: none;
    }

    .volunteer-table td:nth-child(3),
    .volunteer-table td:nth-child(5) {
        display: inline-block;
        width: auto;
        margin: 5px 12px 0 0;
        font-size: 0.76rem;
    }

    .volunteer-table td:nth-child(6) {
        position: absolute;
        top: 13px;
        right: 12px;
        width: auto;
    }

    .volunteer-activity-row,
    .volunteer-responsible-row {
        grid-template-columns: 1fr;
    }

    .volunteer-field-grid,
    .volunteer-participant-list,
    .volunteer-permission-grid,
    .volunteer-import-summary {
        grid-template-columns: 1fr;
    }

    .volunteer-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .volunteer-modal {
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
    }
}

@media (max-width: 430px) {
    .volunteer-hero-stats {
        grid-template-columns: 1fr;
    }

    .volunteer-chart-stat {
        grid-column: auto;
    }

    .volunteer-detail-metrics {
        grid-template-columns: 1fr;
    }
}

/* Voluntariat responsive polish */
.volunteer-mobile-header,
.volunteer-detail-sheet-overlay,
.volunteer-submit-label-mobile {
    display: none;
}

.volunteer-hero {
    gap: 14px 20px;
    min-height: 0;
    max-height: 220px;
    padding: 22px 28px;
}

.volunteer-hero-badge {
    margin-bottom: 8px;
}

.volunteer-hero h1 {
    margin-bottom: 5px;
    font-size: clamp(1.75rem, 2.5vw, 2.2rem);
}

.volunteer-hero p {
    font-size: 0.9rem;
}

.volunteer-hero-action {
    min-height: 44px;
}

.volunteer-hero-stats article {
    padding: 10px 13px;
    border-radius: 13px;
}

.volunteer-hero-stats strong {
    font-size: 1.14rem;
}

.volunteer-table {
    min-width: 0;
    table-layout: fixed;
}

.volunteer-table th:nth-child(1) { width: 28%; }
.volunteer-table th:nth-child(2) { width: 20%; }
.volunteer-table th:nth-child(3) { width: 13%; }
.volunteer-table th:nth-child(4) { width: 10%; }
.volunteer-table th:nth-child(5) { width: 16%; }
.volunteer-table th:nth-child(6) { width: 13%; }

.volunteer-table th,
.volunteer-table td {
    padding-inline: 9px;
}

.volunteer-table td {
    padding-block: 10px;
}

.volunteer-table td:last-child {
    overflow: visible;
    white-space: nowrap;
}

.volunteer-account-cell span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volunteer-status {
    max-width: 100%;
    white-space: nowrap;
}

.volunteer-detail-card {
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
    padding: 18px;
}

.volunteer-empty-detail {
    min-height: 245px;
    padding: 18px;
}

.volunteer-detail-top {
    padding-bottom: 13px;
}

.volunteer-detail-metrics {
    margin: 12px 0;
}

.volunteer-detail-metrics div {
    padding: 10px;
}

.volunteer-profile-trigger,
.volunteer-profile-text {
    margin: 0;
    padding: 0;
    color: inherit;
    text-align: left;
    border: 0;
    cursor: pointer;
    background: transparent;
}

.volunteer-profile-trigger {
    display: inline-flex;
    flex: 0 0 auto;
    border-radius: 50%;
}

.volunteer-profile-trigger:focus-visible,
.volunteer-profile-text:focus-visible,
.volunteer-profile-action:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.volunteer-profile-text:hover strong,
.volunteer-profile-text:hover small {
    color: var(--primary-700);
}

.volunteer-profile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 38px;
    margin-bottom: 16px;
    color: var(--primary-700);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid var(--primary-200);
    border-radius: 11px;
    cursor: pointer;
    background: var(--primary-50);
}

.volunteer-profile-action svg {
    width: 16px;
    height: 16px;
}

.volunteer-modal-header {
    padding-block: 14px;
}

.volunteer-modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.volunteer-modal-footer .volunteer-primary-btn,
.volunteer-modal-footer .volunteer-secondary-btn {
    min-width: 126px;
    white-space: nowrap;
}

.volunteer-user-options {
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.volunteer-user-options > .volunteer-empty {
    padding: 16px 10px !important;
}

.volunteer-user-option {
    width: 100%;
    font: inherit;
    appearance: none;
}

.volunteer-user-option:hover,
.volunteer-user-option:focus-visible,
.volunteer-user-option.selected {
    color: var(--text-primary);
    border-color: var(--primary-300);
    outline: none;
    background: var(--primary-50);
}

body.volunteer-modal-open,
body.volunteer-sheet-open {
    overflow: hidden;
}

@media (max-width: 1180px) and (min-width: 721px) {
    .volunteer-hero {
        max-height: none;
    }

    .volunteer-hero-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .volunteer-chart-stat {
        grid-column: auto;
    }

    .volunteer-people-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 14px;
    }

    .volunteer-list-card {
        padding: 16px;
    }
}

@media (max-width: 1500px) and (min-width: 721px) {
    .volunteer-table th:nth-child(4),
    .volunteer-table td:nth-child(4) {
        display: none;
    }

    .volunteer-table th:nth-child(1) { width: 29%; }
    .volunteer-table th:nth-child(2) { width: 21%; }
    .volunteer-table th:nth-child(3) { width: 14%; }
    .volunteer-table th:nth-child(5) { width: 20%; }
    .volunteer-table th:nth-child(6) { width: 16%; }
}

@media (max-width: 720px) {
    .volunteer-page {
        gap: 10px;
        padding-inline: 10px;
        padding-top: 10px;
        overflow-x: clip;
    }

    .volunteer-hero {
        display: none !important;
    }

    .volunteer-mobile-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 10px;
        padding: 11px 12px;
        border: 1px solid var(--border-color);
        border-radius: 15px;
        background: var(--bg-primary);
        box-shadow: var(--shadow-sm);
    }

    .volunteer-mobile-header h1 {
        margin: 2px 0 0;
        font-size: 1.25rem;
        line-height: 1.1;
    }

    .volunteer-mobile-add {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        color: #fff;
        border: 0;
        border-radius: 11px;
        background: var(--primary-600);
    }

    .volunteer-mobile-add svg {
        width: 18px;
        height: 18px;
    }

    .volunteer-mobile-summary {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .volunteer-mobile-summary span {
        max-width: 100%;
        padding: 4px 7px;
        overflow: hidden;
        color: var(--text-secondary);
        font-size: 0.66rem;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-radius: var(--radius-full);
        background: var(--bg-secondary);
    }

    .volunteer-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-self: stretch;
        width: 100%;
        gap: 3px;
        padding: 4px;
        overflow: visible;
        border-radius: 13px;
    }

    .volunteer-tabs button {
        min-width: 0;
        min-height: 36px;
        padding: 0 5px;
        gap: 4px;
        overflow: hidden;
        font-size: clamp(0.66rem, 2.8vw, 0.76rem);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .volunteer-tabs svg {
        flex: 0 0 auto;
        width: 14px;
        height: 14px;
    }

    .volunteer-card {
        padding: 12px;
        border-radius: 15px;
    }

    .volunteer-card-head {
        gap: 8px;
        margin-bottom: 10px;
    }

    .volunteer-card-head h2 {
        margin-top: 2px;
        font-size: 1rem;
    }

    .volunteer-card-head p,
    .volunteer-kicker {
        font-size: 0.66rem;
    }

    .volunteer-count-pill {
        padding: 4px 7px;
        font-size: 0.65rem;
    }

    .volunteer-toolbar {
        display: block;
        margin-bottom: 8px;
    }

    .volunteer-search input {
        min-height: 38px;
    }

    .volunteer-filter-chips {
        gap: 5px;
        margin-top: 7px;
    }

    .volunteer-filter-chips button {
        min-height: 28px;
        padding: 0 8px;
        font-size: 0.64rem;
    }

    .volunteer-table tr {
        min-height: 78px;
        margin-bottom: 6px;
        padding: 9px 10px;
        border-radius: 12px;
        background: var(--bg-primary);
    }

    .volunteer-table td {
        padding: 2px 0;
    }

    .volunteer-table td:first-child {
        padding-right: 78px;
    }

    .volunteer-table td:nth-child(3),
    .volunteer-table td:nth-child(5) {
        margin: 4px 8px 0 0;
        font-size: 0.68rem;
    }

    .volunteer-table td:nth-child(6) {
        top: 9px;
        right: 9px;
    }

    .volunteer-person-cell {
        gap: 8px;
    }

    .volunteer-avatar {
        width: 34px;
        height: 34px;
    }

    .volunteer-person-cell strong {
        font-size: 0.78rem;
    }

    .volunteer-person-cell small {
        font-size: 0.65rem;
    }

    .volunteer-status {
        padding: 4px 7px;
        font-size: 0.61rem;
    }

    .volunteer-detail-card {
        display: none;
    }

    .volunteer-people-layout {
        display: block;
    }

    .volunteer-activity-row,
    .volunteer-responsible-row {
        position: relative;
        gap: 8px;
        padding: 10px;
        border-radius: 12px;
    }

    .volunteer-activity-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .volunteer-activity-main {
        grid-column: 1 / -1;
    }

    .volunteer-activity-icon {
        width: 35px;
        height: 35px;
        border-radius: 10px;
    }

    .volunteer-activity-meta {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 3px 5px;
        font-size: 0.72rem;
    }

    .volunteer-activity-meta strong,
    .volunteer-activity-meta span {
        font-size: 0.68rem;
    }

    .volunteer-activity-row .volunteer-row-actions {
        grid-column: 2;
        grid-row: 2 / span 2;
        align-self: center;
    }

    .volunteer-responsible-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .volunteer-responsible-row > :nth-child(2),
    .volunteer-responsible-capabilities {
        grid-column: 1 / -1;
    }

    .volunteer-responsible-row .volunteer-row-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .volunteer-responsible-capabilities span {
        padding: 3px 6px;
        font-size: 0.62rem;
    }

    .volunteer-admin-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .volunteer-admin-actions,
    .volunteer-admin-actions > button {
        width: 100%;
    }

    .volunteer-admin-actions button {
        min-width: 0;
        min-height: 38px;
        padding-inline: 8px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    #volunteerAddActivitySecondaryBtn {
        display: none !important;
    }

    .volunteer-detail-sheet-overlay {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: flex;
        align-items: flex-end;
        background: rgba(15, 23, 42, 0.58);
        backdrop-filter: blur(4px);
    }

    .volunteer-detail-sheet-overlay[hidden] {
        display: none;
    }

    .volunteer-detail-sheet {
        width: 100%;
        max-height: 85dvh;
        overflow: hidden;
        border-radius: 22px 22px 0 0;
        background: var(--bg-primary);
        box-shadow: var(--shadow-xl);
    }

    .volunteer-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 13px 15px;
        border-bottom: 1px solid var(--border-color);
    }

    .volunteer-sheet-header h2 {
        margin: 2px 0 0;
        font-size: 1.05rem;
    }

    .volunteer-detail-sheet-body {
        max-height: calc(85dvh - 64px);
        padding: 15px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .volunteer-modal-overlay {
        align-items: flex-end;
    }

    .volunteer-modal {
        width: 100%;
        max-height: 85dvh;
        border-radius: 22px 22px 0 0;
    }

    .volunteer-modal-header,
    .volunteer-modal-footer {
        padding: 12px 14px;
    }

    .volunteer-modal-header h2 {
        font-size: 1.05rem;
    }

    .volunteer-modal-body {
        padding: 14px;
        overscroll-behavior: contain;
    }

    .volunteer-modal-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .volunteer-modal-footer .volunteer-primary-btn,
    .volunteer-modal-footer .volunteer-secondary-btn {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding-inline: 10px;
        white-space: nowrap;
    }

    .volunteer-submit-label-desktop {
        display: none;
    }

    .volunteer-submit-label-mobile {
        display: inline;
    }

    .volunteer-field-grid,
    .volunteer-permission-grid,
    .volunteer-participant-list {
        grid-template-columns: 1fr;
    }

    .volunteer-permission-grid {
        gap: 6px;
    }

    .volunteer-permission-grid label {
        min-height: 38px;
        padding: 7px 9px;
        font-size: 0.75rem;
    }

    .volunteer-user-options {
        max-height: 180px;
        margin: 7px 0 12px;
    }

    .volunteer-user-option {
        padding: 7px;
    }

    .volunteer-participant-section {
        margin-top: 14px;
        padding-top: 14px;
    }

    .volunteer-participant-list {
        max-height: 235px;
    }

    .volunteer-participant-option {
        min-height: 54px;
        padding: 7px;
    }

    .volunteer-empty {
        padding: 18px 10px !important;
    }
}

@media (max-width: 370px) {
    .volunteer-tabs button {
        gap: 2px;
        font-size: 0.63rem;
    }

    .volunteer-tabs svg {
        width: 12px;
        height: 12px;
    }

    .volunteer-admin-actions {
        grid-template-columns: 1fr;
    }
}

/* Compact voluntariat refresh overrides */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.volunteer-compact-select select,
.volunteer-sort-select select,
.volunteer-extra-details input,
.volunteer-extra-details textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--control-radius);
    color: var(--text-primary);
    background: var(--bg-primary);
}

.volunteer-compact-select select,
.volunteer-sort-select select {
    padding: 0 34px 0 12px;
    font-weight: 750;
}

.volunteer-toolbar {
    grid-template-columns: minmax(190px, 1fr) auto auto;
}

.volunteer-meta-pair {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 0.86rem;
    font-weight: 750;
    white-space: nowrap;
}

.volunteer-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.volunteer-avatar.large {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
}

.volunteer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.volunteer-profile-trigger {
    flex: 0 0 auto;
}

.volunteer-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.volunteer-detail-metrics div {
    min-height: 64px;
    padding: 10px;
}

.volunteer-detail-metrics span {
    margin-bottom: 4px;
    font-size: 0.72rem;
}

.volunteer-detail-metrics strong {
    font-size: 1rem;
}

.volunteer-preset-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.volunteer-preset-row button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-full);
    color: var(--primary-700);
    background: var(--primary-50);
    font-weight: 750;
}

.volunteer-extra-details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    background: var(--bg-secondary);
}

.volunteer-extra-details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--text-primary);
}

.volunteer-extra-details .volunteer-field {
    margin-top: 10px;
}

.volunteer-photo-modal {
    position: relative;
    width: min(92vw, 520px);
    padding: 12px;
    background: var(--bg-primary);
}

.volunteer-photo-modal img {
    display: block;
    width: 100%;
    max-height: min(78vh, 640px);
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.volunteer-photo-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 720px) {
    .volunteer-page {
        gap: 12px;
    }

    .volunteer-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .volunteer-compact-select select {
        min-width: 0;
    }

    .volunteer-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .volunteer-filter-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .volunteer-table td:nth-child(2),
    .volunteer-table td:nth-child(3) {
        display: block;
        padding-top: 0;
    }

    .volunteer-table td:nth-child(4) {
        padding-top: 8px;
    }

    .volunteer-meta-pair {
        white-space: normal;
    }

    .volunteer-modal-body {
        padding-bottom: 96px;
    }

    .volunteer-modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 3;
        background: var(--bg-primary);
    }

    .volunteer-participant-section .volunteer-sort-select {
        display: block;
        margin-top: 8px;
    }
}

/* Targeted cleanup after compact refresh */
.volunteer-tabs {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.volunteer-view-switch {
    display: inline-grid;
    grid-template-columns: minmax(84px, auto) 38px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    background: var(--bg-primary);
}

.volunteer-view-label,
.volunteer-view-chevron {
    border: 0;
    font: inherit;
    cursor: pointer;
    background: transparent;
}

.volunteer-view-label {
    justify-content: center;
    min-width: 88px;
    padding: 0 13px;
    color: var(--primary-700);
    font-weight: 800;
}

.volunteer-view-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    border-left: 1px solid var(--border-color);
    color: var(--primary-700);
}

.volunteer-view-chevron svg,
.volunteer-view-chevron i {
    display: block;
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.volunteer-view-label,
.volunteer-view-chevron,
.volunteer-tabs button {
    min-height: 40px;
}

.volunteer-tabs button {
    justify-content: center;
    height: 40px;
}

.volunteer-table {
    table-layout: fixed;
}

.volunteer-table th:nth-child(1) {
    width: 66%;
}

.volunteer-table th:nth-child(2) {
    width: 34%;
}

.volunteer-person-cell {
    min-width: 0;
}

.volunteer-person-text {
    min-width: 0;
}

.volunteer-person-text strong,
.volunteer-person-text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volunteer-table tbody tr {
    cursor: pointer;
}

.volunteer-meta-pair {
    min-height: 26px;
    padding-inline: 9px;
    font-size: 0.82rem;
}

.volunteer-extra-details {
    padding: 0;
    border: 0;
    background: transparent;
}

.volunteer-extra-details summary {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 2px;
    border-radius: var(--control-radius);
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.volunteer-extra-details summary::marker {
    color: var(--primary-600);
}

.volunteer-extra-details[open] {
    padding-top: 4px;
}

.volunteer-extra-details .volunteer-field {
    margin-top: 8px;
}

.volunteer-modal {
    display: flex;
    flex-direction: column;
}

.volunteer-modal form {
    width: 100%;
    min-height: 0;
}

.volunteer-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: 16px;
}

.volunteer-modal-footer {
    flex: 0 0 auto;
    position: static;
}

.volunteer-participant-section {
    margin-top: 16px;
    padding-top: 14px;
}

.volunteer-participant-section .volunteer-search {
    margin-bottom: 8px;
}

.volunteer-participant-section .volunteer-filter-chips {
    margin: 8px 0;
}

.volunteer-participant-section .volunteer-sort-select {
    display: block;
    margin-bottom: 12px;
}

.volunteer-participant-list {
    max-height: min(34dvh, 320px);
}

.volunteer-group-filter-modal {
    width: min(92vw, 430px);
    max-height: min(80vh, 520px);
}

.volunteer-group-filter-modal .volunteer-modal-header {
    align-items: flex-start;
    padding: 16px 18px 12px;
}

.volunteer-group-filter-modal .volunteer-modal-header h2 {
    min-width: 0;
    margin: 0;
    padding-right: 8px;
    font-size: 1rem;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

.volunteer-group-filter-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px 18px;
    width: 100%;
}

.volunteer-group-filter-options button {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-weight: 750;
    white-space: normal;
    cursor: pointer;
}

.volunteer-group-filter-options button.active {
    color: var(--primary-700);
    border-color: var(--primary-200);
    background: var(--primary-50);
}

@media (max-width: 720px) {
    .volunteer-tabs {
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
        padding: 4px;
    }

    .volunteer-view-switch {
        width: 100%;
        min-width: 0;
    }

    .volunteer-tabs button {
        min-width: 118px;
        padding-inline: 12px;
    }

    .volunteer-table,
    .volunteer-table tbody,
    .volunteer-table tr,
    .volunteer-table td {
        width: 100%;
    }

    .volunteer-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .volunteer-table td {
        display: block;
        padding: 0;
    }

    .volunteer-table td:nth-child(2) {
        padding-left: 50px;
    }

    .volunteer-meta-pair {
        width: fit-content;
        max-width: 100%;
    }

    .volunteer-avatar {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .volunteer-modal {
        max-height: 88dvh;
    }

    .volunteer-modal-body {
        padding: 12px 14px 14px;
    }

    .volunteer-modal-footer {
        position: static;
        padding: 10px 14px;
    }

    .volunteer-participant-list {
        max-height: 30dvh;
    }

    .volunteer-group-filter-modal {
        width: min(100%, 390px);
        border-radius: 20px 20px 0 0;
    }

    .volunteer-group-filter-modal .volunteer-modal-header {
        gap: 10px;
        padding: 14px 16px 10px;
    }

    .volunteer-group-filter-modal .volunteer-modal-header h2 {
        font-size: 0.98rem;
    }
}
