:root{--primary:#0f172a;--accent:#2563eb;--bg:#f8fafc;--text-main:#1e293b;--text-muted:#64748b;--border:#e2e8f0;--success:#10b981;--white:#fff;--warning:#f59e0b}*{box-sizing:border-box;margin:0;padding:0}body{background-color:var(--bg);color:var(--text-main);min-height:100vh;font-family:Inter,-apple-system,sans-serif}.app-layout{min-height:100vh;display:flex}.sidebar{background:var(--white);border-right:1px solid var(--border);z-index:100;flex-direction:column;width:220px;height:100vh;transition:width .2s;display:flex;position:fixed;top:0;left:0;overflow:hidden}.sidebar.sidebar-collapsed{width:56px}.app-content{flex:1;min-width:0;margin-left:220px;transition:margin-left .2s}.app-content.sidebar-collapsed{margin-left:56px}.sidebar-header{border-bottom:1px solid var(--border);flex-shrink:0;justify-content:space-between;align-items:center;min-height:60px;padding:1.1rem 1rem;display:flex}.sidebar-logo{color:var(--primary);letter-spacing:-.025em;white-space:nowrap;font-size:1.15rem;font-weight:800;overflow:hidden}.sidebar-logo span{color:var(--accent)}.sidebar-toggle{border:1px solid var(--border);cursor:pointer;color:var(--text-muted);background:0 0;border-radius:6px;flex-shrink:0;padding:.3rem .5rem;font-size:.9rem;line-height:1}.sidebar-toggle:hover{background:var(--bg);color:var(--primary)}.sidebar-nav{flex:1;padding:.75rem 0;overflow-y:auto}.sidebar-nav-btn{cursor:pointer;width:100%;color:var(--text-muted);text-align:left;white-space:nowrap;background:0 0;border:none;border-radius:0;align-items:center;gap:.75rem;padding:.65rem 1rem;font-size:.875rem;font-weight:500;transition:background .15s,color .15s;display:flex}.sidebar-nav-btn:hover{background:var(--bg);color:var(--primary)}.sidebar-nav-btn.active{color:var(--accent);background:#eff6ff;font-weight:600}.sidebar-nav-btn i{text-align:center;flex-shrink:0;width:16px;font-size:.9rem}.sidebar-nav-label{white-space:nowrap;overflow:hidden}.sidebar-divider{background:var(--border);height:1px;margin:.5rem 0}.sidebar-footer{border-top:1px solid var(--border);flex-shrink:0;padding:.75rem 0}.sidebar-version{color:var(--text-muted);white-space:nowrap;padding:.4rem 1rem;font-size:.7rem;overflow:hidden}.sidebar-overlay{z-index:99;background:#00000059;display:none;position:fixed;inset:0}.mobile-topbar{background:var(--white);border-bottom:1px solid var(--border);z-index:98;justify-content:space-between;align-items:center;height:52px;padding:0 1rem;display:none;position:fixed;top:0;left:0;right:0}.mobile-logo{color:var(--primary);letter-spacing:-.025em;font-size:1.1rem;font-weight:800}.mobile-logo span{color:var(--accent)}.hamburger{border:1px solid var(--border);cursor:pointer;color:var(--primary);background:0 0;border-radius:6px;padding:.4rem .6rem;font-size:1rem;line-height:1}@media (width<=768px){.sidebar{width:220px;transition:left .25s;left:-220px}.sidebar.sidebar-collapsed{width:220px;left:-220px}.sidebar.mobile-open{left:0}.sidebar-overlay.visible{display:block}.mobile-topbar{display:flex}.sidebar-toggle{display:none}.app-content,.app-content.sidebar-collapsed{margin-left:0;padding-top:52px}}.logo{color:var(--primary);letter-spacing:-.025em;font-size:1.25rem;font-weight:800}.logo span{color:var(--accent)}.container{max-width:1400px;margin:2rem auto;padding:0 1.5rem}.search-container{margin-bottom:1.5rem;position:relative}.search-input{border:1px solid var(--border);border-radius:8px;width:100%;padding:.75rem 1rem;font-size:1rem;transition:all .2s}.search-input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #2563eb1a}.data-card{background:var(--white);border:1px solid var(--border);border-radius:12px;overflow:hidden;box-shadow:0 1px 3px #0000000d}.table-header{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;background:#f1f5f9;grid-template-columns:2fr 1fr 1.5fr auto;padding:1rem;font-size:.75rem;font-weight:600;display:grid}.customer-row{border-bottom:1px solid var(--border);cursor:pointer;grid-template-columns:2fr 1fr 1.5fr auto;align-items:center;padding:1.25rem 1rem;transition:background .2s;display:grid}.customer-row:hover{background:#f8fafc}@media (width<=640px){.table-header{display:none}.customer-row{grid-template-rows:auto auto;grid-template-columns:1fr auto;gap:.25rem .5rem;padding:1rem}.customer-row>div:first-child{grid-area:1/1}.customer-row>div:nth-child(4){grid-area:1/2;align-self:center}.customer-row>div:nth-child(2),.customer-row>div:nth-child(3){grid-area:2/1;align-items:center;gap:.5rem;display:inline-flex}.customer-row>div:nth-child(3){grid-row:3}}.customer-name{color:var(--primary);font-weight:600;display:block}.customer-code{color:var(--text-muted);font-size:.8rem}.badge{color:var(--accent);background:#eff6ff;border-radius:6px;padding:.25rem .6rem;font-size:.75rem;font-weight:600}.invoice-item{background:var(--white);border:1px solid var(--border);border-radius:8px;margin-bottom:.75rem;padding:1rem;transition:all .2s}.invoice-item.selected{border-color:var(--accent);background:#eff6ff}.invoice-header{cursor:pointer;align-items:center;gap:1rem;display:flex}.invoice-details{border-top:1px solid var(--border);margin-top:1rem;padding-top:1rem}.amount-input-group{align-items:center;gap:.5rem;margin-top:.75rem;display:flex}.amount-input{border:1px solid var(--border);border-radius:6px;flex:1;padding:.5rem;font-size:.9rem;font-weight:600}.amount-input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px #2563eb1a}.amount-input.error{border-color:#ef4444}.quick-amount-btn{border:1px solid var(--border);cursor:pointer;background:#fff;border-radius:4px;padding:.4rem .8rem;font-size:.75rem;transition:all .2s}.quick-amount-btn:hover{background:var(--bg);border-color:var(--accent)}.partial-badge{color:#92400e;background:#fef3c7;border-radius:4px;padding:.25rem .5rem;font-size:.7rem;font-weight:600}.btn{cursor:pointer;border:1px solid #0000;border-radius:6px;padding:.6rem 1.2rem;font-size:.9rem;font-weight:600;transition:all .2s}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:#1d4ed8}.btn-secondary{color:#fff;background:#64748b}.btn-outline{border-color:var(--border);color:var(--text-main);background:#fff}.btn-outline:hover{background:var(--bg)}.action-panel{background:var(--primary);color:#fff;z-index:1000;white-space:nowrap;border-radius:12px;align-items:center;gap:2rem;padding:1rem 1.5rem;display:flex;position:fixed;bottom:2rem;left:50%;transform:translate(-50%);box-shadow:0 20px 25px -5px #0003}@media (width<=640px){.action-panel{white-space:normal;flex-wrap:wrap;justify-content:space-between;gap:1rem;width:auto;bottom:1rem;left:1rem;right:1rem;transform:none}}.success-box{text-align:center;border:1px solid var(--border);background:#fff;border-radius:12px;padding:3rem}.payment-link-box{word-break:break-all;border:1px dashed var(--accent);background:#f1f5f9;border-radius:6px;margin:1.5rem 0;padding:1rem;font-family:monospace}.loading-overlay{text-align:center;color:var(--accent);padding:5rem;font-weight:600}.error-text{color:#ef4444;margin-top:.25rem;font-size:.75rem}.info-box{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;margin-bottom:1.5rem;padding:1rem;font-size:.9rem}.table-container{border-radius:12px;overflow-x:auto}.table{border-collapse:collapse;width:100%;font-size:.9rem}.table thead{z-index:10;background:#f1f5f9;position:sticky;top:0}.table thead th{text-align:left;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;border-bottom:2px solid var(--border);padding:1rem;font-size:.75rem;font-weight:600}.table tbody tr{border-bottom:1px solid var(--border);transition:background-color .2s}.table tbody tr:hover{background-color:#f8fafc}.table tbody tr:nth-child(2n){background-color:#f9fafb}.table tbody tr:nth-child(2n):hover{background-color:#f1f5f9}.table tbody td{vertical-align:middle;padding:1rem}.table tbody td:first-child{color:var(--primary);font-weight:600}@media (width<=768px){.table-container{border-radius:8px}.table{font-size:.8rem}.table thead th,.table tbody td{padding:.75rem .5rem}.table thead th{font-size:.7rem}.table .hide-mobile{display:none}.btn{padding:.4rem .8rem;font-size:.75rem}}.table .btn-group{flex-wrap:wrap;gap:.5rem;display:flex}@media (width<=480px){.table .btn-group{flex-direction:column}.table .btn-group .btn{width:100%;font-size:.7rem}}
