/* PCTG System Optimizer Pro — interactive demo theme (matches landing brand) */
:root {
  --bg: #0a0710;
  --bg2: #120b1f;
  --surface: #171126;
  --surface2: #1f1733;
  --border: rgba(255, 255, 255, 0.09);
  --neon: #7B2FFF;
  --neon2: #00FF41;
  --crimson: #D10028;
  --text: #f2eefb;
  --muted: #a79ec2;
  --ok: #00e676;
  --warn: #ffb300;
  --bad: #ff5252;
  --radius: 14px;
  --mono: 'Cascadia Code', 'Consolas', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font-family: inherit; }
a { color: var(--neon); }

/* DEMO BANNER */
.demo-banner {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(123,47,255,0.28), rgba(209,0,40,0.18));
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 8px 18px;
  font-size: 12.5px; color: var(--text);
}
.db-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--neon2); box-shadow: 0 0 10px var(--neon2); flex: none; }
.db-close { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 2px 6px; }
.db-close:hover { color: #fff; }

/* APP SHELL */
.app { display: flex; height: calc(100vh - 36px); }
.sidebar {
  width: 240px; flex: none;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, var(--neon), #9b4dff);
  box-shadow: 0 6px 18px rgba(123,47,255,0.4);
}
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.side-nav { display: grid; grid-auto-rows: auto; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  background: none; border: none; color: var(--muted);
  font-size: 14px; font-weight: 600; text-align: left;
  padding: 11px 13px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: linear-gradient(120deg, rgba(123,47,255,0.22), rgba(123,47,255,0.06)); color: #fff; border: 1px solid rgba(123,47,255,0.4); }
.ni-icon { font-size: 16px; width: 20px; text-align: center; }

.side-foot { margin-top: auto; display: grid; gap: 10px; }
.health-chip {
  font-size: 12px; font-weight: 700; text-align: center;
  padding: 8px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ok);
}
.side-link { font-size: 12px; color: var(--muted); text-decoration: none; display: block; text-align: center; padding: 6px; }
.side-link:hover { color: var(--text); }

/* MAIN */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; border-bottom: 1px solid var(--border);
  background: rgba(10,7,16,0.6);
}
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.lic-badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  background: rgba(0,255,65,0.12); color: var(--neon2); border: 1px solid rgba(0,255,65,0.35);
}
.clock { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.view { flex: 1; overflow-y: auto; padding: 26px; }

/* CARDS + GRID */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative;
}
.card h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.6px; }
.card .big { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.card .big.ok { color: var(--ok); }
.card .big.warn { color: var(--warn); }
.card .big.bad { color: var(--bad); }
.card .big.neon { color: var(--neon); }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.card .mini-bar { height: 6px; border-radius: 999px; background: var(--surface2); margin-top: 12px; overflow: hidden; }
.card .mini-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--neon), #9b4dff); transition: width 0.6s; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.panel .lede { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 700;
  font-size: 14px; border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(120deg, var(--neon), #9b4dff); color: #fff; box-shadow: 0 8px 26px rgba(123,47,255,0.4); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(123,47,255,0.55); }
.btn-green { background: linear-gradient(120deg, #00c853, #00e676); color: #06300f; }
.btn-green:hover:not(:disabled) { transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--neon); color: #fff; }
.btn-danger { background: rgba(255,82,82,0.14); color: var(--bad); border: 1px solid rgba(255,82,82,0.4); }
.btn-danger:hover:not(:disabled) { background: rgba(255,82,82,0.24); }

/* MODULE GRID */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mod {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: flex-start; gap: 13px;
  transition: border-color 0.15s;
}
.mod:hover { border-color: rgba(123,47,255,0.5); }
.mod.done { border-color: rgba(0,255,65,0.45); }
.mod .mi { font-size: 22px; flex: none; }
.mod h4 { font-size: 14.5px; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.mod p { font-size: 12.5px; color: var(--muted); }
.mod .mod-status { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.mod.done .mod-status { color: var(--ok); }

/* CLI CONSOLE */
.console {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  background: #0b0912; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; color: #c9c2e8; height: 300px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
}
.console .t-ok { color: var(--ok); }
.console .t-neon { color: var(--neon); }
.console .t-warn { color: var(--warn); }
.console .t-dim { color: #6f6790; }
.console .t-bad { color: var(--bad); }
.progress-wrap { height: 10px; border-radius: 999px; background: var(--surface2); overflow: hidden; margin: 16px 0 8px; }
.progress-wrap > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--neon), var(--neon2)); transition: width 0.4s; }
.progress-lbl { font-size: 12px; color: var(--muted); text-align: right; }

/* TABLE */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { color: var(--muted); text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.table tr:last-child td { border-bottom: none; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag.ok { background: rgba(0,255,65,0.12); color: var(--ok); }
.tag.neon { background: rgba(123,47,255,0.18); color: #c9a8ff; }
.tag.warn { background: rgba(255,179,0,0.14); color: var(--warn); }

/* FORMS */
.input, .select {
  background: var(--bg2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; font-size: 14px; width: 100%;
}
.input:focus, .select:focus { outline: none; border-color: var(--neon); }
label.field { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .tr-t { font-size: 14px; }
.toggle-row .tr-s { font-size: 12px; color: var(--muted); }
.toggle { position: relative; width: 46px; height: 25px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--border); transition: 0.2s;
}
.toggle .slider::before { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; left: 3px; top: 3px; background: #aaa0cc; transition: 0.2s; }
.toggle input:checked + .slider { background: rgba(123,47,255,0.5); border-color: var(--neon); }
.toggle input:checked + .slider::before { transform: translateX(20px); background: #fff; }

/* BENCHMARK */
.bench-card { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bench-col { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.bench-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 12px; }
.bench-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.07); font-size: 13.5px; }
.bench-row:last-child { border-bottom: none; }
.bench-row b { font-family: var(--mono); font-size: 14px; }
.vs-tag { text-align: center; align-self: center; font-size: 13px; font-weight: 800; color: var(--warn); }

/* LICENCE */
.plan {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.plan.featured { border: 2px solid var(--neon); background: linear-gradient(180deg, var(--surface2), var(--surface)); }
.plan .p-name { font-weight: 800; font-size: 18px; }
.plan .p-price { font-size: 26px; font-weight: 800; color: #fff; }
.plan .p-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; margin: 8px 0 14px; flex: 1; }
.plan ul li { font-size: 13px; color: var(--muted); padding: 3px 0; }
.plan ul li::before { content: "✓ "; color: var(--neon2); font-weight: 700; }
.plan a { text-align: center; }

/* TOASTS + MODAL */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; max-width: 360px; }
.toast {
  background: var(--surface); border: 1px solid rgba(123,47,255,0.5); border-left: 4px solid var(--neon);
  border-radius: 10px; padding: 13px 16px; font-size: 13.5px; box-shadow: 0 8px 26px rgba(0,0,0,0.4);
  animation: slideIn 0.25s ease;
}
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(5,3,10,0.7); backdrop-filter: blur(4px);
}
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 460px; width: calc(100% - 40px); padding: 26px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.modal h3 { font-size: 17px; margin-bottom: 10px; }
.modal p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.modal .code { font-family: var(--mono); background: var(--bg2); border: 1px dashed var(--border); border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 13px; }

@media (max-width: 860px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .side-nav { grid-template-columns: repeat(2, 1fr); }
  .side-foot { display: none; }
  .view { overflow: visible; }
  .bench-card { grid-template-columns: 1fr; }
  .vs-tag { text-align: left; }
}