/* DIU Blood Bank - Modern UI Design */
/* Developed by Backbencher Society */

/* Membership Card Styles */
.membership-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.membership-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(220, 38, 38, 0.4);
}

.membership-card-gradient {
  background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
}

.membership-qr-code {
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.membership-barcode {
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.verification-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #10b981;
}

.verification-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
}

.verification-expired {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
}

/* Professional Membership Card Responsive Design */
@media (max-width: 768px) {
  .membership-card {
    padding: 1.5rem !important;
    margin: 0 1rem;
    max-width: 380px !important;
  }
  
  .membership-card h1,
  .membership-card h2,
  .membership-card h3 {
    font-size: 0.9rem !important;
  }
  
  .membership-card .member-name {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 480px) {
  .membership-card {
    padding: 1.25rem !important;
    margin: 0 0.75rem;
    max-width: 350px !important;
  }
  
  .membership-card .barcode-bottom-section {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: center !important;
  }
  
  .membership-card .barcode-bottom-section > div {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Barcode styling */
.barcode-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 480px) {
  .barcode-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .barcode-section > div {
    width: 100%;
    text-align: center;
  }
}

/* Enhanced barcode container */
.barcode-container {
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s ease;
}

.barcode-container:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Card number styling */
.card-number {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Print styles for membership card */
@media print {
  .membership-card {
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  .card-actions,
  .btn,
  button {
    display: none !important;
  }
}

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

/* Prevent mobile view on desktop - Critical Fix */
@viewport {
  width: device-width;
  zoom: 1.0;
}

@-ms-viewport {
  width: device-width;
}

/* Color Palette */
:root {
  --bg-offwhite: #F8F9FA;
  --primary-red: #E61926;
  --deep-maroon: #8B0A10;
  --accent-blue: #5BC2E7;
  --neutral-grey: #444B54;
  --text-dark: #222222;
  --text-light: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: #FAF9F6;
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

body.menu-open {
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 40px;
  }
}

/* Navbar */
.navbar {
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  animation: fadeIn 0.3s ease;
}

.mobile-menu-backdrop.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 1024px) {
  .mobile-menu-backdrop {
    display: none !important;
  }
}

.navbar.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  position: relative;
}

@media (min-width: 768px) {
  .navbar-content {
    padding: 16px 0;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: var(--transition);
  z-index: 1001;
}

@media (min-width: 768px) {
  .navbar-brand {
    gap: 14px;
  }
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.navbar-brand:hover .logo-icon-wrapper {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(230, 25, 38, 0.4);
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(230, 25, 38, 0.35), 0 2px 4px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .logo-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }
}

.logo-icon-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-icon {
  width: 26px !important;
  height: 26px !important;
  color: var(--text-light);
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .logo-icon {
    width: 30px !important;
    height: 30px !important;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-main {
  font-size: 19px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .brand-main {
    font-size: 23px;
  }
}

@media (min-width: 1024px) {
  .brand-main {
    font-size: 25px;
  }
}

.brand-tagline {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  line-height: 1;
  opacity: 0.95;
}

@media (min-width: 768px) {
  .brand-tagline {
    font-size: 11px;
  }
}

@media (min-width: 1024px) {
  .brand-tagline {
    font-size: 12px;
  }
}

.navbar-menu {
  display: none;
  list-style: none;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .navbar-menu {
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .navbar-menu {
    display: flex;
    gap: 20px;
  }
}

.navbar-menu.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  gap: 6px;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 480px) {
  .navbar-menu.mobile-open {
    padding: 20px;
    gap: 8px;
  }
}

@media (min-width: 768px) {
  .navbar-menu.mobile-open {
    top: 68px;
    max-height: calc(100vh - 68px);
    padding: 24px;
    gap: 8px;
  }
}

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

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 6px;
  color: var(--primary-red);
  z-index: 1001;
  border-radius: 8px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    padding: 8px;
  }
}

.mobile-menu-toggle:hover {
  background: rgba(230, 25, 38, 0.08);
  border-color: rgba(230, 25, 38, 0.2);
}

.mobile-menu-toggle:active {
  transform: scale(0.92);
  background: rgba(230, 25, 38, 0.12);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.navbar-menu li {
  width: 100%;
}

@media (min-width: 1024px) {
  .navbar-menu li {
    width: auto;
  }
}

.navbar-menu a {
  text-decoration: none;
  color: var(--neutral-grey);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}

@media (min-width: 480px) {
  .navbar-menu a {
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  .navbar-menu a {
    font-size: 16px;
    padding: 14px 18px;
    min-height: 48px;
  }
}

@media (min-width: 1024px) {
  .navbar-menu a {
    font-size: 15px;
    padding: 10px 16px;
    width: auto;
    min-height: auto;
  }
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary-red);
  background: rgba(230, 25, 38, 0.08);
  transform: translateX(4px);
}

@media (min-width: 1024px) {
  .navbar-menu a:hover,
  .navbar-menu a.active {
    transform: translateY(-2px);
  }
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--primary-red);
  transition: transform 0.3s ease;
  display: none;
}

@media (min-width: 1024px) {
  .navbar-menu a::after {
    display: block;
  }
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar-menu a i {
  flex-shrink: 0;
}

/* Mobile menu form buttons */
.navbar-menu form {
  width: 100%;
}

@media (min-width: 1024px) {
  .navbar-menu form {
    width: auto;
  }
}

.navbar-menu .btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .navbar-menu .btn {
    min-height: 48px;
  }
}

@media (min-width: 1024px) {
  .navbar-menu .btn {
    width: auto;
    justify-content: center;
    min-height: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  font-family: 'Poppins', Arial, sans-serif;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .btn {
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(230, 25, 38, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 25, 38, 0.4);
}

.btn-secondary {
  background: var(--accent-blue);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(91, 194, 231, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 194, 231, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
}

.btn-outline:hover {
  background: var(--primary-red);
  color: var(--text-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .btn-sm {
    padding: 8px 16px;
    font-size: 14px;
  }
}

.btn-danger {
  background: var(--deep-maroon);
  color: var(--text-light);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  color: var(--text-light);
  padding: 48px 0;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 64px 0;
    margin-bottom: 40px;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding: 80px 0;
    margin-bottom: 48px;
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 200px;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .hero-content h1 {
    font-size: 36px;
  }
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 42px;
    margin-bottom: 16px;
  }
}

@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 48px;
  }
}

.hero-content p {
  font-size: 15px;
  margin-bottom: 24px;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero-content p {
    font-size: 17px;
    margin-bottom: 28px;
  }
}

@media (min-width: 1024px) {
  .hero-content p {
    font-size: 18px;
    margin-bottom: 32px;
  }
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  background: var(--text-light);
  color: var(--primary-red);
}

.hero-actions .btn:hover {
  background: var(--bg-offwhite);
}

.hero-actions .btn-outline {
  background: transparent;
  border-color: var(--text-light);
  color: var(--text-light);
}

.hero-actions .btn-outline:hover {
  background: var(--text-light);
  color: var(--primary-red);
}

/* Section Headers */
.section-header {
  margin: 32px 0 20px 0;
}

@media (min-width: 768px) {
  .section-header {
    margin: 40px 0 28px 0;
  }
}

@media (min-width: 1024px) {
  .section-header {
    margin: 48px 0 32px 0;
  }
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
  }
}

@media (min-width: 1024px) {
  .section-header h2 {
    font-size: 32px;
  }
}

.section-header p {
  font-size: 14px;
  color: var(--neutral-grey);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .section-header p {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .section-header p {
    font-size: 16px;
  }
}

/* Cards */
.card {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .card {
    padding: 24px;
    margin-bottom: 24px;
  }
}

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

.card-header {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-offwhite);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .grid {
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .grid {
    gap: 24px;
  }
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Donor Card */
.donor-card {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .donor-card {
    padding: 24px;
  }
}

.donor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--accent-blue));
  transform: scaleX(0);
  transition: var(--transition);
}

.donor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(91, 194, 231, 0.3);
}

.donor-card:hover::before {
  transform: scaleX(1);
}

.donor-blood-type {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary-red);
  text-align: center;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(230, 25, 38, 0.2);
  background: linear-gradient(135deg, var(--primary-red), var(--deep-maroon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .donor-blood-type {
    font-size: 48px;
    margin-bottom: 16px;
  }
}

.donor-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .donor-name {
    font-size: 18px;
  }
}

.donor-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neutral-grey);
  font-size: 13px;
  margin: 4px 0;
  padding: 4px 0;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .donor-info {
    font-size: 14px;
    margin: 6px 0;
    padding: 6px 0;
  }
}

