/* ── App Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Collapse button inside sidebar header */
.sidebar-collapse-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--color-sidebar-text);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.sidebar-collapse-btn:hover {
  background: var(--color-sidebar-hover-bg);
  color: #fff;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: var(--font-size-xs);
  color: var(--color-sidebar-text);
}

/* Nav */
.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.nav-section-label {
  padding: 8px 20px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--color-sidebar-text);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  position: relative;
}

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

.nav-link.active {
  background-color: var(--color-sidebar-active-bg);
  color: var(--color-sidebar-active-text);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-primary);
  border-radius: 0 2px 2px 0;
}

/* Red pulsing badge for pending requests on the sidebar nav link */
.nav-link .nav-pending-badge {
  margin-left: auto;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
  animation: nav-pending-pulse 1.6s ease-in-out infinite;
}
@keyframes nav-pending-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25); }
  50%      { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.0);  }
}

.nav-link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
}

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

/* Top header bar */
.content-header {
  height: var(--header-height);
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.content-header-left {
  display: flex;
  flex-direction: column;
}

.content-header h1 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.content-header-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.content-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Page body */
.page-body {
  padding: 24px 28px;
  flex: 1;
}

/* Section card */
.section-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-card-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
}

.section-card-body {
  padding: 20px;
}
