:root {
  --bg: #03110a;
  --bg-2: #061c12;
  --panel: rgba(6, 28, 18, 0.88);
  --panel-strong: rgba(10, 39, 24, 0.98);
  --line: rgba(86, 255, 154, 0.18);
  --text: #dfffe9;
  --muted: #82c79b;
  --accent: #56ff9a;
  --danger: #ff5e7e;
  --glow: 0 0 24px rgba(86,255,154,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(86,255,154,.16), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(56,140,255,.08), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #020907 100%);
}
.noise, .scanlines {
  position: fixed; inset: 0; pointer-events: none;
}
.noise { opacity: .07; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="4"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="1"/></svg>'); }
.scanlines { opacity: .08; background: repeating-linear-gradient(180deg, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px, transparent 2px, transparent 4px); }
#app { max-width: 1400px; margin: 0 auto; padding: 26px; }
.shell {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6,28,18,.92), rgba(2,10,7,.92));
  border-radius: 26px;
  box-shadow: 0 25px 80px rgba(0,0,0,.5), var(--glow);
  overflow: hidden;
}
.topbar {
  display:flex; justify-content:space-between; align-items:center; padding: 18px 20px;
  border-bottom: 1px solid var(--line); background: rgba(9,32,22,.84);
}
.brand { font-family: 'Syne', sans-serif; letter-spacing: .08em; text-transform: uppercase; font-size: 1.1rem; }
.status { color: var(--muted); font-size: .85rem; }
.main { display:grid; grid-template-columns: 320px 1fr; min-height: 78vh; }
.sidebar { border-right: 1px solid var(--line); padding: 18px; background: rgba(5,17,11,.82); }
.content { padding: 20px; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: var(--glow); }
.card + .card { margin-top: 16px; }
.login-card { max-width: 720px; margin: 8vh auto; padding: 28px; }
.login-grid { display:grid; gap: 18px; }
.hacker-title { font-family: 'Syne', sans-serif; font-size: clamp(2.8rem, 7vw, 5rem); margin: 0; line-height: .9; }
.sub { color: var(--muted); line-height: 1.7; }
.field { display:grid; gap: 8px; }
label { color: var(--muted); font-size: .83rem; text-transform: uppercase; letter-spacing: .12em; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); background: rgba(2,10,7,.95); color: var(--text);
  border-radius: 14px; padding: 14px 16px; font: inherit; outline: none;
}
textarea { min-height: 360px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus { box-shadow: 0 0 0 2px rgba(86,255,154,.18), var(--glow); }
button {
  border: 1px solid var(--line); background: rgba(7,32,19,.96); color: var(--text); padding: 12px 16px;
  border-radius: 14px; font: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
button:hover { transform: translateY(-1px); box-shadow: var(--glow); }
button.primary { background: linear-gradient(180deg, rgba(86,255,154,.24), rgba(28,123,69,.25)); }
button.danger { border-color: rgba(255,94,126,.35); color: #ffb9c7; }
.row { display:flex; gap: 10px; flex-wrap: wrap; }
.note-list { display:grid; gap: 10px; max-height: 42vh; overflow:auto; padding-right: 4px; }
.note-item {
  padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(7,24,16,.9); cursor:pointer;
}
.note-item.active { border-color: rgba(86,255,154,.6); box-shadow: var(--glow); }
.note-item h4 { margin: 0 0 8px; font-size: .94rem; }
.note-item p { margin: 0; color: var(--muted); font-size: .83rem; }
.kpis { display:grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(6,23,15,.8); }
.kpi span { display:block; font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.kpi strong { display:block; margin-top: 6px; font-size: 1.05rem; }
.editor-head { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom: 14px; }
.tiny { font-size: .78rem; color: var(--muted); }
.empty {
  border: 1px dashed var(--line); border-radius: 20px; padding: 28px; color: var(--muted);
  min-height: 360px; display:flex; align-items:center; justify-content:center; text-align:center;
}
.pill { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; border:1px solid var(--line); color: var(--muted); }
.error { color: #ffb9c7; }
@media (max-width: 980px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .kpis { grid-template-columns: 1fr; }
}