.donor-info svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.donor-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bg-offwhite);
}

@media (min-width: 768px) {
  .donor-status {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* Blood Request Card */
.request-card {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-red);
  transition: var(--transition);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .request-card {
    padding: 24px;
    margin-bottom: 24px;
  }
}

.request-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-blue);
  transform: scaleY(0);
  transition: var(--transition);
}

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

.request-card:hover::after {
  transform: scaleY(1);
}

.request-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.request-blood-type {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-red);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-red), var(--deep-maroon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 768px) {
  .request-blood-type {
    font-size: 36px;
  }
}

.request-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 8px 0;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .request-title {
    font-size: 20px;
  }
}

.request-meta {
  font-size: 13px;
  color: var(--neutral-grey);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .request-meta {
    font-size: 14px;
  }
}

.request-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}

@media (min-width: 640px) {
  .request-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .request-details {
    margin: 16px 0;
  }
}

.request-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-grey);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .request-detail-item {
    font-size: 14px;
  }
}

.request-detail-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.request-detail-item strong {
  color: var(--text-dark);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--text-light);
}

.badge-danger {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  color: var(--text-light);
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--text-light);
}

.badge-info {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #0ea5e9 100%);
  color: var(--text-light);
}

.urgency-critical {
  background: linear-gradient(135deg, var(--deep-maroon) 0%, #7f1d1d 100%);
  color: var(--text-light);
  animation: pulse 2s infinite;
}

.urgency-high {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-maroon) 100%);
  color: var(--text-light);
}

