:root {
  --sidebar-bg: #0e1c30;
  --sidebar-hover: #17293f;
  --sidebar-active: #1c3350;
  --accent-green: #1f8156;
  --content-bg: #f5f1ea;
  --sidebar-text: #c9d3dd;
  --sidebar-muted: #7f97a8;
}

body {
  background: var(--content-bg);
}

/* ---- Top bar ---- */
.app-topbar {
  background: var(--sidebar-bg);
  border-bottom: 3px solid var(--accent-green);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0 .5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-topbar .brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  padding-left: .5rem;
}

.app-topbar .user-info {
  color: #e7ecf1;
  font-size: .9rem;
}

/* ---- Shell layout ---- */
.app-shell {
  display: flex;
  align-items: flex-start;
}

/* ---- Sidebar ---- */
.app-sidebar {
  background: var(--sidebar-bg);
  width: 240px;
  flex-shrink: 0;
  min-height: calc(100vh - 59px);
  position: sticky;
  top: 59px;
  overflow-y: auto;
  transition: width .15s ease;
}

.app-sidebar.is-collapsed {
  width: 60px;
}

.app-sidebar.is-collapsed .sidebar-label,
.app-sidebar.is-collapsed .sidebar-chevron {
  display: none;
}

.app-sidebar.is-collapsed .sidebar-link,
.app-sidebar.is-collapsed .sidebar-toggle-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app-sidebar.is-collapsed .sidebar-children {
  padding-left: 0;
}

.sidebar-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2f6fed;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 8px;
  left: 8px;
  z-index: 1020;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.sidebar-link,
.sidebar-toggle-link {
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .48rem 1rem;
  text-decoration: none;
  font-size: .92rem;
  border-left: 3px solid transparent;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-toggle-link {
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sidebar-muted);
  padding-top: .7rem;
  padding-bottom: .3rem;
}

.sidebar-toggle-link .sidebar-icon {
  font-size: .95rem;
}

.sidebar-link:hover,
.sidebar-toggle-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.is-active {
  background: var(--sidebar-active);
  color: #fff;
  border-left-color: var(--accent-green);
}

.sidebar-group.is-active > .sidebar-toggle-link {
  background: var(--sidebar-active);
  color: #fff;
  border-left-color: var(--accent-green);
}

.sidebar-icon {
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-chevron {
  margin-left: auto;
  transition: transform .15s ease;
  font-size: .7rem;
  opacity: .7;
}

.sidebar-toggle-link[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(90deg);
}

.sidebar-children .sidebar-link {
  padding-left: 2.4rem;
  font-size: .88rem;
}

/* ---- Main content ---- */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
}
