/* =====================================================================
   Rider Portal — mobile-first app UI
   ===================================================================== */
:root {
    --red: #e11d2e;
    --red-d: #b3121f;
    --red-soft: #fdecee;
    --ink: #0f1115;
    --ink-2: #1a1d24;
    --ink-3: #262a33;
    --text: #1f2329;
    --muted: #6b7280;
    --soft: #9aa0aa;
    --line: #e8e9ec;
    --bg: #f3f4f6;
    --card: #ffffff;
    --green: #16a34a;
    --green-soft: #e8f7ee;
    --amber: #d97706;
    --amber-soft: #fef5e6;
    --blue: #2563eb;
    --blue-soft: #eaf1fe;
    --r: 14px;
    --r-sm: 10px;
    --shadow: 0 1px 2px rgba(15,17,21,.05), 0 8px 24px -16px rgba(15,17,21,.25);
    --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: #e6e7ea; }
body { font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.ri { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }

.rp-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; box-shadow: 0 0 0 1px rgba(15,17,21,.04), 0 30px 80px -40px rgba(15,17,21,.35); }
body.has-nav .rp-main { padding-bottom: calc(92px + var(--safe-b)); }
.rp-main { padding: 16px 16px 28px; }

/* ---------- top bar ---------- */
.rp-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 16px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.rp-brand { display: flex; align-items: center; gap: 8px; }
.rp-brand img { height: 30px; width: auto; }
.rp-brand-badge { width: 34px; height: 34px; border-radius: 10px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; }
.rp-brand-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--ink); color: #fff; }
.rp-top-title { flex: 1; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.rp-iconbtn { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; }
.rp-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; overflow: hidden; flex-shrink: 0; }
.rp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rp-avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.rp-avatar.lg { width: 84px; height: 84px; font-size: 26px; }

