@font-face {
  font-family: "Heebo";
  src: url("../fonts/heebo-hebrew-wght-normal.de80852899c5.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "Heebo";
  src: url("../fonts/heebo-latin-wght-normal.480b1d24f2aa.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Brand palette. These are fallbacks: the page overrides them from companies/<slug>/company.json. */
:root {
  --brand-primary: #101826;
  --brand-primary-raised: #1a2436;
  --brand-accent: #dbb53f;
  --brand-accent-soft: #e2c569;
  --brand-accent-ink: #7a5f0e; /* gold that stays readable on light backgrounds */
  --brand-text: #2a2b2a;
  --brand-page: #f4f4f4;
  --brand-line: #dcdcd8;
  --brand-primary-rgb: 16, 24, 38;
  --brand-accent-rgb: 219, 181, 63;
  --brand-accent-ink-rgb: 122, 95, 14;
  --shell-topbar-height: 60px;
  --shell-sidebar-width: 248px;

  --bs-body-font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-body-bg: var(--brand-page);
  --bs-body-color: var(--brand-text);
  --bs-secondary-color: #5d605d;
  --bs-heading-color: var(--brand-primary);
  --bs-link-color: var(--brand-accent-ink);
  --bs-link-color-rgb: var(--brand-accent-ink-rgb);
  --bs-link-hover-color: var(--brand-primary);
  --bs-link-hover-color-rgb: var(--brand-primary-rgb);
  --bs-border-color: var(--brand-line);
  --bs-focus-ring-color: rgba(var(--brand-accent-rgb), 0.45);
}

h1, h2, h3, .h1, .h2, .h3 {
  font-weight: 800;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.btn-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-bg: var(--brand-accent);
  --bs-btn-border-color: var(--brand-accent);
  --bs-btn-hover-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-accent-soft);
  --bs-btn-hover-border-color: var(--brand-accent-soft);
  --bs-btn-active-color: var(--brand-primary);
  --bs-btn-active-bg: var(--brand-accent-soft);
  --bs-btn-active-border-color: var(--brand-accent-soft);
  --bs-btn-focus-shadow-rgb: var(--brand-accent-rgb);
  font-weight: 600;
}

/* Top bar: navy band with a gold rule, like the site header. */
.shell-topbar {
  min-height: var(--shell-topbar-height);
  padding-block: 0.5rem;
  background: var(--brand-primary);
  border-bottom: 2px solid var(--brand-accent);
}

.shell-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.shell-brand:hover,
.shell-brand:focus {
  color: var(--brand-accent-soft);
}

.shell-brand img {
  flex-shrink: 0;
  height: 44px;
  width: auto;
  border-radius: 8px;
}

.shell-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(var(--brand-accent-rgb), 0.55);
  border-radius: 10px;
}

.shell-toggler:hover {
  background: var(--brand-primary-raised);
}

/* Side menu: navy on every screen size, so the top bar and menu read as one frame. */
.shell-sidebar {
  --bs-offcanvas-width: 280px;
  --bs-offcanvas-bg: var(--brand-primary);
  --bs-offcanvas-color: #fff;
  --bs-offcanvas-border-width: 0;
}

.shell-sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-sidebar-header .offcanvas-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-accent);
}

/* A column, so the logout form can sit at the bottom of the menu. */
.shell-sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem 0;
}

.shell-logout {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-user {
  overflow: hidden;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-logout-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 1rem;
  font-weight: 600;
  color: var(--brand-accent);
  background: transparent;
  border: 1px solid rgba(var(--brand-accent-rgb), 0.55);
  border-radius: 10px;
}

.shell-logout-btn:hover,
.shell-logout-btn:focus-visible {
  color: var(--brand-primary);
  background: var(--brand-accent);
}

.shell-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 2px;
}

.shell-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  text-decoration: none;
  border-inline-start: 3px solid transparent;
  transition: color 0.15s, background-color 0.15s;
}

.shell-nav-link:hover,
.shell-nav-link:focus-visible {
  color: #fff;
  background: var(--brand-primary-raised);
}

.shell-nav-link.active {
  color: var(--brand-accent);
  font-weight: 700;
  background: rgba(var(--brand-accent-rgb), 0.08);
  border-inline-start-color: var(--brand-accent);
}

.shell-main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  min-height: calc(100vh - var(--shell-topbar-height));
}

.shell-content {
  flex-grow: 1;
  width: 100%;
  max-width: 1120px;
  padding: 1rem;
}

