/* DiabloMU Control — ops overlays on top of site.css + acp.css */

.ops-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  position: relative;
}
.ops-login-card {
  width: min(420px, 100%);
  padding: 36px 32px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #111922, #0b1016);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.ops-login-card .logo { margin-bottom: 18px; }
.ops-login-card h1 { font-size: 1.8rem; margin-bottom: 8px; }
.ops-login-card .lead { font-size: .95rem; color: var(--text-2); margin-bottom: 24px; }
.ops-login-card form { display: grid; gap: 14px; }
.ops-login-card .btn { width: 100%; }

.ops-view { display: none; }
.ops-view.is-active { display: grid; gap: 24px; }

.ops-log {
  margin: 0;
  height: calc(100vh - 220px);
  min-height: 360px;
  overflow: auto;
  padding: 16px 18px;
  border-radius: 0 0 14px 14px;
  background: #070a0d;
  color: #c9d6cf;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.ops-files {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(340px, 1.15fr);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 200px);
}
.ops-files .acp-card { display: flex; flex-direction: column; min-height: 0; }
.ops-file-scroll { overflow: auto; flex: 1; max-height: calc(100vh - 260px); }
.ops-editor {
  flex: 1;
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 0;
  resize: none;
  padding: 16px 18px;
  background: #070a0d;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}
.ops-editor:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .35); }
.ops-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.ops-editor-path {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-editor-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
}

.ops-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: .84rem;
  color: var(--muted);
}
.ops-breadcrumb button {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.ops-breadcrumb button:hover { color: var(--accent-3); }

.ops-file-row { cursor: pointer; }
.ops-file-row td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.ops-file-row .icon { width: 16px; height: 16px; color: var(--accent); }
.ops-file-ops { display: flex; gap: 4px; justify-content: flex-end; }

.ops-svc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(420px, 92vw);
  padding: 12px 16px;
  border-radius: 12px;
  background: #121922;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: .9rem;
}
.ops-toast[hidden] { display: none; }

.ops-port-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.ops-port-dot.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); animation: pulse 2s infinite; }
.ops-port-dot.off { background: var(--danger); }

.hidden { display: none !important; }

/* Sidebar buttons styled like ACP nav links */
.acp-nav .nav-link-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
}
.acp-nav .nav-link-btn .icon { flex: none; width: 17px; height: 17px; color: #6b7886; }
.acp-nav .nav-link-btn:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.acp-nav .nav-link-btn.active {
  color: #fff;
  background: rgba(45, 212, 191, .1);
  box-shadow: inset 2px 0 0 var(--accent);
}
.acp-nav .nav-link-btn.active .icon { color: var(--accent); }
.hide-sm { }
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
}
.acp-search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, .25);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
}

