:root {
  --ink: #14181f;
  --ink-soft: #5a6270;
  --line: #e4e7ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --brand: #ff6a3d;
  --brand-dark: #e2551f;
  --brand-tint: #fff1ec;
  --ok: #1a9e6b;
  --warn: #d68a00;
  --danger: #d64545;
  --radius: 14px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; }
button { font-family: inherit; }

.app-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); display: inline-block; }
.icon-btn { border: none; background: transparent; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--line); }

.view { flex: 1; padding: 18px; padding-bottom: 90px; }
.hidden { display: none !important; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card-title { font-weight: 700; font-size: 15px; margin: 0 0 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 15px; cursor: pointer; width: 100%; transition: transform .06s ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid #f4c6c6; }
.btn-ghost { background: transparent; color: var(--brand-dark); }
.btn-sm { padding: 9px 12px; font-size: 13px; width: auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 15px; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.otp-input { letter-spacing: 10px; font-size: 24px; text-align: center; font-weight: 700; }

.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 5; }
.tab { flex: 1; text-align: center; padding: 10px 4px 8px; background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.tab .tab-icon { display: block; font-size: 19px; margin-bottom: 2px; }
.tab.active { color: var(--brand-dark); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0 8px 8px 0; }
.chip.selected { background: var(--brand); border-color: var(--brand); color: #fff; }

.category-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 8px; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 13px; text-align: center; }
.category-tile:hover { border-color: var(--brand); }
.category-tile .emoji { font-size: 26px; }

.status-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.status-searching { background: #fff3e0; color: var(--warn); }
.status-active { background: #e8f6ef; color: var(--ok); }
.status-done { background: #eef0f3; color: var(--ink-soft); }
.status-cancelled { background: #fdeaea; color: var(--danger); }

.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.muted { color: var(--ink-soft); font-size: 13px; }
.big-price { font-size: 22px; font-weight: 800; }

.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.map-box { width: 100%; height: 230px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; background: #eef0f3; }
.map-box .leaflet-container { width: 100%; height: 100%; }

.stars { color: #f5a623; font-size: 20px; letter-spacing: 2px; cursor: pointer; }
.star-static { color: #f5a623; }

.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 50; max-width: 90%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.link-btn { background: none; border: none; color: var(--brand-dark); font-weight: 700; cursor: pointer; padding: 0; font-size: 14px; }

.search-pulse { width: 84px; height: 84px; border-radius: 50%; background: var(--brand-tint); display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 30px auto 18px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,106,61,.35);} 70% { box-shadow: 0 0 0 22px rgba(255,106,61,0);} 100% { box-shadow: 0 0 0 0 rgba(255,106,61,0);} }

.offer-banner { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--ink); color: #fff; padding: 16px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.offer-banner .timer-bar { height: 4px; background: var(--brand); border-radius: 3px; margin-top: 10px; transition: width .3s linear; }

.pending-badge { background: #fff3e0; color: var(--warn); padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; text-align: center; }
.online-toggle { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.switch { position: relative; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 999px; transition: .2s; }
.slider:before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s; }
input:checked + .slider { background: var(--ok); }
input:checked + .slider:before { transform: translateX(22px); }

.error-text { color: var(--danger); font-size: 13px; margin-top: -6px; margin-bottom: 10px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
