.chat-container {
  max-width: 900px;
  margin: 0 auto;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 10px;

  h1 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
  }
}

.clear-button {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;

  &:hover {
    background-color: #dc2626;
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background-color: #f9fafb;
  border-radius: 8px;
  margin-bottom: 10px;

  /* Scrollbar style */
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;

    &:hover {
      background: #94a3b8;
    }
  }
}

.empty-state {
  text-align: center;
  color: #6b7280;
  padding: 20px;
  font-size: 16px;
}

.message {
  position: relative;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 85%;

  &.user {
    background-color: #dbeafe;
    margin-left: auto;
    border: 1px solid #bfdbfe;
  }

  &.assistant {
    background-color: #ffffff;
    margin-right: auto;
    border: 1px solid #e5e7eb;
  }
}

.message-role {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: #374151;
}

.message-thinking,
.tool-calls-section {
  margin: 0.5em 0;
  padding: 0.5em 0.75em;
  background: #f3f4f6;
  border-left: 3px solid #9ca3af;
  border-radius: 4px;
  font-size: 0.9em;

  summary {
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    user-select: none;
  }
}

.message-thinking .message-thinking-content {
  margin-top: 0.5em;
  color: #4b5563;
  white-space: pre-wrap;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.9em;
  line-height: 1.5;
  /* Cap the visible height so long reasoning doesn't push the actual
   * answer off the screen. The body scrolls internally; the controller
   * keeps it pinned to the bottom while new deltas arrive. */
  max-height: 12em;
  overflow-y: auto;
}

/* Staggered three-dot "typing" indicator after the Reasoning summary
 * while thinking is still streaming. The .thinking-active class is set
 * by message_stream_controller when the thinking block is created and
 * removed by #foldTransientSections at end-of-stream — the dots are
 * hidden whenever the class is absent. */
.thinking-dots {
  display: none;
  margin-left: 0.35em;
  letter-spacing: 0.15em;
  font-weight: bold;
}

.message-thinking.thinking-active .thinking-dots {
  display: inline-block;
}

.message-thinking.thinking-active .thinking-dots span {
  display: inline-block;
  opacity: 0.25;
  animation: thinking-dot 1.4s ease-in-out infinite;
}

.message-thinking.thinking-active .thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.message-thinking.thinking-active .thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinking-dot {
  0%, 60%, 100% { opacity: 0.25; }
  30%           { opacity: 1; }
}

.tool-calls-section ul {
  margin: 0.5em 0 0;
  padding-left: 1.25em;
}

.message-content {
  color: #1f2937;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  min-width: 0;

  p {
    margin: 0 0 0.5em 0;

    &:last-child {
      margin-bottom: 0;
    }
  }

  h1, h2, h3, h4, h5, h6 {
    margin: 0.5em 0 0.25em 0;
    line-height: 1.25;
  }

  ul, ol {
    margin: 0.25em 0 0.5em 1.25em;
    padding: 0;
  }

  li {
    margin: 0.1em 0;
  }

  blockquote {
    border-left: 3px solid #d1d5db;
    margin: 0.5em 0;
    padding: 0.1em 0.75em;
    color: #4b5563;
  }

  code {
    background-color: #f3f4f6;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }

  pre {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 0.5em 0;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre;

    code {
      background: none;
      padding: 0;
    }
  }

  table {
    border-collapse: collapse;
    margin: 0.5em 0;
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }

  th, td {
    border: 1px solid #d1d5db;
    padding: 4px 8px;
  }

  th {
    background-color: #f3f4f6;
  }

  a {
    color: #2563eb;
    text-decoration: underline;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* simple_format() handles user-typed newlines (→ <br>/<p>); no need
   for pre-wrap, which would also render the template's surrounding
   indentation as visible whitespace inside the bubble. */

.chat-input-container {
  background-color: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.chat-input {
  width: 100%;
  padding: 12px;
  padding-right: 56px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 44px;
  transition: border-color 0.2s;
  box-sizing: border-box;

  &:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
}

/* Input controls (LLM + Tools + Settings — mutually exclusive) */
.input-controls {
  position: relative;
  margin-bottom: 10px;
}

.input-controls-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* LLM toggle */
.llm-toggle-field {
  display: inline-flex;
}

.llm-toggle-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.llm-toggle-button:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.llm-toggle-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
  padding: 12px 16px;
  z-index: 10;
  box-sizing: border-box;
}

/* Tool Selector */
.tool-selector-field {
  margin-bottom: 0;
}

.tool-toggle-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;

  &:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
  }
}

.tool-count-badge {
  background-color: #3b82f6;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.toggle-icon {
  font-size: 11px;
  transition: transform 0.2s;
}

.tool-selector-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10;
}

