/* SIDEBAR */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  letter-spacing: -1px;
}
.logo-text { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }
.logo-sub { font-size: 10px; color: var(--text3); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }

.user-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.user-card:hover { background: var(--surface2); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white; flex-shrink: 0;
}
.user-info .name { font-weight: 600; font-size: 13px; }
.user-info .role { font-size: 11px; color: var(--text3); }

nav { flex: 1; padding: 10px 0; overflow-y: auto; }
nav::-webkit-scrollbar { width: 3px; }

.nav-section {
  padding: 8px 16px 4px;
  font-size: 10px; color: var(--text3);
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--surface2); }
.nav-item.active { background: var(--surface3); color: var(--accent); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }
.nav-item .label { font-size: 13px; font-weight: 500; }
.nav-item .badge {
  margin-left: auto; background: var(--accent3);
  color: white; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px; min-width: 20px; text-align: center;
}
.nav-item .badge.green { background: var(--green); color: #0d0f14; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text3);
  display: flex; align-items: center; gap: 8px;
}

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 56px; min-height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 7px 12px; width: 260px;
}
.topbar-search input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 13px; font-family: inherit; width: 100%;
}
.topbar-search input::placeholder { color: var(--text3); }
.topbar-notif {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.content { flex: 1; overflow-y: auto; padding: 24px; }

/* PAGES */
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* GRIDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 16px;
}
.dash-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
