/* ═══════════════════════════════════════════════════════════════
   NIA Youth Platform – Islamic Aesthetic Design System
   Green: #1B5E20 / Gold: #C8A020 / Cream: #FFF8E7
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&family=Poppins:wght@400;600;700&display=swap');

:root {
  --green-dark:   #1B5E20;
  --green-mid:    #2E7D32;
  --green-light:  #43A047;
  --green-pale:   #E8F5E9;
  --gold:         #C8A020;
  --gold-light:   #F4D03F;
  --gold-pale:    #FFF9E6;
  --cream:        #FFF8E7;
  --white:        #FFFFFF;
  --text-dark:    #1A1A2E;
  --text-muted:   #6B7280;
  --border:       #D4C5A9;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.12);
  --shadow-gold:  0 4px 20px rgba(200,160,32,0.25);
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; font-weight: 700; }
.arabic { font-family: 'Amiri', serif; direction: rtl; font-size: 1.3em; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-nia {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand-nia {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}
.navbar-brand-nia .brand-icon {
  width: 44px; height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 0 3px rgba(200,160,32,0.3);
  transition: var(--transition);
}
.navbar-brand-nia:hover .brand-icon { transform: rotate(10deg) scale(1.05); }
.navbar-brand-nia .brand-text { color: var(--white); }
.navbar-brand-nia .brand-text span {
  display: block; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 1rem; line-height: 1.1;
}
.navbar-brand-nia .brand-text small {
  font-size: 0.65rem; opacity: 0.8; letter-spacing: 0.05em;
}
.nav-link-nia {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav-link-nia:hover, .nav-link-nia.active {
  color: var(--gold-light) !important;
  background: rgba(255,255,255,0.1);
}
.nav-link-nia.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--gold); border-radius: 2px;
}
.btn-nav-primary {
  background: var(--gold);
  color: var(--green-dark) !important;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.45rem 1.1rem !important;
  transition: var(--transition);
}
.btn-nav-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

/* ── Hero Section ────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 50%, #1a3a4a 100%);
  min-height: 92vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M40 0L51.96 20H71.96L56.98 32.36L62.94 52.36L40 40L17.06 52.36L23.02 32.36L8.04 20H28.04L40 0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
/* Geometric star pattern overlay */
.hero-section::after {
  content: '';
  position: absolute; top: -20%; right: -10%;
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(200,160,32,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(200,160,32,0.15);
  border: 1px solid rgba(200,160,32,0.4);
  color: var(--gold-light);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero-title .highlight { color: var(--gold); }
.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  max-width: 560px;
}
.hero-quran {
  background: rgba(255,255,255,0.06);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.8rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(8px);
}
.hero-quran .arabic-verse {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  color: var(--gold-light);
  text-align: right;
  direction: rtl;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.hero-quran .verse-ref {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-style: italic;
}
.hero-stats {
  display: flex; gap: 2rem; margin-top: 2rem;
}
.hero-stat { text-align: center; color: var(--white); }
.hero-stat .stat-num { font-size: 1.8rem; font-weight: 700; color: var(--gold); display: block; }
.hero-stat .stat-label { font-size: 0.75rem; opacity: 0.7; letter-spacing: 0.04em; }

/* ── Cards ───────────────────────────────────────────────────── */
.card-nia {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(212,197,169,0.4);
  transition: var(--transition);
  overflow: hidden;
}
.card-nia:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.card-nia .card-header-nia {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: var(--white);
  padding: 1.25rem 1.5rem;
}
.card-nia .card-body { padding: 1.5rem; }

/* ── Section Titles ─────────────────────────────────────────── */
.section-title {
  text-align: center; margin-bottom: 3rem; position: relative;
}
.section-title h2 { color: var(--green-dark); font-size: 2rem; margin-bottom: 0.5rem; }
.section-title p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-title::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--green-mid), var(--gold));
  border-radius: 2px; margin: 1rem auto 0;
}

