/* ════════════════════════════════════════
   layout.css — Sidebar, header, main shell
   ════════════════════════════════════════ */

/* ── App shell ── */
#appShell {
  display: none;
  width: 100%;
}

/* ══ SIDEBAR ══ */
aside {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 24px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg { width: 18px; height: 18px; fill: white; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; }
.brand-tag  { font-size: 10px; color: var(--muted); }

/* ── Nav ── */
nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

.nav-group {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px;
  margin: 18px 0 6px;
}

.nav-group:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.14s;
  font-size: 13.5px;
  margin-bottom: 2px;
  user-select: none;
}

.nav-item:hover  { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 500; }

.nav-icon { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 20px;
  padding: 2px 7px;
  font-family: var(--mono);
}

/* ── Sidebar footer / user ── */
.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s;
}

.user-row:hover { background: var(--surface2); }

.uavatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.uname { font-size: 13px; font-weight: 500; }
.urole { font-size: 11px; color: var(--muted); }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--red);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s;
}

.logout-btn:hover { background: var(--red-dim); }
.logout-btn svg   { width: 15px; height: 15px; fill: currentColor; }

/* ══ MAIN AREA ══ */
main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  gap: 8px;
  height: 36px;
  width: 210px;
}

.search-bar svg { width: 14px; height: 14px; fill: var(--muted); flex-shrink: 0; }

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  width: 100%;
}

.search-bar input::placeholder { color: var(--muted); }

.icon-btn {
  width: 36px;
  height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s;
  position: relative;
}

.icon-btn:hover { background: var(--surface3); }
.icon-btn svg   { width: 16px; height: 16px; fill: var(--muted); }

.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--surface);
}

/* ── Content wrapper ── */
.content {
  padding: 26px 28px;
  flex: 1;
}
