:root {
  --brand-color: #1d4ed8;
  --brand-dark: #1e3a8a;
  --bg-soft: #f5f7fb;
  --sidebar-width: 240px;
}

body {
  background-color: var(--bg-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Layout: sidebar + topbar (desktop), collapsible on mobile ---- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  transition: transform 0.2s ease-in-out;
  z-index: 1030;
}

.app-sidebar .brand {
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--brand-dark);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-sidebar .nav-link {
  color: #374151;
  padding: 0.6rem 1.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.925rem;
}

.app-sidebar .nav-link:hover {
  background: var(--bg-soft);
}

.app-sidebar .nav-link.active {
  background: #eff4ff;
  color: var(--brand-color);
  font-weight: 600;
  border-right: 3px solid var(--brand-color);
}

.app-sidebar .nav-section-title {
  padding: 0.75rem 1.25rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 1.1rem 1.25rem;
  height: 100%;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

.stat-card .stat-label {
  color: #6b7280;
  font-size: 0.85rem;
}

.stat-card .stat-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff4ff;
  color: var(--brand-color);
}

.auth-card {
  max-width: 400px;
  width: 100%;
}

.badge-status-berlangsung { background: #dcfce7; color: #166534; }
.badge-status-selesai { background: #e5e7eb; color: #374151; }
.badge-status-terjadwal { background: #fef9c3; color: #854d0e; }

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
  }
}
