/* ops.css — operator cockpit */

body { background: var(--bg); }

.ops-gate { padding: 20px; }

.ops-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 0.5px solid var(--border);
}

.ops-tabs {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid var(--border);
  padding: 0 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.ops-tabs .tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ops-tabs .tab:hover { background: var(--surface); color: var(--text); }
.ops-tabs .tab.active {
  color: var(--text);
  border-bottom-color: #000;
  font-weight: 500;
}

.ops-pane { flex: 1; display: flex; min-height: 0; }
.ops-pane.hidden { display: none; }

/* FILES */
.ops-sidebar {
  width: 340px;
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ops-filter { padding: 12px 16px; border-bottom: 0.5px solid var(--border); }
.ops-filter input { width: 100%; font-size: 14px; padding: 6px 10px; }

.ops-totals {
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--border);
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.ops-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.tree-area {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  padding: 12px 16px 4px;
  font-weight: 500;
}

.tree-item {
  display: block;
  padding: 6px 16px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  border-left: 2px solid transparent;
  user-select: none;
}
.tree-item:hover { background: var(--surface); }
.tree-item.active {
  background: var(--surface);
  border-left-color: #000;
  font-weight: 500;
}
.tree-item .tree-size {
  float: right;
  color: var(--text-tertiary);
  font-size: 11px;
}

.ops-detail {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  min-width: 0;
}
.detail-empty { padding: 80px 0; text-align: center; }

.detail-title {
  font-family: var(--font-mono);
  font-size: 20px;
  word-break: break-all;
  margin-bottom: 4px;
}
.detail-role { color: var(--text-secondary); margin-bottom: 20px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.detail-stat {
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 8px;
}
.detail-stat .cap {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.detail-stat .val {
  font-family: var(--font-mono);
  font-size: 15px;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

.detail-section { margin-bottom: 28px; }
.detail-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
}

.commit-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
}
.commit-row:last-child { border-bottom: none; }
.commit-hash { color: var(--text-tertiary); }
.commit-date { color: var(--text-tertiary); white-space: nowrap; }

.routes-list { list-style: none; padding: 0; margin: 0; font-family: var(--font-mono); font-size: 13px; }
.routes-list li { padding: 4px 0; }
.routes-list .method {
  display: inline-block;
  width: 52px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 11px;
}
.routes-list .method.GET { color: #0f6e56; }
.routes-list .method.POST { color: #a86800; }
.routes-list .method.PUT { color: #5a2ea6; }

.source-block {
  background: #111;
  color: #f0ebe3;
  border-radius: 8px;
  padding: 16px 20px;
  overflow: auto;
  max-height: 600px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre;
}
.source-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.copy-btn {
  font-size: 11px;
  padding: 4px 10px;
}

/* LIVE */
#pane-live { flex-direction: column; padding: 24px 32px; }
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.live-card {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: 8px;
}
.live-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.live-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.live-section { margin-bottom: 32px; }
.live-section h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 12px;
}

.live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.live-table th, .live-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 0.5px solid var(--border);
}
.live-table th {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.live-table td { font-family: var(--font-mono); font-size: 13px; }

.live-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 0.5px solid var(--border);
}

/* ENDPOINTS */
#pane-endpoints { padding: 24px 32px; flex-direction: column; }
.endpoints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.endpoint-card {
  background: var(--surface);
  padding: 14px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
}
.endpoint-card:hover { background: #ece7dd; }
.endpoint-card .path { font-size: 14px; margin: 4px 0; word-break: break-all; }
.endpoint-card .owner { color: var(--text-tertiary); font-size: 12px; }

/* MANUAL frame */
.manual-frame {
  width: 100%;
  flex: 1;
  border: 0;
  min-height: calc(100vh - 140px);
}

#pane-manual { flex-direction: column; }

@media (max-width: 800px) {
  .ops-pane { flex-direction: column; }
  .ops-sidebar { width: 100%; border-right: 0; border-bottom: 0.5px solid var(--border); max-height: 40vh; }
  .ops-detail { padding: 20px 16px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
