/* Flask Web App — Minimal production CSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; width: 100%; }

/* Navbar */
.navbar {
    background: var(--gray-800);
    padding: 0.75rem 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.nav-links { list-style: none; display: flex; gap: 1.25rem; }
.nav-links a { color: var(--gray-200); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: #fff; }

/* Main content */
main.container { flex: 1; padding-top: 2rem; padding-bottom: 2rem; }

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

/* Flash messages */
.flash-messages { margin-bottom: 1.5rem; }
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #e0f2fe; color: #075985; }
.alert-warning { background: #fef3c7; color: #92400e; }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--gray-200);
    color: var(--gray-600);
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.5;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-secondary:hover { background: var(--gray-100); }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.8rem; background: var(--gray-200); color: var(--gray-800); }

/* Posts */
.posts-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.post-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.post-card h2 a { color: var(--gray-800); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary); }
.post-meta { font-size: 0.85rem; color: var(--gray-600); display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; }
.post-card p { color: var(--gray-600); margin-bottom: 0.5rem; }
.post-detail { margin-bottom: 2rem; }
.post-detail h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.post-body { margin-top: 1.5rem; white-space: pre-wrap; }
.post-actions { margin-top: 1.5rem; }

/* Categories bar */
.categories-bar { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.table th { background: var(--gray-100); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: var(--gray-600); }
.table td a { color: var(--primary); text-decoration: none; }

/* Forms */
.form { max-width: 720px; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; font-size: 0.9rem; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
}
.form-group textarea { resize: vertical; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }

/* Auth */
.auth-container { max-width: 400px; margin: 2rem auto; }
.auth-container h1 { margin-bottom: 1.5rem; }
.auth-link { margin-top: 1rem; font-size: 0.9rem; }
.auth-link a { color: var(--primary); }

/* Errors */
.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: 4rem; color: var(--gray-200); }
.error-page p { font-size: 1.125rem; color: var(--gray-600); margin: 1rem 0 2rem; }

/* Empty state */
.empty-state { color: var(--gray-600); padding: 2rem 0; }
.empty-state a { color: var(--primary); }

/* Footer */
.footer { background: var(--gray-100); border-top: 1px solid var(--gray-200); padding: 1.5rem 0; margin-top: auto; }
.footer p { font-size: 0.85rem; color: var(--gray-600); text-align: center; }
