:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-soft: #1b232e;
    --bg-hover: #202a37;
    --text: #e6eaf0;
    --text-muted: #98a2b3;
    --border: #2a3441;
    --accent: #22c55e;
    --accent-hover: #2fdd70;
    --accent-dim: rgba(34, 197, 94, 0.14);
    --on-accent: #062013;
    --danger: #f4585c;
    --warning: #f5a623;
    --success: #34d399;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Header ---------- */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo a {
    color: var(--accent);
    text-decoration: none;
}

.header-center {
    position: relative;
    flex: 1;
    max-width: 520px;
}

#search-bar {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-bar::placeholder {
    color: var(--text-muted);
}

#search-bar:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
}

.search-results .search-item {
    display: block;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}

.search-results .search-item:last-child {
    border-bottom: none;
}

.search-results .search-item:hover {
    background: var(--bg-soft);
}

.search-results .search-empty {
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Nav / Buttons ---------- */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#user-display {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s, color 0.2s;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.97);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-dim);
}

.btn-danger {
    background: var(--danger);
    color: #1a0506;
}

.btn-danger:hover {
    background: #ff7478;
}

.btn-warning {
    background: var(--warning);
    color: #201502;
}

.btn-warning:hover {
    background: #ffb547;
}

.btn-success {
    background: var(--success);
    color: #042317;
}

.btn-success:hover {
    background: #57e0ae;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.hidden {
    display: none !important;
}

/* ---------- Main layout ---------- */
main {
    flex: 1;
    padding: 24px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Home / Article list ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
}

.hero {
    background: linear-gradient(135deg, #10683a 0%, #22c55e 120%);
    color: #fff;
    padding: 40px 36px;
    border-radius: 14px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #1e9e50;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.hero p {
    font-size: 1.05rem;
    opacity: 0.95;
    max-width: 640px;
}

.hero .btn {
    margin-top: 18px;
    background: #eafff0;
    color: #0a5c2e;
}

.hero .btn:hover {
    background: #d5f5e0;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #2e8f57;
}

.article-card .card-media {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    background: #1a2029;
}

.article-card .card-body {
    padding: 16px;
    flex: 1;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.article-card h3 a {
    color: var(--accent);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.article-card .card-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.article-card .card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-muted);
    transition: transform 0.15s, color 0.15s;
}

.fav-btn:hover {
    transform: scale(1.15);
}

.fav-btn.active {
    color: var(--warning);
}

.fav-btn.active::before {
    content: "\2605";
}

.fav-btn:not(.active)::before {
    content: "\2606";
}

/* ---------- Article view ---------- */
.article-view {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.article-view-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.article-view-header h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.article-content {
    line-height: 1.75;
    font-size: 1.02rem;
    overflow-wrap: break-word;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 12px 0;
    box-shadow: var(--shadow);
}

.article-content figure {
    margin: 20px 0;
    text-align: center;
}

.article-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.article-content a {
    color: var(--accent);
}

.article-content a:hover {
    color: var(--accent-hover);
}

.article-content h2, .article-content h3, .article-content h4 {
    margin: 24px 0 10px;
}

.article-content p {
    margin-bottom: 14px;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 8px 16px;
    background: var(--bg-soft);
    margin: 16px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content ul, .article-content ol {
    margin: 12px 0 12px 24px;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ---------- Visual article editor ---------- */
.editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-soft);
}

.editor-tool {
    min-width: 34px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
}

.editor-tool:hover,
.editor-tool:focus-visible {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
    outline: none;
}

.editor-tool:nth-child(2) {
    font-style: italic;
}

.editor-tool:nth-child(3) {
    text-decoration: underline;
}

.editor-divider {
    width: 1px;
    height: 24px;
    margin: 0 2px;
    background: var(--border);
}

.rich-editor {
    min-height: 320px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    outline: none;
    overflow-wrap: break-word;
}

.rich-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.rich-editor p,
.rich-editor ul,
.rich-editor ol,
.rich-editor blockquote {
    margin: 0 0 14px;
}

.rich-editor h2,
.rich-editor h3 {
    margin: 22px 0 10px;
}

.rich-editor ul,
.rich-editor ol {
    padding-left: 26px;
}

.rich-editor blockquote {
    padding: 8px 14px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--bg-soft);
}

.rich-editor figure,
.article-content figure {
    display: block;
    max-width: 100%;
    margin: 20px 0;
}

.rich-editor figure img,
.article-content figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.rich-editor figure iframe,
.rich-editor figure video,
.article-content figure iframe,
.article-content figure video {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border: 0;
    border-radius: var(--radius);
}

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 4px;
}

