* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #F5F3EE; color: #1A1916; min-height: 100vh; }
.app { max-width: 430px; margin: 0 auto; background: #F5F3EE; min-height: 100vh; padding-bottom: 2rem; }
.header { background: #1A1916; border-bottom: 0.5px solid #333; padding: 14px 16px 10px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 50; }
.header h1 { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.header p { font-size: 11px; color: #9B9895; margin-top: 2px; }
.staff-badge { font-size: 11px; padding: 4px 10px; border-radius: 20px; cursor: pointer; font-weight: 600; border: 0.5px solid #444; }
.staff-on { background: #E1F5EE; color: #0F6E56; border-color: #5DCAA5; }
.staff-off { background: #2C2C2A; color: #9B9895; }
.tabs { display: flex; border-bottom: 0.5px solid #D6D3CA; background: #fff; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: sticky; top: 57px; z-index: 40; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1; min-width: 60px; padding: 10px 4px; font-size: 12px; text-align: center; color: #6B6966; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit; }
.tab.active { color: #1A1916; border-bottom: 2px solid #1D9E75; font-weight: 600; }
.tab.locked { opacity: 0.4; }
.section { display: none; padding: 16px; }
.section.active { display: block; }
.bsec { display: none; }
.bsec.active { display: block; }
.section-title { font-size: 11px; font-weight: 600; color: #6B6966; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.card { background: #fff; border: 0.5px solid #D6D3CA; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stat-card { background: #EDEAE3; border-radius: 10px; padding: 12px 14px; }
.stat-num { font-size: 20px; font-weight: 700; color: #1A1916; }
.stat-lbl { font-size: 11px; color: #6B6966; margin-bottom: 4px; }
.badge { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.badge-green { background: #E1F5EE; color: #0F6E56; }
.badge-amber { background: #FAEEDA; color: #854F0B; }
.badge-red { background: #FDEAEA; color: #A32D2D; }
.badge-gray { background: #EDEAE3; color: #6B6966; }
.badge-blue { background: #E8F0FE; color: #1A5CBA; }
.list-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 0.5px solid #E8E5DF; }
.list-item:last-child { border-bottom: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #1A1916; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.list-main { flex: 1; min-width: 0; }
.list-name { font-size: 14px; font-weight: 600; color: #1A1916; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-detail { font-size: 12px; color: #6B6966; margin-top: 1px; }
.load-note { font-size: 12px; color: #6B6966; margin-top: 5px; background: #F5F3EE; border-radius: 4px; padding: 4px 8px; font-style: italic; }
.form-group { margin-bottom: 13px; }
.form-label { font-size: 13px; color: #6B6966; margin-bottom: 5px; display: block; }
input, select, textarea { width: 100%; padding: 9px 12px; font-size: 14px; border: 0.5px solid #C8C5BC; border-radius: 8px; background: #fff; color: #1A1916; font-family: inherit; outline: none; transition: border-color 0.15s; }
input:focus, select:focus, textarea:focus { border-color: #1D9E75; }
textarea { resize: vertical; min-height: 68px; line-height: 1.5; }
.btn { width: 100%; padding: 12px; font-size: 14px; font-weight: 600; border-radius: 10px; border: 0.5px solid transparent; background: #1D9E75; color: #fff; cursor: pointer; margin-top: 4px; font-family: inherit; transition: opacity 0.15s; }
.btn:active { opacity: 0.8; }
.btn-outline { background: transparent; color: #1A1916; border-color: #C8C5BC; }
.btn-sm { padding: 6px 12px; font-size: 12px; width: auto; margin-top: 0; }
.trailer-card { background: #F5F3EE; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.trailer-info { flex: 1; }
.trailer-name { font-size: 13px; font-weight: 600; color: #1A1916; }
.trailer-dim { font-size: 12px; color: #6B6966; }
.acct-card { background: #fff; border: 0.5px solid #D6D3CA; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.acct-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.acct-name { font-size: 15px; font-weight: 600; color: #1A1916; }
.acct-num { font-size: 11px; color: #6B6966; margin-top: 2px; }
.acct-meta { font-size: 12px; color: #6B6966; margin-bottom: 10px; line-height: 1.7; }
.acct-financials { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.fin-cell { background: #F5F3EE; border-radius: 8px; padding: 8px 10px; text-align: center; }
.fin-val { font-size: 15px; font-weight: 600; color: #1A1916; }
.fin-lbl { font-size: 10px; color: #6B6966; margin-top: 2px; }
.ticket-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 0.5px solid #E8E5DF; }
.ticket-row:last-child { border-bottom: none; }
.ticket-num { font-size: 13px; font-weight: 600; color: #1A1916; }
.ticket-detail { font-size: 12px; color: #6B6966; margin-top: 2px; }
.invoice-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 0.5px solid #E8E5DF; }
.invoice-row:last-child { border-bottom: none; }
.inv-num { font-size: 13px; font-weight: 600; color: #1A1916; }
.inv-detail { font-size: 12px; color: #6B6966; margin-top: 2px; }
.aging-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 0.5px solid #E8E5DF; font-size: 13px; }
.aging-row:last-child { border-bottom: none; }
.aging-label { color: #6B6966; }
.aging-val { font-weight: 600; color: #1A1916; }
.aging-val.overdue { color: #E24B4A; }
.staff-note-card { background: #F5F3EE; border-left: 3px solid #1D9E75; border-radius: 0 10px 10px 0; padding: 10px 12px; margin-bottom: 8px; }
.staff-note-meta { font-size: 11px; color: #6B6966; margin-bottom: 4px; }
.staff-note-text { font-size: 13px; color: #1A1916; }
.divider { height: 0.5px; background: #E8E5DF; margin: 12px 0; }
.confirm-detail { background: #F5F3EE; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.confirm-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.confirm-row span:first-child { color: #6B6966; }
.confirm-row span:last-child { font-weight: 600; color: #1A1916; }
.scan-area { background: #000; border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 14px; }
.scan-area video { width: 100%; display: block; }
.scan-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.scan-box { width: 190px; height: 190px; border: 2px solid #1D9E75; border-radius: 10px; }
.sticker-preview { background: #fff; border: 1.5px solid #ccc; border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 12px; }
.sticker-company { font-size: 14px; font-weight: 700; color: #000; margin-bottom: 4px; }
.sticker-trailer { font-size: 12px; color: #333; margin-bottom: 8px; }
.sticker-dims { font-size: 11px; color: #555; margin-top: 4px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #085041; color: #9FE1CB; padding: 10px 20px; border-radius: 20px; font-size: 13px; opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 999; white-space: nowrap; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }
.empty-msg { text-align: center; padding: 20px; color: #6B6966; font-size: 14px; }
.pin-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.pin-box { background: #fff; border-radius: 16px; padding: 24px 20px; width: 290px; text-align: center; }
.pin-title { font-size: 17px; font-weight: 600; color: #1A1916; margin-bottom: 6px; }
.pin-sub { font-size: 13px; color: #6B6966; margin-bottom: 16px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; background: #EDEAE3; border: 0.5px solid #C8C5BC; transition: background 0.15s; }
.pin-dot.filled { background: #1A1916; border-color: #1A1916; }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pin-btn { padding: 15px; font-size: 20px; font-weight: 500; border: 0.5px solid #C8C5BC; border-radius: 10px; background: #F5F3EE; color: #1A1916; cursor: pointer; font-family: inherit; }
.pin-btn:active { background: #EDEAE3; }
.pin-error { color: #E24B4A; font-size: 13px; margin-top: 8px; min-height: 18px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 380px; max-height: 92vh; overflow-y: auto; }
.modal-title { font-size: 17px; font-weight: 700; color: #1A1916; margin-bottom: 14px; }

/* ===== PRICING ===== */
.pricing-block { background: #F5F3EE; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.pricing-summary { margin-top: 10px; }
.pricing-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; border-bottom: 0.5px solid #E8E5DF; }
.pricing-row:last-child { border-bottom: none; }
.pricing-row span:first-child { color: #6B6966; }
.pricing-row span:last-child { font-weight: 600; color: #1A1916; }
.pricing-row.highlight span:last-child { color: #1D9E75; font-size: 16px; }
.pricing-row.savings { background: #E1F5EE; border-radius: 6px; padding: 6px 8px; margin: 4px -4px; }
.pricing-row.savings span:first-child { color: #0F6E56; font-weight: 600; }
.pricing-row.savings span:last-child { color: #0F6E56; font-size: 16px; }

/* ===== CALC PREVIEW ===== */
.calc-preview { background: #E1F5EE; border-radius: 8px; padding: 10px 12px; }
.calc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.calc-row span:first-child { color: #6B6966; }
.calc-row span:last-child { font-weight: 600; color: #1A1916; }
.calc-row.highlight span:last-child { color: #0F6E56; font-size: 15px; }

/* ===== PAYMENT METHODS ===== */
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.pay-btn { padding: 10px 8px; font-size: 13px; font-weight: 500; border: 0.5px solid #C8C5BC; border-radius: 10px; background: #F5F3EE; color: #1A1916; cursor: pointer; font-family: inherit; text-align: center; transition: all 0.15s; }
.pay-btn:active { transform: scale(0.97); }
.pay-btn.selected { background: #1A1916; color: #fff; border-color: #1A1916; }

/* ===== PAYMENT STATUS ===== */
.status-btn { padding: 10px 4px; font-size: 12px; font-weight: 600; border: 1.5px solid #C8C5BC; border-radius: 10px; background: #F5F3EE; color: #6B6966; cursor: pointer; font-family: inherit; text-align: center; width: 100%; transition: all 0.15s; }
.status-btn.selected.status-paid { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.status-btn.selected.status-pending { background: #F59E0B; color: #fff; border-color: #F59E0B; }
.status-btn.selected.status-unpaid { background: #E24B4A; color: #fff; border-color: #E24B4A; }

/* ===== GATE BANNERS ===== */
.cleared-banner { background: #1D9E75; color: #fff; border-radius: 10px; padding: 14px; text-align: center; font-size: 15px; font-weight: 700; margin-top: 10px; letter-spacing: 0.3px; }
.hold-banner { background: #E24B4A; color: #fff; border-radius: 10px; padding: 14px; text-align: center; font-size: 15px; font-weight: 700; margin-top: 10px; letter-spacing: 0.3px; }
.alert-banner { background: #FAEEDA; border: 0.5px solid #F59E0B; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; color: #854F0B; font-weight: 500; }

/* ===== LOAD PAYMENT BADGE ===== */
.load-payment { font-size: 11px; margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
