<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}ACS Paper Crawler{% endblock %}</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .navbar-brand {
            font-weight: bold;
        }
        .main-content {
            flex: 1;
            padding: 20px 0;
        }
        .status-badge {
            font-size: 0.85em;
        }
        .card {
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .stat-card {
            border-left: 4px solid;
        }
        .stat-card.primary {
            border-color: #0d6efd;
        }
        .stat-card.success {
            border-color: #198754;
        }
        .stat-card.warning {
            border-color: #ffc107;
        }
        .stat-card.info {
            border-color: #0dcaf0;
        }
        footer {
            background-color: #f8f9fa;
            padding: 20px 0;
            margin-top: auto;
        }
        .card-header {
            background-color: #f8f9fa;
            border-bottom: 2px solid #e9ecef;
            font-weight: 600;
        }
        canvas {
            max-height: 300px;
        }
        .stat-card .card-body h2 {
            font-weight: bold;
            color: #0d6efd;
        }
        .stat-card.success .card-body h2 {
            color: #198754;
        }
        .stat-card.warning .card-body h2 {
            color: #ffc107;
        }
        .stat-card.info .card-body h2 {
            color: #0dcaf0;
        }
    </style>
    {% block extra_css %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="bi bi-journal-text"></i> ACS Paper Crawler
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/"><i class="bi bi-house"></i> Dashboard</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/jobs"><i class="bi bi-list-task"></i> Jobs</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/papers"><i class="bi bi-file-text"></i> Papers</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="main-content">
        <div class="container">
            {% block content %}{% endblock %}
        </div>
    </div>

    <footer class="text-center text-muted">
        <div class="container">
            <p class="mb-0">ACS Paper Crawler v0.1.0 | Built with FastAPI & Python</p>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
    {% block extra_js %}{% endblock %}
</body>
</html>