.urgency-medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--text-light);
}

.urgency-low {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--text-light);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Poppins', Arial, sans-serif;
  transition: all 0.3s ease;
  background: var(--text-light);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(91, 194, 231, 0.1);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-text {
  font-size: 12px;
  color: var(--neutral-grey);
  margin-top: 4px;
  line-height: 1.4;
}

.text-muted {
  color: var(--neutral-grey) !important;
  opacity: 0.8;
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-left: 4px solid var(--primary-red);
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-left: 4px solid var(--accent-blue);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: var(--text-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.empty-state-icon {
  font-size: 64px;
  color: var(--neutral-grey);
  opacity: 0.5;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 16px;
  color: var(--neutral-grey);
  margin-bottom: 24px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .stats-grid {
    gap: 20px;
    margin-bottom: 28px;
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
  }
}

.stat-card {
  background: linear-gradient(135deg, var(--text-light) 0%, var(--bg-offwhite) 100%);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid transparent;
}

@media (min-width: 768px) {
  .stat-card {
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  .stat-card {
    padding: 24px;
  }
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blue);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 6px;
  line-height: 1;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 36px;
    margin-bottom: 8px;
  }
}

.stat-label {
  font-size: 12px;
  color: var(--neutral-grey);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .stat-label {
    font-size: 14px;
  }
}

.stat-icon {
  font-size: 48px;
  opacity: 0.1;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* Footer */
.footer {
  background: var(--neutral-grey);
  color: var(--text-light);
  padding: 24px 0;
  margin-top: 48px;
}

@media (min-width: 768px) {
  .footer {
    padding: 32px 0;
    margin-top: 64px;
  }
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text {
  font-size: 13px;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .footer-text {
    font-size: 14px;
  }
}

.footer-brand {
  font-weight: 600;
  color: var(--accent-blue);
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--neutral-grey);
  font-weight: 500;
  transition: all 0.3s ease;
  background: var(--text-light);
  box-shadow: var(--shadow-sm);
}

.pagination a:hover {
  background: var(--accent-blue);
  color: var(--text-light);
  transform: translateY(-2px);
}

.pagination .active {
  background: var(--primary-red);
  color: var(--text-light);
}

/* Quick Actions Button Uniformity */
.card div[style*="grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))"] .btn,
.card div[style*="grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))"] button.btn {
  min-height: 48px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.9rem !important;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

/* Ensure forms in Quick Actions grid also maintain consistency */
.card div[style*="grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))"] form {
  width: 100%;
  display: flex;
}

.card div[style*="grid-template-columns: repeat(auto-fit, minmax(240px, 1fr))"] form .btn {
  width: 100% !important;
  min-height: 48px !important;
  flex: 1;
}

/* Utility Classes */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Mobile Visibility */
.hide-mobile { display: inline; }
.show-mobile { display: none; }

@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .show-mobile { display: inline; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-menu {
    flex-direction: column;
    gap: 8px;
  }
  
  .hero-content h1 {
    font-size: 32px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .request-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .section-header h2 {
    font-size: 20px;
  }
  
  .card {
    padding: 16px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  .stat-label {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.loading {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
  background-size: 1000px 100%;
}

/* Compact Navbar for Auth Pages */
.compact-navbar {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.compact-navbar .navbar-content {
  padding: 12px 0;
}

@media (min-width: 768px) {
  .compact-navbar .navbar-content {
    padding: 14px 0;
  }
}

.compact-navbar .logo-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(230, 25, 38, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .compact-navbar .logo-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 11px;
  }
}

.compact-navbar .logo-icon {
  width: 20px !important;
  height: 20px !important;
}

@media (min-width: 768px) {
  .compact-navbar .logo-icon {
    width: 24px !important;
    height: 24px !important;
  }
}

.compact-navbar .brand-main {
  font-size: 16px;
}

@media (min-width: 768px) {
  .compact-navbar .brand-main {
    font-size: 20px;
  }
}

.compact-navbar .brand-tagline {
  font-size: 9px;
}

@media (min-width: 768px) {
  .compact-navbar .brand-tagline {
    font-size: 10px;
  }
}

/* Auth Navigation Buttons */
.auth-nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .auth-nav-buttons {
    gap: 12px;
  }
}

.auth-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--neutral-grey);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
}

@media (min-width: 480px) {
  .auth-nav-link {
    min-width: auto;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .auth-nav-link {
    padding: 8px 16px;
    font-size: 14px;
    gap: 8px;
    min-height: 44px;
  }
}

.auth-nav-link:hover {
  background: rgba(230, 25, 38, 0.05);
  color: var(--primary-red);
}

.auth-nav-link:active {
  transform: scale(0.96);
  background: rgba(230, 25, 38, 0.1);
}

.auth-nav-link.active {
  color: var(--primary-red);
  background: rgba(230, 25, 38, 0.08);
}

.auth-nav-link span {
  display: none;
}

@media (min-width: 480px) {
  .auth-nav-link span {
    display: inline;
  }
}

.auth-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--primary-red), var(--deep-maroon));
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(230, 25, 38, 0.25);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
}

@media (min-width: 480px) {
  .auth-nav-btn {
    min-width: auto;
    justify-content: flex-start;
  }
}

@media (min-width: 768px) {
  .auth-nav-btn {
    padding: 8px 18px;
    font-size: 14px;
    gap: 8px;
    min-height: 44px;
  }
}

.auth-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 25, 38, 0.35);
}

