:root {
    color-scheme: light;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    --ink: #142a47;
    --muted: #4c6380;
    --navy: #0b2447;
    --blue: #164dc1;
    --line: #d8e3f1;
    --pale: #f3f7fc;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--pale); line-height: 1.5; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.03em; }
h1 { font-size: clamp(1.9rem, 3.7vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.04rem; }
p { color: var(--muted); }
a { color: var(--blue); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #2860dc; outline-offset: 3px; }
.frame { max-width: 1240px; width: calc(100% - 64px); margin: 0 auto; }
.skip { position: absolute; z-index: 8; background: white; left: 1rem; top: -5rem; padding: .6rem; border-radius: 8px; }
.skip:focus { top: .7rem; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 69px; }
.admin-brand { display: inline-flex; align-items: center; min-width: 0; gap: .65rem; text-decoration: none; color: var(--ink); }
.admin-brand strong { display: block; line-height: 1.05; }
.admin-brand small { color: var(--muted); font-size: .77rem; }
.website-logo { display: block; width: auto; height: auto; max-width: 120px; max-height: 48px; flex-shrink: 0; }
.brand-mark { position: relative; width: 39px; height: 39px; border-radius: 12px; background: #1552ca; flex-shrink: 0; }
.brand-mark::before { content: ""; position: absolute; width: 14px; height: 18px; top: 9px; left: 12px; border: 2px solid #cde9ff; border-radius: 70% 12% 70% 70%; transform: rotate(-45deg); }
.brand-mark::after { content: ""; position: absolute; left: 10px; bottom: 7px; width: 20px; height: 5px; border-bottom: 2px solid #ffc169; border-radius: 50%; transform: rotate(-12deg); }
.topbar-links { display: flex; gap: 1rem; align-items: center; font-size: .9rem; }
.topbar-links a { text-decoration: none; font-weight: 650; }
.topbar-links a[aria-current="page"] { text-decoration: underline; }
.admin-main { padding-block: 2.25rem 4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; color: #1552be; font-weight: 760; font-size: .77rem; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-header h1 { margin-block: .24rem .45rem; }
.page-header p:last-child { max-width: 640px; }
.back { display: inline-block; margin-bottom: 1rem; font-size: .88rem; font-weight: 650; }
.btn { min-height: 41px; padding: .53rem .9rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-weight: 700; font-size: .92rem; cursor: pointer; }
.primary { background: #174fc8; color: #fff; }
.primary:hover { background: #103a9a; }
.ghost { color: #1748ab; background: #f3f7ff; border-color: #cadbf4; }
.ghost:hover { background: #e8f1ff; }
button:disabled { opacity: .6; cursor: default; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px #1733540a; min-width: 0; }
.notice { border: 1px solid; border-radius: 10px; padding: .7rem .9rem; margin-bottom: 1rem; font-size: .91rem; }
.notice ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.success { color: #155338; border-color: #b2dfc5; background: #edf9f1; }
.error { color: #8d2626; border-color: #f0b9b9; background: #fff2f2; }
.list-card { overflow: hidden; }
.table-wrap { overflow: auto; }
.editions-table { width: 100%; min-width: 660px; border-collapse: collapse; text-align: left; }
.editions-table th, .editions-table td { padding: .9rem 1rem; border-bottom: 1px solid #e7edf6; }
.editions-table thead { background: #edf4ff; }
.editions-table tbody tr:last-child > * { border-bottom: 0; }
.editions-table small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; margin-top: .15rem; }
.table-actions a { margin-right: .7rem; font-size: .9rem; font-weight: 700; }
.badge { display: inline-block; padding: .21rem .57rem; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.published { color: #145339; background: #e0f4e8; }
.draft { color: #624d24; background: #fff0d4; }
.empty { padding: 1rem; }
.paging { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; justify-content: center; border-top: 1px solid var(--line); padding: .7rem; }
.login-shell { max-width: 900px; margin: 5vh auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.login-image { padding: 2rem; min-height: 345px; border-radius: 16px; display: flex; flex-direction: column; justify-content: end; background: linear-gradient(120deg, #071b38d9, #071b388c), url("air-berau.webp") center / cover; color: #fff; }
.login-image p { color: #cde6ff; margin: .4rem 0; }
.login-image h1 { margin-top: .4rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.login-form { padding: 1.55rem; display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.login-form h2 { margin-bottom: .4rem; }
.login-form .notice { margin: 0; }
.editor-shell { display: grid; grid-template-columns: minmax(150px, 207px) minmax(0, 1fr); gap: .9rem; align-items: start; }
.tabs { display: flex; flex-direction: column; gap: .35rem; padding: .55rem; border-radius: 12px; background: #eaf2fd; border: 1px solid #d4e2f5; }
.tab { padding: .64rem .68rem; text-align: left; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #304e72; font-size: .9rem; font-weight: 650; cursor: pointer; }
.tab[aria-selected="true"] { color: #1549b8; background: #fff; border-color: #b9cef0; }
.editor-panels { padding: 1.23rem; }
.editor-panel > p, .group-intro { margin: .4rem 0 1rem; font-size: .91rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field > span { color: #203858; font-weight: 670; font-size: .88rem; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #b8cbe3; min-height: 40px; border-radius: 7px; padding: .45rem .58rem; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; min-height: 75px; }
.field.full { grid-column: 1 / -1; }
.field small { color: var(--muted); font-size: .77rem; }
.group { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .9rem; min-width: 0; }
.group-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; }
.items { margin-top: .65rem; display: grid; gap: .5rem; }
.item { padding: .65rem; border: 1px solid #d9e5f2; border-radius: 9px; background: #fbfdff; min-width: 0; }
.item summary { cursor: pointer; padding: .18rem .25rem; font-weight: 710; color: var(--navy); overflow-wrap: anywhere; }
.item[open] summary { margin-bottom: .65rem; }
.item-body { display: grid; gap: .5rem; min-width: 0; }
.item-body .group { margin-top: .5rem; }
.item-tools { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; }
.item-tools button { min-height: 34px; font-size: .8rem; padding: .32rem .58rem; }
.remove { color: #9a2e2e; border-color: #efd2d2; background: #fff7f7; }
.remove:hover { background: #fde5e5; }
.response-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; min-width: 0; }
.response-fields .field > span { font-size: .8rem; }
.save-bar { position: sticky; bottom: .5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 30px #142a4722; margin-top: .85rem; padding: .6rem .8rem; }
.save-bar p { font-size: .86rem; }
.logo-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 1rem; }
.logo-panel { padding: 1.25rem; }
.logo-panel h2 { font-size: 1.2rem; }
.logo-preview { min-height: 135px; margin-top: 1rem; display: grid; place-items: center; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--pale); }
.logo-preview .website-logo { max-width: min(280px, 100%); max-height: 124px; }
.logo-form { display: grid; align-content: start; gap: .9rem; }
.logo-form .notice { margin-bottom: 0; }
.logo-form .primary { justify-self: start; }

@media (max-width: 720px) {
    .frame { width: calc(100% - 30px); }
    .admin-main { padding-block: 1.25rem 2.3rem; }
    .topbar-inner { flex-wrap: wrap; padding-block: .55rem; gap: .6rem; }
    .admin-brand { max-width: 100%; }
    .admin-brand .website-logo { max-width: clamp(88px, 22vw, 112px); max-height: 44px; }
    .topbar-links { flex-wrap: wrap; gap: .6rem; }
    .login-shell, .editor-shell, .logo-grid { grid-template-columns: minmax(0, 1fr); }
    .login-image { min-height: 200px; padding: 1.2rem; }
    .tabs { flex-direction: row; flex-wrap: wrap; }
    .editor-panels { padding: .85rem; }
    .response-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
    .fields { grid-template-columns: 1fr; }
    .topbar-links { gap: .55rem; }
}
