/* ============================================================
   ShineX — Neo-Brutalism Pastel Theme
   cream · light blue · mint · purple · thick black borders
   offset shadows · chunky buttons · bold playful type
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap");

*{box-sizing:border-box}
:root{
  --bg:#F5F0E6;
  --panel:#FFFAF5;
  --panel2:#E8F4F0;
  --border:#111111;
  --text:#111111;
  --muted:#5C5C6E;
  --accent:#9B7EBD;
  --accent2:#7EB8DA;
  --mint:#8FD4B8;
  --cream:#F7E8D3;
  --green:#5CB88A;
  --danger:#E85A6B;
  --shadow:4px 4px 0 #111111;
  --shadow-sm:3px 3px 0 #111111;
  --radius:16px;
  --radius-sm:12px;
  --radius-lg:22px;
  --border-w:2.5px;
  --font:"Nunito",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-display:"Space Grotesk","Nunito",ui-sans-serif,system-ui,sans-serif;
}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-weight:700;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
h1,h2,h3,.brand strong,.eyebrow{font-family:var(--font-display)}

.app-shell{display:flex;min-height:100vh}
.sidebar{
  width:260px;
  position:fixed;
  inset:0 auto 0 0;
  background:var(--panel);
  border-right:var(--border-w) solid var(--border);
  padding:22px 15px;
  display:flex;
  flex-direction:column;
  z-index:20
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:3px 9px 25px
}
.brand-mark{
  width:40px;height:40px;flex:0 0 40px;border-radius:var(--radius-sm);
  display:block;overflow:hidden;
  box-shadow:0 6px 18px rgba(124,92,255,.35)
}
.brand-mark img{width:100%;height:100%;object-fit:contain;display:block}
.brand-text{display:flex;flex-direction:column;justify-content:center;line-height:1.1}
.brand strong{display:block;font-size:18px;font-weight:800;letter-spacing:2.5px}
.brand span{display:block;margin-top:3px;font-size:10px;font-weight:600;color:var(--accent2);letter-spacing:5px}
.workspace{
  border:var(--border-w) solid var(--border);
  background:var(--panel);
  padding:10px;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:20px;
  position:relative;
  cursor:pointer;
  user-select:none
}
.workspace .chev{transition:.15s}
.workspace.dd-open .chev,.user-mini.dd-open .chev{transform:rotate(180deg)}
.workspace-avatar,.user-avatar,.top-avatar{
  width:34px;height:34px;border-radius:var(--radius-sm);
  background:#272d3a;display:grid;place-items:center;
  font-weight:800
}
.workspace-info{flex:1;min-width:0}
.workspace-info b,.workspace-info small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace-info b{font-size:12px}
.workspace-info small{font-size:10px;color:var(--muted);margin-top:3px}
.nav-label{
  font-size:9px;color:var(--muted);font-weight:800;
  letter-spacing:1.5px;padding:7px 10px
}
.nav-item{
  width:100%;border:0;background:transparent;color:var(--muted);
  padding:11px 12px;border-radius:var(--radius-sm);text-align:left;
  display:flex;gap:12px;align-items:center;margin:2px 0;
  transition:.18s
}
.nav-item span{width:19px;text-align:center}
.nav-item:hover{background:var(--panel2);color:var(--text)}
.nav-item.active{
  background:rgba(124,92,255,.15);
  color:var(--text)
}
.nav-item.active span{color:var(--accent)}
.sidebar-bottom{margin-top:auto}
.ai-status{
  display:flex;align-items:center;gap:9px;
  padding:11px;border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);
  background:var(--panel2);margin-bottom:10px
}
.ai-status i{
  width:8px;height:8px;border-radius:50%;
  background:var(--green);box-shadow:0 0 12px var(--green)
}
.ai-status b,.ai-status small{display:block}
.ai-status b{font-size:11px}
.ai-status small{font-size:9px;color:var(--muted);margin-top:3px}
.user-mini{
  display:flex;align-items:center;gap:9px;padding:8px;
  position:relative;cursor:pointer;user-select:none;border-radius:var(--radius-sm);
  transition:.15s
}
.user-mini:hover{background:var(--panel)}
.user-mini div:nth-child(2){flex:1}
.user-mini b,.user-mini small{display:block}
.user-mini b{font-size:11px}
.user-mini small{font-size:9px;color:var(--muted)}
.main{
  margin-left:260px;
  width:calc(100% - 260px);
  min-height:100vh
}
.topbar{
  height:68px;border-bottom:var(--border-w) solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 35px;position:sticky;top:0;
  background:rgba(245,240,230,.92);backdrop-filter:blur(18px);
  z-index:10
}
.breadcrumb{color:var(--muted);font-size:12px}
.top-actions{display:flex;gap:10px;align-items:center}
.icon-btn,.help-top{
  border:var(--border-w) solid var(--border);background:var(--panel);
  color:var(--muted);width:34px;height:34px;border-radius:var(--radius-sm)
}
.top-avatar{width:34px;height:34px;background:var(--accent)}
.mobile-menu{display:none}
.page{display:none;padding:38px 42px 70px;max-width:1500px;margin:auto}
.page.active{display:block}
.page-head{
  display:flex;justify-content:space-between;gap:20px;
  align-items:flex-start;margin-bottom:30px
}
.eyebrow{
  color:var(--accent);font-size:10px;font-weight:800;
  letter-spacing:1.8px;margin-bottom:8px
}
h1{font-size:32px;margin:0 0 8px;letter-spacing:-1px}
.page-head p{margin:0;color:var(--muted)}
button.primary,.primary{
  display:inline-flex;align-items:center;justify-content:center;
  border:0;background:var(--accent);color:var(--text);
  padding:11px 17px;border-radius:var(--radius-sm);font-weight:700;
  text-decoration:none
}
.primary:hover{background:var(--accent2)}
button.secondary,.secondary{
  border:var(--border-w) solid var(--border);background:var(--panel2);color:var(--text);
  padding:10px 16px;border-radius:var(--radius-sm);font-weight:600;
  text-decoration:none
}
.full{width:100%}
.text-btn{border:0;background:none;color:var(--accent)}
/* Live promo ticker on dashboard */
.live-promo{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
  padding:10px 14px;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius);
  background:
    linear-gradient(90deg, rgba(124,92,255,.12), rgba(255,113,132,.08), rgba(124,92,255,.12));
  background-size:200% 100%;
  animation:livePromoBg 8s ease infinite;
  overflow:hidden;
  min-height:44px;
}
@keyframes livePromoBg{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}
.live-promo-badge{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#111;
  color:#fff;
  font-size:10px;
  font-weight:900;
  letter-spacing:1.2px;
  padding:5px 10px;
  border-radius:999px;
  border:var(--border-w) solid var(--border);
}
.live-dot{
  width:7px;height:7px;border-radius:50%;
  background:#ff4d6d;
  box-shadow:0 0 0 0 rgba(255,77,109,.6);
  animation:livePulse 1.4s ease infinite;
}
@keyframes livePulse{
  0%{box-shadow:0 0 0 0 rgba(255,77,109,.55)}
  70%{box-shadow:0 0 0 8px rgba(255,77,109,0)}
  100%{box-shadow:0 0 0 0 rgba(255,77,109,0)}
}
.live-promo-track{
  flex:1;
  overflow:hidden;
  position:relative;
  min-height:22px;
}
.live-promo-text{
  font-size:13px;
  font-weight:700;
  color:var(--text);
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  opacity:1;
  transform:translateY(0);
  transition:opacity .35s ease, transform .35s ease;
}
.live-promo-text.is-out{
  opacity:0;
  transform:translateY(-10px);
}
.live-promo-text.is-in{
  opacity:0;
  transform:translateY(10px);
}
@media(max-width:760px){
  .live-promo{padding:8px 10px;gap:8px}
  .live-promo-text{font-size:12px;white-space:normal}
}

