/* ================================================================
   Roktodut (রক্তদূত) — Custom Stylesheet
   Built on top of Bootstrap 5
   ================================================================ */

/* ── Google Fonts ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  --red-primary:    #C0392B;
  --red-dark:       #962d22;
  --red-light:      #e74c3c;
  --red-glow:       rgba(192, 57, 43, 0.25);
  --bg-dark:        #0d1117;
  --bg-card:        #161b22;
  --bg-card-hover:  #1c2330;
  --border-color:   rgba(255,255,255,0.08);
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;
  --gradient-hero:  linear-gradient(135deg, #1a0a0a 0%, #2d1010 40%, #1a0505 100%);
  --gradient-card:  linear-gradient(145deg, #1c2330, #161b22);
  --shadow-card:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover:   0 8px 40px rgba(192,57,43,0.2);
  --radius-card:    16px;
  --radius-btn:     10px;
  --transition:     all 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Hind Siliguri', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Bengali text */
.bn { font-family: 'Hind Siliguri', sans-serif; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--red-primary); border-radius: 3px; }

/* ── Typography ──────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--text-primary); }
a { color: var(--red-light); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }
p { color: var(--text-secondary); }

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
  background: rgba(13,17,23,0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.navbar-brand {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-light), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Hind Siliguri', sans-serif;
}
.navbar .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
  background: rgba(192,57,43,0.15);
}
.navbar-toggler { border-color: var(--border-color); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28230, 237, 243, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(192,57,43,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(192,57,43,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--red-light);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 8s infinite;
}
@keyframes floatParticle {
  0%   { opacity:0; transform: translateY(100%) scale(0); }
  10%  { opacity:0.6; }
  90%  { opacity:0.2; }
  100% { opacity:0; transform: translateY(-100vh) scale(1.5); }
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  font-family: 'Hind Siliguri', sans-serif;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #ff6b6b 0%, var(--red-light) 50%, #ff9999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat-item { text-align: center; }
.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red-light);
  display: block;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Blood drop SVG animation */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blood-drop-icon {
  width: 200px; height: 200px;
  animation: pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(192,57,43,0.5));
}
@keyframes pulse {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 40px rgba(192,57,43,0.5)); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 60px rgba(192,57,43,0.8)); }
}
.hero-ring {
  position: absolute;
  border: 2px solid rgba(192,57,43,0.3);
  border-radius: 50%;
  animation: ringPulse 3s ease-out infinite;
}
.hero-ring-1 { width:240px; height:240px; animation-delay:0s; }
.hero-ring-2 { width:300px; height:300px; animation-delay:0.6s; }
.hero-ring-3 { width:360px; height:360px; animation-delay:1.2s; }
@keyframes ringPulse {
  0%   { transform: scale(0.8); opacity:0.8; }
  100% { transform: scale(1.2); opacity:0; }
}

/* ── Search Box ──────────────────────────────────────────────── */
.search-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}
.search-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ── Form Controls ───────────────────────────────────────────── */
.form-control, .form-select {
  background-color: rgba(255,255,255,0.05) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-btn) !important;
  padding: 12px 16px;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  background-color: rgba(255,255,255,0.08) !important;
  border-color: var(--red-primary) !important;
  box-shadow: 0 0 0 3px var(--red-glow) !important;
  outline: none;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-select option { background: var(--bg-card); color: var(--text-primary); }
.form-label { font-weight: 500; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 6px; }
.invalid-feedback { color: #ff6b6b !important; font-size: 0.82rem; }
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--red-light) !important;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary, .btn-danger {
  background: linear-gradient(135deg, var(--red-primary), var(--red-light)) !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  font-weight: 600;
  padding: 12px 28px;
  color: #fff !important;
  transition: var(--transition) !important;
  position: relative;
  overflow: hidden;
}
.btn-primary::after, .btn-danger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}
.btn-primary:hover::after, .btn-danger:hover::after {
  background: rgba(255,255,255,0.08);
}
.btn-primary:hover, .btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--red-glow) !important;
}
.btn-primary:active, .btn-danger:active { transform: translateY(0); }

.btn-outline-light {
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-btn) !important;
  font-weight: 500;
  transition: var(--transition) !important;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.06) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.btn-success {
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  font-weight: 600;
  transition: var(--transition) !important;
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46,204,113,0.3) !important;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--gradient-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  border-color: rgba(192,57,43,0.3) !important;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card-body { padding: 24px; }
.card-title { font-weight: 700; color: var(--text-primary); }
.card-text  { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Donor Card ──────────────────────────────────────────────── */
.donor-card {
  text-align: center;
  position: relative;
}
.donor-card .avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}
.donor-card .avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red-primary);
  box-shadow: 0 0 20px var(--red-glow);
}
.donor-card .blood-badge {
  position: absolute;
  bottom: 0; right: -6px;
}
.donor-card .donor-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.donor-card .donor-area {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.btn-call {
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff !important;
  transition: var(--transition) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-call:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(46,204,113,0.35) !important; }

/* ── Blood Badge ─────────────────────────────────────────────── */
.blood-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red-primary), var(--red-light));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  box-shadow: 0 2px 10px var(--red-glow);
  flex-shrink: 0;
}

