*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}

:root{
  --bg:#0f0f0f;
  --surface:#1a1a1a;
  --surface2:#212121;
  --surface3:#272727;
  --border:#2d2d2d;
  --border2:#3d3d3d;
  --text:#e8e8e8;
  --text2:#aaaaaa;
  --text3:#717171;
  --accent:#ff0000;
  --accent2:#cc0000;
  --blue:#3ea6ff;
  --green:#4caf50;
  --amber:#ffd600;
  --white:#fff;
  --radius:8px;
  --font:'Roboto',sans-serif;
  --mono:'Roboto Mono',monospace;
}

body{font-family:var(--font);background:var(--bg);color:var(--text);display:flex;flex-direction:column}

/* ── TOPBAR ── */
.topbar{
  height:56px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;
  background:var(--bg);
  border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:100;
  flex-shrink:0;
}

.topbar-left{display:flex;align-items:center;gap:12px}

.logo{display:flex;align-items:center;gap:6px;text-decoration:none}
.logo-icon{
  background:var(--accent);
  border-radius:6px;
  width:32px;height:22px;
  display:flex;align-items:center;justify-content:center;
}
.logo-icon svg{width:14px;height:14px;fill:white}
.logo-name{font-size:18px;font-weight:700;color:var(--white);letter-spacing:-.5px}
.logo-name span{font-weight:300;color:var(--text2)}

.search-bar{
  display:flex;
  flex:1;max-width:480px;margin:0 24px;
}
.search-input{
  flex:1;
  background:var(--surface2);
  border:1px solid var(--border2);
  border-right:none;
  border-radius:var(--radius) 0 0 var(--radius);
  padding:8px 14px;
  color:var(--text);font-size:14px;
  outline:none;
  font-family:var(--font);
}
.search-input:focus{border-color:#65a0f0}
.search-input::placeholder{color:var(--text3)}
.search-btn{
  background:var(--surface3);
  border:1px solid var(--border2);
  border-left:none;
  border-radius:0 var(--radius) var(--radius) 0;
  padding:0 16px;
  cursor:pointer;color:var(--text2);
  display:flex;align-items:center;
  transition:background .15s;
}
.search-btn:hover{background:var(--border)}
.search-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.topbar-right{display:flex;align-items:center;gap:10px}

.upload-trigger{
  display:flex;align-items:center;gap:7px;
  background:var(--surface2);
  border:1px solid var(--border2);
  border-radius:18px;
  padding:7px 14px;
  font-size:13px;font-weight:500;
  color:var(--text);cursor:pointer;
  transition:all .15s;
  white-space:nowrap;
}
.upload-trigger svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.upload-trigger:hover{background:var(--surface3);border-color:var(--text3)}

.icon-btn{
  background:transparent;border:none;cursor:pointer;
  width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text2);transition:background .15s;
}
.icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-btn:hover{background:var(--surface3)}

.live-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 6px var(--green);animation:pulse 2s ease infinite;flex-shrink:0}

/* ── TOPBAR PROGRESS AREA ── */
.topbar-progress-area{
  background:var(--bg);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  max-height:0;
  transition:max-height .35s ease;
  flex-shrink:0;
  position:sticky;top:56px;z-index:99;
}
.topbar-progress-area.has-jobs{max-height:200px}

.job-list{
  display:flex;flex-direction:column;gap:4px;
  padding:6px 16px 8px;
}

.job-row{
  display:flex;align-items:center;gap:10px;
  padding:5px 10px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:6px;
  animation:slideDown .2s ease both;
}