.hero-card{
  min-height:310px;border:var(--border-w) solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;position:relative;
  background:
    radial-gradient(circle at 85% 35%,rgba(124,92,255,.23),transparent 30%),
    linear-gradient(120deg,#11131c,#0d0f15);
  padding:42px
}
.hero-content{max-width:650px;position:relative;z-index:2}
.pill{
  display:inline-block;border:var(--border-w) solid var(--border);
  background:var(--cream);color:var(--accent);border-radius:30px;
  padding:7px 12px;font-size:10px;font-weight:800
}
.hero-card h2{font-size:37px;line-height:1.08;margin:18px 0 13px;letter-spacing:-1.5px}
.hero-card p{color:var(--muted);max-width:580px;line-height:1.7}
.hero-buttons{display:flex;gap:10px;margin-top:25px}
.hero-art{position:absolute;right:80px;top:40px;width:300px;height:230px}
.floating-card{
  position:absolute;border:var(--border-w) solid var(--border);
  background:var(--panel);backdrop-filter:blur(12px);
  border-radius:var(--radius-lg);padding:22px;text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  font-size:30px
}
.floating-card small{font-size:8px;color:var(--muted);letter-spacing:1px}
.card-one{left:80px;top:20px;transform:rotate(7deg)}
.card-two{left:10px;top:95px;transform:rotate(-8deg)}
.card-three{right:10px;top:90px;transform:rotate(10deg)}
.stats-grid{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:14px;margin:18px 0 40px
}
.stat-card,.analytics-card{
  border:var(--border-w) solid var(--border);background:var(--panel);
  padding:20px;border-radius:var(--radius)
}
.stat-card span,.analytics-card span{
  font-size:9px;color:var(--muted);font-weight:800;letter-spacing:1.5px
}
.stat-card strong,.analytics-card strong{
  display:block;font-size:28px;margin:8px 0
}
.stat-card small{color:var(--muted)}
.section-title{
  display:flex;justify-content:space-between;align-items:end;
  margin-bottom:13px
}
.section-title h2{margin:0;font-size:18px}
.section-title p{margin:4px 0 0;color:var(--muted);font-size:12px}
.project-table{
  border:var(--border-w) solid var(--border);border-radius:var(--radius);
  overflow:hidden;background:var(--panel)
}
.project-row{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;
  padding:15px 18px;border-bottom:var(--border-w) solid var(--border);
  align-items:center;gap:15px
}
.project-row:last-child{border-bottom:0}
.project-row b{font-size:12px}
.project-row small{display:block;color:var(--muted);margin-top:4px;font-size:10px}
.status{
  display:inline-block;padding:5px 8px;border-radius:7px;
  background:var(--panel2);color:#aab1bf;font-size:9px;font-weight:800
}
.status.done{background:rgba(66,211,146,.1);color:var(--green)}
.status.processing{background:rgba(124,92,255,.12);color:var(--accent)}
.status.error{background:rgba(255,93,115,.1);color:var(--danger)}
.empty{
  min-height:190px;display:flex;align-items:center;
  justify-content:center;flex-direction:column;
  color:var(--muted);gap:7px
}
.empty div{font-size:30px;color:var(--muted)}
.empty b{color:var(--text);font-size:13px}
.empty span{font-size:11px}
.clipper-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:18px
}
.upload-card,.url-card,.feature-card,.process-card{
  border:var(--border-w) solid var(--border);background:var(--panel);
  border-radius:var(--radius-lg);padding:30px
}
.upload-card{text-align:center}
.upload-icon,.mini-icon,.feature-icon{
  width:55px;height:55px;border-radius:var(--radius);
  background:var(--cream);color:var(--accent);
  display:grid;place-items:center;font-size:25px;margin-bottom:18px
}
.upload-card .upload-icon{margin:0 auto 18px}
.upload-card h2,.url-card h2{margin:0 0 8px}
.upload-card p,.url-card p,.feature-card p{color:var(--muted);font-size:12px;line-height:1.6}
.file-name{
  margin-top:15px;color:var(--muted);font-size:11px;
  overflow:hidden;text-overflow:ellipsis
}
.input{
  width:100%;border:var(--border-w) solid var(--border);
  background:var(--cream);color:var(--text);border-radius:var(--radius-sm);
  padding:11px 12px;outline:none;margin:7px 0 15px
}
.input:focus{border-color:var(--accent)}
.process-card{margin-top:18px}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:25px}
.steps div{
  padding:17px;border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);
  display:flex;gap:10px;align-items:center
}
.steps b{color:var(--accent);font-size:11px}
.steps span{font-size:11px;color:var(--text)}
.toolbar{display:flex;gap:10px;margin-bottom:15px}
.search{max-width:400px;margin:0}
.clip-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:15px
}
.clip-card{
  border:var(--border-w) solid var(--border);background:var(--panel);
  border-radius:var(--radius);overflow:hidden
}
.clip-preview{
  aspect-ratio:16/9;background:var(--panel2);
  display:grid;place-items:center;font-size:32px;color:#555d6c
}
.clip-info{padding:15px}
.clip-info b{font-size:12px}
.clip-info p{font-size:10px;color:var(--muted)}
.analytics-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:14px
}
.chart-placeholder{
  margin-top:18px;border:var(--border-w) solid var(--border);
  border-radius:var(--radius);background:var(--panel);
  min-height:300px;display:grid;place-items:center;
  align-content:center;text-align:center
}
.chart-icon{font-size:50px;color:var(--accent)}
.chart-placeholder p{color:var(--muted);font-size:12px}
.info-grid{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:14px;margin-top:18px
}
.info-grid>div,.help-card{
  border:var(--border-w) solid var(--border);background:var(--panel);
  padding:22px;border-radius:var(--radius)
}
.info-grid p,.help-card p{color:var(--muted);font-size:11px;line-height:1.6}
.settings-layout{display:grid;grid-template-columns:220px 1fr;gap:22px}
.settings-nav{
  border:var(--border-w) solid var(--border);background:var(--panel);
  padding:8px;border-radius:var(--radius);height:max-content;
  position:sticky;top:88px
}
.setting-tab{
  width:100%;text-align:left;background:none;border:0;
  color:var(--muted);padding:10px;border-radius:var(--radius-sm);font-size:11px
}
.setting-tab:hover,.setting-tab.active{background:#191522;color:var(--text)}
.settings-content{display:flex;flex-direction:column;gap:14px}
.setting-section{
  border:var(--border-w) solid var(--border);background:var(--panel);
  padding:24px;border-radius:var(--radius)
}
.setting-section h2{font-size:16px;margin:0 0 5px}
.setting-section>p{color:var(--muted);font-size:11px;margin:0 0 18px}
.setting-section label{
  display:block;color:var(--text);font-size:10px;font-weight:700;margin-top:12px
}
.setting-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 0;border-bottom:var(--border-w) solid var(--border)
}
.setting-row b,.setting-row small{display:block}
.setting-row b{font-size:11px}
.setting-row small{color:var(--muted);font-size:10px;margin-top:3px}
.switch input{display:none}
.switch span{
  width:38px;height:21px;background:#C8D8E8;border-radius:30px;
  display:block;position:relative
}
.switch span:after{
  content:"";width:15px;height:15px;background:#777e8b;
  border-radius:50%;position:absolute;top:3px;left:3px;transition:.2s
}
.switch input:checked+span{background:var(--accent)}
.switch input:checked+span:after{left:20px;background:#fff}
.status-good{color:var(--green);font-size:10px}
.backup-box{
  border:var(--border-w) dashed var(--border);background:#13111c;
  padding:17px;border-radius:var(--radius-sm);display:flex;
  align-items:center;justify-content:space-between;gap:15px
}
.backup-box b,.backup-box small{display:block}
.backup-box b{font-size:12px}
.backup-box small{color:var(--muted);font-size:10px;margin-top:4px}
.api-key{
  display:flex;gap:10px;align-items:center
}
.api-key code{
  flex:1;padding:11px;background:var(--cream);
  border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);color:var(--muted)
}
.storage-bar{
  height:9px;background:#D4E8E0;border-radius:var(--radius-lg);overflow:hidden
}
.storage-bar span{
  display:block;width:18%;height:100%;background:var(--accent)
}
.help-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}
.help-card>div{font-size:23px;color:var(--accent)}
.help-card h2{font-size:15px}
.faq{
  margin-top:18px;border:var(--border-w) solid var(--border);
  background:var(--panel);border-radius:var(--radius);padding:23px
}
.faq h2{font-size:16px}
details{border-top:var(--border-w) solid var(--border);padding:15px 0}
summary{cursor:pointer;font-size:12px;font-weight:700}
details p{color:var(--muted);font-size:11px;line-height:1.6}
.toast{
  position:fixed;right:22px;bottom:22px;
  background:#181c25;border:var(--border-w) solid var(--border);
  color:var(--text);padding:12px 16px;border-radius:var(--radius-sm);
  font-size:11px;opacity:0;transform:translateY(10px);
  pointer-events:none;transition:.2s;z-index:100
}
.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1000px){
  .sidebar{width:220px}
  .main{margin-left:220px;width:calc(100% - 220px)}
  .hero-art{opacity:.35;right:0}
  .stats-grid,.analytics-grid{grid-template-columns:repeat(2,1fr)}
  .clip-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
  .sidebar{
    transform:translateX(-100%);transition:.2s;width:260px
  }
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0;width:100%}
  .page{padding:25px 18px 50px}
  .topbar{padding:0 18px}
  .mobile-menu{display:inline-block;border:0;background:none;color:var(--text);margin-right:10px}
  .hero-card{padding:25px}
  .hero-card h2{font-size:29px}
  .hero-art{display:none}
  .clipper-grid,.help-grid,.info-grid{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr 1fr}
  .project-row{grid-template-columns:1fr 1fr}
  .settings-layout{grid-template-columns:1fr}
  .settings-nav{position:static;display:flex;overflow:auto}
  .setting-tab{white-space:nowrap;width:auto}
  }

