:root {
  --ink: #10224a;
  --muted: #687797;
  --paper: #f3f7ff;
  --surface: #ffffff;
  --line: #dce5f5;
  --green: #0e4fcd;
  --lime: #a9ecff;
  --orange: #e36f3d;
  --shadow: 0 20px 50px rgb(24 32 29 / 10%);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Manrope, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--green); border-radius: 50% 50% 50% 8px; font: 700 22px Manrope, sans-serif; transform: rotate(-8deg); }
.brand-mark::first-letter { transform: rotate(8deg); }
.brand-name { color: var(--green); font-size: 22px; font-weight: 700; letter-spacing: -.06em; }
.brand-area { margin-left: 4px; padding-left: 14px; color: var(--muted); border-left: 1px solid var(--line); font: 500 9px DM Mono, monospace; letter-spacing: .08em; }
.provider-state { color: var(--muted); font: 500 11px DM Mono, monospace; text-transform: uppercase; }
main { max-width: 1500px; margin: auto; padding: 0 4vw 60px; }
.hero { display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; min-height: 310px; padding: 55px 0 42px; }
.eyebrow { margin: 0 0 13px; color: var(--green); font: 500 10px DM Mono, monospace; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(46px, 6vw, 88px); line-height: .94; letter-spacing: -.065em; }
h1 em { color: var(--green); font-family: Georgia, serif; font-weight: 400; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.hero-actions { justify-self: end; width: min(100%, 460px); }
.hero-actions label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.action-row { display: flex; gap: 8px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 12px 13px; color: var(--ink); background: var(--surface); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgb(23 94 69 / 10%); }
.primary, .outline { border: 1px solid var(--green); border-radius: 4px; padding: 12px 17px; font-weight: 700; white-space: nowrap; }
.primary { color: white; background: var(--green); }
.primary:hover { background: #0f4934; }
.outline { color: var(--green); background: transparent; }
.outline:hover { background: rgb(23 94 69 / 6%); }
.feedback { min-height: 18px; margin: 8px 0 0; color: var(--green); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-left: 0; border-right: 0; }
.stats div { display: flex; align-items: baseline; gap: 13px; padding: 22px 0; border-right: 1px solid var(--line); }
.stats div:not(:first-child) { padding-left: 25px; }
.stats div:last-child { border: 0; }
.stats span { font-size: 27px; font-weight: 600; }
.stats small { color: var(--muted); font: 500 9px DM Mono, monospace; letter-spacing: .09em; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .8fr); gap: 50px; padding-top: 48px; }
.section-heading, .aside-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.installation-list { display: grid; gap: 12px; margin-top: 25px; }
.empty { padding: 50px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.job { display: grid; grid-template-columns: 76px minmax(0, 1.4fr) minmax(180px, .8fr) auto; align-items: center; gap: 20px; padding: 21px; background: var(--surface); border: 1px solid transparent; border-left: 4px solid var(--green); box-shadow: 0 4px 18px rgb(24 32 29 / 4%); }
.job:hover { border-color: var(--line); border-left-color: var(--green); }
.job-time strong { display: block; font: 500 18px DM Mono, monospace; }
.job-time span, .job-detail p, .route p { color: var(--muted); font-size: 11px; }
.job-detail h3 { margin: 0 0 4px; font-size: 15px; }
.job-detail p, .route p { margin: 0; }
.route strong { display: block; color: var(--green); font-size: 13px; }
.job-actions { display: flex; gap: 6px; }
.mini { padding: 7px 9px; color: var(--green); background: transparent; border: 1px solid var(--line); border-radius: 3px; font: 500 10px DM Mono, monospace; }
.mini:hover { border-color: var(--green); }
.status { display: inline-block; margin-top: 7px; padding: 3px 7px; border-radius: 20px; background: #e8ece8; font: 500 9px DM Mono, monospace; text-transform: uppercase; }
.status.delayed { color: #8a321c; background: #ffe1d5; }
.status.on_time, .status.early { color: var(--green); background: #dcf1df; }
.icon-button, .close { border: 0; color: var(--green); background: transparent; font-size: 27px; }
.crew-list { display: grid; gap: 1px; margin: 25px 0 42px; background: var(--line); border: 1px solid var(--line); }
.crew { display: flex; align-items: center; gap: 12px; padding: 15px; background: var(--surface); }
.avatar { display: grid; place-items: center; flex: 0 0 37px; height: 37px; color: var(--lime); background: var(--green); border-radius: 50%; font-size: 12px; font-weight: 700; }
.crew strong { display: block; font-size: 13px; }
.crew small { color: var(--muted); font: 400 9px DM Mono, monospace; }
.message-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 11px; border-bottom: 1px solid var(--ink); }
.message-heading .eyebrow { margin: 0; }
.live-dot { color: var(--green); font: 500 9px DM Mono, monospace; }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: var(--lime); border: 1px solid var(--green); border-radius: 50%; }
.message { position: relative; padding: 14px 0 14px 18px; border-bottom: 1px solid var(--line); }
.message::before { content: ""; position: absolute; top: 19px; left: 1px; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.message strong { display: block; font: 500 9px DM Mono, monospace; text-transform: uppercase; }
.message p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.45; white-space: pre-line; }
.message time { color: #8d938f; font: 400 8px DM Mono, monospace; }
dialog { width: min(580px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(16 27 22 / 60%); backdrop-filter: blur(3px); }
dialog form { display: grid; gap: 17px; padding: 28px; }
dialog label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toast { position: fixed; right: 25px; bottom: 25px; max-width: 350px; padding: 13px 18px; color: white; background: var(--ink); border-radius: 4px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 35px; }
  .hero-actions { justify-self: start; }
  .workspace { grid-template-columns: 1fr; }
  .job { grid-template-columns: 65px 1fr auto; }
  .route { grid-column: 2; }
  aside { border-top: 1px solid var(--line); padding-top: 35px; }
}
@media (max-width: 600px) {
  main { padding-inline: 18px; }
  header { padding-inline: 18px; }
  .provider-state { max-width: 160px; text-align: right; }
  .hero { min-height: auto; padding-top: 45px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div { padding-left: 12px !important; border-bottom: 1px solid var(--line); }
  .job { grid-template-columns: 1fr; gap: 10px; }
  .route { grid-column: auto; }
  .job-actions { flex-wrap: wrap; }
  .section-heading { align-items: end; }
  .form-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
}
