/* ==========================================
   AegisRH AI - Swarm Operator Dashboard CSS
   ========================================== */

.dashboard-body {
    background-color: var(--bg-color); /* Warm Creamy Yellowish-White (#FAF6EE) */
    color: var(--text-primary); /* Deep Espresso Brown (#2E271E) */
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden; /* Lock viewport on single screen */
    display: flex;
    flex-direction: column;
}

/* 1. Header Styling */
.db-header {
    height: 70px;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    flex-shrink: 0;
}

.db-header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.db-network-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stat-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-terminal); /* Warm Paper (#F4EFE6) */
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* $RHAI Spotlight Bar */
.rhai-spotlight-bar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 239, 230, 0.9));
    border-bottom: 1px solid var(--border-color);
    padding: 8px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(46, 39, 30, 0.04);
}

.rhai-badge-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.rhai-ca-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    background: #FFFFFF;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.rhai-ca-tag:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
}

.rhai-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-xs {
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 6px;
}

.wallet-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 241, 149, 0.08);
    border: 1px solid rgba(20, 241, 149, 0.2);
    padding: 6px 16px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
}

.wallet-balance {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 13px;
    border-right: 1px solid rgba(20, 241, 149, 0.2);
    padding-right: 12px;
}

.wallet-address-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
}

/* 2. Grid Layout */
.db-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 350px 1fr 400px;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 70px);
}

/* 3. Panel Common Styles */
.db-panel {
    background-color: #FFFFFF; /* Matte Eggshell White */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 30px rgba(46, 39, 30, 0.015);
}

/* 4. Advanced Panel Tabs */
.panel-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-terminal);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.panel-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-tab.active {
    background: #FFFFFF;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(46, 39, 30, 0.05);
}

.tab-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0; /* Enable scrolling on children */
    overflow-y: auto;
    padding-right: 4px;
}

.tab-content::-webkit-scrollbar {
    width: 5px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.panel-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.4;
    flex-shrink: 0;
}

/* Strategy Intel Card (For New Users) */
.intel-card {
    background-color: var(--bg-terminal); /* Warm Paper (#F4EFE6) */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 12.5px;
    box-shadow: inset 0 1px 3px rgba(46, 39, 30, 0.01);
    animation: fadeIn 0.3s ease-out;
}

.intel-title {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    display: inline-block;
    line-height: 1;
    margin-bottom: 0; /* Align perfectly with the icon */
}

.intel-text {
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Swarm Builder Form */
#agent-deploy-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

#agent-deploy-form::-webkit-scrollbar {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-input {
    background-color: var(--bg-terminal); /* Warm Paper (#F4EFE6) */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 8px rgba(20, 241, 149, 0.1);
}

select.form-input {
    cursor: pointer;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-color);
    transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.btn-deploy {
    margin-top: 5px;
    padding: 12px;
    font-size: 13.5px;
}

/* 5. Token Auditor Tab & Status Indicators */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.status-dot.green {
    background-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

.status-dot.red {
    background-color: #F87171;
    box-shadow: 0 0 8px #F87171;
}

.status-dot.gray {
    background-color: #94A3B8;
}

.audit-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
    animation: fadeIn 0.3s ease-out;
}

.audit-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#audit-progress-text {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
}

.audit-results-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

.audit-score-circle {
    width: 120px;
    height: 120px;
}

.circular-chart {
    display: block;
    margin: 10px auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: var(--bg-terminal);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.2s cubic-bezier(0.1, 1, 0.1, 1);
}

.circle.safe {
    stroke: var(--primary-color);
}

.circle.danger {
    stroke: #F87171;
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 8px;
    text-anchor: middle;
}

.audit-details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-terminal);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.audit-detail-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
}

/* 6. Swarm Monitor & Live Portfolio */
.portfolio-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--bg-terminal) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(46, 39, 30, 0.01);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.portfolio-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.portfolio-balance {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

.portfolio-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.portfolio-change.positive {
    background-color: rgba(20, 241, 149, 0.08);
    color: var(--primary-color);
}

.portfolio-chart-container {
    height: 90px;
    margin-top: 10px;
    position: relative;
}

#portfolio-live-chart {
    width: 100% !important;
    height: 100% !important;
}

.active-swarms-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.active-agents-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

/* Hide scrollbars */
.active-agents-list::-webkit-scrollbar { display: none; }
.active-agents-list { -ms-overflow-style: none; scrollbar-width: none; }

