/* Bubbl Stream - Minimalist Monochromatic Theme System */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Charter", "Georgia", "Cambria", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-elevated: #ffffff;
  --card-bg: #ffffff;
  --card-hover: #fcfcfc;
  --border: #e5e5e5;
  --border-focus: #111111;
  --text: #111111;
  --text-muted: #666666;
  --text-subtle: #999999;
  --accent: #111111;
  --accent-text: #ffffff;
  --accent-hover: #333333;
  --badge-bg: #f0f0f0;
  --code-bg: #f4f4f5;
  --danger: #b91c1c;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --max-width: 860px;
  --transition: all 0.15s ease-in-out;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-subtle: #181818;
  --bg-elevated: #202020;
  --card-bg: #181818;
  --card-hover: #1e1e1e;
  --border: #282828;
  --border-focus: #ffffff;
  --text: #f3f3f3;
  --text-muted: #a0a0a0;
  --text-subtle: #666666;
  --accent: #f3f3f3;
  --accent-text: #121212;
  --accent-hover: #e0e0e0;
  --badge-bg: #242424;
  --code-bg: #1e1e1e;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 16px rgba(0,0,0,0.5);
}

[data-theme="sepia"] {
  --bg: #fbf7ee;
  --bg-subtle: #f3ece0;
  --bg-elevated: #fcf9f2;
  --card-bg: #fcf9f2;
  --card-hover: #f6eedf;
  --border: #dfd7c5;
  --border-focus: #2f251c;
  --text: #2f251c;
  --text-muted: #736453;
  --text-subtle: #9d8d7b;
  --accent: #2f251c;
  --accent-text: #fbf7ee;
  --accent-hover: #483a2d;
  --badge-bg: #ece3d3;
  --code-bg: #ede5d7;
  --danger: #9f2b1d;
  --shadow-sm: 0 1px 2px rgba(60,40,20,0.04);
  --shadow: 0 4px 12px rgba(60,40,20,0.06);
}

[data-theme="slate"] {
  --bg: #0f172a;
  --bg-subtle: #1e293b;
  --bg-elevated: #1e293b;
  --card-bg: #1e293b;
  --card-hover: #273549;
  --border: #334155;
  --border-focus: #cbd5e1;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #f8fafc;
  --accent-text: #0f172a;
  --accent-hover: #e2e8f0;
  --badge-bg: #273549;
  --code-bg: #273549;
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 14px rgba(0,0,0,0.4);
}

[data-theme="contrast"] {
  --bg: #ffffff;
  --bg-subtle: #ffffff;
  --bg-elevated: #ffffff;
  --card-bg: #ffffff;
  --card-hover: #f0f0f0;
  --border: #000000;
  --border-focus: #000000;
  --text: #000000;
  --text-muted: #000000;
  --text-subtle: #444444;
  --accent: #000000;
  --accent-text: #ffffff;
  --accent-hover: #000000;
  --badge-bg: #ffffff;
  --code-bg: #f0f0f0;
  --danger: #000000;
  --radius-sm: 0px;
  --radius: 0px;
  --radius-lg: 0px;
  --shadow-sm: none;
  --shadow: none;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

.mono-icon {
  display: inline-block;
  vertical-align: -0.15em;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
header.site-header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .brand-name-long {
    display: none;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  text-decoration: none;
  background-color: var(--bg-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Profile Dropdown Menu */
.profile-menu-container {
  position: relative;
  display: inline-block;
}

.profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

.profile-menu-trigger:hover,
.profile-menu-trigger.active {
  background-color: var(--bg-subtle);
  border-color: var(--text-muted);
}

.profile-menu-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-menu-chevron {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.profile-menu-trigger.active .profile-menu-chevron {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  padding: 6px 0;
  z-index: 100;
  display: none;
  flex-direction: column;
}

.profile-dropdown.show {
  display: flex;
}

.profile-dropdown-header {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.profile-dropdown-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-handle {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition);
}

.profile-dropdown-item:hover {
  background-color: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
}

.profile-dropdown-divider {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 4px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background-color: var(--bg-subtle);
  text-decoration: none;
  border-color: var(--border-focus);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--accent-text);
  border-color: var(--accent-hover);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--border);
}

.btn-danger:hover {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

/* Main Content Area */
main {
  flex: 1;
  padding: 32px 0 64px;
}

/* Cards & Posts */
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  background-color: var(--card-bg);
  transition: var(--transition);
}

.post-card:hover {
  background-color: var(--card-hover);
  border-color: var(--text-muted);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.author-link {
  font-weight: 600;
  color: var(--text);
}

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.55;
  font-family: var(--font-serif);
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--badge-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-mono);
}

.tag-badge:hover {
  border-color: var(--border-focus);
  text-decoration: none;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Post Detail View */
.article-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-body {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 48px;
}

.article-body h1, .article-body h2, .article-body h3 {
  font-family: var(--font-sans);
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}

.article-body p {
  margin-bottom: 1.4em;
}

.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5em 0;
  display: block;
}

.article-body pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin: 1.5em 0;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--code-bg);
  padding: 2px 5px;
  border-radius: var(--radius-sm);
}

