:root {
  color-scheme: light;
  --ink: #101827;
  --muted: #617084;
  --faint: #8a97a8;
  --border: #dbe3ee;
  --panel: #ffffff;
  --canvas: #f5f8fb;
  --blue: #1769e8;
  --blue-strong: #0f55c7;
  --teal: #18c9c4;
  --green: #168a3a;
  --amber: #b66d05;
  --navy: #061b2a;
  --shadow: 0 18px 42px rgba(20, 31, 46, 0.12);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(6, 27, 42, 0.04), transparent 38%),
    var(--canvas);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(420px, 620px);
  align-items: center;
  justify-content: center;
  gap: 44px;
  width: min(1180px, calc(100vw - 48px));
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: 44px 0 18px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-size: 24px;
  font-weight: 760;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #052132;
  background: linear-gradient(135deg, #14e2db, #20c8f7);
  border-radius: 8px;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.login-copy {
  display: grid;
  gap: 10px;
}

.login-copy h1 {
  margin: 0;
  max-width: 460px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.04;
  font-weight: 760;
}

.login-copy p {
  margin: 0;
  max-width: 430px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef3f8;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
}

.auth-switch button {
  min-height: 36px;
  color: #526173;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 760;
}

.auth-switch button.is-active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-form {
  display: grid;
  gap: 15px;
}

.signup-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.signup-fields[hidden] {
  display: none;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row span {
  color: #263242;
  font-size: 13px;
  font-weight: 720;
}

.form-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  outline: none;
}

.form-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.13);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 4px;
  color: #ffffff;
  background: linear-gradient(180deg, #2478ef, var(--blue-strong));
  border: 1px solid #0f55c7;
  border-radius: 6px;
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(23, 105, 232, 0.22);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.form-status {
  min-height: 20px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 680;
}

.form-status.success {
  color: var(--green);
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #435063;
  background: #f5f8fc;
  border: 1px solid #e0e7f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.workspace-panel {
  display: grid;
  gap: 18px;
  min-height: 560px;
  padding: 22px;
  color: #d7e8f4;
  background:
    linear-gradient(180deg, rgba(24, 201, 196, 0.13), transparent 36%),
    linear-gradient(180deg, var(--navy), #031421);
  border: 1px solid #0b2a3f;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.preview-header span,
.preview-header strong {
  overflow-wrap: anywhere;
}

.preview-header span {
  color: #91a9bb;
  font-size: 12px;
  font-weight: 700;
}

.preview-header strong {
  color: #ffffff;
  font-size: 15px;
}

.queue-preview {
  display: grid;
  gap: 10px;
}

.queue-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
}

.queue-row.is-active {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(24, 201, 196, 0.6);
}

.file-type {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ef4444;
  background: #fff1f0;
  border: 1px solid #ffd4d0;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}

.file-type.image {
  color: #168a3a;
  background: #e8f7ee;
  border-color: #bce6ca;
}

.queue-row div {
  min-width: 0;
}

.queue-row strong,
.queue-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-row strong {
  color: #ffffff;
  font-size: 14px;
}

.queue-row small {
  margin-top: 3px;
  color: #a8bdcd;
  font-size: 12px;
}

.queue-row em {
  justify-self: end;
  padding: 4px 8px;
  color: #ffb851;
  background: rgba(255, 184, 81, 0.12);
  border: 1px solid rgba(255, 184, 81, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.processing-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: end;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
}

.processing-strip > span {
  width: 10px;
  height: 10px;
  background: #20c970;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(32, 201, 112, 0.14);
}

.processing-strip strong,
.processing-strip small {
  display: block;
}

.processing-strip strong {
  color: #ffffff;
  font-size: 14px;
}

.processing-strip small {
  margin-top: 2px;
  color: #a8bdcd;
  font-size: 12px;
}

.login-footer {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 0 0 24px;
}

.login-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-footer a {
  color: var(--muted);
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: minmax(0, 520px);
    gap: 18px;
    width: min(560px, calc(100vw - 28px));
    padding-top: 24px;
  }

  .workspace-panel {
    min-height: 0;
  }

  .login-panel {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .login-shell,
  .login-footer {
    width: calc(100vw - 20px);
  }

  .signup-fields {
    grid-template-columns: 1fr;
  }

  .queue-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .queue-row em {
    grid-column: 2;
    justify-self: start;
  }
}