/* Expandable Agent Card Styles */
.agent-card {
    background-color: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    cursor: pointer;
    overflow: hidden;
    animation: slideInAgent 0.3s ease-out;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-card:hover {
    border-color: rgba(20, 241, 149, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 39, 30, 0.02);
}

.agent-card.expanded {
    border-color: var(--primary-color);
    background-color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(15, 159, 104, 0.05);
}

.agent-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.agent-card-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.agent-card-details {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.agent-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.agent-status-badge.active {
    background-color: rgba(20, 241, 149, 0.08);
    color: var(--primary-color);
}

.agent-status-badge.deploying {
    background-color: rgba(56, 189, 248, 0.08);
    color: #38BDF8;
}

.btn-terminate {
    background: transparent;
    border: none;
    color: #F87171;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
}

.btn-terminate:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Expanded Settings Panel */
.agent-card-settings {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    width: 100%;
}

.agent-card.expanded .agent-card-settings {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-row label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.setting-value-display {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

/* Toggle Switch Styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    margin-top: 4px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 6.5 ERC-20 Auditor Result Card Styling */
.audit-results-box {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    animation: fadeIn 0.3s ease-out;
}

.audit-score-circle {
    width: 96px;
    height: 96px;
}

.circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease;
}

.circle.safe {
    stroke: #00FF88;
}

.circle.danger {
    stroke: #F87171;
}

.percentage {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 8px;
    text-anchor: middle;
}

.audit-details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    box-sizing: border-box;
}

.audit-detail-item {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    word-break: break-word;
}

/* 7. Quick Swap Tab & Real DEX Embedded Widget */
.dex-widget-box {
    width: 100%;
    height: 480px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(46, 39, 30, 0.05);
    animation: fadeIn 0.3s ease-out;
}

.dex-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 14px;
}

.swap-box {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 100%;
}

.swap-input-container {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.swap-input-container label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.swap-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swap-num-input {
    border: none;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    width: 70%;
    outline: none;
}

.token-select-label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
}

.token-dropdown {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.swap-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -4px 0;
}

.swap-route-info {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.2s ease-out;
}

.route-detail {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

/* 8. Swarm Console (Right Panel) */
.swarm-console-panel {
    background-color: #0C0D14 !important; /* Deep Obsidian Black */
    border: 1px solid rgba(20, 241, 149, 0.2) !important;
    box-shadow: 0 15px 35px rgba(20, 241, 149, 0.05);
    min-height: 0; 
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.btn-clear {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #8F9CAE;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-clear:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.console-body {
    flex-grow: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
    background-color: #0C0D14;
}

.console-line {
    color: #E2E8F0;
    line-height: 1.5;
}

.console-line.system {
    color: #818CF8; /* Electric Violet */
}

.console-line.info {
    color: #8F9CAE; /* Muted Slate */
}

/* Hide scrollbars */
.console-body::-webkit-scrollbar { display: none; }
.console-body { -ms-overflow-style: none; scrollbar-width: none; }

/* Global Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* Helper classes */
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Empty State Illustration Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    height: 100%;
    animation: fadeIn 0.4s ease-out;
}

.empty-state-img-container {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glowing green background aura */
.empty-state-img-container::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(15, 159, 104, 0.12) 0%, rgba(15, 159, 104, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.empty-state-img {
    width: 150px;
    height: 150px;
    z-index: 1;
    border-radius: 50%; /* Make it a perfect circle */
    filter: drop-shadow(0 8px 24px rgba(15, 159, 104, 0.08));
    animation: floatSwarm 5s ease-in-out infinite;
}

.empty-state-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
    margin: 0;
}

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

/* Agent & Intel Vector Icons */
.agent-card-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-icon-svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.intel-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.intel-icon-svg {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Responsive adjustments for mid-size screens */
@media (max-width: 1100px) {
    .db-grid {
        grid-template-columns: 300px 1fr;
    }
    .swarm-console-panel {
        display: none; /* Hide console on smaller layouts */
    }
}

/* ==========================================
   7. Swarm Topology Visualizer & Control Dials (Exciting Polish)
   ========================================== */
.swarm-topology-container {
    position: relative;
    height: 180px;
    background-color: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(46, 39, 30, 0.015);
}

#swarm-topology-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.visualizer-overlay {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-secondary);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.viz-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.viz-nodes {
    font-weight: 500;
}

/* Swarm Aggression Selector styling */
.aggression-selector {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    background-color: var(--bg-terminal);
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.aggression-btn {
    flex: 1;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.20s ease;
    background: transparent;
    color: var(--text-secondary);
    outline: none;
}

.aggression-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-page);
    font-weight: 600;
}

.aggression-btn:hover:not(.active) {
    background-color: rgba(46, 39, 30, 0.04);
    color: var(--text-primary);
}

/* Degen Glow Pulse Warning Alert */
@keyframes degenBorderPulse {
    0% {
        border-color: var(--border-color);
        box-shadow: none;
    }
    50% {
        border-color: #EF4444;
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
    }
    100% {
        border-color: var(--border-color);
        box-shadow: none;
    }
}

.left-panel.degen-glow {
    animation: degenBorderPulse 2s infinite ease-in-out;
}

/* ==========================================
   8. Swarm Activity Ledger Table (Exciting Polish)
   ========================================== */
.trade-ledger-container {
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    background-color: var(--bg-terminal);
    box-shadow: inset 0 1px 3px rgba(46, 39, 30, 0.01);
}

.ledger-title {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 12px;
}

.ledger-table-wrapper {
    overflow-x: auto;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: var(--font-mono);
    text-align: left;
}

.ledger-table th {
    color: var(--text-secondary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ledger-table td {
    padding: 8px 0;
    color: var(--text-primary);
    border-bottom: 1px dotted rgba(46, 39, 30, 0.08);
    vertical-align: middle;
}

.ledger-table tr:last-child td {
    border-bottom: none;
}

/* Helper coloring classes for Ledger transactions */
.ledger-buy {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.ledger-sell {
    color: #EF4444 !important;
    font-weight: 600;
}

.ledger-pnl-pos {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.ledger-pnl-neg {
    color: #EF4444 !important;
    font-weight: 600;
}

.ledger-pnl-flat {
    color: var(--text-secondary) !important;
}
