/* Lawang — tema hacker oranye modern (lihat ui-design.md).
   Restraint: gelap, monospace, satu aksen oranye dipakai hemat. */

:root {
  --bg: #0a0a0a;
  --bg-panel: #0d0d0d;
  --bg-term: #060606;
  --bg-active: #1a1000;
  --border: #2a1a08;
  --accent: #ff8c00;
  --accent-soft: #ffb454;
  --muted: #7a5a2a;
  --dim: #5a4020;
  --ok: #5a8a5a;
  --err: #ff4444;
  --text: #ffb454;
  --font: ui-monospace, 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

/* Scanline samar — efek CRT halus di seluruh layar. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 140, 0, 0.02) 0px,
    rgba(255, 140, 0, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
}

a {
  color: var(--accent);
}

button,
input,
select {
  font-family: var(--font);
  font-size: 14px;
}

.muted {
  color: var(--muted);
}
.err {
  color: var(--err);
}
.ok {
  color: var(--ok);
}

/* --- Tombol & input --- */
button {
  background: transparent;
  color: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}
button:hover {
  border-color: var(--accent);
}
button.primary {
  border-color: var(--accent);
  color: var(--accent);
}
button:disabled {
  color: var(--dim);
  cursor: not-allowed;
}

input,
select {
  background: var(--bg-term);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  width: 100%;
}
input:focus,
select:focus,
button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 5px;
  letter-spacing: 0.3px;
}

/* --- Login --- */
.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.brand svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
}
.brand h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}
.tagline {
  color: var(--dim);
  font-size: 12px;
  margin: 0 0 22px;
}
.field {
  margin-bottom: 14px;
}
.step {
  display: none;
}
.step.active {
  display: block;
}
.boot {
  min-height: 18px;
  font-size: 12px;
  margin-top: 14px;
}
.row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.row button {
  flex: 1;
}

/* --- App layout --- */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 48px 1fr;
  grid-template-areas: 'head head' 'side main';
  height: 100%;
}
.topbar {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.topbar .brand h1 {
  font-size: 16px;
}
.topbar .brand svg {
  width: 18px;
  height: 18px;
}

.sidebar {
  grid-area: side;
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
  overflow-y: auto;
  padding: 12px;
}
.sidebar h2 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin: 4px 4px 10px;
}
.host {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 9px 11px;
  line-height: 1.3;
}
.host.active {
  border-color: var(--accent);
  background: var(--bg-active);
}
.host .label {
  color: var(--accent-soft);
  display: block;
}
.host .meta {
  color: var(--muted);
  font-size: 11px;
}
.host .pending {
  color: var(--err);
}
.host-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.host-actions button {
  padding: 3px 8px;
  font-size: 11px;
}
.empty {
  color: var(--dim);
  font-size: 12px;
  padding: 8px 4px;
}

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-term);
}
.term-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dots i:nth-child(1) {
  background: #c0392b;
}
.dots i:nth-child(2) {
  background: #d8a02a;
}
.dots i:nth-child(3) {
  background: var(--accent);
}
.term-title {
  color: var(--muted);
  font-size: 12px;
}
.status {
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
}
#terminal {
  flex: 1;
  min-height: 0;
  padding: 6px;
}

/* --- Panel form VPS (overlay) --- */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
}
.overlay.active {
  display: grid;
}
.panel {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 22px;
}
.panel h3 {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 15px;
}

/* --- Mobile --- */
@media (max-width: 640px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: 'head' 'main';
  }
  .sidebar {
    position: fixed;
    top: 48px;
    bottom: 0;
    left: 0;
    width: 80%;
    max-width: 280px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    z-index: 50;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .menu-btn {
    display: inline-flex;
  }
}
.menu-btn {
  display: none;
}
