.update-status-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.update-status-badge.available {
  border-color: rgba(245, 158, 11, 0.34);
  background: var(--secondary-soft);
  color: #8a5200;
}

.update-status-badge.current {
  border-color: rgba(15, 159, 110, 0.28);
  background: #ecfdf5;
  color: #065f46;
}

.update-status-badge.error {
  border-color: rgba(225, 29, 72, 0.34);
  background: var(--tertiary-soft);
  color: #9f1239;
}

.update-info-grid {
  overflow: hidden;
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-container);
}

.update-info-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-bottom: 1px solid rgba(215, 222, 234, 0.78);
}

.update-info-row:last-child {
  border-bottom: 0;
}

.update-info-row span,
.update-info-row strong {
  min-width: 0;
  padding: 9px 11px;
  font-size: 12px;
}

.update-info-row span {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-weight: 900;
  text-transform: uppercase;
}

.update-info-row strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-message {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.update-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #aeb8ca;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #8b98ab;
  background-clip: padding-box;
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1120px) {
  #app {
    grid-template-columns: 304px minmax(0, 1fr);
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .inspector-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspector-section-wide {
    grid-column: auto;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-skills-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-skills-card .skill-library-card {
    min-height: 360px;
  }

  .mcp-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mcp-wide-card {
    grid-column: auto;
  }

  .mcp-activity-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .mcp-activity-item > span,
  .mcp-activity-item > strong {
    border-right: 0;
    border-bottom: 1px solid rgba(215, 222, 234, 0.78);
  }

  .mcp-activity-item > span:last-child {
    border-bottom: 0;
  }

  .settings-reference-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .context-footer {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .context-footer-meta {
    text-align: left;
  }
}

/* Premium Badge & Header Simplifications */
.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.search input {
  padding-left: 12px;
}

/* ==========================================================================
   Chrome Profile Scanner Modal
   ========================================================================== */
.profile-scan-modal {
  width: min(740px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  border: 1px solid rgba(215, 222, 234, 0.92);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.profile-scan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-scan-header-text h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.profile-scan-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-scan-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-scan-search-icon {
  position: absolute;
  left: 11px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.profile-scan-search-wrap input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.profile-scan-search-wrap input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.profile-scan-clear-btn {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-scan-clear-btn:hover {
  background: rgba(148, 163, 184, 0.35);
  color: var(--ink);
}

.profile-scan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-scan-filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-container);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.profile-scan-filter-btn:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(37, 99, 235, 0.25);
}

.profile-scan-filter-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary);
  font-weight: 800;
}

.profile-scan-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(215, 222, 234, 0.5);
  border-bottom: 1px solid rgba(215, 222, 234, 0.5);
  font-size: 12px;
}

.profile-scan-selection-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-scan-selection-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.profile-scan-selection-meta strong {
  color: var(--primary-dark);
}

.profile-scan-list {
  flex: 1;
  min-height: 200px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.profile-scan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-container);
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  user-select: none;
}

.profile-scan-item:hover {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(148, 163, 184, 0.5);
}

.profile-scan-item.is-selected {
  background: #f0f7ff;
  border-color: rgba(37, 99, 235, 0.35);
}

.profile-scan-item-checkbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.profile-scan-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: #64748b;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-scan-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-scan-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-scan-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-scan-dir-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-family: monospace;
  flex-shrink: 0;
}

.profile-scan-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.profile-scan-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-scan-no-email {
  font-style: italic;
  opacity: 0.7;
}

.profile-scan-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.profile-scan-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.profile-scan-badge-new {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.profile-scan-badge-exist {
  background: rgba(241, 245, 249, 0.95);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.profile-scan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  gap: 8px;
}

.profile-scan-options-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-container);
  border: 1px dashed rgba(215, 222, 234, 0.9);
}

.profile-scan-options-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.profile-scan-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-scan-options-grid .settings-toggle {
  font-size: 12px;
}

.profile-scan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.profile-scan-status {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.profile-scan-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

