:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #667085;
  --line: #d7dde5;
  --panel: #ffffff;
  --canvas: #f2f5f8;
  --blue: #1f6fbf;
  --green: #14855f;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

.shell {
  width: min(1040px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand img {
  width: 48px;
  height: 48px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
}

.badge {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  white-space: nowrap;
}

.badge-ok {
  border-color: rgba(20, 133, 95, 0.35);
  color: var(--green);
}

.badge-muted {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.auth-panel {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
}

.session-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

label,
legend {
  font-size: 13px;
  font-weight: 600;
}

input[type="email"] {
  min-width: 260px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

button,
.primary-button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 16px;
  min-width: 0;
}

.dropzone {
  min-height: 190px;
  border: 2px dashed #a9b6c8;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  padding: 24px;
}

.dropzone.is-dragging {
  border-color: var(--blue);
  background: #edf5ff;
}

.drop-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.drop-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.dropzone input {
  display: none;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.status-panel {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e7edf5;
  overflow: hidden;
  margin-bottom: 10px;
}

#progressBar {
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 160ms ease;
}

.error-text {
  color: var(--red);
  font-weight: 700;
}

.is-disabled {
  opacity: 0.72;
}

@media (max-width: 720px) {
  .topbar,
  .actions,
  .session-form {
    align-items: stretch;
    flex-direction: column;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  fieldset {
    flex-direction: column;
  }

  .badge {
    white-space: normal;
  }
}

