/* ============================================================
   Creator Cache™ — Obsidian dark, electric gradients, glass
   ============================================================ */

:root {
  --bg-primary: #0a0a11;
  --bg-secondary: #12121c;
  --bg-card: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #22d3ee);
}

body { background:
  radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.14), transparent),
  var(--bg-primary); }

/* =================== LANDING =================== */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 22px 80px; }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.logo .mark { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero { text-align: center; padding: 64px 0 40px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); line-height: 1.08; margin: 18px 0; }
.hero h1 .grad { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto 30px; font-size: 1.05rem; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 56px; }
.feature-card { transition: transform 0.25s ease, border-color 0.25s ease; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.feature-card .f-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 7px; }
.feature-card p { color: var(--text-muted); font-size: 0.87rem; line-height: 1.55; }

.section-title { text-align: center; margin-top: 72px; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.section-sub { text-align: center; color: var(--text-muted); margin-top: 8px; }

/* =================== APP SHELL =================== */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: 250px; flex-shrink: 0; padding: 22px 16px;
  background: rgba(10, 10, 17, 0.85); border-right: 1px solid var(--border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; z-index: 100;
}
.sidebar .logo { padding: 0 10px 18px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 12px; border: none; background: transparent;
  color: var(--text-muted); font-size: 0.92rem; font-weight: 600; text-align: left;
  transition: background 0.15s, color 0.15s; width: 100%;
}
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(34,211,238,0.12)); color: var(--text-primary); box-shadow: inset 0 0 0 1px rgba(139,92,246,0.35); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

.main { flex: 1; padding: 26px clamp(16px, 3.5vw, 42px) 90px; min-width: 0; }
.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
.view-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h2 { font-size: 1.5rem; }
.view-head p { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }

/* Dashboard metric tiles */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.metric { padding: 18px; }
.metric .m-value { font-size: 1.9rem; font-weight: 800; font-family: var(--font-display); }
.metric .m-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 3px; }
.metric .m-icon { font-size: 1.3rem; margin-bottom: 8px; display: block; }

/* Idea cache */
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.idea-card { position: relative; }
.idea-card.pinned { border-color: var(--warning); }
.idea-card .i-tag { font-size: 0.7rem; }
.idea-card p { margin: 10px 0; font-size: 0.92rem; line-height: 1.5; word-break: break-word; }
.idea-actions { display: flex; gap: 6px; }
.icon-btn { background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); padding: 5px 9px; font-size: 0.85rem; min-height: 32px; }
.icon-btn:hover { color: var(--text-primary); border-color: var(--accent); }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { background: rgba(255,255,255,0.025); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px; min-height: 300px; }
.kanban-col.drag-over { border-color: var(--accent); background: rgba(139,92,246,0.07); }
.kanban-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); display: flex; justify-content: space-between; margin-bottom: 12px; }
.deal-card { margin-bottom: 10px; padding: 14px; cursor: grab; }
.deal-card:active { cursor: grabbing; }
.deal-card .d-name { font-weight: 700; font-size: 0.93rem; }
.deal-card .d-value { color: var(--accent-2); font-weight: 700; font-size: 0.88rem; margin: 5px 0; }
.deal-card .d-notes { color: var(--text-muted); font-size: 0.8rem; line-height: 1.45; }
.deal-move { display: flex; gap: 5px; margin-top: 9px; }

/* Content engine */
.ce-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.template-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; min-height: 36px; }
.chip.active, .chip:hover { border-color: var(--accent); color: var(--text-primary); background: rgba(139,92,246,0.12); }
.chip.locked { opacity: 0.68; border-style: dashed; }
.sched-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.sched-item:last-child { border-bottom: none; }
.platform-pill { font-size: 0.7rem; padding: 3px 9px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); }

/* Habits */
.habit-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.habit-row:last-child { border-bottom: none; }
.habit-name { flex: 1; font-weight: 600; font-size: 0.92rem; min-width: 130px; }
.habit-days { display: flex; gap: 6px; }
.day-dot {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 0.66rem; font-weight: 700;
}
.day-dot.done { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.goal-bar { height: 8px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.goal-bar .fill { height: 100%; background: var(--accent-gradient); border-radius: 99px; transition: width 0.4s ease; }

/* AI assistant */
.ai-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.ai-actions { display: flex; flex-direction: column; gap: 9px; }
.ai-action { text-align: left; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: 0.88rem; font-weight: 600; transition: border-color 0.15s, transform 0.15s; }
.ai-action:hover { border-color: var(--accent); transform: translateX(3px); }
.ai-action small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 3px; font-size: 0.76rem; }
.ai-chat { min-height: 380px; display: flex; flex-direction: column; }
.ai-log { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 430px; padding-right: 4px; }
.ai-msg { padding: 13px 16px; border-radius: 14px; font-size: 0.9rem; line-height: 1.6; max-width: 88%; white-space: pre-wrap; word-break: break-word; }
.ai-msg.user { align-self: flex-end; background: rgba(139,92,246,0.18); border: 1px solid rgba(139,92,246,0.3); }
.ai-msg.bot { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); }
.ai-msg.bot.thinking { color: var(--text-muted); font-style: italic; }
.ai-input-row { display: flex; gap: 9px; margin-top: 14px; }
.ai-input-row input { flex: 1; }
.mode-pill { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.mode-pill.live { border-color: var(--success); color: var(--success); }

/* Identity vault */
.socials-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* Dashboard greeting avatar — the user's face, not an initial */
.dash-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-gradient); color: #fff; font-weight: 700; font-size: 1.1rem;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.greet-row { display: flex; align-items: center; gap: 13px; }
.links-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg-card); font-size: 0.88rem; }
.link-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 0.9rem; color: var(--text-muted); }
.check-item input { width: 18px; height: 18px; accent-color: var(--accent); }
.check-item.done { text-decoration: line-through; opacity: 0.6; }

