/* ================================================
   Bebeeb API Documentation - Custom Styles
   A modern, dark-themed API documentation UI
   ================================================ */

:root {
  /* Color Palette - Inspired by Indonesian batik and modern tech */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-elevated: #222230;
  --bg-hover: #2a2a3a;
  
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #606075;
  
  --accent-primary: #f59e0b;
  --accent-secondary: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Method Colors */
  --get: #22c55e;
  --post: #3b82f6;
  --put: #f59e0b;
  --patch: #8b5cf6;
  --delete: #ef4444;
  
  /* Spacing */
  --sidebar-width: 320px;
  --top-bar-height: 60px;
  
  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Borders & Shadows */
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
}

/* App Layout */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ================================================
   Sidebar
   ================================================ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-normal);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px var(--accent-primary));
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Search */
.search-container {
  padding: 16px 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 60px 10px 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  background: var(--bg-elevated);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  padding: 12px 20px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Services List */
.services-list {
  padding: 0 12px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.service-item:hover {
  background: var(--bg-hover);
}

.service-item.active {
  background: var(--accent-glow);
  border-left: 3px solid var(--accent-primary);
}

.service-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

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

.service-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Filter Tags */
.filter-tags {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.filter-tag:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.filter-tag.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.filter-tag.get { --tag-color: var(--get); }
.filter-tag.post { --tag-color: var(--post); }
.filter-tag.put { --tag-color: var(--put); }
.filter-tag.delete { --tag-color: var(--delete); }

.filter-tag.get.active { background: var(--get); }
.filter-tag.post.active { background: var(--post); }
.filter-tag.put.active { background: var(--put); }
.filter-tag.delete.active { background: var(--delete); }

/* Endpoints List */
.endpoints-section {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.endpoints-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 20px;
}

.endpoint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.endpoint-item:hover {
  background: var(--bg-hover);
}

.endpoint-item.active {
  background: var(--accent-glow);
}

.method-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  min-width: 50px;
  text-align: center;
}

.method-badge.get { background: rgba(34, 197, 94, 0.15); color: var(--get); }
.method-badge.post { background: rgba(59, 130, 246, 0.15); color: var(--post); }
.method-badge.put { background: rgba(245, 158, 11, 0.15); color: var(--put); }
.method-badge.patch { background: rgba(139, 92, 246, 0.15); color: var(--patch); }
.method-badge.delete { background: rgba(239, 68, 68, 0.15); color: var(--delete); }

.endpoint-path {
  flex: 1;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================
   Main Content
   ================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top Bar */
.top-bar {
  height: var(--top-bar-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-secondary);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.auth-btn.authenticated {
  border-color: var(--success);
  color: var(--success);
}

.server-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-selector select {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.current-server {
  font-size: 12px;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  background: var(--bg-primary);
}

/* Welcome Screen */
.welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--top-bar-height) - 64px);
}

.welcome-content {
  text-align: center;
  max-width: 600px;
}

.welcome-logo {
  font-size: 80px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 40px var(--accent-primary));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.welcome-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.welcome-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 40px;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-primary);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.action-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.action-btn.primary:hover {
  background: var(--accent-secondary);
  box-shadow: var(--shadow-glow);
}

/* ================================================
   Endpoint Detail
   ================================================ */
.endpoint-detail {
  max-width: 1200px;
  margin: 0 auto;
}

.endpoint-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.endpoint-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.endpoint-title h2 {
  font-size: 24px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.endpoint-title .method-badge {
  font-size: 14px;
  padding: 8px 16px;
}

.endpoint-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.endpoint-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.endpoint-tags .tag {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-xl);
  font-size: 12px;
  color: var(--text-secondary);
}

.endpoint-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* Request Section */
.request-section,
.response-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.request-section h3,
.response-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* Tabs */
.request-tabs,
.response-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.tab-content {
  min-height: 200px;
}

/* Parameters */
.params-section {
  margin-bottom: 20px;
}

.params-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.params-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.add-param-btn {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.add-param-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

.no-params {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.param-row {
  display: grid;
  grid-template-columns: 24px 1fr 1.5fr 80px 32px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.param-row:hover {
  border-color: var(--accent-primary);
}

.param-row.required {
  border-left: 3px solid var(--error);
}

.param-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.param-key,
.param-value {
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}

.param-key {
  font-family: var(--font-mono);
  font-weight: 500;
}

.param-value {
  font-family: var(--font-mono);
}

.param-key:focus,
.param-value:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.param-key:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.param-type-select {
  padding: 6px 8px;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

.param-type-select:hover {
  border-color: var(--border-color);
}

.remove-row-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.remove-row-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--error);
  color: var(--error);
}

.param-info {
  grid-column: 2 / -1;
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 4px;
  margin-top: -4px;
}

.param-required-badge {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  margin-left: 8px;
}

/* Headers Editor */
.headers-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-value-row {
  display: grid;
  grid-template-columns: 1fr 1fr 32px;
  gap: 8px;
}

.key-value-row input {
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}

.key-value-row input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.remove-row {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.remove-row:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.add-row-btn {
  margin-top: 8px;
  padding: 8px;
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.add-row-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Body Editor */
.body-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.body-toolbar-left,
.body-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.body-toolbar select {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}

.demo-data-btn,
.format-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.demo-data-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.format-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.body-info {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.body-info:empty {
  display: none;
}

.body-info-title {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.body-schema {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.body-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.body-field-name {
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

.body-field-type {
  color: var(--text-muted);
  font-size: 11px;
}

.body-field-required {
  color: var(--error);
  font-size: 10px;
  font-weight: 600;
}

.code-editor {
  width: 100%;
  min-height: 250px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  tab-size: 2;
}

.code-editor:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.code-editor::placeholder {
  color: var(--text-muted);
}

/* Execute Button */
.execute-container {
  margin-top: 20px;
}

.execute-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.execute-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.execute-btn:active {
  transform: translateY(0);
}

.execute-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Response Section */
.response-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
}

.response-placeholder svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.response-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.response-time,
.response-size {
  font-size: 13px;
  color: var(--text-muted);
}

.response-body,
.response-headers {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
}

.response-body pre,
.response-headers pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ================================================
   Modals
   ================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.form-group textarea {
  min-height: 100px;
  font-family: var(--font-mono);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn.primary {
  background: var(--accent-primary);
  border: none;
  color: var(--bg-primary);
}

.btn.primary:hover {
  background: var(--accent-secondary);
}

.btn.secondary {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn.secondary:hover {
  background: var(--bg-hover);
}

/* Search Modal */
.search-modal {
  max-width: 700px;
  padding: 0;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.search-modal-header svg {
  color: var(--text-muted);
}

.search-modal-header input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
}

.search-modal-header input:focus {
  outline: none;
}

.search-modal-header kbd {
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-hint {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item .method-badge {
  min-width: 60px;
}

.search-result-info {
  flex: 1;
}

.search-result-path {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

.search-result-summary {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================================================
   Utility Classes
   ================================================ */
.hidden {
  display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-hover);
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 1200px) {
  .endpoint-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    transition: left var(--transition-normal);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .welcome-content h1 {
    font-size: 32px;
  }
  
  .welcome-stats {
    flex-direction: column;
  }
}

/* Syntax Highlighting */
.hljs-string { color: #a5d6ff; }
.hljs-number { color: #79c0ff; }
.hljs-literal { color: #ff7b72; }
.hljs-keyword { color: #ff7b72; }
.hljs-attr { color: #7ee787; }

/* ================================================
   Infrastructure Dashboard Section
   ================================================ */
.infrastructure-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.infrastructure-section .section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.dashboard-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.1);
}

.dashboard-card:hover::before {
  opacity: 1;
}

.dashboard-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 10px;
  flex-shrink: 0;
}

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

.dashboard-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dashboard-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.dashboard-port {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  background: var(--accent-glow);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Dashboard Card Colors */
.dashboard-card.casdoor:hover { border-color: #10b981; box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.15); }
.dashboard-card.jaeger:hover { border-color: #3b82f6; box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.15); }
.dashboard-card.prometheus:hover { border-color: #e74c3c; box-shadow: var(--shadow-md), 0 0 20px rgba(231, 76, 60, 0.15); }
.dashboard-card.grafana:hover { border-color: #f46800; box-shadow: var(--shadow-md), 0 0 20px rgba(244, 104, 0, 0.15); }
.dashboard-card.meilisearch:hover { border-color: #ff5caa; box-shadow: var(--shadow-md), 0 0 20px rgba(255, 92, 170, 0.15); }
.dashboard-card.minio:hover { border-color: #c72c48; box-shadow: var(--shadow-md), 0 0 20px rgba(199, 44, 72, 0.15); }
.dashboard-card.centrifugo:hover { border-color: #fbbf24; box-shadow: var(--shadow-md), 0 0 20px rgba(251, 191, 36, 0.15); }
.dashboard-card.consul:hover { border-color: #dc477d; box-shadow: var(--shadow-md), 0 0 20px rgba(220, 71, 125, 0.15); }
.dashboard-card.rabbitmq:hover { border-color: #ff6600; box-shadow: var(--shadow-md), 0 0 20px rgba(255, 102, 0, 0.15); }

/* ================================================
   Logs Modal
   ================================================ */
.logs-modal {
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.logs-modal .modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.logs-modal .modal-header h3 {
  margin: 0;
  flex: 1;
}

.logs-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logs-controls select {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  min-width: 180px;
}

.log-btn {
  padding: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.log-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.log-btn.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.logs-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.log-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
}

.log-search:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.log-level-filters {
  display: flex;
  gap: 12px;
}

.log-level-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.log-level-filter input {
  cursor: pointer;
}

.level-debug { color: #8b5cf6; }
.level-info { color: #3b82f6; }
.level-warn { color: #f59e0b; }
.level-error { color: #ef4444; }

.log-line-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.log-line-count select {
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 12px;
}

.logs-content {
  flex: 1;
  overflow: auto;
  padding: 0;
  background: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.logs-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 16px;
}

.logs-placeholder svg {
  opacity: 0.5;
}

.log-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.log-line:hover {
  background: var(--bg-secondary);
}

.log-line.debug { border-left: 3px solid #8b5cf6; }
.log-line.info { border-left: 3px solid #3b82f6; }
.log-line.warn { border-left: 3px solid #f59e0b; }
.log-line.error { border-left: 3px solid #ef4444; background: rgba(239, 68, 68, 0.05); }

.log-line.expanded {
  background: var(--bg-secondary);
}

.log-line-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 16px;
  min-height: 32px;
}

.log-expand-btn {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 1px;
}

.log-expand-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.log-expand-btn.expanded {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.log-expand-btn.expanded svg {
  transform: rotate(180deg);
}

.log-expand-btn svg {
  transition: transform var(--transition-fast);
}

.log-timestamp {
  flex-shrink: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.log-level {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 45px;
  text-align: center;
}

.log-level.DEBUG { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.log-level.INFO { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.log-level.WARN { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.log-level.ERROR { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.log-message {
  color: var(--text-primary);
  flex: 1;
  word-break: break-word;
  line-height: 1.5;
}

.log-service {
  flex-shrink: 0;
  color: var(--accent-primary);
  font-size: 11px;
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Log Details (Expandable) */
.log-details {
  display: none;
  padding: 12px 16px 12px 48px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.log-details.expanded {
  display: block;
}

.log-detail-section {
  margin-bottom: 12px;
}

.log-detail-section:last-child {
  margin-bottom: 0;
}

.log-detail-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.log-detail-value {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.log-detail-value.log-mono {
  font-family: var(--font-mono);
  font-size: 11px;
}

.log-code {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.log-code.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.log-stacktrace {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

.log-json-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0;
}

