
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #6d5dfc;
  --accent-2: #8b7fff;
  --dark: #0d1321;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(17, 24, 39, .08);
  --radius: 22px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 270px; background: var(--dark); color: white; padding: 24px 18px; display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 50;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #b4a9ff); font-weight: 800; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; font-size: 12px; color: #9ca3af; margin-top: 3px; }
.nav { display: grid; gap: 6px; }
.nav-item { border: 0; background: transparent; color: #aeb7c7; padding: 13px 14px; border-radius: 14px; text-align: left; display: flex; gap: 12px; align-items: center; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.09); color: white; }
.sidebar-footer { margin-top: auto; }
.mini-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px; }
.mini-card span, .mini-card small { display: block; color: #9ca3af; font-size: 12px; }
.mini-card strong { display: block; margin: 4px 0; }
.version { color: #6b7280; font-size: 12px; padding: 16px 4px 0; }

.main { flex: 1; margin-left: 270px; min-width: 0; }
.topbar { height: 88px; display: flex; justify-content: space-between; align-items: center; padding: 18px 30px; background: rgba(244,246,251,.92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(229,231,235,.85); }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--accent), #3b82f6); font-weight: 700; }
.mobile-menu { display: none; }

.page { display: none; padding: 30px; }
.page.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero-card { background: linear-gradient(135deg, #151b2f, #20284a 60%, #322e69); color: white; border-radius: 28px; padding: 40px; display: grid; grid-template-columns: 1.25fr .75fr; overflow: hidden; min-height: 310px; box-shadow: var(--shadow); }
.hero-card h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.02; margin: 12px 0 18px; max-width: 720px; }
.hero-card p { color: #cbd5e1; max-width: 680px; line-height: 1.6; margin-bottom: 26px; }
.eyebrow { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.hero-visual { position: relative; min-height: 220px; }
.ai-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 110px; height: 110px; border-radius: 32px; display: grid; place-items: center; background: linear-gradient(135deg, #8b7fff, #5a46ea); font-size: 34px; font-weight: 900; box-shadow: 0 0 80px rgba(139,127,255,.45); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.orbit-1 { width: 250px; height: 250px; }
.orbit-2 { width: 360px; height: 360px; }
.chip { position: absolute; padding: 9px 13px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 12px; }
.chip-1 { left: 12%; top: 16%; } .chip-2 { right: 4%; top: 25%; } .chip-3 { left: 4%; bottom: 18%; } .chip-4 { right: 12%; bottom: 9%; }

.primary-button, .secondary-button, .text-button, .icon-button {
  border: 0; border-radius: 13px; padding: 12px 18px; font-weight: 700;
}
.primary-button { color: white; background: linear-gradient(135deg, var(--accent), #8b7fff); box-shadow: 0 10px 25px rgba(109,93,252,.25); }
.primary-button:hover { transform: translateY(-1px); }
.secondary-button { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.text-button { background: transparent; color: var(--accent); padding: 8px; }
.icon-button { background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; }
.full { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 20px; }
.stat-card { background: var(--surface); padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(229,231,235,.8); }
.stat-card span, .stat-card small { color: var(--muted); display: block; }
.stat-card strong { font-size: 34px; display: block; margin: 8px 0; }

.content-grid, .form-grid, .content-builder, .funnel-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid rgba(229,231,235,.9); box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel h3 { margin: 5px 0 0; font-size: 21px; }

.steps { display: grid; gap: 10px; }
.step { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; background: var(--surface-2); border: 0; border-radius: 16px; padding: 13px; text-align: left; }
.step > span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: white; color: var(--accent); font-weight: 800; }
.step small { color: var(--muted); display: block; margin-top: 3px; }
.step.done > span { background: #dcfce7; color: var(--success); }

.schedule-list { display: grid; gap: 11px; }
.schedule-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.schedule-item:last-child { border-bottom: 0; }
.schedule-item .date { text-align: center; background: var(--surface-2); border-radius: 13px; padding: 8px; font-weight: 800; }
.schedule-item small { color: var(--muted); display: block; margin-top: 3px; }
.badge { font-size: 11px; padding: 6px 9px; border-radius: 999px; background: #ede9fe; color: #6d28d9; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-intro h2 { margin: 6px 0 8px; font-size: 34px; }
.section-intro p { color: var(--muted); margin: 0; max-width: 760px; line-height: 1.55; }

label { display: grid; gap: 8px; color: #374151; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: #fbfcfe; border-radius: 13px; padding: 13px 14px; color: var(--text); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,93,252,.12); }
textarea { resize: vertical; }
.empty-state { min-height: 400px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state h4 { color: var(--text); margin: 10px 0 4px; }
.empty-icon { width: 70px; height: 70px; margin: auto; border-radius: 22px; display: grid; place-items: center; background: #ede9fe; color: var(--accent); font-size: 28px; }
.hidden { display: none !important; }

.analysis-output { display: grid; gap: 12px; }
.analysis-block { padding: 16px; background: var(--surface-2); border-radius: 16px; }
.analysis-block h4 { margin: 0 0 8px; }
.analysis-block p, .analysis-block ul { margin: 0; color: #4b5563; line-height: 1.55; }

.controls-panel { align-self: start; }
.post-editor { min-height: 410px; line-height: 1.65; }
.inline-actions { display: flex; gap: 8px; }
.editor-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); font-size: 12px; }
.upload-box { border: 1px dashed #cbd5e1; border-radius: 15px; padding: 14px; display: grid; gap: 10px; }
.image-preview { height: 220px; border-radius: 18px; background: linear-gradient(135deg, #c4b5fd, #93c5fd); display: grid; place-items: center; color: white; font-size: 20px; font-weight: 800; margin-top: 14px; background-size: cover; background-position: center; }

.funnel-steps { display: grid; gap: 12px; }
.funnel-step { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; background: var(--surface-2); padding: 14px; border-radius: 16px; }
.funnel-step span { width: 36px; height: 36px; border-radius: 12px; background: #ddd6fe; color: #6d28d9; display: grid; place-items: center; font-weight: 800; }
.funnel-step h4 { margin: 0 0 5px; }
.funnel-step p { margin: 0; color: var(--muted); line-height: 1.45; }

.calendar-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.calendar-column { background: #e9edf5; border-radius: 20px; padding: 14px; }
.calendar-column h3 { margin: 0 0 12px; font-size: 16px; }
.calendar-card { background: white; border-radius: 15px; padding: 14px; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(17,24,39,.06); }
.calendar-card strong { display: block; margin-bottom: 6px; }
.calendar-card small { color: var(--muted); }

.channels-grid, .pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.channel-card, .price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.channel-top { display: flex; align-items: center; justify-content: space-between; }
.channel-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); font-size: 24px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.status-dot.on { background: var(--success); }
.channel-card p { color: var(--muted); min-height: 42px; }
.channel-card button { width: 100%; }

.price-card { position: relative; }
.price-card h3 { font-size: 34px; margin: 12px 0 6px; }
.price-card h3 small { font-size: 14px; color: var(--muted); }
.price-card p { color: var(--muted); }
.price-card ul { padding-left: 18px; color: #4b5563; line-height: 1.9; min-height: 180px; }
.price-card.featured { border: 2px solid var(--accent); transform: translateY(-8px); }
.popular { position: absolute; top: -12px; right: 18px; background: var(--accent); color: white; font-size: 11px; padding: 7px 10px; border-radius: 999px; }

.toast { position: fixed; right: 24px; bottom: 24px; background: #111827; color: white; padding: 13px 16px; border-radius: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; z-index: 100; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .sidebar { width: 230px; }
  .main { margin-left: 230px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .hero-card { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .channels-grid, .pricing-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 780px) {
  .sidebar { transform: translateX(-100%); transition: .25s; width: 280px; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 14px 16px; height: 76px; }
  .top-actions .secondary-button { display: none; }
  .page { padding: 18px 14px 30px; }
  .hero-card { padding: 26px 22px; min-height: auto; }
  .hero-card h2 { font-size: 36px; }
  .stats-grid, .content-grid, .form-grid, .content-builder, .funnel-layout, .calendar-board, .channels-grid, .pricing-grid { grid-template-columns: 1fr; }
  .section-intro { align-items: stretch; flex-direction: column; }
  .section-intro .primary-button { width: 100%; }
  .price-card.featured { transform: none; }
}
