:root {
  color-scheme: light;
  font: 15px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14213a;
  background: #f4f7fb;
  --blue: #246bfd;
  --blue-soft: #eaf1ff;
  --muted: #71809a;
  --line: #e3e9f2;
  --shadow: 0 12px 34px rgba(29, 54, 98, .07);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: white; background: linear-gradient(135deg,#1f75ff,#7047eb); box-shadow: 0 7px 16px #246bfd38; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.status { color: var(--muted); font-size: 13px; }
.status.online::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #19b56b; box-shadow: 0 0 0 4px #19b56b1c; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
.intro, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.intro { margin-bottom: 24px; }
.intro > p { max-width: 430px; margin: 0 0 6px; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(31px,4vw,46px); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 25px; letter-spacing: -.035em; }
h3 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.eyebrow { margin-bottom: 7px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card { background: white; border: 1px solid rgba(219,227,239,.9); border-radius: 20px; box-shadow: var(--shadow); }
.route-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(225px,1fr)); gap: 12px; margin-bottom: 34px; }
.route-card { padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: left; transition: .18s ease; }
.route-card:hover, .route-card.active { transform: translateY(-2px); border-color: #9ab9ff; box-shadow: var(--shadow); }
.route-card.active { background: linear-gradient(145deg,#fff,#f1f6ff); }
.route-code { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: 19px; font-weight: 780; }
.route-code i { height: 1px; flex: 1; background: linear-gradient(90deg,var(--blue),#a9c4ff); position: relative; }
.route-code i::after { content: ""; position: absolute; right: 0; top: -3px; border-left: 6px solid #a9c4ff; border-block: 3px solid transparent; }
.route-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.route-meta strong { color: #30415e; font-size: 13px; }
.empty { min-height: 230px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty h2 { color: #263752; margin: 13px 0 7px; }
.empty p { margin: 0; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; color: var(--blue); background: var(--blue-soft); border-radius: 15px; font-size: 24px; }
.hidden { display: none !important; }
.dashboard > .section-head { margin: 45px 0 18px; }
.segmented { display: flex; padding: 4px; background: #e9eef6; border-radius: 12px; }
.segmented button { padding: 7px 15px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.segmented button.active { color: #23334d; background: #fff; box-shadow: 0 2px 7px #53657e1c; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(260px,.8fr); gap: 16px; }
.dashboard-grid > * { min-width: 0; }
.calendar-card, .summary-card, .chart-card { padding: 22px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.icon-button, .ghost { border: 1px solid var(--line); background: #fff; color: #445571; border-radius: 10px; }
.icon-button { width: 34px; height: 34px; }
.ghost { padding: 7px 12px; }
.weekdays, .calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.weekdays { color: #9aa6b8; text-align: center; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.calendar { margin-top: 7px; }
.day { min-width: 0; min-height: 58px; padding: 7px; overflow: hidden; border: 1px solid transparent; border-radius: 11px; background: rgba(36,107,253,var(--heat,0)); color: #263752; text-align: left; position: relative; }
.day:hover { border-color: #8fb3ff; }
.day.blank { pointer-events: none; background: transparent; }
.day.selected { outline: 2px solid var(--blue); outline-offset: 1px; }
.day strong { font-size: 12px; }
.day small { display: block; margin-top: 10px; overflow: hidden; color: #4f607d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.day.hot { color: white; }
.day.hot small { color: #eaf1ff; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 13px; color: #929eb0; font-size: 10px; }
.heat-legend i { width: 15px; height: 7px; border-radius: 2px; background: rgba(36,107,253,var(--heat)); }
.heat-legend i:nth-of-type(1) { --heat:.12 }.heat-legend i:nth-of-type(2) { --heat:.3 }.heat-legend i:nth-of-type(3) { --heat:.55 }.heat-legend i:nth-of-type(4) { --heat:.85 }
.summary-card { display: flex; min-height: 100%; flex-direction: column; }
.summary-card > h3 { margin-bottom: 22px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.metrics div { padding: 16px; background: #f6f8fc; border-radius: 14px; }
.metrics span { display: block; color: var(--muted); font-size: 11px; }
.metrics strong { display: block; margin-top: 7px; font-size: 21px; letter-spacing: -.04em; }
.chart-card { margin-top: 16px; }
.section-head.compact { align-items: center; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: var(--blue); }
.legend .avg::before { background: #9a7bf7; }
.chart { min-height: 260px; margin: 22px 0 8px; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.chart svg { width: 100%; height: 260px; overflow: visible; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 9px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--muted); font-weight: 700; }
th:first-child, td:first-child { text-align: left; }
.bots-section { margin-top: 46px; }
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 12px; margin-top: 17px; }
.bot-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.bot-id { display: flex; align-items: center; gap: 8px; font-weight: 750; }
.bot-id::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #20b46b; }
.bot-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 16px; }
.bot-stats span { color: var(--muted); font-size: 9px; }
.bot-stats strong { display: block; color: #263752; font-size: 16px; }
dialog { width: min(430px,calc(100% - 32px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 90px #1f2d4960; }
dialog::backdrop { background: #17233b88; backdrop-filter: blur(5px); }
dialog form { padding: 28px; position: relative; }
dialog p:not(.eyebrow,.error) { color: var(--muted); }
dialog label { display: grid; gap: 6px; margin: 20px 0; color: #40506b; font-size: 12px; font-weight: 700; }
dialog input { width: 100%; padding: 11px 13px; border: 1px solid #ccd6e5; border-radius: 11px; outline: 0; }
dialog input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #246bfd18; }
dialog button:not(.dialog-close) { width: 100%; padding: 11px; border: 0; border-radius: 11px; color: white; background: var(--blue); font-weight: 750; }
.dialog-close { position: absolute; right: 17px; top: 14px; border: 0; background: transparent; color: #8491a5; font-size: 23px; }
.error { min-height: 18px; margin: 12px 0 0; color: #d44646; font-size: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 360px; padding: 12px 16px; border-radius: 11px; color: white; background: #243451; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) {
  main { width: min(100% - 24px,1180px); padding-top: 34px; }
  .intro { display: block; }.intro > p { margin-top: 13px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .section-head { align-items: center; }
  .day { min-height: 48px; padding: 5px; }.day small { margin-top: 6px; }
  .status { display: none; }
}
