/* =====================================================
   CLAUX - LAYOUT
   ===================================================== */

/* App shell */
#appSection {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-body {
    display: flex;
    flex: 1;
}

/* ── TOPBAR ───────────────────────────────────────── */
.topbar {
    height: 64px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 200;
    box-shadow: var(--shadow-xs);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.topbar-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ── SIDEBAR ──────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--sidebar-bg);
    min-height: calc(100vh - 64px);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.sidebar-section-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 12px 16px 8px;
    margin-top: 16px;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
    user-select: none;
}

.sidebar-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-link:hover i {
    color: var(--accent);
}

.sidebar-link.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--accent);
}

/* ── MAIN CONTENT ─────────────────────────────────── */
#mainContent {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* ── PAGE HEADER ──────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 400;
}

/* ── FOOTER ───────────────────────────────────────── */
.app-footer {
    width: 100%;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 2;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 24px;
    flex-wrap: wrap;
}

/* Brand block */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.footer-brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.footer-product-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
}

.footer-by {
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1;
}

/* Meta block (centre) */
.footer-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.footer-meta-item i {
    font-size: 0.625rem;
    opacity: 0.7;
}

.footer-meta-sep {
    font-size: 0.6875rem;
    color: var(--border-light);
    user-select: none;
}

/* Copyright */
.footer-copy {
    font-size: 0.6875rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        text-align: center;
    }
    .footer-meta { justify-content: center; }
}
