/* LifeLine Blood Bank - Main Stylesheet */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fca5a5;
    --secondary: #1e40af;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    padding: 1rem 1.5rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 1rem 1.2rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255,255,255,0.1);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: var(--white) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: var(--white);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

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

.card-body {
    padding: 1.5rem;
}

/* Blood Group Cards */
.blood-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 16px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.blood-card > * {
    position: relative;
    z-index: 1;
}

.blood-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
}

.blood-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.blood-card p {
    font-size: 1rem;
    opacity: 0.9;
}

.blood-card .units {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Blood group background colors (used in PHP templates). */
.bg-red-600 { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.bg-red-500 { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.bg-blue-600 { background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%); }
.bg-blue-500 { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.bg-purple-600 { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); }
.bg-purple-500 { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.bg-green-600 { background: linear-gradient(135deg, #16a34a 0%, #166534 100%); }
.bg-green-500 { background: linear-gradient(135deg, #22c55e 0%, #15803d 100%); }

.stock-status-chip {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.1;
    white-space: nowrap;
}

.stock-status-chip.out {
    border: 2px solid #111827;
}

.stock-status-chip.critical {
    border: 2px solid #dc2626;
}

.stock-status-chip.low {
    border: 2px solid #d97706;
}

.stock-status-chip.available {
    border: 2px solid #059669;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-info {
    background: var(--info);
    color: var(--white);
}

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

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

/* Form Styles */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Status Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #fce7f3;
    color: #be185d;
}

/* Dashboard Stats */
.stat-card {
    padding: 1.5rem;
    border-radius: 12px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.stat-card i {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.stat-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Login/Register Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .logo i {
    font-size: 4rem;
    color: var(--primary);
}

.auth-card h2 {
    text-align: center;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-card p {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* Sidebar for Admin */
.sidebar {
    background: var(--white);
    min-height: calc(100vh - 60px);
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-menu a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--gray-100);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu i {
    width: 24px;
    margin-right: 0.75rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .auth-card {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Print Styles */
@media print {
    .navbar, .sidebar, .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
