/* ===== THEME TOKENS & OVERRIDES ===== */
:root {
    --brand: #008B65; /* rgb(0,139,101) */
    --brand-600: #007a59;
    --brand-700: #00694d;
    --brand-800: #005a42;
    --brand-50: #E6F3EF;
    --brand-grad-start: #00A67A; /* tono pił brillante per il gradiente */
    --brand-grad-end: #00694D;
    /* Override bootstrap CSS variables */
    --bs-primary: var(--brand);
    --bs-primary-rgb: 0,139,101;
    --bs-link-color: var(--brand);
    --bs-link-hover-color: #00694d;
}

html {
    font-size: 14px;
    min-height: 100%;
    position: relative;
}

@media (min-width:768px) {
    html {
        font-size: 16px
    }
}

body {
    margin-bottom: 60px;
    background: radial-gradient(40rem 40rem at -10% -10%, #F4FAF8 0, transparent 60%), radial-gradient(50rem 30rem at 110% 10%, #F0FBF7 0, transparent 55%), linear-gradient(180deg, #ffffff 0%, #F8FCFA 100%);
}

/* ===== NAVBAR / HEADER ===== */
.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

.navbar .brand-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.header-grad {
    background: linear-gradient(135deg,var(--brand-grad-start),var(--brand-grad-end));
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

    .header-grad .nav-link {
        color: rgba(255,255,255,.9);
    }

        .header-grad .nav-link:hover,
        .header-grad .nav-link:focus {
            color: #fff;
        }

        .header-grad .nav-link.active {
            color: #fff;
            font-weight: 600;
        }

/* ===== BUTTONS ===== */
.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}

    .btn-primary:hover {
        background-color: var(--brand-700);
        border-color: var(--brand-700);
    }

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

    .btn-outline-primary:hover {
        color: #fff;
        background-color: var(--brand);
        border-color: var(--brand);
    }

/* ===== CARDS ===== */
.card {
    border: 1px solid #e9f3ef;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

    .card .card-title {
        font-weight: 700;
    }

    .card.kpi {
        background: linear-gradient(180deg,#ffffff, #F5FBF8);
        border: 1px solid #e6f2ee;
    }

/* ===== HERO ===== */
.hero {
    border-radius: 22px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(0,166,122,.14), rgba(0,105,77,.18)), url('/images/pattern-gears.svg');
    background-blend-mode: overlay;
    color: #0f2a23;
}

    .hero h1 {
        font-weight: 800;
    }

    .hero .subtitle {
        opacity: .9
    }

/* ===== BADGES STATO MANUTENZIONE ===== */
.badge-status {
    font-weight: 600;
    padding: .5rem .7rem;
    border-radius: 999px;
}

.status-ok {
    background: #E6F8F1;
    color: #0C6B50;
    border: 1px solid #CDEFE3;
}

.status-due {
    background: #FFF8E6;
    color: #946200;
    border: 1px solid #FFE7AE;
}

.status-overdue {
    background: #FDECEC;
    color: #9B1C1C;
    border: 1px solid #FAC5C5;
}

/* ===== TABLES ===== */
.table thead th {
    border-bottom: 2px solid var(--brand-50);
    color: #0f2a23;
}

.table-hover tbody tr:hover {
    background: #F6FBF9;
}

/* ===== LINKS ===== */
a {
    color: var(--brand);
}

    a:hover {
        color: #00694d;
    }

/* ===== FOOTER ===== */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

/* ===== UTILITIES ===== */
.rounded-2xl {
    border-radius: 22px !important;
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0,0,0,.08)
}

/* ===== ACTIVE NAV HELPER ===== */
.nav-link[data-active="true"] {
    color: #fff !important;
    font-weight: 700;
}

/* Nascondi il validation summary quando NON ci sono errori */
.validation-summary-valid,
.field-validation-valid {
    display: none;
}

/* Header a gradiente per card (sostituisce bg-gradient Bootstrap) */
.fmz-card-header {
    background: linear-gradient(135deg,#00A67A,#00694D) !important;
    color: #fff !important;
    border-bottom: 0;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

/* Evita che Bootstrap forzi il bianco sulla card-header */
.card-header {
    background-color: transparent;
}

/* Testata tabella pił leggibile */
.table thead th {
    background: #F1F8F6;
}
/* brand-50 soft */