body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}:root{--primary: #8e1f5c;--accent: #ff8a00;--bg: #f3f3f4;--card: #ffffff;--border: #e8e0e6;--text: #1a1a1a;--muted: #777777;--header-h: 56px;--footer-h: 92px}*,*:before,*:after{box-sizing:border-box}html,body,#root{height:100%;margin:0;padding:0}body{font-family:Inter,Arial,sans-serif;background:var(--bg);font-size:14px;color:var(--text);-webkit-font-smoothing:antialiased}.page{height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.page main{flex:1 1 auto;overflow:hidden;display:flex;flex-direction:column}.app-header{height:var(--header-h);min-height:var(--header-h);background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 14px;flex-shrink:0}.header-left,.header-right{width:36px;display:flex;align-items:center;justify-content:center}.header-left button,.header-right button{background:none;border:none;color:#fff;font-size:16px;cursor:pointer;padding:6px;border-radius:8px;line-height:1}.header-title{flex:1;text-align:center;font-weight:700;font-size:15px;color:#fff}.footer-nav{height:var(--footer-h);min-height:var(--footer-h);background:var(--primary);border-radius:14px 14px 0 0;display:flex;align-items:center;justify-content:space-around;flex-shrink:0}.nav-item{display:flex;flex-direction:column;align-items:center;gap:4px;color:#ffffffeb;font-size:10px;font-weight:500}.nav-item img{width:22px;height:22px;filter:brightness(0) invert(1)}.powered-text{text-align:center;font-size:9px;color:var(--muted);background:var(--primary);padding:4px 0 6px;flex-shrink:0}.powered-text{color:#ffffffb3}.powered-text--light{color:#ffffffd9;background:transparent;font-size:9px;padding:8px 0 6px;flex-shrink:0}.scroll-area{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 12px;scrollbar-width:none;gap:14px}.scroll-area::-webkit-scrollbar{display:none}.home-card{background:var(--card);border-radius:18px;padding:28px 20px;display:flex;flex-direction:column;gap:12px}.home-scroll-area{display:flex;flex-direction:column;justify-content:center;align-items:center}.home-scroll-area .salesrep-dropdown,.home-scroll-area .home-card{width:100%}.logo-area{text-align:center;padding:32px 12px 0;flex-shrink:0}.logo-area img{width:150px;height:auto}.salesrep-dropdown{margin:0 2px;position:relative}.rep-trigger{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--border);font-size:13px;font-family:inherit;color:var(--muted);background:var(--card);cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left}.rep-trigger:focus,.rep-trigger[aria-expanded=true]{outline:none;border-color:var(--primary)}.rep-trigger:disabled{cursor:not-allowed;opacity:.7}.rep-listbox{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px #0000001f;list-style:none;margin:0;padding:6px;z-index:50;max-height:200px;overflow-y:auto}.rep-option{padding:10px 12px;font-size:13px;color:var(--text);border-radius:8px;cursor:pointer}.rep-option:hover{background:var(--bg)}.rep-option--placeholder{color:var(--muted)}.rep-option--selected{background:#8e1f5c14;color:var(--primary);font-weight:600}.create-invoice-block{align-items:center;text-align:center;gap:6px}.create-invoice-block img{width:64px;height:64px;margin-bottom:4px}.create-invoice-block h3{font-size:17px;font-weight:800;color:var(--text);margin:0}.create-invoice-block p{font-size:12px;color:var(--muted);text-align:center;margin:0;line-height:1.5;max-width:240px}.create-invoice-block button{background:var(--primary);color:#fff;border:none;padding:14px 0;border-radius:12px;font-weight:700;font-size:14px;cursor:pointer;width:100%;margin-top:8px}.create-invoice-block button:disabled{background:var(--primary);opacity:.45;cursor:not-allowed}.create-invoice-page main{overflow:hidden;display:flex;flex-direction:column}.create-invoice{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 12px;scrollbar-width:none}.create-invoice::-webkit-scrollbar{display:none}.invoice-card{background:var(--card);border-radius:16px;padding:16px;flex-shrink:0}.invoice-card--items{display:flex;flex-direction:column;flex:1;min-height:0}.invoice-card--summary{display:flex;flex-direction:column}.customer-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.customer-row .label{font-weight:700;font-size:13px;color:var(--text)}.rep-badge{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:5px 10px;font-size:12px;color:var(--primary);font-weight:600}.form-row{margin-bottom:12px}.form-row input{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--border);font-size:13px;color:var(--text);background:#fafafa;outline:none}.form-row input:focus{border-color:var(--primary)}.error{color:#e03c3c;font-size:11px;margin-top:4px}.items{display:flex;flex-direction:column;flex:1;min-height:0}.items-label{font-weight:700;font-size:13px;color:var(--text);margin-bottom:8px}.table-head{display:grid;grid-template-columns:2fr 1fr 1.1fr 32px;gap:6px;background:var(--primary);color:#fff;padding:9px 10px;border-radius:8px;font-size:12px;font-weight:600;flex-shrink:0}.table-head div{text-align:center}.table-head>div:nth-child(3){grid-column:3 / span 2}.items-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.items-scroll::-webkit-scrollbar{display:none}.item-row{display:grid;grid-template-columns:2fr 1fr 1.1fr 32px;gap:6px;margin-top:6px;align-items:center}.item-row .field-col{display:flex;flex-direction:column}.item-row .field-col input.input-error{border-color:#e03c3c;box-shadow:0 0 0 4px #e03c3c0f}.toast-root{position:fixed;top:24px;left:0;right:0;z-index:9999;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;pointer-events:none}.toast-root .toast{pointer-events:auto;background:#000000d9;color:#fff;padding:10px 14px;border-radius:8px;font-size:13px;box-shadow:0 6px 18px #0000001f;max-width:calc(100% - 40px)}.item-row input{padding:7px 6px;border-radius:8px;border:1px solid var(--border);font-size:12px;color:var(--text);background:var(--card);width:100%;outline:none}.item-row input:focus{border-color:var(--primary)}.item-row input[type=number]{text-align:center}.remove-btn{background:none;border:none;cursor:pointer;color:#ccc;font-size:15px;display:flex;align-items:center;justify-content:center;padding:4px;border-radius:6px}.remove-btn:hover{color:#e03c3c}.add-item{margin-top:10px;padding:10px;border-radius:10px;border:2px solid var(--primary);background:transparent;color:var(--primary);width:100%;font-weight:700;font-size:13px;cursor:pointer;flex-shrink:0}.add-item:hover{background:#8e1f5c0a}.summary{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.summary>div{display:flex;justify-content:space-between;font-size:13px;color:var(--text);padding:2px 0}.summary .total{font-size:15px;font-weight:700;color:var(--primary);padding-top:4px}.page-footer{background:var(--primary);border-radius:14px 14px 0 0;padding:12px 12px 0;flex-shrink:0}.actions{display:flex;gap:8px;margin-top:0;flex-shrink:0}.actions button{flex:1;padding:12px 6px;border-radius:12px;font-weight:700;font-size:13px;cursor:pointer;border:none}.btn-sales-order{background:transparent!important;border:2px solid #fff!important;color:#fff!important}.actions .wa{background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;gap:6px}.confirm-backdrop{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:2000}.confirm-dialog{background:var(--card);padding:20px;border-radius:14px;width:290px;box-shadow:0 8px 32px #0000002e}.confirm-dialog h4{font-size:15px;font-weight:700;margin:0 0 8px;color:var(--text)}.confirm-dialog p{font-size:13px;color:var(--muted);margin:0 0 16px;line-height:1.5}.confirm-dialog .dialog-actions{display:flex;gap:10px;justify-content:stretch}.confirm-dialog .dialog-actions button{flex:1;padding:11px 16px;border-radius:10px;font-size:13px;font-weight:700;cursor:pointer;border:1px solid transparent}.confirm-dialog .btn-cancel{background:var(--bg);color:var(--text);border-color:var(--border)}.confirm-dialog .btn-confirm{background:var(--primary);color:#fff}.invoice-preview .scroll-area{padding:14px 12px}.invoice-container{background:var(--card);padding:18px 16px;border-radius:16px}.invoice-top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;gap:8px}.invoice-logo-mark{width:56px;height:auto}.invoice-datetime{text-align:right;font-size:11px;color:var(--text);line-height:1.6}.invoice-meta{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px;gap:8px}.invoice-meta .bill-side{flex:1}.invoice-meta .bill-label{font-size:12px;font-weight:700;color:var(--text)}.invoice-meta .bill-name{font-size:12px;color:var(--primary);font-weight:600;margin-top:3px}.invoice-meta .rep-side{display:flex;flex-direction:column;align-items:flex-end;gap:5px}.invoice-meta .rep-pill{background:var(--primary);color:#fff;padding:5px 11px;border-radius:10px;font-size:11px;font-weight:700;white-space:nowrap}.items-table{width:100%;border-collapse:collapse;margin-top:4px;table-layout:fixed}.items-table col.col-model{width:40%}.items-table col.col-qty,.items-table col.col-price,.items-table col.col-total{width:20%}.items-table thead tr{background:var(--primary);color:#fff}.items-table thead th{padding:8px;font-size:11px;font-weight:600;text-align:left}.items-table thead th:nth-child(2){text-align:center}.items-table thead th:nth-child(3),.items-table thead th:nth-child(4){text-align:right}.items-table thead th:first-child{border-radius:6px 0 0 6px}.items-table thead th:last-child{border-radius:0 6px 6px 0}.items-table tbody td{padding:8px;border-bottom:1px solid #f2f2f2;font-size:12px;color:var(--text)}.items-table tbody td:nth-child(2){text-align:center}.items-table tbody td:nth-child(3),.items-table tbody td:nth-child(4){text-align:right}.invoice-total{display:grid;grid-template-columns:40% 20% 20% 20%;align-items:center;padding:10px 8px;margin-top:4px;background:var(--bg);border-radius:8px}.invoice-total .total-label{font-size:13px;font-weight:700;color:var(--text)}.invoice-total .total-qty{font-size:13px;font-weight:600;color:var(--text);text-align:center}.invoice-total .total-value{font-size:14px;font-weight:800;color:var(--primary);text-align:right;grid-column:3 / span 2}.payment-status-bar{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding:12px 14px;border-radius:10px;font-size:13px;font-weight:700;color:#fff}.payment-status-bar--paid{background:var(--accent)}.payment-status-bar--pending{background:var(--muted)}.preview-actions{display:flex;gap:8px;margin-top:12px}.preview-actions button{flex:1;padding:12px;border-radius:12px;font-weight:700;font-size:13px;cursor:pointer;background:var(--primary);color:#fff;border:none}.toast-root{position:fixed;left:16px;bottom:88px;display:flex;flex-direction:column;gap:8px;z-index:3000}.toast{background:#000000d1;color:#fff;padding:9px 14px;border-radius:8px;font-size:13px}@media(min-width:600px){.page{max-width:420px;margin:0 auto}}.login-page{background:var(--bg)}.login-main{flex:1;display:flex;flex-direction:column;overflow:hidden}.login-content{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 20px 12px;overflow-y:auto;scrollbar-width:none}.login-content::-webkit-scrollbar{display:none}.login-logo-area{margin-bottom:6px}.login-logo{width:140px;height:auto}.login-icon-area{margin-bottom:8px}.login-icon{width:70px;height:70px;object-fit:contain}.login-title{font-size:20px;font-weight:800;color:var(--text);margin:0 0 4px;text-align:center}.login-subtitle{font-size:12px;color:var(--muted);text-align:center;margin:0 0 20px;line-height:1.5;max-width:240px}.login-form{width:100%;display:flex;flex-direction:column;gap:12px}.login-input-group{position:relative;display:flex;align-items:center;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:0 14px}.login-input-group:focus-within{border-color:var(--primary)}.login-input-icon{color:var(--muted);display:flex;align-items:center;flex-shrink:0;margin-right:10px}.login-input-group input{flex:1;border:none;background:transparent;padding:13px 0;font-size:13px;color:var(--text);outline:none;font-family:inherit}.login-input-group input::placeholder{color:var(--muted)}.login-error{color:#e03c3c;font-size:12px;text-align:center}.login-btn{background:var(--primary);color:#fff;border:none;padding:15px;border-radius:12px;font-weight:700;font-size:15px;cursor:pointer;width:100%;margin-top:4px;font-family:inherit}.login-btn:active{opacity:.88}.history-page{background:var(--bg)}.history-header{background:var(--primary);padding:16px 16px 0;flex-shrink:0}.history-welcome{color:#fff;font-size:17px;font-weight:700;text-align:center;margin:0 0 14px}.history-stats{display:flex;gap:10px;padding-bottom:16px}.stat-block{flex:1;padding:10px 14px;border-radius:12px;background:#fff;color:var(--text)}.stat-block--accent{background:#6b1544;color:#fff}.stat-label{font-size:11px;margin-bottom:4px;font-weight:500}.stat-block .stat-label{color:var(--muted)}.stat-block--accent .stat-label{color:#ffffffd9}.stat-value{font-size:22px;font-weight:800}.stat-block .stat-value{color:var(--primary)}.stat-block--accent .stat-value{color:#fff}.history-list-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.history-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 12px 80px;scrollbar-width:none;display:flex;flex-direction:column;gap:10px}.history-scroll::-webkit-scrollbar{display:none}.history-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;color:var(--muted);font-size:14px;line-height:1.7}.history-card{background:var(--card);border-radius:14px;padding-top:14px;border:1px solid var(--border)}.history-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.history-inv-num{font-size:13px;font-weight:700;color:var(--primary)}.badge{font-size:12px;font-weight:600;padding:3px 10px;border-radius:5px;color:#fff;text-transform:uppercase;letter-spacing:.4px}.badge--paid{background:#27ae60}.badge--pending{background:var(--muted)}.badge--deposit{background:var(--accent)}.history-customer{font-size:12px;color:var(--muted);margin-bottom:4px}.history-amount{font-size:15px;font-weight:700;color:var(--primary);margin-bottom:10px}.history-actions{display:flex;gap:6px;border-top:1px solid var(--border);padding-top:7px;padding-bottom:7px;border-radius:0 0 14px 14px;background:var(--primary)}.h-action-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;padding:7px 4px;font-size:14px;font-weight:600;color:#fff;background:transparent;border:none;border-radius:8px;cursor:pointer;font-family:inherit}.history-footer{position:absolute;bottom:0;left:0;right:0;height:68px;background:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}.fab-btn{width:52px;height:52px;border-radius:50%;background:var(--primary);color:var(--primary);border:none;font-size:28px;font-weight:300;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #0000002e}.fab-btn:active{transform:scale(.94)}.history-page{position:relative}.actions--three{display:flex;gap:6px}.actions--three button{flex:1;padding:11px 4px;border-radius:12px;font-weight:700;font-size:12px;cursor:pointer;border:none;font-family:inherit}.btn-preview{background:transparent!important;border:2px solid #fff!important;color:#fff!important}.btn-save{background:transparent!important;border:1px solid #fff!important;color:#fff!important}.btn-save:disabled{opacity:.55;cursor:not-allowed}.deposit-total-row{display:flex;align-items:flex-end;gap:12px}.deposit-col{flex:1;display:flex;flex-direction:column;gap:4px}.deposit-label{font-size:11px;font-weight:600;color:var(--muted)}.deposit-input{width:100%;padding:9px 10px;border-radius:10px;border:1px solid var(--border);font-size:13px;color:var(--text);background:#fafafa;outline:none;font-family:inherit}.deposit-input:focus{border-color:var(--primary)}.total-col{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.total-label-sm{font-size:11px;color:var(--muted);font-weight:600}.total-value-sm{font-size:15px;font-weight:800;color:var(--primary)}.payment-check-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text);cursor:pointer;font-weight:600}.payment-check-row input[type=checkbox]{width:16px;height:16px;accent-color:var(--primary);cursor:pointer}.invoice-party-section{margin-top:20px;margin-bottom:16px}.invoice-party-headings{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.party-heading{font-size:16px;font-weight:700;color:var(--text);letter-spacing:.4px}.party-heading--right{text-align:right}.invoice-party-pills{display:flex;justify-content:space-between;align-items:center;gap:12px}.bill-pill{display:inline-flex;align-items:center;justify-content:center;min-width:108px;height:28px;padding:0 14px;border-radius:9px;background:var(--primary);color:#fff;font-size:12px;font-weight:700;line-height:1;white-space:nowrap}.payment-bar{display:flex;justify-content:space-between;align-items:center;margin-top:8px;padding:11px 14px;border-radius:10px;font-size:12px;font-weight:700;color:#fff}.payment-bar--paid,.payment-bar--deposit{background:var(--accent)}.payment-bar--pending{background:var(--muted)}.payment-bar--pending-amount{background:#b0b0b0;color:#fff}.invoice-terms{margin-top:12px;padding-top:10px;border-top:1px solid #f0f0f0}.terms-title{font-size:11px;font-weight:700;color:var(--text);margin-bottom:6px}.terms-list{margin:0;padding-left:16px}.terms-list li{font-size:10px;color:var(--muted);line-height:1.5;margin-bottom:3px}.payment-status-bar{display:none}.w-100{width:100%}.my-20{margin-top:20px;margin-bottom:20px}.p-40-20{padding:20px}.plus-p-b{padding-bottom:50px}.padd-14{padding-left:14px;padding-right:14px}
