/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

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

:root {
    --white:       #ffffff;
    --bg:          #f7f8fa;
    --border:      #e4e6ea;
    --border-dark: #c8ccd4;
    --text:        #111318;
    --text-muted:  #6b7280;
    --text-faint:  #9ca3af;
    --accent:      #111318;
    --accent-hover:#2d3139;
    --danger:      #dc2626;
    --danger-bg:   #fef2f2;
    --danger-border:#fecaca;
    --radius:      8px;
    --radius-sm:   6px;
    --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:   0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--text-muted);
}

/* ── Top bar (header.php) ─────────────────────── */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-logo {
    width: 30px;
    height: 30px;
    background: var(--text);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo span {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
}

.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.brand-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 999px;
}

/* ── Navigation ───────────────────────────────── */
.top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color .15s, background .15s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg);
    text-decoration: none;
}

.nav-link.active {
    color: var(--text);
    background: var(--bg);
    font-weight: 600;
}

/* ── Logout ───────────────────────────────────── */
.nav-logout {
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint);
    background: none;
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .15s, border-color .15s;
}

.nav-logout:hover {
    color: var(--danger);
    border-color: var(--danger-border);
}

/* ── Bottom bar (footer.php) ──────────────────── */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-faint);
    z-index: 100;
}

.bottom-bar span {
    font-weight: 500;
    color: var(--text-muted);
}

/* ── Mobile nav ───────────────────────────────── */
@media (max-width: 768px) {
    .top-bar-inner {
        gap: 12px;
    }
    .brand-name {
        display: none;
    }
    .nav-link {
        font-size: 12px;
        padding: 5px 8px;
    }
    .nav-logout {
        font-size: 11px;
        padding: 4px 8px;
    }
}