.auth-nav-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(230, 25, 38, 0.3);
}

.auth-nav-btn.active {
  background: linear-gradient(135deg, var(--deep-maroon), var(--primary-red));
}

.auth-nav-btn span {
  display: none;
}

@media (min-width: 480px) {
  .auth-nav-btn span {
    display: inline;
  }
}

/* Compact Footer */
.compact-footer {
  padding: 20px 0;
  background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
  .compact-footer {
    padding: 24px 0;
  }
}

.compact-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .compact-footer .footer-content {
    flex-direction: row;
    gap: 16px;
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .compact-footer .footer-content {
    font-size: 14px;
  }
}

.compact-footer .footer-text {
  color: #6b7280;
  margin: 0;
  font-weight: 400;
  transition: color 0.2s ease;
}

.compact-footer .footer-text:hover {
  color: #4b5563;
}

.footer-divider {
  color: #d1d5db;
  display: none;
  font-weight: 300;
}

@media (min-width: 640px) {
  .footer-divider {
    display: block;
  }
}

.footer-heart {
  color: var(--primary-red);
  animation: heartbeat 1.5s ease-in-out infinite;
  display: inline-block;
  margin: 0 2px;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.15); }
  20%, 40% { transform: scale(1); }
}

.compact-footer .footer-brand {
  color: var(--primary-red);
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: default;
}

.compact-footer .footer-brand:hover {
  color: var(--deep-maroon);
  text-shadow: 0 0 8px rgba(230, 25, 38, 0.2);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
  .footer-links {
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .footer-link {
    font-size: 14px;
    padding: 6px 14px;
  }
}

.footer-link:hover {
  color: var(--primary-red);
  background: #fef2f2;
  transform: translateY(-1px);
}

.footer-link i {
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    gap: 16px;
    font-size: 14px;
  }
}

