/* Font Faces */
@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-Bold.woff) format("woff");
}

@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-BoldItalic.woff) format("woff");
}

@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-Italic.woff) format("woff");
}

@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-Light.woff) format("woff");
}

@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-LightItalic.woff) format("woff");
}

@font-face {
    font-family: InriaSans;
    font-style: normal;
    font-display: swap;
    src: url(../font/InriaSans-Regular.woff) format("woff");
}

/* Keyframes */
@keyframes fadein {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Normalize.css & Global Styles */
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
html {
    height: 100%;
    line-height: 1.15;
    background: #cdcdcd;
    background-attachment: fixed;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: InriaSans, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

*,
::after,
::before {
    box-sizing: border-box;
}

article,
aside,
figcaption,
figure,
footer,
header,
main,
nav,
section,
details,
menu {
    display: block;
}

figure {
    margin: 1em 40px;
}

hr {
    overflow: visible;
    height: 0;
    box-sizing: content-box;
}

pre,
code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

dfn {
    font-style: italic;
}

mark {
    color: #000;
    background-color: #ff0;
}

small {
    font-size: 80%;
}

img {
    border-style: none;
}

svg:not(:root) {
    overflow: hidden;
}

button,
input,
optgroup,
select,
textarea {
    margin: 0;
    font: inherit;
    font-size: 100%;
    line-height: 1.15;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

[type=reset],
[type=submit],
button,
html [type=button] {
    -webkit-appearance: button;
}

[type=button]::-moz-focus-inner,
[type=reset]::-moz-focus-inner,
[type=submit]::-moz-focus-inner,
button::-moz-focus-inner {
    padding: 0;
    border-style: none;
}

[type=button]:-moz-focusring,
[type=reset]:-moz-focusring,
[type=submit]:-moz-focusring,
button:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: .35em .75em .625em;
}

legend {
    display: table;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
    color: inherit;
    white-space: normal;
}

progress {
    display: inline-block;
    vertical-align: baseline;
}

.progress-bar {
    min-height: 20px;
    border-radius: 10px;
    background-color: #007bff;
    transition: width 0.3s ease-in-out;
}

.progress-bar.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

textarea {
    overflow: auto;
}

[type=checkbox],
[type=radio] {
    padding: 0;
    box-sizing: border-box;
}

[type=number]::-webkit-inner-spin-button,
[type=number]::-webkit-outer-spin-button {
    height: auto;
}

[type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type=search]::-webkit-search-cancel-button,
[type=search]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    font: inherit;
    -webkit-appearance: button;
}

summary {
    display: list-item;
}

canvas {
    display: inline-block;
}

template,
[hidden] {
    display: none;
}

b {
    font-weight: 800;
}

/* Headings */
h1 {
    margin: .67em 0;
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
    font-weight: 750;
    text-align: center;
}

h3 {
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    color: #fff;
}

h4 {
    font-size: 0.9em;
    font-weight: 300;
    text-align: center;
    color: #fff;
}

/* Links & Buttons (General) */
a,
button.faux-link {
    position: relative;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background-color: transparent;
    transition: all .2s ease;
    -webkit-text-decoration-skip: objects;
}

a::after,
button.faux-link::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width .2s ease;
    transform: translateX(-50%);
    content: '';
}

a:focus,
a:hover,
button.faux-link:focus,
button.faux-link:hover {
    outline: 0;
    border-bottom-color: transparent;
}

a.tab-focus,
button.tab-focus.faux-link {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
    outline: 0;
}

a.no-border::after,
button.no-border.faux-link::after {
    display: none;
}

.no-border {
    border: 0;
}

button.faux-link {
    position: relative;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    font: inherit;
    line-height: 1.75;
    text-align: inherit;
    text-shadow: inherit;
    background: 0 0;
    cursor: pointer;
    -moz-user-select: text;
    vertical-align: baseline;
}

/* Icons */
.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: -3px;
}

a svg,
button svg,
button.faux-link svg,
label svg {
    pointer-events: none;
}

.btn .icon,
a .icon,
button.faux-link .icon {
    margin-right: 6px;
}

.home-icon {
    font-size: 30px;
    cursor: pointer;
}

/* Buttons (Specific) */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 15px;
    padding-right: 20px;
    padding-left: 20px;
    border: 0;
    border-radius: 4px;
    font-weight: 600;
    text-shadow: none;
    color: #55646b;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    transition: all .2s ease;
    user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    vertical-align: middle;
}

.button:focus,
.button:hover {
    color: #343f4a;
}

.button:focus::after,
.button:hover::after {
    display: none;
}

.button:hover {
    box-shadow: 0 2px 2px rgba(0, 0, 0, .1);
    transform: translateY(-1px);
}

.button:focus {
    outline: 0;
}

.button.tab-focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
    outline: 0;
}

.button:active {
    transform: translateY(1px);
}

.button--with-count {
    display: inline-flex;
}

.button--with-count .button .icon {
    flex-shrink: 0;
}

.button__count {
    margin-left: 10px;
    animation: fadein .2s ease;
}

.button__count::before {
    position: absolute;
    top: 50%;
    right: 100%;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    transform: translateY(-50%);
    border-left-width: 0;
    border-right-color: #fff;
    content: '';
}

/* Custom Buttons */
.button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.button:active {
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
    transform: translateY(0);
}

.custom-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    background-color: #4CAF50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.custom-button:hover {
    background-color: #45a049;
}
.custom-button.delete {
    background-color: #f44336;
}
.custom-button.delete:hover {
    background-color: #da190b;
}
.custom-button.edit {
    background-color: #2196F3;
}
.custom-button.edit:hover {
    background-color: #0b7dda;
}
.custom-button.save {
    background-color: #ff9800;
}
.custom-button.save:hover {
    background-color: #e68a00;
}
.custom-button.draw {
    background-color: #9C27B0;
}
.custom-button.draw:hover {
    background-color: #8e24aa;
}
.custom-button.info {
    background-color: #607D8B;
}
.custom-button.info:hover {
    background-color: #455A64;
}
.custom-button.undo-redo {
    background-color: #757575;
}
.custom-button.undo-redo:hover:not(:disabled) {
    background-color: #616161;
}
.custom-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.custom-button.map-toggle {
    background-color: #009688;
}
.custom-button.map-toggle:hover {
    background-color: #00796B;
}
/* Nuovo stile per il pulsante Modifica senza XML */
.custom-button.edit.no-xml-link {
    background-color: #f97316;
}
.custom-button.edit.no-xml-link:hover {
    background-color: #ea580c;
}

