/**
 * Skills Management Page Styles
 * Updated to match environments.html styling patterns
 */

/* ============================================================
   LAYOUT
   ============================================================ */

.skills-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  padding: 0;
  min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
  .skills-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SIDEBAR - SKILLS LIST
   ============================================================ */

.skills-sidebar {
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 240px);
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--color-border);
}

.skills-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
}

.skills-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills-list-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.skills-count {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.skills-search {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.skills-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  padding: 0 10px;
  transition: all 0.2s;
}

.skills-search-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.skills-search-input input {
  width: 100%;
  padding: 10px 0;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--color-text);
  outline: none;
  box-shadow: none;
}

/* Hide browser's native search clear button */
.skills-search-input input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.skills-search-input input:focus {
  box-shadow: none;
  outline: none;
}

.skills-search-input:hover {
  border-color: var(--color-accent);
}

.skills-search-input:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.1);
}

.skills-search-clear {
  border: none;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.skills-search-clear:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.skills-search-clear:focus-visible {
  outline: 2px solid rgba(63, 114, 255, 0.4);
  outline-offset: 2px;
}

.skills-search-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.skills-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.skills-list::-webkit-scrollbar {
  width: 6px;
}

.skills-list::-webkit-scrollbar-track {
  background: transparent;
}

.skills-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

.skill-item {
  padding: 14px 18px;
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-item:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.skill-item.selected {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.skill-item:focus-visible {
  outline: 2px solid rgba(63, 114, 255, 0.45);
  outline-offset: 2px;
}

.skill-item.selected .skill-item-description {
  color: var(--color-text-muted);
}

.skill-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.skill-item:hover::before {
  transform: scaleY(0.5);
  opacity: 0.6;
}

.skill-item.selected::before {
  transform: scaleY(1);
  opacity: 1;
}

.skill-item-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.skill-item.modified::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-warning);
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

.skill-item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.25;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-item-description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-env-count {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  min-width: 38px;
  height: 26px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.2s ease;
}

.skill-env-count:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-surface);
}

.skill-env-count.has-envs {
  border-color: rgba(63, 114, 255, 0.28);
  background: rgba(63, 114, 255, 0.08);
  color: var(--color-accent);
}

.skill-env-count.has-envs:hover {
  border-color: var(--color-accent);
  background: rgba(63, 114, 255, 0.12);
}

.skill-env-count:focus-visible {
  outline: 2px solid rgba(63, 114, 255, 0.45);
  outline-offset: 2px;
}

.skill-env-count-number {
  font-family: var(--font-mono);
}

.skill-env-count-icon {
  width: 14px;
  height: 14px;
}

.skills-list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.skills-list-empty .empty-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ============================================================
   SKILL EDITOR PANEL
   ============================================================ */

.skill-editor {
  min-width: 0;
}

/* ============================================================
   SKILL HEADER CARD (matches env-header-card)
   ============================================================ */

.skill-header-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

.skill-header-content {
  max-width: 800px;
}

.skill-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.skill-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}

.skill-description-display {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.meta-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.skill-details .content-nav {
  margin-bottom: 16px;
}

.skill-usage-btn {
  margin-left: auto;
}

/* ============================================================
   FORM STYLES
   ============================================================ */

/* Single column form layout (matching environments.html) */
.form-single-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
}

.form-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}

.form-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
}

.form-row .form-input,
.form-row .form-textarea {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.form-grid .form-row.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.form-textarea {
  width: 100%;
  min-height: 200px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.2s;
}

.form-textarea:hover {
  border-color: var(--color-accent);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.15);
}

/* Compact textarea - wraps text like textarea but minimal height */
.form-textarea-compact {
  width: 100%;
  min-height: unset;
  resize: vertical;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.2s;
}

.form-textarea-compact:hover {
  border-color: var(--color-accent);
}

.form-textarea-compact:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.15);
}