/* Desktop View Fix - Force proper rendering on desktop browsers */
@media (min-width: 1024px) {
  html, body {
    min-width: 100%;
    overflow-x: hidden;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
  }
  
  .navbar {
    width: 100%;
  }
  
  .navbar-menu {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-height: none !important;
  }
  
  .navbar-menu.mobile-open {
    position: static !important;
    flex-direction: row !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-menu-backdrop {
    display: none !important;
  }
}

/* Extra Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
  }
}

/* Ultra Wide Desktop */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }
}

/* Table Styles */
.table-container {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
  background: transparent;
}

.table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid #e2e8f0;
}

.table thead th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

@media (min-width: 768px) {
  .table thead th {
    padding: 18px 16px;
    font-size: 14px;
  }
}

.table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(91, 194, 231, 0.04);
  transform: scale(1.001);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  color: var(--neutral-grey);
  font-size: 14px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .table tbody td {
    padding: 16px 16px;
    font-size: 15px;
  }
}

.table tbody td:first-child {
  font-weight: 500;
  color: var(--text-dark);
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .table-actions {
    gap: 8px;
  }
}

.table-actions .btn {
  font-size: 12px;
  padding: 6px 12px;
  min-height: auto;
  border-radius: 6px;
}

@media (min-width: 768px) {
  .table-actions .btn {
    font-size: 13px;
    padding: 8px 14px;
  }
}

/* User Avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red), var(--deep-maroon));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(230, 25, 38, 0.2);
}

@media (min-width: 768px) {
  .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

.user-info {
  display: flex;
  align-items: center;
}

.user-details {
  min-width: 0;
  flex: 1;
}

.user-name {
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .user-name {
    font-size: 15px;
  }
}

.user-email {
  font-size: 12px;
  color: var(--neutral-grey);
  margin: 2px 0 0 0;
  line-height: 1.2;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .user-email {
    font-size: 13px;
  }
}

/* Blood Type Badge */
.blood-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-red), var(--deep-maroon));
  color: white;
  font-weight: 700;
  font-size: 12px;
  border-radius: 14px;
  padding: 0 8px;
  box-shadow: 0 2px 6px rgba(230, 25, 38, 0.2);
}

@media (min-width: 768px) {
  .blood-type-badge {
    min-width: 44px;
    height: 32px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* Status Badges */
.status-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.status-badges .badge {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .status-badges .badge {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* Responsive Table */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table {
    min-width: 600px;
    font-size: 13px;
  }
  
  .table thead th,
  .table tbody td {
    padding: 12px 8px;
  }
  
  .table thead th {
    font-size: 12px;
  }
  
  .table tbody td {
    font-size: 13px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
    margin-right: 8px;
  }
  
  .user-name {
    font-size: 13px;
  }
  
  .user-email {
    font-size: 11px;
  }
  
  .blood-type-badge {
    min-width: 36px;
    height: 24px;
    font-size: 11px;
    padding: 0 6px;
  }
  
  .table-actions {
    gap: 4px;
  }
  
  .table-actions .btn {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* Search and Filter Bar */
.search-filter-bar {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .search-filter-bar {
    padding: 24px;
    margin-bottom: 24px;
  }
}

.search-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-filter-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .search-filter-title {
    font-size: 24px;
  }
}

.search-filter-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

@media (min-width: 640px) {
  .search-filter-form {
    grid-template-columns: 2fr 1fr auto auto;
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .search-filter-form {
    gap: 20px;
  }
}

.search-input {
  position: relative;
}

.search-input input {
  padding-left: 44px;
}

.search-input::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.6;
  z-index: 1;
}

/* Table Empty State */
.table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--neutral-grey);
}

.table-empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.table-empty h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.table-empty p {
  font-size: 14px;
  margin-bottom: 24px;
  opacity: 0.8;
}

/* Table Stats */
.table-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: var(--neutral-grey);
}

@media (min-width: 768px) {
  .table-stats {
    padding: 18px 24px;
    font-size: 14px;
  }
}

.table-stats-info {
  font-weight: 500;
}

.table-stats-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Sortable Headers */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.sortable:hover {
  background: rgba(91, 194, 231, 0.08);
  color: var(--primary-red);
}

.sortable::after {
  content: '↕';
  margin-left: 8px;
  opacity: 0.4;
  font-size: 12px;
}

.sortable.asc::after {
  content: '↑';
  opacity: 1;
  color: var(--primary-red);
}

.sortable.desc::after {
  content: '↓';
  opacity: 1;
  color: var(--primary-red);
}

/* Back Button Styles */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 2px solid #e5e7eb;
  color: var(--neutral-grey);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  font-family: 'Poppins', Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .back-button {
    padding: 12px 20px;
    font-size: 15px;
    margin-bottom: 24px;
  }
}

