/* AXIONMIND Studio — sealed build workspace. Identitas AXIONMIND: dark ungu default, sudut terpotong, glow. */
:root {
  --purple: #a855f7; --purple-deep: #9333ea; --purple-soft: #c084fc; --purple-bg: #241733;
  --bg: #0c0813; --surface: #150f1e; --line: #2f2240; --line-soft: #1e1529;
  --text: #efe9f7; --muted: #9b8fae; --good: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --glow: 0 0 16px rgba(168,85,247,.25);
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="light"] {
  --purple: #8b5cf6; --purple-deep: #7c3aed; --purple-soft: #a78bfa; --purple-bg: #f3eeff;
  --bg: #fafafa; --surface: #ffffff; --line: #e5e7eb; --line-soft: #f1f3f5;
  --text: #18181b; --muted: #71717a; --good: #16a34a; --warn: #d97706; --bad: #dc2626;
  --glow: none;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: radial-gradient(1000px 420px at 50% -8%, #221536 0%, var(--bg) 58%);
  color: var(--text); font-family: var(--sans); height: 100vh; display: flex; flex-direction: column; overflow: hidden;
}
html[data-theme="light"] body { background: var(--bg); }
button { font-family: var(--sans); cursor: pointer; }
.cut { clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 52px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line);
  flex: none; white-space: nowrap; overflow-x: auto; overflow-y: hidden;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; }