/* Layouts & Containers */
.grid {
    flex: 1;
    overflow: auto;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

main {
    margin: auto;
    padding-bottom: 1px;
    text-align: center;
}

aside {
    position: relative;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px;
    text-align: center;
    text-shadow: none;
    color: #55646b;
    background: #fff;
}

aside .icon {
    margin-right: 10px;
    fill: #7b7b7b;
}

aside p {
    margin: 0;
}

aside a,
aside button.faux-link {
    color: #7b7b7b;
}

aside a.tab-focus,
aside button.tab-focus.faux-link {
    box-shadow: 0 0 0 3px rgba(75, 170, 244, .35);
    outline: 0;
}

header {
    padding-bottom: 20px;
    text-align: center;
}

header .call-to-action {
    margin-top: 30px;
}

.flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 12px;
    text-align: center;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.responsive-container-3-col {
    display: flex;
    flex-wrap: wrap;
}

.responsive-item-3-col {
    flex: 1;
    padding-right: 20px;
}

.responsive-container-2-col {
    display: flex;
    flex-wrap: wrap;
}

.responsive-item-2-col {
    flex: 1;
}

.responsive-item-2-col.left-padding {
    padding-right: 20px;
}

.responsive-item-2-col.right-padding {
    padding-left: 20px;
}

/* Utility Classes */
.mini {
    width: 150px !important;
    height: 150px !important;
}

.small-text {
    margin-top: 20px;
    font-size: 0.8em;
    color: #7f8c8d;
}

ul.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0px;
}

ul.menu li {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-around;
    width: 325px;
    height: auto;
    margin: 10px 2px;
    padding: 5px;
    border: 1px solid white;
    background-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.25);
}

ul.menu h2,
ul.menu h3,
ul.menu h4 {
    margin: 0px;
    text-align: center;
    color: #fff;
}

ul.menu h3 {
    font-size: 1.5em;
    font-weight: 700;
}

ul.menu h4 {
    font-size: 1.2em;
    font-weight: 300;
}

/* Item Styles */
.menu-item, {
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 10px;
}

.content-section {
    margin: 20px 0;
    padding: 25px;
    border-radius: 12px;
    background: transparent;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color, #007bff);
    font-size: 22px;
    gap: 10px;
}

.export-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.anno-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 180px;
}

.anno-select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.export-btn {
    padding: 8px 16px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.export-btn:hover {
    background: #1e3a6b;
}

.export-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.export-btn i {
    font-size: 16px;
}

.header-filters-search-notifications {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rapporti-grid {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 20px;
    gap: 20px;
}

.rapporto-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rapporto-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rapporto-name {
    text-align: left;
}

.rapporto-badge {
    text-align: right;
}

.rapporto-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.rapporto-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.rapporto-info {
    flex: 1;
    gap: 16px;
}

.info-section {
    margin-bottom: 16px;
}

.info-section h5 {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #374151;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.status-attivo {
    color: #065f46;
    background-color: #d1fae5;
}

.status-pioniere {
    color: #92400e;
    background-color: #fef3c7;
}

.status-pioniere-ausiliario {
    color: #1e40af;
    background-color: #dbeafe;
}

.status-irregolare {
    background-color: #ffc107 !important;
    color: #000 !important;
    font-weight: bold;
}

.status-inattivo {
    background-color: #dc3545 !important;
    color: white !important;
    font-weight: bold;
}

.status-group {
    color: #991b1b;
    background-color: #fee2e2;
}

.status-partecipato {
    color: #065f46;
    background-color: #d1fae5;
}

.status-non-partecipato {
    color: #6b7280;
    background-color: #f3f4f6;
}

.rapporto-actions {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.month-group {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.accordion-header {
    padding: 20px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transition: all 0.2s ease;
    cursor: pointer;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Paginazione migliorata */
.pagination-controls {
    margin: 0;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    background: #f8fafc;
}

.pagination-controls button {
    margin: 0 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-controls button:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

#rapportiRecentContainer {
    width: 100%;
    padding: 20px;
}

#presenzeRecentContainer {
    width: 100%;
    padding: 20px;
}

#gruppiContainer {
    width: 100%;
    padding: 20px;
}

#pdfContainer {
    width: 100%;
    padding: 20px;
}

#organigrammaContainer {
    width: 100%;
    padding: 20px;
}

#repartiContainer {
    width: 100%;
    padding: 20px;
}

#tableViewContainer {
    width: 100%;
    padding: 20px;
}

