:root {
  color-scheme: light;
  --bg: #f3f7fc;
  --panel: #ffffff;
  --ink: #09133b;
  --muted: #52638c;
  --line: #dce5f1;
  --blue: #0867f6;
  --blue-dark: #053db9;
  --blue-soft: #e8f1ff;
  --shadow: 0 18px 45px rgba(8, 39, 94, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, #eef5ff 0, #f7fbff 310px, #f3f7fc 100%),
    var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
}

button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.authScreen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  background: var(--bg);
  padding: 24px;
}

body.authLocked .authScreen {
  display: grid;
}

body.authChecking .authScreen {
  display: none;
}

body.authLocked .homeShell {
  visibility: hidden;
}

.authCard {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}

.authCard h1,
.authCard p {
  margin: 0;
}

.authCard p,
.helperText {
  color: var(--muted);
}

.authCard label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.authCard input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.brandMark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #071032;
  color: #fff;
  font-weight: 900;
}

.homeShell {
  min-height: 100vh;
  padding-bottom: 38px;
}

.homeTopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  box-shadow: 0 10px 24px rgba(5, 61, 185, 0.22);
  padding: 12px clamp(18px, 4vw, 46px);
}

.homeBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 850;
}

.homeActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iconGhost,
.signOutButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.iconGhost {
  width: 42px;
  padding: 0;
}

.iconGhost svg,
.signOutButton svg,
.taskIcon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.signOutButton {
  min-width: 120px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 25px rgba(8, 39, 94, 0.16);
}

.userChip {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.heroPanel,
.homeGrid,
.tasksPanel {
  width: min(1620px, calc(100vw - 72px));
  margin-inline: auto;
}

.heroPanel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(470px, 0.82fr) minmax(560px, 1fr);
  align-items: stretch;
  min-height: 340px;
  overflow: hidden;
  border-bottom: 1px solid rgba(8, 103, 246, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 241, 255, 0.64));
}

.heroCopy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 44px 6px 50px;
}

.companyLogo {
  display: block;
  width: min(220px, 100%);
  max-height: 96px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}

.heroCopy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.heroCopy p {
  margin: 0;
  color: #2f4f98;
  font-size: clamp(18px, 1.6vw, 25px);
}

.heroMap {
  position: relative;
  min-height: 310px;
  opacity: 0.98;
}

.mapGrid {
  position: absolute;
  inset: -48px -60px -42px -20px;
  background:
    linear-gradient(18deg, transparent 0 45%, rgba(8, 103, 246, 0.16) 45% 46%, transparent 46% 100%),
    linear-gradient(160deg, transparent 0 52%, rgba(8, 103, 246, 0.13) 52% 53%, transparent 53% 100%),
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(8, 103, 246, 0.1) 45px, transparent 47px),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(8, 103, 246, 0.08) 59px, transparent 61px);
  transform: perspective(520px) rotateX(58deg) rotateZ(-10deg);
  transform-origin: 50% 70%;
}

.routeLine {
  position: absolute;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(8, 103, 246, 0.22);
}

.routeOne {
  left: 8%;
  top: 64%;
  width: 31%;
  transform: rotate(8deg);
}

.routeTwo {
  left: 36%;
  top: 55%;
  width: 20%;
  transform: rotate(-14deg);
}

.routeThree {
  left: 54%;
  top: 47%;
  width: 26%;
  transform: rotate(5deg);
}

.mapPin {
  position: absolute;
  left: 61%;
  top: 24%;
  width: 78px;
  height: 98px;
  border-radius: 52% 52% 52% 0;
  background: linear-gradient(180deg, #4b91ff, #045fec);
  box-shadow: 0 22px 30px rgba(8, 103, 246, 0.34);
  transform: rotate(-45deg);
}

.mapPin::after {
  content: "";
  position: absolute;
  inset: 21px;
  border-radius: 999px;
  background: #fff;
}

.mapHome {
  position: absolute;
  width: 38px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, #7fb0ff, #136ff7);
  box-shadow: 0 12px 22px rgba(8, 103, 246, 0.18);
}

.mapHome::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -14px;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 15px solid #2f7fff;
}

.homeA {
  left: 16%;
  top: 53%;
}

.homeB {
  left: 42%;
  top: 29%;
}

.homeC {
  right: 9%;
  top: 55%;
}

.homeGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.homeCard {
  position: relative;
  display: grid;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 241, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.homeCard:hover {
  border-color: rgba(8, 103, 246, 0.48);
  box-shadow: 0 22px 54px rgba(8, 39, 94, 0.18);
  transform: translateY(-3px);
}

.homeCard img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  padding: 10px;
}

.homeCard > span:not(.arrowBadge) {
  display: none;
}

.homeCard.breakdown {
  align-content: end;
  gap: 10px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.30), transparent 42%),
    linear-gradient(145deg, #071032, #0867f6);
  color: #fff;
  padding: 24px;
}

.homeCard.breakdown::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  width: 76px;
  height: 64px;
  border-radius: 20px;
  background:
    radial-gradient(circle, #fff 0 5px, transparent 6px) 13px 14px / 18px 18px no-repeat,
    radial-gradient(circle, #fff 0 5px, transparent 6px) 13px 32px / 18px 18px no-repeat,
    radial-gradient(circle, #fff 0 5px, transparent 6px) 13px 50px / 18px 18px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 72%, transparent 0) 34px 16px / 34px 5px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.78) 54%, transparent 0) 34px 34px / 34px 5px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 84%, transparent 0) 34px 52px / 34px 5px no-repeat,
    rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.homeCard.breakdown::after {
  content: "";
  position: absolute;
  left: 92px;
  top: 76px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(#071032, #071032) 50% 50% / 14px 3px no-repeat,
    linear-gradient(#071032, #071032) 50% 50% / 3px 14px no-repeat,
    #fff;
  box-shadow: 0 12px 24px rgba(7, 16, 50, 0.28);
}

.homeCard.breakdown > span:not(.arrowBadge) {
  position: relative;
  z-index: 1;
  display: block;
}

.homeCard.breakdown .homeCardKicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.homeCard.breakdown .homeCardTitle {
  color: #fff;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 950;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.homeCard.training > span:not(.arrowBadge) {
  color: var(--blue);
}

.homeCard.training > span:not(.arrowBadge)::first-line {
  color: var(--ink);
}

.arrowBadge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(8, 103, 246, 0.25);
}

.tasksPanel {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 26px;
  border: 1px solid rgba(220, 229, 241, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  padding: 22px 26px 20px 0;
}

.clipboardArt {
  position: relative;
  width: 126px;
  min-height: 154px;
  margin-left: -10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1d7cff, #075fea);
  box-shadow: 0 20px 28px rgba(8, 103, 246, 0.22);
  transform: rotate(-5deg);
}

.clipboardArt::before {
  content: "";
  position: absolute;
  left: 30px;
  top: -18px;
  width: 66px;
  height: 32px;
  border-radius: 8px 8px 4px 4px;
  background: #fff;
  border: 10px solid #1b78ff;
}

.clipboardArt span {
  position: absolute;
  left: 40px;
  width: 58px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.clipboardArt span:nth-child(1) {
  top: 56px;
}

.clipboardArt span:nth-child(2) {
  top: 86px;
}

.clipboardArt span:nth-child(3) {
  top: 116px;
}

.tasksHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 2px 0 18px;
}

.tasksHeader h2 {
  margin: 0;
  color: var(--blue);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.taskCount {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.taskRail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.taskItem {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  color: var(--ink);
  text-decoration: none;
}

.taskItem button {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 4px;
}

.taskItem strong,
.taskItem span {
  display: block;
}

.taskItem strong {
  font-size: 15px;
}

.taskItem span {
  color: #2f4f98;
}

.taskIcon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.emptyTask {
  opacity: 0.72;
}

@media (max-width: 1180px) {
  .heroPanel {
    grid-template-columns: 1fr;
  }

  .heroMap {
    min-height: 200px;
    margin-top: -34px;
  }

  .homeGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .homeTopbar,
  .homeActions {
    align-items: stretch;
  }

  .homeTopbar {
    display: grid;
    gap: 12px;
  }

  .homeActions {
    display: grid;
    grid-template-columns: repeat(3, 42px) 1fr;
  }

  .heroPanel,
  .homeGrid,
  .tasksPanel {
    width: min(100vw - 28px, 100%);
  }

  .companyLogo {
    max-height: 86px;
  }

  .heroCopy h1 {
    font-size: 36px;
  }

  .homeGrid,
  .taskRail,
  .tasksPanel {
    grid-template-columns: 1fr;
  }

  .homeCard {
    min-height: 0;
  }

  .tasksPanel {
    padding: 18px;
  }

  .clipboardArt {
    display: none;
  }
}
