:root {
  --brand: #00b894;
  --brand-dark: #019875;
  --ink: #12263a;
  --muted: #6b7c8f;
  --line: #e3e9f0;
  --bg: #f4f7fb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 184, 148, 0.22), transparent 55%),
    linear-gradient(180deg, #0f2027, #12263a 60%, #1b3a5c);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.sidebar__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__empresa {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 32px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.sidebar__link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar__link--active {
  color: var(--white);
  background: rgba(0, 184, 148, 0.2);
}

.sidebar__icon {
  font-size: 18px;
  line-height: 1;
}

.sidebar__group {
  margin: 0;
}

.sidebar__link--toggle {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sidebar__link--toggle::-webkit-details-marker {
  display: none;
}

.sidebar__caret {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}

.sidebar__group[open] .sidebar__caret {
  transform: rotate(180deg);
}

.sidebar__submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 4px 22px;
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.sidebar__sublink {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.sidebar__sublink:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar__sublink--active {
  color: var(--white);
  background: rgba(0, 184, 148, 0.2);
}

.sidebar__foot {
  margin-top: auto;
  padding: 0 8px;
  font-size: 12px;
  opacity: 0.5;
}

.layout__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (max-width: 720px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
  }

  .sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 16px;
  }

  .sidebar__link {
    flex: 1 1 auto;
    justify-content: center;
  }

  .sidebar__foot {
    display: none;
  }
}
