:root { --maroon: #701b35; --dark: #4a1025; --paper: #fbf8f6; --ink: #241a1d; --muted: #766b6e; --line: #e9dfe1; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { width: min(1050px, calc(100% - 40px)); margin: 0 auto; }
.header { border-bottom: 1px solid var(--line); background: rgba(251,248,246,.95); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav > div { display: flex; gap: 24px; font-size: 13px; font-weight: 700; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.04em; }
.brand span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--maroon); color: white; font: 700 15px monospace; }
.main { min-height: calc(100vh - 150px); padding-top: 70px; padding-bottom: 80px; }
.eyebrow { color: var(--maroon); font: 700 11px monospace; letter-spacing: .12em; }
h1 { margin: 14px 0; font-size: clamp(38px, 6vw, 58px); line-height: 1.1; letter-spacing: -.06em; }
h1 em { color: var(--maroon); font-style: normal; }
h2 { font-size: 23px; letter-spacing: -.04em; }
h3 { font-size: 16px; }
.intro, .hint, .meta { color: var(--muted); line-height: 1.7; }
.intro { max-width: 580px; font-size: 15px; }
.hint, .meta { font-size: 12px; }
.message { margin: 22px 0; padding: 14px 16px; border: 1px solid #e8dadd; border-radius: 9px; background: #f6edef; color: #704456; font-size: 13px; line-height: 1.5; }
.message.error { color: #8d1730; border-color: #e5b7c0; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.panel, .article-card { padding: 25px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 26px rgba(73,28,42,.04); }
.article-card { display: flex; flex-direction: column; min-height: 175px; }
.article-card-cover { width: 100%; height: 150px; margin-bottom: 12px; border-radius: 8px; object-fit: cover; background: #f3e7e9; }
.article-card h2 { margin: 10px 0; font-size: 20px; overflow-wrap: anywhere; }
.article-card a { margin-top: auto; font-size: 13px; font-weight: 700; }
.article-content { margin-top: 30px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.article-cover { display: block; width: 100%; max-height: 460px; margin-top: 24px; border-radius: 10px; object-fit: cover; background: #f3e7e9; }
.article-content.ql-container { border: 0; font: inherit; white-space: normal; }
.article-content .ql-editor { padding: 0; min-height: 0; overflow-wrap: anywhere; }
.article-content .ql-editor img, #editor .ql-editor img { max-width: 100%; height: auto; }
.article-content .ql-editor pre.ql-syntax, .article-content .ql-code-block-container { overflow-x: auto; }
.back { font-size: 13px; font-weight: 700; }
.login-panel { max-width: 490px; margin: 0 auto; padding: 35px; }
.login-panel h1 { font-size: 42px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.dashboard-head h1 { font-size: clamp(34px, 5vw, 48px); overflow-wrap: anywhere; }
.dashboard-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 24px; }
.dashboard-nav { padding: 18px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.dashboard-nav p { margin: 0 10px 12px; color: var(--muted); font: 700 10px monospace; letter-spacing: .1em; }
.dashboard-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 8px; color: #68565c; font-size: 13px; font-weight: 700; }
.dashboard-nav a span { width: 18px; color: var(--maroon); text-align: center; font-size: 16px; }
.dashboard-nav a:hover, .dashboard-nav a[aria-current="page"] { background: #f3e7e9; color: var(--maroon); text-decoration: none; }
.view-heading { margin: 0 0 18px; }
.view-heading .eyebrow { margin: 0 0 9px; }
.view-heading h2 { margin: 0; }
.dashboard-content { min-width: 0; }
.dashboard-content .panel > .hint:first-child { margin-top: 0; }
label { display: block; margin: 16px 0; color: #4d3e42; font-size: 13px; font-weight: 700; }
input, textarea { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #d9c9cd; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 400; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid #c28294; outline-offset: 1px; }
#cover-file { padding: 9px; }
.cover-preview { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.cover-preview img { width: min(250px, 100%); max-height: 160px; border-radius: 8px; object-fit: cover; }
#editor-toolbar { border: 1px solid #d9c9cd; border-radius: 8px 8px 0 0; background: #fbf8f6; }
#editor.ql-container { min-height: 260px; border: 1px solid #d9c9cd; border-top: 0; border-radius: 0 0 8px 8px; font: inherit; }
#editor .ql-editor { min-height: 260px; line-height: 1.7; overflow-wrap: anywhere; }
#editor .ql-editor.ql-blank::before { color: #897b80; font-style: normal; }
#editor .ql-tooltip::before { content: "Kunjungi tautan:"; }
#editor .ql-tooltip[data-mode="link"]::before { content: "Masukkan tautan:"; }
#editor .ql-tooltip a.ql-action::after { content: "Edit"; }
#editor .ql-tooltip a.ql-remove::before { content: "Hapus"; }
#editor .ql-tooltip.ql-editing a.ql-action::after { content: "Simpan"; }
#upload-status { min-height: 1em; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border: 1px solid var(--maroon); border-radius: 8px; background: var(--maroon); color: #fff; font-size: 13px; font-weight: 700; }
.button:hover { background: var(--dark); }
.button:disabled { cursor: wait; opacity: .6; }
.button.secondary { background: #fff; color: var(--maroon); }
.button.secondary:hover { background: #f7edef; }
.button.danger { border-color: #e5c4ca; background: #fff; color: #a0223f; }
.button.small { padding: 8px 11px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 38px 0 16px; color: var(--muted); font-size: 12px; }
.section-title h2 { margin: 0; color: var(--ink); }
.section-title .eyebrow { margin-bottom: 10px; }
.stack { display: grid; gap: 10px; }
.stack > .panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 20px; }
.stack h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.stack p { margin: 0; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #f3e7e9; color: var(--maroon); font-size: 11px; font-weight: 700; }
.user-form-panel { margin-bottom: 14px; }
.user-form-panel h3 { margin-top: 0; }
.footer { padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .main { padding-top: 45px; }
  .article-grid { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; }
  .dashboard-layout { grid-template-columns: 1fr; gap: 18px; }
  .dashboard-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .dashboard-nav p { width: 100%; margin: 5px 10px; }
  .dashboard-nav a { flex: 1 1 auto; justify-content: center; }
  .stack > .panel { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}
