/* Admin Panel Styles - Cyberpunk & Clean Theme */

:root {
  /* Inherit variables from dashboard.css (assuming it's loaded first) but override some for admin specifics */
  --admin-sidebar-width: 280px;
  --admin-header-height: 70px;
}

.admin-body {
  margin: 0;
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

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

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

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-label {
  flex: 1;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item--back {
  color: var(--text-muted);
  font-size: 13px;
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: var(--admin-sidebar-width);
  padding: 32px 40px;
  min-height: 100vh;
  transition: margin 0.3s ease;
}

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

.header-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.user-avatar {
  font-size: 18px;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

/* Auth Section */
.auth-card {
  max-width: 400px;
  margin: 80px auto;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
}

.auth-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  min-height: 20px;
}

/* Stat Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card--primary .stat-icon {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.stat-card--success .stat-icon {
  background: var(--success-soft);
  color: var(--success);
}

.stat-card--warning .stat-icon {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.stat-card--info .stat-icon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

/* Admin Panels */
.panel-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.admin-panel .panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.admin-panel .panel-body {
  padding: 24px;
}

/* Config Cards */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.config-card:hover {
  border-color: var(--accent);
}

.config-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.config-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.config-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.config-title p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.config-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-unit {
  font-size: 14px;
  color: var(--text-muted);
}

/* Toggle Switch Style */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-label input {
  display: none;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  transition: all 0.3s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-label input:checked + .toggle-switch {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
  background: white;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--border);
}

.activity-item--decision {
  border-left-color: var(--accent);
}
.activity-item--action {
  border-left-color: var(--success);
}
.activity-item--error {
  border-left-color: var(--danger);
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 80px;
}

.activity-content {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* API Keys Section */
.apikeys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.apikey-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.apikey-panel .panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-alt);
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-icon {
  font-size: 24px;
}

.apikey-panel .panel-body {
  padding: 24px;
}

/* Environment Tabs */
.env-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.env-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.env-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* API Key Forms */
.api-key-forms {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

.input-with-action .btn {
  padding: 8px 12px;
  min-width: 44px;
}

/* LLM Providers */
.llm-providers {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.llm-provider-row {
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

.provider-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full);
}

.status-badge--active {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge--inactive {
  background: rgba(156, 163, 175, 0.15);
  color: var(--text-muted);
}

.status-badge--warning {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

/* Config Actions */
.config-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.config-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
}

/* API Keys Info Box */
.apikeys-info {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
}

.apikeys-info h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.apikeys-info ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apikeys-info li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Scheduler Grid */
.scheduler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

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

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

.schedule-status {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.status-item:last-child {
  border-bottom: none;
}

.status-label {
  font-size: 14px;
  color: var(--text-muted);
}

.status-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* System Grid */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.panel--full {
  grid-column: 1 / -1;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 14px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.model-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-transform: capitalize;
}

.model-group ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-group li {
  font-size: 13px;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.action-warning {
  margin-top: 16px;
  font-size: 13px;
  color: var(--warning);
}

/* Table Styles */
.table-wrapper {
  overflow-x: auto;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper th,
.table-wrapper td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.table-wrapper th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-wrapper td {
  color: var(--text);
}

.text-right {
  text-align: right !important;
}

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

.pnl-positive {
  color: var(--success) !important;
}

.pnl-negative {
  color: var(--danger) !important;
}

.activity-type {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.activity-content p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 72px;
  }

  .sidebar-header {
    padding: 0;
    justify-content: center;
  }

  .logo-text,
  .sidebar-badge,
  .nav-label {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .admin-main {
    margin-left: 72px;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-main {
    margin-left: 0;
    padding: 20px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .panel-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-card {
    margin: 20px;
    padding: 24px;
  }

  .config-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }
}

/* Log Viewer Styles */
.log-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.log-filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

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

.log-viewer {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  height: 500px;
  overflow-y: auto;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 12px;
  line-height: 1.6;
}

.log-line {
  padding: 2px 8px;
  border-radius: 2px;
  white-space: pre-wrap;
  word-break: break-all;
}

.log-line--info {
  color: var(--text-muted);
}

.log-line--warning {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.log-line--error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.log-line--debug {
  color: var(--text-muted);
  opacity: 0.7;
}

.log-line--critical {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  font-weight: 600;
}

/* Risk Settings Styles */
.risk-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.risk-info {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.risk-info h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.risk-info h4:not(:first-child) {
  margin-top: 20px;
}

.risk-info ul {
  margin: 0;
  padding-left: 20px;
}

.risk-info li {
  margin-bottom: 8px;
}

/* Scheduler Controls */
.scheduler-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn--success {
  background: var(--success);
  color: white;
  border: none;
}

.btn--success:hover {
  background: var(--success);
  opacity: 0.9;
}

.btn--accent {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
}

.btn--accent:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  opacity: 0.95;
}

/* Base Modal Styles */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Modal Backdrop & Base Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000; /* 높은 z-index */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

/* Symbol Run Modal (Special ID but same style) */
#symbol-run-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#symbol-run-modal[hidden] {
  display: none !important;
}

#symbol-run-modal .modal {
  max-width: 400px;
  width: 90%;
}

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

#symbol-run-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

#symbol-run-modal .modal-body {
  padding: 24px;
}

.symbol-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
}

.symbol-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

/* Trading Symbols Styles */
.symbols-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

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

.symbol-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.symbols-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.symbols-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.symbols-section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.selected-symbols,
.available-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  max-height: 300px;
  overflow-y: auto;
}

.symbol-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.symbol-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.symbol-chip--selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.symbol-chip--selected:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.symbol-chip--btc,
.symbol-chip--btc-available {
  background: linear-gradient(
    135deg,
    rgba(247, 147, 26, 0.15),
    rgba(247, 147, 26, 0.05)
  );
  border-color: #f7931a;
  color: #f7931a;
}

.symbol-chip--btc:hover {
  background: linear-gradient(
    135deg,
    rgba(247, 147, 26, 0.25),
    rgba(247, 147, 26, 0.15)
  );
}

.symbol-chip--btc-available:hover {
  background: linear-gradient(
    135deg,
    rgba(247, 147, 26, 0.3),
    rgba(247, 147, 26, 0.2)
  );
  border-color: #f7931a;
}

.symbol-remove {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.6;
}

.symbol-chip--selected:hover .symbol-remove {
  opacity: 1;
}

.symbols-info {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.symbols-info h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.symbols-info h4:not(:first-child) {
  margin-top: 20px;
}

.symbols-info ul {
  margin: 0;
  padding-left: 20px;
}

.symbols-info li {
  margin-bottom: 8px;
}

/* Symbol search input styling */
#symbol-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  transition: border-color 0.2s ease;
}

#symbol-search:focus {
  outline: none;
  border-color: var(--accent);
}

#symbol-search::placeholder {
  color: var(--text-muted);
}

/* ===== Agent Analysis Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.agent-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

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

.agent-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-modal-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.agent-modal-symbol {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.agent-modal .modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Agent Tabs */
.agent-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.agent-tab {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agent-tab:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.agent-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Agent Content */
.agent-content {
  display: none;
}

.agent-content.active {
  display: block;
}

.agent-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.agent-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.agent-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.agent-card-icon--indicator {
  background: rgba(34, 211, 238, 0.15);
}

.agent-card-icon--pattern {
  background: rgba(168, 85, 247, 0.15);
}

.agent-card-icon--trend {
  background: rgba(245, 158, 11, 0.15);
}

.agent-card-icon--decision {
  background: rgba(16, 185, 129, 0.15);
}

.agent-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* Agent Fields */
.agent-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.agent-fields--levels {
  margin-top: 16px;
  grid-template-columns: 1fr 1fr;
}

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

.agent-field--full {
  grid-column: span 1;
}

.agent-field-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.agent-field-value {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 14px;
  color: var(--text);
}

.agent-field-value--bullish {
  color: var(--success);
}

.agent-field-value--bearish {
  color: var(--danger);
}

.agent-field-value--neutral {
  color: var(--warning);
}

.agent-field-value--status {
  font-size: 18px;
  font-weight: 700;
}

/* Agent Analysis Section */
.agent-analysis-section {
  margin-top: 16px;
}

.agent-analysis {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.agent-analysis h1,
.agent-analysis h2,
.agent-analysis h3 {
  margin: 16px 0 8px;
  font-weight: 600;
  color: var(--text);
}

.agent-analysis h1 {
  font-size: 18px;
}

.agent-analysis h2 {
  font-size: 16px;
}

.agent-analysis h3 {
  font-size: 14px;
}

.agent-analysis p {
  margin-bottom: 8px;
}

.agent-analysis ul,
.agent-analysis ol {
  margin: 8px 0;
  padding-left: 24px;
}

.agent-analysis li {
  margin-bottom: 4px;
}

.agent-analysis code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 13px;
}

.agent-analysis pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 12px 0;
}

.agent-analysis pre code {
  background: transparent;
  padding: 0;
}

.agent-analysis blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 12px 0;
  color: var(--text-muted);
}

.no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-size: 14px;
}

/* Make activity items clickable */
.activity-item {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.activity-item:hover {
  background: var(--surface);
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0;
  }

  .agent-modal {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .agent-modal .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
  }

  .agent-modal .modal-body {
    padding: 16px;
  }

  .agent-tabs {
    flex-wrap: wrap;
    row-gap: 8px;
    overflow-x: auto;
  }

  .agent-tab {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .agent-card {
    padding: 16px;
  }

  .agent-fields {
    grid-template-columns: 1fr;
  }
}
