<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}AutoBackups{% endblock %}</title>
    
    <!-- Favicon -->
    <link rel="icon" type="image/png" href="{{ url_for('static', filename='icons/favicon.png') }}">
    
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
    <!-- Custom CSS -->
    <link href="{{ url_for('static', filename='css/styles.css') }}" rel="stylesheet">
    
    {% block head %}{% endblock %}
</head>
<body>
    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <div class="container">
            <a class="navbar-brand" href="{{ url_for('dashboard') }}">
                <i class="bi bi-archive"></i> AutoBackups
            </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 me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('dashboard') }}">
                            <i class="bi bi-house"></i> Dashboard
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" id="scan-projects-btn">
                            <i class="bi bi-search"></i> Escanear Proyectos
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" id="system-status-btn">
                            <i class="bi bi-gear"></i> Estado del Sistema
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('config_page') }}">
                            <i class="bi bi-sliders"></i> Configuración
                        </a>
                    </li>
                </ul>
                <div class="d-flex align-items-center">
                    <!-- Theme Toggle -->
                    <button type="button" class="theme-toggle me-3" id="theme-toggle" title="Toggle Theme">
                        <i class="bi bi-sun-fill" id="theme-icon"></i>
                    </button>
                    <span class="navbar-text">
                        <i class="bi bi-clock"></i> <span id="current-time"></span>
                    </span>
                </div>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <div class="container mt-4">
        <!-- Alerts -->
        <div id="alerts-container"></div>
        
        {% block content %}{% endblock %}
    </div>

    <!-- Modals -->
    {% block modals %}{% endblock %}

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <!-- Custom JS -->
    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
    
    {% block scripts %}{% endblock %}
</body>
</html>
