:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --error: #dc2626;
  --success: #16a34a;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.header-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
}

.header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.header p {
  color: var(--text-muted);
  font-size: .875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: .2rem .65rem;
  margin-bottom: 1.25rem;
}

.badge.success {
  background: #f0fdf4;
  color: var(--success);
  border-color: #bbf7d0;
}

.field {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

input[type=text],
input[type=password],
input[type=email] {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
  background: var(--surface);
  color: var(--text);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #dbeafe;
}

.hint {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: var(--text-muted);
  font-size: .9rem;
}

.file-drop:hover {
  border-color: var(--primary);
  background: #f8faff;
}

.file-drop.has-file {
  border-color: var(--success);
  background: #f0fdf4;
  color: var(--success);
}

.btn {
  display: block;
  width: 100%;
  padding: .75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  text-align: center;
  text-decoration: none;
}

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

.btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.status {
  margin-top: 1rem;
  font-size: .875rem;
  color: var(--text-muted);
  text-align: center;
  padding: .5rem;
}

.status.error {
  color: var(--error);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
}

.result-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
}

.result-box h3 {
  font-size: .9rem;
  color: var(--success);
  margin-bottom: 1rem;
}

.copy-row {
  margin-bottom: .875rem;
}

.copy-row label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .25rem;
}

.copy-field {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}

.mono {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  word-break: break-all;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .4rem .5rem;
  line-height: 1.4;
}

.copy-btn {
  flex-shrink: 0;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 4px;
  padding: .4rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover { background: #15803d; }

.doc-image {
  max-width: 100%;
  border-radius: 4px;
  margin-top: .75rem;
  border: 1px solid var(--border);
}
