:root { --bg: #f5f7fb; --card: #ffffff; --text: #1b1f23; --muted: #626d7a; --primary: #2f6fed; --primary-contrast: #ffffff; --success: #2bb673; --danger: #e04545; --sidebar-bg: #222832; --sidebar-text: #e8eef7; --border: #e5e9f2; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--text); background: var(--bg); }
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 20px; }
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 56px); }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); padding: 16px; }
.sidebar-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; opacity: 0.9; }
.project-list { list-style: none; margin: 0; padding: 0; }
.project-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.project-item:hover { background: rgba(255,255,255,0.08); }
.state-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.state-Attivo { background: #2bb673; }
.state-In\ corso { background: #2f6fed; }
.state-Completato { background: #9aa6b2; }
.state-In\ ritardo { background: #e04545; }
.project-name-small { color: var(--sidebar-text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 16px; }
.main { padding-bottom: 145px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.empty-msg { color: var(--muted); text-align: center; padding: 40px 0; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dashboard-title { font-size: 16px; font-weight: 600; }
.projects-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.project-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fbfcff; display: grid; gap: 8px; }
.project-card-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.project-card-meta { font-size: 13px; color: var(--muted); }
.project-card-actions { display: flex; gap: 8px; justify-content: flex-end; }
.project-header-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.project-title-state { display: flex; align-items: center; gap: 12px; }
.project-name { font-size: 18px; font-weight: 600; }
.project-progress { display: flex; align-items: center; gap: 10px; }
.progress-label { min-width: 44px; text-align: right; color: var(--muted); }
.tabs { margin-top: 16px; }
.tab-nav { display: flex; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tab-btn { background: transparent; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tab-btn.active { color: var(--text); background: #eef2f9; }
.tab-content { padding-top: 12px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.value { font-size: 14px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.summary-title { font-size: 12px; color: var(--muted); }
.summary-value { font-size: 16px; font-weight: 600; }
.form { margin-top: 12px; }
.form-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.form-inline { display: flex; gap: 8px; margin-bottom: 12px; }
.input, .select, textarea { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fbfcff; font-size: 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.btn { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: #f4f7fc; color: var(--text); cursor: pointer; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.btn.success { background: var(--success); border-color: var(--success); color: var(--primary-contrast); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--primary-contrast); }
.list { margin-top: 12px; display: grid; gap: 8px; }
.list-item { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr 0.8fr auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.list-item.compact { grid-template-columns: 1fr auto; }
.list-actions { display: flex; gap: 8px; justify-content: flex-end; }
.todo-checked { text-decoration: line-through; color: var(--muted); }
.hidden { display: none; }
.flex { flex: 1; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal.hidden { display: none; }
.modal-content { width: 640px; max-width: 100%; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.footer { margin-top: 0; padding: 10px; background: var(--card); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; }
.footer-text { font-size: 12px; color: var(--muted); text-align: center; max-width: 900px; }
.footer-image { max-height: 68px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } .summary { grid-template-columns: 1fr; } .list-item { grid-template-columns: 1.5fr 1fr 1fr auto; } .layout { grid-template-columns: 220px 1fr; } }
@media (max-width: 700px) { .layout { grid-template-columns: 1fr; } .sidebar { position: sticky; top: 56px; z-index: 9; } .projects-list { grid-template-columns: 1fr; } .footer-text { font-size: 11px; padding: 0 8px; } .footer-image { max-height: 48px; } }
