/* Studio Publikasi — gaya dashboard. Tanpa framework, tanpa build. */
:root {
  --bg: #f6f8fc;
  --fg: #19253b;
  --card: #fff;
  --primary: #365deb;
  --primary-dark: #2a4bc4;
  --muted: #637087;
  --soft: #78859a;
  --border: #e2e7ef;
  --line: #e7ecf3;
  --accent: #eaf0ff;
  --danger: #b73543;
  --success: #12805c;
  --warning: #a05a06;
  --sidebar: #101b30;
  --sidebar-fg: #c4cede;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0; }
.icon { flex: none; }

/* ---------- kerangka ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: none; background: var(--sidebar); color: var(--sidebar-fg);
  display: flex; flex-direction: column; justify-content: space-between; padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #263755; }
.brand-light { color: #8fa6d8; font-weight: 400; }
.workspace-label { margin: 20px 0 6px; font-size: 11px; letter-spacing: 0.14em; color: #6d7d99; }
.workspace-label span { color: #fff; }
.sidebar-nav { display: grid; gap: 3px; margin-top: 14px; flex: 1; align-content: start; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--sidebar-fg); font-size: 14px;
}
.sidebar-nav a:hover { background: #1b2a45; color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: #263755; color: #fff; font-weight: 500; }
.sidebar-foot { display: grid; gap: 14px; }
.sidebar-note { border: 1px solid #2a3650; border-radius: 11px; padding: 14px; font-size: 12.5px; color: #9fb0cc; }
.sidebar-note strong { display: block; color: #fff; margin: 8px 0 4px; font-size: 13px; }
.profile { display: flex; align-items: center; gap: 11px; font-size: 13px; color: #fff; }
.profile > span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #365deb; font-weight: 600;
}
.profile small { display: block; color: #8fa6d8; font-size: 11.5px; }
.nav-toggle, .nav-button { display: none; }

.main-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 26px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.topbar-left strong { color: var(--fg); }
.slash { color: #b8c2d4; }
.top-tag { font-size: 11px; letter-spacing: 0.12em; color: #8b97ac; }
.workspace { padding: 26px; display: grid; gap: 22px; align-content: start; max-width: 1320px; width: 100%; }

/* ---------- tombol ---------- */
button, .button, .outline-button, .ghost-button, .danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14px; font-weight: 500; padding: 9px 15px; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer; background: var(--primary); color: #fff;
  text-decoration: none; white-space: nowrap;
}
.button:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.outline-button { background: #fff; color: var(--fg); border-color: var(--border); }
.outline-button:hover { background: #f2f5fb; }
.ghost-button { background: transparent; color: var(--muted); }
.ghost-button:hover { background: #f0f3f8; color: var(--fg); }
.danger-button { background: #fff; color: var(--danger); border-color: #f0d3d6; }
.danger-button:hover { background: #fdf2f3; }
.small { padding: 6px 11px; font-size: 13px; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; }

/* ---------- panel ---------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.panel-heading h2 { font-size: 17px; }
.panel-heading p { font-size: 13px; color: var(--soft); margin-top: 4px; }
.panel-body { padding: 20px 22px; }
.count { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: var(--primary); font-size: 12.5px; font-weight: 600; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-heading h1 { font-size: 26px; margin: 6px 0; }
.page-heading p { color: var(--soft); font-size: 14px; }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; color: #8b97ac; }
.helper { font-size: 13px; color: var(--soft); line-height: 1.65; }
.muted-url { font-size: 12.5px; color: #8b97ac; overflow-wrap: anywhere; margin-top: 3px; }
.inline-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; }

/* ---------- statistik ---------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat > div { display: flex; align-items: center; justify-content: space-between; color: var(--soft); font-size: 13px; }
.stat strong { display: block; font-size: 28px; margin: 10px 0 4px; letter-spacing: -0.02em; }
.stat small { color: #8b97ac; font-size: 12.5px; }
.overview-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.efficiency { background: #101b30; color: #c4cede; border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; }
.efficiency h2 { color: #fff; font-size: 21px; }
.efficiency > div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.efficiency .button { margin-top: 8px; justify-self: start; background: #fff; color: #101b30; }

/* ---------- daftar website ---------- */
.site-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 15px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.site-row:last-child { border-bottom: 0; }
.site-avatar { padding: 11px; border-radius: 10px; background: var(--accent); color: #5074db; display: grid; place-items: center; }
.site-info { flex: 1; min-width: 200px; }
.site-info h3 { font-size: 15.5px; }
.site-info > a { display: inline-flex; align-items: center; gap: 6px; color: #6a7a94; font-size: 13px; margin-top: 6px; overflow-wrap: anywhere; }
.site-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 12.5px; color: #7a879c; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.site-detail { flex-basis: 100%; font-size: 12.5px; color: #7a879c; border-top: 1px dashed var(--line); padding-top: 12px; }

/* ---------- status ---------- */
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f6; color: #55637a; }
.status.connected, .status.publish, .status.aktif { background: #e3f6ee; color: var(--success); }
.status.setup, .status.pending { background: #fdf1e2; color: var(--warning); }
.status.accepted, .status.draft { background: var(--accent); color: var(--primary); }
.status.failed { background: #fdeced; color: var(--danger); }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: #8b97ac; font-weight: 600; padding: 12px 22px; border-bottom: 1px solid var(--line); background: #fafbfe; }
tbody td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody strong { font-weight: 600; }

/* ---------- formulir ---------- */
.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label, .form-stack > label { font-size: 13.5px; font-weight: 500; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"],
input[type="datetime-local"], input[type="file"], select, textarea {
  font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid #d6deeb; border-radius: 9px;
  background: #fff; color: var(--fg); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(54, 93, 235, .35); outline-offset: 1px; border-color: var(--primary); }
textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; gap: 15px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.checkbox-row input { width: auto; }

/* ---------- dialog ---------- */
dialog {
  border: 0; border-radius: 14px; padding: 0; width: min(540px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(16, 27, 48, .22); color: var(--fg);
}
dialog::backdrop { background: rgba(16, 27, 48, .45); }
.dialog-inner { padding: 24px; display: grid; gap: 16px; max-height: 85vh; overflow-y: auto; }
.dialog-inner h2 { font-size: 18px; }
.dialog-inner > p { font-size: 13.5px; color: var(--soft); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

/* ---------- notifikasi ---------- */
.toast {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  border-radius: 11px; padding: 13px 16px; font-size: 14px; border: 1px solid;
}
.toast.ok { background: #e9f8f1; border-color: #b9e6d3; color: #0f6f50; }
.toast.warn { background: #fdf4e6; border-color: #f0dcbb; color: #8a4d05; }
.toast.error { background: #fdedee; border-color: #f2ccd0; color: #97202f; }
.toast-close { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; }
.toast-close:hover { background: none; }
.notice { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 18px 20px; }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { font-size: 13.5px; color: var(--soft); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 11px; font-size: 13.5px; }

/* ---------- kosong ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 9px; padding: 46px 22px; color: var(--soft); }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--primary); }
.empty h3 { font-size: 16px; color: var(--fg); }
.empty p { font-size: 13.5px; max-width: 420px; }

/* ---------- penyimpanan ---------- */
.storage-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.storage-card { padding: 22px; display: grid; gap: 9px; align-content: start; }
.storage-card strong { font-size: 30px; }
.storage-card strong span { font-size: 15px; color: var(--soft); }
.storage-card ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--soft); line-height: 1.85; }
.metric-line { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 6px; font-size: 13.5px; color: var(--soft); }
.disk-row { padding: 16px 22px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.disk-row:last-child { border-bottom: 0; }
.disk-row > div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--soft); }
.disk-row small { color: #96a1b4; font-size: 12px; }
progress { width: 100%; height: 9px; border: 0; border-radius: 999px; background: #eef1f6; }
progress::-webkit-progress-bar { background: #eef1f6; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

/* ---------- pengaturan ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.setting-row:last-of-type { border-bottom: 0; }
.setting-row h3 { font-size: 14.5px; }
.setting-row p { font-size: 13px; color: var(--soft); margin-top: 4px; max-width: 620px; }

/* ---------- pustaka ---------- */
.library-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; flex: 1; min-width: 220px; }
.search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a1b6; }
.search-field input { padding-left: 38px; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; font-size: 13.5px; color: var(--soft); }
.workflow .steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding: 20px 22px; }
.workflow .steps > div { display: flex; gap: 12px; }
.workflow .steps span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--accent); color: var(--primary); font-size: 13px; font-weight: 600; }
.workflow .steps h3 { font-size: 14.5px; }
.workflow .steps p { font-size: 13px; color: var(--soft); margin-top: 3px; }
.workspace-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #96a1b4; padding-top: 6px; }
.pill { font-size: 11.5px; letter-spacing: 0.08em; background: #f0f3f8; color: #77839a; padding: 5px 11px; border-radius: 999px; }

/* ---------- login ---------- */
.login-page { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-story { background: var(--sidebar); color: #c4cede; padding: 48px; display: grid; align-content: space-between; gap: 32px; }
.login-story h1 { color: #fff; font-size: 38px; line-height: 1.15; margin: 12px 0 14px; }
.login-story p { max-width: 420px; font-size: 15px; }
.login-assurance { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; font-size: 13.5px; color: #9fb0cc; }
.login-story small { font-size: 12.5px; color: #6d7d99; }
.login-form-area { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(400px, 100%); display: grid; gap: 15px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px; }
.login-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--primary); }
.login-card h2 { font-size: 20px; }
.login-card > p { font-size: 13.5px; color: var(--soft); }
.login-card small { font-size: 12.5px; color: var(--soft); line-height: 1.7; }

@media (max-width: 980px) {
  .overview-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { padding: 34px; }
  .login-story h1 { font-size: 30px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 20; left: -280px; transition: left .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .nav-toggle:checked ~ .shell .sidebar { left: 0; }
  .nav-button { display: inline-grid; place-items: center; padding: 7px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; color: var(--muted); }
  .workspace, .topbar { padding: 16px; }
  .top-tag { display: none; }
  thead th, tbody td { padding: 11px 14px; }
  .site-row, .panel-heading, .library-tools, .setting-row, .disk-row { padding-left: 16px; padding-right: 16px; }
}

/* ---------- utilitas kecil (menggantikan style inline agar patuh CSP) ---------- */
.retry-form { display: block; margin-top: 7px; }
.filter-note { padding: 12px 22px 0; }
.form-stack.narrow { max-width: 440px; }
.plain-checkbox { width: auto; }
.switch-row input[type="checkbox"] { width: auto; }
pre { background: #101b30; color: #e1eaff; border-radius: 10px; padding: 16px; overflow-x: auto; font: 13.5px/1.7 ui-monospace, Menlo, Consolas, monospace; }
code { font-size: 13.5px; background: #eef2fa; padding: 2px 6px; border-radius: 5px; }
pre code { background: none; padding: 0; color: inherit; }

/* ---------- halaman pemasangan & pemulihan ---------- */
.setup-page { max-width: 760px; margin: 0 auto; padding: 34px 20px 60px; display: grid; gap: 20px; align-content: start; }
.setup-head { display: flex; align-items: center; gap: 16px; }
.setup-head .brand-symbol { width: 52px; height: 52px; border-radius: 14px; background: var(--primary); color: #fff; }
.setup-head h1 { font-size: 26px; margin: 4px 0; }
.setup-foot { text-align: center; }
.check-list { display: grid; gap: 11px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.check-mark { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; font-size: 13px; font-weight: 700; }
.check-row.ok .check-mark { background: #e3f6ee; color: var(--success); }
.check-row.warn .check-mark { background: #fdf1e2; color: var(--warning); }
.check-row.bad .check-mark { background: #fdeced; color: var(--danger); }
.check-row.bad strong { color: var(--danger); }
.setup-page .panel-heading + .panel-heading { border-top: 1px solid var(--line); }
.langkah { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.7; }
.langkah code { white-space: nowrap; }
.content-flag{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;font-size:11px;font-weight:700}.content-flag.ok{background:#dcfce7;color:#166534}.content-flag.missing{background:#fee2e2;color:#991b1b}
