:root {
  /* Go Safe brand: golden yellow + charcoal, from the Go Safe logo */
  --gold: #F5BF19; --gold-d: #D9A400; --gold-l: #FFF5D6; --charcoal: #5E5E5E;
  --blue: #1B2130; --blue-d: #11151F; --blue-l: #FFF5D6;   /* "blue" = brand dark (kept name for existing styles) */
  --green: #12a150; --amber: #b7791f; --red: #c62828;
  --ink: #1B2130; --muted: #5d6573; --line: #e3e5ea; --bg: #f6f6f4; --card: #fff; --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--blue); text-decoration-color: var(--gold); text-underline-offset: 3px; }
h1 { font-size: 1.4rem; margin: .2rem 0 .8rem; } h2 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; } h3 { font-size: 1rem; margin: 0 0 .3rem; }
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top)); background: var(--blue); color: #fff; border-bottom: 3px solid var(--gold); }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: .2px; }
.brand img { border-radius: 50%; } .brand span { color: var(--gold); }
#topnav { display: flex; gap: .3rem; align-items: center; }
#topnav a, #topnav button { color: #fff; text-decoration: none; background: rgba(255,255,255,.12); border: 0; border-radius: 999px; padding: .35rem .7rem; font: inherit; font-size: .9rem; cursor: pointer; position: relative; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 999px; font-size: .7rem; min-width: 18px; padding: 0 4px; text-align: center; }
main { max-width: 720px; margin: 0 auto; padding: 1rem; }
.loading { text-align: center; color: var(--muted); padding: 3rem 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: .8rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.tile { display: flex; flex-direction: column; gap: .3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; text-decoration: none; color: var(--ink); min-height: 120px; }
.tile .ico { font-size: 1.6rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-l); border: 2px solid var(--gold); } .tile b { font-size: 1.05rem; } .tile span { color: var(--muted); font-size: .85rem; }
.tile:active { transform: scale(.98); } .tile:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(27,33,48,.08); }
.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 85% 15%, #2c3446 0, var(--blue) 45%, var(--blue-d) 100%); color: #fff; border-radius: 18px; padding: 1.6rem 1.4rem; margin-bottom: 1rem; }
.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 18px; height: 0; border-top: 3px dashed rgba(255,255,255,.18); }
.hero .logo { width: 84px; height: 84px; border-radius: 50%; display: block; margin-bottom: .8rem; box-shadow: 0 0 0 4px rgba(245,191,25,.25); }
.hero h1 { color: #fff; font-size: 1.75rem; margin: 0 0 .2rem; } .hero h1 b { color: var(--gold); }
.hero p { opacity: .9; margin: .3rem 0 1.1rem; } .hero .tag { color: var(--gold); font-weight: 700; font-size: .9rem; letter-spacing: .3px; text-transform: uppercase; margin: 0; opacity: 1; }
.hero .btn.ghost { background: rgba(255,255,255,.12); color: #fff; } .hero .btns { position: relative; z-index: 1; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold-d); }
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: .6rem; align-items: center; } .row > * { flex: 1; } .row > .shrink { flex: 0 0 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: .75rem 1rem; cursor: pointer; text-decoration: none; background: var(--gold); color: var(--blue); }
.btn:hover { background: var(--gold-d); }
.btn.block { width: 100%; margin-top: 1rem; } .btn.sm { padding: .45rem .7rem; font-size: .88rem; }
.btn.ghost { background: #eceef2; color: var(--blue); } .btn.ghost:hover { background: #e0e3e9; } .btn.green { background: var(--green); color: #fff; } .btn.red { background: var(--red); color: #fff; } .btn.white { background: #fff; color: var(--blue); } .btn.dark { background: var(--blue); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .err { color: var(--red); font-weight: 600; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--gold-l); color: #7a5b00; text-transform: capitalize; }
.pill.green, .pill.approved, .pill.completed, .pill.collected, .pill.boarded { background: #e3f6ea; color: var(--green); }
.pill.amber, .pill.pending, .pill.open, .pill.reported, .pill.scheduled, .pill.boarding { background: #fff3dc; color: var(--amber); }
.pill.red, .pill.rejected, .pill.suspended, .pill.cancelled, .pill.no_show { background: #fde7e7; color: var(--red); }
.list .item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list .item:last-child { border-bottom: 0; } .list .item .grow { flex: 1; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--blue-l); flex: 0 0 auto; }
.thumbs { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.thumbs img, .thumbs a img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-in { border: 2px dashed var(--line); border-radius: 10px; padding: .7rem; display: flex; gap: .7rem; align-items: center; cursor: pointer; background: #fff; }
.photo-in img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.photo-in.done { border-color: var(--green); border-style: solid; }
.map { height: 260px; border-radius: var(--r); border: 1px solid var(--line); margin: .6rem 0; z-index: 0; }
.chat { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: .4rem; padding: .3rem 0; }
.msg { max-width: 80%; padding: .5rem .7rem; border-radius: 12px; background: var(--blue-l); }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; }
.msg { background: #f0f1f4; }
.msg small { display: block; opacity: .7; font-size: .72rem; }
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: .8rem; }
.tabs a { white-space: nowrap; text-decoration: none; padding: .45rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.tabs a.on { background: var(--blue); color: var(--gold); border-color: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; }
.stat { border-top: 3px solid var(--gold); } .stat b { display: block; font-size: 1.5rem; } .stat span { color: var(--muted); font-size: .85rem; }
.switch { display: flex; align-items: center; gap: .6rem; font-weight: 600; margin: .8rem 0; cursor: pointer; }
.switch input { width: 22px; height: 22px; }
.notice { background: #fff3dc; border: 1px solid #f3d6a0; border-radius: var(--r); padding: .8rem 1rem; margin-bottom: .8rem; }
.notice.info { background: #f0f2f6; border-color: #dde1e8; }
.price { font-size: 1.3rem; font-weight: 800; }
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(150%); background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; transition: transform .25s; z-index: 3000; max-width: 92vw; }
#toast.show { transform: translateX(-50%) translateY(0); } #toast.bad { background: var(--red); }
.modal { position: fixed; inset: 0; background: rgba(10,20,40,.5); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 1.2rem; max-height: 90vh; overflow-y: auto; }
@media (min-width: 600px) { .modal { align-items: center; } .modal-card { border-radius: 18px; } .tiles { grid-template-columns: repeat(4, 1fr); } }
table { width: 100%; border-collapse: collapse; font-size: .88rem; } td, th { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 0 2rem; }