.tool-loading {
  padding: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 13px;
}

.no-servers,
.no-tools {
  padding: 10px 12px;
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

.mcp-server-item {
  border-bottom: 1px solid #e5e7eb;

  &:last-child {
    border-bottom: none;
  }
}

.mcp-server-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  transition: background-color 0.15s;

  &:hover {
    background-color: #f3f4f6;
  }

  .server-toggle-icon {
    font-size: 11px;
    color: #6b7280;
  }

  .bi-server {
    color: #6b7280;
  }

  .mcp-server-select-all {
    cursor: pointer;
    margin: 0 0 0 auto; /* push to the far right of the header row */
    accent-color: #2563eb;
  }
  .mcp-server-select-all:disabled {
    cursor: not-allowed;
    opacity: 0.4;
  }
}

.mcp-server-name {
  /* No `flex: 1` — the name hugs its neighbors on the left so the
     "n tools" indicator sits right next to it. The select-all checkbox
     uses `margin-left: auto` to float to the far right. */
}

.tool-available-count {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
}

.mcp-server-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 8px;
  background-color: #ede9fe;
  color: #6d28d9;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  i { font-size: 9px; }
}

.mcp-server-tools {
  padding-left: 24px;
}

.tool-loading-inline {
  padding: 8px 12px;
  color: #6b7280;
  font-size: 12px;
}

.tool-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.15s;

  &:hover {
    background-color: #f3f4f6;
  }

  input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #3b82f6;
  }
}

.tool-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tool-name {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

.tool-description {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

/* Generation Settings */
.generation-settings-field {
  margin-bottom: 0;
}

.generation-settings-toggle-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;

  &:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
  }
}

.generation-settings-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background-color: #f9fafb;
  padding: 12px 16px;
  z-index: 10;
  box-sizing: border-box;
}

.generation-settings-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.generation-settings-json-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace;
  background-color: white;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;

  &:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  &::placeholder {
    color: #9ca3af;
  }
}

.generation-settings-json-input--invalid {
  border-color: #ef4444;

  &:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  }
}

.generation-settings-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

.generation-settings-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Drag-and-drop image attachment: highlight the form while dragging. */
.chat-form.drag-over {
  outline: 2px dashed #3b82f6;
  outline-offset: 4px;
  background-color: rgba(59, 130, 246, 0.04);
  border-radius: 8px;
}

/* Image attachment: paperclip button inside the input + thumbnail preview above it. */
.attach-button {
  position: absolute;
  bottom: 10px;
  right: 56px; /* sits to the left of the send button */
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;

  i { font-size: 16px; }

  &:hover:not(:disabled) {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
  }

  &:disabled {
    opacity: 0.35;
    cursor: not-allowed;
  }
}

/* User-attached image inside the message bubble (post-send / on reload). */
.user-attached-image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 6px;
  margin-bottom: 6px;
  object-fit: contain;
}

.image-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.image-preview img {
  display: block;
  max-width: 160px;
  max-height: 160px;
  border-radius: 4px;
  object-fit: contain;
}

.image-clear-button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: #fff;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);

  &:hover { color: #dc2626; }
  i { font-size: 14px; }
}

/* Document attachment preview (pre-send) and chip (in message bubble). */
.document-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
  padding: 6px 10px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
}

.user-attached-document {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 8px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 13px;
  color: #1f2937;
  text-decoration: none;

  &:hover { background-color: #e5e7eb; }
}

/* Errored assistant bubble — visible signal that the stream failed. */
.message.stream-errored {
  border-color: #fecaca;
  background-color: #fef2f2;

  .message-role {
    color: #b91c1c;
  }
}

.stream-error {
  color: #b91c1c;
  font-size: 13px;
  font-style: italic;
  margin: 4px 0 0 0;
}

/* Cancel button on the live streaming bubble. */
.stream-cancel-button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;

  i {
    font-size: 14px;
  }

  &:hover {
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.1);
  }
}

.send-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #3b82f6;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover:not(:disabled) {
    background-color: #2563eb;
  }

  &:active:not(:disabled) {
    background-color: #1d4ed8;
  }

  &:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
  }
}

/* === Grid-view model picker ============================================ */

