* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 12px;
}

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

.header-left {
    flex: 1;
}

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

.position-status-card, .freeze-status-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.freeze-status-card {
    border: 2px solid #ff8c00;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 140, 0, 0.8);
    }
}

.position-status-card .status-badge, .freeze-status-card .status-badge {
    margin-bottom: 0;
    padding: 4px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

.position-status-card .trade-count, .freeze-status-card .trade-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warning-color);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--success-color);
    animation: none;
}

.status-dot.stale {
    background: var(--warning-color);
    animation: pulse-slow 3s infinite;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Control Buttons Container */
.control-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Base Control Button Styles */
.control-button {
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.control-button:active {
    transform: translateY(0);
}

.control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Stop Strategy Button (Red) */
/* Pause Trading Button (Orange) */
.pause-button {
    background: #f59e0b;
}

.pause-button:hover {
    background: #d97706;
}

.pause-button.processing {
    background: #fbbf24;
    animation: pulse-processing 1.5s infinite;
}

.pause-button.paused {
    background: #6b7280;
}

/* Kill Process Button (Dark Red) */
.kill-process-button {
    background: #dc2626;
    border: 2px solid #b91c1c;
}

.kill-process-button:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.kill-process-button.processing {
    background: #991b1b;
    animation: pulse-processing 1.5s infinite;
}

/* Exit Only Button (Yellow/Orange) */
.exit-only-button {
    background: #f59e0b;
}

.exit-only-button:hover {
    background: #d97706;
}

.exit-only-button.processing {
    background: #fbbf24;
    animation: pulse-processing 1.5s infinite;
}

.exit-only-button.exited {
    background: #10b981;
}

/* Emergency Exit Button (Dark Red) */
.emergency-exit-button {
    background: #991b1b;
}

.emergency-exit-button:hover {
    background: #7f1d1d;
}

.emergency-exit-button.processing {
    background: #dc2626;
    animation: pulse-processing 1.5s infinite;
}

.emergency-exit-button.exited {
    background: #6b7280;
}

/* Exit & Re-enter Button (Blue) */
.exit-reenter-button {
    background: #3b82f6;
}

.exit-reenter-button:hover {
    background: #2563eb;
}

.exit-reenter-button.processing {
    background: #60a5fa;
    animation: pulse-processing 1.5s infinite;
}

.exit-reenter-button.exited {
    background: #10b981;
}

/* Resume Trading Button (Green) */
.resume-button {
    background: #10b981;
}

.resume-button:hover {
    background: #059669;
}

.resume-button.processing {
    background: #34d399;
    animation: pulse-processing 1.5s infinite;
}

.resume-button.resumed {
    background: #6b7280;
}

/* Processing Animation */
@keyframes pulse-processing {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Button Icon & Text */
.button-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.button-text {
    letter-spacing: 0.5px;
}

.main-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(12, 1fr);
    margin-bottom: 0;
}

.summary-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}

.pnl-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pnl-section, .action-section {
    display: flex;
    flex-direction: column;
}

/* Position Sizing Inline with Action Levels Header */
.action-header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.action-header-grid h3 {
    margin: 0;
}

.position-sizing-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.position-sizing-inline h4 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sizing-values {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
}

.sizing-values .sizing-label {
    color: var(--text-secondary);
    font-size: 0.65rem;
}

.sizing-values .sizing-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
}

/* OLD Position Sizing Grid (removed from HTML but keep for backward compatibility) */
.position-market-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 8px;
}

.position-sizing-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.sizing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.sizing-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

.sizing-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.market-adjustment-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.market-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.market-label-small {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

.market-value-small {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 1200px) {
    .summary-section {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .pnl-action-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.charts-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--border-color);
}

.card-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px -15px 10px -15px;
}

.card h3 {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.pnl-value {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 5px;
}

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

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

.pnl-breakdown {
    display: flex;
    gap: 11px;
    font-size: 0.76rem;
    color: var(--text-secondary);
}

/* P&L Toggle Switch */
.card-header-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pnl-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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: #475569;
    transition: 0.3s;
    border-radius: 24px;
}

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

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

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

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 60px;
    font-weight: 500;
}

/* Breach Alert Indicator */
.breach-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    padding: 4px 8px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 4px;
    animation: breach-blink 1.5s ease-in-out infinite;
    font-size: 0.75rem;
    font-weight: 600;
}

.breach-indicator #breachIcon {
    animation: pulse-icon 1s ease-in-out infinite;
}

.breach-indicator #breachText {
    color: #ef4444;
    letter-spacing: 0.5px;
}

.breach-indicator #breachTimer {
    color: #fbbf24;
    font-family: monospace;
    min-width: 35px;
}

@keyframes breach-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.3);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
    }
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.pnl-multiplier-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.pnl-breakdown-calc {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.per-lot-value {
    font-size: 1.9rem;
    font-weight: 700;
}

.per-lot-value.positive {
    color: var(--success-color);
}

.per-lot-value.negative {
    color: var(--danger-color);
}

.multiplier-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.commodity-name {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.straddle-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--warning-color);
}

