<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}SwiftPOS{% endblock %}</title>
    <meta name="description" content="{% block meta_description %}SwiftPOS — Fast. Simple. Clear. Nigeria's smartest POS system.{% endblock %}">
    <link rel="icon" type="image/x-icon" href="{% load static %}{% static 'core/icons/favicon.ico' %}">

    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        :root {
            --primary: #7c3aed;
            --primary-dark: #6d28d9;
            --primary-light: #ede9fe;
            --accent: #f59e0b;
            --success: #10b981;
            --danger: #ef4444;
            --text-dark: #0f172a;
            --text-muted: #64748b;
            --bg: #f8fafc;
            --card-bg: #ffffff;
            --border: #e2e8f0;
            --radius: 16px;
            --shadow: 0 4px 24px rgba(0,0,0,0.08);
            --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
        }
        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text-dark);
            min-height: 100vh;
        }

        /* ── NAVBAR ── */
        .sp-nav {
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
            padding: 1rem 2rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 1px 12px rgba(0,0,0,0.06);
        }
        .sp-logo {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            text-decoration: none;
        }
        .sp-logo-icon {
            width: 38px; height: 38px;
            border-radius: 10px;
            background: linear-gradient(135deg, #7c3aed, #6366f1);
            display: flex; align-items: center; justify-content: center;
            color: #fff;
            font-size: 1.1rem;
        }
        .sp-logo-text {
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--text-dark);
            letter-spacing: -0.5px;
        }
        .sp-logo-text span { color: var(--primary); }
        .sp-nav-links {
            display: flex;
            gap: 2rem;
            list-style: none;
        }
        .sp-nav-links a {
            text-decoration: none;
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
            transition: color 0.2s;
        }
        .sp-nav-links a:hover { color: var(--primary); }
        .sp-nav-cta {
            display: flex;
            gap: 0.75rem;
            align-items: center;
        }
        .btn-sp-primary {
            background: linear-gradient(135deg, #7c3aed, #6366f1);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 0.5rem 1.25rem;
            font-size: 0.875rem;
            font-weight: 600;
            text-decoration: none;
            transition: opacity 0.2s, transform 0.15s;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
        }
        .btn-sp-primary:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }
        .btn-sp-outline {
            background: transparent;
            border: 1.5px solid var(--border);
            border-radius: 10px;
            padding: 0.5rem 1.25rem;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-dark);
            text-decoration: none;
            transition: border-color 0.2s, background 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
        }
        .btn-sp-outline:hover { border-color: var(--primary); color: var(--primary); }

        /* ── CONTENT ── */
        .sp-content { padding: 2rem 1.5rem; max-width: 1100px; margin: 0 auto; }

        /* ── MESSAGES ── */
        .sp-alert-bar {
            padding: 0.75rem 1.5rem;
            border-radius: 12px;
            margin-bottom: 1.5rem;
            font-size: 0.875rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .sp-alert-success { background: #d1fae5; color: #065f46; }
        .sp-alert-error { background: #fee2e2; color: #991b1b; }
        .sp-alert-warning { background: #fef3c7; color: #92400e; }
        .sp-alert-info { background: #dbeafe; color: #1e40af; }

        /* ── FOOTER ── */
        .sp-footer {
            border-top: 1px solid var(--border);
            padding: 2rem;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.8rem;
        }
        .sp-footer a { color: var(--primary); text-decoration: none; }

        {% block extra_style %}{% endblock %}
    </style>
    {% block extra_css %}{% endblock %}
</head>
<body>
    <!-- NAV -->
    <nav class="sp-nav">
        <a href="/" class="sp-logo">
            {% load static %}
            <div class="sp-logo-icon"><i class="fas fa-bolt"></i></div>
            <span class="sp-logo-text">Swift<span>POS</span></span>
        </a>
        <ul class="sp-nav-links d-none d-md-flex">
            <li><a href="/pricing/">Pricing</a></li>
            <li><a href="#">Features</a></li>
            <li><a href="#">Contact</a></li>
        </ul>
        <div class="sp-nav-cta">
            <a href="/accounts/login/" class="btn-sp-outline"><i class="fas fa-sign-in-alt"></i> Log In</a>
            <a href="/register/" class="btn-sp-primary"><i class="fas fa-rocket"></i> Get Started Free</a>
        </div>
    </nav>

    <!-- MESSAGES -->
    {% if messages %}
    <div class="container-fluid px-4 mt-3">
        {% for message in messages %}
        <div class="sp-alert-bar sp-alert-{{ message.tags|default:'info' }}">
            <i class="fas {% if 'success' in message.tags %}fa-check-circle{% elif 'error' in message.tags or 'danger' in message.tags %}fa-exclamation-circle{% elif 'warning' in message.tags %}fa-exclamation-triangle{% else %}fa-info-circle{% endif %}"></i>
            {{ message }}
        </div>
        {% endfor %}
    </div>
    {% endif %}

    <!-- CONTENT -->
    {% block content %}{% endblock %}

    <!-- FOOTER -->
    <footer class="sp-footer">
        <p>&copy; {% now "Y" %} SwiftPOS. All rights reserved. &nbsp;|&nbsp;
        <a href="/pricing/">Pricing</a> &nbsp;|&nbsp;
        <a href="/register/">Get Started</a></p>
    </footer>

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