/* Portal-specific styles — client dashboard + niche landing pages */
/* Depends on theme.css for design tokens */

/* ---- NAV ---- */
.portal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e1e;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; color: white;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.nav-business { font-size: 14px; color: var(--fg-muted); }

/* ---- PORTAL CONTAINER ---- */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.portal-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 64px;
}

/* ---- HERO STATS ---- */
.portal-hero {
  padding: 48px 32px 32px;
  background: var(--bg);
}
.portal-hero .portal-container { max-width: 1200px; }
.greeting { margin-bottom: 32px; }
.greeting h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-top: 12px;
}
.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid #222;
  border-radius: 16px;
  padding: 20px 24px;
  min-width: 140px;
  flex: 1;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: #333; }
.stat-card.accent { border-color: rgba(255,92,53,0.3); }
.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.stat-num.green {
  background: linear-gradient(135deg, var(--green) 0%, #00f5a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl { font-size: 13px; color: var(--fg-muted); }

/* ---- SECTION ---- */
.portal-section {
  background: var(--bg-card);
  border: 1px solid #1e1e1e;
  border-radius: 20px;
  padding: 28px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.section-sub { font-size: 13px; color: var(--fg-muted); }
.view-link { font-size: 13px; color: var(--accent-light); text-decoration: none; }
.view-link:hover { text-decoration: underline; }

/* ---- CALENDAR ---- */
.calendar-list { display: flex; flex-direction: column; gap: 10px; }
.cal-entry {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid #202020;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.cal-entry:hover { border-color: #2e2e2e; }
.cal-entry.status-published { border-left: 3px solid var(--green); }
.cal-entry.status-scheduled { border-left: 3px solid #4a9eff; }
.cal-entry.status-draft { border-left: 3px solid #555; }
.cal-date {
  text-align: center;
  min-width: 44px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 6px 8px;
}
.cal-day { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1; }
.cal-month { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cal-content { flex: 1; }
.cal-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.cal-desc { font-size: 13px; color: var(--fg-muted); margin-bottom: 8px; line-height: 1.5; }
.cal-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-tag {
  font-size: 11px;
  background: rgba(255,92,53,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(255,92,53,0.2);
  border-radius: 4px;
  padding: 2px 8px;
}
.views-tag { font-size: 11px; color: var(--fg-muted); padding: 2px 0; }
.cal-status-badge {
  font-size: 12px;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
}
.badge-published { color: var(--green); border-color: rgba(0,214,143,0.2); background: rgba(0,214,143,0.08); }
.badge-scheduled { color: #4a9eff; border-color: rgba(74,158,255,0.2); background: rgba(74,158,255,0.08); }
.badge-draft { color: var(--fg-muted); }

/* ---- LEADS ---- */
.leads-list { display: flex; flex-direction: column; gap: 12px; }
.lead-card {
  background: var(--bg-elevated);
  border: 1px solid #202020;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.lead-card:hover { border-color: #2e2e2e; }
.lead-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lead-name { font-weight: 600; font-size: 15px; }
.lead-time { font-size: 12px; color: var(--fg-muted); }
.lead-contact { font-size: 13px; color: var(--fg-muted); margin-bottom: 4px; }
.lead-contact a { color: var(--fg-muted); text-decoration: none; }
.lead-contact a:hover { color: var(--fg); }
.lead-msg {
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
  margin: 8px 0;
  border-left: 2px solid #2a2a2a;
  padding-left: 10px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lead-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.source-tag {
  font-size: 11px;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid #222;
  border-radius: 4px;
  padding: 2px 8px;
}
.status-select {
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: var(--fg);
  font-size: 12px;
  font-family: var(--font-body);
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
}
.status-select:hover { border-color: #3a3a3a; }

/* ---- NICHE ROWS ---- */
.niches-list { display: flex; flex-direction: column; gap: 8px; }
.niche-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid #202020;
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.niche-row:hover { border-color: var(--accent); }
.niche-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.niche-slug { font-size: 12px; color: var(--fg-muted); }
.niche-arrow { color: var(--accent); font-size: 18px; }

/* ---- EMPTY STATES ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-muted);
  font-size: 15px;
}
.empty-icon { font-size: 36px; margin-bottom: 12px; }

/* ---- NICHE LANDING PAGE ---- */
.niche-page { min-height: 100vh; }
.niche-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 64px;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 90vh;
}
.niche-hero-inner { }
.niche-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.niche-hero .hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.trust-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.trust-item {
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
}
.quote-card {
  background: var(--bg-card);
  border: 1px solid #222;
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.4);
}
.form-header { margin-bottom: 24px; }
.form-biz { font-size: 13px; color: var(--accent-light); font-weight: 500; margin-bottom: 4px; }
.form-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #444; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-full { width: 100%; text-align: center; }
.form-disclaimer { font-size: 12px; color: #555; text-align: center; margin-top: 12px; line-height: 1.5; }

/* success state */
.success-state { text-align: center; padding: 24px 0; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-state h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.success-state p { color: var(--fg-muted); font-size: 15px; }

.niche-footer {
  border-top: 1px solid #1a1a1a;
  padding: 32px 64px;
  text-align: center;
}
.footer-brand { font-size: 14px; color: var(--fg-muted); }
.footer-brand strong { color: var(--fg); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
  .niche-hero { grid-template-columns: 1fr; padding: 48px 24px; min-height: auto; gap: 32px; }
  .portal-hero { padding: 32px 24px 24px; }
  .portal-container { padding: 0 16px; }
  .stat-row { gap: 10px; }
  .stat-card { min-width: 100px; padding: 14px 16px; }
  .stat-num { font-size: 28px; }
  .niche-footer { padding: 24px; }
}

@media (max-width: 600px) {
  .portal-nav { padding: 0 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; display: grid; }
  .quote-card { padding: 24px 20px; }
}