/* ===================== AUTH VIEW ===================== */
.auth-shell{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 30% 20%,#171225,#080a0f 60%);
  padding:20px
}
.auth-card{
  width:100%;max-width:380px;background:var(--panel);border:var(--border-w) solid var(--border);
  border-radius:var(--radius-lg);padding:30px 26px;box-shadow:0 20px 60px rgba(0,0,0,.4)
}
.brand.center{justify-content:center;padding-bottom:22px}
.auth-tabs{display:flex;gap:6px;background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);padding:4px;margin-bottom:20px}
.auth-tab{flex:1;background:transparent;border:0;color:var(--muted);padding:9px;border-radius:var(--radius-sm);font-weight:700;font-size:12px}
.auth-tab.active{background:var(--accent);color:var(--text)}
.auth-form{display:none;flex-direction:column;gap:4px}
.auth-form.active{display:flex}
.auth-form label{font-size:11px;color:var(--muted);margin-top:8px}
.auth-error{color:var(--danger);font-size:11px;min-height:14px;margin-top:6px}
.auth-note{font-size:10px;color:var(--muted);text-align:center;margin-top:16px;line-height:1.5}
.primary.full,.secondary.full{width:100%;justify-content:center;margin-top:16px}

/* ===================== DROPDOWNS ===================== */
.dropdown-panel{
  position:absolute;left:0;right:0;bottom:auto;top:calc(100% + 8px);
  background:var(--panel2);border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);
  padding:6px;display:none;flex-direction:column;gap:2px;z-index:50;
  box-shadow:0 15px 40px rgba(0,0,0,.5)
}
.dropdown-panel.up{top:auto;bottom:calc(100% + 8px)}
.dropdown-panel.show{display:flex}
.dropdown-item{
  width:100%;text-align:left;background:transparent;border:0;color:var(--text);
  padding:9px 10px;border-radius:var(--radius-sm);font-size:12px;display:flex;flex-direction:column;gap:2px
}
.dropdown-item:hover{background:#1d2230}
.dropdown-item.active{background:rgba(124,92,255,.15)}
.dropdown-item small{color:var(--muted);font-size:10px}
.dropdown-item.danger{color:var(--danger)}
.dropdown-item.ghost{color:var(--muted);cursor:not-allowed}
.dropdown-sep{height:1px;background:var(--border);margin:4px 2px}

/* ===================== SUBTITLE STUDIO (desain orisinal) ===================== */
.sub-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:26px}
.sub-card{
  background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);
  padding:18px;border-left:4px solid var(--accent)
}
.sub-card.accent-b{border-left-color:var(--green)}
.sub-card.accent-c{border-left-color:#E8A05A}
.sub-card-top{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:10px;letter-spacing:1px;font-weight:700}
.sub-card strong{display:block;font-size:28px;margin:10px 0 4px}
.sub-card small{color:var(--muted);font-size:11px}
.sub-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.sub-list{display:flex;flex-direction:column;gap:10px}
.sub-row{
  background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);
  padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap
}
.sub-row-info{display:flex;align-items:center;gap:10px}
.muted{color:var(--muted);font-size:11px}

/* ===================== MODAL (Subtitle editor) ===================== */
.modal-backdrop{
  position:fixed;inset:0;background:rgba(5,6,10,.7);display:none;
  align-items:center;justify-content:center;z-index:200;padding:20px
}
.modal-backdrop.show{display:flex}
.modal-box{
  background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);
  width:100%;max-width:560px;max-height:80vh;display:flex;flex-direction:column
}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:var(--border-w) solid var(--border)}
.modal-body{padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.modal-foot{padding:14px 18px;border-top:var(--border-w) solid var(--border);display:flex;justify-content:flex-end}
.seg-row{display:flex;gap:10px;align-items:flex-start}
.seg-time{font-size:10px;color:var(--muted);white-space:nowrap;padding-top:10px;width:100px}
.seg-text{flex:1;resize:vertical}

/* ===================== SETTINGS ACCORDION ===================== */
.settings-accordion{display:flex;flex-direction:column;gap:10px;max-width:640px}
.acc-item{background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);overflow:hidden}
.acc-head{
  width:100%;background:transparent;border:0;color:var(--text);font-weight:700;font-size:13px;
  padding:16px 18px;display:flex;justify-content:space-between;align-items:center
}
.acc-arrow{transition:.2s;color:var(--muted)}
.acc-item.open .acc-arrow{transform:rotate(180deg)}
.acc-body{max-height:0;overflow:hidden;transition:.25s ease;padding:0 18px}
.acc-item.open .acc-body{max-height:600px;padding:0 18px 18px}
.save-ok{color:var(--green);font-size:11px;margin-left:10px;opacity:0;transition:.2s}
.save-ok.show{opacity:1}
.history-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:var(--border-w) solid var(--border);font-size:12px}
.history-row .pos{color:var(--green)}
.history-row .neg{color:var(--danger)}
.api-warning{color:#E8A05A;font-size:11px;margin-top:8px}
.chart-box{background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);padding:20px}
.chart-box h2{margin-top:0;font-size:15px}

/* ===================== LIGHT / COMPACT MODE ===================== */
body.light-mode{
  --bg:#f4f5f8;--panel:#ffffff;--panel2:#f0f1f5;--border:#e2e4ea;--text:#14161b;--muted:#6b7180
}
body.light-mode .sidebar{background:#ffffff}
body.light-mode .topbar{background:rgba(255,250,245,.95)}
body.compact .page{padding:22px 26px 50px}
body.compact .stat-card,body.compact .sub-card,body.compact .acc-head{padding-top:10px;padding-bottom:10px}

/* ===================== LIVE PROGRESS (real-time %) ===================== */
.live-progress{display:flex;flex-direction:column;gap:10px}
.progress-head{display:flex;justify-content:space-between;align-items:center}
.progress-pct{color:var(--accent);font-weight:800;font-size:13px}
.progress-track{height:8px;background:#1a1e28;border-radius:99px;overflow:hidden}
.progress-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:99px;transition:width .4s ease}
.cancel-btn{align-self:flex-start;color:var(--danger);border-color:rgba(255,113,132,.35)}
.cancel-btn:disabled{opacity:.6;cursor:not-allowed}
.status.cancelled{background:rgba(255,113,132,.12);color:var(--danger)}

/* =========================================
   ShineX STUDIO
   ========================================= */

.clip-studio{
  width:100%;
  border:var(--border-w) solid var(--border);
  background:var(--panel);
  border-radius:var(--radius-lg);
  overflow:hidden;
}

.clip-tabs{
  display:flex;
  gap:8px;
  padding:14px;
  overflow-x:auto;
  border-bottom:var(--border-w) solid var(--border);
  background:var(--panel);
}

.clip-tab{
  min-width:42px;
  height:42px;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--panel2);
  color:var(--muted);
  font-weight:700;
  cursor:pointer;
  transition:.2s;
}

