:root {
  --bg: #070a08;
  --surface: #0d1410;
  --surface-2: #111b15;
  --surface-3: #17211b;
  --line: rgba(201, 218, 205, 0.12);
  --line-strong: rgba(82, 214, 92, 0.44);
  --text: #f2f8f3;
  --muted: #9caea1;
  --soft: #607064;
  --green: #39ff14;
  --green-soft: rgba(57, 255, 20, 0.12);
  --amber: #d7a85c;
  --blue: #78a8ff;
  --cyan: #42e8c5;
  --rose: #ff5c8a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(145deg, #050806 0%, #0a1212 48%, #070911 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: "Inter", sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.main {
  width: min(1080px, calc(100% - 48px));
  min-height: 100svh;
  margin-inline: auto;
  padding: 18px 0;
  position: relative;
  display: grid;
  align-content: center;
}

.page-intro {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  text-align: center;
}

.page-intro > div {
  display: grid;
  justify-items: center;
}

.page-label {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.page-intro h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.page-subtitle {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  justify-content: center;
}

.role-card {
  --role-accent: var(--green);
  --role-soft: rgba(57, 255, 20, 0.12);
  min-height: 122px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0)),
    var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  grid-column: span 2;
}

.role-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--role-soft), transparent 42%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.role-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  background: var(--role-accent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.role-card[data-role-card="rh"] {
  --role-accent: var(--amber);
  --role-soft: rgba(215, 168, 92, 0.13);
}

.role-card[data-role-card="analista"] {
  --role-accent: var(--green);
  --role-soft: rgba(57, 255, 20, 0.12);
}

.role-card[data-role-card="gestor"] {
  --role-accent: var(--blue);
  --role-soft: rgba(120, 168, 255, 0.12);
}

.role-card[data-role-card="contas"] {
  --role-accent: var(--cyan);
  --role-soft: rgba(66, 232, 197, 0.12);
  grid-column: 2 / span 2;
}

.role-card-link {
  text-decoration: none;
}

.automation-role-card {
  --role-accent: var(--rose);
  --role-soft: rgba(255, 92, 138, 0.12);
  grid-column: 4 / span 2;
}

.role-card:hover,
.role-card.is-active {
  border-color: var(--role-accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0)),
    var(--surface-2);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.role-card:hover::before,
.role-card.is-active::before {
  opacity: 1;
}

.role-card.is-active::after {
  opacity: 1;
}

.role-card:focus-visible,
.tool-card:focus-visible {
  outline: 2px solid var(--role-accent, var(--green));
  outline-offset: 3px;
}

.role-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--role-accent);
  border-radius: 8px;
  background: var(--role-soft);
  color: var(--role-accent);
  position: relative;
  z-index: 1;
}

.role-icon svg {
  width: 20px;
  height: 20px;
}

.role-body {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
  position: relative;
  z-index: 1;
}

.role-count {
  color: var(--role-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.role-body strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.role-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
}

.role-action {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  color: var(--role-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.84;
}

.role-action svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.role-card:hover .role-action svg,
.role-card.is-active .role-action svg {
  transform: translateX(3px);
}

.role-workspace {
  margin-top: 14px;
  padding-top: 14px;
}

.role-empty,
.role-panel {
  min-height: 118px;
}

.role-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 18px 24px;
  border: 1px dashed rgba(201, 218, 205, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(57, 255, 20, 0.07), transparent 44%),
    rgba(13, 20, 16, 0.58);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.role-empty::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 80px;
  height: 3px;
  transform: translateX(-50%);
  background: var(--green);
}

.role-empty span,
.role-panel-head span,
.development-state span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.role-empty h2,
.role-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.role-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.role-panel {
  outline: none;
}

.role-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.role-panel-head div {
  min-width: 0;
}

.role-panel-head p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tool-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0)),
    rgba(13, 20, 16, 0.78);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tool-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.tool-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(57, 255, 20, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.tool-icon svg {
  width: 17px;
  height: 17px;
}

.tool-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tool-text strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.24;
  font-weight: 900;
  letter-spacing: 0;
}

.tool-text small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.tool-arrow {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  grid-column: 2;
  justify-self: start;
}

.development-state {
  min-height: 118px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(120, 168, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(120, 168, 255, 0.1), rgba(120, 168, 255, 0.02)), rgba(13, 20, 16, 0.7);
  text-align: center;
}

.development-state span {
  color: var(--blue);
}

.development-state strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .main {
    width: min(100% - 28px, 1080px);
    padding-top: 18px;
    align-content: start;
  }

  .page-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-intro h1 {
    font-size: 34px;
  }

  .role-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }

  .role-card,
  .role-card[data-role-card="contas"],
  .automation-role-card {
    grid-column: auto;
  }

  .tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  }

  .tool-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
  }

  .tool-arrow {
    grid-column: auto;
    justify-self: auto;
  }
}

@media (max-width: 640px) {
  .main {
    width: min(100% - 24px, 1080px);
    padding: 14px 0 28px;
  }

  .page-intro {
    padding-bottom: 20px;
  }

  .page-intro h1 {
    font-size: 30px;
  }

  .page-subtitle {
    font-size: 14px;
  }

  .role-card {
    min-height: 158px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    padding: 18px;
  }

  .role-icon {
    width: 46px;
    height: 46px;
  }

  .role-body strong {
    font-size: 20px;
  }

  .role-panel-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .role-panel-head p {
    white-space: normal;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .tool-arrow {
    grid-column: 2;
    width: max-content;
  }

  .development-state strong {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .role-card {
    grid-template-columns: 1fr;
  }

  .tool-arrow {
    width: 100%;
  }

  .tool-arrow {
    grid-column: 1 / -1;
  }
}
