body.admin, body.login-page {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
    background: #f1f5f9;
}

.admin-top {
    background: #0f172a;
    color: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-top-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: .55rem .75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}
.admin-brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    margin-right: .25rem;
}
.admin-nav {
    display: none;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: .25rem .6rem;
    padding: .35rem 0 .4rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.admin-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .88rem;
    padding: .3rem .45rem;
    border-radius: 6px;
}
.admin-nav a:hover, .admin-nav a.is-active {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.admin-nav-toggle {
    display: inline-flex;
    width: 2.4rem; height: 2.4rem;
    align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    margin-right: .25rem;
}
body.admin.nav-open .admin-nav { display: flex; }
.admin-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}
.logout-form { margin: 0; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .45rem .85rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: #d71920; color: #fff; border-color: #d71920; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
    background: transparent;
    color: rgba(226,232,240,.92);
    border-color: rgba(255,255,255,.35);
}
body.login-page .btn-ghost {
    background: transparent;
    color: #475569;
    border-color: #cbd5e1;
}
.admin-user .btn-ghost { padding: .32rem .6rem; }
.btn-block { width: 100%; }
.btn-sm { padding: .28rem .55rem; font-size: .8rem; }
.btn-danger {
    background: #b91c1c;
    color: #fff;
    border-color: #991b1b;
}

@media (min-width: 800px) {
    .admin-nav-toggle { display: none; }
    .admin-nav {
        display: flex;
        flex-basis: auto;
        border: 0;
        padding: 0;
        flex: 1;
    }
    body.admin.nav-open .admin-nav { display: flex; }
}

.admin-body { max-width: 1100px; margin: 0 auto; padding: 1rem .75rem 2rem; }