.clip-tab:hover{
  border-color:var(--accent);
  color:var(--text);
}

.clip-tab.active{
  background:var(--accent);
  border-color:var(--accent);
  color:var(--text);
}

.clip-player-wrap{
  width:100%;
}

.clip-panel{
  display:none;
}

.clip-panel.active{
  display:block;
}

.clip-number{
  padding:14px 18px 10px;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.5px;
  color:var(--accent);
}

.clip-video{
  display:block;
  width:100%;
  max-height:70vh;
  background:#111;
  object-fit:contain;
}

.clip-details{
  padding:16px 18px;
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
  border-top:var(--border-w) solid var(--border);
}

.clip-details > div:first-child{
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.clip-details b{
  font-size:14px;
}

.clip-details small{
  color:var(--muted);
  font-size:11px;
}

.clip-time{
  color:var(--muted);
  font-size:11px;
  white-space:nowrap;
}

@media(max-width:700px){
  .clip-tabs{
    padding:10px;
  }

  .clip-tab{
    min-width:40px;
    height:40px;
  }

  .clip-details{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .clip-time{
    white-space:normal;
  }

  .clip-video{
    max-height:65vh;
  }
}


/* ==============================
   CLIP STUDIO
   ============================== */

.clip-studio {
  width: 100%;
}

.clip-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.clip-tab {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.clip-tab:hover {
  border-color: var(--accent);
  color: #fff;
}

.clip-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.clip-panel {
  display: none;
}

.clip-panel.active {
  display: block;
}

.clip-player-wrap {
  width: 100%;
}

.clip-video {
  width: 100%;
  max-height: 600px;
  display: block;
  background: #000;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.clip-number {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #907aff;
  letter-spacing: 1.5px;
}

.clip-details {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.clip-details b {
  display: block;
  font-size: 13px;
}

.clip-details small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.clip-time {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 600px) {
  .clip-details {
    align-items: flex-start;
    flex-direction: column;
  }

  .clip-video {
    max-height: 70vh;
  }
}


/* ============================================================
   LIVE AI CLIPPER PROCESS
   ============================================================ */

.live-progress {
  overflow: hidden;
}

.process-video-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  background: #08090d;
  border: 1px solid rgba(255,255,255,.08);
  aspect-ratio: 16 / 9;
}

.process-source-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050609;
}

.video-loading-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  pointer-events: none;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-head b {
  display: block;
}

.process-stage {
  display: block;
  margin-top: 5px;
  color: #8e72ff;
  font-size: 12px;
}

.process-message {
  color: #9299a8;
  line-height: 1.6;
  margin: 14px 0;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.pipeline-steps > div {
  padding: 11px 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  opacity: .45;
}

.pipeline-steps > div.active {
  opacity: 1;
  border-color: rgba(130,91,255,.55);
  background: rgba(111,72,255,.08);
}

.pipeline-steps > div.done {
  opacity: 1;
  border-color: rgba(90,220,150,.25);
}

.pipeline-steps span {
  display: block;
  color: #8e72ff;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pipeline-steps b {
  font-size: 11px;
}

@media (max-width: 600px) {
  .pipeline-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-video-wrap {
    border-radius: 12px;
  }
}

/* ===================== YOUTUBE THUMBNAIL PREVIEW ===================== */
/* =========================================================
   YOUTUBE THUMBNAIL PREVIEW
   ========================================================= */

.youtube-preview-card {
  position: relative;
  overflow: hidden;
  background: #18181d;
  border-radius: 16px;
  min-height: 210px;
}

.process-youtube-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
  max-height: 420px;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}

.process-youtube-thumbnail.loaded {
  opacity: 1;
}

.youtube-downloading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(0,0,0,.42);
  color: #fff;
  font-size: 14px;
  transition: opacity .25s ease;
}

.youtube-preview-card.thumbnail-loaded .youtube-downloading {
  opacity: 0;
  pointer-events: none;
}

.youtube-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: youtubeSpin .7s linear infinite;
}

@keyframes youtubeSpin {
  to {
    transform: rotate(360deg);
  }
}

.youtube-preview-title {
  margin: 14px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: #f5f5f7;
}

.youtube-no-thumbnail {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 14px;
}

.youtube-preview-card .video-loading-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}


/* =========================================================
   VIDEO EDITOR
   ========================================================= */
/* ===== Editor: tampilan tab ala Clipper Studio ===== */
#page-editor.active{display:block;padding:0;max-width:none}
.ed-shell{display:grid;height:calc(100dvh - 68px);min-height:520px;background:var(--bg);
  grid-template-rows:auto minmax(150px,1fr) auto auto minmax(150px,42%) auto;overflow:hidden}
