<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% block title %}Illustrations DB{% endblock %}</title>
<style>:root { --blue:#1f6cd8; --light:#f6f8fb; --panel:#ffffff; --line:#e5e9f2; --text:#1a1a1a; } body { margin:0; font-family: system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica,Arial,sans-serif; background:var(--light); color:var(--text);} .topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.brand{font-weight:700;color:var(--blue);font-size:18px}.menu{display:flex;align-items:center;gap:8px}.menu a{text-decoration:none;color:var(--blue);padding:6px 10px;border-radius:6px;border:1px solid transparent}.menu a:hover{background:#eef4ff}.container{max-width:1100px;margin:24px auto;padding:0 16px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 20px rgba(0,0,0,0.04);padding:18px}.btn{display:inline-block;padding:10px 14px;border-radius:8px;border:1px solid var(--line);background:#fff;color:#0d1b2a;text-decoration:none;cursor:pointer}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.btn.danger{background:#e11d48;color:#fff;border-color:#e11d48}.flash{margin:16px 0;padding:12px;border-radius:10px;background:#eaf2ff;color:#0b3d91} input[type=file],input[type=text],input[type=password],textarea,select{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff} label{font-size:14px;color:#333;display:block;margin-bottom:6px}.row{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media (max-width:800px){.row{grid-template-columns:1fr}}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media (max-width:1000px){.cards{grid-template-columns:repeat(2,1fr)}}@media (max-width:640px){.cards{grid-template-columns:1fr}}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:0 6px 14px rgba(0,0,0,0.03)}.card:hover{box-shadow:0 10px 24px rgba(0,0,0,0.05);transform:translateY(-1px);transition:all .15s ease}.stat{padding:16px;text-align:center;border:1px solid var(--line);border-radius:12px;background:#fff}.badge{display:inline-block;padding:2px 8px;border-radius:6px;border:1px solid var(--line);background:#f7faff;color:#1f4bb6;font-size:12px}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{padding:2px 8px;border-radius:6px;border:1px solid var(--line);background:#f1f5ff;color:#1a45a0;font-size:12px}.toolbar{display:flex;align-items:center;gap:8px;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap}.spacer{height:8px}.small{font-size:12px;color:#444} h1{margin:0 0 12px 0;font-size:24px}h2{margin:0 0 12px 0;font-size:18px}</style>
</head>
<body>
{% if request.user.is_authenticated %}
  <div class="topbar">
    <div class="brand">Illustrations Database</div>
    <div class="menu">
      <a href="/search/">Search</a>
      <a href="/import/">Import</a>
      <a href="/export/csv/">Backup</a>
      <a href="/stats/">Statistics</a>
      <a href="/logout/">Logout</a>
    </div>
  </div>
{% endif %}
<div class="container">
  {% for message in messages %}<div class="flash">{{ message }}</div>{% endfor %}
  {% block content %}{% endblock %}
</div>
</body>
</html>
