@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #16202b;
  --muted: #667383;
  --paper: #eef2f5;
  --white: #fbfcfd;
  --line: #cfd7df;
  --blue: #1769e0;
  --blue-dark: #0b4fad;
  --amber: #e9a11b;
  --graphite: #202b37;
  --success: #19895e;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Manrope, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, .dropzone:has(input:focus-visible) { outline: 3px solid #75aaff; outline-offset: 2px; }
[hidden] { display: none !important; }

.topbar { height: 72px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: var(--graphite); color: white; }
.brand { color: white; text-decoration: none; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 12px; letter-spacing: -.03em; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); align-items: end; gap: 3px; height: 21px; }
.brand-mark i { display: block; width: 5px; background: #67a2ff; border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 10px; }.brand-mark i:nth-child(2) { height: 20px; }.brand-mark i:nth-child(3) { height: 15px; }
.account { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.account strong { color: #ffd16d; }
.text-button { border: 0; background: none; color: #b9c5d2; padding: 6px; }

main { max-width: 1380px; margin: auto; padding: clamp(32px, 6vw, 78px) clamp(20px, 5vw, 72px); }
.welcome { min-height: calc(100vh - 220px); display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 8vw; }
h1 { font-size: clamp(45px, 6.2vw, 92px); line-height: .98; letter-spacing: -.065em; margin: 0 0 28px; max-width: 900px; }
.welcome > div > p { max-width: 600px; color: var(--muted); font-size: 19px; line-height: 1.65; }
.identity-form { padding: 34px; border-left: 4px solid var(--blue); background: var(--white); box-shadow: 0 20px 60px rgba(42,57,72,.09); }
.identity-form label { display: block; font-weight: 700; margin-bottom: 14px; }
.input-row { display: flex; }
input { min-width: 0; border: 1px solid var(--line); background: white; padding: 13px 14px; color: var(--ink); }
.input-row input { flex: 1; border-right: 0; }
.input-row button, .primary, .worker-callout button { color: white; border: 0; background: var(--blue); padding: 13px 20px; font-weight: 700; }
.input-row button:hover, .primary:hover, .worker-callout button:hover { background: var(--blue-dark); }
.identity-form small { display: block; color: var(--muted); margin-top: 13px; }

.network-strip { display: grid; grid-template-columns: repeat(3, 1fr); color: white; background: var(--graphite); margin-bottom: 26px; }
.network-strip > div { min-height: 112px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 12px; padding: 24px 30px; border-right: 1px solid #45515d; }
.network-strip > div:last-child { border: 0; }
.network-strip b { font-size: 31px; line-height: 1; }
.network-strip small { grid-column: 2; color: #b8c4cf; margin-top: 5px; }
.pulse { grid-row: 1 / 3; align-self: center; width: 11px; height: 11px; border-radius: 50%; background: #47d49b; box-shadow: 0 0 0 7px rgba(71,212,155,.13); }
.workspace { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(420px, 1.18fr); gap: 26px; align-items: start; }
.upload-panel, .queue-panel { background: var(--white); padding: clamp(24px, 3vw, 38px); border: 1px solid var(--line); }
h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.035em; }
.upload-panel > p, .section-heading p, .worker-callout p { color: var(--muted); line-height: 1.55; margin: 0 0 24px; }
.dropzone { min-height: 180px; padding: 28px; border: 1px dashed #9eabb8; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: #f6f8fa; cursor: pointer; }
.dropzone:hover { border-color: var(--blue); background: #f2f6fc; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone b { margin: 8px 0 6px; }
.dropzone small { color: var(--muted); }
.drop-icon { color: var(--blue); font-size: 35px; font-weight: 400; line-height: 1; }
.frame-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.frame-fields label { color: var(--muted); font-size: 12px; }
.frame-fields input { width: 100%; margin-top: 6px; }
.cost-line { padding: 15px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; }
.cost-line strong { color: #9a6500; }
.primary { width: 100%; }
.primary:disabled { opacity: .55; cursor: wait; }
.message { min-height: 22px; margin: 14px 0 0 !important; font-size: 13px; }
.message.error { color: #b32a2a; }
.message.success { color: var(--success); }
.section-heading { display: flex; justify-content: space-between; gap: 18px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 20px; }
.projects { display: grid; gap: 12px; }
.empty { color: var(--muted); border-top: 1px solid var(--line); padding: 30px 0; }
.project { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.project-head { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.project-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { color: var(--muted); font-size: 12px; }
.frame-track { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 9px; gap: 2px; margin: 14px 0 8px; }
.frame-track i { background: #dbe1e7; }
.frame-track i.done { background: var(--blue); }
.project-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.results { margin-top: 20px; }
.results-title { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.result-link { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--blue-dark); font-size: 13px; text-decoration: none; }
.result-link:hover { text-decoration: underline; }
.worker-callout { margin-top: 26px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; padding: 30px 38px; background: #dce8f7; border-left: 4px solid var(--blue); }
.worker-callout p { margin-bottom: 0; max-width: 800px; }

@media (max-width: 820px) {
  .welcome, .workspace { grid-template-columns: 1fr; }
  .welcome { align-content: center; }
  .network-strip { grid-template-columns: 1fr; }
  .network-strip > div { min-height: 86px; border-right: 0; border-bottom: 1px solid #45515d; }
  .worker-callout { grid-template-columns: 1fr; gap: 15px; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 18px; }.account { gap: 9px; }.account #userName { display: none; }
  main { padding: 30px 16px; }.input-row { flex-direction: column; gap: 8px; }.input-row input { border-right: 1px solid var(--line); }
  .frame-fields { grid-template-columns: 1fr; }.upload-panel, .queue-panel { padding: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
  .dashboard, .welcome { animation: appear .35s ease-out; }
  @keyframes appear { from { opacity: 0; transform: translateY(8px); } }
}

