:root{
  --bg:#07111f;
  --panel:rgba(10, 18, 33, .78);
  --panel-strong:rgba(15, 24, 44, .92);
  --text:#f4f7fb;
  --muted:#a7b4ca;
  --line:rgba(255,255,255,.10);
  --line-strong:rgba(255,255,255,.16);
  --accent:#ffb347;
  --accent-2:#5fe3c0;
  --accent-3:#7b91ff;
  --danger:#ff6f6f;
  --shadow:0 24px 80px rgba(0,0,0,.34);
  --shadow-soft:0 16px 40px rgba(0,0,0,.24);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:"IBM Plex Sans","Trebuchet MS",system-ui,sans-serif;
  background:
    radial-gradient(circle at 14% 14%, rgba(95,227,192,.14), transparent 22%),
    radial-gradient(circle at 82% 10%, rgba(123,145,255,.15), transparent 24%),
    radial-gradient(circle at 74% 82%, rgba(255,179,71,.14), transparent 20%),
    linear-gradient(150deg, #050912 0%, #091225 36%, #0b1730 100%);
}
button, input{font:inherit}
button{
  border:0;
  border-radius:16px;
  padding:13px 16px;
  cursor:pointer;
  background:linear-gradient(135deg, var(--accent), #ff9365);
  color:#231507;
  font-weight:700;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow:0 8px 24px rgba(255,147,101,.18);
}
button:hover{transform:translateY(-1px)}
button:disabled{opacity:.55; cursor:not-allowed; transform:none}
button.ghost{
  background:rgba(255,255,255,.06);
  color:var(--text);
  border:1px solid var(--line);
  box-shadow:none;
}
button.small{
  padding:9px 12px;
  border-radius:12px;
  font-size:13px;
}
button.loading{
  position:relative;
  pointer-events:none;
  opacity:.82;
}
.backdrop{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.25;
  background-image:linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:36px 36px;
  mask-image:radial-gradient(circle at 50% 22%, black 18%, transparent 74%);
}
.shell{
  width:min(1280px, calc(100vw - 32px));
  margin:0 auto;
  padding:34px 0 58px;
}
.hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px;
}
.hero-copy{max-width:780px}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid var(--line);
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:12px;
}
h1{
  margin:12px 0 10px;
  font-size:clamp(40px, 6vw, 78px);
  line-height:.92;
  letter-spacing:-.04em;
}
h2,h3{margin:0}
p{
  margin:0;
  color:var(--muted);
  line-height:1.58;
}
.hero-stats{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.stat-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.stat-chip.accent{
  color:#eaf8f4;
  border-color:rgba(95,227,192,.28);
  background:rgba(95,227,192,.08);
}
.token-hint{
  min-width:280px;
  padding:16px 18px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  backdrop-filter:blur(16px);
}
.token-hint span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}
.token-hint code{
  word-break:break-all;
  color:#ffe0a3;
}
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}
.auth-card,.result-card,.task-card,.op-card{
  padding:22px;
}
.auth-card{
  max-width:640px;
}
.card-title,
.op-head,
.toolbar,
.result-head,
.task-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.card-title{
  margin-bottom:14px;
}
.card-title p,
.result-subtitle,
.task-summary{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}
.card-badge,
.op-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  white-space:nowrap;
}
.op-tag{
  margin-top:1px;
}
.op-tag.muted{
  color:#dbe3f4;
}
.row,
.op-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.row{margin-top:14px}
input[type="password"]{
  flex:1;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
  min-width:0;
}
input[type="password"]:focus{border-color:rgba(255,179,71,.55)}
.workspace{
  display:grid;
  grid-template-columns:minmax(0, 1.45fr) minmax(320px, .95fr);
  gap:16px;
  align-items:start;
  margin:18px 0;
}
.stack{
  display:grid;
  gap:16px;
}
.op-card{
  background:var(--panel-strong);
}
.op-card h3{
  font-size:19px;
  margin-bottom:8px;
}
.op-card p{
  font-size:14px;
}
.file-drop{
  position:relative;
  display:block;
  margin-top:16px;
  padding:18px;
  border-radius:22px;
  border:1px dashed rgba(255,255,255,.16);
  background:rgba(255,255,255,.035);
  cursor:pointer;
  overflow:hidden;
  transition:border-color .15s ease, background .15s ease, transform .15s ease;
}
.file-drop:hover{
  border-color:rgba(95,227,192,.35);
  background:rgba(95,227,192,.06);
  transform:translateY(-1px);
}
.file-drop input[type="file"]{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.drop-copy{
  display:flex;
  flex-direction:column;
  gap:5px;
}
.drop-copy strong{
  font-size:15px;
}
.drop-copy span{
  color:var(--muted);
  font-size:13px;
}
.file-name{
  display:block;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  color:#e9eef9;
  font-size:13px;
  word-break:break-all;
}
.upload-meter{
  margin-top:12px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.upload-progress{
  height:9px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.05);
}
.upload-progress > span{
  display:block;
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition:width .18s ease;
}
.upload-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}
.resume-hint{
  margin-top:10px;
  color:#d9e6ff;
  font-size:13px;
  line-height:1.5;
}
.resume-panel{
  margin-top:10px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
}
.resume-panel .resume-hint{
  margin-top:0;
}
.resume-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.check{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:14px;
}
.check input{accent-color:var(--accent)}
.op-row{
  justify-content:space-between;
  margin-top:14px;
}
.op-hint{
  color:var(--muted);
  font-size:13px;
}
.toolbar{
  margin-bottom:12px;
  padding:2px 2px 6px;
}
.toolbar-left{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.session-state{
  color:var(--accent-2);
  font-weight:700;
}
.storage-state{
  color:var(--muted);
  font-size:13px;
}
.toolbar-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.msg{
  margin-top:10px;
  min-height:22px;
  color:var(--muted);
}
.msg.error{
  color:var(--danger);
}
.hidden{display:none}
.task-card{
  position:sticky;
  top:18px;
}
.task-list{
  display:grid;
  gap:12px;
  max-height:calc(100vh - 220px);
  overflow:auto;
  padding-right:2px;
}
.task-list::-webkit-scrollbar,
pre::-webkit-scrollbar{
  width:8px;
}
.task-list::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
}
.task-empty{
  padding:18px;
  border-radius:18px;
  border:1px dashed var(--line);
  color:var(--muted);
  background:rgba(255,255,255,.03);
}
.task-item{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
}
.task-item.active{
  border-color:rgba(95,227,192,.32);
  box-shadow:inset 0 0 0 1px rgba(95,227,192,.08);
}
.task-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:10px;
}
.task-name{
  font-weight:700;
  word-break:break-word;
}
.task-meta{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}
.task-pills{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
}
.pill.running{color:#9ef0de; border-color:rgba(95,227,192,.35)}
.pill.completed{color:#ffe0a3; border-color:rgba(255,179,71,.35)}
.pill.failed{color:#ff9c9c; border-color:rgba(255,111,111,.35)}
.pill.queued{color:#d6deee}
.task-progress{
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.05);
}
.task-progress > span{
  display:block;
  height:100%;
  background:linear-gradient(90deg, var(--accent-2), var(--accent-3), var(--accent));
  border-radius:999px;
  transition:width .25s ease;
}
.task-note{
  margin-top:10px;
  color:#e9eef9;
  font-size:14px;
  line-height:1.5;
}
.task-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:12px;
}
.result-card{margin-top:4px}
.result-head{
  margin-bottom:12px;
}
.result-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
pre{
  margin:0;
  min-height:220px;
  max-height:420px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  color:#e9eef9;
  background:rgba(255,255,255,.03);
  padding:16px;
  border-radius:18px;
  border:1px solid var(--line);
}
pre.error{
  color:var(--danger);
  border-color:rgba(255,111,111,.35);
}
@media (max-width: 1120px){
  .workspace{
    grid-template-columns:1fr;
  }
  .task-card{
    position:static;
  }
  .task-list{
    max-height:none;
  }
}
@media (max-width: 880px){
  .hero,
  .row,
  .op-row,
  .toolbar,
  .task-head,
  .task-top,
  .result-head{
    flex-direction:column;
    align-items:stretch;
  }
  .shell{
    width:min(100vw - 20px, 1280px);
    padding:22px 0 44px;
  }
  .hero{
    align-items:flex-start;
  }
  .token-hint{
    min-width:unset;
    width:100%;
  }
  .toolbar-actions,
  .task-pills,
  .task-actions,
  .result-actions{
    justify-content:flex-start;
  }
}
