:root{
  --accent:#6C5CE7;
  --accent-dk:#5847D6;
  --accent-lt:#EEECFD;
  --ink:#1A1A1A;
  --sub:#8A8F98;
  --line:#ECECEE;
  --bg:#F4F4F5;
  --green:#2F9E58;
  --red:#D64545;
  --red-lt:#FBEAEA;
  --nav:#6741D9;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}
*{box-sizing:border-box;}
body{
  margin:0; min-height:100vh; background:var(--bg); color:var(--ink);
  font-family:var(--sans); padding:60px 20px;
}

.card{
  max-width:720px; margin:0 auto; background:#fff; border-radius:20px;
  box-shadow:0 1px 3px rgba(0,0,0,.04), 0 10px 30px rgba(20,20,30,.06);
  padding:40px 44px 34px;
}
.card.wide{max-width:860px;}

.back-link{
  display:inline-flex; align-items:center; gap:5px;
  font-size:13.5px; font-weight:600; color:var(--nav);
  text-decoration:none; margin-bottom:22px;
}
.back-link:hover{text-decoration:underline;}

.head{display:flex; align-items:center; gap:16px; margin-bottom:24px;}
.tool-logo{
  width:42px; height:42px; flex:none; border-radius:12px;
  background:var(--accent-lt); display:flex; align-items:center; justify-content:center;
}
.tool-logo svg{width:22px;height:22px;}
.head h1{font-size:26px; font-weight:800; margin:0; letter-spacing:-0.01em;}

.subtitle{
  margin:0 0 24px 58px;
  color:var(--sub);
  font-size:13.5px;
}

form{display:flex; gap:10px;}
input[type=text]{
  flex:1; min-width:0; height:52px; padding:0 16px; border:1px solid var(--line);
  border-radius:12px; font-size:14.5px; color:var(--ink); font-family:var(--sans);
  background:#FAFAFA; transition:border-color .15s;
}
input[type=text]:focus{outline:none; border-color:var(--accent);}

button{
  flex:none; height:52px; padding:0 26px; border:none; border-radius:12px;
  background:var(--accent); color:#fff; font-size:14.5px; font-weight:700;
  cursor:pointer; display:flex; align-items:center; gap:9px;
  font-family:var(--sans); transition:background .15s;
}
button:hover{background:var(--accent-dk);}
button:disabled{background:#c7ccd6; cursor:not-allowed;}

button.cancel{
  background:#1B1F27; border:1.5px solid #E8952C; color:#E8952C;
  text-transform:uppercase; letter-spacing:.04em; font-weight:800;
}
button.cancel:hover{background:#252A35;}
button.cancel:disabled{background:#1B1F27; color:#a9793a; border-color:#a9793a; opacity:.7;}

.loader{
  display:none; width:15px; height:15px; border-radius:50%;
  border:2px solid rgba(255,255,255,.45); border-top-color:#fff;
  animation:spin .8s linear infinite;
}
button.cancel .loader{
  border-color:rgba(232,149,44,.35); border-top-color:#E8952C;
}

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

.progress-container{
  display:none; align-items:center; gap:14px; margin-top:22px;
}
.progress-track{
  flex:1; height:8px; background:var(--line); border-radius:20px; overflow:hidden;
}
.progress-fill{
  height:100%; width:0%; background:var(--accent); border-radius:20px; transition:width .3s;
}
.progress-text{
  font-size:13px; color:var(--sub); white-space:nowrap; font-variant-numeric:tabular-nums;
}

.summary{
  display:flex; gap:14px; margin:6px 0 26px;
}
.summary-box{
  flex:1; background:var(--accent-lt); border-radius:12px; padding:18px; text-align:center;
}
.summary-number{
  display:block; font-size:26px; font-weight:800; color:var(--accent-dk);
}
.summary-label{
  display:block; font-size:12.5px; color:var(--sub); margin-top:4px;
}

.footrow{
  display:flex; justify-content:space-between; align-items:center;
  margin-top:4px; margin-bottom:20px; gap:18px; flex-wrap:wrap;
}
.footrow-links{display:flex; gap:18px;}
.footrow a.nav{
  font-size:13.5px; font-weight:700; color:var(--nav); text-decoration:none;
}
.footrow a.nav:hover{text-decoration:underline;}

.download-btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:11px 20px;
  background:var(--green);
  color:#fff;
  border-radius:10px;
  text-decoration:none;
  font-size:13.5px;
  font-weight:700;
}
.download-btn:hover{background:#278a4b;}

table{
  width:100%; margin-top:6px; border-collapse:collapse; table-layout:fixed;
  font-size:13.5px; border:1px solid var(--line); border-radius:12px; overflow:hidden;
}
th, td{
  border-bottom:1px solid var(--line); padding:12px 14px; text-align:left; overflow-wrap:anywhere;
}
tr:last-child td{border-bottom:none;}
th{
  background:var(--accent-lt); color:var(--accent-dk); font-weight:700; font-size:12.5px;
  text-transform:uppercase; letter-spacing:.03em;
}
td a{color:var(--accent-dk); font-weight:600; text-decoration:none;}
td a:hover{text-decoration:underline;}

.error-box{
  margin-top:22px; padding:14px 16px; border-radius:10px;
  background:var(--red-lt); color:var(--red); font-size:13.5px;
}

.stopped-banner{
  margin:6px 0 26px; padding:16px 18px; border-radius:12px;
  background:#FCF3E3; color:#C98A1F; font-weight:700; font-size:14.5px;
}

@media (max-width:600px){
  body{ padding:28px 14px; }
  .card{ padding:26px 20px 22px; border-radius:16px; }
  .head{ gap:12px; }
  .head h1{ font-size:20px; }
  .tool-logo{ width:36px; height:36px; }
  .tool-logo svg{ width:19px; height:19px; }
  .subtitle{ margin-left:48px; }
  form{ flex-direction:column; }
  button{ width:100%; justify-content:center; }
  .summary{ flex-wrap:wrap; }
  .summary-box{ flex:1 1 45%; }
  th, td{ padding:10px; }
  .footrow{ flex-wrap:wrap; }
  .download-btn{ width:100%; justify-content:center; }
}