.code-font {
  font-family: var(--font-mono) !important;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.form-group .required {
  color: var(--color-danger);
}

.form-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.form-hint code {
  background: var(--color-surface-elevated, var(--color-surface-muted));
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Form field with hint below it */
.form-field-with-hint {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field-with-hint .form-hint {
  margin-top: 0;
}

/* ============================================================
   PROMPT BODY SECTION
   ============================================================ */

.prompt-help-text {
  font-size: 12px;
  color: var(--color-text-muted);
}

.prompt-help-text code {
  background: var(--color-surface-muted);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
}

.editor-footer {
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: right;
}

/* ============================================================
   FILES LIST & EDITOR
   ============================================================ */

.files-card .card-body {
  padding: 20px 28px;
}

.files-help-text {
  margin-bottom: 16px;
  font-size: 13px;
}

.skill-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.files-empty {
  text-align: center;
  padding: 32px;
  background: var(--color-surface-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-medium);
}

.files-empty p {
  margin: 0;
}

.files-empty p + p {
  margin-top: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-medium);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.file-item:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-muted);
}

.file-item.directory {
  background: transparent;
  border: none;
  font-weight: 500;
}

.file-icon {
  font-size: 1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text);
}

.file-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.file-item:hover .file-actions {
  opacity: 1;
}

.file-edit-btn,
.file-delete-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: var(--radius-small);
  font-size: 13px;
  transition: all 0.2s;
}

.file-edit-btn:hover {
  color: var(--color-accent);
  background: var(--color-surface);
}

.file-delete-btn:hover {
  color: var(--color-danger);
  background: rgba(229, 83, 104, 0.1);
}

/* File Editor Card */
.file-editor-card {
  margin-top: 20px;
}

.file-editor-card .card-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-editor-card .card-header h3 svg {
  color: var(--color-text-muted);
}

.file-editor-textarea-wrapper {
  margin-top: 16px;
}

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

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

.btn-danger-text:hover {
  color: var(--color-danger) !important;
  background: rgba(229, 83, 104, 0.1) !important;
}

/* ============================================================
   GIT STATUS INDICATOR
   ============================================================ */

.repo-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  font-size: 13px;
  color: var(--color-text);
}

.repo-status-indicator #repo-status-icon {
  font-size: 14px;
}

.repo-status-indicator #repo-status-text {
  font-weight: 500;
}

.repo-status-clean {
  color: var(--color-success);
}

.repo-status-modified {
  color: var(--color-warning);
}

.repo-status-ahead {
  color: var(--color-primary, var(--color-accent));
}

.repo-status-behind {
  color: var(--color-warning);
}

.repo-status-unknown {
  color: var(--color-text-secondary);
}

.repo-branch {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-left: 4px;
}

.repo-branch::before {
  content: '•';
  margin-right: 6px;
}

.repo-auth-mode-badge {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.repo-auth-mode-badge.auth-local {
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.35);
  color: var(--color-text-muted);
}

.repo-auth-mode-badge.auth-provider {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #0f766e;
}

.repo-auth-mode-badge.auth-user {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1d4ed8;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state-card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 80px 40px;
  text-align: center;
  border: 1px solid var(--color-border);
}

.empty-state-icon {
  font-size: 72px;
  margin-bottom: 24px;
  opacity: 0.7;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.empty-state-card h2 {
  margin: 0 0 12px 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
}

.empty-state-card p {
  margin: 0 0 28px 0;
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.empty-state-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-state-card .btn-primary,
.empty-state-card .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* ============================================================
   CONTENT CARDS
   ============================================================ */

.content-card {
  background: var(--color-surface);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  overflow: visible;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}

.content-card:hover {
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: 28px;
  border-radius: 0 0 var(--radius-large) var(--radius-large);
  background: var(--color-surface);
}

/* ============================================================
   TABS
   ============================================================ */

.content-nav {
  display: flex;
  gap: 4px;
  padding: 0;
  margin-bottom: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--color-border);
}

.content-nav::-webkit-scrollbar {
  height: 4px;
}

.content-nav::-webkit-scrollbar-track {
  background: transparent;
}

.content-nav::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.content-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.content-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-tab:hover {
  color: var(--color-text);
}

.content-tab:hover::after {
  transform: scaleX(0.6);
  opacity: 0.5;
}

.content-tab:focus-visible {
  outline: 2px solid rgba(63, 114, 255, 0.35);
  outline-offset: 2px;
  border-radius: 999px;
}

.content-tab.active {
  color: var(--color-accent);
  font-weight: 600;
}

.content-tab.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: flex;
}

.tab-content-wrapper {
  min-height: 400px;
}

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

/* ============================================================
   TAGS & BADGES
   ============================================================ */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

/* ============================================================
   DROPDOWN MENU
   ============================================================ */

