:root {
    --navy: #0F4C81; --navy-900: #0A2340; --navy-950: #061629; --blue: #1D72F3; --sky: #36C2FF;
    --ink: #0E1B2C; --text: #3E4C5E; --muted: #6B7A8F; --line: #E4EAF2; --gray: #F4F7FB; --white: #fff;
    --ok: #0E9F6E; --err: #D13438; --warn: #B7791F;
    --r: 14px; --shadow: 0 10px 30px -14px rgba(15, 76, 129, .25);
    --head: "Poppins", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.6 var(--body); color: var(--text); background: var(--gray); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
pre { background: rgba(0, 0, 0, .06); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 10px 0 0; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 11px; border: 1px solid transparent; font: 600 .92rem var(--head); cursor: pointer; transition: all .2s; white-space: nowrap; text-decoration: none; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(29, 114, 243, .8); }
.btn--primary:hover { background: #1563D8; }
.btn--light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--light:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { color: var(--err); border-color: var(--err); }
.btn--dashed { width: 100%; padding: 16px; background: #fff; color: var(--blue); border: 2px dashed #C9D6E8; border-radius: var(--r); }
.btn--dashed:hover { border-color: var(--blue); background: #F3F8FF; }
.btn--sm { padding: 8px 14px; font-size: .84rem; border-radius: 9px; }
.btn--block { width: 100%; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; transition: all .2s; }
.icon-btn:hover { color: var(--blue); border-color: var(--blue); }
.icon-btn--danger:hover { color: var(--err); border-color: var(--err); background: #FFF5F5; }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin-bottom: 14px; font-size: .92rem; border: 1px solid; }
.alert i { margin-top: 3px; }
.alert--ok { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert--error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert--warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert--warn a { color: inherit; font-weight: 600; text-decoration: underline; }
.alert--block { display: block; }

/* Login */
.login-page { min-height: 100vh; background: var(--navy-950); }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login__brand { padding: 64px; display: flex; flex-direction: column; justify-content: center; color: rgba(255, 255, 255, .72);
    background: radial-gradient(700px 400px at 20% 10%, rgba(29, 114, 243, .45), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-950)); }
.login__brand img { margin-bottom: 48px; }
.login__brand h1 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 460px; }
.login__brand p { max-width: 440px; font-size: 1.02rem; }
.login__card { align-self: center; justify-self: center; width: min(420px, calc(100% - 40px)); background: #fff; padding: 40px 36px; border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); margin: 40px 0; }
.login__card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.login__card .muted { margin: 0 0 24px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.back-link:hover { color: var(--blue); }

/* Fields */
.field { display: block; margin-bottom: 18px; }
.field > label, .field > span { display: block; font-weight: 600; font-size: .86rem; color: var(--ink); margin-bottom: 7px; }
.field input[type=text], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=date], .field input[type=email], .field select, .field textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #FBFCFE; font: 400 .94rem var(--body); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field .mono-ish { font-size: .92rem; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(29, 114, 243, .12); }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.pw { position: relative; }
.pw input { padding-right: 46px !important; }
.pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw__toggle:hover { color: var(--blue); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); cursor: pointer; }

.grid-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.field--wide { grid-column: 1 / -1; }

.icon-pick { display: flex; gap: 10px; align-items: center; }
.icon-pick__preview { flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font-size: 1.05rem; }

.img-field { display: flex; gap: 16px; align-items: center; padding: 12px; border: 1px dashed #C9D6E8; border-radius: 12px; background: #FBFCFE; }
.img-field__preview { flex-shrink: 0; width: 140px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--gray); display: grid; place-items: center; color: #A9B6C8; font-size: 1.6rem; }
.img-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.img-field__ctrl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.img-field__name { color: var(--muted); font-size: .8rem; word-break: break-all; }
.img-field label.btn { cursor: pointer; }

/* Shell */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy-950); color: rgba(255, 255, 255, .7); padding: 22px 14px; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; }
.sidebar__brand span { font: 600 .7rem var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--sky); background: rgba(54, 194, 255, .12); padding: 3px 8px; border-radius: 6px; }
.sidebar__label { display: block; padding: 18px 12px 6px; font: 600 .68rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .35); }
.sidebar__nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .75); font-size: .9rem; font-weight: 500; transition: background .2s, color .2s; }
.sidebar__nav a i { width: 18px; text-align: center; color: rgba(255, 255, 255, .45); transition: color .2s; }
.sidebar__nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar__nav a.is-active { background: var(--blue); color: #fff; }
.sidebar__nav a.is-active i { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__title { font: 600 1.05rem var(--head); color: var(--ink); }
.topbar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar__actions form { margin: 0; }
.topbar__menu { display: none; }
.content { padding: 28px 32px 120px; max-width: 1080px; width: 100%; }

.hello { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px 30px; border-radius: 18px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: rgba(255, 255, 255, .85); margin-bottom: 22px; }
.hello h1 { color: #fff; }
.hello p { margin: 0; }
.hello .btn--primary { background: #fff; color: var(--navy); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(29, 114, 243, .1); color: var(--blue); margin-bottom: 10px; }
.card strong { font-family: var(--head); color: var(--ink); }
.card small { color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; margin-bottom: 18px; }
.panel--narrow { max-width: 560px; }
.panel h2 i { color: var(--blue); margin-right: 6px; }
.backup-list { list-style: none; margin: 0; padding: 0; }
.backup-list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.backup-list small { margin-left: auto; color: var(--muted); }

.info { display: flex; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #EEF5FF; color: var(--navy); font-size: .9rem; margin: 0 0 18px; }
.info i { margin-top: 4px; }

.list { display: grid; gap: 12px; margin-bottom: 14px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: box-shadow .2s, border-color .2s; }
.item[open] { box-shadow: var(--shadow); border-color: #D3DEEC; }
.item__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; cursor: pointer; list-style: none; user-select: none; }
.item__head::-webkit-details-marker { display: none; }
.item__grip { color: #B5C2D3; }
.item__title { flex: 1; font: 600 .95rem var(--head); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__tools { display: flex; gap: 6px; }
.item__body { padding: 6px 20px 8px; border-top: 1px solid var(--line); padding-top: 20px; }
.item.is-flash { animation: flash 1s; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px rgba(29, 114, 243, .35); } }
.empty { text-align: center; color: var(--muted); padding: 24px; }

.savebar { position: fixed; left: 260px; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 32px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.savebar__note { margin-right: auto; font-size: .86rem; color: var(--warn); opacity: 0; transition: opacity .2s; }
.savebar__note i { font-size: .5rem; vertical-align: middle; margin-right: 6px; }
.is-dirty .savebar__note { opacity: 1; }

@media (max-width: 960px) {
    .login { grid-template-columns: 1fr; }
    .login__brand { padding: 40px 28px 10px; background: none; }
    .login__brand img { margin-bottom: 24px; }
    .login__brand h1 { font-size: 1.6rem; }
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 270px; transform: translateX(-100%); transition: transform .3s; }
    body.side-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); }
    .topbar__menu { display: inline-grid; }
    .topbar { padding: 12px 16px; }
    .topbar__actions .btn span { display: none; }
    .content { padding: 20px 16px 120px; }
    .savebar { left: 0; padding: 12px 16px; }
    .savebar__note { display: none; }
    .grid-fields { grid-template-columns: 1fr; }
    .img-field { flex-direction: column; align-items: flex-start; }
}

/* SEO */
.seo-tools ol { margin: 0 0 16px; padding-left: 20px; }
.seo-tools li { margin-bottom: 8px; font-size: .92rem; }
.seo-tools code { background: var(--gray); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.serp { font-family: Arial, sans-serif; }
.serp__label { display: block; font: 600 .72rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.serp__url { font-size: .85rem; color: #202124; }
.serp__title { font-size: 1.25rem; color: #1a0dab; line-height: 1.3; margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 600px; }
.serp__desc { font-size: .88rem; color: #4d5156; max-width: 600px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.counter-hint { float: right; font-size: .78rem; color: var(--muted); font-weight: 500; }
.counter-hint.is-over { color: var(--err); }
.serp__site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.serp__site img { border-radius: 50%; background: #F1F3F4; padding: 2px; }
.serp__site strong { display: block; font-size: .9rem; color: #202124; font-weight: 400; line-height: 1.2; }
.serp__site .serp__url { display: block; font-size: .78rem; color: #4d5156; }
.serp__len { float: none; display: block; margin-top: 12px; }

/* Pengguna & peran */
.who { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); margin-right: 4px; }
.who:hover { border-color: var(--blue); }
.who__av { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font: 600 .78rem var(--head); }
.who__txt { display: flex; flex-direction: column; line-height: 1.2; }
.who__txt strong { font: 600 .84rem var(--head); }
.role { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 .68rem var(--head); letter-spacing: .03em; background: rgba(29, 114, 243, .1); color: var(--blue); }
.role--superadmin { background: rgba(124, 58, 237, .12); color: #6D28D9; }
.role--off { background: #F1F3F5; color: var(--muted); }
.role--warn { background: #FFFBEB; color: var(--warn); }
.users { display: grid; gap: 10px; }
.user { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.user.is-off { background: #FAFBFC; }
.user.is-off .user__main { opacity: .6; }
.user__main { display: flex; gap: 14px; align-items: center; }
.user__main > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user__main strong { font: 600 .95rem var(--head); color: var(--ink); }
.user__main small { font-size: .82rem; }
.user { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.user__edit { flex-shrink: 0; }
.user__edit > summary { list-style: none; }
.user__edit > summary::-webkit-details-marker { display: none; }
.user__edit[open] { flex-basis: 100%; }
.user__edit[open] > summary { margin-bottom: 14px; }
.user__forms { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.user__form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: end; }
.user__form .check { margin: 0 0 18px; }
.user__form .btn { justify-self: start; margin-bottom: 18px; }
.user__danger { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.user__danger form { margin: 0; }
.cred { padding: 18px 20px; border-radius: 14px; background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; margin-bottom: 16px; }
.cred p { margin: 6px 0 12px; font-size: .9rem; }
.cred__box { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; padding: 14px; border-radius: 10px; background: #fff; }
.cred__box small { display: block; font-size: .72rem; color: var(--muted); }
.cred__box code { font-size: .95rem; color: var(--ink); }
@media (max-width: 960px) {
    .who__txt { display: none; }
    .who { padding: 3px; }
    .user__forms, .user__form { grid-template-columns: 1fr; }
}
