:root {
  --bg: #0f172a;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --border: #e2e8f0;
  --ok: #16a34a;
  --bad: #dc2626;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1e293b, var(--bg));
  color: var(--ink);
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.card__header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seg-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.05s ease, border-color 0.15s ease, background 0.15s ease;
}

.seg-btn::after {
  content: "↓ xlsx";
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.seg-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #eef2ff;
}

.seg-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.seg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.seg-btn.loading::after {
  content: "формируется…";
  color: var(--accent);
}

.status {
  margin-top: 18px;
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
}

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

.status--error {
  color: var(--bad);
}

.card__footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.docs-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.docs-link:hover {
  text-decoration: underline;
}

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

.health--ok {
  color: var(--ok);
}

.health--bad {
  color: var(--bad);
}

.skeleton {
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
