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

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #ff4c00;
  --accent-hover: #ff6a2a;
  --radius: 10px;
  --font: 'Geist', 'Inter', system-ui, sans-serif;
}

html, body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.button-row {
  display: flex;
  gap: 0.75rem;
}

.btn-main {
  flex: 1;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 160ms ease, opacity 160ms ease;
  min-height: 44px;
}

.btn-main:hover:not(:disabled) { background: var(--accent-hover); }
.btn-main:disabled { opacity: 0.5; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress */
.progress-wrap {
  display: none;
}
.progress-wrap.visible {
  display: block;
}
.progress-track {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 120ms ease;
}

/* Status */
.status-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.status-msg.status-ok  { color: #4caf82; }
.status-msg.status-err { color: #f25f5c; }
