/*
   LifeLink - Global Styles
   */

:root {
    --primary: #B71C1C;
    --primary-dark: #8B0000;
    --primary-light: #FEE2E2;
    --bg: #F6F7F8;
    --bg-white: #FFFFFF;
    --text: #111418;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --success: #2e7d32;
    --warning: #f57c00;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

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

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-secondary:hover { background: var(--primary-light); }

.btn-blue {
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-blue:hover { background: var(--primary-dark); }

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: white;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
}
.form-input.error {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
}

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

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: white;
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    flex-shrink: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); }
.sidebar-link .material-symbols-outlined { font-size: 20px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: 12px 16px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 14px 16px; font-size: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:hover td { background: #FAFAFA; }
.data-table tr:last-child td { border-bottom: none; }

/* Blood type pill */
.blood-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 13px;
    background: var(--primary-light);
    color: var(--primary);
    border: 2px solid rgba(183, 28, 28, 0.2);
}

/* Urgency badges */
.badge-critical { background: #FEE2E2; color: #B71C1C; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-urgent { background: #FFF3E0; color: #E65100; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-standard { background: var(--primary-light); color: var(--primary); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Status badges */
.status-open { background: #FEE2E2; color: #B71C1C; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-matched { background: #FFF8E1; color: #F57F17; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-in_progress { background: var(--primary-light); color: var(--primary); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-fulfilled { background: #E8F5E9; color: #2E7D32; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-cancelled { background: #F3F4F6; color: #6B7280; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }

/* Empty State */
.empty-state {
    text-align: center; padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state .material-symbols-outlined { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }

/* Responsive sidebar layout */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .app-layout { flex-direction: column; }
}

/* Pulse animation for live indicators */
@keyframes pulse-ring {
    0% { transform: scale(.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}
.live-dot {
    position: relative; display: inline-block;
    width: 10px; height: 10px; border-radius: 50%; background: #16a34a;
}
.live-dot::before {
    content: ''; position: absolute; inset: 0;
    border-radius: 50%; background: #16a34a;
    animation: pulse-ring 1.5s ease-out infinite;
}
