:root {
  --ink: #07101f;
  --ink-soft: #16243a;
  --red: #e30613;
  --red-dark: #c60510;
  --paper: #f4f7fa;
  --card: #fff;
  --line: #dfe5ec;
  --muted: #667085;
  --green: #24af68;
  --green-soft: #dff6e9;
  --amber: #f5a30b;
  --shadow: 0 14px 40px rgba(7,16,31,.07);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
.auth-pending .topbar, .auth-pending .workspace, .signed-out .topbar, .signed-out .workspace, .password-required .topbar, .password-required .workspace { display: none; }
.auth-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 75% 15%, rgba(227,6,19,.16), transparent 28%), linear-gradient(135deg, #07101f 0%, #111f34 55%, #07101f 100%); }
.authenticated .auth-screen { display: none; }
.login-card { width: min(450px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 22px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.38); }
.login-brand { display: flex; align-items: center; gap: 12px; padding: 20px 23px; background: var(--ink); color: #fff; }
.login-brand > span { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-size: 19px; }
.login-brand strong, .login-brand small { display: block; }.login-brand strong { font-size: 13px; letter-spacing: .15em; }.login-brand small { margin-top: 4px; color: #9eabbd; font-size: 10px; }
.login-copy { padding: 25px 25px 5px; }.login-copy > span { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .16em; }.login-copy h1 { margin: 7px 0; font-size: 25px; letter-spacing: -.035em; }.login-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.login-form { display: grid; gap: 13px; padding: 19px 25px 14px; }.login-form label { font-size: 11px; font-weight: 700; }.login-form input { width: 100%; height: 43px; margin-top: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; }.login-form input:focus { border-color: #7c8ba0; box-shadow: 0 0 0 3px rgba(61,79,105,.1); }.login-error { display: none; margin: 0; padding: 9px 10px; border-radius: 9px; background: #fff0f1; color: #b0040d; font-size: 10px; }.login-error.visible { display: block; }.login-help { display: block; padding: 0 25px 22px; color: var(--muted); font-size: 9px; text-align: center; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; inset: 0 0 auto; z-index: 30; color: #fff; background: rgba(7,16,31,.96); border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: 0 10px 30px rgba(7,16,31,.14); backdrop-filter: blur(18px); }
.topbar__inner { max-width: 1880px; height: 66px; margin: auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); font-size: 19px; }
.brand strong { display: block; font-size: 14px; letter-spacing: .16em; white-space: nowrap; }
.brand span { display: block; margin-top: 3px; color: #98a5b8; font-size: 11px; }
.topbar__actions, .profile, .profile-copy { display: flex; align-items: center; }
.topbar__actions { gap: 12px; }
.driver-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(57,214,133,.18); border-radius: 99px; background: rgba(57,214,133,.1); color: #aaf0c8; font-size: 11px; }
.driver-status i { width: 7px; height: 7px; border-radius: 50%; background: #39d685; box-shadow: 0 0 0 4px rgba(57,214,133,.1); }
.ghost-btn { min-height: 34px; border: 0; border-radius: 9px; padding: 0 10px; color: #d8e0ea; background: transparent; }
.ghost-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.profile { gap: 8px; border-left: 1px solid rgba(255,255,255,.12); padding-left: 12px; }
.profile > b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); font-size: 12px; }
.profile-copy { flex-direction: column; align-items: flex-start; font-size: 12px; }
.profile small { margin-top: 2px; color: #98a5b8; font-size: 10px; }
.logout-btn { font-size: 18px; }
.workspace { max-width: 1880px; margin: auto; padding: 18px; }
.week-card, .ride-panel, .timeline-card, .ride-detail { border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 4px 18px rgba(7,16,31,.035); }
.week-card { display: grid; grid-template-columns: 220px minmax(400px,1fr) 250px; align-items: center; gap: 14px; padding: 13px; margin-bottom: 15px; }
.week-heading span, .ride-panel__heading span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.week-heading strong { font-size: 13px; }
.week-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.day-button { position: relative; min-width: 0; height: 56px; border: 1px solid transparent; border-radius: 11px; background: #f1f4f7; color: var(--ink); transition: .16s ease; }
.day-button:hover { border-color: var(--line); background: #fff; }
.day-button.active { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 7px 18px rgba(7,16,31,.16); }
.day-button strong { display: block; font-size: 11px; letter-spacing: .08em; }
.day-button small { display: block; margin-top: 4px; color: #6d798a; font-size: 11px; }
.day-button.active small { color: #cbd4df; }
.day-button b { position: absolute; right: 6px; top: 5px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 9px; }
.week-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.primary-btn, .secondary-btn, .new-ride-btn { min-height: 40px; border-radius: 10px; border: 1px solid transparent; padding: 0 12px; font-weight: 650; }
.primary-btn { background: var(--ink); color: #fff; }
.primary-btn:hover { background: var(--ink-soft); }
.secondary-btn { background: #fff; color: var(--ink); border-color: var(--line); }
.secondary-btn:hover { background: #f5f7fa; }
.planner-grid { display: grid; grid-template-columns: 350px minmax(0,1fr); gap: 15px; }
.ride-panel { overflow: hidden; align-self: start; }
.ride-panel__tools { padding: 12px; border-bottom: 1px solid var(--line); }
.search { position: relative; display: block; margin-bottom: 10px; }
.search span { position: absolute; left: 12px; top: 8px; color: var(--muted); font-size: 22px; }
.search input, .form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); outline: 0; }
.search input { height: 42px; padding: 0 12px 0 38px; }
.search input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #7c8ba0; box-shadow: 0 0 0 3px rgba(61,79,105,.1); }
.new-ride-btn { width: 100%; background: var(--red); color: #fff; }
.new-ride-btn:hover { background: var(--red-dark); }
.new-ride-btn:disabled { cursor: wait; opacity: .68; }
.new-ride-btn span { margin-right: 6px; font-size: 20px; font-weight: 350; }
.ride-panel__heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; }
.ride-panel__heading strong { font-size: 14px; }
.ride-panel__heading > b { min-width: 25px; height: 23px; display: grid; place-items: center; border-radius: 99px; background: #edf1f5; font-size: 11px; }
.ride-list { max-height: 645px; padding: 0 8px 10px; overflow: auto; }
.ride-item { width: 100%; display: grid; grid-template-columns: 55px 4px minmax(0,1fr) 20px; align-items: center; gap: 10px; margin-bottom: 6px; padding: 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; }
.ride-item:hover { border-color: var(--line); background: #f7f9fb; }
.ride-item.active { border-color: var(--ink); background: #f5f7fa; box-shadow: 0 4px 12px rgba(7,16,31,.05); }
.ride-item__time { text-align: center; }
.ride-item__time strong { display: block; font-size: 15px; }
.ride-item__time small { color: var(--muted); font-size: 9px; }
.ride-item__bar { height: 43px; border-radius: 4px; background: var(--red); }
.ride-item__body { min-width: 0; }
.ride-item__body strong, .ride-item__body span, .ride-item__body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ride-item__body strong { font-size: 13px; }
.ride-item__body span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.ride-item__body small { margin-top: 5px; color: #59677a; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.ride-item__arrow { color: #9aa5b3; font-size: 21px; }
.empty-state { margin: 7px; padding: 34px 18px; border: 1px dashed var(--line); border-radius: 13px; text-align: center; }
.empty-state strong { display: block; font-size: 14px; }
.empty-state span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.planner-main { min-width: 0; display: flex; flex-direction: column; gap: 15px; }
.timeline-card { overflow: hidden; }
.section-heading { display: flex; justify-content: space-between; gap: 15px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.section-heading h1 { margin: 0; font-size: 16px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.live-badge { display: inline-block; margin-left: 6px; padding: 3px 7px; border-radius: 99px; background: var(--green-soft); color: #16834a; font-size: 9px; vertical-align: 2px; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend .free { background: var(--green); }.legend .ride { background: var(--red); }.legend .buffer { background: var(--amber); }
.timeline-scroll { padding: 21px 16px 13px; overflow-x: auto; }
.timeline { position: relative; min-width: 850px; }
.timeline__track { position: relative; height: 48px; overflow: hidden; border-radius: 11px; background: var(--green-soft); }
.timeline__track::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(2.5% - 1px), rgba(255,255,255,.82) calc(2.5% - 1px) 2.5%); }
.timeline-segment { position: absolute; top: 4px; height: 40px; border: 0; border-radius: 5px; box-shadow: 0 3px 8px rgba(7,16,31,.12); z-index: 2; }
.timeline-segment.ride { background: var(--red); }.timeline-segment.buffer { background: var(--amber); }
.timeline__labels { display: flex; justify-content: space-between; padding-top: 7px; color: var(--muted); font-size: 9px; }
.ride-detail { min-height: 410px; display: grid; grid-template-columns: minmax(385px,.84fr) minmax(430px,1.16fr); overflow: hidden; }
.ride-detail__info { padding: 22px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.order-badge { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: 10px; font-weight: 700; }
.detail-top h2 { margin: 8px 0 3px; font-size: 24px; letter-spacing: -.03em; }
.detail-top p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-actions { display: flex; align-items: center; gap: 7px; }
.edit-btn, .delete-btn { min-width: 36px; height: 36px; border: 0; border-radius: 9px; padding: 0 11px; font-size: 11px; font-weight: 700; }
.edit-btn { background: #edf1f5; color: var(--ink); }
.edit-btn:hover { background: #dfe5ec; }
.delete-btn { background: #fff0f1; color: var(--red); }
.delete-btn:hover { background: #ffe1e3; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat { padding: 12px; border-radius: 11px; background: #f1f4f7; }
.stat span, .route-title { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 6px; font-size: 13px; }
.route-block { margin-top: 17px; }
.route-points { display: grid; grid-template-columns: 14px 1fr; gap: 9px; margin-top: 11px; }
.route-dots { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.route-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }.route-dots i:last-child { background: var(--red); }.route-dots span { width: 1px; height: 35px; background: var(--line); }
.route-copy div + div { margin-top: 14px; }.route-copy strong { font-size: 12px; }.route-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.detail-note { margin-top: 15px; padding: 11px; border: 1px dashed var(--line); border-radius: 10px; font-size: 11px; }
.no-conflict { margin-top: 14px; color: #147e47; font-size: 10px; }
.map-panel { position: relative; min-height: 410px; border-left: 1px solid var(--line); background: #e8edf2; overflow: hidden; }
.route-map { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; background: #dfe7ec; filter: saturate(.88) contrast(.98); }
.route-map.loading { opacity: .45; background: linear-gradient(110deg, #dfe7ec 30%, #f2f5f7 48%, #dfe7ec 66%); background-size: 220% 100%; animation: map-loading 1.25s linear infinite; }
@keyframes map-loading { to { background-position-x: -220%; } }
.map-summary { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; justify-content: space-between; gap: 8px; }
.map-summary { z-index: 500; pointer-events: none; }
.map-summary > div, .map-open, .map-note { border: 1px solid rgba(255,255,255,.65); background: rgba(255,255,255,.95); box-shadow: var(--shadow); backdrop-filter: blur(9px); }
.map-summary > div { padding: 9px 11px; border-radius: 11px; }.map-summary strong { display: block; font-size: 12px; }.map-summary span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }.map-summary > b { align-self: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; }
.map-open { align-self: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; pointer-events: auto; }
.map-open:hover { background: var(--ink-soft); }
.map-note { position: absolute; z-index: 500; left: 14px; bottom: 14px; padding: 7px 9px; border-radius: 8px; color: #465468; font-size: 9px; pointer-events: none; }
.app-dialog { width: min(680px, calc(100% - 24px)); max-height: 92vh; padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(7,16,31,.3); overflow: hidden; }
.app-dialog::backdrop { background: rgba(7,16,31,.5); backdrop-filter: blur(3px); }
.app-dialog header { display: flex; justify-content: space-between; gap: 12px; padding: 17px 20px; background: var(--ink); color: #fff; }
.app-dialog header strong, .app-dialog header span { display: block; }.app-dialog header strong { font-size: 17px; }.app-dialog header span { margin-top: 5px; color: #b5c0ce; font-size: 11px; }
.dialog-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 20px; overflow: visible; }
.form-grid label { display: block; font-size: 11px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea { display: block; margin-top: 6px; min-height: 39px; padding: 8px 10px; font-size: 12px; font-weight: 400; resize: vertical; }
.form-wide { grid-column: 1 / -1; }.address-field { position: relative; }.address-suggestions { position: absolute; z-index: 8; left: 0; right: 0; top: 62px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.address-suggestions:empty { display: none; }.address-suggestions button { width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; font-size: 11px; }.address-suggestions button:hover { background: #f4f7fa; }.address-suggestions button:last-child { border-bottom: 0; }
.form-error { display: none; margin: 0; padding: 10px; border-radius: 10px; background: #fff0f1; color: #b0040d; font-size: 11px; }.form-error.visible { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }.form-error button { border: 0; border-radius: 8px; padding: 7px 10px; background: #b0040d; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }.form-error button:hover { background: #87030a; }
.app-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: #f7f9fb; }.app-dialog footer .new-ride-btn { width: auto; }
.logs-dialog { width: min(600px, calc(100% - 24px)); }.logs-content { max-height: 88vh; overflow: auto; }.logs-list { display: grid; gap: 8px; padding: 16px; }.log-item { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }.log-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #edf1f5; font-weight: 700; font-size: 11px; }.log-item__top { display: flex; justify-content: space-between; gap: 8px; }.log-item strong { font-size: 12px; }.log-item time, .log-item p { color: var(--muted); font-size: 9px; }.log-item p { margin: 5px 0 0; }
.single-column { grid-template-columns: 1fr; }.form-grid label small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 400; }
.password-dialog { width: min(480px, calc(100% - 24px)); }
.admin-dialog { width: min(980px, calc(100% - 24px)); }.admin-content { max-height: 92vh; overflow: auto; }.admin-create-form, .admin-users-section { padding: 18px 20px; }.admin-create-form { border-bottom: 1px solid var(--line); background: #f7f9fb; }.admin-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }.admin-section-title strong, .admin-section-title span { display: block; }.admin-section-title strong { font-size: 14px; }.admin-section-title span { margin-top: 3px; color: var(--muted); font-size: 10px; }.admin-section-title > b { min-width: 27px; height: 25px; display: grid; place-items: center; border-radius: 99px; background: #e8edf3; font-size: 10px; }.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }.admin-form-grid label { font-size: 10px; font-weight: 700; }.admin-form-grid input, .admin-form-grid select, .admin-reset input, .admin-user-role { width: 100%; height: 39px; margin-top: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: 0; }.admin-create-button { width: auto; margin-top: 11px; }.admin-user-list { display: grid; gap: 8px; }.admin-user { display: grid; grid-template-columns: minmax(180px,1fr) 180px minmax(260px,1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }.admin-user.inactive { opacity: .62; background: #f3f5f7; }.admin-user__identity strong, .admin-user__identity span { display: block; }.admin-user__identity strong { font-size: 12px; }.admin-user__identity span { margin-top: 3px; color: var(--muted); font-size: 9px; }.admin-user-role { margin: 0; }.admin-reset { display: grid; grid-template-columns: 1fr auto; gap: 6px; }.admin-reset input { height: 36px; margin: 0; }.admin-reset button, .admin-access-btn { height: 36px; border: 0; border-radius: 8px; padding: 0 10px; font-size: 9px; font-weight: 700; }.admin-reset button { background: var(--ink); color: #fff; }.admin-access-btn { background: #fff0f1; color: #b0040d; }.admin-access-btn.enable { background: var(--green-soft); color: #147e47; }.admin-user__badge { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 99px; background: #fff1cf; color: #8a5a00; font-size: 8px; }
.temporary-password-field { grid-column: 1 / -1; }.temporary-password-control { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 5px !important; }.admin-form-grid .temporary-password-control input { margin-top: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: .06em; }.temporary-password-control button { height: 39px; border: 0; border-radius: 9px; padding: 0 13px; background: var(--ink); color: #fff; font-size: 9px; font-weight: 700; cursor: pointer; }.temporary-password-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 400; }
.toast { position: fixed; z-index: 60; right: 18px; bottom: 18px; max-width: 360px; padding: 11px 14px; border-radius: 11px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }.toast.visible { opacity: 1; transform: none; }
@media (max-width: 1150px) { .week-card { grid-template-columns: 1fr; }.week-heading { display: none; }.week-nav { max-width: 280px; margin-left: auto; }.planner-grid { grid-template-columns: 320px minmax(0,1fr); }.ride-detail { grid-template-columns: 1fr; }.map-panel { min-height: 360px; border: 1px solid var(--line); border-width: 1px 0 0; } }
@media (max-width: 820px) { .driver-status, .profile-copy, .ghost-btn span { display: none; }.workspace { padding: 10px; }.planner-grid { grid-template-columns: 1fr; }.ride-list { max-height: 360px; }.section-heading { flex-direction: column; }.week-days { overflow-x: auto; }.day-button { min-width: 62px; }.ride-detail { min-height: 0; }.ride-detail__info { padding: 17px; }.map-panel { min-height: 330px; }.admin-user { grid-template-columns: 1fr 150px; }.admin-reset { grid-column: 1 / -1; } }
@media (max-width: 560px) { .topbar__inner { padding: 0 12px; }.brand span { display: none; }.week-card { padding: 9px; }.week-nav { max-width: none; margin: 0; }.week-nav button { font-size: 11px; }.section-heading h1 { font-size: 14px; }.detail-stats, .form-grid, .admin-form-grid { grid-template-columns: 1fr; }.form-wide { grid-column: auto; }.app-dialog footer { flex-direction: column-reverse; }.app-dialog footer button { width: 100% !important; }.map-summary { flex-direction: column; }.map-summary > b { width: fit-content; }.admin-user { grid-template-columns: 1fr; }.admin-reset { grid-column: auto; } }
