/* Box statistiche fatturazione - dashboard /billing/dashboard/view_menu */

.billing-stats-container {
    margin-top: 8px;
    margin-bottom: 16px;
}

.billing-stat-box {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: 110px;
}

.billing-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.billing-stat-icon {
    flex: 0 0 auto;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    line-height: 1;
}

.billing-stat-icon .material-symbols-outlined {
    font-size: 36px !important;
    color: white;
    line-height: 1;
    display: block;
}

.billing-stat-content {
    flex: 1 1 auto;
    min-width: 0;
}

.billing-stat-value {
    font-size: 1.6em;
    font-weight: bold;
    line-height: 1.1;
    word-break: break-word;
}

.billing-stat-label {
    font-size: 0.95em;
    opacity: 0.95;
    margin-top: 2px;
}

.billing-stat-label small {
    opacity: 0.85;
    font-size: 0.8em;
}

/* Varianti colore */
.billing-stat-total {
    background: linear-gradient(135deg, var(--color-brand) 0%, #6cb35f 100%);
}

.billing-stat-parents {
    background: linear-gradient(135deg, var(--theme-blue-d) 0%, var(--theme-blue-l) 100%);
}

.billing-stat-avg {
    background: linear-gradient(135deg, var(--theme-orange-d) 0%, var(--theme-orange-l) 100%);
}


/* ============================================================
   Cards dashboard fatturazione (testi più lunghi)
   Stile light: sfondo bianco, accent colorato a sinistra,
   icona in tondo colorato, titolo + descrizione multi-riga.
   ============================================================ */

.billing-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-left: 5px solid #d1d5db;
    text-decoration: none !important;
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-left-width 0.18s ease;
    height: 100%;
    min-height: 130px;
}

.billing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
    color: #111827;
}

/* Card "featured" (azione principale, più usata):
   sfondo verde tenue ma evidente, accent border più spesso,
   shadow accentuata, badge "Più usato" sull'angolo. */
.billing-card.featured {
    background: linear-gradient(135deg, #e3f1de 0%, #f2f9ed 100%);
    border-left-width: 7px;
    border-color: #b9d8b4;
    box-shadow: 0 4px 14px rgba(69, 130, 58, 0.18);
    position: relative;
}
.billing-card.featured:hover {
    box-shadow: 0 10px 22px rgba(69, 130, 58, 0.28);
}
.billing-card.featured .billing-card-title {
    color: #1d5313;
}
.billing-card.featured .billing-card-icon {
    box-shadow: 0 6px 14px rgba(69, 130, 58, 0.30);
}
.billing-card.featured::after {
    content: "★ Più usata";
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #2f4f29;
    background: rgba(132, 189, 0, 0.18);
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(132, 189, 0, 0.4);
}

.billing-card-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.billing-card-icon .material-symbols-outlined {
    font-size: 30px !important;
    line-height: 1;
    display: block;
    color: white;
}

.billing-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.billing-card-title {
    font-family: TitilliumWeb-Bold, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    margin-bottom: 4px;
}

.billing-card-desc {
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 8px;
}

.billing-card-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
}

/* Varianti colore: accent border + icon background */
.billing-card-green {
    border-left-color: var(--color-brand);
}
.billing-card-green .billing-card-icon {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-accent) 100%);
}
.billing-card-green .billing-card-tag {
    background: #e9f4e3;
    color: #2f4f29;
}

.billing-card-orange {
    border-left-color: var(--theme-orange-d);
}
.billing-card-orange .billing-card-icon {
    background: linear-gradient(135deg, var(--theme-orange-d) 0%, var(--theme-orange-l) 100%);
}
.billing-card-orange .billing-card-tag {
    background: #fef3c7;
    color: #92400e;
}

.billing-card-blue {
    border-left-color: var(--theme-blue-d);
}
.billing-card-blue .billing-card-icon {
    background: linear-gradient(135deg, var(--theme-blue-d) 0%, var(--theme-blue-l) 100%);
}
.billing-card-blue .billing-card-tag {
    background: #dbeafe;
    color: #1e3a8a;
}

.billing-card-purple {
    border-left-color: var(--theme-purple-d);
}
.billing-card-purple .billing-card-icon {
    background: linear-gradient(135deg, var(--theme-purple-d) 0%, var(--theme-purple-l) 100%);
}
.billing-card-purple .billing-card-tag {
    background: #ede9fe;
    color: #4c1d95;
}

.billing-card-teal {
    border-left-color: var(--theme-teal-d);
}
.billing-card-teal .billing-card-icon {
    background: linear-gradient(135deg, var(--theme-teal-d) 0%, var(--theme-cyan-l) 100%);
}
.billing-card-teal .billing-card-tag {
    background: #ccfbf1;
    color: #134e4a;
}

.billing-card-gray {
    border-left-color: #455a64;
}
.billing-card-gray .billing-card-icon {
    background: linear-gradient(135deg, #455a64 0%, #78909c 100%);
}
