:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --border: #e9ecf4;
    --text: #1a1d29;
    --muted: #707689;
    --primary: #14b8a6;
    --primary-2: #2dd4bf;
    --primary-dark: #0f766e;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --grad: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 50%, #06b6d4 100%);
    --grad-soft: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    --shadow-sm: 0 1px 2px rgba(20,23,41,.05);
    --shadow: 0 4px 16px rgba(20,23,41,.06);
    --shadow-lg: 0 16px 48px rgba(20,184,166,.14);
    --radius: 16px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

.container { width: min(1140px, calc(100% - 36px)); margin: 0 auto; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Topbar ===== */
.topbar {
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
    width: min(1140px, calc(100% - 36px)); margin: 0 auto;
    display: flex; align-items: center; gap: 20px; height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo {
    width: 38px; height: 38px; border-radius: 11px; background: var(--grad);
    color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800;
    box-shadow: 0 6px 16px rgba(13,148,136,.4);
}
.brand-text { font-size: 21px; color: var(--text); letter-spacing: -.02em; }
.brand-text span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 440px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 0 16px; height: 42px; color: var(--muted); transition: .2s; }
.search:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(20,184,166,.1); }
.search input { flex: 1; border: none; background: transparent; outline: none; font-size: 14.5px; font-family: inherit; color: var(--text); }
.search-inline { max-width: 100%; margin: 0 0 22px; height: 46px; }

.topnav { display: flex; align-items: center; gap: 18px; margin-left: auto; font-size: 14.5px; font-weight: 500; }
.topnav > a { color: var(--text); }
.topnav > a:hover { color: var(--primary); }

