/* SuperByte Dashboard — Custom Styles */

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.sidebar-logo .nav-icon {
  width: 22px;
  height: 22px;
  color: #4f46e5;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar-nav .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.sidebar-nav a:hover {
  background: #f3f4f6;
  color: #111827;
}
.sidebar-nav a.active {
  background: #eef2ff;
  color: #4f46e5;
}
.sidebar-user {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-user .info {
  flex: 1;
  min-width: 0;
}
.sidebar-user .name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user .username {
  font-size: 12px;
  color: #9ca3af;
}

/* ── Main Content ── */
.main-content {
  margin-left: 250px;
  min-height: 100vh;
  background: #f9fafb;
}
.page-header {
  padding: 24px 32px 0;
  position: relative;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}
.page-header p {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}
/* Back-to-Tools link in the top-right of tool sub-pages
   (Google / Odoo / BigQuery / Drawio). Plain "← Tools" text — vertically
   centered against the page-header content via transform translateY. */
.page-back {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}
.page-back:hover { color: #4f46e5; }
@media (max-width: 640px) {
  .page-back { right: 16px; font-size: 12px; }
}
.page-body {
  padding: 24px 32px;
}

/* ── Cards ── */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stat-card .label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-top: 4px;
}
.stat-card .icon {
  font-size: 24px;
}
.stat-card .stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  flex-shrink: 0;
}
.stat-card .stat-icon .nav-icon {
  width: 20px;
  height: 20px;
}

/* Section heading with inline SVG icon */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .section-icon,
.section-title .section-icon-sm,
.section-title .nav-icon {
  width: 20px;
  height: 20px;
  color: #4f46e5;
  flex-shrink: 0;
}

/* Tool cards / integration cards — centered square icon badge */
.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
  flex-shrink: 0;
}
.tool-icon .nav-icon {
  width: 20px;
  height: 20px;
}

/* Inline button icons — applies to <button> and <a class="btn"> alike */
button .nav-icon,
.btn .nav-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Empty-state big icon (SVG replaces previous 3rem emoji) */
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: #eef2ff;
  color: #4f46e5;
}
.empty-icon .nav-icon {
  width: 28px;
  height: 28px;
}

/* Modal warning icon (delete confirm etc) */
.modal-icon-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: #fef2f2;
  color: #dc2626;
}
.modal-icon-warning .nav-icon {
  width: 32px;
  height: 32px;
}

/* Page title (H1) with inline indigo SVG */
.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.page-title .page-icon {
  width: 26px;
  height: 26px;
  color: #4f46e5;
  flex-shrink: 0;
}

/* Integration card icon (40px rounded gray badge) */
.integration-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #4b5563;
  flex-shrink: 0;
}
.integration-icon .nav-icon,
.tool-icon .nav-icon {
  width: 18px;
  height: 18px;
}

/* Connection table — My Connections section on /pages/odoo.html.
   Uses border-collapse:separate so row background + hover state can
   have rounded corners (tr can't use border-radius, tds can). */
