:root {
  --bk: #0a0a0a;
  --bk2: #121212;
  --bk3: #1b1b1b;
  --line: #2a2a2a;
  --tx: #f4f4f1;
  --mut: #8e8e8a;
  --paper: #f2f1ec;
  --ink: #0b0b0b;
  --gray: #5c5c5c;
  --ok: #9ee6b0;
  --err: #ff8a8a;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bk); color: var(--tx);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font-family: inherit; }
.mono { font-family: var(--mono); }
.tiny { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mut); margin: 0 0 6px;
}
.sub { color: var(--mut); margin: 0 0 18px; }
.empty { color: var(--mut); font-style: italic; padding: 30px 0; text-align: center; }
.msg { font-family: var(--mono); font-size: 13px; min-height: 18px; }

/* ----- Tombol ----- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--tx); color: var(--bk); border: 0; border-radius: 12px;
  padding: 12px 18px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.12); }
.cta:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.cta.big { width: 100%; padding: 16px; font-size: 15px; letter-spacing: .04em; background: var(--ink); color: var(--paper); border-radius: 0; }
.cta.small { padding: 8px 12px; font-size: 12px; }
.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--tx); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s;
}
.ghost-btn:hover { background: var(--bk3); border-color: #555; }
.ghost-btn.small { padding: 8px 12px; font-size: 12px; }
.ghost-btn.wide { width: 100%; }
.danger-btn {
  background: transparent; color: var(--err); border: 1px solid #5a2a2a; border-radius: 12px;
  padding: 10px 14px; font-size: 14px; cursor: pointer;
}
.danger-btn:hover { background: #2a1414; }

/* ===== AUTH ===== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.hero {
  background: var(--bk); color: var(--tx);
  padding: 56px 58px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  position: relative; overflow: hidden;
  border-right: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.08), transparent 55%);
}
.hero-title {
  font-family: var(--serif); font-weight: 900; font-size: clamp(64px, 9vw, 150px);
  line-height: .88; letter-spacing: -.01em; margin: 16px 0 0;
  animation: rise 1s cubic-bezier(.2,.7,.2,1) both;
}
.ascii-hero {
  font-family: var(--mono); font-size: 14px; line-height: 1.2; color: var(--tx);
  margin: 0; animation: fade 1.4s ease both;
}
.hero-lead { font-size: 19px; line-height: 1.5; max-width: 42ch; margin: 0; color: #d6d6d2; }
.hero-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; color: var(--mut); }
.hero-list b { color: var(--tx); margin-right: 10px; }

.form-side {
  background: var(--paper); color: var(--ink);
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: center;
  animation: fade .8s ease both;
}
.form-side h2 {
  font-family: var(--serif); font-weight: 900; font-size: 42px; line-height: 1.05; margin: 8px 0 6px;
}
.form-side .sub { color: var(--gray); }
.tabs { display: inline-flex; border: 2px solid var(--ink); width: max-content; margin-bottom: 22px; }
.tab {
  background: transparent; border: 0; padding: 10px 22px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink);
}
.tab.active { background: var(--ink); color: var(--paper); }
.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .16em; margin-bottom: 6px;
}
.field input {
  width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink);
  border-radius: 0; padding: 12px 2px; font-size: 17px; outline: none;
}
.field input::placeholder { color: #8a8a85; font-style: italic; }
.field input:focus { background: rgba(0,0,0,.04); }
.pw { display: flex; align-items: flex-end; gap: 10px; }
.pw input { flex: 1; }
.pw-btn {
  background: transparent; border: 1px solid var(--ink); color: var(--ink); padding: 6px 10px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; cursor: pointer; margin-bottom: 8px;
}
.pw-meter { height: 6px; border: 1px solid var(--ink); margin: -6px 0 18px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s; }
.pw-meter[data-level="1"] i { width: 33%; }
.pw-meter[data-level="2"] i { width: 66%; }
.pw-meter[data-level="3"] i { width: 100%; }
#form-auth { margin-top: 8px; }
.alert {
  margin-top: 18px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  padding: 12px 14px; font-family: var(--mono); font-size: 13px; box-shadow: 4px 4px 0 var(--ink);
}

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== APLIKASI ===== */
.app { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; background: var(--bk); }
.side {
  background: var(--bk2); border-right: 1px solid var(--line);
  padding: 26px 18px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.brand { font-family: var(--serif); font-weight: 900; font-size: 22px; letter-spacing: .02em; padding: 0 8px; }
.brand span { color: var(--mut); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: var(--mut); text-decoration: none; font-size: 15px; transition: background .2s, color .2s;
}
.nav a i {
  font-style: normal; font-family: var(--mono); font-size: 10px;
  border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px;
}
.nav a:hover { color: var(--tx); background: var(--bk3); }
.nav a.active { background: var(--tx); color: var(--bk); }
.nav a.active i { border-color: var(--bk); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.me { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; min-width: 0; }
.me-text { min-width: 0; display: flex; flex-direction: column; }
.me-text b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--tx); color: var(--bk); display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
}

