/* ==========================================================================
   PMI RIAU - MOBILE WEB APPLICATION STYLESHEET
   Design System: Crimson Red, Pure Whites, Warm Gold Accents, Sleek Shadows
   ========================================================================== */

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

:root {
  --primary: #d32f2f;
  --primary-dark: #990000;
  --primary-light: #ff6659;
  --primary-bg: #fff5f5;
  --secondary: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.25);
  
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white: #ffffff;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  --wa-green: #25d366;
  --wa-dark: #128c7e;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(211, 47, 47, 0.25);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: #f8fafc;
  color: var(--gray-800);
  display: block;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* Full Width 100% Responsive Viewport Container */
#app-viewport {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px; /* Space for static bottom nav */
  margin: 0;
}

/* Demo Role Switcher Toolbar (Top Bar) */
.role-demo-bar {
  background: var(--dark);
  color: var(--white);
  padding: 10px 14px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1100;
}

.role-demo-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--secondary);
}

.role-select {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.role-select option {
  background: var(--dark-surface);
  color: var(--white);
}

/* App Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 16px 20px 20px;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  position: relative;
  box-shadow: var(--shadow-md);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.brand-container {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-logo-circle {
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: var(--radius-full);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  flex: 0 0 auto;
}

.brand-title h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: var(--white);
}

.brand-title span {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  display: block;
}

@media (max-width: 520px) {
  .brand-container {
    gap: 8px;
  }

  .brand-logo-circle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .brand-title {
    flex: 1 1 0;
    min-width: 0;
  }

  .brand-title h1 {
    font-size: 16px;
    white-space: nowrap;
  }
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.user-badge-bar {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-badge-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.role-pill {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--dark);
}

/* Sub-Nav Pills (For inner module views) */
.sub-nav-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.sub-nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-pill {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.tab-pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.25);
}

/* Main Content Area */
.app-content {
  padding: 16px;
  flex: 1;
}

/* Section Title */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 6px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--primary);
}

.see-all-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

/* Stat Grid Cards (Top Index) */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.red-glow {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
  border-left: 4px solid var(--primary);
}

.stat-card.gold-glow {
  background: linear-gradient(135deg, #ffffff 0%, #fffdf0 100%);
  border-left: 4px solid var(--secondary);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.stat-card.red-glow .stat-icon {
  background: var(--primary-bg);
  color: var(--primary);
}

.stat-card.gold-glow .stat-icon {
  background: rgba(212, 175, 55, 0.15);
  color: #b48c14;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Action Buttons Container (Login, Register, WA Chat) */
.action-buttons-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
}

.btn-whatsapp {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--wa-green) 0%, var(--wa-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  font-size: 14px;
  padding: 14px;
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

/* Sahabat Fasilitator Splash Card matching user image */
.sahabat-splash-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf9 100%);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid rgba(211, 47, 47, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sahabat-logo-wrap {
  width: 120px;
  height: 140px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pmi-logo-wrap {
  width: 220px;
  max-width: 100%;
  margin: 0 auto 8px;
}

.pmi-logo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sahabat-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(211, 47, 47, 0.3));
}

.sahabat-title-main {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #d32f2f;
  line-height: 1.1;
  margin-top: 4px;
}

.sahabat-title-gold {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #d4af37;
  margin-bottom: 16px;
}

.sahabat-motto {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
  margin-bottom: 16px;
}

.sahabat-motto .red-text {
  color: #d32f2f;
  font-weight: 800;
  display: block;
}

/* 3D Caricature Image Styling */
.sahabat-karikatur-wrap {
  width: 100%;
  max-width: 280px;
  margin: 8px auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sahabat-karikatur-wrap img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sahabat-karikatur-wrap img:hover {
  transform: translateY(-4px) scale(1.02);
}

/* Event Location Map Component */
.event-map-container {
  width: 100%;
  height: 170px;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0 8px;
  border: 1px solid #e5e7eb;
  position: relative;
  background: #f3f4f6;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.event-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.event-map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px;
  transition: background 0.2s ease;
}

.event-map-container:hover .event-map-overlay {
  background: rgba(0, 0, 0, 0.05);
}

.event-map-overlay-badge {
  background: rgba(17, 24, 39, 0.82);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.event-map-container:hover .event-map-overlay-badge {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.btn-maps-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
  margin-top: 4px;
}

.btn-maps-action:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.35);
}

/* Water / Blood Drop & Ripple Effect */
.blood-ripple-wrap {
  position: relative;
  width: 100%;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.blood-drop-small {
  width: 10px;
  height: 10px;
  background: #d32f2f;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin-bottom: 6px;
  animation: dropFall 2s infinite ease-in;
}

.blood-drop-main {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ff1744 0%, #b71c1c 100%);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(211, 47, 47, 0.4);
  z-index: 2;
}

.ripple-circle {
  position: absolute;
  bottom: 8px;
  width: 70px;
  height: 18px;
  border: 2px solid rgba(211, 47, 47, 0.6);
  border-radius: 50%;
  animation: rippleExpand 2s infinite ease-out;
}

.ripple-circle-2 {
  position: absolute;
  bottom: 4px;
  width: 110px;
  height: 26px;
  border: 1.5px solid rgba(211, 47, 47, 0.3);
  border-radius: 50%;
  animation: rippleExpand 2s infinite 0.6s ease-out;
}

@keyframes dropFall {
  0% { transform: translateY(-10px) rotate(-45deg) scale(0.8); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(12px) rotate(-45deg) scale(1); opacity: 0; }
}

@keyframes rippleExpand {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.splash-btn-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-splash-red {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(211, 47, 47, 0.35);
  transition: var(--transition);
}

.btn-splash-red:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(211, 47, 47, 0.45);
}

.btn-splash-outline {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  background: var(--white);
  color: #d32f2f;
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid #fca5a5;
  cursor: pointer;
  transition: var(--transition);
}

.btn-splash-outline:hover {
  background: #fff5f5;
}

/* Hero / Sahabat Banner Card */
.hero-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-md);
  padding: 18px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-subtitle {
  color: var(--secondary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 12px;
  color: var(--gray-300);
  line-height: 1.5;
}

/* Regency & Filter Controls */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.search-input, .select-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  transition: var(--transition);
}

.search-input:focus, .select-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Regency Blood Stock Card List */
.regency-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--gray-200);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.regency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--gray-200);
}

