/* ── App Layout ── */
.app {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  background: transparent;
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: opacity 0.2s ease;
  text-decoration: none;
}
.brand:hover { opacity: 0.85; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(109, 93, 252, 0.45);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(109, 93, 252, 0.35), rgba(17, 24, 39, 0.7));
  box-shadow: 0 0 30px rgba(109, 93, 252, 0.22);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-info strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-info span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Nav Container ── */
.nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.nav::-webkit-scrollbar { width: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  min-height: 34px;
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 13.5px;
  font-weight: 450;
  transition: all 0.15s ease;
  position: relative;
  text-decoration: none;
}
.nav a:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
}
.nav a.active {
  background: rgba(124,92,255,0.12);
  color: #fff;
  font-weight: 550;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.nav-icon svg { width: 16px; height: 16px; }
.nav a:hover .nav-icon { opacity: 0.85; }
.nav a.active .nav-icon { opacity: 1; }

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  margin-left: auto;
  background: rgba(124,92,255,0.2);
  color: #A78BFA;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  line-height: 1.6;
  flex-shrink: 0;
}

/* ── Group Labels ── */
.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(124,92,255,0.5);
  padding: 16px 10px 6px;
  margin-top: 2px;
}

/* ── Divider ── */
.nav-divider {
  height: 1px;
  margin: 8px 10px;
  background: rgba(255,255,255,0.05);
}

/* ── Side Status ── */
.side-status {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  margin-top: 4px;
}
.side-status .status-line {
  font-size: 12px;
  font-weight: 600;
  color: #3EE089;
}
.side-status .status-line::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3EE089;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(62,224,137,0.5);
}
.side-status p { font-size: 11.5px; margin-top: 4px; }
.side-status strong { color: var(--text); }

/* ── Main Content ── */
main { min-width: 0; padding: 0; }

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 28px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, var(--bg) 60%, transparent);
  margin-bottom: 4px;
}

/* ── Footer ── */
.footer {
  margin: 20px 0 0;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #B8C2CC;
  font-size: 13px;
}

.footer-copy {
  white-space: nowrap;
}

.footer-built {
  white-space: nowrap;
}

.footer-icon {
  display: inline-block;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.footer-icon.love:hover {
  transform: scale(1.2);
  text-shadow: 0 0 12px rgba(255, 100, 100, 0.5);
}

.footer-icon.coffee:hover {
  transform: scale(1.2);
  text-shadow: 0 0 12px rgba(180, 130, 80, 0.4);
}

.footer-divider {
  opacity: 0.3;
  margin: 0 4px;
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #B8C2CC;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.footer-top:hover {
  color: #fff;
}

.footer-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.footer-top:hover .footer-arrow {
  transform: translateY(-3px);
}

/* ── Mobile Navigation ── */
.mobile-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  transition: color 0.15s;
  text-align: center;
}
.mobile-nav a .nav-icon {
  width: 20px;
  height: 20px;
  font-size: 16px;
}
.mobile-nav a.active { color: var(--primary); }
.mobile-nav a span:last-child { font-size: 9px; line-height: 1; }

/* ── Section Utilities ── */
section { scroll-margin-top: 80px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 10px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}
.section-mini {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