.article-body blockquote {
  border-left: 3px solid var(--text);
  padding-left: 18px;
  margin: 1.5em 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Comments System (2-Layers) */
.comments-section {
  border-top: 1px solid var(--border);
  padding-top: 36px;
}

.comments-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.comment-box {
  margin-bottom: 30px;
}

.comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  margin-bottom: 10px;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.comment-thread {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.comment-item {
  padding: 14px;
  border-radius: var(--radius);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.comment-reply-item {
  margin-left: 32px;
  position: relative;
}

.comment-reply-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 18px;
  width: 12px;
  height: 2px;
  background-color: var(--border);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.comment-content {
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.reply-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 6px;
  text-decoration: underline;
}

/* User Profile Header */
.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  background-color: var(--card-bg);
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  background-color: var(--bg-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-names {
  flex: 1;
}

.profile-display-name {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.profile-username {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.profile-bio {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-quote-box {
  border-left: 3px solid var(--border-focus);
  padding: 8px 16px;
  background-color: var(--bg-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.profile-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Editor & Full-Window Composition Mode */
body.is-editor-mode {
  overflow: hidden;
}

body.is-editor-mode footer {
  display: none !important;
}

body.is-editor-mode main {
  padding: 12px 20px !important;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  box-sizing: border-box;
  overflow: hidden;
}

#editor-mount {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.editor-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.editor-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-buttons {
  display: flex;
  gap: 4px;
}

.tb-btn {
  padding: 4px 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.tb-btn:hover {
  background-color: var(--bg);
  border-color: var(--border);
}

.editor-inputs {
  flex-shrink: 0;
  padding: 14px 20px 10px;
}

.input-title {
  width: 100%;
  font-size: 1.6rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.input-tags {
  width: 100%;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  background: var(--bg-subtle);
  color: var(--text);
  outline: none;
  margin-bottom: 0;
}

.editor-workspace {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--border);
  overflow: hidden;
  background-color: var(--bg);
}

@media (max-width: 768px) {
  body.is-editor-mode {
    overflow: auto;
  }
  body.is-editor-mode main {
    height: auto;
    min-height: calc(100vh - 64px);
    overflow: visible;
  }
  .editor-container {
    height: calc(100vh - 88px);
    min-height: 500px;
  }
  .editor-workspace {
    grid-template-columns: 1fr;
  }
  .editor-preview-pane {
    display: none;
  }
}

.editor-textarea,
textarea.editor-textarea,
#editor-content {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: none;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.6;
  background: transparent;
  color: var(--text);
  resize: none !important;
  outline: none;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.editor-preview-pane {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--border);
  background-color: var(--bg-subtle);
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  margin-bottom: 0;
}

.editor-preview-pane img {
  max-width: 100%;
  height: auto;
}

.editor-preview-pane pre {
  max-width: 100%;
  overflow-x: auto;
}

.editor-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background-color: var(--bg-subtle);
}

.draft-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 8px;
}

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 16px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: var(--text);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--text);
}

/* Lazy loader spinner / Load more */
.lazy-loader {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Topic tags grid */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-cloud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.tag-cloud-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--badge-bg);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* Dashboard items table/cards */
.dashboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background-color: var(--card-bg);
}

.dashboard-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Autonomous Agents */
.agent-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.agent-card:hover {
  border-color: var(--border-focus);
}

.agent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.agent-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border: 1px solid var(--border);
  background-color: var(--badge-bg);
}

.agent-status-success {
  font-weight: 600;
}

.agent-status-failed {
  border-color: var(--danger);
  color: var(--danger);
}

.post-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85em;
  opacity: 0.85;
}

