/* Compass — Login + Home styles */

/* ============================================================
   Login — V4 "See further on every hire"
   Hand-drawn binoculars hero on warm paper; sign-in card on right.
   ============================================================ */
.v4 {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* ---- Left column (warm paper, illustration, headline) ---- */
.v4-left {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 40px 56px 48px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 25%, rgba(46,43,255,0.045), transparent 70%),
    radial-gradient(ellipse 70% 60% at 90% 95%, rgba(196,43,43,0.03), transparent 70%),
    linear-gradient(160deg, #F7F2E8 0%, #FBFAF7 60%);
  border-right: 1px solid var(--hairline);
}
.v4-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.v4-top, .v4-illu, .v4-bottom { position: relative; z-index: 1; }

.v4-mast {
  display: flex;
  align-items: center;
  gap: 14px;
}
.v4-mast-text {
  /* Brand "Title" treatment: Cards Normal Bold, sentence case wordmark. */
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.v4-mast-sub {
  margin-top: 5px;
  /* Brand "Label" treatment: Cards, all caps, widened letterspacing. */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.v4-illu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  min-height: 0;
}
.v4-illu img {
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  /* SVG paths default to fill:black on cream — exactly what we want */
  filter: drop-shadow(0 18px 32px rgba(10,10,11,0.08));
  animation: v4-rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 200ms;
}
@keyframes v4-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.v4-bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}
.v4-headline {
  margin: 0;
  /* Brand pairing: PP Editorial New Ultralight upright */
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 200;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
  animation: v4-rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 360ms;
}
.v4-headline em {
  /* Brand pairing: PP Editorial Old Italic for emphasis */
  font-family: "PP Editorial Old", var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.v4-sub {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 48ch;
  animation: v4-rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 480ms;
}
.v4-attr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  animation: v4-rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 600ms;
}
.v4-attr-mark {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ---- Right column (sign-in card) ---- */
.v4-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--surface);
  min-width: 0;
}
.v4-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  padding: 44px 36px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: v4-rise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: 500ms;
}
.signin .eyebrow {
  /* Brand "Label" treatment: Cards bold, all caps, widened letterspacing. */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.signin h2 {
  margin: 0 0 14px;
  /* Brand "Headline" treatment: PP Editorial New Ultralight, sentence case.
     Italics are reserved for emphasis (see the left-column em), not for
     entire headlines. */
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 200;
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.signin p {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
}

.signin .g-slot {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.signin .g-slot > div, .signin .g-slot iframe {
  max-width: 100% !important;
}

.trust {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  /* Cards (sans) for trust copy, matching brand label treatment. */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.5;
}
.trust .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--warn);
  flex-shrink: 0;
  transition: background 200ms ease;
}
.trust.is-ready .dot { background: var(--pos); }
.spin {
  width: 10px; height: 10px;
  border: 1.5px solid var(--hairline-strong);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: v4-spin 700ms linear infinite;
}
@keyframes v4-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .v4-illu img, .v4-headline, .v4-sub, .v4-attr, .v4-card {
    animation: none; opacity: 1; transform: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .v4 { grid-template-columns: 1fr; min-height: auto; }
  .v4-left {
    padding: 28px 24px 36px;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    gap: 24px;
    grid-template-rows: auto auto auto;
  }
  .v4-illu { padding: 8px 0; }
  .v4-illu img { max-width: 360px; }
  .v4-right { padding: 28px 20px; }
  .v4-card { padding: 32px 24px; }
}
@media (max-width: 640px) {
  .v4-left { padding: 22px 18px 28px; gap: 18px; }
  .v4-mast-text { font-size: 20px; }
  .v4-illu img { max-width: 280px; }
  .v4-headline { font-size: clamp(28px, 8vw, 36px); }
  .v4-sub { font-size: 14px; }
  .v4-attr { font-size: 9px; }
  .v4-right { padding: 20px 16px; }
  .v4-card { padding: 24px 18px; border-radius: var(--r-lg); }
  .signin h2 { font-size: 36px; }
}

/* ---- Home ---- */
.cmp-home-kpis {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.cmp-stat-feature {
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 220%);
}

.cmp-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.cmp-module {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fadeUp 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cmp-module:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.cmp-module:hover .cmp-module-arrow { color: var(--accent); transform: translateX(4px); }
.cmp-module svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.cmp-module-body { flex: 1; min-width: 0; }
.cmp-module-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.cmp-module-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.45;
}
.cmp-module-count {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.cmp-module-arrow {
  font-size: 18px;
  color: var(--ink-fade);
  transition: all 200ms ease;
  align-self: center;
}
.cmp-module.is-admin {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}
.cmp-module.is-admin .cmp-module-name::after {
  content: "Admin";
  display: inline-block;
  margin-left: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  vertical-align: middle;
}

.cmp-home-bottom {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.cmp-home-bench { padding: 4px; overflow: hidden; display: flex; flex-direction: column; }
.cmp-home-bench .cmp-mini-table { flex: 1; }
.cmp-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cmp-mini-table th {
  text-align: left;
  padding: 14px 18px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cmp-mini-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
}

.cmp-home-activity { padding: 24px; display: flex; flex-direction: column; }
.cmp-activity { flex: 1; }
.cmp-activity-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.cmp-activity { list-style: none; padding: 0; margin: 0; }
.cmp-activity li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}
.cmp-activity li:first-child { border-top: none; }
.cmp-activity-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .cmp-home-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .cmp-home-kpis { grid-template-columns: 1fr; }
  .cmp-modules { grid-template-columns: 1fr; }
  .cmp-module { padding: 16px; gap: 12px; }
  /* Stacked-row layout — the desktop table truncates the salary column
     under ~420px because the RangeBar column reserves 180px. On mobile
     we drop the bar and stack role / salary / esop vertically so the
     numbers are always visible. */
  .cmp-mini-table { display: block; }
  .cmp-mini-table thead { display: none; }
  .cmp-mini-table tbody, .cmp-mini-table tr { display: block; width: 100%; }
  .cmp-mini-table tr {
    padding: 12px 14px;
    border-top: 1px solid var(--hairline);
  }
  .cmp-mini-table tr:first-child { border-top: none; }
  .cmp-mini-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 4px 0;
    border-top: none;
    white-space: normal;
  }
  .cmp-mini-table td:first-child {
    display: block;
    padding-bottom: 6px;
  }
  .cmp-mini-table td:not(:first-child)::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    flex-shrink: 0;
  }
  .cmp-mini-table td:last-child { display: none; }
  .cmp-home-activity {
    padding: 16px;
  }
}
