{% extends "base.html" %}
{% block title %}Home — SimpleX Manager{% endblock %}

{% block head %}
<style>
  .home-head { margin-bottom: 28px; text-align: center; }
  .home-head h1 { margin-bottom: 6px; color: var(--accent); }

  .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  /* faded bar between areas, like the sidebar separators */
  .tiles + .tiles { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
  .tile {
    display: flex; flex-direction: row; align-items: center; gap: 12px;
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 18px; text-decoration: none; color: var(--text);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.05s;
  }
  .tile:hover { border-color: var(--accent); }
  .tile:active { transform: translateY(1px); }
  .tile .t-ico { font-size: 22px; line-height: 1; flex-shrink: 0; }
  .tile .t-title { font-size: 15px; font-weight: 700; }
  /* closing bar at the bottom */
  .home-end { margin-top: 28px; border-top: 1px solid var(--border); }
</style>
{% endblock %}

{% block content %}
<div class="home-head">
  <h1>SimpleX Manager</h1>
</div>

<!-- Area 1: your accounts -->
<div class="tiles">
  <a class="tile" href="/users">
    <span class="t-ico"><i class="fa-solid fa-user"></i></span>
    <span class="t-title">Users</span>
  </a>
  <a class="tile" href="/bots">
    <span class="t-ico"><i class="fa-solid fa-robot"></i></span>
    <span class="t-title">Bots</span>
  </a>
  <a class="tile" href="/businesses">
    <span class="t-ico"><i class="fa-solid fa-briefcase"></i></span>
    <span class="t-title">Business Groups</span>
  </a>
  <a class="tile" href="https://simplex.chat/file/" target="_blank" rel="noopener">
    <span class="t-ico"><i class="fa-solid fa-upload"></i></span>
    <span class="t-title">File Upload</span>
  </a>
  <a class="tile" href="/rss-bots">
    <span class="t-ico"><i class="fa-solid fa-rss"></i></span>
    <span class="t-title">RSS</span>
  </a>
</div>

<!-- Area: relays -->
<div class="tiles">
  <a class="tile" href="/relays/chat">
    <span class="t-ico"><i class="fa-solid fa-comments"></i></span>
    <span class="t-title">Chat Relay</span>
  </a>
  <a class="tile" href="/relays/file">
    <span class="t-ico"><i class="fa-solid fa-file-export"></i></span>
    <span class="t-title">File Relay</span>
  </a>
  <a class="tile" href="/relays/message">
    <span class="t-ico"><i class="fa-solid fa-envelope"></i></span>
    <span class="t-title">Message Relay</span>
  </a>
</div>

<!-- Area 3: system -->
<div class="tiles">
  <a class="tile" href="/network">
    <span class="t-ico"><i class="fa-solid fa-tower-broadcast"></i></span>
    <span class="t-title">Network</span>
  </a>
  <a class="tile" href="/notifications">
    <span class="t-ico"><i class="fa-solid fa-bell"></i></span>
    <span class="t-title">Notifications</span>
    <span class="notif-badge" style="display:none;"></span>
  </a>
  <a class="tile" href="/settings">
    <span class="t-ico"><i class="fa-solid fa-gear"></i></span>
    <span class="t-title">Settings</span>
  </a>
</div>

<!-- Area 3: SimpleX (external) -->
<div class="tiles">
  <a class="tile" href="https://simplex.chat/downloads/" target="_blank" rel="noopener">
    <span class="t-ico"><i class="fa-solid fa-download"></i></span>
    <span class="t-title">Get SimpleX App</span>
  </a>
</div>

<div class="home-end"></div>
{% endblock %}
