/* ==========================================================
   MODERN & CLEAN UI/UX STYLESHEET (COMFORTABLE & ELEGANT)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Modern Softer Color Palette */
  --brand-primary: #1e3a8a;
  --brand-primary-hover: #1e40af;
  --brand-primary-light: #eff6ff;
  
  --brand-emerald: #059669;
  --brand-emerald-light: #ecfdf5;
  --brand-emerald-border: #a7f3d0;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 20px -3px rgba(30, 58, 138, 0.09);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navbar ---- */
.navbar-app {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  box-shadow: var(--shadow-sm);
}
.navbar-app .navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand-primary) !important;
  letter-spacing: -0.02em;
}
.navbar-app .nav-link {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted) !important;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.navbar-app .nav-link:hover,
.navbar-app .nav-link.active {
  color: var(--brand-primary) !important;
  background-color: var(--brand-primary-light);
}

/* ---- Hero / Stepper Banner ---- */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  padding: 2.2rem 0 2rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.hero-banner h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  font-size: 1.75rem;
}
.hero-banner p {
  color: #bfdbfe;
  font-size: 0.92rem;
  max-width: 650px;
}

/* ---- Modern Cards ---- */
.card-clean {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.card-clean:hover {
  box-shadow: var(--shadow-md);
}

/* ---- Stat Cards (Minimalist & Crisp) ---- */
.stat-pill-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  height: 100%;
}
.stat-pill-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.stat-icon-blue   { background: #eff6ff; color: #2563eb; }
.stat-icon-green  { background: #ecfdf5; color: #059669; }
.stat-icon-purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon-amber  { background: #fffbeb; color: #d97706; }

.stat-pill-card .stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}
.stat-pill-card .stat-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.stat-progress-bar {
  height: 5px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.stat-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ---- Modern Stepper / Tabs ---- */
.stepper-nav {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.35rem;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.stepper-btn {
  flex: 1;
  min-width: 170px;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.stepper-btn:hover {
  color: var(--brand-primary);
  background: #f1f5f9;
}
.stepper-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}
.stepper-btn .badge-pill {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0,0,0,0.08);
}
.stepper-btn.active .badge-pill {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

/* ---- Filter Chips ---- */
.filter-chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.filter-chip {
  border: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-chip:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}
.filter-chip.active {
  background: var(--brand-primary-light);
  border-color: #bfdbfe;
  color: var(--brand-primary);
}

/* ---- Checklist Item Row (Friendly & Un-intimidating) ---- */
.item-row-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.65rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.item-row-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.item-row-card.is-active {
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
}

.item-row-header {
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}
.item-row-card.is-active .item-row-header {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.item-row-body {
  padding: 1.35rem;
  background: #ffffff;
  display: none;
  animation: fadeIn 0.2s ease;
}
.item-row-card.is-active .item-row-body {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern Form Controls */
.form-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form-control, .form-select {
  font-family: var(--font-main);
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.8rem;
  color: var(--text-main);
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  outline: none;
}
.form-control::placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
}

/* ---- Modern Switch ---- */
.form-check-input {
  cursor: pointer;
  width: 2.2em;
  height: 1.2em;
}
.form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

/* ---- Majelis Taklim Subform Box ---- */
.mt-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-top: 1rem;
}
.mt-row-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.45rem;
}

/* ---- Sticky Bottom Action Bar ---- */
.sticky-action-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  z-index: 99;
  padding: 0.85rem 1.5rem;
}

/* Status Badges */
.badge-clean {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-clean-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-clean-muted   { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.badge-clean-primary { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Buttons */
.btn-primary {
  background: #1e3a8a;
  border-color: #1e3a8a;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 1.25rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
}
