* { box-sizing: border-box; margin: 0; }
:root {
  --bg: #f7f7f8; --panel: #ffffff; --surface: #f4f3f7; --border: #e6e6ea;
  --text: #18181b; --muted: #71717a; --accent: #7c5cff; --accent-dark: #6842ff;
  --success: #15803d; --success-bg: #e9f9ef; --danger: #dc2626;
  --shadow: 0 1px 2px rgba(17,17,26,0.04), 0 4px 16px rgba(17,17,26,0.04);
}
body { background: var(--bg); color: var(--text); font: 16px/1.65 -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 14px; font-family: ui-monospace, monospace; }
.muted { color: var(--muted); font-size: 14px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
header.nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 { font-size: 46px; line-height: 1.12; letter-spacing: -1.5px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.sub { color: var(--muted); font-size: 19px; max-width: 620px; margin: 20px auto 0; }
.price-tag { display: inline-block; margin-top: 28px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 34px; box-shadow: var(--shadow); }
.price-tag .amount { font-size: 40px; font-weight: 700; }
.price-tag .amount small { font-size: 17px; color: var(--muted); font-weight: 400; }
.price-tag .never { color: var(--success); font-size: 14px; margin-top: 2px; }

.build-cta { display: inline-block; color: var(--accent-dark); border: 1px solid #d9d1ff; background: #f2eeff;
  padding: 12px 22px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.build-cta:hover { background: #e9e2ff; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0; }
.compare .col { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.compare .col.them { background: var(--surface); box-shadow: none; }
.compare h3 { font-size: 17px; margin-bottom: 12px; }
.compare ul { list-style: none; }
.compare li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.compare li:last-child { border-bottom: 0; }
.compare .bad { color: var(--danger); }
.compare .good { color: var(--success); }

.signup { background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; margin: 24px 0 64px; box-shadow: var(--shadow); }
.signup h2 { font-size: 24px; margin-bottom: 6px; }
.signup .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.signup label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.signup input, .signup textarea { width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); padding: 11px 13px; font-size: 15px; font-family: inherit; }
.signup textarea { resize: vertical; }
.signup input:focus, .signup textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,0.12); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .12s; }
.plan-card:hover { border-color: #cdbffb; }
.plan-card input { position: absolute; opacity: 0; }
.plan-card b { font-size: 14px; }
.plan-card .pp { color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.plan-card small { color: var(--muted); font-size: 12px; }
.plan-card.selected { border-color: var(--accent); background: #f6f3ff; box-shadow: 0 0 0 1px var(--accent) inset; }
.site-field { display: flex; align-items: center; gap: 8px; }
.site-field .suffix { color: var(--muted); font-size: 14px; white-space: nowrap; }
button.cta { margin-top: 20px; width: 100%; background: var(--accent); color: #fff; border: 0;
  border-radius: 11px; padding: 15px; font-size: 17px; font-weight: 600; cursor: pointer; }
button.cta:hover { background: var(--accent-dark); }
button.cta:disabled { opacity: 0.6; cursor: wait; }
.form-error { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 20px; }

footer { color: var(--muted); font-size: 13px; text-align: center; padding: 32px 0 48px; }

.card-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px; max-width: 560px; width: 100%; box-shadow: var(--shadow); }
.card h1 { font-size: 26px; margin-bottom: 10px; }
.card p { margin-bottom: 14px; }
table.creds { width: 100%; border-collapse: collapse; margin: 18px 0; }
table.creds td { padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 15px; }
table.creds td:first-child { color: var(--muted); width: 40%; }

.view-site { display: inline-block; background: var(--accent); color: #fff; padding: 10px 20px;
  border-radius: 9px; text-decoration: none; font-weight: 600; }
.chat { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 20px; }
.chat h2 { font-size: 18px; margin-bottom: 4px; }
.chat-log { max-height: 260px; overflow-y: auto; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 9px 13px; border-radius: 12px; font-size: 14px; max-width: 85%; white-space: pre-wrap; }
.msg.you { background: var(--accent); color: #fff; align-self: flex-end; }
.msg.ai { background: var(--surface); align-self: flex-start; }
.chat form { display: flex; gap: 8px; }
.chat input { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 10px 12px; font-size: 14px; }
.chat input:focus { outline: none; border-color: var(--accent); }
.chat button { background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }

.dash-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
button.ghost:hover { color: var(--text); border-color: var(--accent); }

.dash-site { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.dash-site-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 3px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 10px; }
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.warn { background: #fef3e2; color: #b45309; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 9px 16px;
  border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 600; }
.btn:hover { background: var(--accent-dark); }

.modal-bg { position: fixed; inset: 0; background: rgba(17,17,26,0.45); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-bg.on { display: flex; }
.modal-sheet { background: var(--panel); border-radius: 18px; padding: 26px; width: 460px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(17,17,26,0.25); }
.modal-sheet .plans { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }

/* hPanel-style app shell */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 234px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.side-logo { font-weight: 700; font-size: 20px; letter-spacing: -0.5px; padding: 4px 10px 18px; }
.side-logo span { color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 10px; padding: 11px 12px; font-size: 14.5px;
  font-weight: 500; color: var(--text); cursor: pointer; text-decoration: none; font-family: inherit; }
.side-link:hover { background: var(--surface); }
.side-link.active { background: #f2eeff; color: var(--accent-dark); }
.side-ic { font-size: 16px; width: 20px; text-align: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-studio { background: #f2eeff; color: var(--accent-dark); justify-content: flex-start; font-weight: 600; }
.side-studio:hover { background: #e9e2ff; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-top: 1px solid var(--border); padding-top: 14px; }
.side-uname { font-size: 13px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-out { background: transparent; border: 1px solid var(--border); border-radius: 8px; width: 30px; height: 30px;
  cursor: pointer; color: var(--muted); font-size: 15px; }
.side-out:hover { color: var(--danger); border-color: var(--danger); }

.main { flex: 1; min-width: 0; padding: 22px 32px 48px; max-width: 1000px; }
.topbar { margin-bottom: 20px; }
.topbar h1 { font-size: 24px; margin: 0; }
.page.hidden { display: none; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.sc-label { font-size: 12.5px; color: var(--muted); }
.sc-val { font-size: 24px; font-weight: 700; margin: 3px 0; }
.sc-val small { font-size: 13px; color: var(--muted); font-weight: 500; }
.sc-sub { font-size: 12px; color: var(--muted); }
.dom-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 7px; font-size: 14px; }
.dom-row.taken { opacity: 0.6; }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .side-user { border: 0; padding-top: 8px; }
  .main { padding: 18px; }
  .cards4 { grid-template-columns: repeat(2, 1fr); }
}

.hosting-section { margin-bottom: 20px; }
.hosting-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hosting-head h2 { font-size: 18px; margin: 0; }
.hosting-table { background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; }
.hosting-row { display: grid; grid-template-columns: 2fr 1.3fr 0.9fr 0.9fr 1.6fr; gap: 14px;
  align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.hosting-row:last-child { border-bottom: 0; }
.hosting-row-head { background: var(--surface); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); font-weight: 600; padding: 10px 22px; }
.h-product { display: flex; align-items: center; gap: 10px; }
.h-icon { font-size: 20px; width: 34px; height: 34px; border-radius: 9px; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hosting-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hosting-actions .btn { padding: 6px 12px; font-size: 12.5px; }
@media (max-width: 780px) {
  .hosting-row { grid-template-columns: 1fr; gap: 6px; }
  .hosting-row-head { display: none; }
  .hosting-actions { justify-content: flex-start; }
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 48px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.chat-panel { display: flex; flex-direction: column; min-height: 420px; }
.chat-panel .chat-log { flex: 1; max-height: none; }
.chat-panel form { display: flex; gap: 8px; }
.chat-panel input { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 10px 12px; font-size: 14px; }
.chat-panel input:focus { outline: none; border-color: var(--accent); }
.chat-panel button { background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; }
.dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bill-amount { font-size: 30px; font-weight: 700; }
.bill-amount small { font-size: 15px; color: var(--muted); font-weight: 400; }
.bill-lock { color: var(--success); font-size: 13px; margin: 4px 0 8px; }
table.mini { width: 100%; font-size: 13px; border-collapse: collapse; }
table.mini td { padding: 5px 0; }
table.mini td:first-child { color: var(--muted); }
table.mini td:last-child { text-align: right; }
.fld { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 5px; }
.card input { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 11px 13px; font-size: 15px; }
.card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,92,255,0.12); }
.card .cta { margin-top: 16px; width: 100%; background: var(--accent); color: #fff; border: 0;
  border-radius: 11px; padding: 13px; font-size: 16px; font-weight: 600; cursor: pointer; }
.card .cta:hover { background: var(--accent-dark); }

.editor-bar { background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.editor-bar form { display: flex; gap: 8px; margin-bottom: 6px; }
.editor-bar input { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); padding: 11px 13px; font-size: 14px; }
.editor-bar input:focus { outline: none; border-color: var(--accent); }
.editor-bar button { background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 11px 22px; font-size: 14px; font-weight: 600; cursor: pointer; }
.editor-bar button:disabled { opacity: 0.6; cursor: wait; }
.editor-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 16px;
  background: #fff; margin-bottom: 40px; }

@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } }

.admin { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.admin h1 { font-size: 22px; margin-bottom: 18px; }
.admin table { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.admin th, .admin td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin th { color: var(--muted); font-weight: 500; }

@media (max-width: 720px) {
  .hero h1 { font-size: 32px; }
  .compare, .signup .grid { grid-template-columns: 1fr; }
}