.job-icon{
  width:18px;height:18px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.job-icon svg{width:13px;height:13px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.job-icon.processing svg{stroke:var(--blue);animation:spin .9s linear infinite}
.job-icon.ready svg{stroke:var(--green)}
.job-icon.error svg{stroke:#ff5555}

.job-name{
  font-size:11px;color:var(--text2);
  font-family:var(--mono);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:160px;flex-shrink:0;
}

.job-track{
  flex:1;height:3px;
  background:var(--surface3);
  border-radius:2px;overflow:hidden;
  min-width:60px;
}
.job-fill{height:100%;border-radius:2px;transition:width .5s ease}
.job-fill.processing{background:linear-gradient(90deg,var(--accent2),var(--blue))}
.job-fill.uploading{background:linear-gradient(90deg,var(--accent2),var(--accent));animation:shimmer-bar 1.5s linear infinite;background-size:200% 100%}
.job-fill.ready{background:var(--green)}
.job-fill.error{background:#ff5555}

.job-stage{
  font-size:10px;color:var(--text3);
  font-family:var(--mono);
  white-space:nowrap;flex-shrink:0;
  min-width:100px;text-align:right;
}

.job-pct{
  font-size:11px;font-family:var(--mono);font-weight:500;
  flex-shrink:0;min-width:34px;text-align:right;
}
.job-pct.processing{color:var(--blue)}
.job-pct.uploading{color:var(--accent)}
.job-pct.ready{color:var(--green)}
.job-pct.error{color:#ff5555}

.job-dismiss{
  background:none;border:none;cursor:pointer;
  color:var(--text3);font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s;flex-shrink:0;
}
.job-dismiss:hover{color:#ff5555}

@keyframes shimmer-bar{0%{background-position:200% 0}100%{background-position:-200% 0}}
@keyframes slideDown{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* ── LAYOUT ── */
.layout{
  display:flex;
  flex:1;
  overflow:hidden;
}

/* ── MAIN PLAYER AREA ── */
.main{
  flex:1;
  overflow-y:auto;
  padding:20px 16px 20px 20px;
  min-width:0;
}

.main::-webkit-scrollbar{width:4px}
.main::-webkit-scrollbar-track{background:transparent}
.main::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

/* ── VIDEO PLAYER ── */
.player-wrap{
  background:#000;
  border-radius:10px;
  overflow:hidden;
  aspect-ratio:16/9;
  position:relative;
  margin-bottom:16px;
}

.player-placeholder{
  width:100%;height:100%;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:16px;
  color:var(--text3);
}

.player-placeholder-icon{
  width:72px;height:72px;
  border:2px solid var(--border2);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.player-placeholder-icon svg{width:32px;height:32px;stroke:var(--text3);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.player-placeholder h3{font-size:15px;font-weight:400;color:var(--text2)}
.player-placeholder p{font-size:12px;color:var(--text3);font-family:var(--mono)}

#mainPlayer{
  width:100%;height:100%;
  background:#000;
  display:none;
}

#mainPlayer.active{display:block}

/* ── PIP BUTTON ── */
.pip-btn{
  position:absolute;
  bottom:52px;
  right:10px;
  z-index:10;
  background:rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.12);
  border-radius:5px;
  padding:5px 7px;
  cursor:pointer;
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  opacity:0;
  transition:opacity .2s ease, background .15s ease;
  /* hidden attribute সরালে JS এর পরেই দেখাবে,
     কিন্তু hover না হলে opacity:0 থাকবে */
}
.player-wrap:hover .pip-btn{opacity:1}
.pip-btn:hover{background:rgba(0,0,0,.85)}
.pip-btn.active{
  color:var(--blue);
  border-color:rgba(62,166,255,.4);
  background:rgba(62,166,255,.15);
  opacity:1; /* active থাকলে সবসময় দৃশ্যমান */
}
.pip-btn svg{
  width:16px;height:16px;
  stroke:currentColor;fill:none;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  display:block;
}

/* ── PREVIEW THUMBNAILS STRIP ── */
.preview-strip{
  display:none;
  gap:8px;
  margin-bottom:16px;
  overflow-x:auto;
  padding-bottom:4px;
}
.preview-strip.show{display:flex}
.preview-strip::-webkit-scrollbar{height:3px}
.preview-strip::-webkit-scrollbar-track{background:transparent}
.preview-strip::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

.preview-strip-label{
  font-size:12px;color:var(--text3);margin-bottom:8px;
  font-weight:500;letter-spacing:.04em;text-transform:uppercase;
}

.preview-thumb{
  flex-shrink:0;
  width:140px;
  border-radius:6px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
  border:2px solid transparent;
  transition:border-color .15s;
}
.preview-thumb:hover{border-color:var(--blue)}
.preview-thumb img{
  width:100%;
  display:block;
  aspect-ratio:16/9;
  object-fit:cover;
}
.preview-thumb-ts{
  position:absolute;bottom:4px;right:4px;
  background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:2px 5px;border-radius:3px;
}

.preview-section{margin-bottom:16px}

/* ── VIDEO INFO ── */
.video-info{margin-bottom:16px}

.video-title{
  font-size:18px;font-weight:700;
  color:var(--text);line-height:1.4;
  margin-bottom:8px;
}

.video-meta{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;
}

.video-meta-left{
  display:flex;align-items:center;gap:16px;
  font-size:13px;color:var(--text2);
}

.video-meta-item{display:flex;align-items:center;gap:5px}
.video-meta-item svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.meta-badges{display:flex;gap:6px;flex-wrap:wrap}

.badge{
  padding:4px 10px;border-radius:12px;
  font-size:11px;font-weight:500;font-family:var(--mono);
  letter-spacing:.03em;
}
.badge-hls{background:rgba(62,166,255,.15);color:var(--blue);border:1px solid rgba(62,166,255,.3)}
.badge-dash{background:rgba(76,175,80,.12);color:var(--green);border:1px solid rgba(76,175,80,.3)}
.badge-res{background:var(--surface2);color:var(--text2);border:1px solid var(--border2)}
.badge-dur{background:rgba(255,214,0,.1);color:var(--amber);border:1px solid rgba(255,214,0,.25)}

.proto-tabs{display:flex;gap:6px;margin-bottom:12px;}
.proto-tab{
  display:flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:14px;
  font-size:12px;font-weight:500;font-family:var(--mono);
  border:1px solid var(--border2);
  background:var(--surface2);color:var(--text2);
  cursor:pointer;transition:all .15s;
}
.proto-tab:hover{border-color:var(--text3);color:var(--text)}
.proto-tab.active.hls{background:rgba(62,166,255,.15);border-color:rgba(62,166,255,.5);color:var(--blue)}
.proto-tab.active.dash{background:rgba(76,175,80,.12);border-color:rgba(76,175,80,.4);color:var(--green)}
.proto-tab-dot{width:6px;height:6px;border-radius:50%}
.proto-tab.active.hls .proto-tab-dot{background:var(--blue)}
.proto-tab.active.dash .proto-tab-dot{background:var(--green)}

.video-divider{height:1px;background:var(--border);margin:16px 0}

.quality-section{margin-bottom:16px}
.quality-label{font-size:12px;color:var(--text3);margin-bottom:8px;font-weight:500;letter-spacing:.04em;text-transform:uppercase}
.quality-chips{display:flex;gap:6px;flex-wrap:wrap}
.q-chip{
  padding:5px 12px;border-radius:14px;
  font-size:12px;font-weight:500;font-family:var(--mono);
  border:1px solid var(--border2);
  background:var(--surface2);color:var(--text2);
  cursor:pointer;transition:all .15s;
}
.q-chip:hover{border-color:var(--text3);color:var(--text)}
.q-chip.active{background:var(--accent);border-color:var(--accent);color:#fff}

/* ── SIDEBAR ── */
.sidebar{
  width:396px;
  flex-shrink:0;
  overflow-y:auto;
  padding:20px 16px 20px 4px;
  border-left:1px solid var(--border);
}

.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

.sidebar-header{
  font-size:13px;font-weight:600;
  color:var(--text2);margin-bottom:14px;
  letter-spacing:.05em;text-transform:uppercase;
  display:flex;align-items:center;justify-content:space-between;
}

.sidebar-count{
  background:var(--surface2);border-radius:10px;
  padding:2px 8px;font-size:11px;color:var(--text3);
  font-weight:400;letter-spacing:0;text-transform:none;
}

/* ── VIDEO CARD ── */
.scard{
  display:flex;gap:10px;
  padding:8px;border-radius:var(--radius);
  cursor:pointer;transition:background .15s;
  margin-bottom:4px;
  position:relative;
}
.scard:hover{background:var(--surface2)}
.scard.playing{background:var(--surface3)}
.scard.playing::before{
  content:'';
  position:absolute;left:0;top:8px;bottom:8px;
  width:3px;border-radius:0 2px 2px 0;
  background:var(--accent);
}

.scard-thumb{
  width:160px;flex-shrink:0;
  aspect-ratio:16/9;
  border-radius:6px;
  background:#000;
  position:relative;overflow:hidden;
}
.scard-thumb img{
  width:100%;height:100%;object-fit:cover;
  display:block;
}
.scard-thumb-placeholder{
  width:100%;height:100%;
  background:linear-gradient(135deg,var(--surface2) 0%,var(--surface3) 100%);
  display:flex;align-items:center;justify-content:center;
}
.scard-thumb-placeholder svg{width:22px;height:22px;stroke:var(--text3);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.scard-dur{
  position:absolute;bottom:4px;right:4px;
  background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:2px 5px;border-radius:3px;
}

.scard-play-overlay{
  position:absolute;inset:0;
  background:rgba(0,0,0,.35);
  display:flex;align-items:center;justify-content:center;
  opacity:0;transition:opacity .15s;
}
.scard:hover .scard-play-overlay{opacity:1}
.scard.playing .scard-play-overlay{opacity:1}
.scard-play-overlay svg{width:22px;height:22px;stroke:#fff;fill:rgba(255,255,255,.2);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.scard-info{flex:1;min-width:0;padding-top:2px}
.scard-name{
  font-size:13px;font-weight:500;color:var(--text);
  line-height:1.4;margin-bottom:5px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.scard.playing .scard-name{color:var(--accent)}
.scard-meta{font-size:11px;color:var(--text3);line-height:1.5}
.scard-meta span{display:block}

.scard-proto{display:flex;gap:4px;margin-top:4px;}
.scard-proto-badge{
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:1px 6px;border-radius:8px;
}
.scard-proto-badge.hls{background:rgba(62,166,255,.15);color:var(--blue)}
.scard-proto-badge.dash{background:rgba(76,175,80,.12);color:var(--green)}

.scard-actions{
  position:absolute;top:8px;right:8px;
  opacity:0;transition:opacity .15s;
}
.scard:hover .scard-actions{opacity:1}
.scard-del{
  background:rgba(255,59,59,.15);
  border:none;border-radius:4px;
  padding:4px 6px;cursor:pointer;
  color:#ff5555;transition:background .15s;
}
.scard-del:hover{background:rgba(255,59,59,.3)}
.scard-del svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block}

.sidebar-empty{padding:40px 16px;text-align:center;}
.sidebar-empty svg{width:40px;height:40px;stroke:var(--text3);fill:none;stroke-width:1.2;margin-bottom:12px;stroke-linecap:round;stroke-linejoin:round}
.sidebar-empty p{font-size:13px;color:var(--text3)}
.sidebar-empty .upload-link{color:var(--blue);cursor:pointer;text-decoration:underline;background:none;border:none;font-size:13px;font-family:var(--font);}

/* ── UPLOAD MODAL ── */
.modal-backdrop{
  display:none;
  position:fixed;inset:0;z-index:500;
  background:rgba(0,0,0,.75);
  backdrop-filter:blur(4px);
  align-items:center;justify-content:center;
  animation:fadeIn .2s ease both;
}
.modal-backdrop.visible{display:flex}

.modal{
  background:var(--surface);
  border:1px solid var(--border2);
  border-radius:14px;
  width:100%;max-width:520px;
  padding:28px;
  position:relative;
  animation:slideUp .25s ease both;
  max-height:90vh;overflow-y:auto;
}
.modal::-webkit-scrollbar{width:4px}
.modal::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

.modal-close{
  position:absolute;top:16px;right:16px;
  background:var(--surface2);border:none;
  width:30px;height:30px;border-radius:50%;
  cursor:pointer;color:var(--text2);
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.modal-close:hover{background:var(--surface3);color:var(--text)}
.modal-close svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.modal-title{font-size:17px;font-weight:700;color:var(--text);margin-bottom:20px;padding-right:36px;}

.drop-zone{
  border:2px dashed var(--border2);
  border-radius:10px;
  padding:36px 20px;
  text-align:center;
  cursor:pointer;
  transition:all .2s ease;
  background:var(--surface2);
  margin-bottom:16px;
}
.drop-zone:hover,.drop-zone.dragover{border-color:#3ea6ff;background:rgba(62,166,255,.05);}
.drop-zone-icon{
  width:52px;height:52px;margin:0 auto 14px;
  background:var(--surface3);border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border2);
  transition:all .2s;
}
.drop-zone:hover .drop-zone-icon,.drop-zone.dragover .drop-zone-icon{background:rgba(62,166,255,.1);border-color:var(--blue);}
.drop-zone-icon svg{width:22px;height:22px;stroke:var(--text2);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:stroke .2s}
.drop-zone:hover .drop-zone-icon svg,.drop-zone.dragover .drop-zone-icon svg{stroke:var(--blue)}
.drop-zone-title{font-size:14px;font-weight:500;color:var(--text);margin-bottom:5px}
.drop-zone-sub{font-size:12px;color:var(--text3);font-family:var(--mono)}
.drop-zone-sub span{color:var(--blue);cursor:pointer}
#fileInput{display:none}

.file-pill{
  display:none;align-items:center;gap:10px;
  background:var(--surface3);border:1px solid var(--border2);
  border-radius:8px;padding:10px 14px;
  margin-bottom:16px;
}
.file-pill.show{display:flex}
.file-pill-icon svg{width:16px;height:16px;stroke:var(--blue);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.file-pill-name{flex:1;font-size:13px;font-family:var(--mono);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-pill-size{font-size:11px;color:var(--text3);font-family:var(--mono);flex-shrink:0}
.file-pill-remove{background:none;border:none;cursor:pointer;color:var(--text3);padding:2px;line-height:1;font-size:16px;transition:color .15s}
.file-pill-remove:hover{color:#ff5555}

/* upload speed badge */
.upload-speed-badge{
  display:none;
  background:rgba(62,166,255,.1);border:1px solid rgba(62,166,255,.25);
  border-radius:6px;padding:6px 12px;
  font-family:var(--mono);font-size:12px;color:var(--blue);
  margin-bottom:12px;
  gap:8px;align-items:center;
}
.upload-speed-badge.show{display:flex}

.modal-footer{display:flex;gap:10px;justify-content:flex-end}

.btn{
  display:inline-flex;align-items:center;gap:7px;
  font-family:var(--font);font-size:13px;font-weight:500;
  padding:9px 18px;border-radius:6px;border:none;cursor:pointer;
  transition:all .15s;white-space:nowrap;
}
.btn-red{background:var(--accent);color:#fff}
.btn-red:hover:not(:disabled){background:var(--accent2);box-shadow:0 0 0 3px rgba(255,0,0,.2)}
.btn-red:disabled{opacity:.45;cursor:not-allowed}
.btn-ghost{background:var(--surface2);border:1px solid var(--border2);color:var(--text2)}
.btn-ghost:hover{background:var(--surface3);color:var(--text)}

/* ── DELETE CONFIRM ── */
.confirm-backdrop{
  display:none;position:fixed;inset:0;z-index:600;
  background:rgba(0,0,0,.75);backdrop-filter:blur(4px);
  align-items:center;justify-content:center;
}
.confirm-backdrop.visible{display:flex}
.confirm-modal{
  background:var(--surface);border:1px solid var(--border2);
  border-radius:12px;padding:24px;width:340px;
  animation:slideUp .2s ease both;
}
.confirm-modal h3{font-size:15px;font-weight:700;margin-bottom:8px;color:var(--text)}
.confirm-modal p{font-size:13px;color:var(--text2);line-height:1.6;margin-bottom:6px}
.confirm-id{
  background:var(--bg);border-radius:5px;padding:7px 10px;
  font-family:var(--mono);font-size:11px;color:var(--blue);
  margin-bottom:18px;word-break:break-all;
}
.confirm-actions{display:flex;gap:8px;justify-content:flex-end}

/* ── TOAST ── */
.toasts{position:fixed;bottom:20px;right:20px;z-index:999;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{
  background:var(--surface2);border:1px solid var(--border2);
  border-radius:8px;padding:12px 16px;
  font-size:13px;
  display:flex;align-items:flex-start;gap:10px;
  min-width:260px;max-width:340px;
  pointer-events:all;box-shadow:0 8px 24px rgba(0,0,0,.5);
  animation:toastIn .25s ease both;
}
.toast.ok{border-left:3px solid var(--green)}
.toast.err{border-left:3px solid #ff5555}
.toast.info{border-left:3px solid var(--blue)}
.toast-icon svg{width:14px;height:14px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:2px}
.toast.ok .toast-icon{color:var(--green)}
.toast.err .toast-icon{color:#ff5555}
.toast.info .toast-icon{color:var(--blue)}
.toast-title{font-weight:600;margin-bottom:2px}
.toast-msg{font-size:11px;color:var(--text2);font-family:var(--mono)}

.spinner{display:inline-block;width:12px;height:12px;border:2px solid rgba(255,255,255,.2);border-top-color:currentColor;border-radius:50%;animation:spin .7s linear infinite}

.skeleton{background:linear-gradient(90deg,var(--surface) 25%,var(--surface2) 50%,var(--surface) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:6px}

@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes toastIn{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes shimmer{to{background-position:-200% 0}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes slideDown{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

@media(max-width:900px){
  .sidebar{width:300px}
  .scard-thumb{width:120px}
}
@media(max-width:680px){
  .layout{flex-direction:column}
  .sidebar{width:100%;border-left:none;border-top:1px solid var(--border);padding:12px 16px}
  .main{overflow-y:visible}
  body{overflow-y:auto;overflow-x:hidden}
  html,body{height:auto}
}

/* job-cancel — uploading phase এ দেখায় (লাল) */
.job-cancel{
  background:none;border:none;cursor:pointer;
  color:#ff5555;font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s,opacity .15s;
  flex-shrink:0;opacity:.7;
}
.job-cancel:hover{opacity:1}

/* job-dismiss — processing/ready/error phase এ দেখায় (ধূসর) */
.job-dismiss{
  background:none;border:none;cursor:pointer;
  color:var(--text3);font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s,opacity .15s;
  flex-shrink:0;opacity:.7;
}
.job-dismiss:hover{color:#ff5555;opacity:1}