/* Lesuka seller, rider and staff screens. One small stylesheet, no build step. */
:root { --brand: #27ae60; --brand-dark: #1e8e4e; --brand-soft: #e8f6ee; --text: #243029; --muted: #66726b; --line: #e1e8e3; --bg: #f6f9f7; --warn: #fff4e0; --warn-line: #f0d29a; --bad: #b3261e; --radius: 10px; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--brand-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img, .card-logo img { display: block; max-height: 38px; width: auto; }
.logo-word { font-size: 22px; font-weight: 700; color: var(--brand-dark); letter-spacing: .2px; }
.card-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.card-logo img { max-height: 52px; }
.card-logo .logo-word { font-size: 28px; }
.wide-card { max-width: 640px; }
.req { font-size: 11px; font-weight: 600; color: var(--bad); text-transform: uppercase; letter-spacing: .3px; margin-left: 4px; }
.top-search { display: flex; flex: 1 1 260px; max-width: 420px; margin: 0 12px; }
.top-search input { flex: 1; min-width: 0; margin: 0; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; padding: 8px 12px; font-size: 14px; background: #fafcfb; }
.top-search button { border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 0 8px 8px 0; padding: 0 12px; cursor: pointer; display: flex; align-items: center; }
.top-search button:hover { background: var(--brand-dark); }
.top-right { display: flex; align-items: center; gap: 14px; }
header.top .back { font-size: 14px; color: var(--muted); text-decoration: none; }
header.top .back:hover { color: var(--brand-dark); }
.who { font-size: 12px; background: var(--brand-soft); color: var(--brand-dark); padding: 3px 10px; border-radius: 999px; }
.bell { position: relative; text-decoration: none; font-size: 20px; line-height: 1; }
.bell b { position: absolute; top: -8px; right: -10px; background: var(--bad); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

main { padding: 24px 16px 64px; }
.card { max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.wide { max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 720px; margin: 0 auto; }
h1 { margin: 0 0 6px; font-size: 24px; }
h2 { font-size: 18px; margin: 26px 0 10px; }
h3 { margin: 0 0 6px; font-size: 16px; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
small, .small { font-size: 13px; }
.text-muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* forms */
label { display: block; margin: 14px 0 4px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #c9d3cc; border-radius: 6px; font-size: 15px; background: #fff; font-family: inherit; color: var(--text); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input[type=file] { padding: 8px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 12px; }
label.check input { width: auto; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; font-weight: 400; }
.error { color: var(--bad); font-size: 13px; margin: 5px 0 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 18px; margin: 18px 0; background: #fff; }
fieldset.box legend { font-weight: 700; padding: 0 8px; font-size: 15px; }

/* buttons */
.btn { display: inline-block; width: 100%; margin-top: 18px; padding: 11px 16px; background: var(--brand); color: #fff; border: 0; border-radius: 6px; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn.ghost { width: auto; margin-top: 0; background: transparent; color: var(--brand-dark); border: 1px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.small { width: auto; margin: 0; padding: 7px 12px; font-size: 13px; }
.btn.auto { width: auto; }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #8f1d17; }
.btn.grey { background: #6b7770; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.notice { padding: 12px 14px; border-radius: 6px; font-size: 14px; margin: 14px 0; }
.notice.warn { background: var(--warn); border: 1px solid var(--warn-line); }
.notice.ok { background: var(--brand-soft); border: 1px solid #bfe3cd; }
.notice.bad { background: #fde8e6; border: 1px solid #f3b8b3; color: #7a140d; }
.alt { text-align: center; font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.row.start { justify-content: flex-start; }

/* navigation */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.subnav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); text-decoration: none; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.subnav a:hover { border-color: var(--brand); }
.subnav a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.subnav a i { font-style: normal; background: var(--bad); color: #fff; border-radius: 9px; font-size: 11px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-size: 14px; }
.tabs a.active { color: var(--brand-dark); border-color: var(--brand); font-weight: 600; }

/* stat tiles and cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 16px 0; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.tile:hover { border-color: var(--brand); }
.tile strong { display: block; font-size: 26px; color: var(--brand-dark); line-height: 1.2; }
.tile span { font-size: 13px; color: var(--muted); }
.tile.alert strong { color: var(--bad); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.panel h3 { margin-bottom: 10px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.review h3 { font-size: 18px; }
.review p { margin: 4px 0; font-size: 14px; }
.review .reject-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } header.top { padding: 10px 14px; } }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f1f6f3; font-size: 13px; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.actions form { margin: 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

/* badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: #eceff0; color: #444; white-space: nowrap; }
.badge.pending_review, .badge.pending, .badge.draft, .badge.in_production, .badge.assigned, .badge.processing { background: #fff4e0; color: #8a5a00; }
.badge.approved, .badge.paid, .badge.delivered, .badge.completed, .badge.processed { background: #e8f5ea; color: #1b6b2b; }
.badge.suspended, .badge.rejected, .badge.cancelled, .badge.failed, .badge.refunded { background: #fde8e6; color: #9b1c12; }
.badge.ready_for_pickup, .badge.with_rider, .badge.picked_up, .badge.in_progress { background: #e3f0fb; color: #0f4c81; }
.badge.returned { background: #f3e3fa; color: #6a1b8a; }

/* product pictures */
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.thumb { position: relative; width: 96px; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumb label { font-weight: 400; font-size: 12px; margin: 3px 0 0; display: flex; gap: 4px; align-items: center; }
.thumb label input { width: auto; }
.pcard { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.pcard img, .pcard .noimg { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; flex: none; background: #eef2ef; }
.pcard .body { flex: 1; min-width: 0; }
.pcard h3 { margin: 0 0 2px; }

/* variation rows */
.vrow { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.vrow label { margin-top: 0; font-size: 12px; }
@media (max-width: 760px) { .vrow { grid-template-columns: 1fr 1fr; } }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline time { color: var(--muted); font-size: 12px; display: block; }

/* inbox and messages */
.note { display: block; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; text-decoration: none; color: inherit; }
.note.unread { border-left: 4px solid var(--brand); background: #fbfefc; }
.note:not(.unread) { background: #f4f7f5; border-color: #e8eeea; color: #7b867f; }
.note:not(.unread) strong { font-weight: 500; }
.note strong { display: block; }
.note span { font-size: 13px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; font-size: 14px; }
.bubble.mine { align-self: flex-end; background: var(--brand-soft); border-color: #bfe3cd; }
.bubble time { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 22px 0; }
.pager a, .pager span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; text-decoration: none; background: #fff; }
.pager .active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .disabled, .pager .dots { color: #aab3ad; }

.big-actions { display: grid; gap: 10px; margin-top: 12px; }
.big-actions .btn { margin-top: 0; padding: 14px; font-size: 16px; }
.checklist { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.checklist li { padding: 6px 0; display: flex; gap: 8px; }
.checklist li::before { content: "\25CB"; color: var(--muted); }
.checklist li.done::before { content: "\2714"; color: var(--brand-dark); }
.checklist li.done { color: var(--muted); }
.bar { height: 8px; background: #e5ece7; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin-top: 8px; }
.spark div { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.spark div span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

/* search results */
.result-group { margin-bottom: 22px; }
.result-group h2 { margin-top: 0; }
.result { display: block; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; text-decoration: none; color: inherit; }
.result:hover { border-color: var(--brand); }
.result span { display: block; font-size: 13px; color: var(--muted); }
mark { background: #fff1b8; padding: 0 1px; border-radius: 2px; }
@media (max-width: 760px) { .top-search { order: 3; flex-basis: 100%; max-width: none; margin: 4px 0 0; } }

/* add / edit product */
.cat-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 12px; }
.cat-levels select { margin-bottom: 4px; }
#cat-crumb { color: var(--brand-dark); font-weight: 600; }
.vpic { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 6px 0 12px; border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.vpic label { margin: 0; }
.vpic input[type=file] { flex: 1; min-width: 200px; }
.vthumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.thumb.new { width: 96px; }
.thumb-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #c0392b; color: #fff; cursor: pointer; line-height: 1; font-size: 15px; padding: 0; }
.busy { position: fixed; inset: 0; background: rgba(255, 255, 255, .88); z-index: 80; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 17px; }
.busy span { font-size: 14px; color: var(--muted); }
#gift-box, #custom-box { background: #f8fbf9; border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px 12px; margin-top: 8px; }
#gift-box[hidden], #custom-box[hidden] { display: none; }

/* campaigns */
.camp-preview { margin-top: 12px; border-radius: 10px; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; min-height: 84px; justify-content: center; }
.camp-preview span { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 800; opacity: .9; }
.camp-preview strong { font-size: 22px; }
.camp-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }

/* Show/hide eye on every password box */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: #6b6b6b; cursor: pointer; padding: 0; margin: 0; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--brand-dark); background: var(--brand-soft); outline: none; }
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye .off { display: none; }
.pw-eye[aria-pressed=true] .on { display: none; }
.pw-eye[aria-pressed=true] .off { display: block; }

/* Phones: menus stay on one swipeable row instead of stacking into many lines */
@media (max-width: 760px) {
    .subnav, .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px 4px; }
    .subnav::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
    .subnav a, .tabs a { white-space: nowrap; flex: 0 0 auto; }
    .btn, input, select, textarea { min-height: 44px; }
    input, select, textarea { font-size: 16px; }
}
