/* Custom styles */
:root {
    --primary-color: #2e8b57;
    --secondary-color: #1b4d3e;
    --surface-color: #ffffff;
    --muted-color: #5f6f6a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f5fbf7 0%, #ecf8ef 100%);
    color: #18392a;
}

@media print {
    .navbar,
    .footer,
    .no-print,
    .alert-dismissible,
    .btn {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .table {
        font-size: 12px;
    }
}

#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.logo-container {
    width: min(92vw, 450px);
    max-width: 450px;
    padding: 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(46, 139, 87, 0.14);
    box-sizing: border-box;
}

.logo-container svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.clinic-text {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(5px);
    animation: textReveal 1.2s ease-out 3.2s forwards;
}

.clinic-name {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin: 0;
}

.clinic-sub {
    font-size: 1rem;
    color: #6c757d;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 600;
}

@keyframes drawStroke { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill-opacity: 1; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.06); } 60% { transform: scale(1); } }
@keyframes breathe { 0%, 100% { transform: scaleY(1) scaleX(1); } 50% { transform: scaleY(1.05) scaleX(1.03); } }
@keyframes kidneyGlow { 0%, 100% { fill-opacity: 0.85; transform: scale(1); } 50% { fill-opacity: 1; transform: scale(1.03); } }
@keyframes textReveal { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

.path-draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawStroke 2.5s ease-in-out forwards, fillIn 1s ease-out 1.5s forwards; fill-opacity: 0; }
.heart { fill: #2e8b57; stroke: #1c5f3d; stroke-width: 2; transform-origin: center; animation: heartbeat 1.4s ease-in-out infinite; animation-delay: 2.5s; filter: drop-shadow(0 4px 6px rgba(46, 139, 87, 0.24)); z-index: 3; position: relative; }
.lung { fill: #dff6e8; stroke: #2e8b57; stroke-width: 2.5; transform-origin: center bottom; animation: breathe 3.5s ease-in-out infinite; animation-delay: 2.5s; }
.kidney { fill: #3da96b; stroke: #1f6a45; stroke-width: 2; transform-origin: center; animation: kidneyGlow 2.8s ease-in-out infinite; animation-delay: 2.8s; }
.ekg-line { fill: none; stroke: #2e8b57; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 500; stroke-dashoffset: 500; animation: drawStroke 2s ease-in-out 2s forwards; }

.navbar-brand img {
    margin-right: 10px;
}

.card {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0,0,0,0.04);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #fff !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #dff6e8 !important;
}

.quick-access-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(240,250,244,0.95));
    border: 1px solid rgba(46, 139, 87, 0.18);
}

.quick-access-card .card-body {
    padding: 2rem;
}

.quick-access-card h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2b2d42;
    margin-bottom: 1rem;
}

.quick-access-card ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.quick-access-card ul li:last-child {
    border-bottom: none;
}

.quick-access-card ul li a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.quick-access-card ul li a:hover {
    color: var(--secondary-color);
}

.table th {
    background-color: #eaf7ee;
    border-bottom: 2px solid var(--primary-color);
}

.hero-section {
    background: linear-gradient(135deg, rgba(46,139,87,0.95), rgba(27,77,62,0.95));
    color: #fff;
}

.hero-section a {
    color: #fff;
}

.hero-section .card {
    background: rgba(255,255,255,0.95);
    color: #212529;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float:hover {
    color: white;
    transform: scale(1.1);
    transition: transform 0.3s;
}

.footer {
    background: linear-gradient(135deg, #f5fbf7 0%, #eaf7ee 100%);
    color: #1b4d3e;
    border-top: 1px solid rgba(46, 139, 87, 0.16) !important;
}

.footer .text-muted {
    color: #4f6f61 !important;
}

.card-header {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}