:root{
  --bg:#0b0b10;
  --muted:#b9b9c6;
  --text:#f5f5fb;
  --accent:#c60000;
  --accent2:#ff3b3b;
  --border:rgba(255,255,255,.10);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 700px at 20% 0%, rgba(198,0,0,.35), transparent 55%),
    radial-gradient(900px 700px at 85% 15%, rgba(255,59,59,.18), transparent 60%),
    radial-gradient(1100px 900px at 60% 110%, rgba(255,255,255,.06), transparent 60%),
    var(--bg);
  overflow:hidden;
}

.app{
  height:100svh;
  display:flex;
  flex-direction:column;
}

.toolbar{
  position:sticky;top:0;z-index:10;
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background:rgba(10,10,16,.78);
  border-bottom:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  flex-wrap:wrap; /* mobile: boleh turun baris */
}
.toolbar-left,
.toolbar-center,
.toolbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.toolbar-center{
  flex:1 1 auto;
  justify-content:flex-start;
}

.pill.track{
  max-width: min(520px, 42vw);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (min-width: 980px){
  .toolbar{flex-wrap:nowrap;}
  .toolbar-center{justify-content:center;}
  .pill.track{max-width: 520px;}
}

@media (max-width: 520px){
  .toolbar{gap:8px; padding:10px 10px;}
  .toolbar-left, .toolbar-center, .toolbar-right{gap:8px;}
  .btn{padding:10px 11px;}
  .pill.track{max-width: 100%; flex: 1 1 100%;}
}






.btn{
  appearance:none;
  border:1px solid var(--border);
  background:rgba(18,18,26,.65);
  color:var(--text);
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: rgba(255,255,255,.18);
}
.btn.icon{
  width:36px;height:36px;padding:0;justify-content:center;
}

.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:13px;
  white-space:nowrap;
}

.track{
  max-width: min(520px, 46vw);
  overflow:hidden;
  text-overflow: ellipsis;
}
.track b, .track span{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  text-overflow: ellipsis;
  vertical-align:bottom;
}

.viewerWrap{
  flex:1 1 auto;
  min-height:0;
  display:flex;
}
.viewer{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:18px;
  display:flex;
  justify-content:center;
  align-items:center;
  touch-action: pan-y;
}
.viewer.isZoomed{
  touch-action: pan-x pan-y;
  align-items: flex-start;
  justify-content: flex-start;
}

.loading{
  color:var(--muted);
  font-size:14px;
  border:1px dashed rgba(255,255,255,.18);
  padding:12px 14px;
  border-radius:14px;
  background:rgba(0,0,0,.25);
}

.pdfPage{
  background:#fff;
  border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.35);
  max-width: none;
  max-height: none;
}

.toast{
  position:fixed;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  padding:10px 12px;
  border-radius:14px;
  background:rgba(10,10,16,.82);
  border:1px solid rgba(255,255,255,.14);
  color:var(--muted);
  backdrop-filter: blur(10px);
  box-shadow:0 16px 50px rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition: opacity .25s ease, transform .25s ease;
  z-index:20;
  max-width:min(720px, calc(100vw - 28px));
  text-align:center;
  font-size:13px;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(-6px); }

/* Desktop: keep each row single-line */