.ed-head{display:flex;gap:10px;align-items:center;padding:8px 14px;border-bottom:var(--border-w) solid var(--border)}
.ed-project{flex:1;min-width:0;background:var(--panel);border:var(--border-w) solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:9px 10px;font-size:13px}
.ed-export{flex:none;background:var(--accent);color:var(--text);border:0;border-radius:var(--radius-sm);padding:9px 13px;font-size:12px;font-weight:700;cursor:pointer}
.ed-export:disabled{opacity:.6;cursor:wait}
.ed-stage-wrap{display:flex;align-items:center;justify-content:center;background:#111;min-height:0;overflow:hidden}
.ed-stage{position:relative;overflow:hidden;background:#050608;border-radius:var(--radius-sm);flex:none}
.ed-video{position:absolute;left:50%;top:50%;background:#050608;transform-origin:center}
.ed-bg{filter:blur(28px) brightness(.8);pointer-events:none;transform-origin:center}
.ed-fg{cursor:pointer}
.ed-sub{position:absolute;left:5%;right:5%;transform:translateY(-50%);display:flex;pointer-events:none;line-height:1.25;white-space:pre-wrap;z-index:3}
.ed-sub-text{display:inline-block;max-width:100%}
.ed-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:18px;color:#8c94a3;font-size:12px;z-index:4;background:#050608}
.ed-transport{display:flex;align-items:center;gap:8px;padding:8px 14px;border-top:var(--border-w) solid var(--border);background:var(--panel)}
.ed-play{width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:#000;font-size:16px;cursor:pointer;flex:none}
.ed-tbtn{background:none;border:0;color:var(--text);font-size:16px;cursor:pointer;padding:6px;flex:none}
.ed-time,.mono{font-family:ui-monospace,Menlo,Consolas,monospace}
.ed-time{font-size:13px;font-weight:700;flex:none}
#edSeek{flex:1;min-width:40px;accent-color:var(--text);height:24px;padding:0;background:none;border:0}
.ed-status{padding:0 14px;font-size:11px;color:var(--muted);min-height:0}
.ed-status:not(:empty){padding:6px 14px;border-top:var(--border-w) solid var(--border)}
.ed-status a{color:#a99bff;font-weight:700}
.ed-panels{min-height:0;overflow:hidden;border-top:var(--border-w) solid var(--border);background:var(--panel);position:relative}
.ed-panel{display:none;height:100%;overflow-y:auto;padding:14px;-webkit-overflow-scrolling:touch}
.ed-panel.active{display:block}
.ed-panel-tl.active{display:flex;flex-direction:column;padding:0}
.ed-title{font-size:15px;margin:0 0 12px}.ed-title small{font-weight:400;color:var(--muted);font-size:12px}
.ed-rows{display:grid;gap:10px;margin-bottom:16px}
.ed-rows div{display:flex;justify-content:space-between;font-size:13px}.ed-rows span{color:var(--muted)}
.ed-group{display:grid;gap:12px;margin:12px 0}
.ed-group>label,.ed-panel .ed-switch{display:block;font-size:12px;color:var(--text)}
.ed-group label output{float:right;color:var(--muted);font-size:11px}
.ed-group label em{display:block;font-style:normal;color:var(--muted);font-size:11px;margin-top:4px}
.ed-panel input[type=range]{width:100%;accent-color:var(--text);height:26px;padding:0;background:none;border:0;margin:2px 0 0}
.ed-panel .input{margin-top:6px}
.ed-switch{display:flex!important;justify-content:space-between;align-items:center;padding:6px 0}
.ed-switch input{width:38px;height:22px;accent-color:var(--accent)}
.ed-color{display:flex;gap:8px;margin-top:6px;align-items:center}
.ed-color input[type=color]{width:38px;height:38px;padding:2px;border:var(--border-w) solid var(--border);background:var(--panel);border-radius:var(--radius-sm);flex:none}
.ed-color .input{margin:0;flex:1;font-family:ui-monospace,Menlo,monospace}
.ed-wide{display:block;width:100%;text-align:center;margin-top:12px}
.ed-label{font-size:12px;margin:12px 0 6px}
.ed-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ed-presets button,.ed-layouts button{background:var(--panel);border:var(--border-w) solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:12px 6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px}
.ed-presets button.active,.ed-layouts button.active,.ed-seg button.active{border-color:var(--text);box-shadow:0 0 0 1px #fff inset}
.ed-presets b{font-size:18px}.ed-presets small,.ed-layouts small{color:var(--muted);font-size:11px}
.ed-seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.ed-seg button{background:var(--panel);border:var(--border-w) solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:9px 4px;font-size:12px;cursor:pointer}
.ed-seg button.active{background:#e8e8ee;color:#000}
.ed-auto{display:flex;justify-content:space-between;align-items:center;gap:10px;border:var(--border-w) solid var(--border);background:var(--panel);border-radius:var(--radius-sm);padding:10px 12px;font-size:13px;font-weight:600}
.ed-row-head{display:flex;justify-content:space-between;align-items:center;margin:16px 0 6px;font-size:11px;color:var(--muted);letter-spacing:.5px}
.ed-plus{background:none;border:var(--border-w) solid var(--border);color:var(--text);border-radius:var(--radius-sm);width:32px;height:32px;font-size:18px;cursor:pointer}
.ed-hint{font-size:11px;color:var(--muted);margin:6px 0 10px;line-height:1.5}
.ed-clips{display:grid;gap:8px}
.ed-clip{border:var(--border-w) solid var(--border);background:var(--panel);border-radius:var(--radius-sm);padding:11px 12px;cursor:pointer}
.ed-clip.active{border-color:var(--text)}
.ed-clip-top{display:flex;align-items:center;gap:9px;font-size:13px}.ed-clip-top b{flex:1;font-weight:600;min-width:0}
.ed-num{background:#252a35;border-radius:5px;padding:1px 6px;font-size:11px}
.ed-del{background:none;border:0;color:var(--danger);cursor:pointer;font-size:14px;padding:4px}
.ed-clip-meta{display:flex;gap:6px;align-items:center;margin-top:6px;font-size:11px;color:var(--muted)}
.ed-clip-meta i{width:1px;height:12px;background:var(--border);margin:0 6px}
.ed-clip-meta em{margin-left:auto;font-style:normal;background:#252a35;padding:1px 7px;border-radius:6px}
.ed-seglist{display:grid;gap:8px}
.ed-seg-item{border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);padding:8px}
.ed-seg-t{background:none;border:0;color:#8c94a3;font-size:10px;cursor:pointer;padding:0 0 4px}
.ed-seg-item textarea{min-height:44px;margin:0!important}
.ed-layouts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ed-lo{width:70px;height:112px;background:#1c202a;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.ed-lo i{display:block;background:#4b4f5b;width:100%;height:36%}
.ed-lo-blur{background:linear-gradient(#2a3040,#3a4258)}.ed-lo-blur i{width:100%;height:36%}
.ed-lo-full{width:112px;height:63px}.ed-lo-full i{height:100%}
.ed-layers{display:grid;gap:4px}
.ed-layer{display:flex;align-items:center;gap:10px;padding:13px 10px;border-radius:var(--radius-sm);font-size:14px;cursor:pointer}
.ed-layer i{width:8px;height:8px;border-radius:50%;flex:none}.ed-layer span{flex:1}
.ed-layer.active{background:var(--panel2)}.ed-layer.off span{opacity:.45;text-decoration:line-through}
.ed-eye{background:none;border:0;font-size:16px;cursor:pointer;padding:4px 8px}
.ed-tl-bar{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;font-size:12px;color:var(--muted);border-bottom:var(--border-w) solid var(--border)}
.ed-zoom{display:flex;align-items:center;gap:8px}.ed-zoom i{font-style:normal;min-width:34px;text-align:center;font-size:11px}
.ed-zoom button{background:none;border:0;color:var(--text);font-size:18px;cursor:pointer;width:28px}
.ed-tl{flex:1;overflow:auto;position:relative;-webkit-overflow-scrolling:touch}
.tl-inner{position:relative;min-height:100%}
.tl-row{display:flex;height:44px;border-bottom:1px solid #161a22;align-items:stretch}
.tl-row.off{opacity:.4}
.tl-ruler{height:30px;font-size:10px;color:var(--muted)}
.tl-name{position:sticky;left:0;z-index:4;width:84px;flex:none;background:var(--panel);display:flex;align-items:center;gap:6px;padding-left:10px;font-size:11px;border-right:1px solid #161a22}
.tl-name i{width:8px;height:8px;border-radius:50%;flex:none}
.tl-lane{position:relative;flex:none;cursor:pointer}
.tl-ruler .tl-lane span{position:absolute;top:8px;padding-left:4px;border-left:1px solid #2a3040}
.tl-blk{position:absolute;top:6px;bottom:6px;border-radius:5px;font-size:10px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tl-clip{background:var(--accent);color:var(--text)}.tl-clip.on{outline:2px solid #fff}
.tl-video{background:#1e3a8a;border:1px solid #3b82f6}
.tl-audio{background:#14532d;border:1px solid #22c55e}
.tl-sub{background:#7a5c00;border:1px solid #f5c518;top:12px;bottom:12px;min-width:2px}
.tl-head{position:absolute;top:0;bottom:0;width:2px;background:#fff;z-index:5;pointer-events:none}
.ed-tabs{display:grid;grid-template-columns:repeat(6,1fr);border-top:var(--border-w) solid var(--border);background:var(--panel);padding-bottom:env(safe-area-inset-bottom,0)}
.ed-tabs button{position:relative;background:none;border:0;color:var(--muted);font-size:10px;padding:8px 2px 7px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}
.ed-tabs button span{font-size:17px;line-height:1}
.ed-tabs button.active{color:var(--text);background:var(--panel2)}
.ed-tabs em{position:absolute;top:3px;right:calc(50% - 22px);background:#fff;color:#000;border-radius:var(--radius-sm);font-style:normal;font-size:9px;padding:0 5px;font-weight:700}
@media(min-width:1000px){
  .ed-shell{grid-template-columns:minmax(0,1fr) 420px;grid-template-rows:auto minmax(0,1fr) auto auto auto;grid-template-areas:"head panels" "stage panels" "trans panels" "stat panels" "tabs tabs"}
  .ed-head{grid-area:head}.ed-stage-wrap{grid-area:stage}.ed-transport{grid-area:trans}.ed-status{grid-area:stat}.ed-panels{grid-area:panels;border-left:var(--border-w) solid var(--border);border-top:0}.ed-tabs{grid-area:tabs}
}
@media(max-width:760px){.ed-shell{height:calc(100dvh - 68px)}}
@media(prefers-reduced-motion:reduce){.ed-panel{scroll-behavior:auto}}
body.light-mode .ed-shell,body.light-mode .ed-panels,body.light-mode .tl-name{background:#f4f5f8}
body.light-mode .ed-transport,body.light-mode .ed-tabs,body.light-mode .ed-clip,body.light-mode .ed-auto,body.light-mode .ed-presets button,body.light-mode .ed-layouts button,body.light-mode .ed-seg button{background:#fff;color:#111}
body.light-mode .ed-project,body.light-mode .ed-panel .input{background:#fff;color:#111;border-color:#d8dbe3}
body.light-mode .ed-tbtn,body.light-mode .ed-tabs button.active,body.light-mode .ed-plus,body.light-mode .ed-zoom button{color:#111}

/* Clip Studio actions */
.clip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.clip-actions .primary,
.clip-actions .secondary {
  text-decoration: none;
}

/* ===================== CLIP COUNT SELECTOR ===================== */
.clip-count-row{
  background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);
  padding:14px 16px;margin-bottom:16px;display:flex;flex-direction:column;gap:6px;
  max-width:420px
}
.clip-count-row label{font-size:11px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.clip-count-row small{color:var(--muted);font-size:10px}

/* ===================== SUBTITLE STYLE PANEL ===================== */
.sub-style-card{
  background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);
  padding:20px;margin-bottom:24px
}
.sub-style-head h2{margin:0 0 2px;font-size:16px}
.sub-style-head p{margin:0 0 16px;color:var(--muted);font-size:12px}
.sub-style-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-bottom:16px}
.sub-style-field{display:flex;flex-direction:column;gap:6px}
.sub-style-field label{font-size:11px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.sub-style-field input[type="color"]{
  width:100%;height:40px;border-radius:var(--radius-sm);border:var(--border-w) solid var(--border);
  background:transparent;cursor:pointer;padding:2px
}
.sub-style-preview{
  background:var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23151923'/%3E%3C/svg%3E");
  background-size:cover;
  border:var(--border-w) solid var(--border);border-radius:var(--radius-sm);
  height:140px;display:flex;align-items:flex-end;justify-content:center;padding:16px;margin-bottom:16px
}
.sub-style-preview span{
  font-weight:700;font-size:20px;padding:2px 6px;
  -webkit-text-stroke:3px #000;paint-order:stroke fill
}

/* ===================== SUBTITLE VIDEO PENUH ===================== */
.fs-card{background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:24px;display:flex;flex-direction:column;gap:12px}
.fs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.fs-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.fs-field label,.fs-player-ctl label{font-size:11px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.fs-field small,.fs-note{color:var(--muted);font-size:11px;line-height:1.5}
.fs-check{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
.fs-check input{width:16px;height:16px;accent-color:var(--accent)}
.fs-card .primary{align-self:flex-start}
.fs-upload:empty{display:none}
.fs-upload{font-size:12px;color:var(--muted)}
.fs-job{background:var(--panel);border:var(--border-w) solid var(--border);border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.fs-job-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.fs-job-name{font-weight:700;font-size:14px;word-break:break-word}
.fs-job-meta{color:var(--muted);font-size:11px;margin-top:3px}
.fs-job-msg{color:var(--muted);font-size:12px;white-space:pre-wrap;word-break:break-word}
.fs-actions{display:flex;flex-wrap:wrap;gap:8px}
.fs-actions button,.fs-actions a{font-size:12px;padding:8px 12px;text-decoration:none}
.fs-actions .danger{color:var(--danger);border-color:rgba(255,93,115,.4)}
.fs-wide{max-width:860px;max-height:92vh}
.fs-video{width:100%;max-height:52vh;background:#111;border-radius:var(--radius-sm)}
.fs-player-ctl{display:flex;flex-direction:column;gap:6px}
.fs-links{display:flex;flex-wrap:wrap;gap:8px}
.fs-links a{font-size:12px;padding:8px 12px;text-decoration:none}
.fs-edit-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:6px;flex-wrap:wrap}
.fs-edit-head .input{max-width:220px}
.fs-seglist{display:flex;flex-direction:column;gap:8px}
.fs-seg{display:flex;gap:10px;align-items:flex-start}
.fs-seg-time{background:none;border:0;color:var(--accent);font-size:11px;width:64px;padding:10px 0 0;text-align:left;flex:0 0 64px}
.fs-seg textarea{flex:1;min-height:44px;resize:vertical}
.fs-pager{display:flex;justify-content:center;align-items:center;gap:14px}
@media(max-width:760px){
  .fs-grid{grid-template-columns:1fr}
  .fs-card{padding:16px}
  .fs-wide{max-height:96vh}
  .fs-edit-head .input{max-width:none;width:100%}
}

.clip-subtitle-status{margin-top:8px;font-size:12px;font-weight:700}
.clip-subtitle-status.ok{color:var(--green)}
.clip-subtitle-status.missing{color:#E8A05A}


/* ============================================================
   NEO-BRUTALISM PASTEL — COMPONENT OVERRIDES (must win)
   ============================================================ */

/* Sidebar */
.sidebar{
  background:var(--cream) !important;
  border-right:var(--border-w) solid var(--border) !important;
  box-shadow:var(--shadow);
}
.brand-mark{
  border:var(--border-w) solid var(--border);
  border-radius:14px !important;
  box-shadow:var(--shadow-sm) !important;
  background:var(--panel);
}
.brand strong{font-weight:900;letter-spacing:1px}
.brand span{color:var(--accent) !important;font-weight:800}
.workspace{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:var(--radius) !important;
  box-shadow:var(--shadow-sm);
}
.workspace-avatar,.user-avatar,.top-avatar{
  border:var(--border-w) solid var(--border);
  background:var(--accent2) !important;
  color:#111 !important;
  font-weight:900;
}
.nav-label{color:var(--muted) !important;font-weight:900}
.nav-item{
  color:var(--text) !important;
  border:var(--border-w) solid transparent;
  font-weight:800;
  border-radius:var(--radius-sm) !important;
}
.nav-item:hover{
  background:var(--panel) !important;
  border-color:var(--border);
  box-shadow:var(--shadow-sm);
  color:#111 !important;
}
.nav-item.active{
  background:var(--accent) !important;
  color:#fff !important;
  border:var(--border-w) solid var(--border) !important;
  box-shadow:var(--shadow-sm);
}
.nav-item.active span{color:#fff !important}
.ai-status{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  box-shadow:var(--shadow-sm);
}
.ai-status i{background:var(--green) !important;box-shadow:none}
.user-mini:hover{background:var(--panel) !important}

/* Topbar */
.topbar{
  background:rgba(245,240,230,.94) !important;
  border-bottom:var(--border-w) solid var(--border) !important;
  backdrop-filter:blur(12px);
}
.icon-btn,.help-top{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:12px !important;
  box-shadow:var(--shadow-sm);
  color:var(--text) !important;
}
.icon-btn:hover,.help-top:hover{background:var(--mint) !important}
.top-avatar{background:var(--accent) !important;color:#fff !important}

/* Buttons — chunky neo-brutal */
button.primary,.primary{
  background:var(--accent) !important;
  color:#fff !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:14px !important;
  box-shadow:var(--shadow);
  font-weight:900 !important;
  padding:12px 18px !important;
  transition:transform .12s,box-shadow .12s;
}
button.primary:hover,.primary:hover{
  background:#8A6BAD !important;
  transform:translate(2px,2px);
  box-shadow:2px 2px 0 #111;
}
button.secondary,.secondary{
  background:var(--panel) !important;
  color:var(--text) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:14px !important;
  box-shadow:var(--shadow-sm);
  font-weight:800 !important;
}
button.secondary:hover,.secondary:hover{
  background:var(--mint) !important;
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 #111;
}
.text-btn{color:var(--accent) !important;font-weight:800}

/* Cards with offset shadow */
.stat-card,.analytics-card,.upload-card,.url-card,.feature-card,.process-card,
.clip-card,.project-table,.info-grid>div,.help-card,.setting-section,
.acc-item,.sub-card,.sub-row,.chart-box,.chart-placeholder,.faq,
.clip-count-row,.sub-style-card,.fs-card,.fs-job,.hero-card,.floating-card,
.auth-card,.modal-box,.backup-box,.youtube-preview-card,.clip-studio,
.clip-details{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:var(--radius) !important;
  box-shadow:var(--shadow);
}
.hero-card{
  background:
    radial-gradient(circle at 85% 30%,rgba(155,126,189,.25),transparent 40%),
    radial-gradient(circle at 15% 70%,rgba(126,184,218,.2),transparent 35%),
    var(--panel) !important;
  border-radius:var(--radius-lg) !important;
}
.pill{
  background:var(--cream) !important;
  border:var(--border-w) solid var(--border) !important;
  color:var(--accent) !important;
  border-radius:999px !important;
  box-shadow:2px 2px 0 #111;
  font-weight:900;
}
.floating-card{
  box-shadow:var(--shadow) !important;
  background:var(--mint) !important;
}
.status{
  border:2px solid var(--border);
  border-radius:10px !important;
  font-weight:900;
  background:var(--cream) !important;
  color:var(--text) !important;
}
.status.done{background:var(--mint) !important;color:#0a4 !important}
.status.processing{background:#E8D4F8 !important;color:var(--accent) !important}
.status.error{background:#F8D0D6 !important;color:var(--danger) !important}
.status.cancelled{background:#F8D0D6 !important;color:var(--danger) !important}

/* Inputs */
.input{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:12px !important;
  color:var(--text) !important;
  font-weight:700;
  box-shadow:2px 2px 0 rgba(17,17,17,.15);
}
.input:focus{
  border-color:var(--accent) !important;
  outline:none;
  box-shadow:3px 3px 0 var(--accent);
}

/* Dropdowns */
.dropdown-panel{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:var(--radius-sm) !important;
  box-shadow:var(--shadow) !important;
}
.dropdown-item{color:var(--text) !important;font-weight:700;border-radius:10px}
.dropdown-item:hover{background:var(--mint) !important}
.dropdown-item.active{background:var(--accent) !important;color:#fff !important}
.dropdown-item.danger{color:var(--danger) !important}
.dropdown-sep{background:var(--border) !important}

/* Auth */
.auth-shell{
  background:
    radial-gradient(circle at 20% 20%,rgba(155,126,189,.35),transparent 45%),
    radial-gradient(circle at 80% 80%,rgba(143,212,184,.3),transparent 40%),
    var(--bg) !important;
}
.auth-card{box-shadow:6px 6px 0 #111 !important}
.auth-tabs{
  background:var(--cream) !important;
  border:var(--border-w) solid var(--border) !important;
}
.auth-tab{color:var(--muted) !important;font-weight:800}
.auth-tab.active{
  background:var(--accent) !important;
  color:#fff !important;
  border:2px solid var(--border);
  box-shadow:2px 2px 0 #111;
}

/* Progress */
.progress-track{
  background:#D8E8E0 !important;
  border:2px solid var(--border);
  border-radius:999px;
}
.progress-fill{
  background:linear-gradient(90deg,var(--accent),var(--accent2)) !important;
  border-radius:999px;
}
.progress-pct{color:var(--accent) !important}

/* Toast */
.toast{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  color:var(--text) !important;
  box-shadow:var(--shadow);
  font-weight:800;
}

/* Modal */
.modal-backdrop{background:rgba(17,17,17,.45)}
.modal-box{box-shadow:6px 6px 0 #111 !important}

/* Switch */
.switch span{
  background:#C8D0D8 !important;
  border:2px solid var(--border);
}
.switch span:after{background:#fff;border:2px solid var(--border);box-sizing:border-box}
.switch input:checked+span{background:var(--mint) !important}
.switch input:checked+span:after{background:var(--panel)}

/* Editor */
.ed-shell{
  background:var(--bg) !important;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.ed-head{
  background:var(--cream) !important;
  border-bottom:var(--border-w) solid var(--border) !important;
}
.ed-export{
  background:var(--accent) !important;
  color:#fff !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:12px !important;
  box-shadow:var(--shadow-sm);
  font-weight:900 !important;
  padding:10px 14px !important;
}
.ed-export:hover{
  transform:translate(1px,1px);
  box-shadow:2px 2px 0 #111;
}
.ed-export:disabled{opacity:.65}
.ed-tbtn{color:var(--text) !important}
.ed-panels{background:var(--panel) !important}
.ed-tabs{
  background:var(--cream) !important;
  border-top:var(--border-w) solid var(--border);
}
.ed-tabs button{
  font-weight:800;
  color:var(--muted);
  border-radius:10px;
}
.ed-tabs button.active{
  background:var(--accent) !important;
  color:#fff !important;
  border:2px solid var(--border);
  box-shadow:2px 2px 0 #111;
}
.ed-status a,
.clip-actions a,
.fs-actions a,
.fs-links a,
a[download]{
  color:inherit;
  text-decoration:none;
}
.ed-status a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-left:6px;
  padding:6px 12px;
  background:var(--mint);
  border:var(--border-w) solid var(--border);
  border-radius:10px;
  box-shadow:var(--shadow-sm);
  font-weight:900;
  color:#111 !important;
}
.ed-status a:hover{background:var(--accent2)}

/* Clip tabs */
.clip-tab{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  border-radius:12px !important;
  box-shadow:var(--shadow-sm);
  font-weight:900;
  color:var(--text) !important;
}
.clip-tab:hover{background:var(--mint) !important}
.clip-tab.active{
  background:var(--accent) !important;
  color:#fff !important;
  border-color:var(--border) !important;
}

/* Steps / pipeline */
.steps div,.pipeline-steps > div{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  box-shadow:var(--shadow-sm);
}
.pipeline-steps > div.active{
  background:#E8D4F8 !important;
  border-color:var(--border) !important;
  opacity:1;
}
.pipeline-steps > div.done{
  background:var(--mint) !important;
  opacity:1;
}

/* Settings accordion */
.acc-head{font-weight:900 !important;color:var(--text) !important}
.setting-tab{
  color:var(--muted) !important;
  font-weight:800;
  border-radius:10px;
}
.setting-tab:hover,.setting-tab.active{
  background:var(--accent) !important;
  color:#fff !important;
  border:2px solid var(--border);
  box-shadow:2px 2px 0 #111;
}
.settings-nav{
  background:var(--panel) !important;
  border:var(--border-w) solid var(--border) !important;
  box-shadow:var(--shadow-sm);
}

/* Upload icon boxes */
.upload-icon,.mini-icon,.feature-icon{
  background:var(--cream) !important;
  border:var(--border-w) solid var(--border);
  box-shadow:var(--shadow-sm);
  color:var(--accent) !important;
}

/* Light mode = same pastel (no dark flip) */
body.light-mode{
  --bg:#F5F0E6;--panel:#FFFAF5;--panel2:#E8F4F0;--border:#111;--text:#111;--muted:#5C5C6E
}
body.light-mode .sidebar{background:var(--cream) !important}
body.light-mode .topbar{background:rgba(245,240,230,.94) !important}
body.light-mode .ed-shell,
body.light-mode .ed-panels,
body.light-mode .tl-name{background:var(--bg) !important}
body.light-mode .ed-transport,
body.light-mode .ed-tabs,
body.light-mode .ed-clip,
body.light-mode .ed-auto,
body.light-mode .ed-presets button,
body.light-mode .ed-layouts button,
body.light-mode .ed-seg button{background:var(--panel) !important;color:var(--text) !important}
body.light-mode .ed-project,
body.light-mode .ed-panel .input{background:var(--panel) !important;color:var(--text) !important;border-color:var(--border) !important}
body.light-mode .ed-tbtn,
body.light-mode .ed-tabs button.active,
body.light-mode .ed-plus,
body.light-mode .ed-zoom button{color:var(--text) !important}

/* Mobile menu btn */
.mobile-menu{color:var(--text) !important;font-weight:900;font-size:22px}

/* Ensure download / export links always clickable */
a[download],
.ed-status a,
.clip-actions a,
.fs-actions a,
.fs-links a,
.editor-srt-link,
#downloadSrtBtn,
#downloadBackupBtn{
  pointer-events:auto !important;
  cursor:pointer !important;
  position:relative;
  z-index:2;
}

/* Page headings */
.eyebrow{color:var(--accent) !important;font-weight:900}
h1{font-weight:900;letter-spacing:-0.5px}
.section-title h2{font-weight:900}

/* Project rows */
.project-row{border-bottom:var(--border-w) solid var(--border) !important}
.project-row:hover{background:var(--panel2)}

/* Sub cards left accent */
.sub-card{border-left:5px solid var(--accent) !important}
.sub-card.accent-b{border-left-color:var(--green) !important}
.sub-card.accent-c{border-left-color:#E8A05A !important}

/* Storage bar */
.storage-bar{background:#D0D8E0 !important;border:2px solid var(--border)}
.storage-bar span{background:var(--accent) !important}

/* API key box */
.api-key code{
  background:var(--cream) !important;
  border:var(--border-w) solid var(--border) !important;
  color:var(--muted) !important;
}

/* Clip video */
.clip-video,.fs-video,.process-source-video{
  border:var(--border-w) solid var(--border) !important;
  border-radius:var(--radius) !important;
}

/* Fix any remaining pure white text on light bg from earlier replace */
.nav-item.active,
.auth-tab.active,
.clip-tab.active,
.setting-tab.active,
.ed-tabs button.active,
button.primary,.primary,
.ed-export,
.dropdown-item.active{
  color:#ffffff !important;
}

/* Cancel / danger secondary */
.cancel-btn,.fs-actions .danger{
  color:var(--danger) !important;
  border-color:var(--border) !important;
  background:var(--panel) !important;
}

/* Empty states */
.empty{color:var(--muted) !important}
.empty div{color:var(--muted) !important}
.empty b{color:var(--text) !important}


/* ============================================================
   SHINE HUB components (additive — does not override core)
   ============================================================ */
.sidebar nav{
  flex:1;
  overflow-y:auto;
  overflow-x:hidden;
  min-height:0;
  padding-bottom:8px;
  scrollbar-width:thin;
}
.sidebar{
  overflow:hidden;
}
.shine-card{
  background:var(--panel);
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:12px;
  max-width:720px;
}
.shine-card input[type="text"],
.shine-card input[type="url"],
.shine-card input[type="email"],
.shine-card input[type="file"],
.shine-card textarea,
.shine-card select{
  width:100%;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  background:var(--cream);
  color:var(--text);
  font-weight:700;
}
.shine-card textarea{resize:vertical;min-height:80px}
.shine-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.shine-row select{flex:1;min-width:120px}
.shine-actions{display:flex;gap:8px;flex-wrap:wrap}
.shine-result{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--panel2);
  padding:14px;
  font-size:13px;
  word-break:break-word;
  white-space:pre-wrap;
  min-height:24px;
}
.shine-center{text-align:center}
.shine-center img{max-width:100%;height:auto;border-radius:12px;border:var(--border-w) solid var(--border)}
.shine-chat-log{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  background:#fff;
  min-height:220px;
  max-height:420px;
  overflow:auto;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.shine-bubble{
  max-width:90%;
  padding:10px 12px;
  border-radius:12px;
  border:var(--border-w) solid var(--border);
  font-size:13px;
  white-space:pre-wrap;
  word-break:break-word;
}
.shine-bubble.user{align-self:flex-end;background:var(--accent2);color:#111}
.shine-bubble.assistant{align-self:flex-start;background:var(--panel2)}
.shine-code-preview{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  background:#1a1a2e;
  color:#eaeaea;
  padding:12px;
  max-height:220px;
  overflow:auto;
  font-size:12px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  white-space:pre-wrap;
}
.shine-hr{border:0;border-top:var(--border-w) solid var(--border);margin:8px 0}
.shine-tabs{display:flex;gap:6px;flex-wrap:wrap}
.shine-tabs button{
  border:var(--border-w) solid var(--border);
  background:var(--cream);
  border-radius:999px;
  padding:6px 12px;
  font-weight:800;
  font-size:12px;
}
.shine-tabs button.active{background:var(--accent);color:#fff}
.shine-news-list{display:flex;flex-direction:column;gap:10px}
.shine-news-item{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  background:var(--panel);
  box-shadow:var(--shadow-sm);
}
.shine-news-item a{color:var(--text);text-decoration:none;font-weight:800}
.shine-news-item a:hover{text-decoration:underline}
.shine-news-meta{font-size:11px;color:var(--muted);margin-top:4px}
.shine-mail-list{display:flex;flex-direction:column;gap:8px}
.shine-mail-item{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  background:var(--cream);
  cursor:pointer;
  text-align:left;
  width:100%;
}
.shine-mail-item:hover{background:var(--panel2)}
.shine-success{
  background:#d8f5e5;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  font-weight:800;
}
.shine-nft-box{
  background:var(--panel);
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  white-space:normal;
}
.shine-nft-ok{
  background:#d8f5e5;
  color:#0a7a3e;
  font-weight:900;
  padding:10px 14px;
  border-radius:var(--radius-sm);
  border:var(--border-w) solid #0a7a3e33;
  display:inline-block;
  width:fit-content;
}
.shine-nft-err{
  background:#ffe5e8;
  color:#b4232c;
  font-weight:800;
}
.shine-nft-meta{font-size:12px;color:var(--muted)}
.shine-nft-section{
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px;
  background:var(--cream);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.shine-nft-label{font-weight:800;font-size:13px}
.shine-nft-code{
  display:block;
  font-size:11px;
  word-break:break-all;
  white-space:pre-wrap;
  background:var(--panel2);
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--border);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.shine-nft-actions,.shine-nft-link-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.shine-btn-copy{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:var(--border-w) solid var(--border);
  background:var(--accent2,#c4b5fd);
  color:#111;
  border-radius:999px;
  padding:6px 14px;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  text-decoration:none;
}
.shine-btn-copy:hover{filter:brightness(0.95)}
.shine-mail-html{
  background:#fff;
  border:var(--border-w) solid var(--border);
  border-radius:var(--radius-sm);
  padding:14px;
  white-space:normal;
  overflow:auto;
  max-height:420px;
  font-size:13px;
  line-height:1.5;
}
.shine-mail-html a,
.shine-mail-link-blue{
  color:#3b82f6 !important;
  text-decoration:underline !important;
  font-weight:600;
  word-break:break-all;
}
.shine-mail-plain{
  white-space:pre-wrap;
  word-break:break-word;
  font-family:inherit;
  margin:0;
  font-size:13px;
  line-height:1.5;
}
.shine-mail-links{margin-top:8px;font-size:13px}
.shine-mail-body{white-space:normal}
.shine-result.shine-mail-body{white-space:normal}
@media(max-width:760px){
  .shine-card{padding:16px;max-width:100%}
  .shine-actions{flex-direction:column}
  .shine-actions button{width:100%}
}

/* Telegram Bot Control Panel */
.bot-control-card{position:relative}
.bot-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.bot-panel-head h2{margin:0 0 5px}
.bot-panel-head p{margin:0}
.bot-badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;font-weight:800;font-size:12px;background:var(--panel2);border:1px solid var(--border)}
.bot-badge.online{background:#dff8ec;color:#0a9b63;border-color:#8de0bc}
.bot-badge.offline{background:#fff0f0;color:#d33b3b;border-color:#f0a3a3}
.field-help{display:block;color:var(--muted);font-size:12px;margin:-5px 0 14px}
.bot-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bot-provider-box{margin:20px 0;padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--panel2)}
.bot-provider-box h3{margin:0 0 14px;font-size:15px}
.bot-info{padding:12px 14px;border-radius:12px;background:#eef3ff;border:1px solid #d5defc;color:#43506c;margin-bottom:14px}
.bot-status-box{padding:18px;border-radius:14px;background:var(--panel2);border:1px solid var(--border);font-weight:700;margin-bottom:14px}
.bot-status-box.online{background:#e8fbf2;border-color:#9ae4c3;color:#0a9b63}
.bot-status-box.offline{background:#fff2f2;border-color:#efb2b2;color:#c33b3b}
.bot-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.bot-start{background:#12b981}
.danger-btn{border:0;border-radius:10px;padding:12px 16px;font-weight:800;cursor:pointer;background:#ef4444;color:white}
.bot-log-details{margin-top:18px}
.bot-log-details summary{cursor:pointer;font-weight:700}
#telegramBotLog{max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;background:#10131a;color:#dce3f2;border-radius:12px;padding:14px;margin-top:10px;font-size:11px;line-height:1.5}
@media (max-width:700px){.bot-grid-2,.bot-actions{grid-template-columns:1fr}.bot-panel-head{flex-direction:column}.bot-badge{align-self:flex-start}}
