/* -- history 20261012: design system Natuna Admin — token CSS, tema terang default, gelap opt-in | author: sigIT */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --canvas: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --surface-3: #F2F4F7;
  --line: #E7EAEE;
  --line-strong: #D5DAE1;
  --text: #171C26;
  --text-2: #4A5465;
  --text-3: #6B7486;
  --accent: #2F5BEA;
  --accent-hover: #2249CC;
  --accent-soft: #EEF2FE;
  --accent-text: #1D3FB0;
  --ok: #0E8A55;     --ok-soft: #E8F6EF;
  --warn: #A15C07;   --warn-soft: #FEF4E2;
  --danger: #C8322B; --danger-soft: #FDECEB;
  --neutral-soft: #F1F3F6;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --sh-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-md: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --sh-lg: 0 2px 6px rgba(16, 24, 40, .06), 0 24px 56px rgba(16, 24, 40, .14);
  --ring: 0 0 0 3px rgba(47, 91, 234, .28);
  --sidebar-w: 248px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --canvas: #0D1117;
  --surface: #151B24;
  --surface-2: #19202B;
  --surface-3: #1F2733;
  --line: #262F3C;
  --line-strong: #344052;
  --text: #E8ECF2;
  --text-2: #B2BBC9;
  --text-3: #8892A3;
  --accent: #6D8DFF;
  --accent-hover: #87A1FF;
  --accent-soft: rgba(109, 141, 255, .14);
  --accent-text: #A9BBFF;
  --ok: #3CC48A;     --ok-soft: rgba(60, 196, 138, .13);
  --warn: #F0B04A;   --warn-soft: rgba(240, 176, 74, .13);
  --danger: #FF6B62; --danger-soft: rgba(255, 107, 98, .13);
  --neutral-soft: #222A36;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --sh-lg: 0 24px 64px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(109, 141, 255, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font: 400 14px/1.55 var(--font-sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { margin: 0; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 650; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.mono { font-family: var(--font-mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.block { display: block; margin-top: 2px; }
