:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --basic-color: #22c55e;
  --problem-color: #f59e0b;
  --advanced-color: #8b5cf6;
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.glass-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  margin-bottom: 8px;
  position: sticky;
  top: 8px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--advanced-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}

.header-title {
  font-size: 15px;
  font-weight: 600;
}

.header-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.content-area {
  min-height: 400px;
}

.kp-card {
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.kp-header {
  margin-bottom: 24px;
}

.kp-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.kp-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.kp-tag.category {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
}

.kp-tag.difficulty {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.kp-tag.time {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.kp-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.kp-section {
  margin: 20px 0;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border-left: 4px solid transparent;
}

.basic-section {
  border-left-color: var(--basic-color);
}

.problem-section {
  border-left-color: var(--problem-color);
}

.advanced-section {
  border-left-color: var(--advanced-color);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-icon {
  font-size: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
}

.basic-section .section-title { color: var(--basic-color); }
.problem-section .section-title { color: var(--problem-color); }
.advanced-section .section-title { color: var(--advanced-color); }

.section-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-primary);
}

.section-content p {
  margin: 8px 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-content ul, .section-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.section-content li {
  margin: 4px 0;
  color: var(--text-secondary);
}

.section-content code {
  background: rgba(99, 102, 241, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

.section-content pre {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.section-content pre code {
  background: none;
  padding: 0;
  color: #e0e0e0;
  font-size: 13px;
  line-height: 1.5;
}

.section-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.kp-concepts {
  margin-top: 24px;
  padding: 20px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.concepts-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #4ade80;
}

.concepts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.concept-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 720px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(15, 15, 35, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.nav-btn-icon svg {
  width: 100%;
  height: 100%;
}


.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-text {
  color: var(--text-secondary);
  font-size: 16px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 20px;
}

.close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
}

.modal-body h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.help-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.format-doc {
  padding: 16px;
  margin-bottom: 16px;
}

.format-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent-light);
}

.format-doc pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
}

.format-doc code {
  font-size: 12px;
  color: #a0a0b0;
}

.import-upload {
  display: flex;
  gap: 12px;
  align-items: center;
}

.file-input-wrapper {
  flex: 1;
}

.file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.file-label:hover {
  background: rgba(255, 255, 255, 0.12);
}

input[type="file"] {
  display: none;
}

.upload-btn {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-btn:hover:not(:disabled) {
  background: var(--accent-light);
}

.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.base-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.base-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.base-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.base-item.active {
  border-color: var(--accent);
}

.base-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.base-info {
  flex: 1;
}

.base-name {
  font-weight: 600;
  font-size: 14px;
}

.base-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.base-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--basic-color);
  color: #4ade80;
}

.toast.error {
  border-color: #ef4444;
  color: #f87171;
}

@media (max-width: 480px) {
  .kp-card {
    padding: 16px;
  }
  
  .kp-title {
    font-size: 18px;
  }
  
  .kp-section {
    padding: 16px;
  }
}
\n/* === Additional Styles === */\n

/* ── Header right section ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #4ade80;
  transition: all 0.3s;
}

.progress-badge:hover {
  background: rgba(34, 197, 94, 0.25);
}

.progress-icon {
  font-size: 16px;
}

.progress-text {
  min-width: 30px;
  text-align: center;
}

/* ── Completed tag ── */
.kp-tag.completed {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-weight: 600;
}

/* ── Complete button (bottom nav) ── */
.nav-complete-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  white-space: nowrap;
}

.nav-complete-btn:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.5);
}

.nav-complete-btn.completed {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
}

/* ── Nav counter (bottom nav) ── */
.nav-counter {
  min-width: 52px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  text-align: center;
  white-space: nowrap;
}

/* ── Shortcuts section ── */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.shortcut-item kbd {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-primary);
  min-width: 36px;
  text-align: center;
}

/* ── Format notes in settings ── */
.format-notes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.format-notes p {
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.format-notes ul {
  padding-left: 20px;
  font-size: 12px;
}

.format-notes li {
  margin: 4px 0;
  color: var(--text-secondary);
}

.format-notes code {
  background: rgba(99, 102, 241, 0.2);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--accent-light);
}

