*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f7f8f7;
  --bg-strong: #eef1ef;
  --ink: #0c0f12;
  --muted: #5c646c;
  --soft: #89919a;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(12, 15, 18, 0.1);
  --line-strong: rgba(12, 15, 18, 0.18);
  --shadow: 0 24px 70px rgba(18, 24, 29, 0.1);
  --radius: 8px;
  --accent: #0c0f12;
  --red: #bd2f4f;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.86) 0%,
      rgba(255, 255, 255, 0) 330px
    ),
    linear-gradient(135deg, #ffffff 0%, var(--bg) 46%, var(--bg-strong) 100%);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 410px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(18px);
}

.lock-mark,
.brand-mark,
.card-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.lock-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c0f12;
  color: #fff;
  margin-bottom: 20px;
}

.lock-mark svg,
.brand-mark svg,
.card-mark svg {
  width: 20px;
  height: 20px;
  display: block;
}

.auth-card h1 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
}

.auth-copy {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(12, 15, 18, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-row {
  display: flex;
  gap: 10px;
}

.auth-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.auth-input:focus {
  border-color: rgba(12, 15, 18, 0.38);
  box-shadow: 0 0 0 4px rgba(12, 15, 18, 0.08);
}

.unlock-btn,
.sign-out-btn,
.card-action {
  border: 0;
  border-radius: var(--radius);
  background: #0c0f12;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.unlock-btn {
  height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}

.unlock-btn:hover,
.unlock-btn:focus-visible,
.sign-out-btn:hover,
.sign-out-btn:focus-visible,
.card:hover .card-action,
.card:focus-visible .card-action {
  background: #1b2025;
  box-shadow: 0 12px 24px rgba(12, 15, 18, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.auth-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}

.page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: #0c0f12;
  color: #fff;
  box-shadow: 0 14px 30px rgba(12, 15, 18, 0.14);
}

.brand-title {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.brand-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2f9d62;
}

.sign-out-btn {
  min-height: 36px;
  padding: 0 12px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 28px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
  font-weight: 800;
}

.intro p {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.count {
  justify-self: end;
  min-width: 178px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.count strong {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 48px;
  line-height: 1;
}

.count span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cards {
  display: grid;
  gap: 12px;
  padding-top: 22px;
}

.card {
  --card-accent: #0c0f12;
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 114px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(18, 24, 29, 0.045);
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: 0 22px 54px rgba(18, 24, 29, 0.1);
  outline: none;
}

.card-mark {
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 20%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-accent) 10%, #ffffff);
  color: var(--card-accent);
}

.card-copy {
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.card h2 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1;
  font-weight: 800;
}

.card-kind {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.card p {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.destination {
  display: block;
  margin-top: 9px;
  color: rgba(12, 15, 18, 0.5);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 102px;
  min-height: 42px;
  padding: 0 14px;
}

.card-action svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.card:hover .card-action svg,
.card:focus-visible .card-action svg {
  transform: translateX(3px);
}

.card-director {
  --card-accent: #10605a;
}
.card-legal {
  --card-accent: #a73755;
}
.card-money {
  --card-accent: #2e7a4f;
}
.card-electrical {
  --card-accent: #a06a22;
}

.footer {
  margin: 20px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.6;
}

.footer code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  padding: 2px 6px;
  color: rgba(12, 15, 18, 0.68);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

@supports not (color: color-mix(in srgb, #000 10%, #fff)) {
  .card-mark {
    border-color: var(--line);
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 760px) {
  body.is-locked {
    overflow: auto;
  }

  .auth-card {
    padding: 24px;
  }

  .auth-row {
    flex-direction: column;
  }

  .unlock-btn {
    width: 100%;
  }

  .page {
    width: min(100% - 28px, 1040px);
    padding-top: 18px;
  }

  .topbar,
  .intro {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 44px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .intro {
    display: block;
  }

  .intro h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .count {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    margin-top: 26px;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 0 0;
  }

  .count strong {
    font-size: 42px;
  }

  .card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
  }

  .card-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .card-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .card-title-row {
    display: block;
  }

  .card-kind {
    display: block;
    margin-top: 7px;
  }
}
