/* ScaleEasy Agent Connect — Design System */

:root {
  --bg: #ffffff;
  --bg-card: #f8f9fa;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: #eef2ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-soft: #1e1b4b;
    --success: #34d399;
    --success-bg: #064e3b;
    --error: #f87171;
    --error-bg: #450a0a;
    --border: #2d2d44;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
  }
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

/* Logo */
.logo {
  margin-bottom: 32px;
}

.logo svg {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}

/* Headings */
h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 32px;
}

/* Agent/Service Info */
.info-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  text-align: left;
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.info-details {
  flex: 1;
  min-width: 0;
}

.info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.info-value {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Service icons */
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.service-icon img {
  width: 28px;
  height: 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Status indicators */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
}

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

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

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Steps */
.steps {
  text-align: left;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 28px;
}

/* Footer */
.footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Connection arrow */
.connect-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.connect-arrow .arrow {
  color: var(--text-secondary);
  font-size: 20px;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
  }

  .card {
    padding: 32px 24px;
  }

  h1 {
    font-size: 22px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 16px;
  }
}