.flash {
    padding: .65rem .85rem;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.flash-warn {
    background: #fef9c3;
    color: #854d0e;
}

.admin-page h1 { font-size: 1.35rem; margin: 0 0 1rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.stat-num { display: block; font-size: 1.75rem; font-weight: 800; color: #c41219; }
.stat-label { font-size: .82rem; color: #64748b; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.data-table th, .data-table td {
    text-align: left;
    padding: .55rem .65rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.data-table th { background: #f8fafc; font-weight: 700; }
.data-table .admin-th-thumb { width: 1%; white-space: nowrap; }
.admin-article-thumb-wrap,
.admin-article-thumb-link {
    display: inline-block;
    line-height: 0;
}
.admin-article-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #e2e8f0;
}
.admin-article-thumb-link:hover img { outline: 2px solid #d71920; outline-offset: 2px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.actions {
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.badge {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
    color: #334155;
    background: #e2e8f0;
    padding: .18rem .4rem;
    border-radius: 4px;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .88rem;
    font-weight: 600;
}
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label.check { flex-direction: row; align-items: center; gap: .5rem; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .85rem;
    max-width: 720px;
    background: #fff;
    padding: 1rem .95rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}
.form-grid input, .form-grid select, .form-grid textarea {
    font: inherit;
    padding: .45rem .55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 100%;
}
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.card-form {
    background: #fff;
    padding: .85rem .95rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    max-height: fit-content;
}
.card-form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .88rem; }
.card-form input, .card-form select {
    padding: .45rem .55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.split-panel {
    display: grid;
    gap: 1rem;
}
@media (min-width: 900px) {
    .split-panel {
        grid-template-columns: minmax(220px, 280px) 1fr;
        align-items: start;
    }
}

.role-pill {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #c2410c;
    background: #ffedd5;
    padding: .15rem .4rem;
    border-radius: 4px;
}

.reporter-hint { background: #f0fdf4; padding: .55rem .65rem; border-radius: 8px; border: 1px solid #bbf7d0; }

.reporter-avatar-block { display: flex; flex-direction: column; gap: .45rem; }
.reporter-avatar-label { font-size: .88rem; font-weight: 600; }
.reporter-avatar-preview img {
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}
.reporter-avatar-remove {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
}
.form-grid .reporter-avatar-remove input[type="checkbox"] { width: auto; }

.stat-warn .stat-num { color: #b45309; }

.row-pending { background: rgba(251,191,36,.06); }
.row-rejected td { vertical-align: top; }
.cell-note { margin: .35rem 0 0; font-size: .8rem; color: #b91c1c; font-weight: 500; }

.verify-card {
    background: #fff;
    border-radius: 10px;
    padding: .85rem .95rem 1rem;
    margin-bottom: .85rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.verify-card h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.verify-card-head .meta { margin: 0 0 .5rem; font-size: .82rem; color: #64748b; }
.verify-card .excerpt { font-size: .88rem; color: #475569; margin: 0 0 .65rem; }
.verify-actions {
    display: grid;
    gap: .85rem;
}
@media (min-width: 720px) {
    .verify-actions { grid-template-columns: 1fr 1fr; align-items: start; }
}
.inline-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .45rem;
}
.reject-form textarea { width: 100%; max-width: 100%; padding: .4rem .5rem; margin-top: .25rem; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.form-inline-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.form-inline-actions--stack {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
    gap: .5rem;
}
.form-inline-actions--stack .btn-block { width: 100%; }

/* —— Edit berita: tata letak rapi —— */
.article-edit-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
}
.article-edit-header-main { min-width: 0; flex: 1; }
.article-edit-crumb {
    margin: 0 0 .45rem;
    font-size: .86rem;
}
.article-edit-crumb a {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
}
.article-edit-crumb a:hover { color: #c41219; }
.article-edit-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.article-edit-meta {
    margin: .45rem 0 0;
    font-size: .82rem;
    color: #64748b;
}
.article-edit-slug {
    font-size: .78rem;
    font-weight: 500;
    background: #f1f5f9;
    padding: .12rem .4rem;
    border-radius: 6px;
    color: #475569;
}

.article-status-badge {
    flex-shrink: 0;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .4rem .75rem;
    border-radius: 999px;
}
.article-status-badge--draft { background: #f1f5f9; color: #475569; }
.article-status-badge--pending { background: #fef3c7; color: #92400e; }
.article-status-badge--published { background: #dcfce7; color: #166534; }
.article-status-badge--rejected { background: #fee2e2; color: #991b1b; }

.article-edit-callouts { margin-bottom: 1.1rem; }
.article-edit-callouts .help:last-child { margin-bottom: 0; }

.article-form {
    display: block;
}
.article-form-layout {
    display: grid;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 960px) {
    .article-form-layout {
        grid-template-columns: 1fr minmax(280px, 320px);
        gap: 1.5rem;
    }
}
.article-form-main,
.article-form-aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-form fieldset.form-section {
    margin: 0;
    min-width: 0;
    padding: 1.15rem 1.2rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.article-form .form-section-title {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid #f1f5f9;
}
.article-form label {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .88rem;
    font-weight: 600;
    color: #334155;
}
.article-form label.full { grid-column: 1 / -1; }
.article-form input,
.article-form select,
.article-form textarea {
    font: inherit;
    padding: .5rem .6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 100%;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.article-form input:focus,
.article-form select:focus,
.article-form textarea:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}
.article-form textarea.input-content {
    min-height: 20rem;
    line-height: 1.55;
    resize: vertical;
}
.article-form .input-file {
    padding: .4rem 0;
    font-size: .86rem;
    font-weight: 500;
    cursor: pointer;
}

.form-row-2 {
    display: grid;
    gap: .85rem;
    grid-template-columns: 1fr;
}
@media (min-width: 560px) {
    .form-row-2 { grid-template-columns: 1fr 1fr; }
}

.article-image-preview {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.article-image-preview-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.article-image-preview img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.article-form-footer {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e2e8f0;
}
.article-form-footer .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

.btn-secondary {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.btn-outline {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}
.btn-outline:hover {
    border-color: #64748b;
    color: #0f172a;
    background: #f8fafc;
}
.btn-ghost-dark {
    background: transparent;
    color: #64748b;
    border-color: transparent;
}
.btn-ghost-dark:hover {
    background: #f1f5f9;
    color: #334155;
}

.help { color: #64748b; font-size: .9rem; margin: 0 0 1rem; }
.help code { background: #e2e8f0; padding: .08rem .3rem; border-radius: 4px; font-size: .82rem; }
.field-hint {
    display: block;
    margin-top: .35rem;
    font-size: .82rem;
    font-weight: 400;
    color: #64748b;
    line-height: 1.4;
}

/* login page */
.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(155deg, #fee2e2 0%, #f1f5f9 40%, #e0f2fe 100%);
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    padding: 1.35rem 1.35rem 1rem;
    box-shadow: 0 10px 40px rgba(15,23,42,.14);
}
.login-card h1 { margin: 0 0 .15rem; font-size: 1.5rem; }
.login-sub { margin: 0 0 .85rem; color: #64748b; font-size: .9rem; }
.dev-creds {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: .55rem .7rem .55rem .85rem;
    font-size: .78rem;
    margin-bottom: 1rem;
    color: #78350f;
}
.dev-creds ul { margin: .35rem 0 0; padding-left: 1rem; }
.dev-creds code {
    font-size: .78rem;
    background: rgba(251,191,36,.25);
    padding: .06rem .2rem;
    border-radius: 3px;
}
.login-form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .86rem; margin-bottom: .7rem; }
.login-form input {
    padding: .5rem .6rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}
.login-foot { text-align: center; margin-top: 1rem; font-size: .88rem; }
.login-foot a { color: #c41219; }

@media (max-width: 600px) {
    .data-table thead { display: none; }
    .data-table tbody tr {
        display: block;
        border-bottom: 1px solid #e2e8f0;
        padding: .55rem .4rem .65rem .6rem;
    }
    .data-table tbody td {
        display: grid;
        grid-template-columns: 90px 1fr;
        border: 0;
        padding: .25rem 0;
    }
    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: .72rem;
    }
    .data-table td.actions { display: flex; gap: .35rem; }
    .data-table td.actions::before { content: ''; }
    .data-table tbody td.admin-article-thumb img {
        width: min(120px, 100%);
        max-width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }
}