.dropdown-container {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 4px 0;
}

.dropdown-menu[hidden] {
  display: none;
}

.dropdown-item {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover:not(:disabled) {
  background: var(--color-surface-muted);
}

.dropdown-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dropdown-item .option-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.dropdown-item .option-text {
  flex: 1;
}

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

/* ============================================================
   STATUS ACTIONS
   ============================================================ */

.status-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-actions .btn-secondary,
.status-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-actions .btn-secondary svg,
.status-actions .btn-ghost svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   MODAL STYLES
   ============================================================ */

.warning-message {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-medium);
  padding: 16px;
  margin-bottom: 16px;
}

.warning-message p {
  margin: 0;
  color: var(--color-text);
}

.warning-message p + p {
  margin-top: 8px;
}

.delete-bound-warning {
  background: rgba(229, 83, 104, 0.1);
  border-color: rgba(229, 83, 104, 0.3);
}

.modal-error {
  padding: 12px 16px;
  background: rgba(229, 83, 104, 0.1);
  border: 1px solid rgba(229, 83, 104, 0.3);
  border-radius: var(--radius-medium);
  color: var(--color-danger);
  font-size: 13px;
  margin-bottom: 16px;
}

.commit-author {
  padding: 12px 16px;
  background: var(--color-surface-muted);
  border-radius: var(--radius-small);
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

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

.commit-scope-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.commit-scope-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--color-text);
}

.commit-scope-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.commit-scope-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.modified-files-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 60vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.modified-files-list > li.changed-file-item {
  padding: 8px 12px;
  background: var(--color-surface-muted);
  border-radius: var(--radius-small);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-text);
  margin-bottom: 6px;
}

.modified-files-list > li.changed-file-item::before {
  content: '●';
  color: var(--color-warning);
  margin-right: 8px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.checkbox-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-field .form-hint {
  margin-top: 0;
  margin-left: 28px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--color-text);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-accent);
}

/* ============================================================
   LOADING STATE
   ============================================================ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 300px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .skills-sidebar {
    position: static;
    max-height: 300px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .skill-header-card {
    padding: 16px 20px;
  }

  .skill-title {
    font-size: 22px;
  }
}

/* ============================================================
   BUTTON ICON STYLING
   ============================================================ */

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-small);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--color-text-muted);
}

