:root {
  /* Warna utama Sangga Bumi Lestari */
  --bar: #054a76;          /* header & hero (sama di mode terang/gelap) */
  --bar-2: #0b5f94;
  --lime: #c0d838;         /* aksen dari logo */
  --teal: #3dc0c2;
  --brand: #054a76;
  --brand-2: #0b5f94;
  --accent: #0b6aa6;
  --brand-soft: #e2edf5;
  --on-brand: #ffffff;
  --bg: #f2f5f8;
  --paper: #ffffff;
  --ink: #12222e;
  --muted: #5a6b78;
  --line: #dbe3ea;
  --danger: #b4382b;
  --danger-soft: #fbe9e6;
  --warn-soft: #fff6d6;
  --shadow: 0 1px 2px rgba(5, 40, 64, .06), 0 6px 18px rgba(5, 40, 64, .07);
  --radius: 14px;
  --k-pdf: #c2412d; --k-doc: #2b5fb4; --k-sheet: #1f8a4c; --k-slide: #d0711b;
  --k-image: #8a4fbf; --k-video: #c2335f; --k-audio: #0f8a8a; --k-archive: #7a6232;
  --k-text: #5a6b78; --k-other: #5a6b78;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bar: #043a5d; --bar-2: #054a76;
    --brand: #7cc0ea; --brand-2: #5aaee0; --accent: #8fd0f5; --brand-soft: #12304a; --on-brand: #04223a;
    --bg: #0d1720; --paper: #14212d; --ink: #e6eef4; --muted: #94a6b4; --line: #24384a;
    --danger: #f08a7c; --danger-soft: #3a1f1b; --warn-soft: #3a3420;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg);
}
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ic { width: 18px; height: 18px; flex: none; }


/* Topbar */
.topbar { background: var(--bar); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 10px rgba(0,0,0,.12); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; color: #fff; }
.logo { display: block; height: 44px; width: auto; flex: none; }
.logo-lg { height: 56px; }
.brand-logo { display: block; border-radius: 8px; }
.brand-logo:focus-visible, .brand-tag:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.brand-tag { font-size: 13px; font-weight: 700; letter-spacing: .02em; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9); white-space: nowrap; text-decoration: none; }
.brand-tag:hover { color: #fff; }
@media (max-width: 560px) { .brand-tag { display: none; } .logo { height: 38px; } }
.topnav { display: flex; align-items: center; gap: 2px; }
.navlink { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; text-decoration: none; color: rgba(255,255,255,.82); }
.navlink:hover { background: rgba(255,255,255,.1); color: #fff; }
.navlink-btn { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.inline-form { margin: 0; display: inline; }
@media (max-width: 760px) { .navlink span { display: none; } .navlink { padding: 9px; } }

/* Pilihan bahasa */
.lang { display: inline-flex; margin-left: 8px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.1); }
.lang a { padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-decoration: none; color: rgba(255,255,255,.75); }
.lang a:hover { color: #fff; }
.lang a.on { background: #fff; color: var(--bar); }

/* Hero */
.hero { background: linear-gradient(150deg, var(--bar) 0%, var(--bar-2) 100%); color: #fff; padding: 40px 0 72px; position: relative; overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); }
.hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--lime), var(--teal)); }
.hero::after { content: ''; position: absolute; right: -90px; top: -110px; width: 340px; height: 340px; border-radius: 50%; border: 48px solid rgba(255,255,255,.05); }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.hero h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; }
.lead { margin: 10px 0 0; max-width: 560px; opacity: .85; }
.search { position: relative; display: block; max-width: 520px; margin-top: 22px; z-index: 1; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 48px; padding: 0 16px 0 42px; border-radius: 12px; border: 0; font: inherit; font-size: 15px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.search input:focus { outline: 3px solid rgba(255,255,255,.45); }

/* Main */
.main { flex: 1; margin-top: -36px; position: relative; padding-bottom: 48px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 600; word-break: break-word; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }
.crumbs .sep { width: 14px; height: 14px; color: var(--line); }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.count { background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }

.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.folder-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.folder-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.folder-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--accent); flex: none; }
.folder-ic .ic { width: 22px; height: 22px; }
.folder-meta { display: flex; flex-direction: column; min-width: 0; }
.folder-meta strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-meta small { color: var(--muted); font-size: 13px; }