.regency-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.regency-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  color: var(--primary);
}

.stock-change-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.stock-change-notice i {
  margin-top: 2px;
  color: #d97706;
}

.education-bulletins {
  margin-top: 28px;
  scroll-margin-top: 12px;
}

.bulletin-intro {
  margin: -4px 0 12px;
  color: var(--gray-600);
  font-size: 12px;
  line-height: 1.5;
}

.bulletin-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.bulletin-item {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.bulletin-cover,
.bulletin-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, #fff1f2, #fee2e2);
  color: var(--primary);
  font-size: 40px;
}

.bulletin-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px;
}

.bulletin-category {
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bulletin-title {
  margin: 0 0 7px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.bulletin-excerpt {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  margin: 0 0 14px;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bulletin-read-more {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px 12px;
  font-size: 12px;
}

.bulletin-all-button {
  display: flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 700;
}

.education-list-page {
  padding-bottom: 24px;
  scroll-margin-top: 12px;
}

.education-filter {
  max-width: 360px;
  margin: 0 0 16px;
}

.education-filter .form-label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.education-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 8px;
}

.education-pagination .btn {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  font-size: 12px;
}

.education-pagination .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.education-page-status {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.education-page-status span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

.edu-cover-image,
.edu-view-cover,
.edu-edit-cover-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  margin: 0 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  object-fit: cover;
}

.edu-edit-cover-preview {
  max-width: 360px;
  max-height: 190px;
}

.education-detail-page {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.education-back-button {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 12px;
  font-size: 12px;
}

.education-detail-cover,
.education-detail-cover-placeholder {
  display: flex;
  width: 100%;
  max-height: 380px;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1f2, #fee2e2);
  color: var(--primary);
  font-size: 54px;
  object-fit: cover;
}

.education-detail-meta {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.education-detail-title {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.35;
}

.education-detail-content {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.education-detail-download {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}

.bulletin-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.bulletin-empty {
  padding: 18px;
  color: var(--gray-600);
  font-size: 13px;
  text-align: center;
}

.relawan-story-card {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.relawan-story-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid #fca5a5;
  border-radius: 50%;
  object-fit: cover;
}

.relawan-story-photo {
  display: block;
  width: 100%;
  max-height: 240px;
  margin: 0 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  object-fit: cover;
}

.relawan-story-quote {
  padding: 10px 12px;
  border-left: 3px solid #dc2626;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}

.relawan-story-delete {
  padding: 4px 8px;
  border-color: #fca5a5;
  background: #fff5f5;
  color: #dc2626;
  font-size: 10px;
}

.blood-type-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blood-stock-group {
  min-width: 0;
}

.blood-stock-components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.blood-stock-subtotal {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 0 4px;
  color: var(--gray-600);
  font-size: 11px;
}

.blood-stock-subtotal span {
  font-weight: 800;
  color: var(--primary);
}

.blood-stock-subtotal strong {
  color: var(--gray-900);
}

.blood-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  transition: var(--transition);
}

.blood-box.available {
  background: #fef2f2;
  border-color: #fecaca;
}

.blood-box.low {
  background: #fffbeb;
  border-color: #fde68a;
}

.blood-type-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2px;
}

.blood-type-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}

.blood-unit-label {
  font-size: 9px;
  color: var(--gray-500);
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

/* Static Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--gray-500);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  flex: 1;
  padding: 6px 0;
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  font-size: 18px;
  transition: var(--transition);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active i {
  transform: translateY(-2px);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Card Lists & Items (Disaster, Volunteer, Schedule, Education, Users) */
.item-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.item-card:hover {
  box-shadow: var(--shadow-md);
}

.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}

.item-meta {
  font-size: 11px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-desc {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.4;
  margin-top: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* Volunteer Category Badges */
.cat-umum { background: #e0f2fe; color: #0369a1; }
.cat-ksr { background: #fef3c7; color: #b45309; }
.cat-tsr { background: #dcfce7; color: #15803d; }
.cat-pmr { background: #fce7f3; color: #be185d; }

/* Profile Card */
.profile-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 3px solid var(--primary);
}

.profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
}

.profile-role-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}

.detail-box {
  background: var(--gray-50);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.detail-label {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 600;
}

.detail-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  background: var(--dark-surface);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 8px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* WYSIWYG Rich Text Editor Component */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 6px 8px;
}

.editor-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editor-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.editor-btn:active {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
}

.rich-text-editor {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #1e293b;
  outline: none;
}

.rich-text-editor:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.rich-text-editor p {
  margin-bottom: 8px;
}

.rich-text-editor ul, .rich-text-editor ol {
  margin-left: 20px;
  margin-bottom: 8px;
}

/* Clean Education Content & Typography Formatting */
.edu-content-view, .rich-text-editor {
  line-height: 1.8 !important;
  color: #334155 !important;
  font-size: 13.5px !important;
}

.edu-content-view p, .rich-text-editor p {
  margin-bottom: 12px !important;
  line-height: 1.8 !important;
  color: #334155 !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.edu-content-view ul, .rich-text-editor ul,
.edu-content-view div > ul, .rich-text-editor div > ul {
  list-style: none !important;
  padding-left: 24px !important;
  margin-left: 16px !important;
  margin-top: 10px !important;
  margin-bottom: 16px !important;
}

.edu-content-view ol, .rich-text-editor ol,
.edu-content-view div > ol, .rich-text-editor div > ol {
  padding-left: 28px !important;
  margin-left: 16px !important;
  margin-top: 10px !important;
  margin-bottom: 16px !important;
}

.edu-content-view li, .rich-text-editor li,
.edu-content-view ul li, .rich-text-editor ul li {
  position: relative !important;
  padding-left: 20px !important;
  margin-bottom: 8px !important;
  line-height: 1.7 !important;
  color: #334155 !important;
  list-style: none !important;
}

.edu-content-view ul li::before, .rich-text-editor ul li::before {
  content: "•" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0px !important;
  color: #dc2626 !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  font-weight: bold !important;
}

.edu-content-view h1, .rich-text-editor h1,
.edu-content-view h2, .rich-text-editor h2,
.edu-content-view h3, .rich-text-editor h3,
.edu-content-view h4, .rich-text-editor h4 {
  font-weight: 800 !important;
  font-size: 15px !important;
  color: #0f172a !important;
  margin-top: 16px !important;
  margin-bottom: 10px !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 4px !important;
}

/* Permanently hide top section Edit Stock button */
.section-header button[onclick*="openStockEditModal"] {
  display: none !important;
}

/* ==========================================================================
   Comprehensive Device Responsiveness (Mobile, Tablet, Desktop)
   ========================================================================== */

@media (min-width: 768px) {
  .app-header {
    padding: 24px 32px;
  }

  .app-content {
    padding: 24px 32px;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px;
  }

  .quick-action-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px;
  }

  .blood-stock-components {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }

  .profile-details-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
  }

  .sahabat-splash-card {
    padding: 32px 24px;
  }

  .sahabat-karikatur-wrap {
    max-width: 360px;
  }

  .sahabat-karikatur-wrap img {
    max-height: 300px;
  }

  .modal-card {
    max-width: 750px !important;
  }
}

@media (min-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
