:root{--primary: #8B4513;--primary-dk: #6b3410;--accent: #FFD700;--bg: #FFF8F0;--white: #FFFFFF;--text: #2C1810;--text-light: #7A6055;--border: #E8D5C4;--success: #4CAF50;--error: #F44336;--radius: 12px;--shadow: 0 2px 12px rgba(0,0,0,.08)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text);min-height:100vh}#root{min-height:100vh;display:flex;flex-direction:column}.screen-login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(135deg,var(--primary) 0%,#c86428 100%)}.login-card{background:var(--white);border-radius:20px;padding:36px 32px;width:100%;max-width:400px;box-shadow:0 8px 32px #0003}.brand{text-align:center;margin-bottom:28px}.brand-icon{font-size:48px;display:block}.brand h1{font-size:22px;color:var(--primary);margin-top:8px}.brand p{color:var(--text-light);font-size:14px;margin-top:4px}.login-hint{text-align:center;font-size:12px;color:var(--text-light);margin-top:16px}.link-btn{background:none;border:none;color:var(--text-light);font-size:13px;cursor:pointer;text-decoration:underline}.link-btn:hover{color:var(--primary)}.screen-dashboard{display:flex;flex-direction:column;min-height:100vh}.topbar{background:var(--primary);color:var(--white);padding:14px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 8px #00000026}.topbar-brand{display:flex;align-items:center;gap:10px;font-size:17px;font-weight:700}.topbar-right{display:flex;align-items:center;gap:12px}.cashier-name{font-size:14px;opacity:.9}.nav-menu{background:var(--white);border-bottom:2px solid var(--border);display:flex;padding:0 16px}.nav-item{display:flex;align-items:center;gap:8px;padding:14px 20px;background:none;border:none;border-bottom:3px solid transparent;font-size:14px;font-weight:600;color:var(--text-light);cursor:pointer;transition:all .2s;margin-bottom:-2px}.nav-item:hover{color:var(--primary)}.nav-item.active{color:var(--primary);border-bottom-color:var(--primary)}.nav-icon{font-size:18px}.main{flex:1;padding:24px;width:100%}.view-sales{max-width:560px;margin:0 auto}.tabs{display:flex;background:var(--border);border-radius:var(--radius);padding:4px;margin-bottom:20px}.tab{flex:1;background:none;border:none;padding:10px;border-radius:9px;font-size:14px;font-weight:600;color:var(--text-light);cursor:pointer;transition:all .2s}.tab.active{background:var(--white);color:var(--primary);box-shadow:var(--shadow)}#qr-reader{border-radius:var(--radius);overflow:hidden;margin-bottom:12px}#qr-reader video{border-radius:var(--radius)}.search-row{display:flex;gap:10px;margin-bottom:12px}.search-row input{flex:1}.result-list{list-style:none;display:flex;flex-direction:column;gap:8px}.result-item{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:border-color .2s,box-shadow .2s}.result-item:hover{border-color:var(--primary);box-shadow:var(--shadow)}.result-item-name{font-weight:600;color:var(--text);font-size:15px}.result-item-sub{font-size:12px;color:var(--text-light);margin-top:2px}.result-item-pts{font-size:13px;font-weight:700;color:var(--primary);white-space:nowrap}.customer-card{background:var(--white);border-radius:var(--radius);padding:20px;display:flex;align-items:center;gap:16px;box-shadow:var(--shadow);margin-bottom:24px;border-left:4px solid var(--primary)}.customer-avatar{width:52px;height:52px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:var(--primary);flex-shrink:0}.customer-info{flex:1}.customer-name-text{font-weight:700;font-size:16px;color:var(--text)}.customer-email-text{font-size:12px;color:var(--text-light);margin-top:2px}.customer-phone-text{font-size:12px;color:var(--text-light)}.customer-points{text-align:right;flex-shrink:0}.points-value{font-size:26px;font-weight:800;color:var(--primary);display:block}.points-label{font-size:11px;color:var(--text-light)}.purchase-form{background:var(--white);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}.purchase-form h3{font-size:16px;color:var(--primary);margin-bottom:16px}.success-card{background:var(--white);border-radius:20px;padding:36px 28px;text-align:center;box-shadow:var(--shadow);margin-top:20px}.success-icon{font-size:56px;margin-bottom:16px}.success-card h2{font-size:24px;color:var(--primary);margin-bottom:8px}.success-card>p{color:var(--text-light);margin-bottom:24px}.success-stats{display:flex;background:var(--bg);border-radius:var(--radius);overflow:hidden;margin-bottom:28px;border:1px solid var(--border)}.success-stat{flex:1;padding:16px 8px;border-right:1px solid var(--border)}.success-stat:last-child{border-right:none}.success-stat.accent{background:var(--primary)}.success-stat.accent .success-stat-value{color:var(--accent)}.success-stat.accent .success-stat-label{color:#fffc}.success-stat-value{display:block;font-size:20px;font-weight:800;color:var(--primary)}.success-stat-label{font-size:11px;color:var(--text-light);margin-top:4px;display:block}.field{margin-bottom:16px}.field label{display:block;font-size:13px;font-weight:600;color:var(--text-light);margin-bottom:6px}input[type=text],input[type=email],input[type=password],input[type=number]{width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:9px;font-size:15px;color:var(--text);background:var(--bg);transition:border-color .2s;outline:none}input:focus{border-color:var(--primary);background:var(--white)}.fields-row{display:flex;gap:12px}.field-half{flex:1}.required{color:var(--error)}.select-input{width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:9px;font-size:15px;color:var(--text);background:var(--bg);outline:none;cursor:pointer}.select-input:focus{border-color:var(--primary);background:var(--white)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:12px 20px;border-radius:9px;font-size:15px;font-weight:600;cursor:pointer;border:none;transition:all .2s}.btn-primary{background:var(--primary);color:var(--white)}.btn-primary:hover{background:var(--primary-dk)}.btn-primary:disabled{opacity:.6;cursor:not-allowed}.btn-outline{background:transparent;color:var(--primary);border:2px solid var(--primary)}.btn-outline:hover{background:var(--primary);color:var(--white)}.btn-ghost{background:transparent;color:var(--text-light);border:1.5px solid var(--border)}.btn-ghost:hover{border-color:var(--primary);color:var(--primary)}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-full{width:100%}.btn-sm{padding:8px 14px;font-size:13px}.history-loading{display:flex;align-items:center;gap:10px;color:var(--text-light);padding:24px 0}.spinner{width:18px;height:18px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--primary);animation:spin .7s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.history-summary{display:flex;background:var(--bg);border-radius:var(--radius);border:1px solid var(--border);overflow:hidden;margin-bottom:16px}.hsumm-stat{flex:1;padding:14px 8px;text-align:center;border-right:1px solid var(--border)}.hsumm-stat:last-child{border-right:none}.hsumm-stat.accent{background:var(--primary)}.hsumm-stat.accent .hsumm-value{color:var(--accent)}.hsumm-stat.accent .hsumm-label{color:#fffc}.hsumm-value{display:block;font-size:18px;font-weight:800;color:var(--primary)}.hsumm-label{font-size:11px;color:var(--text-light);margin-top:3px;display:block}.table-wrap{overflow-x:auto;border-radius:var(--radius);border:1px solid var(--border)}.history-table{width:100%;border-collapse:collapse;font-size:13px}.history-table th{background:var(--primary);color:var(--white);padding:10px 12px;text-align:left;font-size:12px;font-weight:600;white-space:nowrap}.history-table td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:middle}.history-table tr:last-child td{border-bottom:none}.history-table tr:nth-child(2n) td{background:var(--bg)}.history-table tr:hover td{background:#fdefd8}.invoice-tag{background:#fdefd8;color:var(--primary);border:1px solid var(--border);border-radius:5px;padding:2px 7px;font-size:12px;font-weight:600;white-space:nowrap}.no-data{color:var(--text-light)}.amount-pos{color:var(--text);font-weight:600}.amount-neg{color:var(--error);font-weight:600}.pts-pos{color:var(--success);font-weight:700}.pts-neg{color:var(--error);font-weight:700}.cust-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:10px;overflow:hidden;transition:box-shadow .2s,border-color .2s}.cust-card:hover{box-shadow:var(--shadow);border-color:var(--primary)}.cust-row{display:flex;align-items:center;gap:12px;padding:14px 14px 10px}.cust-avatar{width:44px;height:44px;border-radius:50%;flex-shrink:0;background:var(--accent);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;color:var(--primary)}.cust-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.cust-name-row{display:flex;align-items:center;gap:6px}.cust-name{font-weight:700;font-size:14px;color:var(--text)}.rank-badge{font-size:13px}.cust-sub{font-size:12px;color:var(--text-light);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cust-meta{font-size:11px;color:var(--text-light);display:block}.cust-pts-col{text-align:right;flex-shrink:0}.cust-pts{display:block;font-size:22px;font-weight:800;color:var(--primary);line-height:1}.cust-pts-label{display:block;font-size:11px;color:var(--text-light)}.cust-discount{display:block;font-size:11px;color:var(--success);font-weight:600;margin-top:3px}.cust-actions{display:flex;gap:8px;padding:0 14px 12px}.cust-actions .btn{flex:1}.cdet-header{display:flex;align-items:center;gap:14px;background:var(--white);border-radius:var(--radius);padding:16px;margin-bottom:16px;border:1px solid var(--border);box-shadow:var(--shadow)}.cdet-avatar{width:52px;height:52px;border-radius:50%;flex-shrink:0;background:var(--accent);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;color:var(--primary)}.cdet-info{flex:1}.cdet-name{font-size:17px;font-weight:800;color:var(--text)}.cdet-sub{font-size:12px;color:var(--text-light);margin-top:2px}.cdet-summary{display:flex;margin-bottom:20px;border-radius:var(--radius);overflow:hidden;border:1px solid var(--border)}.cdet-stat{flex:1;padding:14px 8px;text-align:center;border-right:1px solid var(--border);background:var(--white)}.cdet-stat:last-child{border-right:none}.cdet-stat.green{background:#f0faf0}.cdet-stat.red{background:#fff5f5}.cdet-stat.primary{background:var(--primary)}.cdet-stat.primary .cdet-stat-value{color:var(--accent)}.cdet-stat.primary .cdet-stat-label{color:#fffc}.cdet-stat.green .cdet-stat-value{color:var(--success)}.cdet-stat.red .cdet-stat-value{color:var(--error)}.cdet-stat-value{display:block;font-size:18px;font-weight:800;color:var(--primary)}.cdet-stat-label{font-size:11px;color:var(--text-light);margin-top:3px;display:block}.cdet-section-title{font-size:14px;font-weight:700;color:var(--primary);margin:20px 0 10px;border-left:4px solid var(--primary);padding-left:10px}.admin-tabs{display:flex;gap:4px;background:var(--border);border-radius:var(--radius);padding:4px;margin-bottom:20px;width:-moz-fit-content;width:fit-content}.admin-tab{padding:9px 20px;border:none;border-radius:9px;font-size:14px;font-weight:600;color:var(--text-light);cursor:pointer;background:none;transition:all .2s}.admin-tab.active{background:var(--white);color:var(--primary);box-shadow:var(--shadow)}.admin-view-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap;gap:10px}.admin-view-header h3{font-size:16px;color:var(--text);font-weight:700}.actions-cell{white-space:nowrap}.actions-cell .btn{margin-right:6px}.role-badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600}.role-admin{background:#fff3e0;color:#e65100}.role-cashier{background:#e8f5e9;color:#2e7d32}.status-badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600}.status-badge.active{background:#e8f5e9;color:#2e7d32}.status-badge.inactive{background:#fde8e8;color:var(--error)}.modal-overlay{display:none;position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:1000;align-items:center;justify-content:center;padding:20px}.modal-overlay.active{display:flex}.modal-dialog{background:var(--white);border-radius:16px;width:100%;max-width:440px;box-shadow:0 12px 40px #00000040;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border)}.modal-header h3{font-size:16px;color:var(--text);font-weight:700}.modal-close{background:none;border:none;font-size:18px;color:var(--text-light);cursor:pointer;line-height:1;padding:4px}.modal-close:hover{color:var(--text)}.modal-body{padding:20px}.modal-footer{padding:16px 20px;border-top:1px solid var(--border);display:flex;gap:10px;justify-content:flex-end}.pagination{display:flex;align-items:center;justify-content:space-between;padding:16px 0;gap:12px}.pag-info{font-size:13px;color:var(--text-light);text-align:center;flex:1}.step-title{font-size:20px;font-weight:700;color:var(--primary);margin-bottom:20px}.back-btn{margin-bottom:16px}.view-header{margin-bottom:20px}.hint{font-size:13px;color:var(--text-light);margin-bottom:14px}.error-msg{color:var(--error);font-size:13px;margin-bottom:12px;background:#fde8e8;padding:10px 14px;border-radius:8px}.success-msg{color:#2e7d32;font-size:13px;margin-bottom:12px;background:#e8f5e9;padding:10px 14px;border-radius:8px}.subtabs{margin-top:4px}.settings-card{background:var(--white);border-radius:12px;padding:20px;border:1px solid var(--border)}.settings-section-title{font-size:15px;font-weight:700;color:var(--primary);margin-bottom:16px}.toggle-label{display:flex;align-items:center;gap:0;cursor:pointer;position:relative}.toggle-label input[type=checkbox]{display:none}.toggle-switch{width:44px;height:24px;background:var(--border);border-radius:12px;transition:background .2s;position:relative;flex-shrink:0}.toggle-switch:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;background:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 1px 3px #0003}.toggle-label input:checked+.toggle-switch{background:var(--success, #4CAF50)}.toggle-label input:checked+.toggle-switch:after{transform:translate(20px)}.badge-pending{display:inline-block;background:#e65100;color:#fff;font-size:12px;font-weight:700;border-radius:12px;padding:2px 10px;margin-left:10px;vertical-align:middle}
