/* ═══════════════════════════════════════════════════════════════════════════
   QUATARLY PLATFORM — ONEPROVIDER-INSPIRED DESIGN
   Dark theme, orange accents, clean modern layout
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-input: #0f0f0f;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;

  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  --orange: #ff6b35;
  --orange-hover: #ff8555;
  --orange-dark: #e55525;

  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ─── NAVBAR ─────────────────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10, 10, 10, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.brand-logo {
  width: 28px;
  height: 28px;
  background: var(--orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #000;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-left: 4px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--text-primary);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--green);
}

.nav-status-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */

.page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 120px;
}

.container-sm {
  max-width: 580px;
  margin: 0 auto;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */

.hero {
  text-align: left;
  padding-top: 40px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--orange);
  margin-bottom: 20px;
}

.hero-eyebrow-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  gap: 48px;
  margin-top: 48px;
}

.hero-feature {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-feature-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.hero-feature-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.card-header {
  margin-bottom: 24px;
}

.card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.card-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.card-section:first-child {
  padding-top: 0;
  border-top: none;
}

/* ─── FORMS ──────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  transition: all 0.2s;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--orange);
  background: var(--bg-secondary);
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-mono);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: #000;
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

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

.btn-icon {
  width: 16px;
  height: 16px;
}

/* ─── STATUS & BADGES ────────────────────────────────────────────────────── */

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.status-dot.used {
  background: var(--text-muted);
}

.status-dot.error {
  background: var(--red);
}

.status-content {
  flex: 1;
}

.status-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.status-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255, 107, 53, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

/* ─── TABS ───────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ─── BREAKDOWN LIST ─────────────────────────────────────────────────────── */

.breakdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.breakdown-header-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.breakdown-header-note {
  font-size: 12px;
  color: var(--text-muted);
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(42, 42, 42, 0.5);
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.breakdown-row.active .breakdown-row-num {
  background: var(--orange);
  border-color: var(--orange);
  color: #000;
}

.breakdown-row.done .breakdown-row-num {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.breakdown-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breakdown-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.breakdown-row-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.breakdown-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakdown-row-credits {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.breakdown-chip {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.chip-current {
  background: rgba(255, 107, 53, 0.15);
  color: var(--orange);
}

.chip-next {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.breakdown-nudge {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 107, 53, 0.05);
  border: 1px solid rgba(255, 107, 53, 0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breakdown-nudge-icon {
  color: var(--orange);
  font-size: 14px;
}

/* ─── HOW IT WORKS ───────────────────────────────────────────────────────── */

.how-it-works {
  margin-top: 80px;
}

.how-it-works h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.step {
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

.footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

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

.text-success {
  color: var(--green);
}

.text-error {
  color: var(--red);
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .page-wrapper {
    padding: 60px 24px 100px;
  }

  .main-grid {
    gap: 60px;
  }
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero h1 {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .navbar-brand {
    font-size: 15px;
  }

  .brand-logo {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .navbar-links {
    gap: 12px;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .nav-status {
    display: none;
  }

  .page-wrapper {
    padding: 32px 16px 60px;
  }

  .main-grid {
    gap: 32px;
  }

  .hero {
    padding-top: 0;
  }

  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-eyebrow {
    font-size: 11px;
    padding: 5px 12px;
  }

  .card {
    padding: 20px;
  }

  .card-header h2 {
    font-size: 18px;
  }

  .card-header p {
    font-size: 13px;
  }

  .form-label {
    font-size: 12px;
  }

  input[type="text"],
  input[type="password"],
  textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  .btn {
    padding: 11px 20px;
    font-size: 13px;
  }

  .tabs {
    padding: 3px;
    gap: 3px;
  }

  .tab {
    padding: 9px 14px;
    font-size: 13px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step h3 {
    font-size: 16px;
  }

  .step p {
    font-size: 13px;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

  .how-it-works h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .card {
    padding: 16px;
  }

  .navbar-links a {
    font-size: 12px;
  }

  .page-wrapper {
    padding: 24px 12px 48px;
  }
}