/* ============ Profile strength meter ============ */
.strength-card { padding: 18px 20px; }
.strength-bar-wrap { margin-top: 14px; }
.strength-meta { display: flex; align-items: center; gap: 16px; }
.strength-score {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1;
  min-width: 74px; text-align: center; padding: 12px 8px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
}
.strength-score.sinvisible { color: var(--danger); }
.strength-score.sthin { color: var(--warning); }
.strength-score.sgettingthere { color: var(--warning); }
.strength-score.sstrong { color: var(--accent-2); }
.strength-score.sclientready { color: var(--success); }
.strength-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 12px; }
.strength-bar .fill { height: 100%; border-radius: 99px; background: var(--accent-gradient); transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.strength-next {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border);
}

/* ============ Portfolio Studio ============ */
.gap-row { padding: 13px 0; border-bottom: 1px solid var(--border); }
.gap-row:last-child { border-bottom: 0; }
.gap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-pts { font-size: 0.76rem; font-weight: 700; color: var(--accent-2); }
.upsell-card {
  border: 1px solid rgba(139,92,246,0.4); border-radius: 12px; padding: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,0.13), rgba(34,211,238,0.06));
}
.pf-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pf-item { position: relative; padding: 16px; }
.pf-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pf-price { color: var(--accent-2); font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.pf-price small { color: var(--text-muted); font-weight: 500; }
.pf-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 9px; margin-bottom: 10px; display: block; }
.pf-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--bg-card); border: 1px dashed var(--border); }
.pf-thumb-wrap { position: relative; }
.pf-play {
  position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 99px;
  background: rgba(0,0,0,0.66); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fm-thumb:not(:empty) { margin-top: 10px; }
.fm-thumb img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--border); }
.pf-outcome { color: var(--accent-2); font-size: 0.82rem; font-weight: 600; margin: 4px 0; }
.pf-link { display: inline-block; margin-top: 8px; font-size: 0.83rem; color: var(--accent); font-weight: 600; }
.pf-item .idea-actions { margin-top: 10px; }
.pf-post .platform-pill { font-size: 0.74rem; }
.pf-metric-sm { font-size: 0.76rem; font-weight: 700; color: var(--accent-2); text-align: right; }
.pf-quote p { font-size: 0.9rem; line-height: 1.55; font-style: italic; }
.pf-quote-by { margin-top: 9px; font-size: 0.82rem; }
.pf-case { padding: 18px; margin-bottom: 14px; }
.pf-metric {
  display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 99px;
  background: var(--accent-gradient); color: #fff; font-size: 0.8rem; font-weight: 700;
}
.pf-case-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.pf-case-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.pf-case-grid p { font-size: 0.86rem; margin-top: 3px; }
.photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-slot {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  background: var(--bg-card); border: 1px solid var(--border);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.skill-tag { display: inline-flex; align-items: center; gap: 6px; }
.skill-x { background: transparent; border: 0; color: inherit; cursor: pointer; opacity: 0.6; font-size: 0.9rem; padding: 0; }
.skill-x:hover { opacity: 1; }

/* ============ AI capability ladder ============ */
.ai-tier { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.ai-tier.locked { opacity: 0.72; border-style: dashed; }
.ai-tier-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.ai-tier-blurb { font-size: 0.76rem; color: var(--text-muted); margin: 2px 0 9px; }
.ai-action.locked { cursor: pointer; }
.ai-action.locked:hover { border-color: var(--accent); }

/* Mobile top bar + drawer */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; position: sticky; top: 0; z-index: 120;
    background: rgba(10,10,17,0.92); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .hamburger { background: transparent; border: 1px solid var(--border); color: var(--text-primary); border-radius: 10px; padding: 8px 12px; font-size: 1.05rem; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh;
    transform: translateX(-105%); transition: transform 0.28s ease; width: 270px;
    box-shadow: var(--shadow); z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 150; }
  .main { padding: 20px 16px 90px; }
  .ce-layout, .ai-layout { grid-template-columns: 1fr; }
  .kanban { display: flex; }
  .kanban-col { min-width: 250px; flex-shrink: 0; }
  .hero { padding: 40px 0 26px; }
}
