/* 🖼️ BRAND BANNER */
.brand-banner {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.brand-logo {
    max-height: 200px;       /* ✅ Dimensione richiesta */
    width: auto;             /* Mantiene proporzioni */
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.brand-logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

/* 📱 Responsive: su mobile 200px è troppo invasivo */
@media (max-width: 768px) {
    .brand-logo { max-height: 120px; }
    .brand-banner { padding: 1rem 0; }
}

/* Menu colore base grigio */
.navbar .nav-link {
    color: #6c757d;
    font-weight: 500;
    transition: 0.3s ease;
}

/* Hover viola */
.navbar .nav-link:hover {
    color: #6f42c1;
}

/* Attivo rosso */
.navbar .nav-link.active {
    color: red !important;
    padding-bottom: 2px;
}

.custom-nav-link{
    margin-top:20px; margin-bottom:20px;
    display: inline-block;
    padding: 12px 24px;
    border-radius:8px !important;
    color: purple !important;
    text-decoration: none;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.search-box {
    display: flex;
    gap: 10px;
}

#query {
    flex: 1;
    padding: 10px;
    border-radius: 15px;
    border: 1px solid #ccc;
    outline: none;
}

#query:focus {
    border-color: #28a745;
}

.result-item {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eee;
    background-color: #fff;
    transition: 0.2s;
    border-bottom: 1px solid #8B008B;
    width: 50%;
    margin: 20px auto;
    opacity: 0.7;
}
.result-item:last-child { border-bottom: none; }
.result-item:hover { background-color: #f8f9fa; }


.child-form {
    border: 1px solid #eee;
    border-radius: 10px;
    background: white;
    display: block;
}
.chat-box {
    padding: 32px;
    background: white;
    border-radius: 10px;
    border: 1px solid #eee !important;

}

.button-container {
    display: flex;
    justify-content: flex-end;
}



.btn-style {
   /* verde */
    color: white;
    align-items: center;
    justify-content: center;
    /*padding: 0.375rem 0.75rem; /* 👈 Bootstrap standard */
    border-radius: 0.375rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent; /* bordo invisibile inizialmente */
    transition: border 0.3s, color 0.3s; /* transizione morbida */
    width: auto !important;
    max-width: max-content;
}

.btn-style:hover {
    border: 2px solid purple; /* bordo viola al passaggio del mouse */
    color: #008000; /* mantiene il testo bianco */
    background-color: white; /* mantiene il verde */
}
.status-btn.active {
    transform: scale(1.1);
    border: 1px solid purple;
}

.close-btn {
    float: right;
    cursor: pointer;
    font-size: 20px;
    color: white;
    border-radius: 0.375rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent; /* bordo invisibile inizialmente */
    transition: border 0.3s, color 0.3s;

}

.close-btn:hover {
    border: 2px solid purple; /* bordo viola al passaggio del mouse */
    color: #008000; /* mantiene il testo bianco */
    background-color: white; /* mantiene il verde */
}



.timeline {
    position: relative;
    margin-left: 20px;
    padding-left: 30px;
    border-left: 3px solid #d1d5db;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -39px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6b7280;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #d1d5db;
}


.topbar {
    position: relative;
    z-index: 20;
}


.day {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    color: white;
}

.l0 { background:#ebedf0; color:#333; }
.l1 { background:#9be9a8; }
.l2 { background:#40c463; }
.l3 { background:#30a14e; }
.l4 { background:#216e39; }


.breadcrumb {
    background-color: transparent;
    font-size: 0.9rem;
}
.breadcrumb-item active{
    color: purple;
}

.breadcrumb a {
    text-decoration: none;
    color: #6c757d;
}

.breadcrumb a:hover {
    color: purple;
}

.chart-box {
    width: 320px;
    height: 260px;
    margin: 0 auto;
    position: relative;
}

.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}



.pending { background: yellow; }
.accepted { background: blue; }
.paid { background: green; }
.rejected { background: red; }

/* Margini automatici per tutte le card custom */


/* Oppure se vuoi più controllo */
.custom-card + .custom-card {
    margin-top: 1.5rem; /* Spazio solo tra card adiacenti */
}
.custom-card {
    margin-bottom: 1.5rem !important; /* 24px di spazio sotto ogni card */
    border-radius: 12px !important; /* arrotondato */
    border: 1px solid #e9d5ff !important; /* viola chiaro */
    background-color: #faf5ff !important;
    box-shadow: 0 6px 18px rgba(139, 0, 139, 0.25) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 20px;
}

.custom-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

.custom-modal {
    position: fixed;
    margin: 8px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border: 1px solid purple;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.close-btn:hover {
    color: #000;
}




.expense-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 1px auto;
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.expense-dot.pending {
    background-color: orange;
}

.expense-dot.accepted {
    background-color: blue;
}

.expense-dot.paid {
    background-color: green;
}

.expense-dot.rejected {
    background-color: red;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;

}

#categoryLegend div {
    font-size: 0.85rem;
    opacity: 0.85;
}

#categoryLegend div:hover {
    opacity: 1;
    transform: translateX(3px);
    transition: 0.2s;
}
#categoryChart,
#parentChart {
    max-width: 100% !important;
    max-height: 100% !important;
}

.badge-family {
    display: inline-block;
    border: 2px solid #7b2cbf !important;
    border-radius: 8px;
    background-color: #f8f5ff;
    color: black !important;
}

.badge-parent-a {
    background: #e8f5e9;
    border: 2px solid #7b2cbf !important;
}

.badge-parent-b {
    background: #e8f5e9;
    border: 2px solid #7b2cbf !important;
}

/* 🔧 OVERRIDE BOOTSTRAP → VIOLETTO COERENTE */
:root {
    --bs-primary: #7b2cbf !important;
    --bs-primary-rgb: 123, 44, 191 !important;
    --bs-link-color: #6f42c1 !important;
    --bs-link-hover-color: #5a32a3 !important;
}

/* 🏷️ Badge, bordi, sfondi chiari */
.badge.bg-primary { background-color: #7b2cbf !important; }
.border-primary { border-color: #7b2cbf !important; }
.bg-light { background-color: #faf5ff !important; }
.alert-primary { background-color: #f3e8ff !important; border-color: #d8b4fe !important; color: #6b21a8 !important; }
