:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0b172a;
  --muted: #657287;
  --line: #e3e9f1;
  --primary: #136bdf;
  --primary-dark: #0d54b4;
  --primary-soft: #eaf3ff;
  --success: #10845b;
  --danger: #d13b4c;
  --shadow: 0 22px 65px rgba(15, 34, 61, 0.09);
  --shadow-soft: 0 9px 28px rgba(15, 34, 61, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(24, 112, 230, 0.09), transparent 29rem),
    radial-gradient(circle at 100% 16%, rgba(69, 202, 211, 0.08), transparent 26rem),
    var(--bg);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #176fe1, #0c4ba9); box-shadow: 0 10px 25px rgba(20, 105, 220, .25); }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { display: block; font-size: 17px; line-height: 1.1; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; background: rgba(255,255,255,.72); color: #425066; font-size: 12px; font-weight: 700; backdrop-filter: blur(10px); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #25aa75; box-shadow: 0 0 0 4px rgba(37,170,117,.12); }

.hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .72fr); gap: 54px; align-items: center; min-height: 390px; padding: 42px 54px; overflow: hidden; border: 1px solid rgba(216,226,239,.85); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(255,255,255,.97), rgba(247,251,255,.94)); box-shadow: var(--shadow); position: relative; }
.hero::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -150px; top: -155px; background: radial-gradient(circle, rgba(33,121,231,.16), transparent 67%); pointer-events: none; }
.eyebrow, .section-kicker, .mini-label { display: inline-block; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero h1 { margin: 15px 0 18px; font-size: clamp(42px, 5vw, 66px); line-height: 1.04; letter-spacing: -.052em; }
.hero h1 span { color: var(--primary); }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.75; }
.feature-row { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 28px; }
.feature-row span { display: inline-flex; align-items: center; gap: 7px; color: #34445b; font-size: 13px; font-weight: 700; }
.feature-row svg { color: var(--success); width: 17px; }

.admin-card { position: relative; z-index: 1; padding: 25px; border: 1px solid #dfe7f1; border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-soft); }
.admin-card-head { display: flex; justify-content: space-between; gap: 16px; }
.admin-card h2 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.025em; }
.admin-card p { margin: 15px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.lock-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); }
.input-label { display: block; margin-bottom: 8px; color: #34445b; font-size: 12px; font-weight: 800; }
.token-field { display: flex; align-items: center; height: 48px; overflow: hidden; border: 1px solid #d9e2ed; border-radius: 13px; background: #fbfdff; transition: border-color .2s, box-shadow .2s; }
.token-field:focus-within { border-color: #80b4f3; box-shadow: 0 0 0 4px rgba(19,107,223,.1); }
.token-field input { min-width: 0; flex: 1; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 11px; color: #66768d; background: transparent; transition: background .2s, color .2s, transform .2s; }
.icon-button:hover { color: var(--primary); background: var(--primary-soft); }
.icon-button:active { transform: scale(.96); }
.icon-button.outlined { border: 1px solid var(--line); background: #fff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 800; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: linear-gradient(135deg, #1473ec, #0d57bb); box-shadow: 0 10px 22px rgba(19,107,223,.22); }
.button-primary:hover { box-shadow: 0 13px 27px rgba(19,107,223,.28); }
.button-secondary { border-color: #dce5ef; color: #20334d; background: #f8fafc; }
.button-secondary:hover { border-color: #bbcee4; background: #fff; }
.button-full { width: 100%; margin-top: 12px; }
.token-state { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 11px; font-weight: 700; }
.token-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a8b2c1; }
.token-state.connected { color: var(--success); }
.token-state.connected::before { background: var(--success); }

.workspace, .files-section { margin-top: 28px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-soft); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-heading h2 { margin: 6px 0 6px; font-size: 25px; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.section-heading .button svg { width: 18px; }
.upload-zone { display: grid; place-items: center; min-height: 260px; padding: 35px; text-align: center; border: 1.5px dashed #bfd0e6; border-radius: var(--radius-lg); outline: none; background: linear-gradient(180deg, #fbfdff, #f7faff); transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.dragging { border-color: var(--primary); background: #f3f8ff; box-shadow: inset 0 0 0 1px rgba(19,107,223,.05), 0 10px 30px rgba(19,107,223,.08); }
.upload-zone.dragging { transform: scale(1.005); }
.upload-illustration { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 14px; border-radius: 24px; color: var(--primary); background: var(--primary-soft); }
.upload-illustration svg { width: 39px; height: 39px; }
.upload-zone h3 { margin: 0 0 8px; font-size: 18px; }
.upload-zone p { margin: 0; color: var(--muted); font-size: 13px; }
.upload-hint { margin-top: 17px; padding: 7px 11px; border-radius: 999px; color: #56708e; background: #edf3fa; font-size: 10px; font-weight: 800; letter-spacing: .02em; }

.upload-queue { display: grid; gap: 10px; margin-top: 16px; }
.queue-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.file-type-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); }
.file-type-icon svg { width: 22px; }
.queue-meta, .file-main { min-width: 0; }
.queue-name, .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e2c41; font-size: 13px; font-weight: 800; }
.queue-sub, .file-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.progress-track { width: 100%; height: 5px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e1e8f0; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1473ec, #3eb8d4); transition: width .18s ease; }
.queue-status { color: var(--muted); font-size: 11px; font-weight: 800; }
.queue-status.success { color: var(--success); }
.queue-status.error { color: var(--danger); }

.file-heading { align-items: center; }
.file-tools { display: flex; align-items: center; gap: 10px; }
.search-field { display: flex; align-items: center; width: 240px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.search-field:focus-within { border-color: #80b4f3; box-shadow: 0 0 0 4px rgba(19,107,223,.08); }
.search-field svg { flex: 0 0 auto; width: 17px; color: #8794a7; }
.search-field input { min-width: 0; width: 100%; height: 100%; padding-left: 8px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.file-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.file-row { display: grid; grid-template-columns: 46px minmax(0,1fr) minmax(130px,.4fr) auto; gap: 14px; align-items: center; min-height: 76px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #fbfdff; }
.file-size { color: #526178; font-size: 12px; font-weight: 700; }
.file-actions { display: flex; align-items: center; gap: 5px; }
.action-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border: 1px solid #dbe5f0; border-radius: 11px; color: #24405f; background: #fff; text-decoration: none; font-size: 11px; font-weight: 800; }
.action-link:hover { color: var(--primary); border-color: #a7c7ee; background: var(--primary-soft); }
.action-link svg { width: 16px; }
.delete-button:hover { color: var(--danger); background: #fff0f2; }
.empty-state { display: grid; place-items: center; min-height: 250px; padding: 35px; text-align: center; background: #fbfdff; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #7c91aa; background: #edf2f7; }
.empty-icon svg { width: 29px; }
.empty-state h3 { margin: 13px 0 6px; font-size: 15px; }
.empty-state p { max-width: 370px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.skeleton { height: 76px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #f7f9fc 25%, #eef3f8 37%, #f7f9fc 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
.skeleton:last-child { border-bottom: 0; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 4px 34px; color: #7b8799; font-size: 11px; font-weight: 600; }
.toast-region { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: grid; gap: 10px; }
.toast { max-width: 360px; padding: 13px 16px; border: 1px solid #dfe7f0; border-radius: 13px; color: #26364d; background: #fff; box-shadow: 0 18px 50px rgba(18,39,68,.18); font-size: 12px; font-weight: 700; animation: toast-in .22s ease; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 38px; }
  .admin-card { max-width: 520px; }
  .file-row { grid-template-columns: 46px minmax(0,1fr) auto; }
  .file-size { display: none; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 72px; }
  .status-pill { display: none; }
  .hero { padding: 30px 22px; border-radius: 22px; }
  .hero h1 { font-size: clamp(38px, 12vw, 50px); }
  .hero-copy > p { font-size: 15px; }
  .feature-row { display: grid; gap: 10px; }
  .workspace, .files-section { padding: 24px 18px; border-radius: 22px; }
  .section-heading, .file-heading { align-items: stretch; flex-direction: column; }
  .section-heading .button { width: 100%; }
  .upload-zone { min-height: 230px; padding: 25px 16px; }
  .file-tools, .search-field { width: 100%; }
  .search-field { flex: 1; }
  .file-row { grid-template-columns: 42px minmax(0,1fr); gap: 11px; padding: 14px; }
  .file-actions { grid-column: 1 / -1; padding-left: 53px; }
  .action-link { flex: 1; justify-content: center; }
  footer { flex-direction: column; gap: 5px; }
  .toast-region { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Password gate dan sesi pengelola */
.session-info { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #dcebe5; border-radius: 14px; background: #f4fbf8; }
.session-info > div { min-width: 0; }
.session-info strong { display: block; color: #176e52; font-size: 12px; }
.session-info small { display: block; margin-top: 3px; color: #688077; font-size: 10px; line-height: 1.45; }
.session-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(16,132,91,.11); }
.button:disabled { cursor: not-allowed; opacity: .66; transform: none; box-shadow: none; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; }
.login-shell { width: min(100%, 460px); }
.login-brand { width: max-content; margin: 0 auto 22px; }
.login-card { padding: 34px; border: 1px solid rgba(216,226,239,.95); border-radius: 26px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.login-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 22px; border-radius: 18px; color: var(--primary); background: var(--primary-soft); }
.login-icon svg { width: 29px; height: 29px; }
.login-card h1 { margin: 8px 0 10px; font-size: 30px; line-height: 1.15; letter-spacing: -.045em; }
.login-card > p { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-password-field { background: #fff; }
.login-submit { min-height: 50px; margin-top: 8px; }
.login-submit svg { width: 18px; }
.login-submit.loading svg { animation: login-arrow 1s ease-in-out infinite alternate; }
.form-error { min-height: 20px; padding-top: 7px; color: var(--danger); font-size: 11px; font-weight: 700; }
.public-download-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 23px; padding: 14px; border: 1px solid #dbe8f7; border-radius: 15px; color: #385575; background: #f4f8fd; }
.public-download-note > svg { flex: 0 0 auto; width: 19px; margin-top: 1px; color: var(--primary); }
.public-download-note strong { display: block; font-size: 11px; }
.public-download-note span { display: block; margin-top: 4px; color: #65778d; font-size: 10px; line-height: 1.55; }
.public-download-note code { padding: 1px 4px; border-radius: 5px; color: #234e7e; background: #e6f0fb; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.login-footer { margin: 18px 0 0; color: #77869a; text-align: center; font-size: 10px; font-weight: 700; }
@keyframes login-arrow { from { transform: translateX(-2px); } to { transform: translateX(2px); } }

@media (max-width: 520px) {
  .login-page { padding: 20px 14px; }
  .login-card { padding: 27px 21px; border-radius: 22px; }
  .login-card h1 { font-size: 26px; }
}
