/* ------------------------------------------------------------
   Design tokens
------------------------------------------------------------- */
:root {
  --mendix-blue: #0056D6;
  --mendix-blue-dark: #00409e;
  --ink: #1b2430;
  --ink-soft: #5b6472;
  --bg: #f5f6fa;
  --card: #ffffff;
  --border: #e2e5eb;
  --success: #1b8a5a;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.page {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ------------------------------------------------------------
   Hero / instructions
------------------------------------------------------------- */
.hero {
  text-align: center;
}

.spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--mendix-blue);
  background: rgba(0, 86, 214, 0.08);
  border: 1px solid rgba(0, 86, 214, 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.hero .subtitle {
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.steps li {
  counter-increment: step;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--ink);
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--mendix-blue);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

kbd {
  font-family: var(--font-mono);
  background: #eef0f4;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  font-size: 0.82em;
}

/* ------------------------------------------------------------
   Workspace card
------------------------------------------------------------- */
.workspace {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-zone:hover {
  border-color: var(--mendix-blue);
  background: rgba(0, 86, 214, 0.03);
}

.file-button {
  display: inline-block;
  background: var(--mendix-blue);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.file-button:hover {
  background: var(--mendix-blue-dark);
}

.hint-text {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0.9rem 0 0;
}

/* Image editor (Cropper.js host) */
.image-editor {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f1f5;
}

.image-editor img {
  display: block;
  max-width: 100%;
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.controls input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  color: var(--ink);
}

.controls input[type="text"]:focus {
  outline: 2px solid var(--mendix-blue);
  outline-offset: 1px;
}

.fit-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
}

.fit-option .hint-text {
  margin-top: 0;
}

.file-preview {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* Actions */
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--mendix-blue);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background: var(--mendix-blue-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
.file-button:focus-within {
  outline: 2px solid var(--mendix-blue);
  outline-offset: 2px;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .workspace {
    padding: 1.25rem;
  }

  .actions {
    flex-direction: column;
  }
}
