:root{--bg:#f4f3ee;--card:#fff;--border:#e6e4dd;--text:#1f2430;--text-muted:#6b7280;--accent:#4f46e5;--accent-dark:#4338ca;--accent-bg:#eef2ff;--green:#16a34a;--green-bg:#ecfdf3;--amber:#b45309;--amber-bg:#fff7ed;--red:#dc2626;--red-bg:#fef2f2;--gray-bg:#f1f2f4;--radius:12px;--shadow:0 1px 2px #1018280a, 0 1px 3px #1018280f}*{box-sizing:border-box}html,body,#root{background:var(--bg);min-height:100vh;color:var(--text);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}button,input,select,textarea{font-family:inherit;font-size:14px}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;display:flex}.sidebar{background:var(--card);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;gap:4px;width:220px;padding:20px 14px;display:flex}.sidebar-logo{align-items:center;gap:8px;padding:0 8px 20px;display:flex}.sidebar-logo img{height:26px}.nav-link{color:var(--text-muted);border-radius:8px;align-items:center;gap:10px;padding:9px 12px;font-size:14px;font-weight:500;display:flex}.nav-link:hover{background:var(--gray-bg);color:var(--text)}.nav-link.active{background:var(--accent-bg);color:var(--accent-dark)}.main{flex:1;min-width:0;padding:24px 32px 48px}.topbar{justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;display:flex}.search-input{border:1px solid var(--border);background:var(--card);border-radius:8px;outline:none;flex:1;max-width:420px;padding:9px 14px}.search-input:focus{border-color:var(--accent)}.user-chip{align-items:center;gap:10px;display:flex}.avatar{background:var(--accent);color:#fff;border-radius:50%;justify-content:center;align-items:center;width:34px;height:34px;font-size:13px;font-weight:600;display:flex}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px;display:flex}.page-title{margin:0 0 4px;font-size:24px;font-weight:600}.page-subtitle{color:var(--text-muted);margin:0;font-size:14px}.btn{border:1px solid var(--border);background:var(--card);color:var(--text);cursor:pointer;white-space:nowrap;border-radius:8px;align-items:center;gap:6px;padding:9px 16px;font-weight:500;display:inline-flex}.btn:hover{background:var(--gray-bg)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-dark)}.btn-danger{color:var(--red)}.btn-sm{padding:6px 12px;font-size:13px}.stat-grid{grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px;display:grid}@media (width<=900px){.stat-grid{grid-template-columns:repeat(2,1fr)}}.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.stat-label{letter-spacing:.04em;color:var(--text-muted);text-transform:uppercase;margin-bottom:10px;font-size:12px;font-weight:600}.stat-value{font-size:26px;font-weight:700}.stat-sub{color:var(--text-muted);margin-top:4px;font-size:13px}.grid-2{grid-template-columns:1.4fr 1fr;gap:16px;display:grid}@media (width<=900px){.grid-2{grid-template-columns:1fr}}.table{border-collapse:collapse;width:100%;font-size:14px}.table th{text-align:left;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted);border-bottom:1px solid var(--border);padding:10px 12px;font-size:12px}.table td{border-bottom:1px solid var(--border);vertical-align:top;padding:12px}.table tr:last-child td{border-bottom:none}.table tr:hover td{background:#fafafa}.badge{text-transform:capitalize;border-radius:999px;align-items:center;padding:3px 10px;font-size:12px;font-weight:600;display:inline-flex}.badge-draft{background:var(--gray-bg);color:#4b5563}.badge-sent{background:var(--amber-bg);color:var(--amber)}.badge-accepted{background:var(--green-bg);color:var(--green)}.badge-rejected{background:var(--red-bg);color:var(--red)}.form-grid{grid-template-columns:repeat(2,1fr);gap:14px;display:grid}.form-grid.full{grid-template-columns:1fr}@media (width<=900px){.form-grid{grid-template-columns:1fr}}.field{flex-direction:column;gap:6px;display:flex}.field label{color:var(--text-muted);font-size:13px;font-weight:600}.field input,.field select,.field textarea{border:1px solid var(--border);background:var(--card);border-radius:8px;outline:none;width:100%;padding:9px 12px}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--accent)}.field textarea{resize:vertical;font-family:inherit}.section-title{border-bottom:1px solid var(--border);margin:28px 0 12px;padding-bottom:8px;font-size:15px;font-weight:700}.section-title:first-child{margin-top:0}.items-table{border-collapse:collapse;width:100%}.items-table th{text-transform:uppercase;color:var(--text-muted);text-align:left;border-bottom:1px solid var(--border);padding:6px 8px;font-size:11px}.items-table td{vertical-align:top;padding:6px 8px}.items-table input,.items-table select,.items-table textarea{border:1px solid var(--border);border-radius:6px;width:100%;padding:6px 8px}.items-table textarea{min-height:38px}.totals-box{flex-direction:column;gap:6px;width:280px;margin-top:12px;margin-left:auto;display:flex}.totals-row{justify-content:space-between;font-size:14px;display:flex}.totals-row.grand{border-top:1px solid var(--border);margin-top:4px;padding-top:8px;font-size:16px;font-weight:700}.chip-row{flex-wrap:wrap;gap:8px;display:flex}.chip{border:1px solid var(--border);background:var(--card);cursor:pointer;border-radius:999px;padding:6px 12px;font-size:13px}.chip.selected{background:var(--accent-bg);border-color:var(--accent);color:var(--accent-dark);font-weight:600}.checklist{flex-direction:column;gap:8px;display:flex}.checklist label{align-items:flex-start;gap:8px;font-size:13.5px;display:flex}.checklist input{margin-top:3px}.product-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px;display:grid}.product-card{border:1px solid var(--border);border-radius:var(--radius);background:var(--card);cursor:pointer;transition:box-shadow .15s;overflow:hidden}.product-card:hover{box-shadow:var(--shadow);border-color:var(--accent)}.product-card .thumb{aspect-ratio:1;background:var(--gray-bg);justify-content:center;align-items:center;width:100%;display:flex;overflow:hidden}.product-card .thumb img{object-fit:cover;width:100%;height:100%}.product-card .thumb .placeholder{color:var(--text-muted);font-size:11px}.product-card .info{padding:8px 10px}.product-card .info .pname{margin-bottom:2px;font-size:13px;font-weight:600}.product-card .info .pmeta{color:var(--text-muted);font-size:11.5px}.modal-backdrop{z-index:50;background:#0006;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.modal{background:var(--card);border-radius:var(--radius);width:640px;max-width:100%;max-height:85vh;padding:24px;overflow-y:auto}.empty-state{text-align:center;color:var(--text-muted);padding:60px 20px}.activity-item{border-bottom:1px solid var(--border);gap:10px;padding:10px 0;font-size:13.5px;display:flex}.activity-item:last-child{border-bottom:none}.activity-time{color:var(--text-muted);white-space:nowrap;font-size:12px}.letterhead{color:#1a1a1a;width:794px;max-width:100%;box-shadow:var(--shadow);background:#fff;border-radius:4px;margin:0 auto;padding:40px 48px;font-size:12.5px}.letterhead-header{border-bottom:3px solid #4472c4;justify-content:space-between;align-items:flex-start;margin-bottom:16px;padding-bottom:12px;display:flex}.letterhead-header img{height:42px}.letterhead-company{text-align:right;font-size:11px;line-height:1.5}.letterhead-company .name{font-size:13px;font-weight:700}.letterhead-title{text-align:center;letter-spacing:.1em;background:#d9e4f5;margin-bottom:12px;padding:8px;font-size:22px;font-weight:700}.letterhead-meta{grid-template-columns:1fr 1fr;gap:4px 24px;margin-bottom:12px;font-size:12px;display:grid}.letterhead-meta b{min-width:90px;display:inline-block}.letterhead p{margin:0 0 8px;font-size:12px;line-height:1.5}.letterhead-table{border-collapse:collapse;width:100%;margin:14px 0;font-size:11.5px}.letterhead-table th{text-align:left;background:#d9e4f5;border:1px solid #b9c7e0;padding:6px 8px}.letterhead-table td{border:1px solid #d8dbe2;padding:6px 8px}.letterhead-table td.num{text-align:right}.letterhead-totals td{background:#f5f6f8;font-weight:600}.letterhead-section{margin-top:14px}.letterhead-section-title{background:#d9e4f5;padding:5px 8px;font-size:12px;font-weight:700}.letterhead-section ul{margin:8px 0;padding-left:18px;font-size:11px;line-height:1.6}.letterhead-footer-note{color:#666;text-align:right;margin-top:20px;font-size:10px}@media print{.no-print{display:none!important}.letterhead{box-shadow:none}}
