body { font-family: 'Inter', sans-serif; color-scheme: light; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Form inputs used in dynamic modals */
.inp {
  width: 100%; padding: .5rem .75rem; background: #ffffff; border: 1px solid #cbd5e1;
  border-radius: .5rem; font-size: .75rem; color: #0f172a;
}
.inp:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.inp::placeholder { color: #94a3b8; }
select.inp option { background: #ffffff; color: #0f172a; }

/* Small action buttons */
.btn { padding: .375rem .75rem; border-radius: .5rem; font-size: .75rem; font-weight: 600; border: 1px solid #cbd5e1; background: #ffffff; color: #334155; transition: .15s; }
.btn:hover { background: #f1f5f9; }
.btn-primary { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.btn-primary:hover { background: #5b21b6; }
.btn-danger { background: #fff1f2; border-color: #fda4af; color: #be123c; }
.btn-danger:hover { background: #ffe4e6; }
.btn-ok { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.btn-ok:hover { background: #d1fae5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Live sync indicator ---- */
.live-dot { width: .5rem; height: .5rem; border-radius: 9999px; display: inline-block; background: #94a3b8; }
.live-on .live-dot { background: #10b981; animation: livePulse 1.8s infinite; }
.live-poll .live-dot { background: #f59e0b; animation: livePulse 1.8s infinite; }
.live-off .live-dot { background: #f43f5e; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* Row flash when an order is new / changed by a live update */
tr.row-flash > td { animation: rowFlash 4s ease-out; }
@keyframes rowFlash { 0% { background: #fef9c3; } 100% { background: transparent; } }

@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ---- Shiprocket-style order tabs ---- */
.otab { position: relative; padding: .85rem 1rem; font-size: .8rem; font-weight: 600; color: #64748b; white-space: nowrap; border-bottom: 2px solid transparent; transition: .15s; }
.otab:hover { color: #1e293b; }
.otab.active { color: #6d28d9; border-bottom-color: #6d28d9; }
.otab .cnt { margin-left: .4rem; padding: .05rem .45rem; border-radius: 9999px; background: #f1f5f9; color: #475569; font-size: .68rem; font-weight: 700; }
.otab.active .cnt { background: #ede9fe; color: #6d28d9; }
.chip { padding: .25rem .7rem; border-radius: 9999px; font-size: .72rem; font-weight: 600; border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer; transition: .15s; }
.chip:hover { border-color: #a78bfa; color: #5b21b6; }
.chip.active { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.chip .cnt { margin-left: .3rem; opacity: .75; font-weight: 700; }
.chip-call.active { background: #be123c; border-color: #be123c; }

/* ---- address badges ---- */
.abadge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 9999px; font-size: .66rem; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.ab-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ab-fixed { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.ab-call { background: #fff1f2; color: #be123c; border-color: #fda4af; animation: callPulse 1.8s infinite; }
.ab-none { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.ab-busy { background: #fefce8; color: #a16207; border-color: #fde68a; }
@keyframes callPulse { 0% { box-shadow: 0 0 0 0 rgba(244,63,94,.35); } 70% { box-shadow: 0 0 0 6px rgba(244,63,94,0); } 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.addr-pre { white-space: pre-line; }
.idtag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; background: #f1f5f9; border-radius: 4px; padding: 0 .3rem; color: #334155; }