/* User menu */
.user-menu { position: relative; }
.user-pill { display: flex; align-items: center; gap: 9px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 14px 4px 4px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text); transition: .2s; }
.user-pill:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.user-pill-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 190px; padding: 8px; opacity: 0; visibility: hidden;
    transform: translateY(-6px); transition: .18s; }
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); font-size: 14px; }
.user-dropdown a:hover { background: var(--grad-soft); color: var(--primary-dark); }
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown a.danger:hover { background: #fef2f2; }

/* Honeypot field (hidden from humans) */
.field:has(.hp-field), .hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Report */
.report { position: relative; }
.report summary { list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report-form { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 14px; width: 300px; display: flex; flex-direction: column; gap: 8px; }
.report-form select, .report-form input { width: 100%; }

/* Tags */
.sidebar h3.mt { margin-top: 22px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; background: var(--grad-soft); border: 1px solid #b9ece3; color: var(--primary-dark); font-size: 13px; font-weight: 600; }
.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.tag span { font-size: 11px; opacity: .7; }
.tag-sm { padding: 2px 9px; font-size: 12px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post-tags-lg { margin: 18px 0; }

/* Rank badge */
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: middle; }
.tier-rookie { background: #eef1f6; color: #64748b; }
.tier-member { background: #e0f2fe; color: #0369a1; }
.tier-active { background: #ede9fe; color: #0f766e; }
.tier-veteran { background: #ffedd5; color: #c2410c; }
.tier-legend { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,.45); }

/* Leaderboard */
.rank-list { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.rank-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; }
.rank-num { font-size: 20px; font-weight: 800; color: var(--muted); width: 36px; text-align: center; flex-shrink: 0; }
.rank-1 .rank-num { color: #f59e0b; }
.rank-2 .rank-num { color: #94a3b8; }
.rank-3 .rank-num { color: #b45309; }
.rank-user { display: flex; align-items: center; gap: 12px; flex: 1; color: var(--text); min-width: 0; }
.rank-user .mini-avatar { width: 42px; height: 42px; font-size: 17px; overflow: hidden; }
.rank-user .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rank-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-stats { color: var(--muted); font-size: 13.5px; text-align: right; white-space: nowrap; }
.rank-stats strong { color: var(--primary-dark); }
@media (max-width: 560px) { .rank-stats { display: none; } }

/* Notification bell */
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text); background: var(--bg); border: 1px solid var(--border); }
.bell:hover { color: var(--primary); border-color: var(--primary); }
.bell .ic { width: 20px; height: 20px; }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(6,182,212,.5); }

/* Notification list */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-item { padding: 0; margin-bottom: 10px; }
.notif-item.unread { border-color: #c7d2fe; background: linear-gradient(0deg, #fff, #f5f3ff); }
.notif-link { display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: var(--text); }
.notif-link:hover { color: var(--text); }
.notif-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.notif-text { font-weight: 600; }
.notif-sub { color: var(--muted); font-size: 14px; }
.notif-time { color: var(--muted); font-size: 12.5px; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border: 1px solid var(--border);
    background: #fff; color: var(--text); border-radius: 11px; cursor: pointer; font-size: 14.5px; font-weight: 600; font-family: inherit; transition: .18s; white-space: nowrap; }
.btn:hover { border-color: #d4d8e6; transform: translateY(-1px); color: var(--text); }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 6px 18px rgba(20,184,166,.35); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(20,184,166,.45); }
.btn-active { background: var(--grad-soft); border-color: var(--primary); color: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: #f6caca; }
.btn-danger:hover { background: #fef2f2; }
.btn-light { background: #fff; color: var(--primary-dark); border: none; box-shadow: var(--shadow); }
.btn-light:hover { color: var(--primary-dark); }
.btn-ghost { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.28); color: #fff; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: 14px; font-family: inherit; font-weight: 600; }
.link-btn:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero { background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; padding: 60px 0; position: relative; z-index: 2; }
.hero-text { max-width: 600px; }
.hero-text h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 14px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero-text h1 span { color: #fde68a; }
.hero-text p { font-size: 17px; opacity: .92; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-deco { position: absolute; inset: 0; z-index: 1; }
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; }
.blob-1 { width: 320px; height: 320px; background: #5eead4; top: -80px; right: -40px; }
.blob-2 { width: 260px; height: 260px; background: #67e8f9; bottom: -100px; right: 180px; }
.blob-3 { width: 200px; height: 200px; background: #fcd34d; top: 40px; right: 320px; opacity: .35; }

/* ===== Messages ===== */
.messages { margin: 18px auto 0; }
.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: 14.5px; font-weight: 500; border: 1px solid; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }

/* ===== Layout ===== */
.container { padding: 28px 0 56px; }
.hero + .messages, .hero + .container { padding-top: 32px; }
.layout { display: grid; grid-template-columns: 256px 1fr; gap: 28px; align-items: start; }

.sidebar { position: sticky; top: 86px; }
.sidebar h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; font-weight: 700; }
.cat-list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-sm); }
.cat-list li { display: flex; justify-content: space-between; align-items: center; }
.cat-list a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); flex: 1; font-size: 14.5px; font-weight: 500; }
.cat-list a:hover { background: var(--grad-soft); color: var(--primary-dark); }
.cat-list a.active { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(20,184,166,.3); }
.cat-list .muted { font-size: 12px; padding-right: 10px; }

/* ===== Cards ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }

.feed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 14px; }
.feed-head h1 { font-size: 24px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.sorts { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-sm); }
.sorts a { padding: 6px 16px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; }
.sorts a.active { background: var(--grad); color: #fff; }

/* Post card */
.post-card { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; transition: .2s; cursor: default; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d9def0; }
.post-card h2 { font-size: 19px; margin: 0 0 8px; font-weight: 700; letter-spacing: -.01em; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--primary); }
.excerpt { color: var(--muted); margin: 0 0 12px; font-size: 14.5px; }
.post-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-meta a { color: var(--primary-dark); font-weight: 600; }
.post-card-stats { display: flex; flex-direction: column; gap: 7px; text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; font-weight: 600; }
.post-card-stats span { display: inline-flex; gap: 5px; align-items: center; justify-content: flex-end; }
.mini-avatar-sm { width: 22px; height: 22px; font-size: 11px; }
.chip { background: var(--grad-soft); border: 1px solid #b9ece3; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.chip a { color: var(--primary-dark); }
.comment .mini-avatar { flex-shrink: 0; width: 38px; height: 38px; font-size: 16px; }
.comment-body { font-size: 14.5px; }

/* Thumbnail on post card */
.post-card.has-thumb .post-card-main { flex: 1; }
.post-thumb { flex-shrink: 0; width: 150px; height: 104px; border-radius: 12px; overflow: hidden; order: -1; background: var(--bg); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-thumb img { transform: scale(1.06); }

/* Gallery in post detail — dải cuộn ngang, xem tại chỗ (không mở tab khác) */
.post-gallery { display: flex; gap: 12px; margin: 20px 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.post-gallery figure { margin: 0; flex: 0 0 auto; width: 280px; scroll-snap-align: start; }
.post-gallery .pg-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.post-gallery img { width: 100%; height: 210px; border-radius: 12px; border: 1px solid var(--border); display: block; transition: .2s; object-fit: cover; }
.post-gallery .pg-thumb:hover img { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-gallery figcaption { font-size: 12.5px; color: var(--muted); margin-top: 5px; text-align: center; }
.post-gallery::-webkit-scrollbar { height: 8px; }
.post-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.post-gallery::-webkit-scrollbar-track { background: transparent; }

/* Lightbox xem ảnh ngay trong trang (overlay, không điều hướng đi đâu) */
.pg-lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.84); display: flex; align-items: center; justify-content: center; }
.pg-lightbox[hidden] { display: none; }
.pg-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 18px 48px rgba(0,0,0,.5); }
.pg-lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; padding: 0 16px; }
.pg-lb-btn, .pg-lb-close { background: rgba(255,255,255,.16); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pg-lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; font-size: 26px; }
.pg-lb-btn:hover, .pg-lb-close:hover { background: rgba(255,255,255,.32); }
.pg-lb-prev { left: 18px; }
.pg-lb-next { right: 18px; }
.pg-lb-close { position: absolute; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 50%; font-size: 22px; }
.pg-lb-count { position: absolute; top: 20px; left: 20px; color: #fff; font-size: 13px; opacity: .85; }
@media (max-width: 560px) { .post-gallery figure { width: 220px; } .post-gallery img { height: 165px; } .pg-lb-btn { width: 40px; height: 40px; font-size: 22px; } }
.form-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.form-gallery img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.form-gallery .help { flex-basis: 100%; }

.empty { background: var(--card); border: 2px dashed var(--border); border-radius: var(--radius); padding: 56px; text-align: center; color: var(--muted); font-size: 15px; }
.muted { color: var(--muted); }

/* Pagination */
.pagination { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 26px; }
.pagination a { padding: 9px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-weight: 600; box-shadow: var(--shadow-sm); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { color: var(--muted); font-size: 14px; font-weight: 600; }

/* Post full */
.post-full h1 { margin: 0 0 10px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.post-body { margin: 22px 0; font-size: 16.5px; color: #2b303f; }
.post-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 18px; }
.post-actions form { margin: 0; }

/* Comments */
.comments h2 { font-size: 19px; margin: 0 0 18px; font-weight: 700; }
textarea, .field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14.5px; outline: none; background: #fff; transition: .18s; color: var(--text); }
textarea:focus, .field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(20,184,166,.1); }
.comment-form { margin-bottom: 22px; }
.comment-form button { margin-top: 12px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { padding: 16px 0; border-top: 1px solid var(--border); display: flex; gap: 12px; }
.comment.reply { margin-left: 38px; }
.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-meta a { font-weight: 600; }

/* ===== Forms ===== */
.form-narrow { max-width: 460px; margin: 8px auto; }
.form-wide { max-width: 780px; margin: 0 auto; }
.form-card { padding: 32px; }
.form-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.form-card > .muted { margin-top: 0; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field .req { color: var(--danger); }
.help { color: var(--muted); font-size: 12.5px; display: block; margin-top: 5px; }
.field-error { color: var(--danger); font-size: 12.5px; display: block; margin-top: 5px; }
.form-actions { display: flex; gap: 10px; }
.form-links { display: flex; justify-content: space-between; margin-top: 20px; font-size: 14px; font-weight: 500; }
.resend { margin-top: 16px; text-align: center; }

/* ===== Profile ===== */
.profile-head { display: flex; gap: 24px; align-items: center; background: var(--grad-soft); border-color: #b9ece3; }
.avatar img, .avatar-fallback { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; box-shadow: var(--shadow-lg); }
.profile-info h1 { margin: 0 0 5px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.profile-stats { display: flex; gap: 22px; margin: 14px 0; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.profile-stats strong { color: var(--text); font-size: 17px; display: block; }
.profile-actions { display: flex; gap: 10px; }
.profile-actions form { margin: 0; }

/* ===== Members ===== */
.feed-full { max-width: 920px; margin: 0 auto; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.member-card { text-align: center; display: block; transition: .2s; }
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d9def0; }
.member-card .avatar { display: flex; justify-content: center; margin-bottom: 12px; }
.member-card .avatar img, .member-card .avatar-fallback { width: 68px; height: 68px; font-size: 28px; }
.member-name { font-weight: 700; color: var(--text); margin-bottom: 4px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); background: #fff; margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 36px 0 20px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.footer-brand { font-size: 20px; }
.footer-links { display: flex; gap: 22px; align-items: center; font-size: 14.5px; font-weight: 500; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--primary); }
.footer-copy { border-top: 1px solid var(--border); padding: 16px 0; text-align: center; color: var(--muted); font-size: 13.5px; }

@media (max-width: 820px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; order: 2; }
    .hero-inner { padding: 44px 0; }
    .user-pill-name { display: none; }
    .search { max-width: 100%; order: 3; flex-basis: 100%; }
    .topbar-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
}
@media (max-width: 560px) {
    .topnav { gap: 12px; font-size: 14px; }
    .post-card { flex-direction: column; }
    .post-card-stats { flex-direction: row; gap: 14px; text-align: left; }
    .form-card { padding: 22px; }
}

/* ===== Trang soạn bài: full-width + TinyMCE (2026-06-04) ===== */
.compose-fullwidth{position:relative;width:100vw;left:50%;margin-left:-50vw;padding:0 24px;box-sizing:border-box;}
.form-compose{max-width:100%;width:100%;}
.tox-tinymce{border-radius:12px!important;}
.post-body-rich img{max-width:100%;height:auto;border-radius:8px;}
.post-body-rich table{border-collapse:collapse;margin:1em 0;}
.post-body-rich td,.post-body-rich th{border:1px solid var(--border);padding:6px 10px;}
.post-body-rich h2,.post-body-rich h3,.post-body-rich h4{margin-top:1.2em;}
@media(max-width:640px){.compose-fullwidth{padding:0 12px;}}

/* ===== Kiểm duyệt (Mod) 2026-06-04 ===== */
.mod-table{width:100%;border-collapse:collapse;font-size:14px;margin-top:8px;}
.mod-table th,.mod-table td{border:1px solid var(--border);padding:8px 10px;text-align:left;vertical-align:top;}
.mod-table th{background:var(--bg);font-weight:600;}
.mod-actions form{display:flex;gap:6px;flex-wrap:wrap;}
.btn-sm{padding:4px 10px;font-size:13px;}
.link-btn.danger{color:var(--danger);}
.comment-del{display:inline-block;margin-top:4px;}
