* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans KR", sans-serif;
  font-size: 13px;
}
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.muted { color: #556; padding: 8px 2px; }

/* ---------- login ---------- */
.login-view {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2a4a, #0d1526 70%);
}
.login-card {
  width: 300px; background: #141b2e; border: 1px solid #233356;
  border-radius: 10px; padding: 28px 24px; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.login-logo { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 12px;
  background: linear-gradient(135deg,#3fa9f5,#2f6fe0); position: relative; }
.login-logo::after { content:""; position:absolute; inset:14px; border-radius:6px;
  background:#0b1d33; mask:radial-gradient(circle at 50% 50%, transparent 34%, #6fb8ff 36% 44%, transparent 46%); }
.login-title { font-size: 18px; font-weight: 700; color: #7db9f7; letter-spacing: 1px; }
.login-sub { color: #8a93a6; font-size: 12px; margin: 6px 0 18px; }
.login-input {
  width: 100%; background: #0d1424; border: 1px solid #24406b; color: #eef;
  padding: 10px; border-radius: 6px; font-size: 13px; outline: none;
}
.login-input:focus { border-color: #4f9bf0; }
.login-error { color: #ff6b6b; font-size: 12px; min-height: 18px; margin-top: 8px; }
.login-btn {
  width: 100%; margin-top: 10px; padding: 10px; border-radius: 6px; border: none;
  background: linear-gradient(135deg,#3a9dff,#2c6fe0); color: #fff; font-size: 14px; cursor: pointer;
}
.login-btn:hover { filter: brightness(1.08); }

/* ---------- toolbar ---------- */
.toolbar {
  background: #16213e; border-bottom: 1px solid #0f3460;
  padding: 6px 12px; display: flex; align-items: center; gap: 6px; height: 44px;
}
.toolbar-title { color: #4fc3f7; font-size: 15px; font-weight: 700; margin-right: 12px; }
.toolbar-btn {
  background: #0f3460; border: 1px solid #1a5276; color: #ccc;
  padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px;
}
.toolbar-btn:hover { background: #1a5276; color: #fff; }
.toolbar-btn.active { background: #1a5276; color: #4fc3f7; }
.toolbar-sep { width: 1px; height: 22px; background: #2c3e50; margin: 0 6px; }
.toolbar-spacer { flex: 1; }
.conn-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9aa; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.conn-dot.offline { background: #777; box-shadow: none; }
.lang-btn {
  background: #12233f; border: 1px solid #27415f; color: #aab; padding: 3px 10px;
  border-radius: 4px; cursor: pointer; font-size: 11px;
}
.lang-btn:hover { color: #fff; }

/* ---------- layout ---------- */
.app { height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; display: flex; min-height: 0; }

/* ---------- sidebar ---------- */
.sidebar { width: 230px; background: #16213e; border-right: 1px solid #0f3460; display: flex; flex-direction: column; }
.sidebar-header { padding: 10px 12px; background: #0f3460; font-size: 12px; color: #7fb8f0;
  display: flex; align-items: center; justify-content: space-between; }
.sidebar-search { padding: 8px; border-bottom: 1px solid #0f3460; }
.sidebar-search input { width: 100%; background: #0d1b2a; border: 1px solid #1a5276; color: #ccc;
  padding: 5px 8px; border-radius: 4px; font-size: 12px; outline: none; }
.sidebar-search input::placeholder { color: #556; }
.dev-list { flex: 1; overflow-y: auto; }
.sidebar-filter { padding: 8px; border-bottom: 1px solid #0f3460; }
.filter-btn {
  width: 100%; display: flex; align-items: center; gap: 6px;
  background: #0d1b2a; border: 1px solid #1a5276; color: #ccc;
  padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 12px;
  outline: none; text-align: left;
}
.filter-btn:hover { background: #0f3460; color: #fff; }
.filter-btn.active { background: #1a5276; border-color: #4fc3f7; color: #4fc3f7; }
.filter-count { margin-left: auto; background: #3a9dff; color: #fff; border-radius: 8px; padding: 0 6px; font-size: 10px; }
.filter-btn.active .filter-count { background: #f1c40f; color: #1a1a2e; }
.dev-item { padding: 8px 12px; border-bottom: 1px solid #0d1b2a; cursor: pointer;
  display: flex; align-items: center; gap: 9px; }
.dev-item:hover { background: #0f3460; }
.dev-item.active { background: #1a5276; border-left: 3px solid #4fc3f7; }
.dev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dev-dot.online { background: #2ecc71; }
.dev-dot.offline { background: #555; }
.dev-dot.game { background: #f1c40f; box-shadow: 0 0 6px #f1c40f; }
.dev-dot.nosig { background: #e67e22; }
.dev-info { flex: 1; min-width: 0; }
.dev-name { font-size: 12px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-ip { font-size: 10px; color: #778; }
.badge { background: #3a9dff; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; }

/* ---------- remote area ---------- */
.remote-area { flex: 1; display: flex; flex-direction: column; background: #0d1b2a; min-width: 0; }
.tab-content { display: none; height: 100%; }
.tab-content.active { display: flex; flex-direction: column; }
.remote-screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px; }
.screen-placeholder {
  width: 100%; height: 100%; border: 1px dashed #1a5276; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: #0a1628;
}
.fake-desktop { width: 100%; height: 100%; position: relative; overflow: hidden; display: flex;
  align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #0c1a30 0 12px, #0a1527 12px 24px); }
.connecting-msg { color: #4fc3f7; font-size: 14px; text-align: center; padding: 0 20px; }
#live-screen .no-signal { color: #f39c12; font-weight: 600; }
#live-screen img { width: 100%; height: 100%; object-fit: contain; }
.panel-page { padding: 18px; }
.panel-page > div:first-child { font-size: 13px; color: #7fb8f0; margin-bottom: 8px; }

/* ---------- statusbar ---------- */
.statusbar { background: #0f3460; padding: 4px 12px; font-size: 10px; color: #779;
  display: flex; gap: 18px; border-top: 1px solid #1a5276; min-height: 22px; align-items: center; }
.status-key { color: #556; } .status-val { color: #9aa; }

/* ---------- right panel ---------- */
.right-panel { width: 240px; background: #16213e; border-left: 1px solid #0f3460; overflow-y: auto; }
.panel-section { border-bottom: 1px solid #0f3460; }
.panel-section-header { padding: 8px 12px; background: #0f3460; font-size: 11px; color: #7fb8f0; }
.panel-section-body { padding: 8px 12px; }
.panel-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.panel-label { font-size: 11px; color: #889; }
.panel-value { font-size: 11px; color: #cdd; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0d1b2a; }
::-webkit-scrollbar-thumb { background: #1a5276; border-radius: 2px; }

/* ---------- file browser ---------- */
.file-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #16213e; border-bottom: 1px solid #0f3460; }
.file-path-span { font-size: 12px; color: #7fb8f0; white-space: nowrap; }
.file-path-bar { flex: 1; display: flex; gap: 6px; }
.file-path-bar input { flex: 1; background: #0d1b2a; border: 1px solid #1a5276;
  color: #ccc; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-family: monospace; outline: none; }
.file-browser { flex: 1; overflow-y: auto; padding: 4px 0; font-size: 12px; }
.file-header { display: flex; padding: 6px 12px; background: #1a2a44;
  color: #889; font-size: 11px; border-bottom: 1px solid #0f3460; }
.file-header span { flex: 1; }
.file-header span:nth-child(2) { width: 80px; flex: none; text-align: right; }
.file-header span:nth-child(3) { width: 160px; flex: none; text-align: right; }
.file-row { display: flex; padding: 4px 12px; border-bottom: 1px solid #0a1a2e;
  color: #cdd; cursor: default; }
.file-row:hover { background: #1a2a44; }
.file-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-size { width: 80px; flex: none; text-align: right; color: #889; }
.file-row .file-mtime { width: 160px; flex: none; text-align: right; color: #667; }
.file-row.file-up { color: #4fc3f7; cursor: pointer; }
.file-row.file-up:hover { background: #0f3460; }
.file-row.file-dir { cursor: pointer; }
.file-row.file-dir:hover { background: #1a2a44; }

/* ---------- process list ---------- */
.proc-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #16213e; border-bottom: 1px solid #0f3460; }
.proc-toolbar > span { font-size: 12px; color: #7fb8f0; }
.proc-search-wrapper { margin-left: auto; width: 180px; }
.proc-search-wrapper input { width: 100%; background: #0d1b2a; border: 1px solid #1a5276;
  color: #ccc; padding: 4px 8px; border-radius: 4px; font-size: 12px; outline: none; }
.proc-table-wrap { flex: 1; overflow-y: auto; }
.proc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.proc-table th { background: #1a2a44; padding: 6px 12px; text-align: left;
  color: #889; font-weight: 400; border-bottom: 1px solid #0f3460; position: sticky; top: 0; }
.proc-table td { padding: 3px 12px; border-bottom: 1px solid #0a1a2e; color: #cdd; }
.proc-table tr:hover td { background: #1a2a44; }
.proc-table th:last-child, .proc-table td:last-child { width: 60px; text-align: center; }
.kill-btn { font-size: 11px; padding: 2px 8px !important; }