/* UdreUdre 2.0 – Admin Dashboard Styles */

:root {
  --sidebar-width: 220px;
  --sidebar-bg: #111827;
}

body {
  background-color: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  border-right: 1px solid #1e293b;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .nav-link {
  color: #94a3b8;
  border-radius: 6px;
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: #1e3a5f;
  color: #60a5fa;
}

/* ── Main content ── */
#main-content {
  max-width: calc(100vw - var(--sidebar-width));
  overflow-x: hidden;
}

/* ── Cards ── */
.card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
}

/* ── Tables ── */
.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.03);
  --bs-table-hover-bg: rgba(255,255,255,0.05);
  font-size: 0.825rem;
}

/* ── Small badge buttons ── */
.btn-xs {
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.3;
  border-radius: 4px;
}

/* ── Monospace editor ── */
#md-editor {
  background-color: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  resize: vertical;
  min-height: 300px;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Alert overrides ── */
.alert-danger { background-color: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.alert-warning { background-color: rgba(234,179,8,0.15); border-color: rgba(234,179,8,0.4); color: #fde047; }

/* ── Conversation bubbles ── */
.msg-bubble {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  max-width: 90%;
  font-size: 0.825rem;
  line-height: 1.5;
}
.msg-user {
  background-color: #1e3a5f;
  border-left: 3px solid #3b82f6;
  align-self: flex-end;
}
.msg-assistant {
  background-color: #1e293b;
  border-left: 3px solid #22c55e;
  align-self: flex-start;
}
.msg-tool {
  background-color: #1c1c2e;
  border-left: 3px solid #a78bfa;
  align-self: flex-start;
  font-size: 0.78rem;
}
.msg-meta {
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
  color: #94a3b8;
}
.tool-call-badge {
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
