:root {
  --blue-900: #0b2545;
  --blue-800: #123b68;
  --blue-700: #185a9d;
  --blue-600: #246fbd;
  --blue-050: #edf5ff;
  --gray-900: #172033;
  --gray-700: #3f4b5f;
  --gray-500: #6e7a8d;
  --gray-200: #d9e1ec;
  --gray-100: #edf1f6;
  --white: #ffffff;
  --shadow: 0 18px 44px rgba(23, 32, 51, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-100);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--gray-200);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px clamp(18px, 4vw, 44px);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.06);
}

.topbar--employee {
  align-items: flex-start;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.brand__logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand__name {
  color: var(--blue-900);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav--employee {
  max-width: 980px;
}

.nav__form {
  display: inline-flex;
  margin: 0;
}

.nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  padding: 9px 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  white-space: nowrap;
  touch-action: manipulation;
}

.nav__button:hover,
.nav__button--active {
  border-color: var(--blue-600);
  background: var(--blue-050);
  color: var(--blue-800);
}

.nav__button--outline {
  border-color: var(--blue-700);
  color: var(--blue-800);
}

.page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.page--narrow {
  width: min(900px, calc(100% - 36px));
}

.page--center {
  display: grid;
  min-height: calc(100svh - 74px);
  place-items: center;
}

.hero {
  display: grid;
  align-items: end;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background-color: var(--blue-900);
  background-image: linear-gradient(
      90deg,
      rgba(11, 37, 69, 0.94) 0%,
      rgba(18, 59, 104, 0.82) 48%,
      rgba(36, 111, 189, 0.46) 100%
    ),
    url('/img/insidious-logo.png');
  background-position: center, right 32px center;
  background-repeat: no-repeat;
  background-size: cover, min(34vw, 300px);
  box-shadow: var(--shadow);
}

.hero--employee {
  background-image: linear-gradient(
      90deg,
      rgba(11, 37, 69, 0.96) 0%,
      rgba(18, 59, 104, 0.84) 52%,
      rgba(75, 91, 112, 0.54) 100%
    ),
    url('/img/insidious-logo.png');
}

.hero__content {
  max-width: 680px;
  padding: clamp(28px, 5vw, 46px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #b9d9ff;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--gray-900);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.hero h1 {
  color: var(--white);
}

h2 {
  margin-bottom: 10px;
  color: var(--blue-900);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 540px;
  margin-bottom: 0;
  color: #dceaff;
  font-size: 18px;
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.topbar--employee + .page .dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-card {
  display: grid;
  align-content: space-between;
  min-height: 150px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  padding: 20px;
  box-shadow: 0 10px 26px rgba(23, 32, 51, 0.08);
  transition: border-color 140ms ease, transform 140ms ease,
    box-shadow 140ms ease;
}

.action-card:hover {
  border-color: var(--blue-600);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.action-card__label {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-card__title {
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.section-head {
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 0 22px;
}

.section-head h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.section-head p:last-child {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--gray-500);
  font-size: 17px;
  line-height: 1.55;
}

.content-panel,
.login-panel {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.content-panel {
  margin-top: 20px;
  padding: 26px;
}

.content-panel p {
  margin-bottom: 0;
  color: var(--gray-500);
  font-size: 16px;
  line-height: 1.55;
}

.report-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.report-picker--items {
  grid-template-columns: minmax(190px, 0.9fr) minmax(240px, 1.1fr) auto;
}

.login-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.login-panel__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-panel__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.login-panel h1 {
  margin-bottom: 0;
  font-size: 28px;
}

.banner {
  margin: 0 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 700;
}

.banner--error {
  border-color: #f0c7cc;
  background: #fff0f2;
  color: #8f1d2c;
}

.banner--ok {
  border-color: #b9d7c4;
  background: #effaf3;
  color: #1f6b39;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field__label {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
}

.input {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-900);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}

.input--multi-select {
  min-height: 140px;
}

.input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(36, 111, 189, 0.16);
}

.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-700);
  color: var(--white);
  cursor: pointer;
  padding: 12px 14px;
  font: inherit;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--blue-800);
}

@media (max-width: 960px) {
  .topbar,
  .topbar--employee {
    align-items: stretch;
    flex-direction: column;
  }

  .nav,
  .nav--employee {
    justify-content: flex-start;
    max-width: none;
  }

  .dashboard-grid,
  .topbar--employee + .page .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
    padding: 12px 16px;
  }

  .brand {
    min-height: 38px;
  }

  .brand__logo {
    width: 34px;
    height: 34px;
  }

  .brand__name {
    font-size: 18px;
  }

  .nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .nav__button {
    width: auto;
    min-height: 40px;
    flex: 0 0 auto;
    padding: 8px 12px;
  }

  .nav__form {
    width: auto;
    flex: 0 0 auto;
  }

  .nav__form .nav__button {
    width: auto;
  }

  .page {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .page--center {
    min-height: auto;
  }

  .hero {
    min-height: 270px;
    background-position: center, right -40px center;
    background-size: cover, 220px;
  }

  .hero__content {
    padding: 24px;
  }

  h1 {
    font-size: 34px;
  }

  .hero__lead {
    font-size: 16px;
  }

  .dashboard-grid,
  .topbar--employee + .page .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .report-picker,
  .report-picker--items {
    grid-template-columns: 1fr;
  }

  .action-card {
    min-height: 128px;
  }

  .content-panel,
  .login-panel {
    padding: 18px;
  }

  .primary-button {
    min-height: 44px;
    padding: 10px 13px;
  }
}
