/*
 * खेप UI: the new look, phone first. Used by the transport & logistics and travel pages
 * (com.khep.web.Shell draws the frame). Big type, big buttons, one main action per screen.
 */
:root {
	--g9: #0b2f1c; --g8: #14532d; --g7: #17643a; --g6: #1f7a45; --g2: #cfe8d7; --g1: #e8f4ec;
	--s5: #f59e0b; --s6: #d97706; --s7: #b45309; --s1: #fff4dc;
	--red: #c2410c; --red1: #fde8e1; --blue: #1d4ed8; --blue1: #e0e9ff;
	--bg: #f6f3ec; --card: #fff; --ink: #18211c; --m: #5d6862; --line: #e6e1d6;
	--r: 18px; --sh: 0 10px 28px -18px rgba(11, 47, 28, .45);
	--font: "Mukta", "Noto Sans Devanagari", "Nirmala UI", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body.ku { margin: 0; font: 17px/1.5 var(--font); color: var(--ink); background: var(--bg); padding-bottom: 84px; }
.ku a { color: var(--g7); }
.ku h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 6px; }
.ku h2 { font-size: 20px; line-height: 1.25; margin: 0 0 10px; }
.ku h3 { font-size: 18px; margin: 0 0 6px; }
.ku .muted { color: var(--m); }
.ku .small { font-size: 15px; }

/* ---------- frame ---------- */
.ku-top { position: sticky; top: 0; z-index: 30; background: var(--g9); color: #fff; box-shadow: 0 4px 18px -12px rgba(0,0,0,.6); }
.ku-top .in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 14px; }
.ku-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none; font-weight: 800; font-size: 22px; min-width: 0; }
.ku-brand .mk { flex: 0 0 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #f59e0b, #dc4a2f); }
.ku-brand .mk svg { width: 21px; height: 21px; }
.ku-brand .biz { font-size: 14px; font-weight: 600; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ku-top .sp { flex: 1; }
.ku-lang { display: flex; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.ku-lang button { border: 0; background: none; color: #e5f2e9; font: 700 14px var(--font); padding: 6px 10px; border-radius: 999px; cursor: pointer; min-height: 34px; }
.ku-lang button.on { background: #fff; color: var(--g8); }
.ku-menu-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 44px; height: 44px; border-radius: 12px; font-size: 22px; cursor: pointer; }

.ku-wrap { max-width: 1180px; margin: 0 auto; display: flex; gap: 22px; padding: 18px 14px 30px; }
.ku-side { flex: 0 0 230px; display: none; }
.ku-main { flex: 1; min-width: 0; }
@media (min-width: 900px) {
	body.ku { padding-bottom: 0; }
	.ku-side { display: block; position: sticky; top: 78px; align-self: flex-start; }
	.ku-bottom { display: none !important; }
}
.ku-side a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; }
.ku-side a:hover { background: #fff; }
.ku-side a.on { background: var(--g8); color: #fff; }
.ku-side .ic, .ku-bottom .ic, .ku-sheet .ic { font-size: 21px; width: 26px; text-align: center; }
.ku-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 4px; }

/* bottom tab bar (phone) */
.ku-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
	display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -16px rgba(0,0,0,.35); }
.ku-bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--m); text-decoration: none; font-size: 12.5px; font-weight: 700; padding: 4px 2px; min-height: 52px; justify-content: center; }
.ku-bottom a.on { color: var(--g8); }
.ku-bottom a.fab .ic { width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: var(--s5); color: #2b1a00; display: grid; place-items: center;
	font-size: 28px; box-shadow: 0 10px 20px -8px rgba(217,119,6,.8); border: 4px solid #fff; }

/* menu sheet */
.ku-sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.ku-sheet.open { display: block; }
.ku-sheet .bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.ku-sheet .pane { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 88vw); background: #fff; padding: 18px 14px; overflow-y: auto; }
.ku-sheet a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.ku-sheet a:active, .ku-sheet a:hover { background: var(--g1); }
.ku-sheet hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); margin: 0 0 14px; }
.card.flat { box-shadow: none; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.head .sub { color: var(--m); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border-radius: 14px; border: 0;
	font: 800 17px var(--font); cursor: pointer; text-decoration: none !important; transition: transform .08s ease, filter .15s; }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--g8); color: #fff !important; }
