/* ── Portal Landing Page ──────────────────────────────────── */
.portal-landing {
  min-height: 100vh;
  background: #0a0e1a;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hero */
.portal-hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 50%, #0a0e1a 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}
.portal-hero-inner { max-width: 680px; margin: 0 auto; }
.portal-hero-logo { width: 80px; height: 80px; margin-bottom: 24px; border-radius: 16px; }
.portal-hero-title {
  font-size: 2.5rem; font-weight: 700; color: #fff;
  margin: 0 0 16px; letter-spacing: -0.02em;
}
.portal-hero-tagline {
  font-size: 1.15rem; color: #94a3b8; line-height: 1.6; margin: 0 0 32px;
}
.portal-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.portal-hero-actions .btn { min-width: 160px; }

/* Pricing Section */
.portal-pricing {
  padding: 60px 24px 80px;
  max-width: 1000px;
  margin: 0 auto;
}
.portal-section-title {
  font-size: 1.75rem; font-weight: 700; color: #fff;
  text-align: center; margin: 0 0 8px;
}
.portal-section-subtitle {
  font-size: 1rem; color: #94a3b8; text-align: center; margin: 0 0 40px;
}
.portal-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.portal-tier-card {
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 32px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.portal-tier-featured {
  border-color: #6366f1;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}
.portal-tier-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #6366f1; color: #fff; font-size: .75rem; font-weight: 600;
  padding: 4px 16px; border-radius: 100px;
}
.portal-tier-name {
  font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0 0 16px;
}
.portal-tier-price { margin-bottom: 24px; }
.portal-price-amount { font-size: 2rem; font-weight: 700; color: #fff; }
.portal-price-period { font-size: .875rem; color: #64748b; margin-left: 4px; }
.portal-tier-features {
  list-style: none; padding: 0; margin: 0 0 24px; flex: 1;
}
.portal-tier-features li {
  padding: 8px 0; border-bottom: 1px solid #1e293b;
  font-size: .9rem; color: #cbd5e1;
}
.portal-tier-features li::before {
  content: '✓ '; color: #22c55e; font-weight: 600;
}
.portal-tier-cta { margin-top: auto; }

/* Footer */
.portal-footer {
  padding: 24px; text-align: center; border-top: 1px solid #1e293b;
  font-size: .8rem; color: #64748b;
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.portal-footer a { color: #64748b; text-decoration: none; }
.portal-footer a:hover { text-decoration: underline; }

/* ── Login Modal ─────────────────────────────────────────── */
.portal-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.portal-modal.hidden { display: none; }
.portal-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
}
.portal-modal-content {
  position: relative; z-index: 1;
  background: #111827; border: 1px solid #1e293b; border-radius: 16px;
  padding: 40px 32px; width: 100%; max-width: 400px;
}
.portal-modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: #64748b; font-size: 1.5rem;
  cursor: pointer; line-height: 1;
}
.portal-modal-close:hover { color: #fff; }
.portal-login-header { text-align: center; margin-bottom: 24px; }
.portal-login-header h2 { font-size: 1.25rem; color: #fff; margin: 12px 0 0; }
.portal-login-logo { width: 48px; height: 48px; border-radius: 8px; }

/* ── Portal Nav Rail ─────────────────────────────────────── */
.portal-nav-rail {
  width: 200px;
  min-width: 200px;
  background: #0f172a;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
.portal-nav-brand {
  padding: 16px; text-align: center;
  border-bottom: 1px solid #1e293b;
}
.portal-nav-logo { width: 40px; height: 40px; border-radius: 8px; }
.portal-nav-items { flex: 1; padding: 8px 0; }
.portal-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; color: #94a3b8;
  font-size: .875rem; cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.portal-nav-item:hover { background: #1e293b; color: #e2e8f0; }
.portal-nav-item.active { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.portal-nav-icon { font-size: 1rem; width: 24px; text-align: center; }
.portal-nav-footer {
  padding: 12px 16px; border-top: 1px solid #1e293b;
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.portal-tier-pill {
  display: inline-block; text-align: center;
  padding: 4px 12px; border-radius: 100px;
  font-size: .75rem; font-weight: 600;
  background: #1e293b; color: #94a3b8;
}
.badge-starter { background: #1e293b; color: #94a3b8; }
.badge-pro { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.badge-enterprise { background: rgba(234, 179, 8, 0.2); color: #eab308; }

/* ── Portal Workspace Override ───────────────────────────── */
body.portal-mode #navRail { display: none !important; }
body.portal-mode #bottomNav { display: none !important; }
body.portal-mode #workspaceShell { flex-direction: row; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .portal-hero-title { font-size: 1.75rem; }
  .portal-tier-grid { grid-template-columns: 1fr; }
  .portal-nav-rail { width: 56px; min-width: 56px; }
  .portal-nav-label { display: none; }
  .portal-nav-item { justify-content: center; padding: 12px 8px; }
  .portal-tier-pill { font-size: .65rem; padding: 3px 8px; }
}