/* ── Prism.js overrides for dark theme ── */
.section-content pre[class*="language-"],
.section-content code[class*="language-"] {
  background: rgba(0, 0, 0, 0.4) !important;
  text-shadow: none !important;
}

.section-content pre[class*="language-"] {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.section-content pre[class*="language-"] code {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 13px;
}

/* ── Smoother transitions ── */
.kp-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.kp-section {
  transition: border-color 0.3s ease, background 0.3s ease;
}

.kp-section:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ── Section content code improvements ── */
.section-content pre {
  position: relative;
}

.section-content pre::before {
  content: "Python";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Responsive improvements ── */
@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
  }
  
  .progress-badge {
    padding: 4px 10px;
    font-size: 12px;
  }
  
  .nav-counter {
    display: none;
  }
  
  .kp-meta-top {
    gap: 6px;
  }
  
  .kp-tag {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}


/* ═══════════════════════════════════════════
   Settings Modal - Tabbed Interface
   ═══════════════════════════════════════════ */

.settings-modal {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  animation: settingsFadeIn 0.3s ease;
}

@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Settings Header ── */
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.settings-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-header-left h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.settings-icon {
  font-size: 22px;
}

.settings-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.settings-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: rotate(90deg);
}

/* ── Settings Tabs ── */
.settings-tabs {
  display: flex;
  position: relative;
  padding: 0 24px;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.settings-tab {
  flex: 1;
  padding: 14px 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s;
  white-space: nowrap;
}

.settings-tab:hover {
  color: rgba(255,255,255,0.8);
}

.settings-tab.active {
  color: #fff;
  font-weight: 600;
}

.settings-tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  border-radius: 2px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Settings Body ── */
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.settings-panel {
  display: none;
  animation: panelFadeIn 0.25s ease;
}

.settings-panel.active {
  display: block;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════
   Import Tab
   ═══════════════════════════════════════════ */

/* Step guide */
.import-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.import-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.import-step:hover {
  background: rgba(255,255,255,0.07);
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.step-text strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.step-text p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* Example code card */
.import-example-card {
  background: #1e1e2e;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.example-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.example-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.example-dot.red { background: #ff5f57; }
.example-dot.yellow { background: #febc29; }
.example-dot.green { background: #28c840; }

.example-title {
  margin-left: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
}

.example-code {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  overflow-x: auto;
  background: transparent;
  color: #cdd6f4;
}

.example-code code {
  font-family: inherit;
  background: transparent;
}

.syn-bracket { color: #f9e2af; }
.syn-key { color: #89b4fa; }
.syn-str { color: #a6e3a1; }
.syn-num { color: #fab387; }

/* Collapsible advanced section */
.advanced-toggle {
  margin-bottom: 20px;
}

.adv-toggle-btn {
  background: none;
  border: none;
  color: #a29bfe;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: color 0.2s;
}

.adv-toggle-btn:hover {
  color: #6c5ce7;
}

.toggle-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}

.advanced-detail {
  margin-top: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 400px; }
}

.format-notes-inner {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.format-notes-inner p {
  margin: 0 0 8px;
}

.format-notes-inner ul {
  margin: 0;
  padding-left: 18px;
}

.format-notes-inner li {
  margin-bottom: 4px;
}

.format-notes-inner code {
  background: rgba(108,92,231,0.2);
  color: #a29bfe;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #6c5ce7;
  background: rgba(108,92,231,0.08);
}

.drop-zone.drag-over {
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(108,92,231,0.2);
}

.drop-zone-icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon {
  opacity: 1;
  transform: translateY(-4px);
}

.drop-zone-text {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
}

.drop-zone-or {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  margin-bottom: 10px;
}

.file-label-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(108,92,231,0.15);
  color: #a29bfe;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(108,92,231,0.3);
}

.file-label-btn:hover {
  background: rgba(108,92,231,0.25);
  color: #fff;
}

.file-label-btn input[type="file"] {
  display: none;
}

/* Import actions */
.import-actions {
  margin-bottom: 20px;
  text-align: center;
}

.upload-btn-new {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.upload-btn-new:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

.upload-btn-new:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Knowledge base section */
.kb-section {
  margin-top: 24px;
}

.kb-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
}

/* ═══════════════════════════════════════════
   Shortcuts Tab
   ═══════════════════════════════════════════ */

.shortcut-group {
  margin-bottom: 24px;
}

.shortcut-group:last-child {
  margin-bottom: 0;
}

.shortcut-group-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-left: 4px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.shortcut-row:hover {
  background: rgba(255,255,255,0.04);
}

.shortcut-row:hover .key-cap {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(108,92,231,0.2);
}

.shortcut-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.key-combo {
  display: flex;
  gap: 6px;
  align-items: center;
}

.key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  background: linear-gradient(180deg, #2d2d3d, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: 3px solid rgba(0,0,0,0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.key-cap.key-arrow {
  font-size: 18px;
}

.key-cap.key-wide {
  min-width: 50px;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════
   Stats Tab
   ═══════════════════════════════════════════ */

.stats-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: rgba(255,255,255,0.5);
}

.stats-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #6c5ce7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stats-content {
  animation: panelFadeIn 0.3s ease;
}

.stats-ring-section {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.progress-ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke: url(#ringGradient);
  stroke: #6c5ce7;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ring-pct {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.ring-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Category bars */
.cat-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin: 0 0 14px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cat-name {
  flex-shrink: 0;
  width: 100px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.cat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
}

.cat-count {
  flex-shrink: 0;
  width: 50px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: right;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.no-cats {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 20px 0;
}

.stats-error {
  text-align: center;
  padding: 40px 0;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}

/* ═══════════════════════════════════════════
   Settings Modal - Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
  .settings-header {
    padding: 16px 16px 12px;
  }

  .settings-tabs {
    padding: 0 12px;
  }

  .settings-tab {
    font-size: 12px;
    padding: 12px 4px;
  }

  .settings-body {
    padding: 16px;
  }

  .import-step {
    padding: 10px 12px;
    gap: 10px;
  }

  .step-num {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .drop-zone {
    padding: 20px 12px;
  }

  .drop-zone-icon {
    font-size: 32px;
  }

  .key-cap {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .cat-name {
    width: 70px;
    font-size: 12px;
  }

  .cat-count {
    width: 40px;
    font-size: 11px;
  }

  .example-code {
    font-size: 11px;
    padding: 12px;
  }
}



/* ═══════════════════════════════════════════
   Management Button (header)
   ═══════════════════════════════════════════ */

.mgmt-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mgmt-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   Management Panel - Full-page overlay
   ═══════════════════════════════════════════ */

.mgmt-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 25, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mgmt-panel.active {
  display: flex;
  animation: mgmtSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


.mgmt-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
}

.mgmt-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

@keyframes mgmtSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mgmt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mgmt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mgmt-header-left h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mgmt-header-icon {
  font-size: 24px;
}

.mgmt-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mgmt-header-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mgmt-export-btn {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.mgmt-export-btn:hover {
  background: rgba(99, 102, 241, 0.35);
}

.mgmt-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.mgmt-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* ═══════════════════════════════════════════
   Management Toolbar
   ═══════════════════════════════════════════ */

.mgmt-toolbar {
  display: flex;
  gap: 12px;
  padding: 16px 28px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.mgmt-search {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.mgmt-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.mgmt-search input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mgmt-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

.mgmt-filter {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  min-width: 130px;
  transition: all 0.2s;
}

.mgmt-filter:focus {
  border-color: var(--accent);
}

.mgmt-filter option {
  background: #1a1a2e;
  color: var(--text-primary);
}

.mgmt-add-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--advanced-color));
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mgmt-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

/* ═══════════════════════════════════════════
   Management KP List
   ═══════════════════════════════════════════ */

.mgmt-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 28px 28px;
}

.mgmt-list::-webkit-scrollbar {
  width: 6px;
}

.mgmt-list::-webkit-scrollbar-track {
  background: transparent;
}

.mgmt-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.mgmt-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: default;
}

.mgmt-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.mgmt-item-info {
  flex: 1;
  min-width: 0;
}

.mgmt-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgmt-item-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.mgmt-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mgmt-item-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.mgmt-item-status.completed {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.mgmt-item-status.pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.mgmt-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.mgmt-item-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mgmt-edit-btn {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
}

.mgmt-edit-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  transform: scale(1.1);
}

.mgmt-delete-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.mgmt-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════
   Management Form Overlay
   ═══════════════════════════════════════════ */

.mgmt-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 10, 25, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.mgmt-form-overlay.active {
  display: flex;
  animation: mgmtSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgmt-form {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 28px;
}

.mgmt-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mgmt-form-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mgmt-form-group {
  margin-bottom: 22px;
}

.mgmt-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.mgmt-form-group input,
.mgmt-form-group select,
.mgmt-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.mgmt-form-group input:focus,
.mgmt-form-group select:focus,
.mgmt-form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mgmt-form-group textarea {
  min-height: 140px;
  resize: vertical;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.mgmt-form-group select option {
  background: #1a1a2e;
}

.mgmt-form-row {
  display: flex;
  gap: 16px;
}

.mgmt-form-row .mgmt-form-group {
  flex: 1;
}

.mgmt-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mgmt-slider-wrap input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  border: none;
  padding: 0;
  outline: none;
}

.mgmt-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--advanced-color));
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s;
}

.mgmt-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.mgmt-slider-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-light);
  min-width: 28px;
  text-align: center;
}

.mgmt-form-bottom {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mgmt-save-btn {
  padding: 12px 36px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--advanced-color));
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mgmt-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
}

.mgmt-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mgmt-cancel-btn {
  padding: 12px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mgmt-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.mgmt-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.mgmt-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.mgmt-empty-text {
  font-size: 14px;
}

.mgmt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.mgmt-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════
   Responsive Management Panel
   ═══════════════════════════════════════════ */

@media (max-width: 600px) {
  .mgmt-header {
    padding: 14px 16px;
  }

  .mgmt-header-left h2 {
    font-size: 17px;
  }

  .mgmt-toolbar {
    padding: 12px 16px;
    gap: 8px;
  }

  .mgmt-search {
    min-width: 100%;
  }

  .mgmt-filter {
    flex: 1;
  }

  .mgmt-list {
    padding: 0 16px 16px;
  }

  .mgmt-item {
    flex-wrap: wrap;
    padding: 14px 16px;
    gap: 10px;
  }

  .mgmt-item-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }

  .mgmt-form {
    padding: 16px;
  }

  .mgmt-form-row {
    flex-direction: column;
    gap: 0;
  }

  .mgmt-form-bottom {
    flex-direction: column-reverse;
  }

  .mgmt-save-btn,
  .mgmt-cancel-btn {
    width: 100%;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════
   KP Detail View Overlay (in management panel)
   ═══════════════════════════════════════════ */

.mgmt-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 10, 25, 0.96);
  backdrop-filter: blur(24px);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mgmt-detail-overlay.active {
  display: flex;
  animation: mgmtSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mgmt-detail-container {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 860px;
  max-height: 90vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.mgmt-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mgmt-detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.mgmt-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgmt-detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.mgmt-detail-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
}

.mgmt-detail-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 12px;
}

.mgmt-detail-edit-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.mgmt-detail-edit-btn:hover {
  background: rgba(99, 102, 241, 0.35);
}

.mgmt-detail-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 22px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.mgmt-detail-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.mgmt-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 32px;
}

.mgmt-detail-body::-webkit-scrollbar {
  width: 6px;
}

.mgmt-detail-body::-webkit-scrollbar-track {
  background: transparent;
}

.mgmt-detail-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.mgmt-detail-section {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mgmt-detail-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.mgmt-detail-section-icon {
  font-size: 20px;
}

.mgmt-detail-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.mgmt-detail-section-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.mgmt-detail-section-content pre {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
}

.mgmt-detail-section-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.mgmt-detail-section-content p {
  margin: 8px 0;
}

.mgmt-detail-section-content strong {
  color: var(--text-primary);
}

.mgmt-detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 16px;
  color: var(--text-secondary);
}

