/* =========================================
   ARTGIS - DESIGN SYSTEM UNIFICATO
========================================= */
:root {
    --brand: #1e293b;        
    --brand-light: #3b82f6;  
    --brand-hover: #2563eb;
    --bg-main: #f8fafc;      
    --card-bg: #ffffff;      
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --navbar-height: 65px;
}

* { box-sizing: border-box; }
body { background-color: var(--bg-main); color: var(--text-dark); font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; padding: 0; line-height: 1.6; }

/* NAVBAR */
.navbar { height: var(--navbar-height); background-color: var(--brand); padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 10000; }
.navbar-brand { font-size: 1.4rem; font-weight: 800; color: #fff; text-decoration: none; }
.nav-menu { display: flex; gap: 20px; align-items: center; }
.nav-link { text-decoration: none; color: #cbd5e1; font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { color: #fff; }
.nav-link.logout { color: #f87171; }

/* LAYOUT STANDARD */
.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 40px 20px; min-height: calc(100vh - var(--navbar-height) - 100px); }

/* BOTTONI */
.btn-primary { display: inline-block; padding: 10px 20px; background-color: var(--brand-light); color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; transition: 0.2s; }
.btn-primary:hover { background-color: var(--brand-hover); }
.btn-action { display: inline-block; padding: 10px; background-color: #fff; border: 1px solid var(--border); color: var(--text-dark); border-radius: 6px; font-weight: 500; cursor: pointer; text-align: center; text-decoration: none; transition: 0.2s; }
.btn-action:hover { background-color: var(--bg-main); }

/* DASHBOARD & HOME GRID */
.dashboard-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; background: var(--card-bg); padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid var(--border); }
.count-badge { background: #e2e8f0; color: var(--text-muted); font-size: 0.9rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; margin-left: 10px; vertical-align: middle; }

.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.project-item { background: var(--card-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border: 1px solid var(--border); display: flex; flex-direction: column; transition: transform 0.2s; }
.project-item:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.item-thumb { height: 180px; position: relative; background: #e2e8f0; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-status-tag { position: absolute; top: 15px; right: 15px; background: rgba(15, 23, 42, 0.7); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.item-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.item-header h3 { margin: 0 0 5px 0; font-size: 1.25rem; color: var(--text-dark); }
.item-date { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 15px; }
.item-desc { font-size: 0.95rem; color: #475569; margin: 0 0 20px 0; flex-grow: 1; }
.item-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid var(--border); }

/* VISTA LISTA */
.view-list { display: flex; flex-direction: column; gap: 15px; }
.view-list .project-item { flex-direction: row; align-items: center; padding: 15px; }
.view-list .item-thumb { width: 120px; height: 80px; border-radius: 8px; margin-right: 20px; }
.view-list .item-status-tag { display: none; }
.view-list .item-content { padding: 0; flex-direction: row; justify-content: space-between; align-items: center; border: none; }
.view-list .item-desc { display: none; }
.view-list .item-footer { border: none; padding: 0; }

/* MODULI E IMPOSTAZIONI */
.form-card { background: var(--card-bg); padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); max-width: 600px; margin: 0 auto; border: 1px solid var(--border); }

/* EDITOR LAYOUT */
.editor-container { display: flex; width: 100%; height: calc(100vh - var(--navbar-height)); overflow: hidden; background-color: #fff; }
.editor-sidebar { width: 320px; min-width: 320px; height: 100%; background-color: var(--card-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 1000; }
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-body { flex-grow: 1; overflow-y: auto; padding: 20px; }
.sidebar-section { margin-bottom: 25px; }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); }
.editor-map-area { flex-grow: 1; height: 100%; width: 100%; position: relative; background-color: #e5e3df; z-index: 1; }