.main { padding: 30px 40px 70px; min-width: 0; }
.head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.head h2 { font-family: var(--serif); font-weight: 900; font-size: 42px; line-height: 1.05; margin: 4px 0 0; }
.view { animation: fade .5s ease both; }
.section-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mut); margin: 32px 0 14px;
}
.panel { background: var(--bk2); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--bk2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.stat b { display: block; font-family: var(--serif); font-weight: 900; font-size: 36px; line-height: 1.1; margin-top: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
  background: var(--bk2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  cursor: pointer; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: #555; }
.card.pending { opacity: .5; cursor: default; }
.card.pending:hover { transform: none; border-color: var(--line); }
.card .media {
  aspect-ratio: 4 / 3; background: var(--bk3); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.card .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .tag-big { font-family: var(--serif); font-size: 26px; color: #4a4a4a; }
.card .badge {
  position: absolute; top: 10px; left: 10px; background: var(--tx); color: var(--bk);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding: 3px 7px; border-radius: 6px;
}
.card .body { padding: 12px 14px; }
.card h4 {
  margin: 0 0 4px; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .small { font-size: 12px; color: var(--mut); margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  background: transparent; color: var(--mut); border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.chip:hover { color: var(--tx); }
.chip.on { background: var(--tx); color: var(--bk); border-color: var(--tx); }
.search {
  width: 100%; background: var(--bk2); border: 1px solid var(--line); color: var(--tx);
  padding: 14px 16px; border-radius: 14px; font-size: 15px; margin-bottom: 14px; outline: none;
}
.search:focus { border-color: #666; }

.dropzone {
  border: 2px dashed #3a3a3a; border-radius: 22px; padding: 56px 24px; text-align: center;
  cursor: pointer; background: var(--bk2); transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--tx); background: var(--bk3); }
.dropzone h3 { font-family: var(--serif); font-weight: 900; font-size: 32px; margin: 14px 0 8px; }
.dropzone p { color: var(--mut); margin: 0; }
.dz-icon { font-family: var(--mono); font-size: 46px; line-height: 1; }

.queue { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.qitem { background: var(--bk2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.qtop { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.qname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qstatus { font-family: var(--mono); font-size: 12px; color: var(--mut); white-space: nowrap; }
.qbar { height: 6px; background: var(--bk3); border-radius: 6px; overflow: hidden; margin: 10px 0; }
.qbar i { display: block; height: 100%; width: 0; background: var(--tx); transition: width .2s; }
.qitem[data-state="done"] .qstatus { color: var(--ok); }
.qitem[data-state="error"] .qstatus { color: var(--err); }
.qactions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qlink { font-size: 11px; color: var(--mut); word-break: break-all; }

.dl-form { display: flex; gap: 12px; margin-top: 6px; }
.dl-form input {
  flex: 1; background: var(--bk); border: 1px solid var(--line); color: var(--tx);
  padding: 14px 16px; border-radius: 12px; font-size: 15px; outline: none;
}
.dl-form input:focus { border-color: #666; }
.panel .msg { margin-top: 12px; color: var(--err); }

/* ----- Chat ----- */
.chat {
  display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--bk2); overflow: hidden;
}
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.day-sep {
  align-self: center; font-family: var(--mono); font-size: 11px; color: var(--mut);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 10px 0;
  text-transform: uppercase; letter-spacing: .08em;
}
.msg-row { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.ava {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--bk3); border: 1px solid var(--line);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px;
}
.msg-row.me .ava { background: var(--tx); color: var(--bk); border-color: var(--tx); }
.bubble {
  background: var(--bk3); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 16px 16px 16px 4px; min-width: 0;
}
.msg-row.me .bubble {
  background: var(--tx); color: var(--bk); border-color: var(--tx); border-radius: 16px 16px 4px 16px;
}
.meta-line {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  opacity: .6; margin-bottom: 4px;
}
.bubble-text { display: block; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.bubble-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.chat-empty { margin: auto; color: var(--mut); font-style: italic; }
.composer {
  display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line);
  background: var(--bk2); align-items: flex-end;
}
.composer textarea {
  flex: 1; background: var(--bk); border: 1px solid var(--line); color: var(--tx);
  border-radius: 14px; padding: 12px 14px; font-size: 15px; resize: none; height: 50px;
  max-height: 140px; outline: none;
}
.composer textarea:focus { border-color: #666; }
.composer select {
  background: var(--bk); color: var(--tx); border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 10px; max-width: 170px; height: 50px; outline: none;
}
.composer .tiny { align-self: center; min-width: 44px; text-align: center; color: var(--mut); }

/* ----- Modal & pratinjau ----- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px; z-index: 50;
}
.modal-box {
  background: var(--bk2); border: 1px solid var(--line); border-radius: 22px;
  width: min(980px, 100%); max-height: 92vh; overflow: auto; position: relative; padding: 20px;
}
.preview {
  background: #000; border-radius: 16px; min-height: 300px; display: grid; place-items: center; overflow: hidden;
}
.preview img, .preview video { max-width: 100%; max-height: 70vh; display: block; }
.preview audio { width: min(520px, 90%); }
.preview iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.nopreview, .loading { color: var(--mut); padding: 40px; text-align: center; font-style: italic; }
.modal-info { margin-top: 16px; }
.modal-info h3 { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 4px 0 0; word-break: break-word; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.x {
  position: absolute; top: 14px; right: 14px; background: var(--bk3); color: var(--tx);
  border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 18px;
}

/* ----- Halaman unduh publik ----- */
.share { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bk); }
.share-card {
  width: min(780px, 100%); background: var(--bk2); border: 1px solid var(--line);
  border-radius: 24px; padding: 28px;
}
.share-title { font-family: var(--serif); font-weight: 900; font-size: 34px; margin: 6px 0 18px; }
.share-card .preview { margin-bottom: 18px; }
.share-card h2 { font-family: var(--serif); font-weight: 900; font-size: 28px; margin: 18px 0 4px; word-break: break-word; }
.share-card .tiny { color: var(--mut); margin-bottom: 10px; }

/* ----- Toast ----- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 24px); opacity: 0;
  background: var(--tx); color: var(--bk); padding: 12px 18px; border-radius: 12px;
  font-size: 14px; transition: .3s; z-index: 60; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-type="err"] { background: var(--err); }
.toast[data-type="ok"] { background: var(--ok); }

/* ----- Responsif ----- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 24px 22px 60px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .hero { padding: 34px 26px; gap: 22px; }
  .hero-list { display: none; }
  .form-side { padding: 34px 26px 50px; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; gap: 14px; padding: 16px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .nav a { white-space: nowrap; padding: 9px 12px; }
  .side-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; padding-top: 12px; }
  .side-foot .me { margin-bottom: 0; }
  .side-foot .ghost-btn.wide { width: auto; }
  .head h2 { font-size: 30px; }
  .chat { height: calc(100vh - 300px); }
  .msg-row { max-width: 92%; }
}
@media (max-width: 560px) {
  .form-side h2 { font-size: 34px; }
  .hero-title { font-size: 60px; }
  .stats { gap: 10px; }
  .stat b { font-size: 28px; }
  .dl-form { flex-direction: column; }
  .composer select { max-width: 110px; }
  .composer .tiny { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== POLISH HP (di bawah 640px) ===== */
@media (max-width: 640px) {
  html, body { font-size: 15px; }
  input, textarea, select { font-size: 16px !important; } /* cegah zoom otomatis di iPhone */

  /* Auth */
  .auth { min-height: auto; }
  .hero { padding: 28px 20px 24px; gap: 16px; }
  .hero-title { font-size: 56px; line-height: .9; }
  .hero-lead { font-size: 16px; }
  .ascii-hero { display: none; }
  .form-side { padding: 28px 20px 40px; }
  .form-side h2 { font-size: 32px; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 12px 8px; }
  .field input { font-size: 16px; }

  /* Navigasi */
  .side { padding: 12px 14px; gap: 10px; }
  .brand { font-size: 18px; }
  .nav a { padding: 10px 12px; font-size: 14px; }
  .side-foot { padding-top: 10px; }
  .side-foot .me { margin-bottom: 0; }
  .side-foot .avatar { width: 34px; height: 34px; font-size: 12px; }

  /* Konten */
  .main { padding: 18px 14px 50px; }
  .head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .head h2 { font-size: 28px; }
  .head .cta { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 24px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card h4 { font-size: 13px; }
  .card .body { padding: 10px 12px; }
  .search { padding: 12px 14px; }
  .chips { gap: 6px; }
  .chip { padding: 6px 11px; font-size: 12px; }

  /* Unggah & download */
  .dropzone { padding: 36px 16px; }
  .dropzone h3 { font-size: 24px; }
  .panel { padding: 18px; }
  .dl-form { flex-direction: column; }
  .dl-form .cta { width: 100%; }
  .qactions .qlink { display: none; }

  /* Chat */
  .chat { height: calc(100vh - 300px); min-height: 360px; border-radius: 16px; }
  .chat-log { padding: 14px; }
  .msg-row { max-width: 92%; }
  .composer { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .composer select { max-width: none; width: 100%; height: 44px; }
  .composer textarea { height: 44px; }
  .composer .cta { width: 100%; }
  .composer .tiny { display: none; }

  /* Modal & halaman unduh */
  .modal { padding: 10px; }
  .modal-box { padding: 14px; border-radius: 16px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .cta, .modal-actions .ghost-btn, .modal-actions .danger-btn { width: 100%; text-align: center; }
  .share { padding: 14px; }
  .share-card { padding: 18px; border-radius: 18px; }
  .share-title { font-size: 26px; }
  .share-card h2 { font-size: 24px; }

  /* Target sentuh lebih besar */
  button, .cta, .ghost-btn, .danger-btn { min-height: 44px; }
}

/* ===== FIX LEBAR HP: cegah konten melebar keluar layar ===== */
html, body { overflow-x: hidden; }
.app, .side, .main, .view, .panel, .chat, .stat, .card { min-width: 0; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { width: 100%; max-width: 100%; }
  .nav { min-width: 0; max-width: 100%; }
  .main { max-width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .head { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 22px; overflow-wrap: anywhere; }
  .stat span { font-size: 10px; letter-spacing: .08em; }
  .head .cta { max-width: 100%; }
  .chips { max-width: 100%; }
  .composer { max-width: 100%; }
  .composer textarea { min-width: 0; width: 100%; }
}

/* ===== RIWAYAT UNDUHAN ===== */
.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dlcount {
  display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--mut);
  margin-bottom: 4px;
}
.history { margin: 14px 0 0; padding: 12px 14px; background: var(--bk3); border: 1px solid var(--line); border-radius: 14px; }
.hist-total { font-weight: 600; margin: 0 0 8px; }
.hist-row { font-family: var(--mono); font-size: 12px; color: var(--mut); padding: 6px 0; border-top: 1px dashed var(--line); }
.list-box {
  background: var(--bk2); border: 1px solid var(--line); border-radius: 16px; padding: 6px 16px;
}
.log-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: 0; }
.log-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.log-count { font-family: var(--mono); color: var(--mut); }
.log-meta { font-family: var(--mono); font-size: 12px; color: var(--mut); }


/* ===== LOADING & TOMBOL UNDUH MENONJOL ===== */
.loader-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 48px 24px; min-height: 260px; width: 100%;
}
.spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 4px solid #2a2a2a; border-top-color: var(--tx);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mut); margin: 0;
}
.loader-bar { width: min(320px, 80%); height: 6px; background: var(--bk3); border-radius: 6px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--tx); transition: width .2s; }

.share-card .preview { min-height: 260px; }
.share-card .modal-actions { display: block; margin-top: 20px; }
.share-dl-btn {
  display: flex; width: 100%; justify-content: center; align-items: center; gap: 12px;
  min-height: 62px; font-size: 18px; font-weight: 700; letter-spacing: .02em;
  border-radius: 16px; background: var(--tx); color: var(--bk);
  animation: pulse 2s infinite;
}
.share-dl-btn[hidden] { display: none !important; }
.share-dl-btn:hover { transform: translateY(-2px); }
.dl-ic { font-size: 22px; line-height: 1; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.35); }
  70%  { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.share-home {
  display: block; text-align: center; margin-top: 16px;
  color: var(--mut); font-size: 13px; text-decoration: none;
}
.share-home:hover { color: var(--tx); }
@media (prefers-reduced-motion: reduce) {
  .spinner, .share-dl-btn { animation: none !important; }
}

/* ===== DESKRIPSI BERKAS ===== */
.field-desc { display: block; margin-bottom: 14px; }
.field-desc span {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mut); margin-bottom: 8px;
}
.field-desc textarea, .desc-input {
  width: 100%; min-height: 70px; resize: vertical;
  background: var(--bk); color: var(--tx); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 15px; outline: none;
}
.field-desc textarea:focus, .desc-input:focus { border-color: #666; }
.desc-input { margin-bottom: 10px; }
.card-desc {
  font-size: 12px; color: var(--mut); margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mdesc-box { margin-top: 14px; }
.mdesc { margin: 0; color: #d6d6d2; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.share-desc {
  color: #d6d6d2; white-space: pre-wrap; word-break: break-word;
  line-height: 1.6; margin: 0 0 14px; font-size: 15px;
}
.share-desc:empty { display: none; }

/* ===== MENU INFO ===== */
.info-hero { margin-bottom: 8px; }
.info-title { font-family: var(--serif); font-weight: 900; font-size: 44px; line-height: 1; margin: 6px 0 10px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.info-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; text-decoration: none; color: var(--tx);
  background: var(--bk2); border: 1px solid var(--line); border-radius: 16px; transition: transform .2s, border-color .2s;
}
.info-card:hover { transform: translateY(-2px); border-color: #666; }
.info-card b { font-size: 16px; }
.info-card small { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.vendor {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.vendor:last-of-type { border-bottom: 0; }
.vendor b { font-size: 15px; }
.vendor span { font-size: 13px; color: var(--mut); max-width: 560px; }
.info-note { padding-top: 14px; margin: 0; color: var(--mut); }
@media (max-width: 640px) {
  .info-title { font-size: 34px; }
}

/* ===== REKOMENDASI VPS ===== */
.promo {
  display: block; text-decoration: none; color: var(--tx);
  padding: 22px; transition: transform .2s, border-color .2s;
}
.promo:hover { transform: translateY(-2px); border-color: #666; }
.promo-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.promo-top b { font-size: 18px; }
.promo-badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--tx); color: var(--bk); padding: 4px 10px; border-radius: 999px;
}
.promo-desc { margin: 0 0 12px; color: #d6d6d2; }
.promo-list { margin: 0 0 14px; padding-left: 18px; color: var(--mut); font-size: 14px; }
.promo-list li { margin-bottom: 4px; }
.promo-price { color: var(--mut); font-size: 12px; margin: 0; }

/* ===== VERIFIKASI & PAKET ===== */
.verify {
  position: fixed; inset: 0; z-index: 40; background: var(--bk);
  display: grid; place-items: center; padding: 20px;
}
.verify[hidden] { display: none !important; }
.verify-card { width: min(480px, 100%); }
.big-cta { width: 100%; min-height: 56px; font-size: 16px; }
.qbar-big { height: 12px; background: var(--bk3); border-radius: 12px; overflow: hidden; margin-top: 14px; border: 1px solid var(--line); }
.qbar-big i { display: block; height: 100%; width: 0; background: var(--tx); transition: width .3s; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan {
  background: var(--bk2); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.plan.on { border-color: var(--tx); }
.plan-name-small { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin: 0; }
.plan-price { font-family: var(--serif); font-weight: 900; font-size: 28px; margin: 4px 0 0; }
.plan-note { font-size: 13px; color: var(--mut); margin: 0 0 12px; }
.plan .cta, .plan .ghost-btn { margin-top: auto; text-align: center; text-decoration: none; }

/* ===== PROFIL, BADGE & EFEK API ===== */
.vb { display: inline-flex; width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; flex-shrink: 0; }
.vb svg { width: 100%; height: 100%; fill: currentColor; }
.vb-blue { color: #2f9bff; filter: drop-shadow(0 0 4px rgba(47,155,255,.55)); }
.vb-red { color: #ff3a1d; animation: vbfire 1.6s ease-in-out infinite; }
@keyframes vbfire {
  0%, 100% { filter: drop-shadow(0 0 3px #ff5a00) drop-shadow(0 0 7px rgba(255,60,0,.7)); }
  50% { filter: drop-shadow(0 0 5px #ffb300) drop-shadow(0 0 13px rgba(255,90,0,.95)); }
}
.ava, .avatar { position: relative; overflow: visible; cursor: default; }
.ava { cursor: pointer; }
.ava img, .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ava-big { width: 84px; height: 84px; font-size: 26px; }
.ava.blue, .avatar.blue { box-shadow: 0 0 0 2px #2f9bff, 0 0 10px rgba(47,155,255,.45); }
.ava.fire, .avatar.fire { box-shadow: 0 0 0 2px #ff3a1d, 0 0 14px 2px rgba(255,80,0,.7); animation: ringfire 1.2s ease-in-out infinite alternate; }
@keyframes ringfire {
  0% { box-shadow: 0 0 0 2px #ff3a1d, 0 0 10px 1px rgba(255,70,0,.6), 0 -4px 14px rgba(255,160,0,.4); }
  100% { box-shadow: 0 0 0 2px #ff7a00, 0 0 20px 4px rgba(255,100,0,.9), 0 -8px 24px rgba(255,200,0,.6); }
}
.ember {
  position: absolute; left: var(--x, 50%); bottom: 60%; width: 3px; height: 3px; border-radius: 50%;
  background: #ffc15a; box-shadow: 0 0 6px 2px rgba(255,120,0,.9); opacity: 0; pointer-events: none; z-index: 3;
  animation: ember var(--d, 2s) ease-out var(--w, 0s) infinite;
}
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(var(--s, 1)); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), calc(var(--rise, 44px) * -1)) scale(0); }
}
.uname { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.uname:hover { text-decoration: underline; text-underline-offset: 3px; }
.uname.fire-text, .pc-name.fire-text {
  background: linear-gradient(180deg, #fff2b0 0%, #ffb300 35%, #ff3a1d 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  font-weight: 700; animation: flick 2.2s ease-in-out infinite;
}
@keyframes flick {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,80,0,.8)); }
  45% { filter: drop-shadow(0 0 9px rgba(255,170,0,.95)); }
  70% { filter: drop-shadow(0 0 3px rgba(255,50,0,.7)); }
}
.meta-line .vb { width: 13px; height: 13px; }

/* Kartu profil */
.pcard-box { max-width: 380px; text-align: center; position: relative; overflow: hidden; padding-bottom: 28px; }
.pcard-box .ava-big { margin: 10px auto 12px; cursor: default; }
.pc-name { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 4px 0 2px; word-break: break-word; }
.pc-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin: 0 0 14px; min-height: 14px; }
.pc-bio { color: var(--tx); opacity: .85; white-space: pre-wrap; word-break: break-word; margin: 0; }
.pcard-box.fire { border-color: #ff4a1a; box-shadow: 0 0 40px rgba(255,70,0,.45), inset 0 -70px 90px -40px rgba(255,70,0,.5); animation: cardfire 2.4s ease-in-out infinite alternate; }
@keyframes cardfire {
  0% { box-shadow: 0 0 28px rgba(255,60,0,.4), inset 0 -60px 80px -40px rgba(255,60,0,.4); }
  100% { box-shadow: 0 0 56px rgba(255,120,0,.65), inset 0 -90px 100px -40px rgba(255,110,0,.6); }
}
.pcard-box.fire::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -34px; height: 150px; pointer-events: none; filter: blur(7px);
  background:
    radial-gradient(60% 100% at 18% 100%, rgba(255,215,70,.6), transparent 70%),
    radial-gradient(50% 100% at 52% 100%, rgba(255,90,0,.65), transparent 70%),
    radial-gradient(60% 100% at 86% 100%, rgba(255,170,0,.55), transparent 70%);
  animation: flames 1.3s ease-in-out infinite alternate;
}
@keyframes flames { 0% { transform: translateY(10px) scaleY(.85); } 100% { transform: translateY(-8px) scaleY(1.25); } }
.pcard-box > .ember { bottom: 12px; }

/* Form profil */
.pf-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.pf-head .ava { cursor: default; flex-shrink: 0; }
.pf-form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.pf-form .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mut); margin-top: 6px; }
.pf-form input, .pf-form textarea {
  background: var(--bk); border: 1px solid var(--line); color: var(--tx); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 15px; resize: vertical;
}
.pf-form input:focus, .pf-form textarea:focus { outline: none; border-color: #666; }
.pf-form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.filebtn { display: inline-flex; align-items: center; cursor: pointer; }

/* Paket */
.plan-expiry { font-family: var(--mono); font-size: 12px; color: var(--mut); margin: 12px 0 0; }
.plan-expiry.warn { color: #ff8a5c; }
.plan-name-small .vb { margin-left: 6px; }
.plan-perks { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mut); }
.plan-perks li::before { content: "• "; }
.plan.b-blue { border-color: rgba(47,155,255,.45); }
.plan.b-red { border-color: rgba(255,80,30,.6); box-shadow: 0 0 24px rgba(255,70,0,.25); animation: cardfire 2.6s ease-in-out infinite alternate; }
.plan.b-red .plan-price { background: linear-gradient(180deg, #fff2b0, #ff7a00 60%, #ff3a1d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan button.cta, .plan button.ghost-btn { width: 100%; margin-top: auto; }

/* Pembayaran */
.pay-box { max-width: 380px; text-align: center; }
.pay-qr { width: 260px; max-width: 100%; background: #fff; padding: 10px; border-radius: 14px; margin: 10px auto 6px; display: block; }
.pay-lbl { color: var(--mut); margin-top: 8px; }
.pay-amt { font-family: var(--serif); font-weight: 900; font-size: 34px; margin: 2px 0 10px; }
.pay-status { font-family: var(--mono); font-size: 12px; color: var(--mut); animation: fade 1.4s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  .ember { display: none; }
  .vb-red, .ava.fire, .avatar.fire, .uname.fire-text, .pc-name.fire-text, .pcard-box.fire, .pcard-box.fire::after, .plan.b-red { animation: none !important; }
}

/* ===== LUPA PASSWORD ===== */
.forgot-wrap { margin: 14px 0 0; text-align: center; }
.link-btn {
  background: none; border: 0; padding: 8px 0; cursor: pointer; color: inherit;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-decoration: underline; text-underline-offset: 3px;
}