.file-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
.file-row:first-child { border-top: 0; }
.file-row:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.file-ic { --k: var(--k-other); position: relative; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); }
.file-ic .ic { width: 22px; height: 22px; }
.file-ic em { position: absolute; bottom: -4px; right: -6px; font-style: normal; font-size: 9px; font-weight: 800; text-transform: uppercase; background: var(--k); color: #fff; border-radius: 5px; padding: 1px 4px; letter-spacing: .03em; }
.kind-pdf { --k: var(--k-pdf); } .kind-doc { --k: var(--k-doc); } .kind-sheet { --k: var(--k-sheet); }
.kind-slide { --k: var(--k-slide); } .kind-image { --k: var(--k-image); } .kind-video { --k: var(--k-video); }
.kind-audio { --k: var(--k-audio); } .kind-archive { --k: var(--k-archive); } .kind-text { --k: var(--k-text); }
.file-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.file-meta strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta small { color: var(--muted); font-size: 13px; }
.file-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 560px) {
  .file-row { flex-wrap: wrap; }
  .file-meta { flex-basis: calc(100% - 58px); }
  .file-actions { width: 100%; padding-left: 58px; }
  .file-actions .btn { flex: 1; justify-content: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
@media (prefers-color-scheme: dark) { .btn { color: var(--on-brand); } .btn-ghost { color: var(--ink); } }
.btn:hover { background: var(--accent); }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--accent); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger); filter: brightness(1.1); }
.btn-block { width: 100%; justify-content: center; height: 46px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Empty */
.empty { text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 20px; margin-top: 24px; }
.empty-ic { width: 44px; height: 44px; color: var(--accent); }
.empty h2 { margin: 10px 0 4px; font-size: 18px; }
.empty p { margin: 0 0 16px; color: var(--muted); }
.no-match { text-align: center; color: var(--muted); padding: 24px; }

.footer { border-top: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer a { text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--accent); }

/* Auth pages */
.auth-body { background: radial-gradient(circle at 20% 0%, var(--brand-soft), transparent 60%), var(--bg); }
.auth { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.auth-band { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 24px 28px; background: linear-gradient(150deg, var(--bar), var(--bar-2)); }
.auth-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--lime), var(--teal)); }
.auth-band .lang { margin-left: 0; }
.auth-content { padding: 26px 28px 28px; }
@media (max-width: 420px) { .auth-band .logo-lg { height: 44px; } .auth-content { padding: 22px 20px; } }
.auth-card h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 0 12px; font: inherit; background: var(--bg); color: var(--ink); }
.field input:focus { border-color: var(--accent); background: var(--paper); }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.alert { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }
.alert .ic { margin-top: 2px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--brand-soft); color: var(--brand); }
.alert-warn { background: var(--warn-soft); }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; justify-content: center; }
.auth-foot .ic { width: 14px; height: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; margin-top: 14px; }

/* Admin */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.admin-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; word-break: break-word; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-main { flex: 1; padding-bottom: 48px; }
.admin-main .crumbs { box-shadow: none; }
.dropzone { margin-top: 16px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); background: var(--paper); transition: border-color .15s, background .15s; font-size: 14px; }
.dropzone.drag { border-color: var(--accent); background: var(--brand-soft); color: var(--brand); }
.dropzone .ic { width: 26px; height: 26px; color: var(--accent); display: block; margin: 0 auto 6px; }
.dropzone button { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.uploads { margin-top: 12px; display: grid; gap: 8px; }
.up-item { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.up-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.up-top strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.up-top span { color: var(--muted); flex: none; font-size: 13px; }
.bar { height: 6px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up-item.err .bar i { background: var(--danger); }
.up-item.err .up-top span { color: var(--danger); }
.up-item.done .up-top span { color: var(--accent); }
.file-row .file-actions .icon-btn { flex: none; }
.folder-row .file-ic { --k: var(--accent); }
.row-link { text-decoration: none; }
.row-link:hover strong { color: var(--accent); }
.row-link strong { display: inline-flex; align-items: center; gap: 6px; }

dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(15, 25, 18, .45); }
.dlg { padding: 22px; }
.dlg h2 { margin: 0 0 14px; font-size: 18px; }
.dlg p { margin: 0 0 14px; color: var(--muted); word-break: break-word; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 100; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); color: #fff; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 460px; }
.auth-links { margin: 14px 0 0; text-align: center; font-size: 14px; }
.auth-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.email-chip { display: flex; align-items: center; gap: 8px; margin: -8px 0 20px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 14px; word-break: break-all; }
.card .sub { color: var(--muted); margin: 0 0 18px; }
