:root {
  --cream: #f3efe3;
  --cream-2: #ebe5d3;
  --ink: #1a1a1a;
  --ink-2: #2a2a2a;
  --yellow: #f2c24e;
  --yellow-2: #e9b232;
  --blue: #4a7cf8;
  --muted: #6b6659;
  --line: #ddd5bf;
  --card: #fbf9f3;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(26, 26, 26, 0.04), 0 8px 24px -12px rgba(26, 26, 26, 0.18);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--cream); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Brand */
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-mark { font-weight: 800; font-size: 28px; letter-spacing: -1.5px; position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); right: -11px; top: 4px; }
.brand-tag { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 3px 7px; border-radius: 6px; margin-left: 10px; }
.brand-lg .brand-mark { font-size: 40px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--yellow); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08); }
.btn-primary:hover { background: var(--yellow-2); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* Boot */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--cream); z-index: 50; }
.boot .brand-mark { font-size: 44px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-pitch { background: var(--ink); color: var(--cream); padding: 56px clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.login-pitch::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 194, 78, 0.28), transparent 65%); right: -200px; top: -160px; }
.login-pitch .brand-tag { background: var(--yellow); }
.login-pitch h1 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.02; letter-spacing: -1.5px; margin: 8px 0 0; max-width: 14ch; }
.hl { color: var(--yellow); }
.lead { font-size: 17px; line-height: 1.55; color: #d9d3c2; max-width: 52ch; margin: 0; }
.pitch-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-width: 620px; }
.pitch-list li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #ece6d6; }
.pitch-list .ico { width: 30px; height: 30px; border-radius: 9px; background: #2b2b2b; display: grid; place-items: center; color: var(--yellow); flex: none; }
.pitch-list svg { width: 16px; height: 16px; }
.login-card-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { margin: 0; font-size: 28px; letter-spacing: -0.6px; }
.login-card p { margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
input, textarea, select { font: inherit; font-size: 15px; font-weight: 500; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; color: var(--ink); outline: none; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242, 194, 78, 0.45); }
.form-error { color: #b23a2b; font-size: 14px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* App shell */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: var(--cream); padding: 24px 18px; display: flex; flex-direction: column; gap: 22px; }
.sidebar .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px; color: #d8d2c1; background: transparent; border: 0; text-align: left; }
.nav-item:hover { background: #262626; color: var(--cream); }
.nav-item.active { background: var(--yellow); color: var(--ink); }
.usage { margin-top: auto; background: #232323; border-radius: 14px; padding: 14px; font-size: 13px; color: #cfc9b8; }
.usage-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.usage strong { color: var(--cream); }
.meter { height: 6px; background: #3a3a3a; border-radius: 9px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--yellow); border-radius: 9px; transition: width 0.4s ease; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid #2f2f2f; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 14px; }
.user-meta span { font-size: 12px; color: #a9a392; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout { margin-top: -8px; }
.menu-btn { display: none; }
.main { padding: 40px clamp(20px, 4vw, 56px) 60px; min-width: 0; }

/* Dashboard */
.welcome h1 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -1px; margin: 0 0 6px; }
.welcome p { margin: 0; color: var(--muted); font-size: 16px; }
.overall { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.overall .meter { flex: 1; height: 8px; background: var(--cream-2); }
.overall strong { white-space: nowrap; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; cursor: pointer; user-select: none; }
.section-head h2 { font-size: 20px; margin: 0; letter-spacing: -0.3px; }
.section-head .count { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.section-head .chev { transition: transform 0.2s ease; }
.section.collapsed .chev { transform: rotate(-90deg); }
.section.collapsed .grid { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: transform 0.15s ease, border-color 0.15s ease; }
.card:hover { transform: translateY(-2px); border-color: #c9bf9f; }
.card.done { background: #fffbe9; border-color: var(--yellow); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; }
.card-icon svg { width: 24px; height: 24px; }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; padding: 0; }
.check svg { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.check.on { background: var(--yellow); border-color: var(--yellow); }
.check.on svg { opacity: 1; }
.card-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.card-meta .dot::before { content: "●"; font-size: 8px; margin-right: 6px; vertical-align: 2px; color: #c6bda4; }
.card h3 { margin: 0; font-size: 18px; letter-spacing: -0.3px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .btn { margin-top: 4px; }
.pill { display: inline-block; background: var(--cream-2); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--ink); }

/* Chat */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 100px); max-width: 920px; margin: 0 auto; }
.chat-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.chat-head .card-icon { width: 44px; height: 44px; border-radius: 12px; }
.chat-head h1 { font-size: 20px; margin: 0; letter-spacing: -0.3px; }
.chat-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.chat-head .spacer { flex: 1; }
.back { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; display: grid; place-items: center; text-decoration: none; }
.messages { overflow-y: auto; padding: 24px 4px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg .who { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.msg.assistant .who { background: var(--ink); color: var(--yellow); }
.msg.user { flex-direction: row-reverse; }
.msg.user .who { background: var(--blue); color: #fff; }
.bubble { max-width: min(760px, 100%); padding: 14px 18px; border-radius: 16px; line-height: 1.6; font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.msg.assistant .bubble { background: var(--card); border: 1px solid var(--line); border-top-left-radius: 6px; }
.msg.user .bubble { background: var(--ink); color: var(--cream); border-top-right-radius: 6px; white-space: pre-wrap; }
.bubble > :first-child { margin-top: 0; }
.bubble > :last-child { margin-bottom: 0; }
.bubble h1, .bubble h2, .bubble h3 { letter-spacing: -0.3px; line-height: 1.25; margin: 18px 0 8px; }
.bubble h1 { font-size: 21px; } .bubble h2 { font-size: 19px; } .bubble h3 { font-size: 17px; }
.bubble table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0; display: block; overflow-x: auto; }
.bubble th, .bubble td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.bubble th { background: var(--cream-2); }
.bubble code { background: var(--cream-2); padding: 1px 5px; border-radius: 6px; font-size: 13px; }
.bubble pre { background: var(--ink); color: var(--cream); padding: 12px 14px; border-radius: 12px; overflow-x: auto; }
.bubble pre code { background: transparent; padding: 0; color: inherit; }
.bubble a { color: var(--blue); }
.bubble blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--yellow); color: var(--muted); }
.bubble-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.mini-btn svg { width: 14px; height: 14px; }
.mini-btn:hover { border-color: var(--ink); }
.status { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 3px; animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; } .typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.starters { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0 44px; }
.starter { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 600; text-align: left; }
.starter:hover { border-color: var(--ink); background: #fff; }
.composer { padding-top: 12px; }
.composer form { display: flex; gap: 10px; align-items: flex-end; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 16px; }
.composer form:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242, 194, 78, 0.45); }
.composer textarea { border: 0; box-shadow: none !important; padding: 8px 0; resize: none; max-height: 200px; min-height: 24px; line-height: 1.5; }
.composer .btn { padding: 10px 14px; border-radius: 12px; }
.composer .hint { font-size: 12px; color: var(--muted); margin: 8px 4px 0; display: flex; justify-content: space-between; gap: 10px; }

/* Logos */
.logo-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; overflow: hidden; }
.logo-stage { padding: 22px; display: grid; place-items: center; background-image: linear-gradient(45deg, #f4f1e8 25%, transparent 25%), linear-gradient(-45deg, #f4f1e8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f4f1e8 75%), linear-gradient(-45deg, transparent 75%, #f4f1e8 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.logo-stage img { width: 100%; max-width: 480px; height: auto; }
.logo-bar { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.logo-bar .dark-prev { margin-left: auto; }

/* Domains */
.domains { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.dom { font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 4px 10px; border: 1px solid var(--line); background: #fff; }
.dom.available { background: #e8f6e9; border-color: #a6d8ab; color: #1f6b2a; }
.dom.taken { color: #9a9383; text-decoration: line-through; }

/* Policy form */
.policy-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 0 44px; }
.policy-form .full { grid-column: 1 / -1; }
.policy-form label { font-size: 12.5px; }
.policy-form input, .policy-form select, .policy-form textarea { font-size: 14px; padding: 10px 12px; }

/* Recent */
.recent h1 { font-size: 32px; letter-spacing: -0.8px; margin: 0 0 20px; }
.list { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; }
.row:hover { border-color: var(--ink); }
.row .card-icon { width: 40px; height: 40px; border-radius: 11px; }
.row .card-icon svg { width: 18px; height: 18px; }
.row .info { flex: 1; min-width: 0; }
.row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row span { font-size: 13px; color: var(--muted); }
.row .del { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; }
.row .del:hover { background: var(--cream-2); color: #b23a2b; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 60; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-pitch { padding: 40px 24px; }
  .pitch-list { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; width: 270px; transform: translateX(-100%); transition: transform 0.2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0, 0, 0, 0.3); }
  .menu-btn { display: grid; place-items: center; position: fixed; top: 14px; left: 14px; z-index: 41; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--ink); color: var(--cream); }
  .main { padding: 70px 16px 40px; }
  .chat { height: calc(100vh - 110px); }
  .starters, .policy-form { margin-left: 0; }
  .policy-form { grid-template-columns: 1fr; }
  .msg .who { display: none; }
}
.mini-btn { white-space: nowrap; flex: none; }
@media (max-width: 900px) {
  .login-card-wrap { order: -1; padding: 24px 16px 8px; }
  .login-pitch { padding-top: 28px; }
  .chat-head p { display: none; }
}
