*{box-sizing:border-box}body,html{margin:0;padding:0;height:100%;overflow:hidden;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f4f6f8;color:#1a1f2c}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}button{cursor:pointer}.page-loading{color:#6b7280;margin:0}.sidebar-loading{opacity:.7}.app-shell{display:grid;grid-template-columns:240px 1fr}.app-shell,.sidebar{height:100%;overflow:hidden}.sidebar{background:#111827;color:#f9fafb;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0}.sidebar h1{font-size:1.1rem;margin:0}.sidebar nav{display:flex;flex-direction:column;gap:6px;flex:1 1;min-height:0;overflow-y:auto;padding-right:4px}.sidebar nav::-webkit-scrollbar{width:6px}.sidebar nav::-webkit-scrollbar-thumb{background:#374151;border-radius:999px}.sidebar a{padding:8px 12px;border-radius:8px;color:#d1d5db;font-size:.92rem}.sidebar a.active,.sidebar a:hover{background:#1f2937;color:#fff}.sidebar-group{display:flex;flex-direction:column;gap:2px;margin-top:8px}.sidebar-group-parent{font-weight:600}.sidebar-subnav-link{padding-left:24px!important;font-size:.88rem;color:#9ca3af!important}.sidebar-subnav-link.active,.sidebar-subnav-link:hover{color:#fff!important}.sidebar .user-box{flex-shrink:0;margin-top:auto;padding-top:12px;border-top:1px solid #374151;font-size:.85rem}.main-content{padding:16px 20px;height:100%;min-height:0;overflow-y:auto}.main-content-chat{overflow:hidden;display:flex;flex-direction:column;padding-bottom:12px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:20px}.grid-2{display:grid;grid-template-columns:1fr 1fr;grid-gap:16px;gap:16px}.table{width:100%;border-collapse:collapse}.table td,.table th{text-align:left;padding:10px 8px;border-bottom:1px solid #e5e7eb}.table-category-list{table-layout:fixed}.table-category-list col.col-code{width:14%}.table-category-list col.col-active,.table-category-list col.col-order{width:12%}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:.75rem;background:#e5e7eb}.badge.active{background:#d1fae5;color:#065f46}.btn{border:none;border-radius:8px;padding:10px 14px;background:#2563eb;color:#fff}.btn.secondary{background:#e5e7eb;color:#111827}.btn-danger,.btn.secondary.btn-danger{background:#dc2626;color:#fff}.btn-danger:hover:not(:disabled),.btn.secondary.btn-danger:hover:not(:disabled){background:#b91c1c}.btn:disabled{opacity:.6;cursor:not-allowed}.input,.textarea{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:10px 12px;background:#fff}.textarea{min-height:120px;resize:vertical}.form{display:flex;flex-direction:column;gap:12px;max-width:420px}.error{color:#b91c1c;font-size:.9rem}.chat-page{display:flex;flex-direction:column;flex:1 1;min-height:0;overflow:hidden}.chat-page .page-header{flex-shrink:0;margin-bottom:12px}.chat-page .card.chat-layout{flex:1 1;padding:16px}.chat-layout,.chat-page .card.chat-layout{min-height:0;display:flex;flex-direction:column;overflow:hidden}.chat-layout{flex:1 1;gap:12px}.chat-messages{flex:1 1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding-right:4px}.chat-message-row{display:flex;width:100%}.chat-message-row.in{justify-content:flex-start}.chat-message-row.out{justify-content:flex-end}.chat-message{max-width:min(75%,520px);padding:8px 12px;border-radius:12px;word-break:break-word}.chat-message-in{background:#fff;border:1px solid #e5e7eb;border-top-left-radius:4px}.chat-message-out{background:#dcf8c6;border:1px solid #c8e6b4;border-top-right-radius:4px}.chat-sender{font-size:.78rem;font-weight:600;color:#1d4ed8;margin-bottom:4px}.chat-content{white-space:pre-wrap;font-size:.95rem;line-height:1.4}.chat-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:6px;font-size:.7rem;color:#6b7280}.chat-meta .badge{font-size:.65rem;padding:1px 6px}.chat-query-thread{display:flex;flex-direction:column;gap:6px;width:100%}.chat-message-query-response{background:#eff6ff;border-color:#bfdbfe}.chat-message-query-response .chat-sender{color:#1e40af}.chat-message .query-sources{margin-top:8px;font-size:.8rem;color:#4b5563}.chat-message .query-sources ul{margin:4px 0 0;padding-left:18px}.chat-input-row{flex-shrink:0}.chat-textarea-wrap{display:flex;flex-direction:column;border:1px solid #d1d5db;border-radius:12px;background:#fff;overflow:hidden}.chat-textarea-shell{position:relative;flex-shrink:0}.chat-resize-handle{position:absolute;top:6px;right:6px;z-index:2;width:24px;height:24px;padding:0;border:1px solid #e5e7eb;border-radius:6px;background:#f9fafb;color:#6b7280;display:grid;place-items:center;cursor:ns-resize;box-shadow:0 1px 2px rgba(17,24,39,.06)}.chat-resize-handle:hover{color:#374151;background:#f3f4f6;border-color:#d1d5db}.chat-resize-handle:active{background:#e5e7eb}.chat-textarea-wrap:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}.chat-textarea{width:100%;min-height:72px;padding:12px 36px 12px 12px;resize:none;border:none;border-radius:0;background:transparent;box-sizing:border-box;overflow-y:auto}.chat-textarea:focus{outline:none}.chat-composer-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:transparent;flex-shrink:0}.chat-textarea-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}.chat-send-btn{width:32px;height:32px;border:none;border-radius:8px;background:#111827;color:#fff;display:grid;place-items:center;padding:0;flex-shrink:0}.chat-send-btn:hover:not(:disabled){background:#1f2937}.chat-send-btn:disabled{background:#e5e7eb;color:#9ca3af;cursor:not-allowed}.chat-send-spinner{width:14px;height:14px;border:2px solid hsla(0,0%,100%,.35);border-top-color:#fff;border-radius:50%;animation:chat-send-spin .7s linear infinite}.chat-send-btn:disabled .chat-send-spinner{border-color:#9ca3af rgba(156,163,175,.35) rgba(156,163,175,.35)}@keyframes chat-send-spin{to{transform:rotate(1turn)}}.chat-mode-select,.chat-visibility-select{border:1px solid #d1d5db;border-radius:6px;padding:4px 8px;font-size:.8rem;background:#fff;color:#374151;cursor:pointer}.chat-mode-select:hover,.chat-visibility-select:hover{background:#fff;border-color:#9ca3af}.visibility-select{display:flex;flex-direction:column;gap:4px;font-size:.85rem;color:#4b5563;max-width:220px}.badge.visibility-team{background:#dbeafe;color:#1e40af}.badge.visibility-leadership{background:#fef3c7;color:#92400e}.badge.visibility-private{background:#ede9fe;color:#5b21b6}.inbox-list{display:flex;flex-direction:column;gap:16px}.inbox-item{border:1px solid #e5e7eb;border-radius:10px;padding:14px;background:#fafafa}.proposal-box{margin-top:10px;padding:10px;border-radius:8px;background:#fff;border:1px solid #e5e7eb;font-size:.92rem}.inbox-actions{display:flex;gap:8px;margin-top:12px}.login-page{height:100%;min-height:100vh;display:grid;place-items:center;overflow:auto}.login-card{width:100%;max-width:420px}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.page-header h2{margin:0;font-size:1.35rem}.page-header-actions{display:flex;align-items:center;gap:10px}.pipeline-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-gap:12px;gap:12px;align-items:start;overflow-x:auto;padding-bottom:8px}.pipeline-column{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:12px;min-height:140px;transition:border-color .15s ease,background-color .15s ease}.pipeline-column-drop-target{border-color:#3b82f6;background:#eff6ff}.pipeline-column-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.pipeline-column-header h3{margin:0;font-size:.95rem}.pipeline-empty{margin:0;font-size:.85rem;color:#6b7280}.pipeline-empty-drop{border:1px dashed #93c5fd;border-radius:8px;padding:12px;text-align:center;color:#3b82f6}.pipeline-card{display:block;width:100%;text-align:left;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:10px;margin-top:8px;cursor:pointer}.pipeline-card[draggable=true]{cursor:-webkit-grab;cursor:grab}.pipeline-card[draggable=true]:active{cursor:-webkit-grabbing;cursor:grabbing}.pipeline-card-dragging{opacity:.45}.pipeline-card-updating{opacity:.7;pointer-events:none}.pipeline-card:hover{border-color:#93c5fd;box-shadow:0 2px 8px rgba(37,99,235,.08)}.pipeline-card-meta{margin-top:6px;font-size:.85rem;color:#4b5563}.table tr.highlighted td{background:#fef3c7}.form-inline{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-top:8px}.form-inline label{display:flex;flex-direction:column;gap:4px;font-size:.9rem;min-width:240px}.form-inline select{border:1px solid #d1d5db;border-radius:8px;padding:10px 12px;background:#fff}.checkbox-label{display:flex;align-items:center;gap:8px;font-weight:500}.checkbox-label input{width:auto}.card-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.card-section-header h3{margin:0}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:#6b7280;cursor:pointer;flex-shrink:0}.icon-button:hover{background:#f3f4f6;color:#111827}.table-actions{display:flex;flex-wrap:wrap;gap:8px}.link-button{background:none;border:none;padding:0;color:#2563eb;cursor:pointer;font:inherit;text-align:left}.link-button:hover{text-decoration:underline}.link-actions{margin-top:8px}.dropdown{position:relative}.dropdown-menu{position:absolute;top:calc(100% + 4px);right:0;min-width:200px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 24px rgba(17,24,39,.12);padding:4px;z-index:20}.dropdown-item{display:block;width:100%;border:none;border-radius:6px;padding:10px 12px;background:transparent;color:#111827;text-align:left}.dropdown-item:hover{background:#f3f4f6}.modal-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.45);display:grid;place-items:center;padding:24px;z-index:50}.modal{width:100%;max-width:440px;background:#fff;border-radius:12px;border:1px solid #e5e7eb;padding:20px;box-shadow:0 16px 40px rgba(17,24,39,.18)}.modal-wide{max-width:560px}.modal-invoice{max-width:min(80vw,920px);max-height:80vh;display:flex;flex-direction:column;overflow:hidden;padding:0}.modal-invoice .modal-header{flex-shrink:0;margin-bottom:0;padding:20px 20px 16px;border-bottom:1px solid #e5e7eb}.modal-invoice-form{display:flex;flex-direction:column;flex:1 1;min-height:0;overflow:hidden}.modal-invoice-fields{flex-shrink:0;padding:16px 20px 12px}.invoice-header-row-2{grid-template-columns:minmax(140px,220px) minmax(0,1fr)}.invoice-status-field{max-width:280px}.modal-invoice-lines{flex:1 1;min-height:0;display:flex;flex-direction:column;padding:0 20px;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;background:#fafafa}.modal-invoice-lines-header{flex-shrink:0;padding:12px 0 8px}.modal-invoice-lines-scroll{flex:1 1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding-bottom:12px}.modal-invoice-footer{flex-shrink:0;padding:16px 20px 0}.modal-invoice .modal-actions{flex-shrink:0;margin-top:0;padding:16px 20px 20px;border-top:1px solid #e5e7eb;background:#fff}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-header h3{margin:0;font-size:1.1rem}.modal-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:#6b7280;cursor:pointer;flex-shrink:0}.modal-close:hover{background:#f3f4f6;color:#111827}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.modal-actions-between{justify-content:space-between;align-items:center}.modal-actions-group{display:flex;gap:8px}.form-stack label{display:flex;flex-direction:column;gap:4px;font-size:.9rem}.form-stack label.checkbox-label{flex-direction:row;align-items:center;justify-content:flex-start;gap:8px}.form-stack input,.form-stack select,.form-stack textarea{border:1px solid #d1d5db;border-radius:8px;padding:10px 12px;background:#fff}.form-stack{display:flex;flex-direction:column;gap:12px}.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));grid-gap:12px;gap:12px}.form-hint{margin:0;font-size:.9rem;color:#4b5563}.form-section-title{margin:4px 0 0;font-size:.95rem;font-weight:600;color:#111827}.form-section{display:flex;flex-direction:column;gap:12px}.form-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.money-input{display:flex;flex-direction:column;gap:4px;width:100%}.money-input input{width:100%}.money-input-hint{margin:0;font-size:.8rem}.invoice-pesification{padding:12px;border:1px solid #e5e7eb;border-radius:8px;background:#f9fafb}.invoice-pesification-toggle{flex-direction:row!important;align-items:center;gap:8px;font-weight:600}.invoice-pesification-toggle input{width:auto}.invoice-line-item{gap:10px;padding:12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}.invoice-line-sources{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-line-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,160px) 32px;grid-gap:12px;gap:12px;align-items:end}.invoice-line-remove{margin-bottom:1px}.invoice-line-remove-spacer{width:32px}.icon-button-danger{color:#dc2626}.badge.severity-critical,.icon-button-danger:hover{background:#fee2e2;color:#991b1b}.badge.severity-warning{background:#fef3c7;color:#92400e}.badge.severity-info{background:#e0e7ff;color:#3730a3}.pending-summary-list{margin:8px 0 0;padding-left:18px}.pending-summary-list .severity-critical{color:#991b1b}.pending-summary-list .severity-warning{color:#92400e}.pnl-card{padding:0;overflow:hidden}.pnl-table-wrap{overflow-x:auto}.pnl-table{min-width:960px;font-size:.88rem}.pnl-table thead th{background:#166534;color:#fff;white-space:nowrap}.pnl-table td,.pnl-table th{text-align:right;white-space:nowrap}.pnl-sticky-col{position:-webkit-sticky;position:sticky;left:0;z-index:1;text-align:left!important;min-width:280px;background:#fff;box-shadow:1px 0 0 #e5e7eb}.pnl-table thead .pnl-sticky-col{z-index:2;background:#166534}.pnl-row-section td{background:#f3f4f6;font-weight:700;text-align:left!important}.pnl-row-total td{font-weight:700;border-top:1px solid #d1d5db}.pnl-row-highlight td{background:#f9fafb}@media (max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.grid-2{grid-template-columns:1fr}}