/* =====================================================
   VENETOARCHITETTURA - SHARED STYLES
   Palette: Grayscale professionale (nero → bianco)
   ===================================================== */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    color: #1A1A1A;
    font-size: 15px;
}

/* =====================================================
   HEADER & NAVBAR
   ===================================================== */
.header {
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.header h1 { font-size: 26px; font-weight: 600; }
.header .codice { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 6px; font-family: 'Monaco', monospace; }

/* Navbar */
.navbar {
    background: rgba(0,0,0,0.15);
    padding: 0 40px;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-menu {
    display: flex;
    gap: 4px;
}

.navbar-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.navbar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.navbar-link.active {
    color: #fff;
    border-bottom-color: #fff;
    background: rgba(255,255,255,0.1);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.navbar-logout {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.navbar-logout:hover {
    background: rgba(255,255,255,0.25);
}

/* Header semplificato per pagine interne */
.header-simple .header-content {
    padding: 16px 40px;
}

.header-simple h1 {
    font-size: 22px;
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .navbar-menu { gap: 0; }
    .navbar-link { padding: 12px 12px; font-size: 13px; }
    .navbar-user { display: none; }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #444444 0%, #2C2C2C 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); }

.btn-secondary { background: rgba(255,255,255,0.15); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.25); }

.btn-ghost {
    background: #FFFFFF;
    color: #1A1A1A;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.btn-ghost:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }

.btn-success { background: linear-gradient(135deg, #2ECC71, #27AE60); color: #fff; }
.btn-danger { background: #E74C3C; color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-xs { padding: 8px 14px; font-size: 12px; }

/* =====================================================
   LAYOUT
   ===================================================== */
.container { max-width: 1400px; margin: 0 auto; padding: 40px; }
.container-wide { max-width: 1600px; margin: 0 auto; padding: 40px; }

/* =====================================================
   CARDS & PANELS
   ===================================================== */
.card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.info-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.info-item { display: flex; flex-direction: column; gap: 8px; }
.info-label { font-size: 12px; color: #888888; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.info-value { font-size: 18px; font-weight: 600; color: #1A1A1A; }

/* =====================================================
   TABS
   ===================================================== */
.tabs-nav {
    display: flex;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    width: fit-content;
}

.tab-btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    color: #888888;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: linear-gradient(135deg, #444444 0%, #2C2C2C 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-content {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tab-panel { padding: 32px; }

/* Main tabs (for gare/lavori style) */
.main-tabs { display: flex; gap: 8px; margin-bottom: 32px; background: #fff; padding: 8px; border-radius: 16px; width: fit-content; }
.main-tab { padding: 14px 32px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; background: none; color: #888888; transition: all 0.3s; font-family: inherit; }
.main-tab.active { background: linear-gradient(135deg, #444444, #2C2C2C); color: #fff; }

/* Sub tabs (for budget) */
.sub-tabs { display: flex; gap: 0; border-bottom: 2px solid #E5E5E5; margin-bottom: 28px; overflow-x: auto; }
.sub-tab { padding: 14px 24px; font-size: 14px; font-weight: 600; background: none; border: none; cursor: pointer; color: #888888; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; font-family: inherit; }
.sub-tab:hover { color: #1A1A1A; }
.sub-tab.active { color: #444444; border-bottom-color: #444444; }

/* =====================================================
   BADGES
   ===================================================== */
.badge { display: inline-block; padding: 10px 18px; border-radius: 9999px; font-size: 13px; font-weight: 600; }
.badge-sm { padding: 5px 10px; font-size: 11px; border-radius: 9999px; }

/* Status badges */
.badge-in-corso, .badge-in_corso { background: #E8F4FD; color: #1E6BB0; }
.badge-completata, .badge-vinta { background: #E6F7ED; color: #1B7F4A; }
.badge-sospesa, .badge-attesa { background: #FEF0E6; color: #C75D20; }
.badge-da-fare, .badge-scaduta { background: #F0F0F0; color: #555555; }
.badge-persa { background: #FDEEEE; color: #C0392B; }
.badge-pubblico { background: #E8F4FD; color: #1E6BB0; }
.badge-privato { background: #F0F0F0; color: #555555; }

/* =====================================================
   TABLES
   ===================================================== */
.table-container { background: #fff; border-radius: 20px; overflow: hidden; }
.table-header { padding: 20px 24px; border-bottom: 1px solid #E5E5E5; display: flex; justify-content: space-between; align-items: center; }
.table-title { font-size: 18px; font-weight: 600; color: #1A1A1A; }
.table-scroll { max-height: 55vh; overflow-y: auto; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid #E5E5E5; font-size: 14px; }
.data-table th { font-size: 11px; text-transform: uppercase; color: #888888; background: #F7F7F7; font-weight: 600; position: sticky; top: 0; }
.data-table tr:hover { background: #F7F7F7; }
.data-table .importo { font-weight: 700; color: #1A1A1A; text-align: right; white-space: nowrap; }
.data-table .importo.green { color: #27AE60; }
.data-table .importo.red { color: #E74C3C; }
.data-table .anno { white-space: nowrap; color: #555555; font-weight: 600; }
.data-table .text-right { text-align: right; }
.data-table .totale-row { background: #F7F7F7; font-weight: 700; }

/* Budget table specific */
.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th, .budget-table td { padding: 18px 20px; text-align: left; border-bottom: 1px solid #E5E5E5; font-size: 14px; }
.budget-table th { font-size: 12px; text-transform: uppercase; color: #888888; font-weight: 600; background: #F7F7F7; }
.budget-table .text-right { text-align: right; }
.budget-table .importo { font-weight: 700; color: #555555; }
.budget-table .importo.green { color: #27AE60; }
.budget-table .importo.red { color: #E74C3C; }
.budget-table tr:hover { background: #F7F7F7; }
.budget-table .actions { display: flex; gap: 8px; justify-content: flex-end; }
.budget-table .actions button { background: none; border: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.budget-table .actions button:hover { background: #E5E5E5; }
.budget-table .totale-row { background: #F7F7F7; font-weight: 700; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #FFFFFF;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
.modal-lg { max-width: 900px; }

.modal-header { padding: 28px 32px; border-bottom: 1px solid #E5E5E5; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 20px; font-weight: 600; color: #1A1A1A; }
.modal-body { padding: 32px; }
.modal-footer { padding: 24px 32px; border-top: 1px solid #E5E5E5; display: flex; gap: 12px; justify-content: flex-end; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 24px; }
.form-label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #1A1A1A; text-transform: uppercase; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #D0D0D0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #FAFAFA;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #444444; background: #FFFFFF; }
.form-textarea { min-height: 100px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.form-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #E5E5E5; }
.form-section-title { font-size: 13px; font-weight: 600; color: #555555; margin-bottom: 16px; }

/* =====================================================
   FILTERS
   ===================================================== */
.filters-bar { background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 24px; display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 11px; text-transform: uppercase; color: #888888; font-weight: 600; }
.filter-input, .filter-select { padding: 10px 14px; border: 2px solid #D0D0D0; border-radius: 12px; font-size: 14px; font-family: inherit; background: #FAFAFA; min-width: 140px; }
.filter-input:focus, .filter-select:focus { outline: none; border-color: #444444; }
.search-input { min-width: 250px; }

/* =====================================================
   STATS & KPI CARDS
   ===================================================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 16px; padding: 18px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.stat-value.blue { color: #3498DB; }
.stat-value.orange { color: #E67E22; }
.stat-value.green { color: #27AE60; }
.stat-value.red { color: #E74C3C; }
.stat-value.purple { color: #9B59B6; }
.stat-label { font-size: 11px; color: #888888; text-transform: uppercase; }

/* KPI Cards (gradient) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi-card { border-radius: 16px; padding: 20px; color: #fff; text-align: center; }
.kpi-card.purple { background: linear-gradient(135deg, #9B59B6, #8E44AD); }
.kpi-card.green { background: linear-gradient(135deg, #2ECC71, #27AE60); }
.kpi-card.blue { background: linear-gradient(135deg, #3498DB, #2980B9); }
.kpi-card.orange { background: linear-gradient(135deg, #E67E22, #D35400); }
.kpi-card.red { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.kpi-value { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.kpi-label { font-size: 11px; text-transform: uppercase; opacity: 0.9; }

/* =====================================================
   SECTION HEADERS
   ===================================================== */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.section-title { font-size: 18px; font-weight: 600; color: #1A1A1A; }

/* =====================================================
   ACTIONS
   ===================================================== */
.actions { display: flex; gap: 6px; }
.actions button { background: none; border: none; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: #888888; }
.actions button:hover { background: #E5E5E5; color: #1A1A1A; }

/* =====================================================
   AVATAR
   ===================================================== */
.avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #444444, #2C2C2C);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 16px;
    flex-shrink: 0;
}
.avatar-small { width: 36px; height: 36px; font-size: 12px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress-container { display: flex; align-items: center; gap: 16px; }
.progress-bar { flex: 1; height: 8px; background: #D0D0D0; border-radius: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #444444, #2C2C2C); border-radius: 8px; }
.progress-text { font-size: 14px; font-weight: 600; color: #1A1A1A; min-width: 100px; text-align: right; }

/* =====================================================
   LOADING & EMPTY STATES
   ===================================================== */
.loading { text-align: center; padding: 80px; color: #888888; }
.empty-state { text-align: center; padding: 60px 24px; color: #888888; }

/* =====================================================
   ORE SUMMARY (commessa detail)
   ===================================================== */
.ore-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    border-radius: 20px;
    margin-top: 28px;
}
.ore-summary-item { display: flex; flex-direction: column; gap: 6px; }
.ore-summary-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); }
.ore-summary-value { font-size: 26px; font-weight: 700; color: #FFFFFF; }
.ore-summary-value.highlight { color: #7DD3A8; }
.ore-summary-value.warning { color: #FFD166; }
.ore-summary-value.danger { color: #FF8A80; }

/* =====================================================
   FASE & SOTTOFASE (commessa detail)
   ===================================================== */
.fase-item { background: #F7F7F7; border-radius: 20px; margin-bottom: 20px; overflow: hidden; border: 2px solid transparent; }
.fase-item:hover { border-color: #D0D0D0; }
.fase-main { padding: 24px; cursor: pointer; }
.fase-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.fase-title-row { display: flex; align-items: center; gap: 12px; }
.fase-expand-icon { font-size: 14px; color: #888888; transition: transform 0.3s ease; }
.fase-expand-icon.expanded { transform: rotate(90deg); }
.fase-name { font-size: 17px; font-weight: 600; color: #1A1A1A; }
.fase-meta { display: flex; gap: 24px; font-size: 14px; color: #888888; margin-bottom: 16px; }

.sottofasi-container { background: #FFFFFF; border-top: 1px solid #E5E5E5; padding: 24px; }
.sottofasi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sottofasi-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #888888; }

.sottofase-item { background: #F7F7F7; border-radius: 16px; padding: 20px; margin-bottom: 16px; border: 2px solid transparent; }
.sottofase-item:hover { border-color: #D0D0D0; }
.sottofase-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sottofase-checkbox { width: 22px; height: 22px; cursor: pointer; accent-color: #444444; }
.sottofase-nome { flex: 1; font-size: 16px; font-weight: 500; color: #1A1A1A; }
.sottofase-nome.completata { text-decoration: line-through; color: #888888; }
.sottofase-descrizione { font-size: 14px; color: #888888; margin-left: 36px; margin-bottom: 12px; }

/* =====================================================
   REGISTRAZIONI ORE
   ===================================================== */
.registrazioni-container { margin-left: 36px; margin-top: 16px; }
.registrazione-item { background: #FFFFFF; border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.registrazione-info { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.registrazione-data { color: #888888; font-family: Monaco, monospace; font-size: 13px; }
.registrazione-ore { font-weight: 700; background: linear-gradient(135deg, #444444, #2C2C2C); color: #fff; padding: 6px 14px; border-radius: 9999px; }
.registrazione-collaboratore { color: #1A1A1A; font-weight: 500; }
.registrazione-descrizione { color: #888888; font-style: italic; }
.registrazione-actions button { background: none; border: none; cursor: pointer; color: #888888; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.registrazione-actions button:hover { background: #F0F0F0; color: #1A1A1A; }

/* ORE FORM */
.ore-form { background: #FFFFFF; border: 2px solid #444444; border-radius: 16px; padding: 24px; margin-top: 16px; margin-left: 36px; }
.ore-form-title { font-size: 13px; font-weight: 600; text-transform: uppercase; margin-bottom: 20px; color: #1A1A1A; }
.ore-form-grid { display: grid; grid-template-columns: 150px 100px 1fr 1fr; gap: 16px; align-items: end; }
.ore-form-group { display: flex; flex-direction: column; gap: 8px; }
.ore-form-label { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #888888; }
.ore-form-input { padding: 12px 16px; border: 2px solid #D0D0D0; border-radius: 12px; font-size: 14px; font-family: inherit; }
.ore-form-input:focus { outline: none; border-color: #444444; }
.ore-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.totale-ore-badge { background: #F7F7F7; border-radius: 9999px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: #1A1A1A; }
.empty-sottofasi { text-align: center; padding: 32px; color: #888888; }

/* =====================================================
   BUDGET CARDS
   ===================================================== */
.budget-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.budget-card { background: #F7F7F7; border-radius: 16px; padding: 24px; }
.budget-card.highlight { background: linear-gradient(135deg, #2C2C2C, #1A1A1A); color: #fff; }
.budget-card-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: #888888; margin-bottom: 10px; }
.budget-card.highlight .budget-card-label { color: rgba(255,255,255,0.7); }
.budget-card-value { font-size: 28px; font-weight: 700; color: #1A1A1A; }
.budget-card.highlight .budget-card-value { color: #FFFFFF; }
.budget-card-value.positive { color: #1B7F4A; }
.budget-card-value.negative { color: #C75D20; }

/* Budget Sidebar */
.budget-content-with-sidebar { display: grid; grid-template-columns: 1fr 240px; gap: 32px; }
.budget-main-content { min-width: 0; }
.budget-sidebar { display: flex; flex-direction: column; gap: 16px; }
.budget-sidebar-card { background: #fff; border-radius: 16px; padding: 20px; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.05); border: 1px solid #E5E5E5; }
.budget-sidebar-value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.budget-sidebar-value.purple { color: #9B59B6; }
.budget-sidebar-value.green { color: #27AE60; }
.budget-sidebar-value.blue { color: #3498DB; }
.budget-sidebar-value.orange { color: #E67E22; }
.budget-sidebar-value.red { color: #E74C3C; }
.budget-sidebar-label { font-size: 12px; color: #888888; }

/* =====================================================
   ECONOMIA / CHARTS
   ===================================================== */
.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.eco-chart-container { background: #F7F7F7; border-radius: 16px; padding: 24px; }
.eco-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.eco-bar-label { width: 90px; font-size: 13px; font-weight: 600; color: #1A1A1A; }
.eco-bar-container { flex: 1; height: 28px; background: #D0D0D0; border-radius: 8px; overflow: hidden; }
.eco-bar-fill { height: 100%; border-radius: 8px; transition: width 0.5s ease; }
.eco-bar-fill.purple { background: linear-gradient(90deg, #9B59B6, #8E44AD); }
.eco-bar-fill.blue { background: linear-gradient(90deg, #3498DB, #2980B9); }
.eco-bar-fill.green { background: linear-gradient(90deg, #2ECC71, #27AE60); }
.eco-bar-fill.orange { background: linear-gradient(90deg, #E67E22, #D35400); }
.eco-bar-fill.red { background: linear-gradient(90deg, #E74C3C, #C0392B); }
.eco-bar-value { width: 100px; text-align: right; font-weight: 700; font-size: 14px; color: #1A1A1A; }

.utile-card { background: linear-gradient(135deg, #9B59B6, #8E44AD); border-radius: 20px; padding: 32px; color: #fff; text-align: center; margin-bottom: 24px; }
.utile-card.positive { background: linear-gradient(135deg, #2ECC71, #27AE60); }
.utile-card.negative { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.utile-card .value { font-size: 42px; font-weight: 700; }
.utile-card .label { font-size: 14px; opacity: 0.9; margin-top: 8px; }

/* =====================================================
   CATEGORIE SOA (gare/lavori)
   ===================================================== */
.cat-summary { background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 24px; }
.cat-summary-title { font-size: 14px; font-weight: 600; color: #1A1A1A; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.cat-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.cat-summary-item { background: #F7F7F7; padding: 12px 10px; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.cat-summary-item:hover { border-color: #D0D0D0; }
.cat-summary-item.active { background: #444444; color: #fff; border-color: #444444; }
.cat-summary-item .code { font-size: 12px; font-weight: 700; }
.cat-summary-item .value { font-size: 11px; margin-top: 4px; opacity: 0.8; }
.cat-summary-item.active .value { opacity: 1; }
.cat-section-title { font-size: 11px; text-transform: uppercase; color: #888888; margin: 16px 0 10px 0; font-weight: 600; }

.categorie-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 250px; }
.cat-tag { font-size: 10px; padding: 3px 7px; background: #E0E0E0; color: #333333; border-radius: 8px; }
.cat-tag.highlighted { background: #444444; color: #fff; }

/* =====================================================
   TEAM GRID (team page)
   ===================================================== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.team-card { background: #FFFFFF; border-radius: 20px; padding: 28px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); display: flex; gap: 20px; align-items: flex-start; border: 2px solid transparent; transition: all 0.3s ease; }
.team-card:hover { border-color: #D0D0D0; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }
.team-card-content { flex: 1; }
.team-card-name { font-size: 18px; font-weight: 600; color: #1A1A1A; margin-bottom: 4px; }
.team-card-email { font-size: 13px; color: #888888; margin-bottom: 12px; }
.team-card-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.team-card-tag { font-size: 12px; padding: 6px 12px; background: #F7F7F7; border-radius: 9999px; color: #1A1A1A; }
.team-card-tag.highlight { background: linear-gradient(135deg, #444444, #2C2C2C); color: #fff; }
.team-card-actions { display: flex; gap: 8px; margin-top: 16px; }

/* =====================================================
   COMMESSE GRID
   ===================================================== */
.commesse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.commessa-card { background: #FFFFFF; border-radius: 20px; padding: 28px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); border: 2px solid transparent; transition: all 0.3s ease; cursor: pointer; }
.commessa-card:hover { border-color: #D0D0D0; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }
.commessa-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.commessa-card-title { font-size: 18px; font-weight: 600; color: #1A1A1A; }
.commessa-card-codice { font-size: 12px; color: #555555; font-family: Monaco, monospace; margin-top: 4px; }
.commessa-card-cliente { font-size: 14px; color: #888888; margin-bottom: 16px; }
.commessa-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid #E5E5E5; }

/* =====================================================
   DETAIL GRID (for modal details)
   ===================================================== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1000px) {
    .budget-content-with-sidebar { grid-template-columns: 1fr; }
    .eco-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container, .container-wide { padding: 20px; }
    .header { padding: 20px; }
    .tabs-nav, .main-tabs { flex-wrap: wrap; width: 100%; }
    .tab-btn, .main-tab { flex: 1; text-align: center; padding: 12px 16px; }
    .ore-form-grid { grid-template-columns: 1fr 1fr; }
    .team-grid, .commesse-grid { grid-template-columns: 1fr; }
}
