/* Placement Manager base styles */
:root{
  --bg:#0b0d12; --card:#111523; --card2:#0f1422; --line:#232a3d;
  --text:#e9ecf5; --muted:#9aa3b2; --btn:#1b2236; --btn2:#2b63ff; --danger:#ff4d5e;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --r:16px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
body{ margin:0; background:var(--bg); color:var(--text); }

.pm-wrap{ display:flex; justify-content:center; align-items:center; min-height:100vh; padding:24px; }
.pm-card{ width:min(520px, 100%); background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); border:1px solid var(--line); border-radius:24px; padding:24px; box-shadow:var(--shadow); }
.pm-title{ font-size:24px; font-weight:700; margin-bottom:6px; }
.pm-sub{ color:var(--muted); margin-bottom:18px; }
.pm-field{ margin:14px 0; }
.pm-field label{ display:block; font-size:13px; color:var(--muted); margin-bottom:8px; }

input, select{
  width:100%; background:#0c1020; border:1px solid var(--line); color:var(--text);
  border-radius:14px; padding:12px 12px; outline:none;
}
input:focus, select:focus{ border-color:rgba(43,99,255,.7); box-shadow:0 0 0 3px rgba(43,99,255,.15); }

.pm-row{ display:flex; align-items:center; gap:12px; margin-top:14px; }
.pm-err{ color:#ff7b86; font-size:13px; }

.btn{
  background:var(--btn); color:var(--text); border:1px solid var(--line);
  border-radius:14px; padding:10px 14px; cursor:pointer;
}
.btn:hover{ filter:brightness(1.08); }
.btn-primary{ background:var(--btn2); border-color:rgba(43,99,255,.6); }
.btn-danger{ background:var(--danger); border-color:rgba(255,77,94,.6); }

.pm-topbar{
  display:flex; align-items:center; gap:12px;
  padding:14px 18px; border-bottom:1px solid var(--line);
  position:sticky; top:0; background:rgba(11,13,18,.9); backdrop-filter: blur(8px);
  z-index:10;
}
.pm-brand{ font-weight:800; font-size:18px; }
.pm-pill{
  padding:6px 10px; border-radius:999px; border:1px solid var(--line);
  color:var(--muted); font-size:13px; background:rgba(255,255,255,.02);
}

.pm-layout{
  display:grid; grid-template-columns: 420px 1fr; gap:14px;
  padding:14px;
}
.pm-left, .pm-right{ min-height: calc(100vh - 70px); }

.pm-left{
  border:1px solid var(--line); border-radius:var(--r); background:rgba(255,255,255,.02);
  overflow:hidden;
}
.pm-left-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 12px; border-bottom:1px solid var(--line);
}
.pm-left-title{ color:var(--muted); font-size:13px; }

.pm-search-wrap{
  display:flex; gap:8px; padding:8px 10px; border-bottom:1px solid var(--line);
}
.pm-search-input{
  flex:1; background:#0c1020; border:1px solid var(--line); color:var(--text);
  border-radius:10px; padding:8px 12px; outline:none; font-size:13px; width:auto;
}
.pm-search-input:focus{ border-color:rgba(43,99,255,.7); box-shadow:0 0 0 3px rgba(43,99,255,.15); }
.pm-refresh-btn{ padding:7px 12px; font-size:16px; border-radius:10px; }
.pm-refresh-btn.loading{ opacity:.5; cursor:wait; }

.pm-tree{ padding:10px 10px 14px 10px; max-height: calc(100vh - 180px); overflow:auto; }

.pm-right .pm-card2{
  border:1px solid var(--line); border-radius:var(--r);
  background:rgba(255,255,255,.02); padding:16px;
}
.pm-h2{ font-size:22px; font-weight:800; margin-bottom:8px; }
.pm-h3{ font-size:14px; color:var(--muted); margin-bottom:10px; }

.pm-chg{ display:grid; grid-template-columns: 220px 1fr; gap:12px; align-items:center; margin:10px 0; }
.pm-checkrow{ display:flex; gap:10px; align-items:center; }
.pm-checkrow input{ width:auto; }

.pm-dspbox{
  margin-top:10px; border:1px dashed rgba(154,163,178,.35);
  border-radius:16px; padding:12px;
}
.pm-dsphelp{ color:var(--muted); font-size:12px; margin:6px 0 10px; }
.pm-dsprow{ display:grid; grid-template-columns: 220px 1fr; gap:12px; }

.pm-actions{ display:flex; gap:10px; margin-top:14px; }

.pm-logs{
  background:#0c1020; border:1px solid var(--line);
  border-radius:16px; padding:10px; max-height:220px; overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
}

.log{ padding:4px 0; }
.log-ts{ color:#788196; }
.log-info{ color:#dce1ee; }
.log-warn{ color:#ffd17a; }
.log-error{ color:#ff7b86; }

/* Tree */
.tree-row{ display:flex; align-items:center; gap:10px; padding:6px 6px; border-radius:12px; }
.tree-row:hover{ background:rgba(255,255,255,.03); }

.tree-caret{
  width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.02); border:1px solid var(--line); border-radius:10px; color:var(--muted);
  cursor:pointer;
}
.tree-spacer{ width:26px; height:26px; }
.tree-cb{ width:16px; height:16px; }
.tree-label{ line-height:1.2; }

.tree-children{ margin-left:28px; border-left:1px solid rgba(35,42,61,.8); padding-left:10px; }
.tree-empty{ padding:6px 6px; }

.tree-tag{
  display:inline-block; font-size:11px; color:var(--muted);
  border:1px solid var(--line); padding:2px 6px; border-radius:999px; margin-right:6px;
  background:rgba(255,255,255,.02);
}

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

.pm-warn{
  margin:10px; padding:10px; border-radius:14px;
  border:1px solid rgba(255,209,122,.35);
  color:#ffd17a; background:rgba(255,209,122,.06);
  font-size:12px;
}

@media (max-width: 1100px){
  .pm-layout{ grid-template-columns: 1fr; }
  .pm-left{ min-height:auto; }
  .pm-tree{ max-height: 360px; }
}
