* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #dc2626;
    --secondary: #991b1b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ea580c;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 20px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.portal-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    width: 100%;
}

.portal-card {
    background: white;
    color: var(--text);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.portal-card:hover {
    transform: translateY(-5px);
}

.icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.portal-card h2 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.portal-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Form Card */
.form-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 500px;
    margin: 2rem auto;
}

.form-card h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-user, .nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Dashboard */
.dashboard {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.action-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Blood Type Badge */
.blood-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
}

.blood-type-badge.large {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
}

/* Requests Grid */
.requests-grid, .orders-list {
    display: grid;
    gap: 1.5rem;
}

.request-card, .order-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.request-header, .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.urgency-badge, .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.urgency-badge {
    background: #fee2e2;
    color: #dc2626;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-fulfilled {
    background: #dcfce7;
    color: #16a34a;
}

.request-body, .order-body {
    margin-bottom: 1rem;
}

.request-body p, .order-body p {
    margin-bottom: 0.5rem;
}

.request-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.success-text {
    color: var(--success);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Credits */
.credits-header {
    text-align: center;
    margin-bottom: 2rem;
}

.credits-balance {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 400px;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.balance-amount {
    font-size: 4rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.balance-sublabel {
    font-size: 1rem;
    opacity: 0.9;
}

.info-box {
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.info-box h3 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Hospital */
.hospital-actions {
    display: grid;
    gap: 2rem;
}

.action-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.action-section h2 {
    margin-bottom: 1rem;
}

.action-footer {
    text-align: center;
    margin-top: 2rem;
}

.products-section {
    margin-top: 2rem;
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .portal-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid, .action-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
}