/* ============================================================
   layout.css — Sidebar, Topnav, Main Area
   ============================================================ */

#app { min-height: 100vh; }

/* ── Wrapper principal ───────────────────────────────────── */
.app-shell {
  display: flex; min-height: 100vh; background: var(--bg);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--bg2);
  border-right: 1px solid var(--bd);
  display: flex; flex-direction: column;
  padding: 20px 12px; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 50;
  overflow-y: auto; overflow-x: hidden;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px; margin-bottom: 22px;
}
.sidebar-brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--amber), var(--amber2));
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; flex-shrink: 0;
}
.sidebar-brand-text { min-width: 0; }
.sidebar-brand-name {
  font-size: 12.5px; font-weight: 700; color: var(--t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-brand-version { font-size: 10px; color: var(--t6); }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 1px; }

.sidebar-footer {
  border-top: 1px solid var(--bd); padding-top: 14px; margin-top: 10px;
}
.sidebar-user {
  padding: 9px 11px; background: var(--bg3); border-radius: 9px;
  margin-bottom: 6px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-name {
  font-size: 12px; color: var(--t1); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-role { font-size: 10px; color: var(--t6); }
.sidebar-actions { display: flex; gap: 4px; }

/* ── Main area ───────────────────────────────────────────── */
.main-area {
  flex: 1; display: flex; flex-direction: column;
  margin-left: var(--sidebar-w); min-height: 100vh;
}

/* ── Top nav ─────────────────────────────────────────────── */
.topnav-bar {
  background: var(--bg2); border-bottom: 1px solid var(--bd);
  padding: 10px 16px; display: flex; align-items: center;
  justify-content: space-between; position: sticky; top: 0; z-index: 40;
  gap: 10px;
}
.topnav-scroll {
  display: flex; gap: 5px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  flex: 1; min-width: 0;
}
.topnav-scroll::-webkit-scrollbar { display: none; }
.topnav-btn {
  padding: 7px 11px; background: transparent; color: var(--t4);
  border: 1px solid var(--bd); border-radius: var(--r-sm);
  font-size: 12px; white-space: nowrap; cursor: pointer;
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  transition: var(--transition); font-family: 'Sora', sans-serif;
  font-weight: 500;
}
.topnav-btn.active {
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 30%, transparent);
}
.topnav-btn:hover:not(.active) { background: var(--bg7); color: var(--t2); }

.topnav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topnav-user-pill {
  padding: 5px 10px; background: var(--bg3);
  border-radius: 7px; display: flex; flex-direction: column;
}
.topnav-user-name  { font-size: 11px; color: var(--t1); font-weight: 600; white-space: nowrap; }
.topnav-user-role  { font-size: 10px; color: var(--t6); }

/* ── Content area ────────────────────────────────────────── */
.content {
  flex: 1; padding: var(--sp-lg);
  max-width: 1200px; width: 100%;
  margin: 0 auto; box-sizing: border-box;
}

/* ── Mobile hamburger ────────────────────────────────────── */
.mob-btn {
  display: none; position: fixed; top: 10px; left: 10px;
  z-index: 60; background: var(--amber); border: none;
  border-radius: 8px; padding: 8px 10px; cursor: pointer;
  color: #0b0d14;
}