.back-button:hover {
  background: rgba(91, 194, 231, 0.05);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateX(-2px);
}

.back-button:active {
  transform: translateX(-1px) scale(0.98);
  background: rgba(91, 194, 231, 0.1);
}

.back-button i {
  transition: transform 0.2s ease;
}

.back-button:hover i {
  transform: translateX(-2px);
}

/* Admin Page Header */
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (min-width: 768px) {
  .admin-page-header {
    margin-bottom: 32px;
  }
}

.admin-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .admin-page-title {
    font-size: 28px;
    gap: 16px;
  }
}

.admin-page-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--neutral-grey);
}

@media (min-width: 768px) {
  .breadcrumb {
    margin-bottom: 24px;
    font-size: 15px;
  }
}

.breadcrumb a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-red);
}

.breadcrumb-separator {
  color: #d1d5db;
  margin: 0 4px;
}

.breadcrumb-current {
  color: var(--text-dark);
  font-weight: 500;
}

/* Donor Report Styles */
.report-container {
  background: var(--text-light);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.report-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.ledger-date {
  font-size: 13px;
  color: var(--neutral-grey);
  font-weight: 500;
}

.ledger-stats {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}

.blood-type-distribution {
  margin-bottom: 24px;
}

.blood-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  padding: 20px;
}

