/* ================================================================
   app.css — Global stylesheet
   Place at: public/css/app.css
================================================================ */

/* ── CSS Custom Properties (Design Tokens) ──────────────────── */
:root {
    /* Colors — Light mode */
    --color-background-primary:   #ffffff;
    --color-background-secondary: #f3f4f6;
    --color-text-primary:         #111827;
    --color-text-secondary:       #6b7280;
    --color-border-tertiary:      #e5e7eb;
    --color-border-secondary:     #d1d5db;

    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

    /* Radii */
    --border-radius-sm:  6px;
    --border-radius-md:  10px;
    --border-radius-lg:  16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
}

/* ── Dark mode overrides ─────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background-primary:   #0f172a;
        --color-background-secondary: #1e293b;
        --color-text-primary:         #f1f5f9;
        --color-text-secondary:       #94a3b8;
        --color-border-tertiary:      #334155;
        --color-border-secondary:     #475569;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-background-primary);
    color: var(--color-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    background: #1a1a2e;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.navbar-brand svg {
    stroke: #6ee7b7;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
}

.nav-link.active {
    color: #6ee7b7;
    background: rgba(110,231,183,0.08);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.nav-user {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.nav-logout {
    background: rgba(255,255,255,0.07);
    border: 0.5px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.nav-logout:hover {
    background: rgba(255,255,255,0.13);
    color: #fff;
}

/* ── Flash Messages ──────────────────────────────────────────── */
.flash {
    max-width: 1200px;
    margin: 12px auto 0;
    padding: 10px 16px;
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 500;
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 0.5px solid #6ee7b7;
}

.flash-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 0.5px solid #fca5a5;
}

.main-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* ── Footer ──────────────────────────────────────────────────── */
.footer {
    border-top: 0.5px solid var(--color-border-tertiary);
    padding: 14px 20px;
    text-align: center;
    font-size: 11px;
    color: var(--color-text-secondary);
}

/* ── Utility helpers ─────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-24       { margin-top: 24px; }