.error-msg {
    background: #2a1417;
    color: #ff8387;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.success-msg {
    background: #0d2a1e;
    color: #58e0aa;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.form-editor {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    max-width: 820px;
    margin: 0 auto;
}

.form-editor h2 {
    margin-bottom: 20px;
}

.form-help {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.form-help code {
    background: #263041;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #b7e6c8;
}

/* ---------- Media tools ---------- */
.media-tools {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 16px;
    background: var(--bg-soft);
}

.media-tools h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.media-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.media-buttons .btn {
    font-size: 0.8rem;
}

#media-preview {
    margin-top: 10px;
    max-width: 300px;
}

#media-preview img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.modal-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ---------- Admin panel ---------- */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    position: sticky;
    top: 90px;
}

.admin-sidebar h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.admin-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    margin-bottom: 4px;
    font-family: inherit;
    text-decoration: none;
}

.admin-nav-item:hover {
    background: var(--bg-soft);
}

.admin-nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.admin-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.admin-content h2 {
    margin-bottom: 20px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    flex-wrap: wrap;
}

.admin-list-item:hover {
    border-color: #2e8f57;
}

.admin-list-item .item-info {
    flex: 1;
    min-width: 180px;
}

.admin-list-item .item-info strong {
    display: block;
    margin-bottom: 2px;
}

.admin-list-item .item-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-list-item .item-actions {
    display: flex;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- User management ---------- */
.role-select {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--bg);
    color: var(--text);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-admin {
    background: rgba(245, 166, 35, 0.16);
    color: #ffb547;
}

.badge-user {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ---------- Filter bar / categories & tags ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.filter-pill small {
    font-weight: 500;
    color: var(--text-muted);
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.filter-pill.active small {
    color: rgba(6, 32, 19, 0.7);
}

.filter-pill .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px dashed var(--border);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.tag-pill small {
    color: var(--text-muted);
    font-weight: 500;
}

.tag-pill:hover {
    background: rgba(34, 197, 94, 0.26);
}

.tag-pill.active {
    background: var(--accent);
    color: var(--on-accent);
}

.tag-pill.active small {
    color: rgba(6, 32, 19, 0.7);
}

/* ---------- Chips on article view ---------- */
.chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 2px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.chip:hover {
    background: rgba(34, 197, 94, 0.26);
}

.chip-cat {
    background: rgba(34, 197, 94, 0.2);
}

.chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ---------- Tag picker in editor ---------- */
.tag-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-soft);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
}

.tag-check:hover {
    border-color: var(--accent);
}

.tag-check input {
    accent-color: var(--accent);
}

.tag-check.has-checked,
.tag-check:has(input:checked) {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 6px;
}

/* ---------- Toast ---------- */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background: #232c39;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    animation: slideIn 0.25s ease;
    max-width: 340px;
}

.toast.success { background: #0d2a1e; border-color: #1d6e4d; color: #58e0aa; }
.toast.error { background: #2a1417; border-color: #7a2d33; color: #ff8387; }
.toast.warning { background: #2b2010; border-color: #6e4e15; color: #ffc266; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    margin-top: 32px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #2c3644;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #39445a;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    #header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-center {
        max-width: none;
        order: 3;
    }

    .header-right {
        order: 2;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .article-view {
        padding: 20px;
    }
}
