/* ============================================
   Red Drops — Clean Facebook-style Design
   Light blue · White · Soft · Professional
   ============================================ */

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

:root {
  --fb-blue: #1877F2;
  --fb-blue-hover: #166FE5;
  --fb-blue-soft: #E7F3FF;
  --fb-blue-mid: #B6D4FE;
  --white: #FFFFFF;
  --bg: #F0F2F5;
  --text: #1C1E21;
  --text-secondary: #65676B;
  --border: #E4E6EB;
  --border-dark: #CED0D4;
  --success: #31A24C;
  --danger: #E41E3F;
  --warning: #F7B928;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

a { color: var(--fb-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--fb-blue-hover); text-decoration: none; }

/* ---------- Navbar ---------- */
.navbar-fb {
  background: var(--white) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-fb .navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--fb-blue) !important;
}

.navbar-fb .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px;
  margin: 0 2px;
}

.navbar-fb .nav-link:hover,
.navbar-fb .nav-link.active {
  color: var(--fb-blue) !important;
  background: var(--fb-blue-soft);
}

.btn-fb {
  background: var(--fb-blue);
  color: white !important;
  border: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-fb:hover {
  background: var(--fb-blue-hover);
  color: white !important;
}

.btn-fb-soft {
  background: var(--fb-blue-soft);
  color: var(--fb-blue) !important;
  border: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
}

.btn-fb-soft:hover {
  background: var(--fb-blue-mid);
  color: var(--fb-blue-hover) !important;
}

.btn-fb-outline {
  background: transparent;
  color: var(--fb-blue) !important;
  border: 1.5px solid var(--fb-blue);
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
}

.btn-fb-outline:hover {
  background: var(--fb-blue-soft);
}

.btn-fb-danger {
  background: var(--danger);
  color: white !important;
  border: none;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
}

/* ---------- Hero Slider (image only) ---------- */
.hero-carousel .carousel-item {
  height: 70vh;
  min-height: 380px;
  background: #0a1628;
}

.hero-carousel .carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-carousel .carousel-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  pointer-events: none;
}

.hero-carousel .carousel-caption-cta {
  bottom: 12%;
  top: auto;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.hero-carousel .carousel-indicators {
  z-index: 3;
}

.hero-carousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  margin: 0 4px;
  background-color: rgba(255, 255, 255, 0.6);
  opacity: 0.9;
}

.hero-carousel .carousel-indicators button.active {
  background-color: var(--fb-blue);
}

@media (max-width: 991.98px) {
  .hero-carousel .carousel-item {
    height: 60vh;
    min-height: 320px;
  }
  .hero-carousel .carousel-caption-cta {
    bottom: 10%;
  }
}

@media (max-width: 575.98px) {
  .hero-carousel .carousel-item {
    height: 52vh;
    min-height: 260px;
  }
  .hero-carousel .carousel-caption-cta {
    bottom: 8%;
  }
  .hero-carousel .carousel-caption-cta .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.1rem;
  }
}

/* ---------- Cards ---------- */
.card-fb {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  height: 100%;
  transition: var(--transition);
}

.card-fb:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-fb .card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-fb .card-body { padding: 1.25rem 1.35rem; }

.card-fb .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card-fb .card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Action / Stats strip ---------- */
.stats-strip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: -48px;
  position: relative;
  z-index: 10;
  padding: 1.5rem 1rem;
}

.stats-strip .stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fb-blue);
  line-height: 1.2;
}

.stats-strip .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---------- Section ---------- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ---------- Footer ---------- */
.footer-fb {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-fb h5 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-fb a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-fb a:hover { color: var(--fb-blue); }

.footer-fb .footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  text-align: center;
  color: #8A8D91;
}

/* ---------- Forms ---------- */
.form-fb .form-control,
.form-fb .form-select {
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  background: var(--bg);
  transition: var(--transition);
}

.form-fb .form-control:focus,
.form-fb .form-select:focus {
  border-color: var(--fb-blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.form-fb .form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.auth-card .auth-header {
  background: var(--fb-blue);
  color: white;
  padding: 1.75rem;
  text-align: center;
}

.auth-card .auth-header h2 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-card .auth-body { padding: 1.75rem; }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }

.admin-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  width: 250px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.admin-sidebar .brand {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar .brand a {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fb-blue);
}

.admin-sidebar .nav-link {
  color: var(--text-secondary);
  padding: 0.7rem 1.25rem;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
  background: var(--fb-blue-soft);
  color: var(--fb-blue);
}

.admin-sidebar .nav-link.active {
  background: var(--fb-blue-soft);
  color: var(--fb-blue);
  border-left-color: var(--fb-blue);
  font-weight: 600;
}

.admin-sidebar .sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-main {
  margin-left: 250px;
  min-height: 100vh;
  padding: 1.75rem 2rem;
}

.admin-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-card .card-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.table-fb thead th {
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.table-fb tbody td {
  padding: 0.9rem 1.15rem;
  vertical-align: middle;
  border-color: var(--border);
  font-size: 0.92rem;
}

.table-fb tbody tr:hover { background: #F7F8FA; }

.badge-blood {
  background: var(--fb-blue-soft);
  color: var(--fb-blue);
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.badge-page {
  background: #E7F3FF;
  color: #1877F2;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.badge-post {
  background: #E7F6EC;
  color: #31A24C;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

/* Tabs */
.nav-tabs-fb {
  border-bottom: 2px solid var(--border);
  gap: 0.25rem;
}

.nav-tabs-fb .nav-link {
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  background: transparent;
}

.nav-tabs-fb .nav-link:hover {
  color: var(--fb-blue);
  background: var(--fb-blue-soft);
}

.nav-tabs-fb .nav-link.active {
  color: var(--fb-blue);
  border-bottom-color: var(--fb-blue);
  background: transparent;
}

/* Page content */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-top: 1.5rem;
}

.donor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  height: 100%;
}

.donor-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--fb-blue-mid);
}

.donor-card .blood-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fb-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.alert-fb {
  border: none;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
}

@media (max-width: 991.98px) {
  .admin-sidebar { display: none !important; }
  .admin-main { margin-left: 0; padding: 1rem; }
  .stats-strip { margin-top: -24px; }
}
