:root{--bg:#0b0b13;--surface:#15151f;--surface-alt:#1b1b28;--surface-hover:#21212f;--border:#ffffff14;--border-strong:#ffffff29;--text:#eaeaf2;--text-muted:#9c9cb0;--text-faint:#6b6b80;--accent:#e94560;--accent-hover:#ff5c78;--accent-text:#ff8fa3}*{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.navbar{background:var(--surface);color:var(--text);border-bottom:1px solid var(--border);z-index:10;justify-content:space-between;align-items:center;padding:.9rem 2rem;display:flex;position:relative}.navbar-brand{letter-spacing:.01em;cursor:pointer;align-items:center;gap:.6rem;font-size:1.05rem;font-weight:600;transition:opacity .15s;display:flex}.navbar-brand:before{content:"";background:var(--accent);border-radius:50%;flex-shrink:0;width:8px;height:8px}.navbar-brand:hover{opacity:.85}.navbar-actions{align-items:center;gap:.75rem;display:flex}.navbar-actions button{cursor:pointer;background:var(--accent);color:#fff;border:none;border-radius:6px;padding:.55rem 1.1rem;font-size:.85rem;font-weight:600;transition:background-color .15s,transform .1s}.navbar-actions button:hover{background:var(--accent-hover)}.navbar-actions button:active{transform:translateY(1px)}.navbar-actions button:focus-visible{outline-offset:2px;outline:2px solid #fff}.form-container{background:var(--surface);border:1px solid var(--border);border-top:2px solid var(--accent);border-radius:14px;max-width:900px;margin:2rem auto;padding:2.25rem 2.5rem 2rem;box-shadow:0 1px 2px #0000004d,0 12px 32px #00000052}.form-section-title{color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--border);align-items:center;gap:.55rem;margin-bottom:1.5rem;padding-bottom:.6rem;font-size:.76rem;font-weight:700;display:flex}.form-section-title:before{content:"";background:var(--accent);border-radius:50%;flex-shrink:0;width:6px;height:6px}.form-section-title:not(:first-of-type){margin-top:2.5rem}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1.75rem;display:grid}.form-group-full{grid-column:1/-1}.form-group{margin-bottom:1.25rem}.form-group label{color:var(--text-muted);letter-spacing:.01em;margin-bottom:.4rem;font-size:.76rem;font-weight:600;display:block}.form-group input,.form-group select,.form-group textarea{border:1px solid var(--border-strong);background:var(--surface-alt);width:100%;color:var(--text);border-radius:6px;outline:none;padding:.6rem .8rem;font-size:.95rem;transition:background-color .15s,border-color .15s}.material-other-input{margin-top:.5rem}.form-group select option{background:var(--surface-alt);color:var(--text)}.form-group input::placeholder,.form-group textarea::placeholder{color:var(--text-faint)}.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--accent)}.form-group input:disabled,.form-group select:disabled,.form-group textarea:disabled{color:var(--text);opacity:1;cursor:default;appearance:none;resize:none;background:0 0;border-color:#0000;padding-left:0;padding-right:0;font-weight:500}.form-group textarea:disabled{min-height:1.4rem}.form-actions{grid-column:1/-1;justify-content:flex-end;gap:1rem;margin-top:.5rem;display:flex}.form-actions button{cursor:pointer;background:var(--accent);color:#fff;border:none;border-radius:6px;padding:.6rem 1.5rem;font-size:.95rem}.form-actions button:hover{background:var(--accent-hover)}.form-actions button[type=button]{background:var(--surface-hover);color:var(--text)}.form-actions button[type=button]:hover{background:var(--border-strong)}.delete-btn{margin-right:auto;background:#b91c1c!important}.delete-btn:hover{background:#dc2626!important}.app-body{min-height:calc(100vh - 60px);display:flex}.sidebar{background:var(--surface);border-right:1px solid var(--border);flex-shrink:0;width:220px;padding:1.5rem 0}.sidebar-nav{flex-direction:column;display:flex}.sidebar-link{color:var(--text-muted);cursor:pointer;border-left:3px solid #0000;padding:.75rem 1.5rem;font-size:.9rem;font-weight:600}.sidebar-link:hover{background:var(--surface-hover);color:var(--text)}.sidebar-link.active{color:var(--accent-text);border-left-color:var(--accent);background:#e945601a}.dashboard-container{flex:1;padding:2rem 2.5rem}.dashboard-header{justify-content:space-between;align-items:center;margin-bottom:1.5rem;display:flex}.dashboard-header-actions{align-items:center;gap:1rem;display:flex}.dashboard-header button{background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:6px;padding:.6rem 1.2rem;font-size:.95rem}.dashboard-header button:hover{background:var(--accent-hover)}.view-toggle{background:var(--surface-alt);border:1px solid var(--border);border-radius:6px;padding:.2rem;display:flex}.view-toggle button{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:5px;padding:.4rem .9rem;font-size:.85rem;font-weight:600}.view-toggle button.active{background:var(--surface-hover);color:var(--text);box-shadow:0 1px 3px #0000004d}.dashboard-toolbar{align-items:center;gap:.75rem;margin-bottom:1.25rem;display:flex}.search-input{border:1px solid var(--border-strong);background:var(--surface);max-width:320px;color:var(--text);border-radius:6px;outline:none;flex:1;padding:.55rem .9rem;font-size:.9rem}.search-input::placeholder{color:var(--text-faint)}.search-input:focus{border-color:var(--accent)}.dashboard-toolbar select{border:1px solid var(--border-strong);background:var(--surface);color:var(--text);border-radius:6px;padding:.55rem .8rem;font-size:.9rem}.due-badge{color:#fdba74;white-space:nowrap;background:#fb923c26;border-radius:20px;padding:.35rem .8rem;font-size:.8rem;font-weight:600}.due-dot{background:var(--accent);vertical-align:middle;border-radius:50%;width:7px;height:7px;margin-left:.5rem;display:inline-block}.empty-cell{text-align:center;color:var(--text-faint);padding:2rem!important}.leads-table{border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:12px;width:100%;overflow:hidden;box-shadow:0 2px 8px #00000040}.leads-table th{background:var(--surface-alt);color:var(--text);text-align:left;border-bottom:1px solid var(--border);padding:.9rem 1rem;font-size:.85rem}.leads-table th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.leads-table th.sortable:hover{color:var(--accent-text)}.leads-table td{border-bottom:1px solid var(--border);color:var(--text);padding:.9rem 1rem;font-size:.9rem}.lead-row{cursor:pointer;transition:background .15s}.lead-row:hover{background:var(--surface-hover)}.status-badge{border-radius:20px;padding:.3rem .7rem;font-size:.8rem;font-weight:600}.status-new{color:#93c5fd;background:#3b82f629}.status-contacted{color:#fde68a;background:#eab30829}.status-quoted{color:#c4b5fd;background:#8b5cf629}.status-booked{color:#86efac;background:#22c55e29}.status-fitted{color:#6ee7b7;background:#10b98129}.status-invoiced{color:#5eead4;background:#0596692e}.status-lost{color:#fca5a5;background:#ef444429}.stat-cards{grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem;display:grid}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.25rem 1.4rem;box-shadow:0 2px 8px #00000040}.stat-card-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;margin-bottom:.4rem;font-size:.78rem;font-weight:600}.stat-card-value{color:var(--text);font-size:1.6rem;font-weight:700}.report-panels{grid-template-columns:1fr 1fr;gap:1.25rem;display:grid}.report-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.5rem;box-shadow:0 2px 8px #00000040}.report-panel h2{color:var(--text);margin-bottom:1.25rem;font-size:1rem}.bar-list{flex-direction:column;gap:.8rem;display:flex}.bar-row{grid-template-columns:90px 1fr 28px;align-items:center;gap:.75rem;display:grid}.bar-row-label{color:var(--text-muted);font-size:.82rem;font-weight:600}.bar-track{background:var(--surface-alt);border-radius:20px;height:10px;overflow:hidden}.bar-fill{border-radius:20px;height:100%;transition:width .3s}.bar-fill-accent{background:var(--accent)}.status-new-fill{background:#3b82f6}.status-contacted-fill{background:#eab308}.status-quoted-fill{background:#8b5cf6}.status-booked-fill{background:#22c55e}.status-fitted-fill{background:#10b981}.status-invoiced-fill{background:#059669}.status-lost-fill{background:#ef4444}.bar-row-count{color:var(--text-muted);text-align:right;font-size:.82rem}.job-group{margin-bottom:1.75rem}.job-group-date{color:var(--text);border-bottom:1px solid var(--border);margin-bottom:.6rem;padding-bottom:.4rem;font-size:.85rem;font-weight:700}.job-group-date-muted{color:var(--text-faint)}.job-cards{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:.75rem;display:grid}.job-card{background:var(--surface);border:1px solid var(--border);cursor:pointer;border-radius:10px;padding:.9rem 1.1rem;transition:box-shadow .15s,transform .15s,border-color .15s;box-shadow:0 2px 8px #00000040}.job-card:hover{border-color:var(--border-strong);transform:translateY(-1px);box-shadow:0 4px 14px #00000059}.job-card-top{justify-content:space-between;align-items:center;margin-bottom:.4rem;display:flex}.job-card-name{color:var(--text);font-size:.92rem;font-weight:600}.job-card-meta{color:var(--text-muted);font-size:.78rem}.kanban-board{align-items:flex-start;gap:1rem;padding-bottom:.5rem;display:flex;overflow-x:auto}.kanban-column{background:var(--surface-alt);border:1px solid var(--border);border-radius:10px;flex:0 0 260px;padding:.75rem;transition:background .15s,border-color .15s}.kanban-column.drag-over{background:#e9456014;border-color:#e9456066}.kanban-column-header{color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;justify-content:space-between;align-items:center;padding:.25rem .4rem .75rem;font-size:.8rem;font-weight:700;display:flex}.kanban-count{background:var(--surface-hover);color:var(--text-muted);border-radius:20px;padding:.1rem .55rem;font-size:.75rem}.kanban-column-body{flex-direction:column;gap:.6rem;min-height:40px;display:flex}.kanban-card{background:var(--surface);border:1px solid var(--border);cursor:grab;border-radius:8px;padding:.75rem .9rem;transition:box-shadow .15s,transform .15s,border-color .15s;box-shadow:0 1px 3px #00000040}.kanban-card:hover{border-color:var(--border-strong);transform:translateY(-1px);box-shadow:0 3px 10px #00000059}.kanban-card-name{color:var(--text);margin-bottom:.3rem;font-size:.9rem;font-weight:600}.kanban-card-meta{color:var(--text-muted);font-size:.78rem}.kanban-card-quote{color:#86efac;margin-top:.4rem;font-size:.8rem;font-weight:600}.kanban-empty{color:var(--text-faint);text-align:center;padding:.5rem;font-size:.78rem}.detail-header{border-bottom:1px solid var(--border);align-items:center;gap:1rem;margin-bottom:2rem;padding-bottom:1.75rem;display:flex}.detail-header h1{letter-spacing:-.01em;color:var(--text);font-size:1.7rem;font-weight:700}.reference-number{color:var(--text-muted);letter-spacing:.02em;margin-top:.3rem;font-size:.8rem;font-weight:600}.detail-layout{align-items:flex-start;gap:1.5rem;max-width:1320px;margin:2rem auto;padding:0 2rem;display:flex}.detail-layout .form-container{flex:1.5;max-width:none;margin:0}.detail-sidebar{flex-direction:column;flex:1;gap:1.5rem;display:flex;position:sticky;top:2rem}.activity-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:1.5rem;box-shadow:0 2px 8px #00000040}.photo-upload-btn{border:1px dashed var(--border-strong);color:var(--text-muted);cursor:pointer;border-radius:6px;margin-bottom:1rem;padding:.5rem .9rem;font-size:.8rem;font-weight:600;transition:border-color .15s,color .15s;display:inline-block}.photo-upload-btn:hover{border-color:var(--accent);color:var(--accent-text)}.photo-grid{grid-template-columns:repeat(3,1fr);gap:.6rem;display:grid}.photo-thumb{aspect-ratio:1;background:var(--surface-alt);border:1px solid var(--border);border-radius:6px;position:relative;overflow:hidden}.photo-thumb img{object-fit:cover;width:100%;height:100%;display:block}.photo-file-icon{width:100%;height:100%;color:var(--text-muted);background:var(--surface-alt);justify-content:center;align-items:center;font-size:.75rem;font-weight:700;display:flex}.photo-remove-btn{color:#fff;cursor:pointer;background:#000000b3;border:none;border-radius:50%;justify-content:center;align-items:center;width:18px;height:18px;font-size:.75rem;line-height:1;display:flex;position:absolute;top:3px;right:3px}.calc-row{grid-template-columns:1fr 1fr;gap:0 1rem;display:grid}.calc-summary{border-top:1px solid var(--border);flex-direction:column;gap:.55rem;margin-top:.75rem;padding-top:1rem;display:flex}.calc-summary-row{color:var(--text-muted);justify-content:space-between;font-size:.85rem;display:flex}.calc-summary-total{border-top:1px solid var(--border);color:var(--text);margin-top:.25rem;padding-top:.65rem;font-size:1rem;font-weight:700}.calc-summary-total span:last-child{color:var(--accent-text)}.export-quote-btn{border:1px solid var(--border-strong);width:100%;color:var(--text);cursor:pointer;background:0 0;border-radius:6px;margin-top:1.25rem;padding:.6rem 1rem;font-size:.85rem;font-weight:600;transition:border-color .15s,background-color .15s}.export-quote-btn:hover{border-color:var(--accent);background:#e9456014}.activity-panel h2{color:var(--text);margin-bottom:1rem;font-size:1rem}.activity-add{flex-direction:column;gap:.5rem;margin-bottom:1.25rem;display:flex}.activity-add textarea{border:1px solid var(--border-strong);resize:vertical;background:var(--surface-alt);color:var(--text);border-radius:6px;outline:none;padding:.6rem .8rem;font-family:inherit;font-size:.85rem}.activity-add textarea::placeholder{color:var(--text-faint)}.activity-add textarea:focus{border-color:var(--accent)}.activity-add button{background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:6px;align-self:flex-end;padding:.45rem 1rem;font-size:.85rem}.activity-add button:hover{background:var(--accent-hover)}.activity-add button:disabled{cursor:not-allowed;background:#e9456059}.activity-log{flex-direction:column;gap:.9rem;max-height:420px;display:flex;overflow-y:auto}.activity-entry{border-left:2px solid var(--border);padding-left:.75rem}.activity-entry.activity-status{border-left-color:var(--accent)}.activity-entry.activity-created{border-left-color:#22c55e}.activity-entry-message{color:var(--text);font-size:.85rem}.activity-entry-time{color:var(--text-faint);margin-top:.15rem;font-size:.75rem}.activity-empty{color:var(--text-faint);font-size:.85rem}.error{color:#fca5a5;margin:.5rem 0;font-size:.9rem}.loading{text-align:center;color:var(--text-muted);padding:2rem}