.ops-monaco {
  height: min(62vh, 640px);
  min-height: 360px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ops-editor-card { margin-top: 8px; }
.ops-status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.ops-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}
.ops-pill.on { color: #6ee7b7; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .08); }
.ops-pill.off { color: #fda4af; border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .08); }

.ops-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 16px 20px 20px;
}
.ops-config-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.ops-config-item:hover { border-color: rgba(45, 212, 191, .4); background: var(--accent-soft); }
.ops-config-item strong { font-size: .9rem; }
.ops-config-item small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.ops-config-item .path { font-family: var(--mono); font-size: .72rem; color: var(--text-2); }

.ops-journal {
  margin-top: 14px;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #070a0d;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #b7c4bc;
  white-space: pre-wrap;
}

.ops-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.55);
}
.ops-modal-card {
  width: min(480px, 100%);
  border-radius: 16px;
  background: #0e141b;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ops-kbd-grid { display: grid; gap: 12px; }
.ops-kbd-grid > div { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: .9rem; }
.ops-kbd-grid span { margin-left: auto; }
kbd {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: #070a0d;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text);
}

.acp-nav .acp-group-links .nav-link-btn { padding-left: 10px; font-size: .84rem; }
.acp-group summary .icon:first-child { color: #6b7886; }

@media (max-width: 980px) {
  .ops-files { grid-template-columns: 1fr; }
  .ops-log { height: 55vh; }
}

/* ---------- Professional File Manager ---------- */
.fm-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: calc(100vh - 180px);
}
.fm-side { padding-bottom: 12px; position: sticky; top: 76px; }
.fm-places { display: grid; gap: 2px; padding: 8px 10px 12px; }
.fm-place {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); font: inherit; font-size: .84rem;
  cursor: pointer; text-align: left;
}
.fm-place .icon { width: 16px; height: 16px; color: #6b7886; }
.fm-place:hover { color: #fff; background: rgba(255,255,255,.04); }
.fm-place.active { color: #fff; background: rgba(45, 212, 191, .1); box-shadow: inset 2px 0 0 var(--accent); }
.fm-place.active .icon { color: var(--accent); }
.fm-clip { padding: 0 14px 14px; font-size: .8rem; line-height: 1.45; }

.fm-main { display: grid; gap: 12px; min-width: 0; }
.fm-toolbar { padding: 10px 12px; display: grid; gap: 10px; }
.fm-pathbar { display: flex; align-items: center; gap: 6px; }
.fm-goto { flex: 1; min-width: 0; }
.fm-goto input {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #070a0d; color: var(--text);
  font-family: var(--mono); font-size: .82rem;
}
.fm-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fm-actions input[type="search"], .fm-actions select {
  width: auto; min-width: 120px; padding: 7px 10px; font-size: .82rem;
}
.fm-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

.fm-split {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(280px, .95fr);
  gap: 12px;
  min-height: 520px;
}
.fm-browser { position: relative; display: flex; flex-direction: column; min-height: 520px; overflow: hidden; }
.fm-browser.is-drag { outline: 2px dashed var(--accent); outline-offset: -4px; background: rgba(45, 212, 191, .04); }
.fm-drop-hint {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(7, 10, 13, .82); color: var(--accent-3);
  font-weight: 600; font-size: 1.05rem; pointer-events: none;
}
.fm-table-wrap { flex: 1; overflow: auto; max-height: calc(100vh - 340px); }
.fm-table { font-size: .88rem; }
/* borders for .fm-table live only in fm-skin.css — do not add cell borders here */
/* fm-check / fm-name / fm-row layout owned by fm-skin.css */
.fm-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.fm-row { cursor: pointer; user-select: none; }
.fm-statusbar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 14px; border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}

.fm-editor { display: flex; flex-direction: column; min-height: 520px; overflow: hidden; }
.fm-monaco { flex: 1; min-height: 380px; height: auto; }

.fm-ctx {
  position: fixed; z-index: 100; min-width: 180px;
  padding: 6px; border-radius: 12px;
  background: #121922; border: 1px solid var(--line-2);
  box-shadow: var(--shadow); display: grid; gap: 2px;
}
.fm-ctx button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2);
  font: inherit; font-size: .86rem; cursor: pointer;
}
.fm-ctx button:hover { background: rgba(255,255,255,.05); color: #fff; }
.fm-ctx button.danger:hover { color: #fda4af; background: rgba(251, 113, 133, .08); }
.fm-ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

@media (max-width: 1100px) {
  .fm-shell { grid-template-columns: 1fr; }
  .fm-side { position: static; }
  .fm-split { grid-template-columns: 1fr; }
}

/* ---------- Players editor ---------- */
.pl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pl-tabs .btn.active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.pl-pane { display: none; }
.pl-pane.is-active { display: block; }
.pl-split { align-items: start; }
.pl-form { display: grid; gap: 10px; }
.pl-form label { display: grid; gap: 4px; font-size: .78rem; color: var(--text-2); }
.pl-form input, .pl-form select {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #070a0d; color: var(--text);
  font: inherit; font-size: .88rem;
}
.pl-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-form-grid .pl-span2 { grid-column: 1 / -1; }
.pl-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.table tr.is-sel { background: rgba(45, 212, 191, .08); }
.linkish {
  border: 0; background: none; color: var(--accent-3);
  font: inherit; font-weight: 600; cursor: pointer; padding: 0;
}
.linkish:hover { text-decoration: underline; }
.mono, input.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.pl-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
  padding: 12px;
  max-height: 320px;
  overflow: auto;
}
.pl-slot {
  display: grid; place-items: center; gap: 2px;
  min-height: 48px; padding: 4px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: #0a0e13; color: var(--text-2);
  font: inherit; cursor: pointer;
}
.pl-slot:hover { border-color: rgba(45, 212, 191, .45); color: #fff; }
.pl-slot.filled { background: rgba(45, 212, 191, .08); color: #fff; }
.pl-slot.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.pl-slot-n { font-size: .68rem; color: #6b7886; }
.pl-slot-l { font-size: .72rem; font-weight: 600; }
@media (max-width: 980px) {
  .pl-form-grid { grid-template-columns: 1fr; }
}
