/* ═══════════════════════════════════════════════════════════
   SqlManager — Modern Admin Panel
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent:        #3b82f6;
  --accent-hover:  #2563eb;
  --accent-light:  #eff6ff;
  --accent-ring:   rgba(59,130,246,.18);

  --sidebar-bg:    #0f172a;
  --sidebar-hover: rgba(255,255,255,.055);
  --sidebar-border:rgba(255,255,255,.07);
  --sidebar-text:  #64748b;
  --sidebar-w:     244px;

  --bg:    #f1f5f9;
  --card:  #ffffff;
  --border:#e2e8f0;

  --text:  #0f172a;
  --text-2:#334155;
  --text-3:#64748b;
  --text-4:#94a3b8;

  --green:        #10b981;
  --green-light:  #d1fae5;
  --green-text:   #065f46;
  --red:          #ef4444;
  --red-light:    #fee2e2;
  --red-text:     #991b1b;
  --orange:       #f59e0b;
  --orange-light: #fef3c7;
  --orange-text:  #92400e;
  --blue:         #3b82f6;
  --blue-light:   #eff6ff;
  --blue-text:    #1d4ed8;

  /* Backward-compat aliases used in pages.js inline styles */
  --gray-5: #64748b;
  --gray-7: #334155;
  --gray-9: #0f172a;
  --gray-0: #ffffff;
  --gray-1: #f8fafc;
  --gray-2: #e2e8f0;
  --gray-3: #cbd5e1;

  --topbar-h: 58px;
  --font: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 3px rgba(0,0,0,.09), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 8px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font); font-size: 14px;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; height: 100%;
}
a { cursor: pointer; text-decoration: none; }
input, select, textarea { font-family: var(--font); font-size: 14px; }

