:root{color:#111827;background-color:#f3f4f6;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-weight:400;line-height:1.5}*,:before,:after{box-sizing:border-box}body{background:radial-gradient(circle at 0 0,#e0f2fe,#f9fafb,#e5e7eb);min-height:100vh;margin:0}#root{min-height:100vh}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{color:#f9fafb;z-index:20;background:linear-gradient(90deg,#0f172a,#1e293b);padding:12px 24px;box-shadow:0 8px 20px #0f172a66}.app-header-top{justify-content:space-between;align-items:center;display:flex}.app-header-brand{align-items:center;gap:12px;display:flex}.app-header-logo{object-fit:contain;background:0 0;border:none;border-radius:8px;width:auto;height:60px}.app-header-logo-placeholder{color:#334155;justify-content:center;align-items:center;font-size:13px;font-weight:700;display:flex}.app-header-title{letter-spacing:.03em;margin:0;font-size:20px}.app-header-subtitle{opacity:.85;margin:4px 0 0;font-size:13px}.app-header-badge{background:#3b82f633;border:1px solid #60a5fae6;border-radius:999px;padding:4px 10px;font-size:11px}.app-layout{flex:1;align-items:stretch;gap:16px;width:100%;height:calc(100vh - 64px);margin:0;padding:16px;display:flex}.app-sidebar{color:#e5e7eb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);background:#0f172af7;border-radius:18px;flex-direction:column;flex-shrink:0;width:250px;padding:14px 12px 16px;display:flex;box-shadow:0 18px 40px #0f172aa6,0 0 0 1px #94a3b840}.app-sidebar.collapsed{flex:0 0 72px;width:72px}.sidebar-top{justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;display:flex}.sidebar-brand{align-items:center;gap:8px;display:flex}.sidebar-brand-logo{background:radial-gradient(circle at 30% 0,#93c5fd,#1d4ed8);border-radius:999px;justify-content:center;align-items:center;width:28px;height:28px;font-size:13px;font-weight:700;display:flex}.sidebar-brand-text{flex-direction:column;display:flex}.sidebar-app-name{margin:0;font-size:13px;font-weight:600}.sidebar-app-desc{opacity:.75;margin:0;font-size:11px}.sidebar-toggle{color:#e5e7eb;cursor:pointer;background:#0f172acc;border:none;border-radius:999px;justify-content:center;align-items:center;width:28px;height:28px;transition:all .15s;display:flex;box-shadow:0 0 0 1px #94a3b880}.sidebar-toggle:hover{background:#1e40afe6;box-shadow:0 0 0 1px #bfdbfee6,0 10px 20px #1e40afb3}.app-sidebar.collapsed .sidebar-brand-text,.app-sidebar.collapsed .sidebar-app-desc,.app-sidebar.collapsed .sidebar-section-title,.app-sidebar.collapsed .sidebar-item-label{display:none}.sidebar-scroll{flex:1;padding-right:4px;overflow-y:auto}.sidebar-section-title{text-transform:uppercase;letter-spacing:.08em;color:#9ca3af;margin:12px 6px 4px;font-size:11px}.sidebar-menu-list{margin:0;padding:0;list-style:none}.sidebar-item{color:#e5e7eb;cursor:pointer;border:1px solid #0000;border-radius:999px;align-items:center;margin:2px 0;padding:7px 9px;font-size:13px;transition:all .15s;display:flex}.sidebar-item-left{align-items:center;gap:8px;display:inline-flex}.sidebar-item-icon{justify-content:center;align-items:center;display:inline-flex}.sidebar-item-label{white-space:nowrap}.sidebar-item:hover{background:#1f2937f2;border-color:#94a3b899}.sidebar-item.active{color:#111827;background:#f97316;border-color:#fed7aa;box-shadow:0 10px 20px #f8717180}.app-main{flex:1;min-width:0;height:100%;overflow-y:auto}.card{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff2;border-radius:18px;padding:20px 20px 24px;box-shadow:0 16px 35px #0f172a1f,0 0 0 1px #e2e8f0e6}.card-header{justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:18px;display:flex}.card-header-main{flex-direction:column;gap:4px;display:flex}.card-title{color:#0f172a;margin:0;font-size:18px;font-weight:600}.card-subtitle{color:#6b7280;margin:0;font-size:13px}.card-meta{flex-direction:column;align-items:flex-end;gap:4px;display:flex}.card-meta-chip{color:#4b5563;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:4px 10px;font-size:11px}.data-table-wrapper{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;font-size:14px}.data-table thead tr{color:#e5e7eb;background:#0f172a}.data-table th,.data-table td{text-align:left;white-space:nowrap;border-bottom:1px solid #e5e7eb;padding:10px 12px}.data-table tbody tr:nth-child(2n){background:#f9fafb}.data-table tbody tr:hover{background:#e0f2fe;transition:background .15s}.status-text{color:#4b5563;font-size:14px}.status-text.error{color:#b91c1c}.status-spinner{vertical-align:middle;border:2px solid #93c5fd;border-top-color:#0000;border-radius:999px;width:14px;height:14px;margin-right:8px;animation:.8s linear infinite spin;display:inline-block}.placeholder-box{color:#4b5563;background:#f9fafb;border:1px dashed #d1d5db;border-radius:12px;padding:18px 16px;font-size:14px}.placeholder-title{margin-bottom:4px;font-weight:600}@keyframes spin{to{transform:rotate(360deg)}}.grid-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.feature-card{cursor:pointer;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px 14px 12px;transition:transform .12s,box-shadow .12s,border-color .12s}.feature-card:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 10px 25px #0f172a1f}.feature-title{color:#0f172a;margin-bottom:6px;font-weight:650}.feature-desc{color:#6b7280;font-size:13px}.btn{cursor:pointer;border:none;border-radius:12px;padding:10px 12px;font-size:13px;transition:transform .12s,box-shadow .12s,opacity .12s}.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.btn-primary{color:#fff;background:#2563eb;box-shadow:0 10px 18px #2563eb40}.btn-primary:hover{transform:translateY(-1px);box-shadow:0 14px 26px #2563eb52}.btn-secondary{color:#111827;background:#f3f4f6;border:1px solid #e5e7eb}.btn-row{justify-content:flex-end;gap:8px;display:flex}.form-grid{grid-template-columns:1fr 1fr;gap:10px;display:grid}@media (max-width:640px){.form-grid{grid-template-columns:1fr}.form-field.full{grid-column:span 1}}.form-field{flex-direction:column;gap:6px;display:flex}.form-field.full{grid-column:span 2}.form-group{flex-direction:column;gap:6px;display:flex}.form-group.full{grid-column:span 2}.label{color:#374151;font-size:12px;font-weight:600}.req{color:#ef4444;font-weight:700}.input,.textarea{border:1px solid #e5e7eb;border-radius:12px;outline:none;padding:10px;font-size:13px;transition:border-color .12s,box-shadow .12s}.input:focus,.textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px #93c5fd59}.textarea{resize:vertical;min-height:90px}.toolbar{justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;display:flex}.toolbar-left{align-items:center;gap:8px;display:flex}.modal-backdrop{z-index:9999;background:#0f172a8c;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.modal{background:#fff;border:1px solid #e5e7eb;border-radius:16px;flex-direction:column;width:100%;max-height:calc(100vh - 32px);display:flex;overflow:hidden;box-shadow:0 30px 60px #0f172a59}.modal-header{color:#e5e7eb;background:#0f172a;flex:none;justify-content:space-between;align-items:center;padding:14px 16px;display:flex}.modal-title{margin:0;font-size:14px;font-weight:650}.modal-body{flex:auto;padding:14px 16px 16px;overflow:auto}.inline-field{align-items:stretch;gap:8px;display:flex}.inline-field .input{flex:1}.btn-icon{cursor:pointer;background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;width:42px}.btn-icon:hover{background:#eef2ff;border-color:#c7d2fe}.table-actions{justify-content:flex-end;gap:8px;display:flex}.btn-small{border-radius:10px;padding:8px 10px;font-size:12px}.btn-danger{color:#fff;background:#ef4444;box-shadow:0 10px 18px #ef444440}.btn-danger:hover{transform:translateY(-1px);box-shadow:0 14px 26px #ef444452}.badge{background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;align-items:center;gap:14px;padding:4px 10px;font-size:12px;display:inline-flex}.badge-ok{color:#166534;background:#f0fdf4;border-color:#bbf7d0}.badge-off{color:#991b1b;background:#fef2f2;border-color:#fecaca}.badge-debt{color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe}.badge-debt-red{color:#dc2626;background:#fef2f2;border-color:#fecaca}.badge-pay{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.badge-pay-green{color:#166534;background:#f0fdf4;border-color:#bbf7d0}.badge-return{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.text-error{color:#b91c1c;margin-bottom:8px;font-size:14px}.page{background:#fffffff2;border-radius:18px;padding:22px;box-shadow:0 16px 35px #0f172a1f,0 0 0 1px #e2e8f0e6}.page-header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px;display:flex}.page-header.compact{align-items:center;gap:10px;margin-bottom:8px}.page-header.compact h2{margin:0;font-size:16px;line-height:1.2}.page-header.compact .page-subtitle{display:none}.page-header.compact .btn{border-radius:10px;height:30px;padding:6px 10px;font-size:12px}.page-header.compact .input{height:30px;padding:4px 10px;font-size:12px}.page-header h1{color:#0f172a;margin:0 0 4px;font-size:26px;font-weight:700}.page-header p{color:#6b7280;margin:0;font-size:14px}.page-actions{align-items:center;gap:10px;display:flex}.page-metric{color:#475569;font-size:13px}.page-metric strong{color:#0f172a}.search-row{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:12px;display:flex}.search-row .input{min-width:240px}.debt-search-metrics{align-items:center;gap:10px;display:inline-flex}.summary{color:#475569;gap:12px;font-size:13px;display:flex}.search-suggest{background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;flex-direction:column;gap:6px;margin-bottom:12px;padding:8px;display:flex}.suggest-item{text-align:left;cursor:pointer;background:#fff;border:1px solid #0000;border-radius:10px;padding:8px 10px}.suggest-item:hover{background:#eff6ff;border-color:#93c5fd}.quick-suggest{position:relative}.quick-suggest .input{width:100%}.quick-suggest-panel{z-index:30;background:#0f172a;border:1px solid #ffffff14;border-radius:12px;max-height:220px;padding:0;position:absolute;top:calc(100% + 6px);left:0;right:0;overflow:hidden auto;box-shadow:0 16px 30px #0f172a59}.quick-suggest-item{text-align:left;color:#e5e7eb;cursor:pointer;border:1px solid #0000;border-bottom-color:#94a3b833;border-radius:0;width:100%;padding:10px 12px;display:block;background:0 0!important}.quick-suggest-item:last-child{border-bottom:0}.quick-suggest-item:hover,.quick-suggest-item:focus,.quick-suggest-item:focus-visible{border-color:#0f172a;border-radius:8px;outline:none;box-shadow:0 0 0 1px #0f172a99,0 6px 14px #0060fa59;background:#0060fa!important}.quick-suggest-item.muted{cursor:default;color:#e2e8f0b3}.quick-suggest .suggest-title{font-size:12px;font-weight:700}.quick-suggest .suggest-meta{opacity:.8;font-size:11px}.stockin-search-input{height:36px}.two-pane{flex-direction:column;gap:16px;display:flex}.pane .table-card{margin-top:0}.table-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;margin-top:14px;padding:12px 14px}.table-title{justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:600;display:flex}.table{border-collapse:collapse;width:100%;font-size:14px}.table thead tr{color:#e5e7eb;background:#0f172a}.table th,.table td{text-align:left;white-space:nowrap;border-bottom:1px solid #e5e7eb;padding:10px 12px}.table tbody tr:nth-child(2n){background:#f9fafb}.table tbody tr:hover{background:#e0f2fe}.selected-row{background:#dbeafe!important}.table-fixed{table-layout:fixed;width:100%}.table-fixed th,.table-fixed td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.customer-debt-table th:first-child,.customer-debt-table td:first-child{width:32%}.customer-debt-table th:nth-child(2),.customer-debt-table td:nth-child(2){width:18%}.customer-debt-table th:nth-child(3),.customer-debt-table td:nth-child(3){width:22%}.customer-debt-table th:nth-child(4),.customer-debt-table td:nth-child(4){width:18%}.customer-debt-table th:nth-child(5),.customer-debt-table td:nth-child(5){width:10%}.debt-list-table th:first-child,.debt-list-table td:first-child{width:16%}.debt-list-table th:nth-child(2),.debt-list-table td:nth-child(2){width:14%}.debt-list-table th:nth-child(3),.debt-list-table td:nth-child(3){width:18%}.debt-list-table th:nth-child(4),.debt-list-table td:nth-child(4),.debt-list-table th:nth-child(5),.debt-list-table td:nth-child(5){width:16%}.debt-list-table th:nth-child(6),.debt-list-table td:nth-child(6){width:20%}.debt-summary{background:#f8fafc;border:1px dashed #cbd5f5;border-radius:12px;flex-wrap:wrap;align-items:center;gap:16px;margin-bottom:10px;padding:10px 12px;font-size:14px;display:flex}.debt-summary .summary-label{color:#0f172a;font-weight:600}.debt-summary .summary-value{color:#111827;font-weight:400}.badge-advance{color:#92400e;background:#fef9c3;border-color:#fde68a}.badge-supplier-debt{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.badge-supplier-pay{color:#166534;background:#f0fdf4;border-color:#bbf7d0}.badge-supplier-paid{color:#2563eb;background:#eff6ff;border-color:#bfdbfe}.supplier-list{flex-direction:column;gap:8px;max-height:220px;padding-right:6px;display:flex;overflow-y:auto}.supplier-item{cursor:pointer;background:#fff;border:1px solid #e5e7eb;border-radius:12px;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;transition:all .12s;display:flex}.supplier-item:hover{background:#eff6ff;border-color:#93c5fd}.supplier-item.active{background:#dbeafe;border-color:#2563eb}.supplier-name{color:#0f172a;font-weight:600}.supplier-debt{color:#0f172a;font-weight:700}.supplier-top-row{align-items:center;gap:12px;margin-bottom:12px;display:flex}.supplier-top-row .search-row{flex:1;margin:0}.supplier-total-box{color:#0f172a;white-space:nowrap;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:6px 12px;font-size:13px}.supplier-filter-row{justify-content:flex-start;align-items:center;gap:12px;margin:0;display:inline-flex}.supplier-filter-label{color:#0f172a;text-align:right;min-width:72px;font-size:13px;font-weight:600}.ios-switch{width:46px;height:26px;display:inline-flex;position:relative}.ios-switch input{opacity:0;width:0;height:0}.ios-slider{cursor:pointer;background:#e5e7eb;border:1px solid #d1d5db;border-radius:999px;transition:all .2s;position:absolute;inset:0}.ios-slider:before{content:"";background:#fff;border-radius:50%;width:20px;height:20px;transition:all .2s;position:absolute;top:2px;left:2px;box-shadow:0 2px 6px #0f172a40}.ios-switch input:checked+.ios-slider{background:#2563eb;border-color:#1d4ed8}.ios-switch input:checked+.ios-slider:before{transform:translate(20px)}.debt-search-row{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.debt-filter-row{align-items:center;gap:0;display:flex}.debt-filter-label{text-align:left;color:#0f172a;min-width:90px;font-weight:600}.supplier-table-wrap{background:#fff;border:1px solid #e5e7eb;border-radius:12px;max-height:260px;overflow:auto}.debt-table-wrap{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:auto}.debt-table-wrap-padded{padding:12px}.debt-table-wrap .table thead tr{z-index:1;position:sticky;top:0}.supplier-table{border-collapse:collapse;table-layout:fixed;width:100%}.supplier-table thead th{color:#e5e7eb;z-index:1;background:#0f172a;border-bottom:1px solid #0b1220;padding:10px 12px;font-size:12px;font-weight:600;position:sticky;top:0}.supplier-th-debt{text-align:right;width:120px}.supplier-row{cursor:pointer;transition:background .12s}.supplier-row td{border-bottom:1px solid #f1f5f9;padding:10px 12px;font-size:13px}.supplier-row:hover{background:#eff6ff}.supplier-row.active{background:#dbeafe}.supplier-cell-name{color:#0f172a;white-space:nowrap;text-overflow:ellipsis;font-weight:600;overflow:hidden}.supplier-cell-debt{text-align:right;color:#0f172a;font-weight:700}.supplier-empty{text-align:center;color:#6b7280;padding:14px 12px}.modal-table-wrap{background:#fff;border:1px solid #e5e7eb;border-radius:12px;max-height:220px;overflow:auto}.switch-row{gap:8px;display:inline-flex}.switch-btn{cursor:pointer;background:#f9fafb;border:1px solid #e5e7eb;border-radius:999px;padding:8px 14px;font-size:12px;transition:all .12s}.switch-btn.active{color:#fff;background:#2563eb;border-color:#1d4ed8}.debt-select-list{border:1px dashed #e5e7eb;border-radius:12px;flex-direction:column;gap:8px;max-height:200px;padding:8px 10px;display:flex;overflow-y:auto}.debt-select-item{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;align-items:center;gap:10px;padding:6px 8px;font-size:13px;display:flex}.debt-select-item input{accent-color:#2563eb}.debt-red{background:#fef2f2;border-color:#fecaca}.debt-yellow{background:#fef9c3;border-color:#fde68a}.payroll-extra-badge{background:#f9fafb;border:1px dashed #d1d5db;border-radius:12px;margin-top:16px;padding:16px}.payroll-extra-header{justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.payroll-extra-title{font-weight:700}.payroll-extra-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;display:grid}.payroll-extra-grid .span-2{grid-column:span 2}.payroll-extra-table{margin-top:12px}@media (max-width:1200px){.payroll-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.payroll-extra-grid .span-2{grid-column:span 2}}@media (max-width:768px){.payroll-extra-header{flex-direction:column;align-items:flex-start}.payroll-extra-grid{grid-template-columns:1fr}.payroll-extra-grid .span-2{grid-column:span 1}}