/* ---------- cards / text ---------- */
.rp-card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.rp-card.flat { box-shadow: none; border: 1px solid var(--line); }
.rp-h { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.rp-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rp-sec-t { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 10px; }
.rp-sec-t h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.rp-sec-t a { font-size: 12.5px; font-weight: 600; color: var(--red); }
.rp-muted { color: var(--muted); }
.rp-empty { text-align: center; padding: 34px 16px; color: var(--muted); font-size: 13.5px; }
.rp-empty .ri { margin: 0 auto 10px; color: var(--soft); }

/* ---------- alerts ---------- */
.rp-alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 14px; line-height: 1.5; }
.rp-alert.success { background: var(--green-soft); color: #166534; }
.rp-alert.error { background: #fdecec; color: #b91c1c; }
.rp-alert.info { background: var(--blue-soft); color: #1e40af; }
.rp-alert.warn { background: var(--amber-soft); color: #92400e; }

/* ---------- buttons ---------- */
.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14.5px; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s, opacity .2s; white-space: nowrap; }
.rp-btn:active { transform: scale(.98); }
.rp-btn.block { width: 100%; }
.rp-btn.sm { height: 38px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.rp-btn.red { background: var(--red); color: #fff; box-shadow: 0 10px 20px -12px rgba(225,29,46,.8); }
.rp-btn.ink { background: var(--ink); color: #fff; }
.rp-btn.green { background: var(--green); color: #fff; box-shadow: 0 10px 20px -12px rgba(22,163,74,.8); }
.rp-btn.blue { background: var(--blue); color: #fff; }
.rp-btn.line { background: #fff; border-color: var(--line); color: var(--ink); }
.rp-btn.ghost-red { background: #fff; border-color: #f5c2c7; color: var(--red); }
.rp-btn[disabled] { opacity: .55; cursor: default; }
.rp-btn-row { display: flex; gap: 10px; }
.rp-btn-row > * { flex: 1; }

/* ---------- forms ---------- */
.rp-field { margin-bottom: 14px; }
.rp-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rp-field label small { font-weight: 500; color: var(--soft); }
.rp-input, .rp-field input[type=text], .rp-field input[type=tel], .rp-field input[type=email], .rp-field input[type=password], .rp-field input[type=date], .rp-field input[type=number], .rp-field select, .rp-field textarea { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; transition: border-color .2s, box-shadow .2s; outline: none; }
.rp-field textarea { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.rp-field input:focus, .rp-field select:focus, .rp-field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,17,21,.06); }
.rp-field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.rp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-pass { position: relative; }
.rp-pass button { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border: 0; background: transparent; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }

/* ---------- auth screens ---------- */
.rp-auth-hero { background: radial-gradient(500px 260px at 100% 0%, rgba(225,29,46,.35), transparent 60%), linear-gradient(160deg, #0f1115, #1b1e25); color: #fff; padding: 36px 22px 64px; position: relative; overflow: hidden; }
.rp-auth-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.rp-auth-hero > * { position: relative; z-index: 1; }
.rp-auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.rp-auth-logo img { height: 34px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.rp-auth-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.rp-auth-hero h1 em { font-style: normal; color: #ff5a67; }
.rp-auth-hero p { margin-top: 10px; color: #a4a9b2; font-size: 14px; line-height: 1.6; }
.rp-auth-perks { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.rp-auth-perks span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); font-size: 12px; color: #e5e7eb; }
.rp-auth-card { background: #fff; border-radius: 20px 20px 0 0; margin-top: -30px; position: relative; z-index: 2; padding: 24px 18px 30px; min-height: 60vh; }
.rp-auth-card h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.rp-auth-card .rp-sub { margin-bottom: 18px; }
.rp-auth-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.rp-auth-foot a { color: var(--red); font-weight: 700; }

/* steps */
.rp-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.rp-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.rp-steps i.on { background: var(--red); }
.rp-step-label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.rp-step { display: none; animation: rpIn .35s ease both; }
.rp-step.on { display: block; }
@keyframes rpIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.rp-choice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rp-choice label { margin: 0; }
.rp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rp-choice span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.rp-choice input:checked + span { border-color: var(--ink); background: #f7f7f8; }

/* ---------- home: hero / online switch ---------- */
.rp-hello { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rp-hello h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.rp-duty { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; color: #fff; background: linear-gradient(150deg, #1b1e25, #0f1115); box-shadow: 0 24px 40px -26px rgba(15,17,21,.9); margin-bottom: 14px; transition: background .4s; }
.rp-duty::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(148,163,184,.25), transparent 70%); transition: background .4s; }
.rp-duty.on { background: linear-gradient(150deg, #0d3b22, #0f1115 75%); }
.rp-duty.on::before { background: radial-gradient(circle, rgba(34,197,94,.45), transparent 70%); }
.rp-duty-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rp-duty-state { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a4a9b2; }
.rp-duty-state i { width: 9px; height: 9px; border-radius: 50%; background: #6b7280; }
.rp-duty.on .rp-duty-state { color: #86efac; }
.rp-duty.on .rp-duty-state i { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: rpPing 1.8s infinite; }
@keyframes rpPing { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.rp-duty h3 { position: relative; font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.rp-duty p { position: relative; font-size: 13px; color: #a4a9b2; margin-top: 4px; line-height: 1.5; }
.rp-switch { position: relative; width: 74px; height: 40px; border-radius: 40px; border: 0; background: #3a3f4a; cursor: pointer; flex-shrink: 0; transition: background .3s; }
.rp-switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: transform .3s cubic-bezier(.22,.61,.36,1); }
.rp-duty.on .rp-switch { background: #22c55e; }
.rp-duty.on .rp-switch::after { transform: translateX(34px); }
.rp-switch[disabled] { opacity: .5; }
.rp-duty-meta { position: relative; display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rp-duty-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 12px; color: #e5e7eb; }

/* stats */
.rp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.rp-stat { background: #fff; border-radius: var(--r); padding: 13px 12px; box-shadow: var(--shadow); }
.rp-stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.rp-stat span { font-size: 11.5px; color: var(--muted); }

/* target */
.rp-target { display: flex; gap: 14px; align-items: center; }
.rp-ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.rp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-ring circle { fill: none; stroke-width: 9; }
.rp-ring .trk { stroke: #eef0f3; }
.rp-ring .bar { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.rp-ring.done .bar { stroke: var(--green); }
.rp-ring div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rp-ring div b { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1; }
.rp-ring div span { font-size: 10px; color: var(--muted); margin-top: 2px; }
.rp-target-txt b { font-size: 14.5px; color: var(--ink); }
.rp-target-txt > b:first-child { display: flex; align-items: center; gap: 6px; }
.rp-target-txt p { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.rp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; }
.rp-chip.green { background: var(--green-soft); color: var(--green); }
.rp-chip.amber { background: var(--amber-soft); color: var(--amber); }
.rp-chip.red { background: var(--red-soft); color: var(--red); }
.rp-chip.blue { background: var(--blue-soft); color: var(--blue); }
.rp-chip.gray { background: #f1f2f4; color: var(--muted); }
.rp-chip.ink { background: var(--ink); color: #fff; }

/* announcements */
.rp-ann-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.rp-ann-track::-webkit-scrollbar { display: none; }
.rp-ann { flex: 0 0 100%; scroll-snap-align: center; border-radius: 16px; overflow: hidden; color: #fff; position: relative; background: linear-gradient(135deg, #e11d2e, #8f0f1c); box-shadow: 0 18px 30px -22px rgba(225,29,46,.9); }
.rp-ann-track.multi .rp-ann { flex-basis: 88%; }
.rp-ann.dark { background: linear-gradient(135deg, #262a33, #0f1115); box-shadow: 0 18px 30px -22px rgba(15,17,21,.9); }
.rp-ann.green { background: linear-gradient(135deg, #16a34a, #0b5d2b); box-shadow: 0 18px 30px -22px rgba(22,163,74,.9); }
.rp-ann.gold { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 18px 30px -22px rgba(217,119,6,.9); }
.rp-ann-media img, .rp-ann-media video { width: 100%; max-height: 220px; object-fit: cover; background: #000; }
.rp-ann-body { padding: 14px 16px 16px; }
.rp-ann-kick { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.rp-ann h4 { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; margin-top: 6px; line-height: 1.3; }
.rp-ann p { font-size: 13px; opacity: .9; margin-top: 5px; line-height: 1.55; white-space: pre-line; }
.rp-ann .rp-btn { margin-top: 12px; height: 40px; background: #fff; color: var(--ink); font-size: 13px; }

/* order cards */
.rp-order { display: block; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.rp-order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 14px 0; }
.rp-order-no { font-size: 14.5px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.rp-order-mid { padding: 10px 14px 14px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.rp-order-mid .l { display: flex; align-items: flex-start; gap: 8px; }
.rp-order-mid .l .ri { margin-top: 1px; color: var(--soft); }
.rp-order-mid b { color: var(--ink); font-weight: 600; }
.rp-order-foot { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-top: 1px solid var(--line); background: #fafafb; font-size: 12.5px; }
.rp-order-foot .go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--red); }
.rp-order.active { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }

/* order detail */
.rp-progress { display: flex; justify-content: space-between; position: relative; margin: 6px 4px 4px; }
.rp-progress::before { content: ''; position: absolute; left: 14px; right: 14px; top: 13px; height: 3px; background: var(--line); }
.rp-progress .fill { position: absolute; left: 14px; top: 13px; height: 3px; background: var(--green); transition: width .4s; }
.rp-progress div { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 25%; font-size: 10.5px; font-weight: 600; color: var(--soft); text-align: center; }
.rp-progress div i { width: 29px; height: 29px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; color: var(--soft); }
.rp-progress div.done { color: var(--green); }
.rp-progress div.done i { background: var(--green); border-color: var(--green); color: #fff; }
.rp-progress div.cur { color: var(--ink); }
.rp-progress div.cur i { border-color: var(--ink); color: var(--ink); }
.rp-cust { display: flex; align-items: center; gap: 12px; }
.rp-cust-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rp-addr { margin-top: 14px; padding: 12px; border-radius: 12px; background: #f7f7f8; border: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--ink); display: flex; gap: 10px; }
.rp-addr .ri { color: var(--red); margin-top: 2px; }
.rp-kv { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.rp-kv:last-child { border-bottom: 0; }
.rp-kv span { color: var(--muted); }
.rp-kv b { color: var(--ink); text-align: right; }
.rp-items { display: grid; gap: 8px; }
.rp-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.rp-item .q { min-width: 32px; height: 24px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; }
.rp-cod { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--amber-soft); border: 1px solid #f8d9a8; color: #92400e; }
.rp-cod b { font-size: 20px; font-weight: 800; color: #7c2d12; display: block; }
.rp-prepaid { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); color: #166534; font-weight: 600; font-size: 13.5px; }
.rp-otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 10px 0 14px; }
.rp-otp-inputs input { width: 58px; height: 62px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center; font-size: 26px; font-weight: 800; outline: none; background: #fff; }
.rp-otp-inputs input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15,17,21,.06); }
.rp-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); font-size: 13.5px; cursor: pointer; margin-bottom: 12px; }
.rp-check input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 1px; flex-shrink: 0; }

/* filters */
.rp-pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.rp-pills::-webkit-scrollbar { display: none; }
.rp-pills a { flex-shrink: 0; padding: 8px 13px; border-radius: 30px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rp-pills a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rp-daterow { display: flex; gap: 8px; margin-bottom: 14px; }
.rp-daterow input { flex: 1; min-width: 0; height: 42px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.rp-daterow .rp-btn { height: 42px; }
.rp-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rp-list-row:last-child { border-bottom: 0; }
.rp-list-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rp-list-main { flex: 1; min-width: 0; }
.rp-list-main b { display: block; font-size: 13.5px; color: var(--ink); }
.rp-list-main span { font-size: 12px; color: var(--muted); }
.rp-list-amt { font-weight: 800; font-size: 14.5px; text-align: right; }

/* wallet hero */
.rp-wallet { border-radius: 18px; padding: 20px; color: #fff; background: radial-gradient(380px 200px at 100% 0%, rgba(225,29,46,.5), transparent 60%), linear-gradient(150deg, #1b1e25, #0f1115); box-shadow: 0 24px 40px -26px rgba(15,17,21,.9); margin-bottom: 14px; }
.rp-wallet span { font-size: 12px; color: #a4a9b2; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.rp-wallet b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.rp-wallet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.rp-wallet-row div { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.07); }
.rp-wallet-row small { display: block; font-size: 11px; color: #a4a9b2; }
.rp-wallet-row strong { font-size: 15px; }

/* profile */
.rp-prof-head { display: flex; align-items: center; gap: 14px; }
.rp-prof-head h2 { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.rp-menu a, .rp-menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.rp-menu a:last-child, .rp-menu button:last-child { border-bottom: 0; }
.rp-menu .mi { width: 36px; height: 36px; border-radius: 10px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.rp-menu .chev { margin-left: auto; color: var(--soft); }
.rp-tabs2 { display: flex; gap: 4px; padding: 4px; background: #e9eaed; border-radius: 12px; margin-bottom: 14px; }
.rp-tabs2 a { flex: 1; text-align: center; padding: 9px 4px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rp-tabs2 a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* KYC */
.rp-kyc-step { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; margin-bottom: 10px; }
.rp-kyc-step.done { border-color: #bfe8cf; background: #f6fcf8; }
.rp-kyc-step .n { width: 34px; height: 34px; border-radius: 50%; background: #f1f2f4; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.rp-kyc-step.done .n { background: var(--green); color: #fff; }
.rp-kyc-step .t { flex: 1; min-width: 0; }
.rp-kyc-step .t b { display: block; font-size: 14px; color: var(--ink); }
.rp-kyc-step .t span { font-size: 12px; color: var(--muted); }
.rp-kyc-thumb { width: 54px; height: 40px; border-radius: 8px; object-fit: cover; background: #f1f2f4; }
.rp-cam { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; }
.rp-cam-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: #fff; font-weight: 700; }
.rp-cam-top button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.rp-cam-view { position: relative; flex: 1; overflow: hidden; }
.rp-cam-view video, .rp-cam-view canvas, .rp-cam-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-cam-view video.mirror { transform: scaleX(-1); }
.rp-cam-guide { position: absolute; left: 7%; right: 7%; top: 50%; transform: translateY(-50%); aspect-ratio: 1.586; border: 2.5px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.rp-cam-guide.face { left: 50%; width: 68%; aspect-ratio: .8; transform: translate(-50%, -50%); border-radius: 50%; right: auto; }
.rp-cam-tip { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; font-size: 13px; padding: 0 20px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.rp-cam-bar { padding: 18px 16px calc(22px + var(--safe-b)); display: flex; align-items: center; justify-content: center; gap: 26px; background: #000; }
.rp-shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.rp-shutter::after { content: ''; display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .1s; }
.rp-shutter:active::after { transform: scale(.9); }
.rp-cam-bar .rp-btn { height: 46px; }

/* bottom nav */
.rp-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(8px + var(--safe-b)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.rp-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--soft); border-radius: 12px; }
.rp-nav a.on { color: var(--ink); }
.rp-nav a.on .ri { color: var(--red); }
.rp-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

/* ---------- incoming order overlay ---------- */
.rp-offer { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.rp-offer-bg { position: absolute; inset: 0; background: rgba(8,9,12,.78); backdrop-filter: blur(4px); animation: rpFade .25s ease both; }
@keyframes rpFade { from { opacity: 0; } to { opacity: 1; } }
.rp-offer-card { position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); animation: rpUp .35s cubic-bezier(.22,.61,.36,1) both; }
@keyframes rpUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.rp-offer-head { display: flex; align-items: center; gap: 12px; }
.rp-pulse { width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; animation: rpRing 1s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(225,29,46,.55); }
@keyframes rpRing { 0%,100% { transform: rotate(0); box-shadow: 0 0 0 0 rgba(225,29,46,.5); } 10% { transform: rotate(-16deg); } 20% { transform: rotate(14deg); } 30% { transform: rotate(-10deg); } 40% { transform: rotate(8deg); } 50% { transform: rotate(0); box-shadow: 0 0 0 16px rgba(225,29,46,0); } }
.rp-offer-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.rp-offer-no { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-top: 2px; }
.rp-timer { position: relative; width: 120px; height: 120px; margin: 16px auto 10px; }
.rp-timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-timer-svg circle { fill: none; stroke-width: 10; }
.rp-timer-svg .trk { stroke: #f1f2f4; }
.rp-timer-svg .bar { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 326.7; transition: stroke-dashoffset 1s linear; }
.rp-timer-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rp-timer-txt b { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.rp-timer-txt span { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.rp-offer-info { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.rp-offer-info .row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.rp-offer-info .row:last-child { border-bottom: 0; }
.rp-offer-info .row span { color: var(--muted); }
.rp-offer-info .row b { color: var(--ink); text-align: right; }
.rp-offer-note { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 14px; }
.rp-sound-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 10px; padding: 9px; margin-bottom: 12px; }
.rp-offer-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.rp-offer-actions .rp-btn { height: 56px; font-size: 16px; border-radius: 14px; }
.rp-reasons { margin-top: 12px; display: grid; gap: 8px; }
.rp-reasons-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.rp-reasons button { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; padding: 0 14px; }
.rp-reasons button:active { background: #f7f7f8; }

/* toast */
.rp-toast { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(96px + var(--safe-b)); z-index: 400; max-width: 440px; width: calc(100% - 32px); padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); animation: rpUp .3s ease both; }
.rp-toast.error { background: #b91c1c; }
.rp-toast.success { background: #15803d; }

/* sheet (modal) */
.rp-sheet { position: fixed; inset: 0; z-index: 250; display: flex; align-items: flex-end; justify-content: center; }
.rp-sheet-bg { position: absolute; inset: 0; background: rgba(8,9,12,.6); }
.rp-sheet-card { position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + var(--safe-b)); animation: rpUp .3s ease both; max-height: 90vh; overflow-y: auto; }
.rp-sheet-card h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }

@media (min-width: 520px) {
    .rp-shell { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Desktop / tablet layout (mobile view above stays exactly the same)
   ===================================================================== */
@media (min-width: 700px) and (max-width: 1023.98px) {
    .rp-shell { max-width: 720px; }
    .rp-nav { max-width: 720px; }
    .rp-main { padding: 22px 24px 32px; }
}
@media (min-width: 1024px) {
    html { background: #eceef1; }
    body { font-size: 15px; background: #eceef1; }
    /* app pages: left sidebar + wide content */
    body.has-nav .rp-shell { max-width: 1320px; padding-left: 272px; background: transparent; box-shadow: none; }
    body.has-nav .rp-top { margin-left: -272px; height: 70px; padding: 0 28px; background: rgba(255,255,255,.95); }
    body.has-nav .rp-top .rp-brand img { height: 38px; }
    body.has-nav .rp-top-title { font-size: 18px; }
    body.has-nav .rp-main { max-width: 1040px; margin: 0 auto; padding: 32px 40px 56px; }
    body.has-nav .rp-nav { top: 70px; bottom: 0; left: max(0px, calc(50% - 660px)); transform: none; width: 272px; max-width: none; display: flex; flex-direction: column; gap: 4px; padding: 22px 16px; background: #fff; border-top: 0; border-right: 1px solid var(--line); backdrop-filter: none; align-items: stretch; }
    body.has-nav .rp-nav a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 13px 16px; font-size: 15px; font-weight: 600; color: var(--muted); border-radius: 12px; transition: background .2s, color .2s; }
    body.has-nav .rp-nav a:hover { background: #f4f5f7; color: var(--ink); }
    body.has-nav .rp-nav a.on { background: var(--red-soft); color: var(--red); }
    body.has-nav .rp-nav a.on .ri { color: var(--red); }
    body.has-nav .rp-dot { top: 50%; left: auto; right: 16px; margin-top: -5px; }
    /* employee "New joining" button becomes a highlighted menu item */
    body.has-nav .em-nav .em-fab { order: -1; margin-bottom: 10px; background: var(--red); color: #fff; box-shadow: 0 14px 26px -14px rgba(225,29,46,.9); }
    body.has-nav .em-nav .em-fab:hover, body.has-nav .em-nav .em-fab.on { background: var(--red-d); color: #fff; }
    body.has-nav .em-nav .em-fab .em-fab-btn { width: auto; height: auto; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    body.has-nav .em-nav .em-fab span:last-child::after { content: ' joining'; }
    /* bigger, roomier cards */
    .rp-card { padding: 22px; border-radius: 18px; margin-bottom: 18px; }
    .rp-h { font-size: 16.5px; }
    .rp-sub { font-size: 13.5px; }
    .rp-sec-t { margin: 28px 2px 14px; }
    .rp-sec-t h3 { font-size: 17px; }
    .rp-stats { gap: 14px; margin-bottom: 18px; }
    .rp-grid2 { gap: 14px; }
    .rp-toast { bottom: 28px; }
    body.has-nav .rp-toast { left: 272px; }
    /* pop-ups as centered dialogs instead of bottom sheets */
    .rp-offer, .rp-sheet { align-items: center; }
    .rp-offer-card, .rp-sheet-card { border-radius: 24px; max-width: 520px; padding: 26px 26px 28px; }
    /* login / register pages: centered card */
    body:not(.has-nav) .rp-shell { background: #fff; max-width: 560px; min-height: 0; margin: 48px auto; border-radius: 26px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(15,17,21,.45), 0 0 0 1px rgba(15,17,21,.04); }
}
@media (min-width: 1400px) {
    body.has-nav .rp-main { max-width: 1100px; }
}