.presenze-card {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    padding: 25px;
    border: 1px solid var(--border-color, #e9ecef);
    border-left: 5px solid var(--primary-color, #007bff);
    border-radius: 12px;
    background: var(--card-background, #ffffff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    list-style: none;
}

.presenze-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.presenze-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.presenze-date {
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary, #333);
}

.presenze-week {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #007bff);
    background: rgba(0, 123, 255, 0.1);
}

.presenze-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
    gap: 25px;
}

.presenze-group {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary, #666);
}

.presenze-group strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

/* Style the presenze numbers similar to status-extra spans */
.presenze-numbers {
    display: inline-block;
    margin: 2px 0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color, #007bff);
    background: rgba(0, 123, 255, 0.05);
}

.presenze-total {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--success-color, #28a745), #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.no-data {
    margin: 20px 0;
    padding: 40px;
    border: 2px dashed var(--border-color, #e9ecef);
    border-radius: 12px;
    font-style: italic;
    text-align: center;
    color: var(--text-secondary, #666);
    background: var(--card-background, #ffffff);
}

.totale-display {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 2.625em;
    padding: 0 .75em;
    margin: 5px 0px;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--text-primary, #000);
    background: linear-gradient(135deg, var(--success-color, #28a745), #20c997);
}

.form-field {
    display: flex;
    flex-direction: column;    
    width: 100%;
}

.form-field label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #666);
}

.form-field input,
.form-field select {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    font-size: 16px;
    color: var(--text-primary, #333);
    background: var(--input-background, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.group-container {
    margin-bottom: 30px;
}

.group-header-card {
    margin-bottom: 15px;
}

.group-actions-inline {
    display: flex;
    gap: 5px;
}

/* Override per membri nei gruppi */
.group-container .proclamatori-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.group-container .proclamatore-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.group-container .proclamatore-actions {
    justify-content: center;
}

.proclamatore-card.female-member .proclamatore-header {
    background: linear-gradient(135deg, #cd688a 0%, #d5a172 100%) !important;
}

/* Responsive per gruppi */
@media (max-width: 768px) {
    .group-header-card .proclamatore-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .group-actions-inline {
        justify-content: center;
    }
}

/* Ottimizzazione per pulsanti inline */
.group-container .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-container .info-value {
    flex: 1;
}

.group-container .action-btn {
    flex-shrink: 0;
}

/* Grid per visualizzare più gruppi per riga */
.gruppi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    margin: 20px 0;
    padding: 20px;
    gap: 20px;
}

/* Assicura che i gruppi abbiano altezza uniforme */
.group-container {
    display: flex;
    flex-direction: column;
    height: fit-content;
    margin-bottom: 0;
}

/* Modifica per i membri all'interno di ogni gruppo */
.group-container .proclamatori-grid {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    gap: 8px;
}

/* Stili specifici per contatti di emergenza */
.emergency-contact .proclamatore-header {
    background: linear-gradient(135deg, #dc3545, #a71e2a) !important;
}

.emergency-contact .action-btn.action-phone:nth-of-type(3) {
    background: #6610f2;
}

/* Assicura che i gruppi di emergenza abbiano lo stesso spacing */
.emergency-contact .month-group {
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 1200px) {
    .gruppi-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .gruppi-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .gruppi-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .group-container .proclamatori-grid {
        grid-template-columns: 1fr;
    }
}

/* PDF Section */
.pdf-section {
    margin: 20px 0;
    padding: 25px;
    border: 1px solid var(--border-color, #e9ecef);
    border-left: 5px solid var(--success-color, #28a745);
    border-radius: 12px;
    background: var(--card-background, #ffffff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pdf-controls {
    display: grid;
    align-items: end;
    grid-template-columns: 1fr 1fr auto;
    margin-bottom: 20px;
    gap: 15px;
}

/* Month Group Headers */
.month-group {
    margin-bottom: 30px;
}

.month-group h2 {
    margin: 20px 0 10px 0;
    padding: 15px;
    border-radius: 8px;
    font-size: 20px;
    color: #333;
    background-color: #e9ecef;
}

.month-group h2 i {
    margin-right: 10px;
}

/* Actions styling similar to emergency contacts */
.actions {
    margin-top: 15px;
    padding-top: 15px;
}

.actions a {
    margin: 0 5px;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.actions a:hover {
    color: var(--success-color, #28a745);
}

.actions a.delete-btn:hover {
    color: var(--danger-color, #dc3545);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .presenze-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .presenze-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-primary,
    .btn-success {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .pdf-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .presenze-card {
        margin: 15px 0;
        padding: 20px;
    }
    
    .presenze-date {
        font-size: 16px;
    }
    
    .presenze-total {
        padding: 12px;
        font-size: 16px;
    }
}

/* Status & Categories */
.status-si {
    font-weight: bold;
    text-shadow: 0px 0px 3px #000000;
    color: #8ac926;
}

.status-no {
    font-weight: bold;
    text-shadow: 0px 0px 3px #000000;
    color: #ff595e;
}

.status-extra {
    font-weight: bold;
    text-shadow: 0px 0px 3px #000000;
    color: #dca91d;
}

.category-ita {
    background-color: #7b7b7b !important;
}

.category-com {
    background-color: #6a4c93 !important;
}

.category-chs {
    background-color: #8ac926 !important;
}
.total-zone-stats.category-ita {
    background-color: rgba(0, 0, 0, 0.4) !important;
}

.total-zone-stats.category-chs {
    background-color: #6b9e1e !important;
}

.total-zone-stats.category-com {
    background-color: #4f3b73 !important;
}

/* News Section */
.openNews {
    z-index: 10;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    text-align: center;
    color: white;
}

.closeNews {
    float: right;
    margin-right: 15px;
    font-size: 35px;
    font-weight: bold;
    color: white;
    transition: 0.3s;
    cursor: pointer;
}

.closeNews:hover {
    color: black;
}

/* Leaflet Map & Popups */
#mapid {
    top: 0;
    left: 0;
    z-index: 1;
    height: 100%;
}

.leaflet-bar a:first-child {
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.leaflet-bar a:last-child {
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
}

.leaflet-touch .leaflet-bar a,
.leaflet-touch .leaflet-bar button {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    font-size: 20px;
    line-height: 40px;
    color: white;
    background-color: rgb(77,106,121);
    transition: all 0.3s ease;
}

.leaflet-touch .leaflet-bar a:hover,
.leaflet-touch .leaflet-bar button:hover {
    background-color: rgb(60, 85, 99);
}

.leaflet-control-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
    border: none !important;
}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
    border-radius: 5px;
}

.custom-popup .leaflet-popup-content-wrapper {
    font-family: InriaSans, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 15px;
    font-weight: 500;
    line-height: 1.75;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
    color: #000;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

.leaflet-tooltip-center.leaflet-custom-tooltip,
.leaflet-tooltip-pane .leaflet-tooltip.polygon-tooltip {
    padding: 6px;
    border: transparent;
    font-family: InriaSans, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 15px;
    font-weight: 500;
    line-height: 1.75;
    text-align: center;
    text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
    1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
    color: #000;
    background-color: transparent;
    box-shadow: none;
    user-select: none;
    pointer-events: none;
    -moz-osx-font-smoothing: grayscale;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-font-smoothing: antialiased;
}

.leaflet-tooltip-pane .leaflet-tooltip.polygon-tooltip {
    white-space: nowrap;
}

/* Leaflet Editable Vertices */
.leaflet-editable-vertex {
    border-radius: 50%;
}

/* Stile per i vertici intermedi (per aggiungere nuovi punti) */
.leaflet-editable-vertex-new {
    background-color: #3388ff;
}


.notifications-container {
    display: flex;
    align-items: center;
}

/* Notification Styles */
.notification-icon {
    position: relative;
    display: inline-flex; /* Usa inline-flex per allineare icona e badge */
    align-items: center; /* Allinea verticalmente gli elementi */
}

.notification-icon i {
    font-size: 30px; /* Imposta una dimensione fissa per l'icona */
    cursor: pointer; /* Assicurati che il cursore sia attivo */
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    border-radius: 50%;
    font-size: 12px; /* Riduci leggermente la dimensione del testo del badge */
    height: 20px; /* Riduci l'altezza del badge */
    width: 20px; /* Riduci la larghezza del badge */
    font-weight: bold;
    display: flex; /* Usa flex per centrare il numero all'interno */
    align-items: center;
    justify-content: center;
}

.notification-popup {
    position: absolute;
    top: 40px;
    right: 0;
    border: 1px solid #ccc;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
    display: none;
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.read {
    font-weight: normal;
    color: #777;
}

.notification-item.unread {
    font-weight: bold;
    color: #333;
}

.notification-item .notification-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.notification-item .notification-body {
    display: none;
    margin-top: 5px;
    color: #555;
}

.notification-item.expanded .notification-body {
    display: block;
}

.notification-popup .empty-notification {
    padding: 10px;
    text-align: center;
    color: #777;
}

/* Stili per l'accordion delle cartelle */
.folder-accordion {
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    font-weight: 600;
    text-align: left;
    color: #374151;
    background-color: #F3F4F6;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.folder-header:hover {
    background-color: #E5E7EB;
}

.folder-header.active {
    color: #1D4ED8;
    background-color: #DBEAFE;
}

.folder-content {
    overflow: hidden;
    max-height: 0;
    background-color: #FFFFFF;
    transition: max-height 0.3s ease-out;
}

.folder-content.expanded {
    max-height: 10000px;
}

.folder-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.folder-header.active .folder-arrow {
    transform: rotate(90deg);
}

/* Stili per i poligoni all'interno dell'accordion */
.folder-content .polygon-item {
    padding-right: 5px;
    padding-left: 5px;
    border-bottom: 1px solid #F3F4F6;
}

.folder-content .polygon-item:last-child {
    border-bottom: none;
}

/* Heading Component */
.heading {
    text-align: center;
}

.heading__title {
    font-weight: 600;
}

.heading__credits {
    margin: 10px 0px;
    font-size: 25px;
    color: #888888;
    transition: all 0.5s;
}

.heading__link {
    text-decoration: none;
    color: inherit;
}

/* Cards Component */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.card {
    display: grid;
    grid-template-rows: 5px 5px 1fr 5px;
    max-width: 500px;
    min-height: 200px;
    margin: 15px;
    padding: 15px;
    border-radius: 10px;
    background: #7b7b7b;
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.4);
    transform: scale(1.01);
}

.card__link,
.card__exit,
.card__icon {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
}

.card__link::after {
    position: absolute;
    top: 25px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.6);
    transition: all 0.5s;
    content: "";
}

.card__link:hover::after {
    width: 100%;
}

.card__exit {
    grid-row: 1/2;
    justify-self: end;
}

.card__icon {
    font-size: 30px;
    grid-row: 2/3;
}

.card__title {
    font-weight: 400;
    color: #ffffff;
    grid-row: 3/4;
}

.card__apply {
    align-self: center;
    grid-row: 4/5;
}

/* Filters & Search */
.territory-count {
    flex-grow: 1;
    text-align: center;
}

.filters-search-notifications {
    display: flex;
    align-items: center;
}

.filters {
    margin-right: 20px;
}

.filters h2 {
    margin: 0;
}

.filters h2 a {
    text-decoration: none;
    color: inherit;
}

.filters h2 label input[type="checkbox"] {
    margin-right: 5px;
}

#casellaRicerca {
    min-width: 250px;
    margin-right: 15px;
    font-size: 20px;
    text-align: center;
}

/* SweetAlert2 Overrides */
.swal2-content {
    padding: 0px !important;
}

/* QR Code */
.qr-code-container {
    display: inline-block;
    margin: 30px auto;
    padding: 10px;
    border-radius: 8px;
    background-color: #ecf0f1;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qr-code {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 4px;
}

#status-message {
    margin-top: 20px;
    font-weight: bold;
    color: #3498db;
}

/* Spinner */
.spinner {
    display: none;
    width: 30px;
    height: 30px;
    margin: 20px auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal */
.modal {
    top: 0;
    display: none;
    align-items: center;
    width: 100%;
}

.modal-content {
    position: relative;
    width: 80%;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    text-align: center;
    background-color: #fefefe;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    text-decoration: none;
    color: black;
    cursor: pointer;
}

/* Polygon List & Actions */
.polygon-list {
    max-height: 200px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
}
.polygon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #edf2f7;
}
.polygon-item:last-child {
    border-bottom: none;
}
.polygon-item button {
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
}
.polygon-item .folder-name {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #718096;
}

/* Stili per i nuovi pulsanti nella lista poligoni */
.polygon-item .action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.polygon-item .action-buttons button {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    background-color: #6c757d;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.polygon-item .action-buttons button:hover:not(:disabled) {
    background-color: #5a6268;
}

.polygon-item .action-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.polygon-item .action-buttons .btn-visibility {
    background-color: #17a2b8;
}
.polygon-item .action-buttons .btn-visibility:hover:not(:disabled) {
    background-color: #138496;
}

.polygon-item .action-buttons .btn-reorder {
    background-color: #007bff;
}
.polygon-item .action-buttons .btn-reorder:hover:not(:disabled) {
    background-color: #0056b3;
}

/* Style Controls (Color & Thickness) */
.style-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}
.style-controls label {
    font-weight: bold;
    color: #4a5568;
}
.style-controls select,
.style-controls input[type="text"],
.style-controls textarea {
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* File Selector */
.file-selector-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}
.file-selector-container select {
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}
.file-selector-container button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: bold;
    background-color: #4299e1;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.file-selector-container button:hover {
    background-color: #3182ce;
}

/* Floating Panels */
.floating-panel {
    position: absolute;
    top: 20px;
    flex-direction: column;
    width: 380px;
    border-radius: 0.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    resize: both;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    font-weight: bold;
    background-color: #4299e1;
    cursor: grab;
    border-top-right-radius: 0.5rem;
}

.close-panel-button, .minimize-panel-button {
    margin-left: 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.panel-header-buttons {
    display: flex;
    align-items: center;
}

.panel-content {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
}

/* Stili per il pannello di modifica XML */
#xmlEditPanel {
    position: absolute;
    top: 20px;
    left: 20px;
    display: none;
    overflow: hidden;
    width: 380px;
    max-height: calc(100vh - 40px);
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    resize: both;
}

#xmlEditPanel .panel-header {
    background-color: #4CAF50;
}

#xmlEditPanel .panel-content label {
    display: block;
    margin-top: 0.5rem;
    font-weight: bold;
    color: #4a5568;
}

#xmlEditPanel .panel-content input[type="text"],
#xmlEditPanel .panel-content select {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

#xmlEditPanel .panel-content .button-group {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    gap: 0.5rem;
}

/* Stili per i pannelli minimizzati */
.floating-panel.minimized, #xmlEditPanel.minimized {
    min-height: unset;
    max-height: unset;
}
.floating-panel.minimized .panel-content, #xmlEditPanel.minimized .panel-content {
    display: none;
}

/* Stili per il placeholder di select2 */
/* Stili per il placeholder di select2 */

/* Contenitore Select2 */
.select2-container {
    width: 100% !important;
    box-sizing: border-box;
    margin: 5px 0 !important;
}

/* Stilizza il Select2 SINGOLO per farlo sembrare uguale all'input */
.select2-selection.select2-selection--single {
    height: 2.625em !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: .1875em !important;
    background: inherit !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.06) !important;
    transition: border-color .3s, box-shadow .3s !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

/* Allinea il testo interno per SELECT SINGOLO */
.select2-selection--single .select2-selection__rendered {
    line-height: 1.15 !important;
    padding-left: 0.625em !important;
    padding-right: 3.5em !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    color: inherit !important;
    font-size: 1.125em !important;
    font: inherit !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Pulsante Clear (X) per SELECT SINGOLO */
.select2-selection__clear {
    position: absolute !important;
    right: 0em !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 1.2em !important;
    font-weight: bold !important;
    color: #999 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 0.3em !important;
    line-height: 1 !important;
    z-index: 1 !important;
}

.select2-selection__clear:hover {
    color: #333 !important;
}

/* Posiziona la freccia per SELECT SINGOLO */
.select2-selection__arrow {
    height: 2.625em !important;
    top: 0 !important;
    right: 0.625em !important;
    display: flex !important;
    align-items: center !important;
    position: absolute !important;
}

/* Placeholder del Select2 */
.select2-selection__placeholder {
    color: inherit !important;
    font-size: 1.125em !important;
}

/* Focus state per SELECT SINGOLO */
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single {
    border-color: #b3d7ff !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.06), 0 0 0 3px rgba(100,150,200,.5) !important;
}

/* ========== SELECT2 MULTIPLO ========== */

/* Assicura che la ricerca sia visibile nel dropdown */
.select2-dropdown .select2-search {
    display: block !important;
    padding: 8px !important;
}

.select2-dropdown .select2-search--dropdown {
    display: block !important;
    padding: 8px !important;
}

.select2-dropdown .select2-search--dropdown .select2-search__field {
    width: 100% !important;
    padding: 8px !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

.select2-selection.select2-selection--multiple {
    min-height:2.625em!important;
    max-height:none!important;
    border:1px solid #d9d9d9!important;
    border-radius:.1875em!important;
    background:inherit!important;
    box-shadow:inset 0 1px 1px rgb(0 0 0 / .06)!important;
    transition:border-color .3s,box-shadow .3s!important;
    box-sizing:border-box!important;
    padding:.3em 0.625em!important;
    display:block!important
}

/* Lista degli elementi selezionati per SELECT MULTIPLO */
.select2-selection--multiple .select2-selection__rendered {
    padding:0!important;
    margin:0!important;
    list-style:none!important;
    display:block!important;
    flex-wrap:nowrap!important;
    gap:0!important;
    align-items:center!important
}

.select2-search__field {
    border:none!important;
    outline:none!important;
    background:transparent!important;
    font-size:1.125em!important;
    font-family:InriaSans!important;
    padding:0.3em!important;
    margin:0!important;
    min-width:200px!important;
    height:30px!important;
    line-height:1.15!important
}

.select2-search__field::placeholder {
    color: #999 !important;
    font-size: 1em !important;
}

/* Tag degli elementi selezionati */
.select2-selection__choice {
    background-color:#e4e4e4!important;
    border:1px solid #aaa!important;
    border-radius:.1875em!important;
    padding:.2em 1.5em .2em 0.5em!important;
    font-size:0.9em!important;
    display:inline-block!important;
    align-items:center!important;
    margin:0.2em 0.3em 0.2em 0!important;
    position:relative!important;
    line-height:1.4!important
}

/* Testo del tag */
.select2-selection__choice__display {
    line-height: 1.2 !important;
}

/* Pulsante rimozione sul tag (X) */
.select2-selection__choice__remove {
    position: absolute !important;
    left: auto !important;
    right: 0.3em !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #999 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 1.2em !important;
}

.select2-selection__choice__remove:hover {
    color: #333 !important;
}

/* Focus state per multiplo */
.select2-container--focus .select2-selection--multiple,
.select2-container--open .select2-selection--multiple {
    border-color: #b3d7ff !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.06), 0 0 0 3px rgba(100,150,200,.5) !important;
}

/* Stili per il dropdown */
.select2-dropdown {
    border: 1px solid #D1D5DB !important;
    border-radius: 0.375rem !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #1D4ED8 !important;
    background-color: #DBEAFE !important;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 42px;
    padding: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
}
.custom-select-trigger span {
    display: flex;
    align-items: center;
}
.custom-options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1000;
    display: none;
    max-height: 200px;
    border: 1px solid #D1D5DB;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    background-color: #ffffff;
    overflow-y: auto;
}
.custom-options.open {
    display: block;
}
.custom-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
}
.custom-option:hover {
    background-color: #F3F4F6;
}
.arrow {
    width: 0;
    height: 0;
    border-top: 5px solid #6B7280;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
}
.custom-options.open + .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

/* Media Queries */
@media only screen and (min-width: 768px) {
    .grid {
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 1260px;
    }

    .grid > * {
        flex: 1;
    }

    header {
        max-width: 360px;
        margin-right: 60px;
        padding-bottom: 40px;
        text-align: left;
    }
}

/* Responsive layout - makes a one column layout instead of a two-column layout */
@media (max-width: 800px) {
    .flex-container {
        flex-direction: column;
    }
}

/* Media Query per schermi medi (es. tablet) */
@media (max-width: 768px) {
    .responsive-item-3-col {
        flex-basis: calc(50% - 20px);
    }

    .responsive-container-3-col {
        gap: 20px;
    }

    .aside-mobile-stack {
        flex-direction: column;
        align-items: stretch;
    }

    .home-icon {
        margin-bottom: 10px;
        font-size: 30px;
        text-align: center;
    }

    .territory-count {
        margin-bottom: 10px;
        text-align: center;
    }

    .filters-search-notifications {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .filters {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .filters h2 {
        text-align: center;
    }

    #casellaRicerca {
        width: auto;
        max-width: 50%;
        margin: auto;
        font-size: 16px;
        text-align: center;
    }

    .floating-panel, #xmlEditPanel {
        top: 10px;
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto !important;
        min-width: unset;
        min-height: unset;
        max-height: calc(100vh - 20px);
    }
}
/* Stili per il pulsante del dropdown */
.dropbtn {
    padding: 8px 12px;
    border: none;
    text-align: center;
    cursor: pointer;
    gap: 5px;
}

/* Contenuto del dropdown (nascosto di default) */
.dropdown-content {
    position: absolute;
    z-index: 1;
    display: none;
    min-width: 180px;
    margin-top: 5px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

/* Link/etichette all'interno del dropdown */
.dropdown-content label {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: black;
    cursor: pointer;
}

/* Cambia colore al passaggio del mouse */
.dropdown-content label:hover {
    background-color: #f1f1f1;
}

/* Mostra il menu a tendina (usato dal JS) */
.show {
    display:block;
}

/* Stili per i form SweetAlert2 */
.swal2-html-container {
    max-height: 800px;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start; /* Allinea gli elementi in basso */
}

.form-group {
    flex: 1; /* Fa sì che i due gruppi abbiano la stessa larghezza */
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
}

.form-group .swal2-input {
    width: 100%;
    height: 2.625em; /* Altezza uniforme per input e select */
    box-sizing: border-box;
    padding: 0.625em;
}

.checkbox-group {
    text-align: left;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    vertical-align: middle;
}

.checkbox-group label {
    display: inline-block;
    margin-left: 0.5em;
    font-weight: normal !important;
    vertical-align: middle;
}

.group-container {
    flex: 0 0 400px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background-color: #bbb;
}

.group-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.group-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.group-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.group-actions {
    display: flex;
    gap: 5px;
}

.group-leaders {
    margin-bottom: 5px;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.9em;
    color: #555;
    background: #e9ecef;
}

.group-leaders .leader-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.group-leaders .leader-row:last-child {
    margin-bottom: 0;
}

.leader-label {
    font-weight: bold;
    color: #333;
}

.leader-name {
    color: #007bff;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #e9ecef;
    transition: background-color 0.3s;
    cursor: pointer;
}

.member-item:hover {
    background-color: white;
}

.member-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.member-name {
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
}

.member-role {
    font-size: 0.8em;
    font-style: italic;
    color: #666;
}

.move-button {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-size: 0.8em;
    color: white;
    background: #007bff;
    cursor: pointer;
}

.move-button:hover {
    background: #0056b3;
}

.no-group-container {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #ffeaa7;
    border-radius: 10px;
    background-color: #fff3cd;
}

.create-group-btn, .manage-leaders-btn {
    margin-left: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    font-size: 0.8em;
    color: white;
    background: #28a745;
    cursor: pointer;
}

.create-group-btn:hover, .manage-leaders-btn:hover {
    background: #218838;
}

.manage-leaders-btn {
    background: #17a2b8;
}

.manage-leaders-btn:hover {
    background: #138496;
}

.delete-group-btn {
    padding: 5px 8px;
    border: none;
    border-radius: 3px;
    font-size: 0.8em;
    color: white;
    background: #dc3545;
    cursor: pointer;
}

.delete-group-btn:hover {
    background: #c82333;
}

.group-stats {
    font-size: 0.85em;
    color: #666;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    gap: 20px;
}

.stat-card {
    padding: 15px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    text-align: center;
    background: var(--bg-color, #fff);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color, #007bff);
}

.stat-label {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--text-muted, #6c757d);
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    gap: 20px;
}

.chart-wrapper {
    padding: 20px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    background: var(--bg-color, #fff);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-title {
    margin-top: 0px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color, #ddd);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color, #333);
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 15px 0;
}

.pioneers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    margin: 20px 0;
    padding: 10px;
    gap: 15px;
}

.pioneer-card {
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pioneer-header {
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.pioneer-content {
    padding: 20px;
}

.year-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.year-tab {
    padding: 10px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.year-tab.active {
    color: #007bff;
    background: white;
    border-bottom-color: #007bff;
}

.year-tab:hover {
    background: #e9ecef;
}

.year-content {
    display: none;
}

.year-content.active {
    display: block;
}

.report-table {
    width: 100%;
    margin-bottom: 20px;
    font-size: 0.8em;
    border-collapse: collapse;
    table-layout: fixed;
}

.report-table th,
.report-table td {
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    text-align: center;
    word-wrap: break-word;
}

.report-table th:first-child,
.report-table td:first-child {
    width: 40%;
}

.report-table th:not(:first-child),
.report-table td:not(:first-child) {
    width: 20%;
}

.report-table th {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
}

.report-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.report-table tbody tr:hover {
    background: #e3f2fd;
}

.month-cell {
    font-weight: 500;
    text-align: left !important;
}

.total-row {
    border-top: 2px solid #007bff;
    font-weight: bold;
    background: #e8f4f8 !important;
}

.total-row td {
    border-color: #007bff;
}

.status-cell {
    font-weight: bold;
}

.status-surplus {
    color: #28a745;
}

.status-deficit {
    color: #dc3545;
}

.status-exact {
    color: #007bff;
}

.no-data {
    padding: 40px;
    font-style: italic;
    text-align: center;
    color: #6c757d;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.pioneer-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 4px;
    background: #f8f9fa;
    gap: 15px;
}

.summary-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.pioneer-summary-wrapper {
    display: none;
    width: 100%;
}

.pioneer-summary-wrapper.active {
    display: block;
}

.summary-item {
    text-align: center;
}

.summary-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
}

.summary-label {
    margin-top: 5px;
    font-size: 0.9em;
    color: #6c757d;
}

.btn-marca-inviato {
    flex: 1;
    padding: 10px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-marca-inviato:hover {
    background: #45a049;
}

.btn-annulla-invio {
    flex: 1;
    padding: 10px 10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-annulla-invio:hover {
    background: #da190b;
}

.invio-info {
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 13px;
    color: #2e7d32;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .pioneers-grid {
        grid-template-columns: 1fr;
        margin: 15px 10px;
        gap: 15px;
    }
    
    .pioneer-content {
        padding: 10px;
    }
    
    .year-tabs {
        flex-wrap: wrap;
    }
    
    .year-tab {
        flex: 1;
        min-width: 120px;
    }
    
    .report-table {
        font-size: 0.8em;
    }
    
    .report-table th,
    .report-table td {
        padding: 6px 8px;
    }
    
    .pioneer-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

.proclamatori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    align-items: stretch;
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    gap: 15px;
}

.presenze-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    gap: 15px;
}

.proclamatore-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.proclamatore-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.proclamatore-header {
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.proclamatore-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.proclamatore-info {
    flex: 1;
    margin-bottom: 15px;
}


.presenze-columns {
    display: flex;
    margin: 15px 0;
    gap: 20px;
}

.presenze-column {
    flex: 1;
    padding: 15px;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    background: #f8f9fa;
}

.presenze-column:last-child {
    border-left-color: #28a745;
}

.presenze-column-title {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #495057;
}

.presenze-column .info-row {
    margin: 6px 0;
}

.presenze-column .info-label {
    min-width: 60px;
    font-size: 0.85em;
}

.presenze-column .info-value {
    font-weight: 500;
    color: #495057;
}

.table-view-container {
    display: none;
    overflow-x: auto;
    margin-top: 20px;
}

.incarichi-table-view {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 15px;
    position: relative;
}

.incarichi-table-view th {
    background: #2c5aa0;
    color: white;
    padding: 7px 5px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

.incarichi-table-view th.nome-col {
    text-align: left;
    min-width: 180px;
    position: sticky;
    left: 0;
    z-index: 20;
}

.incarichi-table-view th.reparto-header {
    background: #17a2b8;
    border: 1px solid #ddd;
}

.incarichi-table-view td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.incarichi-table-view td.nome-cell {
    font-weight: 500;
    text-align: left;
    background: #fafafa;
    position: sticky;
    left: 0;
    z-index: 5;
}

.incarichi-table-view tbody tr:nth-child(even) td.nome-cell {
    background: #f0f0f0;
}

.incarichi-table-view tbody tr:hover td {
    background: #e8f4f8;
}

.incarichi-table-view thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

.incarichi-table-view thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 21;
}

.incarichi-table-view thead tr:nth-child(2) th {
    position: sticky;
    top: 38px;
    z-index: 21;
}

.incarichi-table-view thead tr:nth-child(2) th.nome-col {
    background: #2c5aa0;
}

.no-results-message {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
}

.check-icon {
    color: #28a745;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.empty-cell {
    color: #ddd;
    cursor: pointer;
}

.empty-cell:hover {
    background: #f8f9fa;
}

.totale-col {
    background: #fff3cd !important;
    font-weight: 700;
    color: #856404;
}

.totali-row td {
    background: #fff3cd !important;
    border-top: 3px solid #2c5aa0 !important;
    font-weight: 700;
}

.totali-row td.nome-cell {
    background: #2c5aa0 !important;
    color: white !important;
}
.incarichi-table-view .totali-row td {
    background: #fff3cd !important;
    border-top: 3px solid #2c5aa0 !important;
    font-weight: 700;
    padding: 12px 5px;
}

.incarichi-table-view .totali-row td.nome-cell {
    background: #2c5aa0 !important;
    color: white !important;
}

.incarichi-table-view .totali-row .check-icon {
    pointer-events: none;
    cursor: default;
}

/* Stili Accordion */
.accordion-sottolista {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 15px;
    overflow: hidden;
    background: white;
}

.accordion-sottolista-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: linear-gradient(135deg, #007b00 0%, #005600 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #0056b3;
}

.accordion-sottolista-header:hover {
    background: linear-gradient(135deg, #009b00 0%, #007600 100%);
}

.accordion-sottolista-header.active {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border-left-color: #218838;
}

.accordion-sottolista-title {
    display: flex;
    align-items: center;
    flex: 1;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.accordion-sottolista-title i {
    margin-right: 10px;
    font-size: 16px;
}

.accordion-sottolista-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
}

.accordion-sottolista-actions {
    display: flex;
    gap: 5px;
    margin-left: 15px;
}

.accordion-sottolista-actions button {
    width: 32px;
    height: 32px;
    font-size: 0.85em;
}

.accordion-sottolista-toggle {
    color: white;
    font-size: 18px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.accordion-sottolista-toggle.active {
    transform: rotate(180deg);
}

.accordion-sottolista-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.accordion-sottolista-content.active {
    max-height: 15000px;
    transition: max-height 0.5s ease;
}

.accordion-sottolista-body {
    padding: 15px;
}

/* Responsive per colonne */
@media (max-width: 480px) {
    .presenze-columns {
        flex-direction: column;
        gap: 10px;
    }
    
    .presenze-column {
        padding: 12px;
    }
}

.info-label {
    display: inline-block;
    min-width: 80px;
    padding-right: 5px;
    font-weight: 500;
    color: #495057;
}

.info-value {
    flex: 1;
    color: #6c757d;
}

.proclamatore-actions {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    font-size: 1.1em;
    text-decoration: none;
    color: white;
    background: none;
    transition: all 0.2s ease;
    outline: 1px solid #212529;
}

.action-btn:focus,
.action-btn:active {
    outline: none;
    border: none;
}

.action-btn:hover {
    text-decoration: none;
    color: white;
    transform: scale(1.1);
    outline: 1px solid #212529;
}

.action-whatsapp {
    background: #25d366;
}
.action-phone {
    background: #007bff;
}
.action-email {
    background: #6c757d;
}
.action-map {
    background: #28a745;
}
.action-edit {
    background: #ffc107;
}
.action-delete {
    background: #dc3545;
}

.status-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.inviato {
    background: rgba(76, 175, 80, 0.3);
}

.status-attivo {
    color: #155724;
    background: #d4edda;
}

.status-pioniere {
    color: #856404;
    background: #fff3cd;
}

.status-servitore {
    color: #004085;
    background: #cce5ff;
}

.status-anziano {
    color: #3d0070;
    background: #e2ccff;
}

.status-servizio {
    color: #383d41;
    background: #e2e3e5;
}

.input-group {
    display: flex;
    margin-bottom: 15px;
    gap: 15px;
}

.no-data {
    margin: 20px;
    padding: 40px;
    border-radius: 8px;
    font-style: italic;
    text-align: center;
    color: #6c757d;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Stili per il pulsante rapporti */
.action-report {
    background-color: #9C27B0;
}
.action-report:hover {
    background-color: #7B1FA2;
}

/* Stili per il modale del riepilogo rapporti */
.rapporti-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.rapporti-modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    color: #000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.rapporti-modal-content h2 {
    color: #000;
    margin-bottom: 20px;
}

.rapporti-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.rapporti-close:hover,
.rapporti-close:focus {
    color: #000;
}

.rapporti-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
}

.rapporti-table th {
    background-color: #f5f5f5;
    color: #000;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    font-weight: bold;
}

.rapporti-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #000;
}

.rapporti-table tr:hover td {
    background-color: #f9f9f9;
}

.rapporti-table tbody tr:nth-child(even) td {
    background-color: #fafafa;
}

.rapporti-table tbody tr:nth-child(even):hover td {
    background-color: #f5f5f5;
}

.check-icon {
    color: #4caf50;
    font-size: 1.2em;
}

.x-icon {
    color: #f44336;
    font-size: 1.2em;
}

.ore-badge {
    display: inline-block;
    background-color: #2196F3;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
}

.studi-badge {
    display: inline-block;
    background-color: #FF9800;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
}

.commenti-cell {
    font-size: 0.9em;
    font-style: italic;
    color: #555;
    max-width: 200px;
    text-align: left;
}

.rapporti-loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #000;
}

.rapporti-error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

.tipo-proclamatore-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    margin-right: 5px;
}

.tipo-pioniere {
    background-color: #9C27B0;
    color: white;
}

.tipo-ausiliario {
    background-color: #FF5722;
    color: white;
}

/* Adattamento per SweetAlert2 */
.swal2-input {
    margin: 5px 0 !important;
}

.swal2-input[type=number] {
    max-width: 100% !important;
    text-align: center;
}

/* Aggiungi questi stili nel tag <style> o nel file CSS */
.organigramma-container {
    max-width: 1200px;
    margin: 20px auto;
}

.organigramma-table-view {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.organigramma-table-view th {
    background: #17a2b8;
    color: white;
    padding: 12px;
    font-weight: 600;
    text-align: left;
    border: 1px solid #117a8b;
}

.organigramma-table-view td {
    padding: 5px;
    border: 1px solid #ddd;
}

.organigramma-table-view tbody tr:hover {
    background: #f8f9fa;
}

.organigramma-table-view .reparto-name {
    font-weight: 600;
    color: #2c5aa0;
}

.organigramma-table-view .group-actions-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.organigramma-table-view .action-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.organigramma-table-view .action-btn i {
    font-size: 16px;
    margin: 0;
}

.organigramma-table-view .action-delete {
    background-color: #dc3545;
}

.organigramma-table-view .action-delete:hover {
    background-color: #c82333;
}




.calendari-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px;
}

.calendario-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendario-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c5aa0;
}

.calendario-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-mese {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-mese:hover {
    background: #1e3a70;
}

.mese-corrente {
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.giorno-header {
    text-align: center;
    font-weight: bold;
    padding: 10px 5px;
    background: #f0f0f0;
    border-radius: 5px;
}

.giorno-cell {
    aspect-ratio: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    min-height: 60px;
}

.giorno-cell:hover {
    background: #f5f5f5;
}

.giorno-cell.altro-mese {
    color: #ccc;
    background: #fafafa;
}

.giorno-cell.oggi {
    background: #e3f2fd;
    border-color: #2c5aa0;
}

.giorno-numero {
    font-size: 0.9em;
}

.giorno-bloccato {
    background-color: #ffe6e6 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.giorno-bloccato:hover {
    background-color: #ffcccc !important;
}

.appuntamento-indicator {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    margin-top: 5px;
}

.appuntamento-indicator-warning {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #ffc107;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 193, 7, 0.5);
}

.schemi-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.schemi-table th,
.schemi-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.schemi-table th {
    background: #2c5aa0;
    color: white;
    font-weight: bold;
}

.schemi-table tr:hover {
    background: #f5f5f5;
}

.date-badge {
    display: inline-block;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 3px;
    margin: 2px;
    font-size: 0.85em;
}

.accordion-sottolista {
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.accordion-sottolista-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #17a2b8;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.accordion-sottolista-header:hover {
    background: #138496;
}

.accordion-sottolista-title {
    flex: 1;
    font-weight: bold;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-sottolista-badge {
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85em;
}

.accordion-sottolista-actions {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.accordion-sottolista-toggle {
    transition: transform 0.3s;
    font-size: 0.9em;
}

.accordion-sottolista-toggle.rotated {
    transform: rotate(180deg);
}

.accordion-sottolista-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-sottolista-body {
    padding: 15px;
    background: #f9f9f9;
}

.custom-member .proclamatore-header {
    background: linear-gradient(135deg, #d9a70d 0%, #f5ca44 100%) !important;
}

.check-icon.custom {
    color: #ffc107 !important;
}

.incarichi-table-view .custom-name {
    background-color: #fff3cd !important;
    font-weight: 500;
}

.incarichi-table-view .custom-name::after {
    content: " ★";
    color: #ffc107;
    font-size: 0.9em;
}

.congregazione-info {
    background: #f0f8ff;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-size: 0.85em;
}

.congregazione-info > div {
    margin-bottom: 3px;
}

.congregazione-info > div:last-child {
    margin-bottom: 0;
}

.tre-colonne-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin: 30px;
}

.quattro-colonne-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin: 30px;
}

.colonna-section {
    display: flex;
    flex-direction: column;
}

.colonna-header {
    background: #2c5aa0;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
}

.colonna-content {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    overflow-y: auto;
}

.colonna-content .proclamatore-card {
    margin-bottom: 10px;
}

/* Responsive per schermi più piccoli */
@media (max-width: 768px) {
    .proclamatori-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .input-group {
        gap: 10px;
    }
    
    .month-group h2 {
        padding: 10px;
        font-size: 1.2em;
        text-align: center;
    }
    
    .proclamatore-content {
        padding: 15px;
    }
    
    .proclamatore-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .action-btn {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}

@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .groups-flex {
        flex-direction: column;
        gap: 15px;
    }
    .group-container {
        flex: 1 1 100%;
    }
}

/* Media Query per schermi piccoli (es. smartphone) */
@media (max-width: 600px) {
    .responsive-item-2-col {
        flex-basis: 100%;
    }

    .responsive-container-2-col {
        gap: 20px;
    }

    .container {
        margin: 10px;
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .qr-code {
        width: 150px;
        height: 150px;
    }

    .button {
        padding: 10px 20px;
        font-size: 1em;
    }
}

/* Media Query per schermi molto piccoli (es. smartphone) */
@media (max-width: 480px) {
    .responsive-item-3-col {
        flex-basis: 100%;
    }
}
@media (max-width: 768px) {
    .calendari-container {
        grid-template-columns: 1fr;
    }
    
    .giorno-cell {
        min-height: 50px;
    }
}

@media (max-width: 1400px) {
    .tre-colonne-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .quattro-colonne-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tre-colonne-container {
        grid-template-columns: 1fr;
    }

    .quattro-colonne-container {
        grid-template-columns: 1fr;
    }
}