/* ══════════════════════════════════════════════════════════════
   AUTH SCREENS  (Login + Connect)
   ══════════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0a0f1e;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(59,130,246,.2) 0%, transparent 70%),
    linear-gradient(rgba(59,130,246,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.05) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  overflow: hidden;
}
.auth-screen::before,
.auth-screen::after {
  content: ''; position: absolute; border-radius: 50%;
  pointer-events: none; animation: floatOrb 9s ease-in-out infinite;
}
.auth-screen::before {
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(59,130,246,.13) 0%, transparent 65%);
  top: -180px; left: -100px;
}
.auth-screen::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 65%);
  bottom: -120px; right: -80px; animation-delay: -4.5s;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(18px, -18px); }
}

.auth-card {
  background: #ffffff; border-radius: 20px; padding: 44px 40px;
  width: 420px; max-width: calc(100vw - 32px);
  box-shadow: 0 28px 72px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.04);
  position: relative; z-index: 1;
  animation: cardIn .32s cubic-bezier(.4,0,.2,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-brand-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(59,130,246,.4);
}
.auth-brand-icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; }
.auth-brand-name { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; }
.auth-brand-sub  { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.auth-title    { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-3); margin-bottom: 24px; line-height: 1.5; }

.auth-form-group { margin-bottom: 14px; }
.auth-form-group label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.auth-input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1.5px solid #e2e8f0; border-radius: var(--radius);
  outline: none; font-family: var(--font); font-size: 14px;
  color: var(--text); background: #f8fafc;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.auth-input::placeholder { color: var(--text-4); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-auth {
  width: 100%; height: 46px; border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; margin-top: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none !important; }
.btn-auth-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; box-shadow: 0 4px 14px rgba(59,130,246,.38);
}
.btn-auth-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 22px rgba(59,130,246,.52); transform: translateY(-1px);
}
.btn-auth-ghost {
  background: transparent; color: var(--text-3);
  border: 1.5px solid var(--border); margin-top: 10px;
}
.btn-auth-ghost:hover { background: var(--bg); color: var(--text-2); }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-4); font-size: 12px; margin: 16px 0 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.auth-error {
  background: #fee2e2; color: #991b1b;
  border: 1px solid #fca5a5; border-left: 3px solid var(--red);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 14px; display: none;
}

/* ══════════════════════════════════════════════════════════════
   MAIN APP LAYOUT
   ══════════════════════════════════════════════════════════════ */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg);
  display: flex; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  padding: 20px 16px 18px; display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid var(--sidebar-border); flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(59,130,246,.35);
}
.sidebar-logo-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; }
.sidebar-logo-text { font-size: 14px; font-weight: 700; color: #f1f5f9; line-height: 1.2; }
.sidebar-logo-sub  { font-size: 10.5px; color: #475569; margin-top: 1px; }

.sidebar-server {
  padding: 12px 14px; border-bottom: 1px solid var(--sidebar-border); flex-shrink: 0;
}
.server-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #334155; margin-bottom: 7px;
}
.server-status {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); background: rgba(255,255,255,.04);
  border: 1px solid var(--sidebar-border);
}
.server-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}
.server-dot.connected {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16,185,129,.25), 0 0 8px rgba(16,185,129,.4);
  animation: pulseDot 2.5s ease-in-out infinite;
}
.server-dot.disconnected { background: #334155; }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,.25), 0 0 8px rgba(16,185,129,.4); }
  50%       { box-shadow: 0 0 0 4px rgba(16,185,129,.12), 0 0 14px rgba(16,185,129,.3); }
}
.server-info { flex: 1; min-width: 0; }
.server-host { font-size: 12px; font-weight: 500; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-port { font-size: 11px; color: #475569; margin-top: 1px; }
.server-reconnect {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 4px; color: #334155; transition: all .15s;
  display: flex; align-items: center;
}
.server-reconnect:hover { color: #94a3b8; background: rgba(255,255,255,.06); }
.server-reconnect svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; display: block; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 10px 4px; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-section-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #334155; padding: 12px 8px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500; transition: all .15s;
  margin-bottom: 1px; border: 1px solid transparent;
}
.nav-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: #94a3b8; }
.nav-item.active { background: rgba(59,130,246,.15); color: #93c5fd; border-color: rgba(59,130,246,.18); }

.sidebar-user {
  padding: 12px 14px; border-top: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.user-name { font-size: 13px; font-weight: 600; color: #cbd5e1; line-height: 1.3; }
.user-role { font-size: 11px; color: #475569; }
.btn-logout {
  margin-left: auto; background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--radius-sm); color: #475569;
  transition: all .15s; display: flex; align-items: center;
}
.btn-logout:hover { background: rgba(239,68,68,.15); color: #f87171; }
.btn-logout svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; display: block; }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.topbar {
  height: var(--topbar-h); background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; display: flex; align-items: center; gap: 16px;
  flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.conn-pill {
  display: flex; align-items: center; gap: 7px; padding: 5px 13px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-3);
  transition: all .3s;
}
.conn-pill .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.conn-pill.connected    { background: #d1fae5; border-color: #6ee7b7; color: var(--green-text); }
.conn-pill.connected .dot { background: var(--green); }
.conn-pill.disconnected .dot { background: var(--text-4); }

.conn-bar { display: none !important; }

.page { display: none; flex: 1; overflow-y: auto; padding: 24px; }
.page.active { display: block; }

/* ══════════════════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════════════════ */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header p  { color: var(--text-3); font-size: 13.5px; margin-top: 5px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3); margin-bottom: 16px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-label { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 8px; color: var(--text); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--text-3); margin-top: 5px; }

.btn {
  height: 36px; padding: 0 16px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-family: var(--font);
  font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover  { background: #dc2626; }
.btn-ghost   { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover   { background: var(--bg); }
.btn-sm   { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 5px; }
.btn-full { width: 100%; justify-content: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 10px 14px; background: #f8fafc;
  border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .1s; }
tbody tr:hover { background: #fafbfc; }
tbody td { padding: 11px 14px; color: var(--text-2); vertical-align: middle; }
.td-bold { color: var(--text); font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-green  { background: var(--green-light);  color: var(--green-text); }
.badge-red    { background: var(--red-light);    color: var(--red-text); }
.badge-orange { background: var(--orange-light); color: var(--orange-text); }
.badge-blue   { background: var(--blue-light);   color: var(--blue-text); }
.badge-gray   { background: #f1f5f9; color: var(--text-3); }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.form-control {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  outline: none; font-family: var(--font); font-size: 13.5px;
  color: var(--text); background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
select.form-control { cursor: pointer; }
textarea.form-control { height: auto; padding: 10px 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; }
.alert-error   { background: var(--red-light);   color: var(--red-text);   border-left: 3px solid var(--red); }
.alert-success { background: var(--green-light); color: var(--green-text); border-left: 3px solid var(--green); }
.alert-info    { background: var(--blue-light);  color: var(--blue-text);  border-left: 3px solid var(--accent); }

.query-editor { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 48px); }
.editor-toolbar { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.db-select {
  height: 36px; padding: 0 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 13.5px;
  outline: none; background: var(--card); color: var(--text);
}
.db-select:focus { border-color: var(--accent); }
#sql-textarea {
  flex: none; height: 200px; width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 13px; resize: vertical; outline: none;
  line-height: 1.65; background: #1e293b; color: #e2e8f0; caret-color: var(--accent);
}
#sql-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.query-results { flex: 1; overflow: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.result-meta { padding: 8px 14px; background: #f8fafc; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-3); display: flex; gap: 16px; }
.result-error { padding: 16px; color: var(--red); font-family: var(--mono); font-size: 13px; }

.progress-bar { height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }

.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab { padding: 10px 18px; font-size: 13.5px; cursor: pointer; color: var(--text-3); border-bottom: 2px solid transparent; transition: all .15s; font-weight: 500; }
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.schema-tree { font-size: 13px; }
.tree-db { margin-bottom: 4px; }
.tree-db-header { padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; }
.tree-db-header:hover { background: var(--bg); }
.tree-tables { padding-left: 20px; }
.tree-table { padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); color: var(--text-3); }
.tree-table:hover { background: var(--bg); color: var(--text-2); }
.tree-table.selected { background: var(--accent-light); color: var(--accent); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border-radius: var(--radius-lg);
  width: 500px; max-width: 95vw; max-height: 85vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.4,0,.2,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.modal-header button { background: none; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--text-3); display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-header button:hover { background: var(--bg); color: var(--text); }
.modal-body   { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 48px); }
.toast {
  padding: 12px 36px 12px 18px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  min-width: 280px; max-width: 520px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.07);
  animation: toastIn .22s cubic-bezier(.4,0,.2,1);
  background: #1e293b; color: #e2e8f0;
  border-left: 4px solid transparent; position: relative;
  word-break: break-word; white-space: pre-wrap; line-height: 1.5;
  cursor: default;
}
.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--red); max-width: 600px; background: #1e0a0a; color: #fca5a5; }
.toast-info    { border-left-color: var(--accent); }
.toast-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: #64748b; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px;
  transition: color .15s;
}
.toast-close:hover { color: #e2e8f0; }
@keyframes toastIn { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Full error detail modal */
.error-detail-pre {
  background: #1e0a0a; color: #fca5a5;
  border: 1px solid #7f1d1d; border-radius: var(--radius-sm);
  padding: 14px 16px; font-family: var(--mono); font-size: 12px;
  line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  max-height: 60vh; overflow-y: auto; margin-top: 8px;
}

.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.op-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: all .15s; background: var(--card); }
.op-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); transform: translateY(-1px); }
.op-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.op-card p  { font-size: 12px; color: var(--text-3); line-height: 1.5; }

.health-bar-wrap { margin-top: 8px; }
.health-bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.health-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.health-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }
.fill-blue   { background: var(--accent); }
.fill-green  { background: var(--green); }
.fill-orange { background: var(--orange); }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-3); }
.empty-state svg { width: 40px; height: 40px; stroke: var(--border); margin: 0 auto 14px; display: block; }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row td { text-align: center; padding: 24px; color: var(--text-3); }
