runique 1.1.25

A Django-inspired web framework for Rust with ORM, templates, and comprehensive security middleware
Documentation
/* ═══════════════════════════════════════════════════════════════
   AdminPanel — Layout (sidebar, topbar, main area)
   ═══════════════════════════════════════════════════════════════ */

/* Reset admin */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
ul { list-style: none; }

/* ───────────────────────────────────────────────
   Structure principale
   ─────────────────────────────────────────────── */

.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ───────────────────────────────────────────────
   Sidebar
   ─────────────────────────────────────────────── */

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition);
    overflow: hidden;
    z-index: 100;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Header sidebar */
.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity var(--transition);
}

.admin-sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.nav-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.75rem 1.1rem 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity var(--transition);
}

.admin-sidebar.collapsed .nav-section-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    margin: 0.1rem 0.5rem;
    border-radius: var(--radius);
    color: var(--text-sidebar);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--bg-active);
    color: var(--accent);
    font-weight: 500;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    margin-left: -0.5rem;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

.nav-label {
    opacity: 1;
    transition: opacity var(--transition);
    font-size: 0.88rem;
}

.admin-sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
}

.admin-sidebar.collapsed .nav-item {
    justify-content: center;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 1rem;
}

/* Footer sidebar */
.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-main);
    border-color: var(--accent);
}

/* ───────────────────────────────────────────────
   Zone principale
   ─────────────────────────────────────────────── */

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Topbar */
.admin-topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    flex-shrink: 0;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 1;
}

.topbar-breadcrumb a:hover { color: var(--accent); }
.topbar-breadcrumb span { color: var(--text-main); font-weight: 500; }
.breadcrumb-sep { opacity: 0.4; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.82rem;
    transition: background var(--transition);
}

.topbar-user:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Contenu */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
}

.admin-content::-webkit-scrollbar { width: 6px; }
.admin-content::-webkit-scrollbar-track { background: transparent; }
.admin-content::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-main);
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}