/* ── Section Headers ─────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}
.section-divider {
  width: 48px; height: 4px;
  background: linear-gradient(90deg, var(--red-primary), var(--red-light));
  border-radius: 2px;
  margin: 12px auto 32px;
}

/* ── Stats Counter ───────────────────────────────────────────── */
.stat-card {
  text-align: center;
  padding: 32px 20px;
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--red-light);
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}
.stat-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

/* ── Emergency Request Card ──────────────────────────────────── */
.request-card {
  border-left: 3px solid var(--red-primary) !important;
}
.request-card.urgent { border-left-color: #ff4444 !important; }
.request-card .badge-blood {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-primary), var(--red-light));
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
}
.request-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ── Profile Page ────────────────────────────────────────────── */
.profile-avatar {
  width: 130px; height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--red-primary);
  box-shadow: 0 0 30px var(--red-glow);
}
.profile-card-left {
  text-align: center;
  padding: 32px 24px;
}
.profile-name { font-size: 1.4rem; font-weight: 700; margin-top: 16px; }
.profile-blood {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red-light);
  display: block;
  margin: 8px 0;
}

/* Visibility toggle switch */
.form-check-input:checked { background-color: var(--red-primary) !important; border-color: var(--red-primary) !important; }

/* Donate button pulse */
.btn-donate {
  background: linear-gradient(135deg, var(--red-dark), var(--red-primary), var(--red-light)) !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff !important;
  transition: var(--transition) !important;
  animation: donatePulse 2.5s ease-in-out infinite;
}
@keyframes donatePulse {
  0%,100% { box-shadow: 0 0 0 0 var(--red-glow); }
  50%      { box-shadow: 0 0 0 14px rgba(192,57,43,0); }
}
.btn-donate:hover { animation: none; transform: scale(1.04); }

/* ── Alert Banner ────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-btn) !important;
  border: none !important;
}
.alert-success { background: rgba(46,204,113,0.12) !important; color: #2ecc71 !important; }
.alert-danger  { background: rgba(231,76,60,0.12) !important;  color: #e74c3c !important; }
.alert-warning { background: rgba(241,196,15,0.12) !important; color: #f1c40f !important; }
.alert-info    { background: rgba(52,152,219,0.12) !important; color: #3498db !important; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}
.footer-brand {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Hind Siliguri', sans-serif;
  background: linear-gradient(135deg, var(--red-light), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--text-primary); padding-left: 4px; }
.footer-divider { border-color: var(--border-color); margin: 32px 0 20px; }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0; left: 0;
  overflow-y: auto;
  transition: var(--transition);
  z-index: 100;
}
.admin-sidebar .sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'Hind Siliguri', sans-serif;
  background: linear-gradient(135deg, var(--red-light), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.admin-sidebar .nav-link {
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(192,57,43,0.12);
  border-left-color: var(--red-primary);
}
.admin-content {
  margin-left: 260px;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-dark);
}
.admin-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-body { padding: 28px; }
.stat-widget {
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}
.stat-widget:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-widget-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-widget-icon.red   { background: rgba(192,57,43,0.15); }
.stat-widget-icon.green { background: rgba(46,204,113,0.15); }
.stat-widget-icon.blue  { background: rgba(52,152,219,0.15); }
.stat-widget-icon.amber { background: rgba(241,196,15,0.15); }
.stat-widget-num   { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-widget-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Admin Table */
.admin-table { color: var(--text-primary); }
.admin-table thead th {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-color: var(--border-color);
  padding: 12px 16px;
}
.admin-table tbody td {
  border-color: var(--border-color);
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 0.9rem;
}
.admin-table tbody tr { transition: var(--transition); }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ── Page Hero (inner pages) ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1010 100%);
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.breadcrumb-item { color: var(--text-muted); font-size: 0.85rem; }
.breadcrumb-item a { color: var(--red-light); }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ── Tag/Badge overrides ─────────────────────────────────────── */
.badge {
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}
.badge.bg-success { background: rgba(46,204,113,0.15) !important; color: #2ecc71 !important; }
.badge.bg-danger  { background: rgba(231,76,60,0.15) !important;  color: #e74c3c !important; }
.badge.bg-warning { background: rgba(241,196,15,0.15) !important; color: #f1c40f !important; }
.badge.bg-info    { background: rgba(52,152,219,0.15) !important; color: #3498db !important; }
.badge.bg-secondary { background: rgba(139,148,158,0.15) !important; color: #8b949e !important; }

/* ── Utilities ───────────────────────────────────────────────── */
.text-red   { color: var(--red-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-glass {
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
}
.divider-x {
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}
hr { border-color: var(--border-color); }

/* ── Animations ──────────────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
  to { opacity:1; transform:translateY(0); }
}
.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.15s; }
.fade-in-up:nth-child(3) { animation-delay: 0.25s; }
.fade-in-up:nth-child(4) { animation-delay: 0.35s; }
.fade-in-up:nth-child(5) { animation-delay: 0.45s; }
.fade-in-up:nth-child(6) { animation-delay: 0.55s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-content { margin-left: 0; }
  .hero { padding: 60px 0 50px; }
  .hero-ring { display: none; }
  .section { padding: 56px 0; }
}
@media (max-width: 576px) {
  .search-card { padding: 20px; }
  .stat-card { padding: 20px 12px; }
  .stat-number { font-size: 2rem; }
}