/* ── Feature Icons ───────────────────────────────────────────── */
.feature-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--green-pale), #c8e6c9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(67,160,71,0.2);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary-nia {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: var(--white);
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(46,125,50,0.3);
}
.btn-primary-nia:hover {
  background: linear-gradient(135deg, var(--green-light), var(--green-mid));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46,125,50,0.4);
  color: var(--white);
}
.btn-gold-nia {
  background: linear-gradient(135deg, var(--gold), #a07818);
  color: var(--white);
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
}
.btn-gold-nia:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200,160,32,0.45);
  color: var(--white);
}
.btn-outline-nia {
  background: transparent;
  color: var(--green-mid);
  border: 2px solid var(--green-mid);
  padding: 0.65rem 1.7rem;
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-outline-nia:hover {
  background: var(--green-mid);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Motivation Card ────────────────────────────────────────── */
.motivation-card {
  background: linear-gradient(135deg, var(--gold-pale) 0%, var(--cream) 100%);
  border: 2px solid rgba(200,160,32,0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.motivation-card::before {
  content: '❝';
  position: absolute; top: 1rem; left: 1.5rem;
  font-size: 5rem; color: rgba(200,160,32,0.15);
  font-family: Georgia, serif; line-height: 1;
}
.motivation-text { font-size: 1.05rem; color: var(--text-dark); font-style: italic; position: relative; z-index: 1; }
.motivation-source { color: var(--gold); font-weight: 600; font-size: 0.85rem; margin-top: 0.75rem; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge-nia-green { background: var(--green-pale); color: var(--green-dark); font-weight: 600; }
.badge-nia-gold  { background: var(--gold-pale);  color: #7a5c00; font-weight: 600; }
.badge-pending   { background: #FFF3CD; color: #856404; font-weight: 600; }
.badge-approved  { background: var(--green-pale); color: var(--green-dark); font-weight: 600; }
.badge-rejected  { background: #F8D7DA; color: #842029; font-weight: 600; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-nia .form-control, .form-nia .form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  transition: var(--transition);
}
.form-nia .form-control:focus, .form-nia .form-select:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(67,160,71,0.15);
}
.form-nia label { font-weight: 600; color: var(--green-dark); margin-bottom: 0.35rem; }

/* ── AI Chat Bubble ─────────────────────────────────────────── */
.chat-bubble {
  background: var(--green-pale);
  border-left: 4px solid var(--green-mid);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
  white-space: pre-wrap;
  position: relative;
  animation: fadeInUp 0.4s ease;
}
.chat-bubble.user {
  background: var(--gold-pale);
  border-left-color: var(--gold);
  text-align: right;
  border-radius: var(--radius) 0 var(--radius) var(--radius);
}
.chat-bubble .bubble-icon {
  position: absolute; top: -10px; left: -12px;
  width: 28px; height: 28px;
  background: var(--green-mid); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.8rem;
}

/* ── Admin Dashboard ─────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 5px solid var(--green-mid);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card.gold { border-left-color: var(--gold); }
.stat-card.red  { border-left-color: #e53935; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--green-dark); }
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.red  .stat-value { color: #e53935; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }
.stat-card .stat-icon { font-size: 2.5rem; opacity: 0.15; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.admin-sidebar {
  background: linear-gradient(180deg, var(--green-dark) 0%, #0d3b1a 100%);
  min-height: 100vh;
  padding: 1.5rem 0;
  position: sticky; top: 0;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.65rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-right: 0.75rem;
  transition: var(--transition);
  display: flex; align-items: center; gap: 0.6rem;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  background: rgba(255,255,255,0.12);
  color: var(--gold-light);
}

/* ── Table ───────────────────────────────────────────────────── */
.table-nia thead {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: var(--white);
}
.table-nia thead th { font-weight: 600; border: none; padding: 0.9rem 1rem; }
.table-nia tbody td { vertical-align: middle; padding: 0.85rem 1rem; }
.table-nia tbody tr:hover { background: var(--green-pale); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer-nia {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0d3b1a 100%);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}
.footer-nia a { color: var(--gold-light); text-decoration: none; transition: var(--transition); }
.footer-nia a:hover { color: var(--white); }
.footer-divider { border-color: rgba(255,255,255,0.1); }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,160,32,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(200,160,32,0); }
}
.animate-fade-up { animation: fadeInUp 0.5s ease forwards; }
.pulse-gold { animation: pulse-gold 2s infinite; }

/* ── Geometric Decorative Elements ─────────────────────────────*/
.geo-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--green-mid), var(--gold), transparent);
  border: none; margin: 2.5rem 0;
}
.geo-star {
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 17l-6.2 4.3 2.4-7.4L2 9.4h7.6z' fill='%23C8A020'/%3E%3C/svg%3E")
  center/contain no-repeat;
  width: 20px; height: 20px;
}
/* Quran verse display */
.quran-block {
  background: linear-gradient(135deg, var(--gold-pale), #fffce8);
  border: 1px solid rgba(200,160,32,0.35);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
}
.quran-block .arabic-text {
  font-family: 'Amiri', serif; font-size: 1.8rem;
  color: var(--green-dark); direction: rtl; line-height: 2;
}
.quran-block .translation { color: var(--text-muted); font-style: italic; font-size: 0.95rem; }
.quran-block .reference { color: var(--gold); font-weight: 700; font-size: 0.85rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section { min-height: auto; padding: 4rem 0; }
  .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
  .hero-title { font-size: 2rem; }
  .admin-sidebar { min-height: auto; }
  .section-title h2 { font-size: 1.6rem; }
}

/* ── Spinner (AI loading) ────────────────────────────────────── */
.ai-loading {
  display: none;
  text-align: center; padding: 1.5rem;
}
.ai-loading .spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--green-pale);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
