:root {
  --ink: #121522;
  --muted: #6c7285;
  --line: #e8eaf0;
  --soft: #f6f7fb;
  --panel: #ffffff;
  --violet: #6c5ce7;
  --violet-dark: #5243c7;
  --cyan: #22d3ee;
  --green: #10b981;
  --orange: #f59e0b;
  --danger: #dc2626;
  --radius: 22px;
  --shadow: 0 24px 65px rgba(31, 35, 57, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, Manrope, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #7c6bf2, #5446cf); box-shadow: 0 10px 24px rgba(108,92,231,.28); }
.brand.light { color: #fff; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid var(--violet); border-radius: 13px; color: #fff; background: var(--violet); font-weight: 700; transition: .2s ease; box-shadow: 0 12px 30px rgba(108,92,231,.2); }
.button:hover { transform: translateY(-1px); background: var(--violet-dark); }
.button.small { min-height: 40px; padding: 0 18px; border-radius: 11px; }
.button.full { width: 100%; }
.button.ghost { color: var(--ink); border-color: var(--line); background: #fff; box-shadow: none; }
.button.ghost:hover { border-color: #cfd2dd; background: #fafafe; }
.button.disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.eyebrow { display: inline-block; color: var(--violet); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #b8affe; }
.quiet { color: var(--muted); font-size: 14px; }

.topbar { position: sticky; z-index: 50; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; height: 76px; align-items: center; padding: 0 max(34px, calc((100vw - 1360px)/2)); border-bottom: 1px solid rgba(226,228,236,.85); background: rgba(255,255,255,.9); backdrop-filter: blur(20px); }
.main-nav { display: flex; gap: 6px; padding: 5px; border-radius: 13px; background: #f3f4f8; }
.main-nav a { padding: 9px 15px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 700; }
.main-nav a.active, .main-nav a:hover { color: var(--ink); background: #fff; box-shadow: 0 3px 10px rgba(31,35,57,.06); }
.profile-menu { justify-self: end; display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 13px; }
.profile-menu form { margin: 0; }
.link-button { padding: 0; color: var(--ink); border: 0; background: none; font-weight: 700; }

.page { max-width: 1360px; margin: 0 auto; padding: 54px 34px 90px; }
.narrow-page { max-width: 1050px; }
.page-head { margin-bottom: 34px; }
.page-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-head h1 { margin: 9px 0 8px; font-size: clamp(34px, 4vw, 50px); line-height: 1.06; letter-spacing: -.055em; }
.page-head p { max-width: 710px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.alert { margin: 0 0 24px; padding: 16px 19px; border: 1px solid #ddd9fb; border-radius: 13px; color: #50469a; background: #f4f2ff; font-size: 14px; }
.alert.success { color: #087456; border-color: #bdebdc; background: #ecfdf7; }
.alert.error { color: #9d2424; border-color: #f2c5c5; background: #fff2f2; }

/* Landing */
.landing-body { background: #fff; }
.landing-shell { min-height: 100vh; overflow: hidden; background: radial-gradient(circle at 74% 20%, #efedff 0, #fff 30%), #fff; }
.landing-nav { display: flex; max-width: 1420px; height: 88px; align-items: center; justify-content: space-between; margin: auto; padding: 0 42px; }
.landing-actions { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 700; }
.hero { display: grid; max-width: 1420px; grid-template-columns: .88fr 1.12fr; gap: 68px; align-items: center; margin: 0 auto; padding: 82px 42px 110px; }
.hero-copy h1 { max-width: 710px; margin: 18px 0 24px; font-size: clamp(50px, 5.4vw, 82px); line-height: .98; letter-spacing: -.075em; }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 36px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 38px; color: #454a5a; font-size: 12px; font-weight: 700; }
.trust-row span::before { content: '✓'; margin-right: 7px; color: var(--green); }
.hero-visual { position: relative; min-height: 590px; }
.visual-glow { position: absolute; inset: 10% 10%; border-radius: 50%; background: #8a7cf2; filter: blur(90px); opacity: .28; }
.mock-window { position: absolute; z-index: 2; inset: 32px -90px 20px 10px; padding: 22px; border: 1px solid rgba(255,255,255,.75); border-radius: 30px; background: rgba(255,255,255,.82); box-shadow: 0 50px 120px rgba(44,40,88,.22); transform: rotate(-2deg); backdrop-filter: blur(22px); }
.mock-head { display: flex; height: 46px; align-items: center; gap: 7px; color: #464b5c; font-size: 12px; }
.mock-head span { width: 9px; height: 9px; border-radius: 50%; background: #d8d9e1; }
.mock-head b { margin-left: 12px; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.mock-card { position: relative; min-height: 390px; overflow: hidden; padding: 24px; border-radius: 20px; color: #fff; background: #111; }
.mock-card::after { position: absolute; right: -60px; bottom: -30px; width: 250px; height: 250px; border: 45px solid rgba(255,255,255,.15); border-radius: 50%; content: ''; }
.mock-card.coral { background: linear-gradient(145deg,#ff8e68,#ff526f); }
.mock-card.cyan { background: linear-gradient(145deg,#117a8d,#20c9b1); }
.mock-card.violet { background: linear-gradient(145deg,#302358,#7a5ef1); }
.mock-card h3 { position: absolute; z-index: 2; bottom: 70px; margin: 0; font-size: 26px; line-height: 1.08; letter-spacing: -.04em; }
.mock-card > span:last-child { position: absolute; z-index: 2; bottom: 24px; padding: 6px 10px; border-radius: 99px; background: rgba(0,0,0,.18); font-size: 10px; font-weight: 700; }
.mini-label { font-size: 10px; font-weight: 700; opacity: .85; }
.mock-stat { display: grid; grid-template-columns: auto 1fr 1px 1fr; gap: 16px; align-items: center; margin-top: 15px; padding: 20px 24px; border-radius: 18px; background: #151827; color: #fff; }
.mock-stat strong { font-size: 36px; }.mock-stat span { font-size: 10px; color: #a9adbc; }.mock-stat i { width: 1px; height: 35px; background: #343847; }.mock-stat b { font-size: 12px; }
.features { display: grid; max-width: 1336px; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 0 auto 90px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--line); }
.features article { padding: 38px; background: #fff; }.features article > span { color: var(--violet); font-size: 12px; font-weight: 800; }.features h2 { margin: 24px 0 10px; font-size: 22px; letter-spacing: -.03em; }.features p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* Authentication */
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: 1.05fr .95fr; }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; padding: 56px 8vw; color: #fff; background: radial-gradient(circle at 70% 25%, #4d3da3 0, transparent 37%), linear-gradient(145deg,#131526,#242047); }
.auth-aside h1 { max-width: 650px; margin: 18px 0 24px; font-size: clamp(44px,5vw,72px); line-height: 1; letter-spacing: -.07em; }.auth-aside p { max-width: 570px; color: #c1c2cf; font-size: 17px; line-height: 1.7; }.auth-aside small { color: #8e90a5; }
.auth-panel { display: grid; place-items: center; padding: 50px; background: #fff; }
.auth-form { width: min(100%, 430px); }.auth-form h2 { margin: 10px 0 32px; font-size: 38px; letter-spacing: -.055em; }.auth-form label, .setup-form label, .editor-form label, .generate-form label { display: grid; gap: 9px; margin-bottom: 19px; color: #454a5a; font-size: 12px; font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid #dfe1e8; border-radius: 12px; outline: none; background: #fff; color: var(--ink); transition: .2s; }
input, select { height: 50px; padding: 0 15px; } textarea { padding: 14px 15px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { border-color: #9b90f2; box-shadow: 0 0 0 4px rgba(108,92,231,.09); }
.switch-auth { color: var(--muted); text-align: center; font-size: 13px; }.switch-auth a, .text-link { color: var(--violet); font-weight: 800; }

/* Setup */
.setup-form { padding: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }.form-grid .wide { grid-column: 1 / -1; }.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; padding-top: 10px; }
.check-row { display: flex!important; grid-template-columns: none!important; flex-direction: row; align-items: flex-start; gap: 13px!important; margin: 2px 0 20px!important; padding: 16px 17px; border: 1px solid var(--line); border-radius: 13px; background: #fafafe; cursor: pointer; }.check-row input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--violet); }.check-row span { display: grid; gap: 4px; }.check-row strong { color: var(--ink); font-size: 13px; }.check-row small { color: var(--muted); font-weight: 500; line-height: 1.5; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.generator-panel { min-height: 272px; padding: 30px; background: radial-gradient(circle at 96% 0,#eeeaff 0, transparent 43%), #fff; }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; }.panel-title h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -.04em; }.ai-dot { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: var(--violet); font-size: 12px; font-weight: 800; }
.generate-form { display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: end; margin-top: 30px; }.generate-form label { margin: 0; }.generate-form select { min-width: 180px; }.panel-note { margin: 17px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.job-progress { display: flex; align-items: center; gap: 18px; margin-top: 46px; padding: 20px; border-radius: 16px; background: #f5f3ff; }.job-progress p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }.spinner { width: 36px; height: 36px; border: 4px solid #dcd7ff; border-top-color: var(--violet); border-radius: 50%; animation: spin .9s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.stat-card { position: relative; overflow: hidden; min-height: 128px; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }.stat-card span { color: var(--muted); font-size: 12px; font-weight: 700; }.stat-card strong { display: block; margin-top: 12px; font-size: 34px; letter-spacing: -.05em; }.stat-card strong small { margin-left: 3px; color: var(--muted); font-size: 12px; }.stat-card i { position: absolute; right: -14px; bottom: -19px; width: 72px; height: 72px; border-radius: 50%; opacity: .13; }.stat-card i.violet{background:var(--violet)}.stat-card i.cyan{background:var(--cyan)}.stat-card i.green{background:var(--green)}.stat-card i.orange{background:var(--orange)}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 52px 0 22px; }.section-head h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.04em; }.section-head a { color: var(--violet); font-size: 13px; font-weight: 800; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }.post-grid.large { grid-template-columns: repeat(4,1fr); }.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; transition: .22s; }.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }.post-card img { display: block; width: 100%; aspect-ratio: 4/3.55; object-fit: cover; background: #e9eaf1; }.post-card-body { padding: 19px; }.post-card h3 { margin: 14px 0 8px; font-size: 18px; line-height: 1.25; letter-spacing: -.03em; }.post-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.status { display: inline-flex; padding: 6px 9px; border-radius: 99px; color: #655aa8; background: #f0edff; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.status.scheduled { color:#08798c;background:#e7fbff }.status.published { color:#087456;background:#e7fbf3 }.status.failed { color:#a12626;background:#fff0f0 }.status.approved { color:#98610a;background:#fff7df }
.empty-state { padding: 65px 24px; border: 1px dashed #d4d6df; border-radius: 22px; color: var(--muted); background: rgba(255,255,255,.55); text-align: center; }.empty-state h3 { margin: 12px 0 7px; color: var(--ink); }.empty-state p { margin: 0; }.empty-icon { display: grid; width: 48px; height: 48px; place-items: center; margin: auto; border-radius: 15px; color: var(--violet); background: #ebe8ff; font-size: 22px; }
.connection-strip { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }.connection-strip > div { display:flex;align-items:center;gap:14px }.connection-icon { display:grid;width:42px;height:42px;place-items:center;border-radius:13px;color:#fff;background:linear-gradient(145deg,#e44b9b,#f59b42);font-size:24px }.connection-strip strong { font-size:14px }.connection-strip p { margin:4px 0 0;color:var(--muted);font-size:11px }.connection-strip a { color:var(--violet);font-size:12px;font-weight:800 }

/* Content editor */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 25px; padding-bottom: 1px; overflow-x: auto; }.filter-tabs a { padding: 10px 15px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }.filter-tabs a.active { color: var(--violet); background: #ece9ff; }
.detail-page { max-width: 1180px; }.back-link { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 13px; font-weight: 700; }.editor-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 28px; align-items: start; }.preview-panel { overflow: hidden; border-radius: 24px; background: #111; box-shadow: var(--shadow); }.preview-panel > img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }.preview-meta { display: grid; gap: 10px; padding: 17px 20px; color:#fff }.preview-meta .status { justify-self:start }.preview-meta small { color:#9599a9;line-height:1.45 }.editor-form { display: grid; gap: 7px; padding: 32px; }.editor-form h1 { margin: 7px 0 21px; font-size: 34px;letter-spacing:-.05em }.editor-form label { margin-bottom: 12px; }.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Integrations and logs */
.integration-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: start; margin-bottom: 18px; padding: 27px; }.integration-logo { display:grid;width:54px;height:54px;place-items:center;border-radius:17px;color:#fff;font-size:26px }.integration-logo.instagram{background:linear-gradient(145deg,#7c3aed,#ec4899,#f59e0b)}.integration-logo.openai{background:#111827}.integration-copy h2 { margin: 2px 0 8px;font-size:21px;letter-spacing:-.03em }.integration-copy > p { max-width:630px;margin:0;color:var(--muted);font-size:13px;line-height:1.65 }.integration-copy code { padding:2px 5px;border-radius:4px;background:#f0f1f5;font-size:11px }.permission-row { display:grid;grid-template-columns:auto auto;gap:8px 16px;width:max-content;margin-top:16px;font-size:10px }.permission-row span{color:var(--muted)}.permission-row b{color:var(--green)}.permission-row b.pending{color:var(--orange)}
.log-list { padding: 8px 24px; box-shadow: none; }.log-entry { display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center;padding:18px 4px;border-bottom:1px solid var(--line) }.log-entry:last-child{border:0}.log-dot{width:9px;height:9px;border-radius:50%;background:var(--violet);box-shadow:0 0 0 5px #eeebff}.log-dot.error{background:var(--danger);box-shadow:0 0 0 5px #ffeded}.log-entry strong{font-size:13px}.log-entry p{margin:4px 0 0;color:var(--muted);font-size:10px}.log-entry time{color:var(--muted);font-size:10px}

@media (max-width: 1050px) {
  .topbar { grid-template-columns: auto 1fr; padding: 0 22px; }.main-nav { order: 3; position: fixed; right: 18px; bottom: 18px; left: 18px; justify-content: space-around; box-shadow: 0 15px 50px rgba(24,27,45,.2); }.profile-menu { justify-self: end; }.hero { grid-template-columns: 1fr; padding-top: 55px; }.hero-visual { min-height: 520px; }.mock-window { inset: 20px 0; }.dashboard-grid { grid-template-columns: 1fr; }.post-grid.large { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 760px) {
  .page { padding: 38px 18px 110px; }.topbar { height:66px }.topbar .brand span:last-child { display:none }.profile-menu>span{display:none}.main-nav a{padding:9px 10px;font-size:11px}.page-head.split { align-items:flex-start;flex-direction:column }.landing-nav { padding:0 20px }.hero { padding:50px 20px 70px }.hero-copy h1{font-size:47px}.hero-copy>p{font-size:16px}.hero-actions{align-items:flex-start;flex-direction:column}.hero-visual{min-height:420px}.mock-window{padding:13px;transform:none}.mock-card{min-height:280px;padding:13px}.mock-card h3{font-size:16px}.mock-stat{grid-template-columns:auto 1fr}.mock-stat i,.mock-stat b{display:none}.features{grid-template-columns:1fr;margin:0 20px 60px}.auth-layout{grid-template-columns:1fr}.auth-aside{display:none}.auth-panel{min-height:100vh;padding:30px 20px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.post-grid,.post-grid.large{grid-template-columns:1fr 1fr}.editor-layout{grid-template-columns:1fr}.integration-card{grid-template-columns:auto 1fr}.integration-card>.button,.integration-card>.status{grid-column:1/-1}.generate-form{grid-template-columns:1fr}.stats-grid{gap:10px}.connection-strip{align-items:flex-start;flex-direction:column;gap:14px}
}
@media (max-width: 480px) { .post-grid,.post-grid.large{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.stat-card{min-height:110px}.editor-actions .button{width:100%}.landing-actions>a:first-child{display:none} }
