@import url('https://rsms.me/inter/inter.css');

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { width: 92%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* === Header === */
.header {
    background: #1a1a2e;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 700; color: #fff; text-decoration: none; }
.logo:hover { color: #60a5fa; text-decoration: none; }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: #cbd5e1; font-size: 0.9rem; }
.nav a:hover { color: #fff; text-decoration: none; }

/* === Footer === */
.footer {
    background: #1a1a2e;
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}
.footer-link { color: #94a3b8; }
.footer-link:hover { color: #fff; }

/* === Layout === */
.main-layout { flex: 1; padding: 2rem 1.5rem; }
.content-area { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.content-area > * { min-width: 0; }
.content-heading { margin-bottom: 1.5rem; }
.content-heading h1 { margin-bottom: 0.5rem; }
@media (max-width: 768px) {
    .content-area { grid-template-columns: 1fr; gap: 1.5rem; }
    .main-layout { padding: 1rem 1.5rem; }
}

/* === Posts list === */
.posts-list h1 { margin-bottom: 1.5rem; font-size: 1.85rem; }
.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.post-card-image { width: 100%; border-radius: 0; display: block; }
.post-card-body { padding: 1.5rem; }
.post-card-body h2 { margin-bottom: 0.5rem; font-size: 1.4rem; }
.post-card-body h2 a { color: #1a1a2e; }
.post-card-body h2 a:hover { color: #2563eb; }
.post-meta { font-size: 0.95rem; color: #64748b; margin-bottom: 0.75rem; }
.post-meta span { margin-right: 1rem; }
.post-meta .author a { color: #64748b; }
.excerpt { color: #475569; margin-bottom: 0.75rem; font-size: 1.1rem; }
.read-more { font-weight: 600; font-size: 1rem; }

/* === Full post === */
.post-full { background: #fff; border-radius: 10px; padding: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; }
.post-full h1 { font-size: 2.25rem; margin-bottom: 1rem; line-height: 1.2; }
.post-full-image { width: calc(100% + 3rem); max-width: none; border-radius: 0; display: block; margin: -1.5rem -1.5rem 1.5rem; }
.post-categories { margin-bottom: 1rem; }
.tag {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}
.tag:hover { background: #2563eb; color: #fff; text-decoration: none; }
.post-content { font-size: 1.2rem; line-height: 1.8; overflow-x: hidden; overflow-wrap: break-word; }
.post-content h2 { margin: 1.75rem 0 0.75rem; font-size: 1.5rem; }
.post-content h3 { margin: 1.5rem 0 0.5rem; font-size: 1.25rem; }
.post-content p { margin-bottom: 1rem; }
.post-content p, .post-content li, .post-content td, .post-content th, .post-content figcaption { color: #666; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6,
.post-content p, .post-content li, .post-content td, .post-content th, .post-content figcaption, .post-content code {
    word-break: break-word;
    overflow-wrap: break-word;
}
.post-content ul, .post-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.post-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 0.75rem 1.5rem;
    margin: 1rem 0;
    background: #f1f5f9;
    border-radius: 0 6px 6px 0;
}
.post-content iframe { max-width: 100%; margin: 1rem 0; border-radius: 6px; }
.post-content img { max-width: 100%; border-radius: 10px; margin: 1rem 0; }
.post-content pre { overflow-x: auto; }
.post-content table { display: block; overflow-x: auto; }

/* === Share buttons === */
.share-buttons { display: flex; gap: 0.5rem; align-items: center; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; flex-wrap: wrap; }
.share-buttons span { font-weight: 600; font-size: 0.95rem; color: #475569; }
.share-btn {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #fff;
    background: #64748b;
}
.share-btn:hover { opacity: 0.9; text-decoration: none; }
.share-btn:active { opacity: 0.8; }
.share-copy { cursor: pointer; border: none; font-family: inherit; line-height: inherit; appearance: none; -webkit-appearance: none; }

/* === Author Box === */
.author-box {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.author-box-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    padding: 1.5rem;
}
.author-box-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-box-info { flex: 1; min-width: 0; }
.author-box-name { display: block; font-size: 1.1rem; margin-bottom: 0.35rem; color: #1a1a2e; }
.author-box-bio { font-size: 0.9rem; color: #475569; margin-bottom: 0.5rem; line-height: 1.5; }
.author-box-link { font-size: 0.85rem; color: #2563eb; display: inline-block; margin-bottom: 0.5rem; }
.author-box-link:hover { text-decoration: underline; }
.author-box-more { font-size: 0.82rem; }
.author-box-social { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Social icons */
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; transition: opacity 0.2s; }
.social-icon:hover { opacity: 0.8; text-decoration: none; }
.social-icon svg { display: block; }
.social-site { background: #64748b; }
.social-facebook { background: #1877f2; }
.social-instagram { background: #e4405f; }
.social-x { background: #000; }
.social-linkedin { background: #0a66c2; }
.social-youtube { background: #ff0000; }
.social-github { background: #333; }
.social-tiktok { background: #000; }
.social-pinterest { background: #bd081c; }
.social-whatsapp { background: #25d366; }
.social-telegram { background: #0088cc; }
.social-mastodon { background: #6364ff; }
.social-bluesky { background: #0085ff; }
.author-links .social-icon { width: 42px; height: 42px; }

/* === Pagination === */
.pagination {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}
.pagination-link:hover { border-color: #2563eb; color: #2563eb; text-decoration: none; }
.pagination-current { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.pagination-current:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

/* === Sidebar === */
.sidebar { }
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sidebar-widget h3 { font-size: 1.35rem; color: #1a1a2e; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e2e8f0; }
.search-form { display: flex; gap: 0.5rem; }
.search-form input { flex: 1; padding: 0.55rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 1.05rem; min-width: 0; }
.search-form button { flex: none; width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: #2563eb; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.category-list { list-style: none; }
.category-list li { padding: 0.45rem 0; border-bottom: 1px solid #f1f5f9; font-size: 1.05rem; }
.category-list li:last-child { border-bottom: none; }
.category-list .count { color: #94a3b8; font-size: 0.95rem; }
.banner img { width: 100%; border-radius: 6px; }
.feed-widget-desc { color: #475569; font-size: 0.98rem; margin-bottom: 1rem; }
.feed-widget-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #ea580c; color: #fff; padding: 0.6rem 1rem;
    border-radius: 6px; font-weight: 600; text-decoration: none;
}
.feed-widget-btn:hover { background: #c2410c; }

/* === Related posts === */
.related-posts { margin-top: 2.5rem; }
.related-posts h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }

/* === Author === */
.author-profile { text-align: center; margin-bottom: 2.5rem; }
.author-photo { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.author-bio { color: #475569; max-width: 600px; margin: 0 auto 1rem; font-size: 1.05rem; }
.author-links { display: flex; justify-content: center; gap: 1rem; }

/* === Admin === */
.admin-body { background: #f1f5f9; }
.admin-header { background: #1e293b; color: #fff; padding: 0.85rem 0; position: sticky; top: 0; z-index: 100; }
.admin-content { padding: 2rem 0; }
.admin-content h1 { margin-bottom: 1.5rem; font-size: 1.75rem; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.stat-number { display: block; font-size: 2.5rem; font-weight: 700; color: #2563eb; }
.stat-label { font-size: 0.9rem; color: #64748b; margin-top: 0.25rem; }

/* Chart cards */
.chart-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.chart-card h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.chart-container { position: relative; height: 300px; }

/* Table */
.table { width: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); border-collapse: collapse; margin-bottom: 2rem; }
.table th, .table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.table th { background: #f8fafc; font-weight: 600; font-size: 0.85rem; color: #475569; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }
.actions { display: flex; gap: 0.5rem; align-items: center; }

/* Status badge */
.status { display: inline-block; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; }
.status-published { background: #dcfce7; color: #166534; }
.status-draft { background: #fef9c3; color: #854d0e; }
.status-archived { background: #e2e8f0; color: #475569; }

/* Forms */
.form { background: #fff; border-radius: 10px; padding: 2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; color: #374151; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; cursor: pointer; }
.inline-form { display: inline; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { background: #f1f5f9; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.btn-edit-post { background: #2563eb; color: #fff; border-color: #2563eb; font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.btn-edit-post:hover { background: #1d4ed8; color: #fff; }
.btn-link { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 0.95rem; padding: 0; }
.btn-link:hover { color: #fff; text-decoration: underline; }

/* Alerts */
.alert { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.95rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Login */
.login-box { max-width: 420px; margin: 5rem auto; background: #fff; padding: 2.5rem; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.login-box .btn-primary { width: 100%; padding: 0.7rem; font-size: 1rem; }

/* Empty state */
.empty { color: #94a3b8; text-align: center; padding: 2rem; font-size: 1.05rem; }

/* Error page */
.error-page { text-align: center; padding: 5rem 0; }
.error-page h1 { font-size: 5rem; color: #2563eb; }
.error-page p { font-size: 1.25rem; color: #64748b; margin-bottom: 1.5rem; }

/* Quill editor */
#editor-container { min-height: 350px; }
.ql-editor { min-height: 350px; font-size: 1.05rem; }
.ql-toolbar { border-radius: 6px 6px 0 0; }
.ql-container { border-radius: 0 0 6px 6px; }

/* Media Library */
.media-upload { margin-bottom: 2rem; }
.upload-form { display: flex; align-items: center; gap: 1rem; }
.upload-btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}
.upload-btn:hover { background: #1d4ed8; }
.upload-btn input { display: none; }
.upload-info { color: #94a3b8; font-size: 0.9rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.media-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.media-preview { width: 100%; height: 180px; overflow: hidden; background: #f1f5f9; }
.media-preview img { width: 100%; height: 100%; object-fit: cover; }
.media-info { padding: 0.75rem; }
.media-name { font-size: 0.85rem; font-weight: 600; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0.25rem; }
.media-dims { font-size: 0.8rem; color: #64748b; }
.media-size { font-size: 0.8rem; color: #94a3b8; margin-bottom: 0.5rem; }
.media-actions { display: flex; gap: 0.35rem; }

/* Section headings in forms */
.form h2 { font-size: 1.15rem; color: #1a1a2e; margin: 1.5rem 0 0.75rem; padding-bottom: 0.35rem; border-bottom: 2px solid #e2e8f0; }
.form h2:first-of-type { margin-top: 0; }
.form-help { font-size: 0.85rem; color: #64748b; margin-bottom: 0.75rem; }
.form-group .btn + .btn { margin-left: 0.5rem; }

/* === Media Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-container {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.modal-header h2 { font-size: 1.2rem; margin: 0; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.modal-close:hover { color: #475569; }
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-upload { margin-bottom: 1.25rem; }
.modal-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
}
.modal-media-item {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}
.modal-media-item:hover { border-color: #2563eb; }
.modal-media-preview { width: 100%; height: 120px; overflow: hidden; background: #f1f5f9; }
.modal-media-preview img { width: 100%; height: 100%; object-fit: cover; }
.modal-media-info { padding: 0.5rem; }
.modal-media-name { font-size: 0.78rem; font-weight: 600; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-media-dims { font-size: 0.72rem; color: #94a3b8; }

/* === Changelog === */
.changelog-page { max-width: 800px; margin: 0 auto; padding: 1rem 0; }
.changelog-back { display: inline-block; color: #64748b; font-size: 0.95rem; margin-bottom: 1.5rem; }
.changelog-back:hover { color: #2563eb; }
.changelog-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.changelog-subtitle { color: #64748b; font-size: 1.05rem; margin-bottom: 2.5rem; }
.changelog-entry { background: #fff; border-radius: 10px; padding: 2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 1.5rem; }
.changelog-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid #e2e8f0; }
.changelog-version { font-size: 1.25rem; font-weight: 700; color: #2563eb; }
.changelog-date { font-size: 0.9rem; color: #94a3b8; }
.changelog-items { display: flex; flex-direction: column; gap: 1rem; }
.changelog-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.changelog-tag { flex-shrink: 0; display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.2rem; }
.tag-novidade { background: #dbeafe; color: #1e40af; }
.tag-melhoria { background: #dcfce7; color: #166534; }
.tag-correcao { background: #fef3c7; color: #92400e; }
.changelog-desc { font-size: 0.95rem; color: #334155; line-height: 1.5; }
.changelog-desc code { background: #f1f5f9; padding: 0.15rem 0.35rem; border-radius: 3px; font-size: 0.85rem; color: #1a1a2e; }

/* === Hamburger === */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
@media (max-width: 768px) {
    .hamburger { display: block; }
    .header-inner { flex-wrap: wrap; }
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: 0.75rem;
    }
    .nav.nav-open { display: flex; }
    .nav a, .nav form, .nav button {
        width: 100%;
        padding: 0.65rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav form button { text-align: left; }
}
@media (max-width: 768px) {
    .admin-header .header-inner { flex-wrap: wrap; }
    .admin-header .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding-top: 0.75rem;
    }
    .admin-header .nav.nav-open { display: flex; }
    .admin-header .nav a, .admin-header .nav form, .admin-header .nav button {
        width: 100%;
        padding: 0.65rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* === Comments === */
.comments-section { margin-top: 2.5rem; }
.comments-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.comments-list { margin-bottom: 2rem; }
.comment {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.85rem;
    border: 1px solid #e2e8f0;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.comment-author { color: #1a1a2e; }
.comment-date { color: #94a3b8; font-size: 0.85rem; }
.comment-body { color: #475569; font-size: 0.95rem; line-height: 1.6; }
.comment-form-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.comment-form-wrapper h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.comment-form .form-group { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; color: #374151; }
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.comment-feedback { margin-top: 1rem; }

/* === Badge (admin pending comments) === */
.badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* === Page improvements === */
.page-content { max-width: 800px; }

/* === Admin Sidebar === */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 112px);
    gap: 0;
}
.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: #1e293b;
    color: #cbd5e1;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}
.sidebar-group {
    padding: 0.5rem 0;
}
.sidebar-group-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.5rem 1rem 0.35rem;
    margin: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #64748b;
    transition: color 0.15s;
}
.sidebar-link:hover svg,
.sidebar-link.active svg {
    color: #fff;
}
.sidebar-link:hover {
    background: #334155;
    color: #f1f5f9;
}
.sidebar-link.active {
    background: #334155;
    color: #fff;
    border-left-color: #2563eb;
    font-weight: 600;
}
.sidebar-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-link-btn:hover {
    background: #334155;
    color: #f1f5f9;
}
.sidebar-divider {
    height: 1px;
    background: #334155;
    margin: 0.5rem 1rem;
}
.sidebar-footer {
    margin-top: auto;
    padding-bottom: 0.5rem;
}
.sidebar-logout-form {
    margin: 0;
}
.admin-content {
    flex: 1;
    padding: 1.5rem;
    background: #f1f5f9;
    min-width: 0;
}
.admin-header .header-inner {
    padding: 0 1.5rem;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
.header-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.header-link:hover {
    color: #fff;
}
#sidebar-toggle {
    display: none;
}
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        position: fixed;
        top: 56px;
        left: -240px;
        bottom: 0;
        width: 240px;
        min-width: 240px;
        z-index: 100;
        transition: left 0.25s ease;
        overflow-y: auto;
    }
    .admin-sidebar.sidebar-open { left: 0; }
    .admin-content { padding: 1rem; }
    #sidebar-toggle { display: block; }
}

/* ---- Quill Editor ---- */
#editor-container { min-height: 350px; }
.ql-editor { min-height: 350px; font-size: 1.05rem; }
.ql-toolbar { border-radius: 6px 6px 0 0; }
.ql-container { border-radius: 0 0 6px 6px; }

/* ---- Mobile Responsiveness ---- */
@media (max-width: 768px) {
    .post-card-body { padding: 1rem; }
    .post-full { padding: 1rem; }
    .post-full-image { width: calc(100% + 2rem); margin: -1rem -1rem 1rem; }
    .post-full h1 { font-size: 1.5rem; line-height: 1.25; margin-bottom: 0.75rem; }
    .form { padding: 1.25rem; }
    .form-row { grid-template-columns: 1fr; }
    .checkbox-group { flex-direction: column; gap: 0.5rem; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .admin-content .container { padding: 0; }
    .admin-content h1 { font-size: 1.25rem; }
}