.btn.acc { background: var(--s5); color: #2b1a00 !important; }
.btn.ghost { background: #fff; color: var(--ink) !important; border: 1px solid var(--line); }
.btn.wa { background: #1f9d55; color: #fff !important; }
.btn.danger { background: var(--red1); color: var(--red) !important; }
.btn.block { width: 100%; }
.btn.sm { min-height: 42px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .55; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }

.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 6px; color: #2b3a31; }
.field .hint { color: var(--m); font-size: 14px; margin-top: 4px; }
.ku input[type=text], .ku input[type=tel], .ku input[type=number], .ku input[type=date], .ku input[type=time], .ku input[type=search],
.ku input[type=password], .ku select, .ku textarea {
	width: 100%; font: 500 17px var(--font); color: var(--ink); background: #fffdf8; border: 1.5px solid #d9d3c5; border-radius: 12px;
	padding: 11px 13px; min-height: 50px; }
.ku textarea { min-height: 96px; }
.ku input:focus, .ku select:focus, .ku textarea:focus { outline: none; border-color: var(--g6); box-shadow: 0 0 0 4px rgba(31,122,69,.15); background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr; } }

/* choice chips (radio buttons that look like big buttons) */
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { flex: 1 1 0; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 8px 10px; border-radius: 12px;
	border: 1.5px solid #d9d3c5; background: #fffdf8; font-weight: 700; cursor: pointer; line-height: 1.2; }
.choice input:checked + span { background: var(--g8); border-color: var(--g8); color: #fff; }
.choice.many label { flex: 1 1 calc(33.33% - 8px); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--sh); }
.stat b { display: block; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--m); font-size: 14px; font-weight: 600; }
.stat.hot { background: var(--g8); color: #fff; border-color: var(--g8); }
.stat.hot span { color: #cfe8d7; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 800; background: var(--g1); color: var(--g8); white-space: nowrap; }
.pill.s-booked { background: #eef0f3; color: #475467; }
.pill.s-loaded, .pill.s-left, .pill.s-warehouse, .pill.s-port, .pill.s-transit { background: var(--blue1); color: var(--blue); }
.pill.s-delivered, .pill.s-done { background: var(--g1); color: var(--g8); }
.pill.s-cancel { background: var(--red1); color: var(--red); }
.pill.due { background: var(--s1); color: var(--s7); }

/* list of cards (LRs, trips, bookings) */
.list { display: grid; gap: 10px; }
.item { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none !important; color: var(--ink) !important; box-shadow: var(--sh); }
.item:active { transform: scale(.995); }
.item .t { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.item .t b { font-size: 18px; }
.item .route { font-weight: 700; margin: 4px 0 2px; }
.item .meta { color: var(--m); font-size: 15px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { color: var(--m); font-weight: 600; }
.kv dd { margin: 0; text-align: right; font-weight: 700; }

/* timeline (tracking) */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 18px 30px; }
.tl li::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: -6px; width: 2px; background: var(--g2); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--g6); }
.tl li.now::after { background: var(--g6); box-shadow: 0 0 0 5px rgba(31,122,69,.18); }
.tl b { display: block; }
.tl .when { color: var(--m); font-size: 14px; }

.msg { padding: 12px 14px; border-radius: 14px; font-weight: 700; margin: 0 0 14px; }
.msg.ok { background: var(--g1); color: var(--g8); }
.msg.err { background: var(--red1); color: var(--red); }
.msg.info { background: var(--s1); color: var(--s7); }

.empty { text-align: center; padding: 34px 16px; color: var(--m); }
.empty .big { font-size: 46px; }
.empty b { display: block; color: var(--ink); font-size: 19px; margin: 6px 0 4px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.tabs a.on { background: var(--g8); border-color: var(--g8); color: #fff; }

.search { position: relative; margin: 0 0 12px; }
.search input { padding-left: 44px !important; }
.search::before { content: "🔍"; position: absolute; left: 14px; top: 13px; font-size: 18px; opacity: .6; }

/* camera scanner */
.scanbox { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto 14px; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbox .frame { position: absolute; inset: 18% 14%; border: 4px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanbox .say { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

.stagegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stagegrid button { min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; font: 800 17px var(--font); color: var(--ink); cursor: pointer; }
.stagegrid button .ic { display: block; font-size: 24px; }
.stagegrid button.on { background: var(--g8); color: #fff; border-color: var(--g8); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--g9); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 80; box-shadow: var(--sh); }

/* printing an LR / a page */
@media print {
	body.ku { background: #fff; padding: 0; }
	.ku-top, .ku-side, .ku-bottom, .no-print { display: none !important; }
	.ku-wrap { padding: 0; }
	.card { box-shadow: none; border: 1px solid #999; }
}

/* switcher for a business that uses more than one line (produce / transport / travel) */
.ku-lines { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ku-lines::-webkit-scrollbar { display: none; }
.ku-lines a { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px; background: var(--bg); }
.ku-lines a.on { background: var(--g8); border-color: var(--g8); color: #fff; }
@media (min-width: 900px) { .ku-lines { justify-content: center; } }