.straddle-low {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.market-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spot-futures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.market-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.market-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-sublabel {
    font-size: 0.62rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.strike-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 3px;
    border-top: 1px solid var(--border-color);
}

.strike-label {
    font-weight: 600;
    color: var(--text-primary);
}

.strike-price {
    font-weight: 500;
    color: var(--primary-color);
    margin-left: 4px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

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

.status-badge.inactive {
    background: var(--text-secondary);
    color: white;
}

.trade-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.action-levels {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.action-level {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

.action-level:last-child {
    border-bottom: none;
}

.action-level.exit .action-label {
    color: var(--danger-color);
    font-weight: 600;
}

.action-level.adjust .action-label {
    color: var(--warning-color);
    font-weight: 600;
}

.action-level span:last-child {
    font-weight: 700;
    color: var(--text-primary);
}

.chart-card {
    height: 200px;
    padding: 6px;
}

.chart-card canvas {
    max-height: 160px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

thead {
    background: var(--bg-dark);
}

th {
    padding: 4px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

td {
    padding: 4px 6px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.pnl-positive {
    color: var(--success-color);
    font-weight: 600;
}

.pnl-negative {
    color: var(--danger-color);
    font-weight: 600;
}

.trades-log {
    max-height: 400px;
    overflow-y: auto;
}

.trade-entry {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-dark);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.trade-entry.entry {
    border-left-color: var(--success-color);
}

.trade-entry.exit {
    border-left-color: var(--danger-color);
}

.trade-entry.adjustment {
    border-left-color: var(--warning-color);
}

.trade-timestamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.trade-action {
    font-weight: 600;
    margin-bottom: 4px;
}

.trade-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

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

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

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

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

/* Collapsible Section Styling */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    user-select: none;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: -5px -10px 10px -10px;
    padding: 8px 10px;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.collapse-icon {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    font-weight: bold;
}

.collapsible-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Closed Positions Styling */
.closed-position-group {
    margin-bottom: 16px;
    background: var(--bg-dark);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid var(--border-color);
}

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

.closed-timestamp {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.closed-reason {
    font-size: 0.8rem;
    color: var(--warning-color);
    font-weight: 500;
}

.closed-total-pnl {
    font-size: 0.875rem;
    font-weight: 700;
}

.closed-positions-table {
    font-size: 0.8rem;
}

.closed-positions-table th {
    font-size: 0.7rem;
    padding: 6px 8px;
}

.closed-positions-table td {
    padding: 6px 8px;
}

/* Market-Based Adjustment Styling - Compact Horizontal Layout */
.action-level.market-based {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.market-adjustment-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 4px;
    width: 100%;
}

.market-adjustment-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.market-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

.market-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Market Value Color Coding */
.market-value.market-normal {
    color: #00ff00;  /* Green - healthy, below 90% of threshold */
}

.market-value.market-warning {
    color: #ffa500;  /* Orange - approaching threshold (within 10%) */
}

.market-value.market-danger {
    color: #ff4444;  /* Red - at or above threshold */
    font-weight: bold;
}

/* Status Indicator Styling */
.status-indicator {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-indicator.status-normal {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
}

.status-indicator.status-danger {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* Adjustment Timer - Prominent timer next to breach status */
.adjustment-timer {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #f59e0b;
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 3px;
    animation: timer-pulse 1s ease-in-out infinite;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.4;
}

@keyframes timer-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 3px rgba(245, 158, 11, 0.3);
    }
    50% {
        opacity: 0.75;
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    }
}

/* Breach Details - Descriptive text below status - INLINE LAYOUT */
.breach-details {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(239, 68, 68, 0.08);
    border-left: 2px solid #ef4444;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
}

.breach-details .leg-higher {
    color: #ef4444;
    font-weight: 600;
}

.breach-details .leg-lower {
    color: #10b981;
    font-weight: 600;
}

.breach-details .diff-info {
    color: #ef4444;
    font-weight: 600;
}

.breach-details .separator {
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 300;
    padding: 0 4px;
}

.breach-details .adjustment-reason {
    color: #f59e0b;
    font-style: italic;
    white-space: nowrap;
}

.breach-details .skip-status {
    color: #ffc107;
    font-weight: 600;
    background-color: rgba(255, 193, 7, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1400px) {
    .charts-section {
        grid-template-columns: 1fr;
    }

    .chart-card {
        height: 270px;
    }

    .chart-card canvas {
        max-height: 210px;
    }

    .pnl-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .summary-section {
        grid-template-columns: 1fr;
    }

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

    .header-right {
        width: 100%;
        flex-direction: column;
    }
}

/* Market-Based Adjustment Indicators (NEW) */
.leg-diff-value {
    font-weight: bold;
    transition: all 0.3s ease;
}

.leg-diff-normal {
    color: #10b981;  /* Green - healthy */
}

.leg-diff-warning {
    color: #f59e0b;  /* Orange - warning (80-100% of threshold) */
    animation: pulse-subtle 2s infinite;
}

.leg-diff-danger {
    color: #ef4444;  /* Red - threshold breached */
    animation: pulse 1s infinite;
}

.status-indicator {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.status-ok {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.status-warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    animation: pulse-subtle 2s infinite;
}

.status-danger {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: pulse 1s infinite;
}

/* Pulse animation for danger state */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Subtle pulse for warning state */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

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

.log-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-color);
}

.log-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.log-filter-select {
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
}

.log-search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 14px;
}

.log-container {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.log-entry.DEBUG {
    border-left-color: #6c757d;
    color: #adb5bd;
}

.log-entry.INFO {
    border-left-color: #28a745;
    color: #90ee90;
}

.log-entry.WARNING {
    border-left-color: #ffc107;
    color: #ffd966;
}

.log-entry.ERROR {
    border-left-color: #dc3545;
    color: #ff6b6b;
}

.log-timestamp {
    color: #6c757d;
    font-size: 12px;
}

.log-level {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 11px;
    margin: 0 8px;
}

.log-level.DEBUG {
    background: #6c757d;
    color: #fff;
}

.log-level.INFO {
    background: #28a745;
    color: #fff;
}

.log-level.WARNING {
    background: #ffc107;
    color: #000;
}

.log-level.ERROR {
    background: #dc3545;
    color: #fff;
}

.log-module {
    color: #17a2b8;
    font-size: 12px;
    margin: 0 8px;
}

.log-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.log-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.log-error {
    text-align: center;
    padding: 20px;
    color: var(--color-error);
}
