/* Navegación lateral del dashboard piloto. Preparada para reutilizarse en otros espacios. */
.dashboard-shell {
  --dashboard-white: #ffffff;
  --dashboard-gray: #f5f7fa;
  --dashboard-navy: #14243a;
  --dashboard-blue: #4263eb;
  --dashboard-soft-blue: #e3eaf5;
  --dashboard-muted: #536173;
  --dashboard-border: #dce4ef;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.dashboard-sidebar {
  position: sticky;
  top: 20px;
  z-index: 10;
  width: 72px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dashboard-border);
  border-radius: 18px;
  background: var(--dashboard-white);
  box-shadow: 0 14px 34px #14243a0d;
  transition: width .24s ease, box-shadow .24s ease;
}

.dashboard-sidebar:hover,
.dashboard-sidebar.is-expanded {
  width: 240px;
  box-shadow: 0 18px 42px #14243a18;
}

.dashboard-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--dashboard-border);
}

.dashboard-sidebar-kicker,
.dashboard-sidebar-label {
  white-space: nowrap;
}

.dashboard-sidebar-kicker {
  padding-left: 8px;
  color: var(--dashboard-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-kicker {
  visibility: hidden;
}

.dashboard-sidebar-toggle {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--dashboard-navy);
}

.dashboard-sidebar-toggle:hover,
.dashboard-sidebar-toggle:focus-visible {
  border-color: var(--dashboard-soft-blue);
  background: var(--dashboard-gray);
  color: var(--dashboard-blue);
}

.dashboard-sidebar-toggle:focus-visible {
  outline: 3px solid #4263eb55;
  outline-offset: 2px;
}

.dashboard-sidebar-toggle svg,
.dashboard-sidebar-link svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dashboard-sidebar-nav,
.dashboard-sidebar-foot {
  display: grid;
  gap: 6px;
  padding: 14px 10px;
}

.dashboard-sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--dashboard-border);
}

.dashboard-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 14px;
  padding: 10px 11px;
  overflow: hidden;
  border-radius: 10px;
  color: var(--dashboard-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}

.dashboard-sidebar-action {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-link {
  justify-content: center;
  padding-inline: 0;
}

.dashboard-sidebar-link:hover,
.dashboard-sidebar-link:focus-visible {
  background: var(--dashboard-gray);
  color: var(--dashboard-blue);
}

.dashboard-sidebar-link.is-active {
  background: var(--dashboard-soft-blue);
  color: var(--dashboard-blue);
}

.dashboard-sidebar-link.is-active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--dashboard-blue);
  content: "";
}

.dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dashboard-sidebar-switch {
  color: var(--dashboard-navy);
}

.dashboard-sidebar-switch:hover,
.dashboard-sidebar-switch:focus-visible {
  background: var(--dashboard-soft-blue);
}

.dashboard-main {
  min-width: 0;
}

.dashboard-main .companies-card {
  border-color: var(--dashboard-border);
  box-shadow: 0 12px 28px #14243a08;
}

.dashboard-main .primary {
  background: var(--dashboard-blue);
}

.dashboard-main .primary:hover {
  background: var(--dashboard-navy);
}

.dashboard-main .secondary:hover {
  border-color: var(--dashboard-blue);
  background: var(--dashboard-soft-blue);
  color: var(--dashboard-navy);
}

@media (max-width: 760px) {
  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
    border-radius: 14px;
  }

  .dashboard-sidebar:hover,
  .dashboard-sidebar.is-expanded {
    width: 100%;
  }

  .dashboard-sidebar-head {
    min-height: 60px;
  }

  .dashboard-sidebar-kicker,
  .dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-kicker {
    visibility: visible;
  }

  .dashboard-sidebar-nav,
  .dashboard-sidebar-foot {
    display: none;
  }

  .dashboard-sidebar.is-expanded .dashboard-sidebar-nav,
  .dashboard-sidebar.is-expanded .dashboard-sidebar-foot {
    display: grid;
  }

  .dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-link {
    justify-content: flex-start;
    padding-inline: 11px;
  }

  .dashboard-sidebar:not(:hover):not(.is-expanded) .dashboard-sidebar-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-sidebar {
    transition: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .dashboard-sidebar:hover:not(.is-expanded) {
    width: 100%;
    box-shadow: 0 14px 34px #14243a0d;
  }

  .dashboard-sidebar:hover:not(.is-expanded) .dashboard-sidebar-nav,
  .dashboard-sidebar:hover:not(.is-expanded) .dashboard-sidebar-foot {
    display: none;
  }
}