.blood-type-stat {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.blood-type-stat .blood-type-badge {
  margin-bottom: 8px;
}

.blood-type-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Report Table Specific Styles */
.report-table {
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.report-table .table {
  font-size: 13px;
}

.report-serial,
.ledger-serial {
  width: 60px;
  text-align: center;
  font-weight: 600;
  color: var(--neutral-grey);
}

.report-donor-info,
.ledger-donor-info {
  min-width: 200px;
}

.donor-ledger-details {
  line-height: 1.4;
}

.donor-name-ledger {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.donor-id-ledger {
  font-size: 11px;
  color: var(--neutral-grey);
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

.donor-location-ledger {
  font-size: 11px;
  color: var(--accent-blue);
  margin-top: 2px;
}

.report-blood-type,
.ledger-blood-type {
  text-align: center;
  width: 100px;
}

.report-phone,
.report-email,
.ledger-phone,
.ledger-email {
  font-size: 12px;
  max-width: 150px;
  word-break: break-word;
}

.report-last-donation,
.ledger-last-donation {
  width: 120px;
}

.days-since {
  font-size: 10px;
  color: var(--neutral-grey);
  margin-top: 2px;
}

.report-total-donations,
.ledger-total-donations {
  text-align: center;
  width: 80px;
}

.donation-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-red);
}

.donation-note {
  font-size: 9px;
  color: var(--neutral-grey);
  margin-top: 2px;
}

.report-notes,
.ledger-notes {
  min-width: 180px;
}

.audit-notes {
  font-size: 11px;
  line-height: 1.3;
}

.note-item {
  margin-bottom: 2px;
  color: var(--neutral-grey);
}

.admin-note {
  color: var(--primary-red);
  font-weight: 500;
}

.report-footer,
.ledger-footer {
  border-top: 2px solid #e2e8f0;
  background: #f8fafc;
}

.report-timestamp,
.ledger-timestamp {
  font-size: 12px;
  color: var(--neutral-grey);
  font-style: italic;
}

/* Print Styles for A4 Report */
@media print {
  @page {
    size: A4 landscape;
    margin: 0.4in;
  }
  
  .back-button,
  .admin-page-actions,
  .search-filter-bar,
  .pagination,
  .btn,
  button {
    display: none !important;
  }
  
  .report-container,
  .ledger-container {
    box-shadow: none !important;
    border: 1px solid #000 !important;
    page-break-inside: avoid;
    margin-bottom: 0 !important;
  }
  
  .report-header,
  .ledger-header {
    background: #f5f5f5 !important;
    border-bottom: 2px solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 15px !important;
  }
  
  .report-table .table,
  .ledger-table .table {
    font-size: 11px !important;
    width: 100% !important;
  }
  
  .report-table .table thead th,
  .ledger-table .table thead th {
    background: #f0f0f0 !important;
    border: 1px solid #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 8px 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
  }
  
  .report-table .table tbody td,
  .ledger-table .table tbody td {
    border: 1px solid #666 !important;
    padding: 6px 4px !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  .report-row,
  .ledger-row {
    page-break-inside: avoid;
  }
  
  .blood-type-badge {
    background: #dc2626 !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-size: 9px !important;
    padding: 3px 6px !important;
  }
  
  .stats-grid {
    display: none !important;
  }
  
  .blood-type-distribution {
    display: none !important;
  }
  
  .admin-page-header h1 {
    font-size: 20px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }
  
  body {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  .container {
    max-width: none !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  /* Optimize column widths for A4 Landscape */
  .report-serial,
  .ledger-serial {
    width: 40px !important;
  }
  
  .report-donor-info,
  .ledger-donor-info {
    width: 20% !important;
  }
  
  .report-blood-type,
  .ledger-blood-type {
    width: 8% !important;
  }
  
  .report-phone,
  .ledger-phone {
    width: 14% !important;
  }
  
  .report-email,
  .ledger-email {
    width: 20% !important;
  }
  
  .report-last-donation,
  .ledger-last-donation {
    width: 13% !important;
  }
  
  .report-total-donations,
  .ledger-total-donations {
    width: 8% !important;
  }
  
  .report-notes,
  .ledger-notes {
    width: 17% !important;
  }
  
  .donor-name-ledger {
    font-size: 10px !important;
    font-weight: 600 !important;
  }
  
  .donor-id-ledger {
    font-size: 8px !important;
  }
  
  .donor-location-ledger {
    font-size: 8px !important;
  }
  
  .days-since {
    font-size: 8px !important;
  }
  
  .donation-note {
    font-size: 7px !important;
  }
  
  .audit-notes {
    font-size: 8px !important;
    line-height: 1.2 !important;
  }
  
  .note-item {
    margin-bottom: 2px !important;
  }
}

/* Responsive Report */
@media (max-width: 768px) {
  .report-header,
  .ledger-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .blood-type-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
  }
  
  .blood-type-stat {
    padding: 12px 8px;
  }
  
  .blood-type-count {
    font-size: 18px;
  }
  
  .report-table,
  .ledger-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .report-table .table,
  .ledger-table .table {
    min-width: 800px;
    font-size: 12px;
  }
  
  .admin-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .admin-page-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Enhanced Homepage Styles */
.hero-compact {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth transitions for all interactive elements */
.btn,
.card,
.request-card,
.donor-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced card hover effects */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.request-card:hover,
.donor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Section header icon containers */
.section-icon-container {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.section-icon-container:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive hero section */
@media (max-width: 768px) {
  .hero-compact {
    padding: 1.5rem 1rem !important;
    margin-top: 1rem !important;
  }
  
  .hero-compact h1 {
    font-size: 1.25rem !important;
  }
  
  .hero-compact p {
    font-size: 0.8rem !important;
  }
  
  .hero-compact .stat-value {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .hero-compact {
    padding: 1.25rem 0.875rem !important;
  }
  
  .hero-compact h1 {
    font-size: 1.1rem !important;
  }
  
  .hero-compact .stat-value {
    font-size: 1.1rem !important;
  }
}

/* Loading skeleton animation */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.skeleton {
  animation: shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(to right, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
  background-size: 800px 104px;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced badge styles */
.badge {
  transition: all 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Improved button styles for homepage */
.btn-outline {
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(230, 25, 38, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-outline:hover::before {
  left: 100%;
}

/* Compact footer for homepage */
.compact-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  background: linear-gradient(135deg, var(--neutral-grey) 0%, #2d3748 100%);
}

@media (min-width: 768px) {
  .compact-footer {
    margin-top: 4rem;
    padding: 2rem 0;
  }
}

.footer-divider {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.5rem;
}

/* Compact navbar for homepage */
.compact-navbar {
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .compact-navbar {
    padding: 0.75rem 0;
  }
}

/* Performance optimizations */
.card,
.request-card,
.donor-card {
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
a:focus,
button:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .hero-compact,
  .btn,
  .navbar,
  .footer {
    display: none !important;
  }
  
  .card,
  .request-card,
  .donor-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
}