.btn-icon:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.btn-icon:focus-visible {
  outline: 2px solid rgba(63, 114, 255, 0.35);
  outline-offset: 2px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   DARK MODE ADJUSTMENTS
   ============================================================ */

:root[data-theme="dark"] .dropdown-menu {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .warning-message {
  background: rgba(245, 158, 11, 0.15);
}

:root[data-theme="dark"] .delete-bound-warning {
  background: rgba(229, 83, 104, 0.15);
}

:root[data-theme="dark"] .modal-error {
  background: rgba(229, 83, 104, 0.15);
}

:root[data-theme="dark"] .files-empty {
  background: var(--color-surface);
}

/* ============================================================
   IMPORT EXTERNAL SKILL MODAL
   ============================================================ */

.modal-large .modal-content {
  max-width: 640px;
}

/* ============================================================
   SKILL USAGE MODAL
   ============================================================ */

.skill-usage-modal-content {
  max-width: 760px;
  overflow: hidden;
}

.skill-usage-modal-content .modal-body {
  overflow-x: hidden;
  overflow-y: auto;
}

.skill-usage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.skill-usage-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.skill-usage-count strong {
  color: var(--color-text);
  font-size: 22px;
  line-height: 1;
}

.skill-usage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.skill-usage-search {
  width: min(260px, 42vw);
  margin: 0;
}

.skill-usage-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  overflow: hidden;
  background: var(--color-surface);
}

.skill-usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.skill-usage-table th,
.skill-usage-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.skill-usage-table th {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.skill-usage-table tbody tr:last-child td {
  border-bottom: none;
}

.skill-usage-table tbody tr.is-bound {
  background: rgba(34, 197, 94, 0.06);
}

.skill-usage-env {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.skill-usage-env-name {
  color: var(--color-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.skill-usage-env-description {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.skill-usage-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.skill-usage-status.bound {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
}

.skill-usage-status.unbound {
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
}

@media (max-width: 700px) {
  .skill-usage-btn {
    margin-left: 0;
  }

  .skill-usage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .skill-usage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .skill-usage-search {
    width: 100%;
  }

  .skill-usage-table th,
  .skill-usage-table td {
    padding: 10px 8px;
  }
}

.import-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0;
}

.import-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.import-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.import-tab:hover {
  color: var(--color-text);
}

.import-tab:hover::after {
  transform: scaleX(0.6);
  opacity: 0.5;
}

.import-tab.active {
  color: var(--color-accent);
  font-weight: 600;
}

.import-tab.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.import-tab-panel {
  display: none;
}

.import-tab-panel.active {
  display: block;
}

.import-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.import-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

/* Catalog Skills List */
.catalog-skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.catalog-skill-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.catalog-skill-item:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-muted);
}

.catalog-skill-item.selected {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.15);
}

.catalog-skill-item.imported {
  opacity: 0.6;
  cursor: not-allowed;
}

.catalog-skill-item.imported:hover {
  border-color: var(--color-border);
  background: var(--color-surface);
}

.catalog-skill-radio {
  margin-top: 2px;
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.catalog-skill-info {
  flex: 1;
  min-width: 0;
}

.catalog-skill-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-skill-description {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.catalog-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-skill-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.imported-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  color: var(--color-success);
  font-weight: 500;
}

/* Git/Folder form inline row */
.form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-inline .form-group {
  margin-bottom: 0;
}

@media (max-width: 500px) {
  .form-row-inline {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SKILL SOURCE BADGE
   ============================================================ */

.skill-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.skill-source-badge.source-internal {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.skill-source-badge.source-catalog {
  background: rgba(63, 114, 255, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(63, 114, 255, 0.3);
}

.skill-source-badge.source-git {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.skill-source-badge.source-folder {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.skill-source-badge.source-npm {
  background: rgba(203, 56, 55, 0.1);
  color: #cb3837;
  border: 1px solid rgba(203, 56, 55, 0.3);
}

.skill-source-badge.source-system {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ============================================================
   READONLY/PROPRIETARY SKILL STYLES
   ============================================================ */

.skill-readonly-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  margin-bottom: 20px;
}

.skill-readonly-notice svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.skill-readonly-notice-content h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.skill-readonly-notice-content p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.proprietary-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: var(--color-surface-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-medium);
  text-align: center;
}

.proprietary-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  opacity: 0.5;
  margin-bottom: 16px;
}

.proprietary-placeholder h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.proprietary-placeholder p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  max-width: 300px;
}

/* Update available badge */
.update-available-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  color: var(--color-warning);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.update-available-badge:hover {
  background: rgba(245, 158, 11, 0.25);
}

.update-available-badge svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   NPM IMPORT INFO BOX
   ============================================================ */

.import-npm-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(63, 114, 255, 0.05);
  border: 1px solid rgba(63, 114, 255, 0.2);
  border-radius: var(--radius-medium);
}

.import-npm-info-icon {
  flex-shrink: 0;
  color: var(--color-accent);
  width: 20px;
  height: 20px;
}

.import-npm-info-icon svg {
  width: 100%;
  height: 100%;
}

.import-npm-info-content {
  flex: 1;
  min-width: 0;
}

.import-npm-info-content strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.import-npm-info-content p {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.import-npm-info-content code {
  background: var(--color-surface-muted);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent);
}

/* Catalog NPM skill type indicator */
.catalog-skill-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.catalog-skill-type.type-git {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.catalog-skill-type.type-npm {
  background: rgba(203, 56, 55, 0.1);
  color: #cb3837;
  border: 1px solid rgba(203, 56, 55, 0.3);
}

/* ============================================================
   MARKETPLACE BUNDLES (Git Import)
   ============================================================ */

.input-with-button {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-with-button .form-input {
  flex: 1;
}

.input-with-button .btn-secondary {
  white-space: nowrap;
  flex-shrink: 0;
}

.marketplace-bundles-section {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-medium);
}

.marketplace-bundles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.marketplace-bundles-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketplace-bundles-header h4 svg {
  color: var(--color-accent);
}

.marketplace-version {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.marketplace-bundles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.marketplace-bundle-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.marketplace-bundle-item:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-muted);
}

.marketplace-bundle-item.selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(63, 114, 255, 0.15);
}

.marketplace-bundle-item.expanded {
  flex-direction: column;
}

.marketplace-bundle-item.expanded .bundle-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.bundle-radio {
  margin-top: 2px;
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.bundle-info {
  flex: 1;
  min-width: 0;
}

.bundle-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bundle-skill-count {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.bundle-description {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Skills list within a bundle */
.bundle-skills-list {
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.bundle-skills-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.bundle-skills-list-header button {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.bundle-skills-list-header button:hover {
  text-decoration: underline;
}

.bundle-skills-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 8px;
}

.bundle-skill-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-small);
  transition: background-color 0.15s ease;
}

.bundle-skill-checkbox:hover {
  background: var(--color-surface-muted);
}

.bundle-skill-checkbox input[type="checkbox"] {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.bundle-skill-checkbox .skill-path {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  font-size: 11px;
  margin-left: 8px;
}

.bundle-skill-checkbox.imported {
  opacity: 0.5;
  cursor: not-allowed;
}

.bundle-skill-checkbox.imported::after {
  content: '(imported)';
  font-size: 10px;
  color: var(--color-success);
  margin-left: auto;
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Probing state */
.probe-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.probe-loading .loading-spinner {
  width: 16px;
  height: 16px;
}

/* Marketplace source badge */
.skill-source-badge.source-marketplace {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Uncommitted changes / commit / discard modal sizing */
#uncommitted-changes-modal .modal-content,
#commit-modal .modal-content,
#discard-modal .modal-content {
  overflow: hidden;
  max-width: 750px;
}

#uncommitted-changes-modal .modal-body,
#commit-modal .modal-body,
#discard-modal .modal-body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Clickable changed files */
.changed-file-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: var(--radius-small, 4px);
}

.changed-file-clickable:hover {
  background: rgba(99, 102, 241, 0.08);
}

.changed-file-clickable.diff-expanded {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--color-accent, #6366f1);
  font-weight: 600;
}

/* Hide the bullet when file is expanded to show diff */
.modified-files-list > li.changed-file-item.diff-expanded::before {
  color: var(--color-accent, #6366f1);
}

/* Keep bullet as flex item when attribution is shown without checkboxes */
.modified-files-list > li.changed-file-item.changed-file-with-attribution::before {
  flex-shrink: 0;
}

/* Hide the default bullet when checkboxes are shown */
.modified-files-list > li.changed-file-item.changed-file-selectable::before {
  content: none;
}

/* File selection controls (select all / count) */
.file-select-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 0;
}

.file-select-controls.hidden {
  display: none;
}

.file-select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

.file-select-count {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Checkbox inside file items */
.file-select-checkbox {
  margin-right: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.modified-files-list > li.changed-file-selectable,
.modified-files-list > li.changed-file-with-attribution {
  display: flex;
  align-items: center;
}

/* File name text (allows truncation when attribution is present) */
.file-name-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Per-file attribution (who modified) */
.file-attribution {
  flex-shrink: 0;
  margin-left: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, sans-serif);
  font-style: italic;
  white-space: nowrap;
}

/* Inline diff panel below a file in the list */
.inline-file-diff {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px 0;
  border-radius: var(--radius-small, 4px);
  overflow: hidden;
  background: none;
}

.inline-file-diff::before {
  content: none;
}

/* Hide the redundant file header - filename is already shown in the list item */
.inline-file-diff .file-diff-header {
  display: none;
}

/* Always show diff content in inline context (header with toggle is hidden) */
.inline-file-diff .file-diff-content.collapsed {
  max-height: none;
  overflow: auto;
}

.inline-file-diff .file-diff {
  margin-top: 0;
  border-radius: var(--radius-small, 4px);
  border: 1px solid var(--color-border, #e2e8f0);
  overflow: hidden;
}

.inline-file-diff .file-diff-content {
  max-height: 350px;
  overflow: auto;
}

/* Ensure diff content doesn't cause horizontal overflow on the modal */
.inline-file-diff .diff-line {
  min-width: 0;
}

.inline-file-diff .diff-line-content {
  overflow-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
}

.inline-file-diff-loading {
  padding: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 13px;
  background: none;
}

.inline-file-diff-loading::before {
  content: none;
}

.inline-diff-empty {
  padding: 12px;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 13px;
  background: var(--color-surface-muted, #f5f5f5);
  border-radius: var(--radius-small, 4px);
}