.brand { text-decoration: none; }
.brand-v { font: 900 15px/1 "Arial Black", Arial, sans-serif; letter-spacing: 3px; background: linear-gradient(180deg, var(--purple-soft), var(--purple-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crumb { color: var(--muted); } .crumb-page { font-size: 14px; }
.ticker { display: flex; align-items: center; gap: 8px; font: 12px/1 var(--mono); margin-left: 10px; }
.ticker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 6px var(--purple); }
.ticker b { font-weight: 700; }
.ticker .up { color: var(--good); font-style: normal; } .ticker .down { color: var(--bad); font-style: normal; }
.tk-sep { color: var(--line); } .tk-dim { color: var(--muted); }
.chip { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 0; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); padding: 8px 13px; font: 12px/1 var(--mono); color: var(--text); }
.chip em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--purple); background: var(--purple-bg); border-radius: 4px; padding: 2px 5px; }
.dot-g { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.iconbtn { background: none; border: none; font-size: 16px; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.iconbtn:hover { background: var(--line-soft); color: var(--text); }
.iconbtn.sm { font-size: 13px; }
.cta { background: var(--purple); color: #fff; border: none; border-radius: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); padding: 10px 18px; font-size: 13px; font-weight: 700; letter-spacing: .04em; box-shadow: var(--glow); }
.cta:hover { background: var(--purple-deep); }
.txtbtn { background: none; border: none; color: var(--muted); font-size: 13px; padding: 7px 9px; border-radius: 8px; }
.txtbtn:hover { background: var(--line-soft); color: var(--text); }
.txtbtn:disabled { opacity: .4; cursor: not-allowed; }
.txtbtn.new { color: var(--text); font-weight: 600; }
.tb-sep { width: 1px; height: 22px; background: var(--line); }

/* ---------- split layout ---------- */
.split { flex: 1; display: grid; grid-template-columns: 1fr 560px; min-height: 0; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .panel { display: none; } }

/* ---------- left workspace ---------- */
.work { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.work-scroll { flex: 1; overflow-y: auto; padding: 28px 36px; }
.hero { max-width: 660px; margin: 7vh auto 0; text-align: center; }
.hero-ico {
  width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--purple); color: #14091f; font-size: 26px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 28px rgba(168,85,247,.5);
}
.hero h1 { font-size: 27px; font-weight: 800; letter-spacing: .01em; }
.hero h1 span { color: var(--purple); }
.hero p { color: var(--muted); margin: 12px auto 26px; line-height: 1.6; max-width: 460px; font-size: 14.5px; }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
@media (max-width: 760px) { .examples { grid-template-columns: 1fr; } }
.ex {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--purple); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  padding: 15px 16px; font-size: 13.5px; color: var(--text); line-height: 1.45; text-align: left;
}
.ex:hover { border-color: var(--purple); background: var(--purple-bg); box-shadow: var(--glow); }
.sealed-note { color: var(--muted); font-size: 12.5px; margin-top: 26px; }

/* pixel wordmark dua baris (ala logo Claude Code, ungu) */
.pixlogo {
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  margin: 3vh auto 40px;
  filter: drop-shadow(0 0 26px rgba(168,85,247,.4));
}
.pixlogo .pl {
  position: relative; display: inline-block;
  font-family: "Press Start 2P", monospace; font-size: clamp(46px, 7.2vw, 92px);
  color: var(--purple); letter-spacing: 3px; line-height: 1;
}
.pixlogo .pl::before {
  content: attr(data-text); position: absolute; left: -11px; top: 11px; z-index: -1;
  color: transparent; -webkit-text-stroke: 2.5px var(--purple-deep); opacity: .85;
}
.pixlogo .pl::after {
  content: attr(data-text); position: absolute; left: -20px; top: 20px; z-index: -2;
  color: transparent; -webkit-text-stroke: 1.5px var(--purple-deep); opacity: .4;
}
html[data-theme="light"] .pixlogo { filter: none; }

/* build log */
.log { max-width: 760px; margin: 0 auto; }
.msg { margin-bottom: 14px; }
.msg.you { text-align: right; }
.msg.you .bubble { display: inline-block; background: var(--purple); color: #fff; border-radius: 14px 14px 4px 14px; padding: 10px 14px; font-size: 14px; max-width: 80%; text-align: left; }
.msg .stagecard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font: 12.5px/1.8 var(--mono); white-space: pre-wrap;
}
.msg .stagecard .ok { color: var(--good); } .msg .stagecard .pp { color: var(--purple); }
.msg .stagecard .wr { color: var(--warn); } .msg .stagecard .dim { color: var(--muted); }

/* composer */
.composer { flex: none; padding: 14px 36px 20px; }
.composer-box {
  max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 0; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  padding: 14px 18px 12px; box-shadow: var(--glow);
}
.composer-box:focus-within { border-color: var(--purple); }
.composer textarea {
  width: 100%; border: none; background: none; resize: none; color: var(--text);
  font: 14.5px/1.5 var(--sans); outline: none;
}
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.est { font-size: 12px; color: var(--muted); } .est b { color: var(--text); } .est.dim { font-size: 11px; }
.build { background: var(--purple); color: #fff; border: none; border-radius: 0; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px)); padding: 11px 22px; font-size: 13.5px; font-weight: 800; letter-spacing: .04em; box-shadow: var(--glow); }
.build:hover { background: var(--purple-deep); }
.build:disabled { opacity: .5; cursor: wait; }

/* ---------- right panel ---------- */
.panel { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.panel-tabs { display: flex; align-items: center; gap: 4px; padding: 9px 12px; border-bottom: 1px solid var(--line); flex: none; }
.ptab { background: none; border: none; border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 7px 12px; }
.ptab.sel { background: var(--line-soft); color: var(--text); }
.ptab-actions { margin-left: auto; }
.panel-body { flex: 1; display: grid; grid-template-columns: 170px 1fr; min-height: 0; }
.filetree { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; }
.ft-empty, .ed-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 40px 14px; line-height: 1.6; }
.ft-file {
  display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 7px;
  font: 12px/1.3 var(--mono); color: var(--text); padding: 8px 9px; word-break: break-all;
}
.ft-file:hover { background: var(--line-soft); }
.ft-file.sel { background: var(--purple-bg); color: var(--purple-deep); font-weight: 700; }
html[data-theme="dark"] .ft-file.sel { color: var(--purple-soft); }
.ft-file .badge { float: right; font-size: 9px; color: var(--good); }
.editor-wrap { position: relative; min-width: 0; min-height: 0; display: flex; }
.editor { flex: 1; overflow: auto; font: 12.5px/1.65 var(--mono); }
.editor pre { padding: 16px 18px; white-space: pre; min-width: 100%; }
.editor .ln { color: var(--muted); user-select: none; display: inline-block; width: 34px; }
.editor .cm { color: var(--muted); font-style: italic; }
.editor .kw { color: var(--purple-deep); font-weight: 600; }
html[data-theme="dark"] .editor .kw { color: var(--purple-soft); }
.editor .st { color: var(--good); }
.editor.preview { display: flex; }
.editor[hidden] { display: none; }
.editor.preview iframe { flex: 1; border: none; background: #fff; }
.diff pre { padding: 16px 18px; white-space: pre-wrap; }
.diff .add { background: rgba(22,163,74,.12); color: var(--good); display: block; }
.diff .del { background: rgba(220,38,38,.10); color: var(--bad); display: block; text-decoration: line-through; }
.diff .ctx { color: var(--muted); display: block; }
.diff h4 { font: 700 12px/2.4 var(--mono); color: var(--purple); border-bottom: 1px solid var(--line); padding: 0 18px; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line); flex: none; font-size: 12px; color: var(--muted); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(15,10,25,.45); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.mbox {
  position: relative; width: 480px; max-width: 94vw; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--purple); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 28px; box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.mclose { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 15px; }
.mbox h3 { font-size: 19px; margin-bottom: 8px; }
.msub { color: var(--muted); font-size: 13px; line-height: 1.55; margin-bottom: 18px; }
.providers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.prov {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  padding: 12px 10px; text-align: left; color: var(--text);
}
.prov b { display: block; font-size: 13px; margin-bottom: 5px; }
.prov .free { color: var(--purple); font-size: 11px; font-weight: 700; }
.prov .soon { color: var(--warn); font-size: 10.5px; }
.prov.sel { border-color: var(--purple); background: var(--purple-bg); }
.prov.off { opacity: .55; cursor: not-allowed; }
.mlabel { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.mlabel .dim { color: var(--muted); font-weight: 400; }
.mlabel input[type="text"], .mlabel input[type="password"], .mlabel select, .mlabel textarea {
  display: block; width: 100%; margin-top: 7px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: 13px/1.4 var(--mono);
}
.mlabel input:focus, .mlabel select:focus, .mlabel textarea:focus { outline: none; border-color: var(--purple); }
.mlabel input[type="range"] { width: 100%; margin-top: 10px; accent-color: var(--purple); }
.mlabel b { color: var(--purple); }
.range-marks { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; font-weight: 400; margin-top: 4px; }
.range-marks i { font-style: normal; }
.sealedbox { background: var(--purple-bg); color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 12px; line-height: 1.55; margin-bottom: 18px; }
.mactions { display: flex; justify-content: flex-end; gap: 10px; }
.vrow { display: flex; gap: 8px; }
.vrow input { flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: 12px/1 var(--mono); }
.vout { margin-top: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font: 12px/1.8 var(--mono); white-space: pre-wrap; word-break: break-all; }
.vout .ok { color: var(--good); } .vout .pp { color: var(--purple); } .vout .wr { color: var(--warn); } .vout .dim { color: var(--muted); }
.hlist { display: flex; flex-direction: column; gap: 8px; }
.hitem { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.hitem .dim { color: var(--muted); font-size: 11.5px; }
.hitem button { background: var(--purple-bg); color: var(--purple-deep); border: none; border-radius: 7px; padding: 7px 12px; font-size: 12px; font-weight: 700; }

/* ---------- netstats strip ---------- */
.netstats { display: flex; gap: 10px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.ns {
  background: var(--surface); border: 1px solid var(--line); padding: 10px 16px; min-width: 128px; text-align: left;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}
.ns b { display: block; font: 700 16px/1.2 var(--mono); color: var(--purple-soft); }
html[data-theme="light"] .ns b { color: var(--purple-deep); }
.ns span { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.topbar .brand img { height: 17px; display: block; }