.nowrap { white-space: nowrap; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-auto { margin-left: auto; }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--r-sm); box-shadow: var(--sh-md); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 13px; height: 13px; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; padding: 18px 14px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.sidebar-brand strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.sidebar-brand small { display: block; color: var(--text-3); font-size: 12px; }
.brand-mark { display: inline-flex; width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 4px 12px rgba(47, 91, 234, .3); }
.brand-mark svg { width: 32px; height: 32px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 6px 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.nav-link {
  display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.is-active .ic { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 8px; }
.env-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 500; }
.sidebar-scrim { display: none; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px;
  background: color-mix(in srgb, var(--canvas) 82%, transparent); backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); border: 0;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.only-mobile { display: none; }
.theme-moon { display: none; }
:root[data-theme="dark"] .theme-moon { display: inline; }
:root[data-theme="dark"] .theme-sun { display: none; }

.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 28px 64px; display: flex; flex-direction: column; gap: 20px; }
.content:focus { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head p { margin-top: 4px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; }

/* avatar & menu */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: linear-gradient(135deg, #DCE4FF, #C9D5FF); color: #2A3F99; font-weight: 600; object-fit: cover; }
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, #2A3557, #34416A); color: #C8D3FF; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: var(--r-full); transition: background .15s; }
.avatar-btn:hover { background: var(--surface-3); }
.avatar-name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 6px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-lg); animation: pop .16s var(--ease);
}
.menu-head { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; }
.menu-head small { display: block; color: var(--text-3); margin-bottom: 6px; word-break: break-all; }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font: inherit; cursor: pointer; }
.menu-item:hover { background: var(--surface-3); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 22px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.card-head p { margin-top: 2px; font-size: 13px; }
.card-head-bar { align-items: center; justify-content: space-between; margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; }
.ic-blue { background: #EAF0FF; color: #2F5BEA; }
.ic-violet { background: #F1EBFF; color: #6D3FE0; }
.ic-amber { background: #FFF3DD; color: #B86B00; }
.ic-teal { background: #E2F6F3; color: #0B8073; }
:root[data-theme="dark"] .ic-blue { background: rgba(109, 141, 255, .14); color: #8EA6FF; }
:root[data-theme="dark"] .ic-violet { background: rgba(157, 120, 255, .14); color: #B79CFF; }
:root[data-theme="dark"] .ic-amber { background: rgba(240, 176, 74, .14); color: #F0B04A; }
:root[data-theme="dark"] .ic-teal { background: rgba(45, 200, 180, .14); color: #4FD6C4; }
.card-collapse > summary { list-style: none; cursor: pointer; margin: 0; }
.card-collapse > summary::-webkit-details-marker { display: none; }
.card-collapse:not(.card-flush)[open] > summary { margin-bottom: 18px; }
.card-collapse .chev { margin-left: auto; color: var(--text-3); transition: transform .2s var(--ease); align-self: center; }
.card-collapse[open] .chev { transform: rotate(90deg); }
.card-collapse.card-flush:not([open]) > summary { border-bottom: 0; }
.count-pill { min-width: 28px; padding: 2px 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 12.5px; text-align: center; }

/* metrics */
.metric { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.metric-top { display: flex; align-items: center; gap: 10px; }
.metric-top .card-ic { width: 32px; height: 32px; border-radius: 9px; }
.metric-top .ic { width: 16px; height: 16px; }
.metric-label { color: var(--text-2); font-weight: 500; }
.metric-value { font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric-value small { font-size: 16px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.meter { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .6s var(--ease); }
.meter-ok span { background: linear-gradient(90deg, #3E7BFA, #2F5BEA); }
.meter-warn span { background: linear-gradient(90deg, #F4B740, #E08A00); }
.meter-danger span { background: linear-gradient(90deg, #F57069, #D53A31); }
.updated { display: flex; align-items: center; gap: 8px; margin-top: -8px; }

/* badges, tags, dots */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--neutral-soft); color: var(--text-2); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.tag em { font-style: normal; color: var(--text-3); padding-left: 6px; border-left: 1px solid var(--line-strong); }
.tag-sm { padding: 0 6px; font-size: 11px; font-weight: 500; vertical-align: 1px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-sm); font: 600 14px/1 var(--font-sans); cursor: pointer;
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .05s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; min-height: 44px; }
.btn .spinner { width: 15px; height: 15px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.copy-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; vertical-align: middle; }
.copy-btn:hover { background: var(--surface-3); color: var(--text); }

/* forms */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-weight: 600; font-size: 13px; color: var(--text); }
.input {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: 400 14px var(--font-sans); transition: border-color .15s, box-shadow .15s;
}
.input.mono { font-family: var(--font-mono); }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text-3)); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.has-error .input { border-color: var(--danger); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.hint { color: var(--text-3); font-size: 12.5px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-addon { padding: 0 14px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); color: var(--text-2); font: 500 13px var(--font-sans); cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg-field { display: flex; flex-direction: column; gap: 10px; }
.segmented { display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--surface-3); align-self: flex-start; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; padding: 7px 14px; border-radius: 8px; font-weight: 500; color: var(--text-2); transition: all .15s var(--ease); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.segmented input:focus-visible + span { box-shadow: var(--ring); }
.segmented input:disabled + span { opacity: .45; }
.segmented-sm span { padding: 5px 11px; font-size: 12.5px; }
.ip-self { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ip-chip { padding: 8px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span, .chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-weight: 500; transition: all .15s var(--ease); }
.chip:hover, .chip-radio:hover span { border-color: var(--text-3); color: var(--text); }
.chip-radio input:checked + span, .chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-radio input:focus-visible + span { box-shadow: var(--ring); }
/* -- history 20261012: 3 peran (owner/admin/viewer) | author: sigIT */
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.form-section[disabled] { opacity: .5; }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; }
.option-card > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); transition: all .15s; }
.option-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option-card input:focus-visible + span { box-shadow: var(--ring); }
.grant-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); }
.grant-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.grant-row + .grant-row { border-top: 1px solid var(--line); }
.form-section { display: flex; flex-direction: column; gap: 16px; padding-bottom: 22px; }
.form-section + .form-section { border-top: 1px solid var(--line); padding-top: 22px; }
.form-section legend { float: left; width: 100%; margin-bottom: 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* alerts & toasts */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); font-weight: 500; }
.alert .ic { margin-top: 1px; }
.alert-title { display: block; margin-bottom: 2px; font-weight: 650; }
.alert-danger span { font-weight: 450; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-radius: var(--r-md); background: var(--text); color: var(--surface); box-shadow: var(--sh-lg); font-weight: 500; animation: toast-in .25s var(--ease); }
.toast span { flex: 1; }
.toast-ok .ic { color: #4ADE9B; }
.toast-error .ic { color: #FF8A80; }
.toast-x { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
.toast.is-out { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* key-value */
.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; padding: 10px 0; }
.kv > div + div { border-top: 1px dashed var(--line); }
.kv dt { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-weight: 500; }
.kv dd { margin: 0; min-width: 0; }

/* table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 11px 22px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-muted td { opacity: .6; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions form { display: inline; }
.who { display: flex; align-items: center; gap: 11px; }
.who strong { display: block; font-weight: 600; }
.who small { display: block; color: var(--text-3); }
.countdown { font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-pop summary { display: inline; cursor: pointer; color: var(--accent); font-size: 12px; margin-left: 8px; }
.detail-pop pre { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-3); font: 12px/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-all; max-width: 420px; }

/* ukuran database & tabel — instruksi owner 20261012 | author: sigIT */
.db-block { border-bottom: 1px solid var(--line); }
.db-block:last-of-type { border-bottom: 0; }
.db-sum { display: flex; align-items: center; gap: 18px; padding: 16px 22px; list-style: none; cursor: pointer; flex-wrap: wrap; }
.db-sum::-webkit-details-marker { display: none; }
.db-sum:hover { background: var(--surface-2); }
.db-name { display: flex; align-items: center; gap: 8px; min-width: 170px; font-weight: 600; }
.db-name .ic { color: var(--accent); }
.db-bar { flex: 1 1 120px; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.db-bar span, .share span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #3E7BFA, #6D3FE0); transition: width .6s var(--ease); }
.db-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.db-stats > span { display: flex; flex-direction: column; min-width: 78px; }
.db-stats strong { font-variant-numeric: tabular-nums; font-weight: 650; }
.db-stats small { color: var(--text-3); font-size: 11.5px; }
.db-block .chev { color: var(--text-3); transition: transform .2s var(--ease); }
.db-block[open] .chev { transform: rotate(90deg); }
.db-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 22px 12px; }
.db-empty { padding: 0 22px 16px; }
.table-scroll { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line); }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.table-dense td { padding-top: 9px; padding-bottom: 9px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-share { width: 150px; }
.col-share td, td.col-share { white-space: nowrap; }
.share { display: inline-block; width: 70px; height: 5px; margin-right: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; vertical-align: middle; }

/* backup cron — instruksi owner 20261012 | author: sigIT */
.bk-alert { margin: 16px 22px 0; }
.bk-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border-bottom: 1px solid var(--line); }
.bk-summary > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 22px; background: var(--surface); min-width: 0; }
.bk-summary small { color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.bk-summary strong { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .bk-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bk-summary { grid-template-columns: 1fr 1fr; } .bk-summary > div { padding: 12px 16px; } }

/* rincian subfolder files/ — instruksi owner 20261012 | author: sigIT */
.sub-list { list-style: none; margin: 8px 0 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-3); max-width: 420px; max-height: 260px; overflow-y: auto; }
.sub-list li { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 12.5px; }

/* list */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

/* toolbar, pager */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 0 1 320px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-left: 36px; min-height: 38px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
.pager-btns { display: flex; align-items: center; gap: 10px; }

/* empty */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px; text-align: center; }
.empty p { max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 16px; background: var(--surface-3); color: var(--text-3); }
.empty-icon .ic { width: 24px; height: 24px; }

/* dialog & drawer */
.dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--sh-lg); }
.dialog::backdrop { background: rgba(13, 17, 23, .45); backdrop-filter: blur(2px); }
.dialog[open] { animation: pop .18s var(--ease); }
.dialog-body { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); }
.dialog-body h2 { font-size: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(13, 17, 23, .4); backdrop-filter: blur(2px); animation: fade .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(520px, 100vw); background: var(--surface); box-shadow: var(--sh-lg); animation: slide .25s var(--ease); }
.drawer-form { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head p { margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

/* login */
.login-page { min-height: 100vh; background:
  radial-gradient(1200px 600px at 10% -10%, rgba(47, 91, 234, .10), transparent 60%),
  radial-gradient(900px 500px at 110% 110%, rgba(109, 63, 224, .09), transparent 60%), var(--canvas); }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 36px 32px 30px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-lg); display: flex; flex-direction: column; gap: 14px; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 650; font-size: 15px; }
.login-card h1 { font-size: 22px; }
.g-wrap { position: relative; display: flex; justify-content: center; min-height: 48px; margin: 10px 0 4px; }
.g-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--surface); color: var(--text-2); font-weight: 500; }
.login-points { list-style: none; margin: 10px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; color: var(--text-3); font-size: 13px; }
.login-points li { display: flex; align-items: center; gap: 9px; }
.login-foot { color: var(--text-3); font-size: 12.5px; }
/* logo pengembang = mynatuna.com/login (tinggi 26px, pudar); versi putih saat tema gelap | author: sigIT */
.login-dev { margin-top: 6px; }
.login-dev img { display: block; height: 26px; width: auto; opacity: .8; }
.login-dev .logo-dark, :root[data-theme="dark"] .login-dev .logo-light { display: none; }
:root[data-theme="dark"] .login-dev .logo-dark { display: block; }

/* error */
.centered { min-height: 100vh; }
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card-narrow { width: min(440px, 100%); }
.center-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 32px; }
.center-card .btn { margin-top: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* responsive */
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 920px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; z-index: 70; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--sh-lg); }
  .sidebar.is-open { transform: none; }
  .sidebar-scrim.is-open { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(13, 17, 23, .4); }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 48px; }
  .avatar-name { display: none; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .metric-value { font-size: 24px; }
  h1 { font-size: 21px; }
  .card { padding: 18px; }
  .card-head-bar, .toolbar, .pager, .list-row { padding-left: 16px; padding-right: 16px; }
  .kv > div { grid-template-columns: 1fr; gap: 4px; }
  .option-cards { grid-template-columns: 1fr; }
  .search { flex: 1 1 100%; }
  /* tabel jadi kartu di HP | author: sigIT */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 4px 0; border: 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; flex: none; }
  .table-cards td:first-child { justify-content: flex-start; text-align: left; padding-bottom: 8px; }
  .table-cards td:first-child::before, .table-cards td.cell-actions::before { display: none; }
  .table-cards td.cell-actions { justify-content: flex-end; padding-top: 8px; }
  .login-card { padding: 28px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