.shell-footer {
  padding: 1rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

@media (min-width: 992px) {
  .shell-sidebar {
    position: sticky;
    top: var(--shell-topbar-height);
    flex-shrink: 0;
    width: var(--shell-sidebar-width);
    height: calc(100vh - var(--shell-topbar-height));
    overflow-y: auto;
    /* On desktop Bootstrap makes offcanvas-lg a plain block; a column lets the logout form reach the bottom. */
    display: flex;
    flex-direction: column;
    /* Bootstrap makes offcanvas-lg transparent on desktop; keep the navy frame. */
    background-color: var(--brand-primary) !important;
  }

  .shell-content {
    padding: 2rem;
  }
}

/* Home: welcome panel with contour lines, the shape of a survey map. */
.welcome {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.5rem;
  color: #fff;
  background:
    repeating-radial-gradient(ellipse 120% 90% at 8% 115%, transparent 0 26px, rgba(var(--brand-accent-rgb), 0.16) 26px 27px),
    var(--brand-primary);
  border-radius: 16px;
}

.welcome h1 {
  margin-bottom: 0.375rem;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  color: #fff;
}

.welcome p {
  max-width: 36em;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.welcome-date {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-accent);
}

@media (min-width: 992px) {
  .welcome {
    padding: 2.5rem;
  }
}

.section-title {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.shortcut {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-inline-start: 4px solid var(--brand-accent);
  border-radius: 10px;
}

.shortcut:hover {
  color: var(--brand-primary);
  border-color: var(--brand-accent);
}

/* Empty state: dashed outline marks a place that will fill up later. */
.empty-state {
  padding: 1.5rem;
  color: var(--bs-secondary-color);
  text-align: center;
  border: 2px dashed var(--brand-line);
  border-radius: 12px;
}

.empty-state p {
  margin: 0;
}

.empty-state h1 {
  margin-bottom: 0.5rem;
}

.empty-state .btn {
  margin-top: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .shell-nav-link {
    transition: none;
  }
}

/* Page components: page header, filter chips, data cards, tables, card grid, stat tiles.
   Shown together in the saved demo pages, see docs/design/README.md. */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.data-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 0.75rem;
  overflow: hidden;
}

.data-card .table thead th {
  background: #fafaf8;
  color: var(--brand-text);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-text);
  text-decoration: none;
  font-size: 0.9rem;
}

.chip.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.info-card {
  padding: 1.1rem;
}

.info-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}

/* One line of air between the welcome panel and the tiles, like before a section title. */
.welcome + .stat-grid {
  margin-top: 2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  padding: 1rem 1.1rem;
  border-inline-start: 4px solid var(--brand-accent);
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand-primary);
}

.stat-label {
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

/* Login: one white card on the grey page, its head in the frame colors with the gold rule. */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(var(--brand-primary-rgb), 0.08);
}

.login-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--brand-primary);
  border-bottom: 2px solid var(--brand-accent);
}

.login-head img {
  height: 64px;
  width: auto;
  border-radius: 10px;
}

.login-head h1 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
}

.login-body {
  padding: 1.5rem;
}

.login-body .form-label {
  font-weight: 600;
}

/* 16px text keeps iOS from zooming in when a field gets focus. */
.login-body .form-control {
  min-height: 48px;
  font-size: 1rem;
}

.login-submit {
  width: 100%;
  min-height: 48px;
}

/* Password field with a show/hide eye. The text is LTR (passwords are English only), so the eye sits on the right. */
.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--bs-secondary-color);
  background: none;
  border: 0;
}

.password-toggle[aria-pressed="true"] {
  color: var(--brand-accent-ink);
}

.login-links {
  margin: 1rem 0 0;
  text-align: center;
}

.login-links a {
  color: var(--brand-accent-ink);
}

/* Name in the side menu opens a small menu above it: edit name, change password. */
.shell-profile {
  min-width: 0;
}

/* Stays a block (not flex) so the long-name ellipsis of .shell-user keeps working. */
.shell-profile summary {
  position: relative;
  padding-inline-end: 1.25rem;
  line-height: 44px;
  list-style: none;
  cursor: pointer;
}

.shell-profile summary::-webkit-details-marker {
  display: none;
}

/* Chevron at the end of the name; it points up because the menu opens above. */
.shell-profile summary::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 0.25rem;
  border-inline: 0.3rem solid transparent;
  border-bottom: 0.35rem solid var(--brand-accent);
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.shell-profile[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.shell-profile-menu {
  position: absolute;
  bottom: 100%;
  inset-inline-start: 1.25rem;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem;
  background: var(--brand-primary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.shell-profile-menu a {
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: 8px;
}

.shell-profile-menu a:hover,
.shell-profile-menu a:focus-visible {
  color: var(--brand-primary);
  background: var(--brand-accent);
}

.profile-page {
  max-width: 28rem;
}
