.layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
  background: #f5f7fa;
  --sidebar-toast-left: 236px;
}

.layout.sidebar-collapsed {
  grid-template-columns: 84px 1fr;
  --sidebar-toast-left: 84px;
}

.sidebar {
  background: linear-gradient(180deg, #fdfefe 0%, #f6f9f8 100%);
  color: var(--text);
  border-right: 1px solid var(--border);
  padding: 16px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #95a0ac;
  font-size: 11px;
  font-weight: 400;
}

.brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #1fcb73 0%, #07c160 100%);
  box-shadow: 0 10px 20px rgba(7, 193, 96, 0.24);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-toggle {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #dfe7e3;
  background: #f6faf8;
  color: #4e5969;
}

.sidebar-toggle:hover {
  background: #edf8f1;
  border-color: rgba(7, 193, 96, 0.22);
  color: var(--primary);
}

.sidebar-caption {
  padding: 2px 10px 0;
  font-size: 11px;
  color: #96a2af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-group {
  display: grid;
  gap: 4px;
}

.menu-item-label {
  display: inline-block;
}

.menu-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  font-size: 11px;
  font-weight: 800;
  color: #6f7b87;
  background: #f3f6f7;
  border: 1px solid rgba(223, 229, 234, 0.9);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-weight: 500;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  border: 1px solid transparent;
  transition: background 0.16s, color 0.16s, transform 0.16s;
}

.menu-item:hover {
  background: #f4fbf7;
  color: #0f1419;
  border-color: rgba(7, 193, 96, 0.1);
  transform: none;
}

.menu-item.active {
  background: var(--primary-soft);
  color: #0f1419;
  border-color: rgba(7, 193, 96, 0.18);
  font-weight: 700;
}

.menu-item.active .menu-item-icon {
  background: rgba(7, 193, 96, 0.12);
  color: #118a4d;
  border-color: rgba(7, 193, 96, 0.18);
}

.layout.sidebar-collapsed .sidebar {
  padding-left: 8px;
  padding-right: 8px;
}

.layout.sidebar-collapsed .brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 8px;
}

.layout.sidebar-collapsed .brand-copy,
.layout.sidebar-collapsed .menu-item-label,
.layout.sidebar-collapsed .sidebar-caption {
  display: none;
}

.layout.sidebar-collapsed .menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 6px;
}

.layout.sidebar-collapsed .menu-item::before {
  content: none;
}

.layout.sidebar-collapsed .menu-item:hover {
  transform: none;
}

.content {
  padding: 24px 28px 36px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -8px -8px 24px;
  padding: 18px 20px 16px;
  background: rgba(245, 247, 250, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 233, 238, 0.9);
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.topbar-subtitle {
  margin-top: 6px;
  color: #8a97a6;
  font-size: 13px;
  line-height: 1.6;
  max-width: 720px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.current-user {
  color: #157347;
  font-size: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #f2fbf6;
  border: 1px solid rgba(7, 193, 96, 0.14);
  font-weight: 600;
}

.section {
  display: none;
}

.section.active {
  display: block;
}
