:root {
  --brand: #15803d; --brand-2: #16a34a; --brand-dark: #14532d; --brand-soft: #dcfce7; --brand-tint: #f0fdf4;
  --ink: #0f172a; --text: #1e293b; --muted: #64748b; --faint: #94a3b8; --line: #e2e8f0; --line-2: #cbd5e1;
  --bg: #f1f5f9; --card: #ffffff; --danger: #dc2626; --danger-soft: #fee2e2; --warn: #b45309; --warn-soft: #fef3c7;
  --blue: #2563eb; --blue-soft: #dbeafe; --purple: #7c3aed; --purple-soft: #ede9fe; --amber: #d97706; --amber-soft: #fef3c7;
  --radius: 12px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06); --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
  --top: 60px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
p { margin: 0 0 10px; }
.ic { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 1000; height: var(--top); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-2), var(--brand-dark)); color: #fff; display: grid; place-items: center; }
.brand small { font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 20px; font-size: 11px; letter-spacing: .03em; }
.nav { display: flex; gap: 2px; margin-left: 8px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--brand); border-bottom-color: var(--brand); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.badge-test { background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 11px; letter-spacing: .04em; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.badge-live { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 11px; letter-spacing: .04em; padding: 4px 10px; border-radius: 20px; }
.usermenu { position: relative; }
.usermenu > button { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 8px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.usermenu > button:hover { background: var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.usermenu .n { font-weight: 600; font-size: 14px; line-height: 1.15; } .usermenu .a { font-size: 12px; color: var(--muted); }
.usermenu .drop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; display: none; }
.usermenu.open .drop { display: block; }
.drop a, .drop button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.drop a:hover, .drop button:hover { background: var(--bg); text-decoration: none; }

@media (max-width: 760px) {
  :root { --top: 100px; }
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px 0; gap: 8px; }
  .brand small, .usermenu .who-text, .usermenu > button > .ic { display: none; }
  .nav { order: 3; width: 100%; margin: 0; height: 42px; }
  .nav a { padding: 0 10px; }
  .badge-test { font-size: 10px; padding: 3px 8px; }
  .page { padding: 16px 12px 50px; }
  .board { grid-template-columns: repeat(5, 78vw); }
  .toolbar input[type=search] { width: 100%; }
}

/* ---- generic page ---- */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.page.wide { max-width: 1500px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card .card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.card .card-body { padding: 18px; }
.stack > * + * { margin-top: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 800px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

.flash { margin: 14px auto 0; max-width: 1140px; padding: 12px 16px; border-radius: 10px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.flash-wrap { padding: 0 20px; }
.flash.ok { background: var(--brand-soft); color: var(--brand-dark); } .flash.err { background: var(--danger-soft); color: #991b1b; }
.note { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; }
.note.warn { background: var(--warn-soft); color: #78350f; } .note.err { background: var(--danger-soft); color: #991b1b; } .note.info { background: var(--blue-soft); color: #1e3a8a; } .note.ok { background: var(--brand-soft); color: var(--brand-dark); }
.note b { font-weight: 600; }

/* ---- forms ---- */
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 42px; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 4px 0; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; min-height: 40px; }
.btn:hover { background: var(--bg); text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; } .btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--bg); color: var(--ink); }
.btn.sm { padding: 6px 10px; font-size: 13px; min-height: 32px; border-radius: 8px; }
.btn.big { padding: 13px 18px; font-size: 15.5px; width: 100%; border-radius: 12px; min-height: 50px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spin.dark { border-color: var(--line-2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- tables ---- */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--brand-tint); }
table.t tr.off td { color: var(--faint); }
.table-wrap { overflow-x: auto; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.s-booked { background: var(--blue-soft); color: #1d4ed8; } .s-dispatched { background: var(--purple-soft); color: #6d28d9; } .s-arrived { background: var(--amber-soft); color: #b45309; }
.s-pob { background: #cffafe; color: #0e7490; } .s-completed { background: var(--brand-soft); color: var(--brand-dark); } .s-cancelled, .s-nofare { background: var(--danger-soft); color: #b91c1c; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--bg); color: var(--muted); }
.tag.test { background: var(--warn-soft); color: var(--warn); } .tag.on { background: var(--brand-soft); color: var(--brand-dark); } .tag.off { background: var(--danger-soft); color: #b91c1c; }

/* ---- sign-in pages ---- */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: linear-gradient(150deg, #166534 0%, #14532d 55%, #052e16 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -140px; bottom: -140px; width: 460px; height: 460px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); }
.auth-art::before { content: ""; position: absolute; left: -90px; top: 38%; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .05); }
.auth-art h1 { color: #fff; font-size: 38px; line-height: 1.12; max-width: 460px; letter-spacing: -.01em; }
.auth-art p { color: #bbf7d0; font-size: 16px; max-width: 420px; margin-top: 16px; }
.auth-art .brand { color: #fff; font-size: 18px; } .auth-art .brand .mark { background: rgba(255, 255, 255, .14); }
.auth-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-art li { display: flex; gap: 12px; align-items: center; color: #dcfce7; font-size: 15px; }
.auth-art li span { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; flex: none; }
.auth-form { display: grid; place-items: center; padding: 32px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 24px; margin-bottom: 6px; } .auth-box .lead { color: var(--muted); margin-bottom: 22px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---- booking page ---- */
.book { display: grid; grid-template-columns: 440px 1fr; height: calc(100vh - var(--top)); }
.book-panel { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.book-inner { padding: 18px 20px 8px; flex: 1; }
.book-foot { position: sticky; bottom: 0; background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0)); padding: 14px 20px 18px; }
.book-map { position: relative; background: #e5e7eb; } #map { position: absolute; inset: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 11px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; gap: 7px; align-items: center; justify-content: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
.sec { margin-top: 18px; } .sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 8px; display: flex; align-items: center; }
.sec-title .lnk { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--brand); background: none; border: 0; cursor: pointer; padding: 0; display: inline-flex; gap: 5px; align-items: center; }
.route { position: relative; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.stop { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; }
.stop + .stop { border-top: 1px solid var(--line); }
.stop .dot { width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--brand-2); background: #fff; flex: none; z-index: 1; }
.stop.via .dot { border-color: var(--faint); width: 9px; height: 9px; } .stop.dest .dot { border-radius: 3px; border-color: var(--ink); }
.stop:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 50%; height: 100%; border-left: 2px dotted var(--line-2); }
.stop input { border: 0; box-shadow: none !important; padding: 13px 0; min-height: 48px; background: transparent; }
.stop .x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; } .stop .x:hover { color: var(--danger); background: var(--danger-soft); }
.stop.set input { font-weight: 600; }
.suggest { position: absolute; left: -1px; right: -1px; top: 100%; z-index: 600; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); margin-top: 4px; max-height: 300px; overflow-y: auto; padding: 5px; }
.suggest .hd { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 7px 10px 4px; }
.suggest button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; }
.suggest button:hover, .suggest button.hl { background: var(--brand-tint); } .suggest button .ic { color: var(--faint); margin-top: 2px; }
.suggest .msg { padding: 12px 10px; color: var(--muted); font-size: 13.5px; }
.route-tools { display: flex; justify-content: space-between; margin-top: 8px; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 2px 0; display: inline-flex; gap: 6px; align-items: center; }
.linkbtn:hover { text-decoration: underline; } .linkbtn.grey { color: var(--muted); }
.when-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 10px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; height: 44px; padding: 0 4px; }
.stepper .lab { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; padding-left: 8px; flex: 1; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--bg); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--line); } .stepper b { min-width: 28px; text-align: center; font-size: 15px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: #fff; padding: 8px 13px; border-radius: 20px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: var(--brand-2); } .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.quote { border-radius: 12px; background: var(--brand-tint); border: 1px solid #bbf7d0; padding: 12px 14px; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.quote .price { font-size: 24px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.01em; }
.quote .meta { color: var(--muted); font-size: 13px; line-height: 1.35; } .quote .meta b { color: var(--ink); }
.quote.wait { background: var(--bg); border-color: var(--line); color: var(--muted); font-size: 13.5px; }
.done-box { text-align: center; padding: 40px 26px; }
.done-box .tick { width: 68px; height: 68px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 16px; }
.done-box .ref { font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.summary { border: 1px solid var(--line); border-radius: 12px; text-align: left; margin: 0 0 18px; }
.summary .r { display: flex; gap: 12px; padding: 10px 14px; font-size: 14px; } .summary .r + .r { border-top: 1px solid var(--line); }
.summary .r .k { color: var(--muted); width: 96px; flex: none; } .summary .r .v { font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.map-chip { position: absolute; z-index: 500; left: 14px; top: 14px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.mk { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-2); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .35); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; }
.mk.dest { background: var(--ink); border-radius: 8px; } .mk.via { background: #64748b; width: 22px; height: 22px; }
.mk.car { background: #fff; color: var(--ink); width: 34px; height: 34px; border: 2px solid var(--ink); }
@media (max-width: 900px) { .book { grid-template-columns: 1fr; height: auto; } .book-map { height: 260px; order: -1; } .book-panel { border-right: 0; overflow: visible; } }

/* ---- activities ---- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .seg { background: #fff; border: 1px solid var(--line); } .toolbar .seg button { padding: 7px 14px; font-size: 14px; } .toolbar .seg button.on { background: var(--brand); color: #fff; box-shadow: none; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search] { width: 240px; min-height: 40px; padding-left: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E") no-repeat 12px center; }
.toolbar input[type=date], .toolbar select { width: auto; min-height: 40px; }
.live-dot { display: inline-flex; gap: 7px; align-items: center; font-size: 12.5px; color: var(--muted); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.col { background: #e8edf3; border-radius: 14px; padding: 10px; min-height: 180px; min-width: 0; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; color: var(--ink); font-size: 14px; }
.col-head .n { margin-left: auto; background: #fff; color: var(--muted); border-radius: 20px; font-size: 12px; padding: 1px 9px; font-weight: 700; }
.col-head i { width: 9px; height: 9px; border-radius: 50%; }
.col .none { text-align: center; color: var(--faint); font-size: 13px; padding: 26px 8px; }
.bk { background: #fff; border-radius: 12px; padding: 12px 13px; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); cursor: pointer; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bk + .bk { margin-top: 9px; }
.bk:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.bk.flash-new { animation: flashcard 1.6s ease-out; }
@keyframes flashcard { 0% { background: var(--brand-soft); transform: scale(1.02); } 100% { background: #fff; transform: none; } }
.bk .top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.bk .time { font-weight: 800; color: var(--ink); font-size: 15px; } .bk .day { color: var(--muted); font-size: 12.5px; }
.bk .ref { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 600; }
.bk .who { font-weight: 600; color: var(--ink); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.bk .rt { margin-top: 7px; font-size: 13px; color: var(--text); display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.bk .rt div { display: flex; gap: 7px; align-items: baseline; min-width: 0; } .bk .rt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.bk .rt i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); flex: none; position: relative; top: -1px; } .bk .rt .d i { background: var(--ink); border-radius: 2px; }
.bk .drv { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.bk .drv b { color: var(--ink); }
.bk .acct { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; }

.drawer-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 1500; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; background: #fff; z-index: 1600; transform: translateX(102%); transition: transform .24s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer-open .drawer { transform: none; } .drawer-open .drawer-back { opacity: 1; pointer-events: auto; }
.drawer-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.drawer-head h2 { font-size: 18px; } .drawer-head .x { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-foot .btn { flex: 1; }
#dmap { height: 210px; border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #e5e7eb; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 4px 0 18px; }
.step { text-align: center; position: relative; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.step i { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: grid; place-items: center; margin: 0 auto 6px; position: relative; z-index: 1; color: #fff; }
.step::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.step:first-child::before { display: none; }
.step.done { color: var(--brand-dark); } .step.done i { background: var(--brand-2); border-color: var(--brand-2); } .step.done::before { background: var(--brand-2); }
.step.now i { box-shadow: 0 0 0 4px rgba(22, 163, 74, .2); } .step small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.drv-card { display: flex; gap: 12px; align-items: center; background: var(--brand-tint); border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.drv-card .av { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--brand); flex: none; }
.drv-card .reg { margin-left: auto; background: #fde047; color: #111; font-weight: 800; letter-spacing: .04em; padding: 4px 9px; border-radius: 6px; font-size: 13px; border: 1px solid #ca8a04; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 9px 12px; font-size: 14px; margin-bottom: 18px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.log { list-style: none; margin: 0; padding: 0; } .log li { position: relative; padding: 0 0 13px 20px; font-size: 13.5px; }
.log li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.log li::after { content: ""; position: absolute; left: 6.5px; top: 15px; bottom: 0; border-left: 1px solid var(--line); } .log li:last-child::after { display: none; }
.log time { display: block; color: var(--muted); font-size: 12px; }

/* ---- dialog + toast ---- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 2000; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; padding: 22px; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-bottom: 8px; font-size: 19px; } .modal .body { color: var(--text); font-size: 14.5px; margin-bottom: 18px; }
.modal .btns { display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3000; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: center; animation: rise .2s ease-out; }
.toast.err { background: #b91c1c; } .toast.ok { background: var(--brand-dark); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ---- admin bits ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .v { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; } .stat .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.mode-banner { border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.mode-banner.test { background: var(--warn-soft); color: #78350f; } .mode-banner.live { background: var(--brand-soft); color: var(--brand-dark); }
.mode-banner b { display: block; font-size: 15px; } .mode-banner .btn { margin-left: auto; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { cursor: pointer; } .days input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: grid; place-items: center; min-width: 46px; height: 38px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); background: #fff; }
.days input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; } .days input:focus-visible + span { box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); }
.rule { display: flex; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .rule:last-child { border-bottom: 0; }
.rule .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; flex: none; }
.rule.off .ico { background: var(--bg); color: var(--faint); } .rule.off .name { color: var(--muted); }
.rule .name { font-weight: 700; color: var(--ink); } .rule .desc { color: var(--muted); font-size: 13.5px; } .rule .acts { margin-left: auto; display: flex; gap: 6px; }
.rule form { display: inline; }
details.edit { width: 100%; } details.edit summary { list-style: none; cursor: pointer; display: none; } details.edit[open] { padding-top: 12px; border-top: 1px dashed var(--line); margin-top: 6px; }
.picker { position: relative; } .picker .suggest button small { color: var(--muted); display: block; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; } .tabs a.on { color: var(--brand); border-color: var(--brand); } .tabs a:hover { text-decoration: none; color: var(--ink); }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; } .inline-form .field { margin: 0; flex: 1; min-width: 150px; }
code.k { background: var(--bg); padding: 2px 7px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.leaflet-container { font: inherit; }