.conn-table-wrap { overflow-x: auto; }
.conn-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.conn-table thead tr th { border-bottom: 1px solid #e5e7eb; }
.conn-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px 10px 12px;
}
.conn-table th:first-child { padding-left: 12px; }
.conn-table th.text-right { text-align: right; padding-right: 12px; }
.conn-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: #374151;
  vertical-align: middle;
  background: #fff;
  transition: background 0.15s;
}
.conn-table td.text-right { text-align: right; }
.conn-table tbody tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.conn-table tbody tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.conn-table tbody tr:hover td { background: #f9fafb; }
.conn-table tbody tr.conn-row-active td { background: #eff6ff; }
.conn-table tbody tr.conn-row-active:hover td { background: #dbeafe; }
.conn-table .conn-label { font-size: 14px; font-weight: 500; color: #111827; }
.conn-table .conn-muted { color: #6b7280; }
.conn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}
.conn-dot.active { background: #22c55e; }
.conn-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.conn-actions .btn-sm { padding: 3px 10px; font-size: 12px; }

/* Integration card — canonical pattern for /pages/tools.html integration cards.
   Used via js/tools.js renderIntegrationCard(card, state, {icon,title,desc,actionHtml}).
   Tailwind-independent — single source of truth for styling; future integrations
   cukup pakai class ini tanpa copy-paste utility strings. */
.integration-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.integration-card .integration-body {
  flex: 1;
  min-width: 0;
}
.integration-card .integration-title {
  font-weight: 500;
  font-size: 14px;
}
.integration-card .integration-desc {
  font-size: 12px;
  margin-top: 2px;
}
/* Connected state (green tint — matches drawio/google/odoo/git canonical) */
.integration-card.connected {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.integration-card.connected .integration-title { color: #166534; }
.integration-card.connected .integration-desc  { color: #16a34a; }
/* Disconnected state (neutral) */
.integration-card.disconnected .integration-title { color: #111827; }
.integration-card.disconnected .integration-desc  { color: #6b7280; }
.integration-card.disconnected:hover { border-color: #818cf8; }
/* Error state (red) */
.integration-card.error .integration-title { color: #dc2626; }
.integration-card.error .integration-desc  { color: #991b1b; }

/* Provider letter badge (for BYOK providers) */
.provider-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}
.provider-badge-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Icon-only button (edit, delete, refresh in card actions) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 6px;
  transition: all 0.15s;
  padding: 0;
}
.btn-icon:hover {
  background: #f3f4f6;
  color: #4f46e5;
}
.btn-icon.btn-icon-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}
.btn-icon .nav-icon {
  width: 16px;
  height: 16px;
}

/* Mode dot (skills mode indicator) */
.mode-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mode-dot-auto { background: #22c55e; }
.mode-dot-on-demand { background: #3b82f6; }
.mode-dot-disabled { background: #6b7280; }

/* Toast icon — inline status indicator */
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #22c55e;
}
.toast-error .toast-icon { color: #fca5a5; }
.toast-icon .nav-icon {
  width: 18px;
  height: 18px;
}

/* Provider cards — Tailwind-independent styling (see lessons in dashboard-icon-system.md) */
.provider-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.provider-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: border-color 0.15s;
}
.provider-card:not(.connected):hover {
  border-color: #818cf8;
}
.provider-card.connected {
  border-color: #86efac;
  background: #f0fdf4;
}
.provider-card .provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.provider-card .provider-row:not(.locked) {
  cursor: pointer;
}
.provider-card .provider-info {
  flex: 1;
  min-width: 0;
}
.provider-card .provider-name {
  font-weight: 500;
  font-size: 14px;
  color: #111827;
}
.provider-card .provider-models {
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.provider-card .provider-cta {
  font-size: 12px;
  color: #4f46e5;
  font-weight: 500;
  flex-shrink: 0;
}
.provider-card .provider-guide {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
  color: #9ca3af;
}

/* Agent avatar — fill circle with robot SVG */
.agent-avatar .nav-icon {
  width: 36px;
  height: 36px;
  color: #fff;
}

/* Small inline icons in text-meta rows (scoped, not all .flex) */
.text-xs .nav-icon,
.text-sm .nav-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

/* ── Agent Cards ── */
.agent-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: #c7d2fe;
}
.agent-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  flex-shrink: 0;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}
.status-dot.offline {
  background: #9ca3af;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── New Agent Card ── */
.new-agent-card {
  background: #fff;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: #9ca3af;
}
.new-agent-card:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #f5f3ff;
}

/* ── Tier Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-free { background: #f3f4f6; color: #6b7280; }
.badge-platform { background: #dbeafe; color: #2563eb; }
.badge-pro { background: #ede9fe; color: #7c3aed; }
.badge-soon { background: #fef3c7; color: #92400e; }
.badge-connected { background: #dcfce7; color: #166534; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
/* PRD#byok-fallback-order §7.1: Primary badge for first entry in fallback chain */
.badge-primary { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* Compact "Primary" tag for BYOK fallback chain — smaller than .badge so it
   doesn't compete visually with provider name. */
.badge-primary-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: #fffbeb;
  color: #b45309;
  margin-left: 6px;
  vertical-align: middle;
}

/* Up/down reorder controls for BYOK provider list — subtle ghost arrows,
   conditionally hidden on first/last items (spacer keeps column width stable). */
.order-ctrl {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 22px;
  flex-shrink: 0;
}
.order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #9ca3af;
  font-size: 10px;
  line-height: 1;
  transition: all 0.12s;
}
.order-btn:hover { background: #f3f4f6; color: #4f46e5; }
.order-spacer { display: block; width: 22px; height: 16px; }

/* PRD#github-copilot-routing §4.6 Phase 2: inline model dropdown for OAuth providers */
.model-select {
  padding: 4px 8px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  max-width: 180px;
  transition: border-color 0.12s;
}
.model-select:hover { border-color: #4f46e5; }
.model-select:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }
.model-select option:disabled { color: #9ca3af; }

/* PRD#byok-model-discovery v1.1: refresh button + tier badge */
/* Model picker + refresh button grouped so they can wrap together on narrow viewports. */
.model-picker-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  font-size: 14px;
  line-height: 1;
  transition: all 0.12s;
}
.refresh-btn:hover { color: #4f46e5; border-color: #4f46e5; transform: rotate(180deg); }
.tier-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
/* PRD#byok-model-discovery v1.5 Phase 4: stale-cache indicator (>24h or stale-fetch) */
.stale-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border-radius: 4px;
  letter-spacing: 0.3px;
  cursor: help;
}

/* Connected provider row (api-keys page) — allow the row to wrap so a long
   model-select (GitHub Copilot ships 8 verbose labels) drops to its own line
   on narrow viewports instead of squeezing badges/buttons off the card edge. */
.connected-row { flex-wrap: wrap; }

/* ── Toggle Switch ── */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.active { background: #6366f1; }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle.active::after {
  transform: translateX(20px);
}

/* ── File Browser ── */
.file-tree {
  font-size: 14px;
}
.file-tree .folder, .file-tree .file {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}
.file-tree .folder:hover, .file-tree .file:hover {
  background: #f3f4f6;
}
.file-tree .file.active {
  background: #eef2ff;
  color: #4f46e5;
}
.file-preview {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  color: #374151;
  overflow-y: auto;
}

/* ── Usage Bar Chart ── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding-top: 8px;
}
.bar-chart .bar {
  flex: 1;
  background: linear-gradient(180deg, #6366f1, #818cf8);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.3s ease;
  position: relative;
}
.bar-chart .bar-label {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
}

/* ── Storage Bar ── */
.storage-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.storage-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-body { padding: 20px 24px; }
.modal-body label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-bottom: 12px; box-sizing: border-box;
}
.modal-body textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.modal-actions { padding: 16px 24px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
}
.toast {
  background: #111827;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  margin-top: 8px;
}
.toast-error { background: #dc2626; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(10px); }
}

/* ── Checklist ── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: #374151;
}
.checklist-item.done {
  color: #9ca3af;
  text-decoration: line-through;
}
.check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.check-icon.checked {
  background: #dcfce7;
  color: #16a34a;
}
.check-icon.unchecked {
  border: 2px solid #d1d5db;
  background: #fff;
}
.check-icon .nav-icon {
  width: 18px;
  height: 18px;
}

/* ── Activity Feed ── */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #eef2ff;
  color: #4f46e5;
}
/* PRD#activity-feed v1.1: failed action indicator (subtle red tint) */
.activity-item.failed .activity-icon {
  background: #fef2f2;
  color: #dc2626;
}
.activity-icon .nav-icon {
  width: 18px;
  height: 18px;
}

/* ── Mobile Responsive ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 16px;
  align-items: center;
  z-index: 30;
}
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  background: none;
  color: #374151;
}
.hamburger .nav-icon {
  width: 22px;
  height: 22px;
}
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: #111827;
  margin-left: 8px;
}
.mobile-brand .nav-icon {
  width: 20px;
  height: 20px;
  color: #4f46e5;
}
.sidebar-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 6px;
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.sidebar-logout:hover {
  background: #fef2f2;
  color: #dc2626;
}
.sidebar-logout .nav-icon {
  width: 18px;
  height: 18px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 35;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .mobile-header {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding-top: 56px;
  }
  .page-header {
    padding: 16px 16px 0;
  }
  .page-body {
    padding: 16px;
  }

  /* Odoo My Connections: drop Host + User columns on narrow screens.
     Nth-child is fine — only one table with class .conn-table in the repo,
     and column order is stable in js/odoo.js renderConnections(). */
  .conn-table th:nth-child(3),
  .conn-table th:nth-child(4),
  .conn-table td:nth-child(3),
  .conn-table td:nth-child(4) {
    display: none;
  }
  .conn-table td { padding: 8px 10px; font-size: 13px; }
  .conn-actions { flex-wrap: wrap; gap: 4px; }
  .conn-actions .btn-sm { padding: 3px 8px; font-size: 11px; }

  /* api-keys Connected row: model-picker group (select + refresh) drops to
     its own full-width line below the badges/buttons on narrow viewports.
     order:10 pushes it past the other flex items under flex-wrap:wrap so
     name/Active/Test/× stay on line 1; the verbose model labels + tier
     badge get a readable second line. */
  .connected-row .model-picker-group {
    order: 10;
    flex-basis: 100%;
    width: 100%;
    margin-top: 4px;
  }
  .connected-row .model-picker-group .model-select {
    flex: 1;
    max-width: none;
  }
}

/* PRD#persona.6.5 — Diff view styles for re-generate modal */
.diff-line {
  white-space: pre-wrap;
  padding: 1px 4px;
  line-height: 1.4;
  min-height: 1.4em;
}
.diff-line.diff-add {
  background-color: #dcfce7;
  color: #166534;
}
.diff-line.diff-remove {
  background-color: #fee2e2;
  color: #991b1b;
}

/* PRD#user-tier Phase 2 — expired subscription locked state.
   Disable interactive write controls (buttons, inputs) for expired users.
   Read endpoints still work; UI just visually signals locked + reduces accidental
   clicks that would 402-fail. */
body.subscription-expired button:not([data-allow-expired]):not(.sidebar-logout):not(.hamburger),
body.subscription-expired input:not([data-allow-expired]):not([type="hidden"]),
body.subscription-expired textarea:not([data-allow-expired]),
body.subscription-expired select:not([data-allow-expired]) {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
body.subscription-expired .folder-card,
body.subscription-expired .skill-card,
body.subscription-expired .agent-card {
  opacity: 0.6;
}
body.subscription-expired #subscriptionBanner a {
  text-decoration: underline !important;
}