/* Quick-picks row sits directly below the prompt textarea (above input-controls). */
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.quick-pick-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1f2937;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;

  i { font-size: 11px; color: #f59e0b; }

  &:hover {
    color: #1d4ed8;
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
  }

  &.is-default {
    border-color: #f59e0b;
    background-color: #fffbeb;
  }

  &.is-transient {
    border-style: dashed;
    color: #4b5563;
  }

  &.is-selected {
    color: #1f2937;
    background-color: #f3f4f6;
    border-color: #9ca3af;
    border-style: solid;
  }
}

/* The "Other models" grid panel */
.model-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-grid-columns {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 10px;
}

.model-grid-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.model-grid-header {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  background-color: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-grid-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-grid-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  font-size: 12px;
  text-align: left;
  color: #1f2937;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;

  &:hover {
    background-color: rgba(59, 130, 246, 0.06);
    border-color: #93c5fd;
  }

  &.is-selected {
    color: #fff;
    background-color: #2563eb;
    border-color: #2563eb;
  }
}

.model-grid-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.model-grid-badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

/* Capability/state badges rendered as Bootstrap icons (lightweight,
   no text → keeps the cell narrow). */
.model-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  line-height: 1;
  color: #6b7280;
}

.model-badge-vision   { color: #2563eb; }
.model-badge-image    { color: #7c3aed; }
.model-badge-tools    { color: #059669; }
.model-badge-favorite { color: #f59e0b; }
.model-badge-default  { color: #d97706; }

.model-grid-cell.is-selected .model-badge { color: #fff; }
.model-grid-cell.is-selected .model-badge-favorite,
.model-grid-cell.is-selected .model-badge-default { color: #fde68a; }

.model-grid-empty {
  padding: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.model-grid-footer {
  margin: 0;
  font-size: 11px;
  color: #6b7280;

  i { margin-right: 4px; }
  a { color: #2563eb; text-decoration: none; }
  a:hover { text-decoration: underline; }
}

/* On narrow viewports the 4-column grid stacks two-up. */
@media (max-width: 720px) {
  .model-grid-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .model-grid-columns { grid-template-columns: 1fr; }
}

/* Local override of prompt_navigator's history.css — drop once the engine
   ships the same value. Adds breathing room between the "History" heading
   and the first history card. */
#history-sidebar .history-stack { margin-top: 20px; }

/* Local override of chat_manager's chat.css — drop once the engine ships
   the same rule. Pins the chat-list toolbar (heading + bulk actions) to
   the top of the scrollable sidebar so it stays visible when the list
   is long. The negative top/left/right margins extend the toolbar over
   the sidebar's 8px padding so scrolling cards can't peek through the
   gap; equal padding keeps the toolbar's content in its natural place. */
#chat-sidebar .chat-list-toolbar {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  z-index: 2;
  margin: -8px -8px 6px;
  padding: 8px 8px 0;
}

/* === Download / Copy overlay for assistant-generated assets ============ */
/* Markup emitted by ApplicationHelper::AssistantResponseRenderer for
   images and copyable code blocks (json / csv). */
.response-asset {
  position: relative;
  margin: 8px 0;
}

.response-asset-image {
  display: inline-block;
}

.response-asset-code pre {
  margin: 0;
}

.asset-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0.35;
  transition: opacity 0.15s ease;
  z-index: 1;
}

.response-asset:hover .asset-actions,
.response-asset:focus-within .asset-actions {
  opacity: 1;
}

.asset-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.92);
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;

  &:hover {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
  }

  &:active {
    transform: translateY(1px);
  }

  i { font-size: 13px; }
}

/* When the overlay sits on top of a dark code block, give the button
   a slightly tinted background instead of pure white for contrast. */
.response-asset-code .asset-action {
  background-color: rgba(249, 250, 251, 0.95);
}

/* === Super-user admin dashboard ===================================== */

.admin-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px 32px;
  color: #1f2937;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.admin-subhead {
  margin: 4px 0 24px;
  font-size: 12px;
  color: #6b7280;
}

.admin-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.admin-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #374151;
}

.admin-section h2 i { color: #6b7280; font-size: 14px; }

.admin-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 18px 0 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 4px 0 8px;
}

.admin-card {
  border: 1px solid #f3f4f6;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafafa;
}

.admin-card-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-card-value {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin-top: 2px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th, .admin-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.admin-table th {
  font-weight: 600;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.admin-empty {
  margin: 4px 0;
  color: #9ca3af;
  font-size: 13px;
}

.admin-error {
  margin: 8px 0;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  font-size: 13px;
}
