.hb-body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: #f9fafb;
  color: #111827;
}

.hb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffffcc;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hb-logo {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hb-main {
  padding: 1.5rem;
}

.hb-btn {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.hb-btn-primary {
  background: #facc15;
  color: #1f2937;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.15);
}

.hb-btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.hb-btn-ghost {
  background: transparent;
  color: #374151;
}

.hb-link {
  color: #2563eb;
  text-decoration: none;
}

.hb-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.hb-hero {
  max-width: 640px;
  text-align: center;
}

.hb-subtitle {
  color: #4b5563;
}

.hb-hero-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.hb-auth-panel {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgb(15 23 42 / 0.05);
}

.hb-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.hb-form input {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.hb-auth-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.hb-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hb-inline-form {
  display: flex;
  gap: 0.5rem;
}

.hb-inline-form input {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.75rem;
}

.hb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.hb-card {
  display: block;
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgb(15 23 42 / 0.05);
}

.hb-card-body {
  font-size: 0.9rem;
}

.hb-muted {
  color: #6b7280;
  font-size: 0.9rem;
}

.hb-actions-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  background: #f9fafb;
}

.hb-badge-green {
  border-color: #22c55e;
  color: #166534;
  background: #bbf7d0;
}

.hb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.hb-table th,
.hb-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #e5e7eb;
}

.hb-table th {
  text-align: left;
  font-weight: 500;
  color: #9ca3af;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hb-list li {
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #e5e7eb;
}

.hb-canvas-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1.2fr);
  gap: 1rem;
  height: calc(100vh - 64px);
}

.hb-canvas-main {
  position: relative;
  background: #fefce8;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.hb-canvas {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

.hb-cursor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hb-sidebar-section {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 20px rgb(15 23 42 / 0.05);
}

.hb-tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.hb-chat-log {
  height: 220px;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  background: #f9fafb;
  font-size: 0.9rem;
}

.hb-msg {
  padding: 0.35rem 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  margin-bottom: 0.4rem;
}

.hb-msg-user {
  background: #eff6ff;
}

.hb-msg-assistant {
  background: #ecfdf3;
}

.hb-msg-system {
  background: #f3f4f6;
}

.hb-msg-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  margin-bottom: 0.15rem;
}

.hb-msg-body {
  font-size: 0.85rem;
  color: #111827;
  white-space: pre-wrap;
}

.hb-chat-form {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
}

.hb-chat-form input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.75rem;
}

.hb-chat-message-user {
  font-weight: 600;
  margin-right: 0.25rem;
}

.hb-cursor {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f97316;
  transform: translate(-50%, -50%);
}

.hb-cursor-label {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.7rem;
  background: #111827;
  color: #f9fafb;
  padding: 2px 6px;
  border-radius: 999px;
}

.hb-plugins-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.hb-plugins-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.hb-plugins-block-title {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hb-plugins-table {
  table-layout: fixed;
}

.hb-plugins-col-enable {
  width: 2.25rem;
  text-align: center;
  vertical-align: middle;
}

.hb-plugins-col-name {
  width: 11rem;
  white-space: nowrap;
}

.hb-plugins-col-desc {
  color: #6b7280;
  font-size: 0.82rem;
}

.hb-plugins-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.hb-plugins-checkbox-label input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.hb-persona-note-row {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px dashed #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
}

.hb-persona-note-row label {
  display: block;
  margin-bottom: 0.5rem;
}

.hb-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.hb-footer-inner {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.hb-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
}

.hb-plugin-about {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.hb-send-card {
  margin-top: 1rem;
}

.hb-send-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.hb-send-input {
  flex: 1;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.85rem;
}

.hb-send-input:focus {
  outline: none;
  border-color: #facc15;
}

.hb-progress {
  margin-top: 0.6rem;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.hb-progress-active {
  opacity: 1;
}

.hb-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #facc15, #22c55e);
  transition: width 0.1s linear;
}

.hb-progress-indeterminate .hb-progress-bar {
  animation: hb-progress-indeterminate 2s ease-in-out infinite;
}

@keyframes hb-progress-indeterminate {
  0% { width: 0%; }
  45% { width: 100%; }
  55% { width: 100%; }
  100% { width: 0%; }
}

.hb-table-conversations .hb-conv-meta td {
  padding: 0.35rem 0.4rem 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.78rem;
  color: #6b7280;
  vertical-align: top;
}

.hb-conv-progress-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.75rem;
}

.hb-conv-progress-wrap.hb-conv-progress-hidden {
  display: none !important;
}

.hb-conv-progress-label {
  color: #6b7280;
}

.hb-conv-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.hb-conv-cancel-btn:hover {
  background: #fecaca;
}

.hb-conv-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hb-conv-stats {
  color: #6b7280;
}

