/* ====== Base ====== */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f3f5fa;
  --text:#0f1222;
  --muted:#6b7280;
  --line:#e7eaf3;
  --brand1:#246BFD;
  --brand2:#1FB8A6;
  --shadow: 0 8px 26px rgba(17,20,40,.08);
  --shadow-2: 0 14px 40px rgba(17,20,40,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body.ui{
  margin:0; background:var(--bg); color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

.container{max-width:980px; margin:0 auto; padding:0 20px}

/* ====== Topbar ====== */
.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(255,255,255,.85); backdrop-filter:saturate(140%) blur(6px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0}
.brand{display:flex; align-items:center; gap:12px}
.brand__mark{
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:10px; background:linear-gradient(135deg, rgba(36,107,253,.12), rgba(31,184,166,.12));
}
.brand__title{font-weight:700; letter-spacing:.2px}
.brand__sub{font-size:12px; color:var(--muted)}
.actions .btn--ghost{padding:10px 14px}

/* ====== Main ====== */
.main{padding:28px 0 40px}

/* ====== Panel/Card ====== */
.panel{
  background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow);
  overflow:hidden; margin-bottom:18px;
}
.panel--shadow:hover{box-shadow:var(--shadow-2)}
.panel__head{padding:18px 22px 8px}
.panel__head h2{margin:0 0 6px 0; font-size:20px; font-weight:700}
.panel__body{padding:18px 22px 22px}
.muted{color:var(--muted)}
.small{font-size:12px}
.tiny{font-size:11.5px}

/* ====== Uploader ====== */
.uploader{
  position:relative; border:1.5px dashed #d6d9e4; border-radius:14px; background:var(--surface-2);
  padding:22px; display:flex; align-items:center; gap:14px; cursor:pointer;
  transition:.2s border-color, .2s background, .2s box-shadow;
}
.uploader:hover{border-color:#c9cfe3; background:#eef2fa}
.uploader:focus-visible{outline:3px solid rgba(36,107,253,.35)}
.uploader input[type=file]{position:absolute; inset:0; opacity:0; cursor:pointer}
.uploader__icon{width:44px; height:44px; display:flex; align-items:center; justify-content:center; color:var(--brand1)}
.uploader__text{flex:1}
.uploader__filename{margin-top:6px; font-size:13px; color:#333}
.link{color:var(--brand1); text-decoration:underline}

/* ====== Buttons ====== */
.btn{
  appearance:none; border:0; border-radius:12px; padding:12px 16px; cursor:pointer; font-weight:600;
}
.btn--primary{
  color:#fff; background:linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow:0 10px 28px rgba(36,107,253,.25);
}
.btn--primary:disabled{opacity:.55; cursor:not-allowed}
.btn--ghost{
  background:#fff; color:#1e2a37; border:1px solid #d6d9e4;
}
.btn--ghost:hover{background:#f9fbff}

/* ====== Form actions ====== */
.form__actions{display:flex; gap:10px; margin-top:16px; flex-wrap:wrap}

/* ====== Progress ====== */
.progress__head{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px}
.progress__title{font-weight:600}
.progress__counter{color:#475569}
.progress__bar{
  height:12px; background:#eef1f7; border-radius:999px; overflow:hidden;
  box-shadow:inset 0 1px 0 rgba(0,0,0,.02); border:1px solid #e9edf6;
}
.progress__bar > span{
  display:block; height:100%; width:0%;
  background:linear-gradient(90deg, var(--brand1), var(--brand2));
  transition:width .35s ease;
}

/* ====== Footer ====== */
.footer{margin-top:42px; border-top:1px solid var(--line); background:#fffcc0000}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; flex-wrap:wrap}

/* ====== Misc ====== */
code{background:#f1f3f8; padding:2px 6px; border-radius:6px; border:1px solid #e8ebf3}
.iframe{display:none;width:0;height:0;border:0}
