/* --- Design System --- */
:root {
    --bg-color: #fafafc;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(255, 107, 53, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.98);
    --card-hover-border: rgba(255, 107, 53, 0.22);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --primary-glow: linear-gradient(135deg, #ff6b35 0%, #ff9f1c 100%);
    --accent-color: #ff6b35;
    --accent-glow: 0 6px 24px rgba(255, 107, 53, 0.15);
    
    --green-glow: #10b981;
    --green-pulse: 0 0 15px rgba(16, 185, 129, 0.25);
    --red-glow: #f43f5e;
    --red-pulse: 0 0 15px rgba(244, 63, 94, 0.25);
    
    --font-main: 'Outfit', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Base Reset & Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dashboard-body {
    align-items: flex-start;
}

/* --- Background Ambient Glow Blobs --- */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.45) 0%, rgba(255, 159, 28, 0.15) 100%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.35) 0%, rgba(192, 132, 252, 0.1) 100%);
    bottom: -150px;
    right: -100px;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 159, 28, 0.3) 0%, rgba(255, 107, 53, 0.05) 100%);
    top: 35%;
    left: 45%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1100px;
    padding: 2.5rem 1.5rem;
    z-index: 10;
}

/* --- Header Section --- */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
    width: 100%;
}

.greeting-box h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.greeting-box p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

/* --- Global Bot Status Control --- */
.global-status-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.bot-status-badge.running {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green-glow);
    border-color: rgba(16, 185, 129, 0.25);
}

.bot-status-badge.stopped {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-glow);
    border-color: rgba(239, 68, 68, 0.25);
}

.pulse-ring {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.pulse-ring.running {
    background-color: var(--green-glow);
    box-shadow: var(--green-pulse);
}

.pulse-ring.stopped {
    background-color: var(--red-glow);
    box-shadow: var(--red-pulse);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* Control Buttons */
.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.start-btn {
    background: var(--primary-glow);
    color: var(--text-primary);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.stop-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--red-glow);
}

.stop-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

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

/* --- Summary / Metric Card Section --- */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

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

.metric-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
}

.metric-card:nth-child(1)::before { background: linear-gradient(90deg, #ff9f1c, #ff6b35); }
.metric-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #059669); }
.metric-card:nth-child(3)::before { background: linear-gradient(90deg, #f43f5e, #be123c); }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.metric-val-main {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-main), sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.metric-val-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font-main), sans-serif;
}

/* --- Dashboard Main Layout --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.grid-column {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.section-title i {
    width: 22px;
    height: 22px;
    color: var(--accent-color);
}

/* --- Active Strategies List --- */
.strategies-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.strategy-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
}

.strategy-card.paused {
    opacity: 0.65;
}

.strat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.strat-ticker-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ticker-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.version-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.strat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.strat-status-dot.active { background-color: var(--green-glow); box-shadow: var(--green-pulse); }
.strat-status-dot.paused { background-color: var(--text-muted); }

.strat-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.strat-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Progress bar styling */
.strat-progress-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strat-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.strat-progress-bar-bg {
    height: 8px;
    background: rgba(255, 107, 53, 0.08) !important;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 53, 0.15) !important;
}

.strat-progress-bar {
    height: 100%;
    background: var(--primary-glow);
    border-radius: 50px;
}

.strat-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    background: rgba(255, 107, 53, 0.04) !important;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 107, 53, 0.1) !important;
}

.strat-metrics-grid div, .guide-metrics-grid div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.strat-metrics-grid .lbl, .guide-metrics-grid .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.strat-metrics-grid .val, .guide-metrics-grid .val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.strat-profit-badge {
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    font-family: monospace;
}

.loading-spinner, .empty-state {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Configuration / Settings Panel --- */
.settings-tabs {
    display: flex;
    background: rgba(255, 107, 53, 0.04) !important;
    padding: 0.3rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 107, 53, 0.12) !important;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.tab-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tab-content {
    display: none;
    width: 100%;
}

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

.settings-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

/* Config Table */
.ticker-settings-table-wrapper {
    overflow-x: auto;
    background: rgba(255, 107, 53, 0.02) !important;
    border-radius: 14px;
    border: 1px solid rgba(255, 107, 53, 0.1) !important;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.config-table th, .config-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.config-table th {
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.1);
}

.config-table td {
    font-family: monospace;
    color: var(--text-secondary);
}

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

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions button {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.table-actions button i {
    width: 14px;
    height: 14px;
}

.edit-icon-btn { color: var(--accent-color); }
.edit-icon-btn:hover { background: rgba(99, 102, 241, 0.15); }
.delete-icon-btn { color: var(--red-glow); }
.delete-icon-btn:hover { background: rgba(239, 68, 68, 0.15); }

/* Add/Save Buttons */
.add-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Forms styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.col-8 { flex: 2; }
.col-4 { flex: 1; }

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
}

.form-group input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

.save-btn {
    background: var(--primary-glow);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* --- Logs Console Section --- */
.logs-section {
    width: 100%;
    margin-bottom: 2.5rem;
}

.log-auto-scroll {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.log-auto-scroll input {
    cursor: pointer;
}

.log-console-wrapper {
    background: #030409;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.25rem;
    height: 320px;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

.log-console {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #38bdf8;
    white-space: pre-wrap;
    background: transparent;
    border: none;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.modal-card form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.modal-actions button {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-save {
    background: var(--primary-glow);
    color: var(--text-primary);
}

.btn-save:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- Footer Section --- */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 1.5rem;
    width: 100%;
}

/* --- Responsive Layout (Media Queries) --- */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 650px) {
    .container {
        padding: 1.5rem 0.75rem;
    }
    
    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    
    .greeting-box h1 {
        font-size: 1.8rem;
    }
    
    .global-status-panel {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .bot-status-badge {
        justify-content: center;
    }
    
    .control-btn {
        justify-content: center;
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.1rem;
    }
    
    .col-8, .col-4 {
        flex: none;
        width: 100%;
    }

    .settings-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tab-btn {
        width: 100%;
    }
}

.main-tab-btn {
    flex-shrink: 0;
}

/* Guide Card Responsive Grid Utilities */
.guide-valuation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: rgba(0,0,0,0.01);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
}

.guide-val-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.guide-val-usd {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-primary);
}

.guide-val-krw, .guide-val-rate {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guide-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 1rem;
}

.guide-strategy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.guide-strategy-col-left {
    border-right: 1px solid var(--card-border);
    padding-right: 1.5rem;
}

/* --- Guide Card Styles (Desktop base) --- */
.guide-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
}

.guide-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-ticker-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.guide-version-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    white-space: nowrap;
}

.guide-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.guide-progress-txt {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.guide-progress-bar-container {
    width: 60px;
    height: 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.guide-progress-bar-fill {
    height: 100%;
    background: var(--accent-color);
}

.guide-order-section-title {
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.guide-order-section-title.jupjub {
    margin-top: 0.75rem;
    color: #ff6b35;
}

.guide-order-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    padding-left: 0.5rem;
}

.guide-order-type {
    color: var(--text-secondary);
}

.guide-order-val {
    font-weight: 600;
    color: var(--green-glow);
    white-space: nowrap;
}

.guide-order-val.jupjub {
    color: #ff9f1c;
}

.guide-order-val.sell {
    color: var(--red-glow);
}

.guide-order-total {
    font-weight: 500;
}

.empty-guide-reason {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .guide-ticker-title {
        font-size: 1rem;
    }
    
    .guide-ticker-sub {
        display: none !important;
    }
    
    .guide-version-tag {
        font-size: 0.65rem;
        padding: 0.05rem 0.25rem;
    }
    
    .guide-progress-txt {
        font-size: 0.75rem;
    }
    
    .guide-progress-bar-container {
        display: none !important;
    }
    
    .guide-order-row {
        font-size: 0.75rem;
        padding-left: 0.25rem;
    }
    
    .guide-order-total {
        display: none !important; /* Hide total in parens on mobile to fit 1 line */
    }

    .guide-valuation-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
        padding: 0.85rem 1rem !important;
    }
    
    .guide-valuation-grid > div {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        border-bottom: 1px dashed rgba(255, 107, 53, 0.1);
        padding-bottom: 0.4rem;
    }
    
    .guide-valuation-grid > div:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .guide-val-label {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    .guide-val-usd {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin-right: 0.35rem;
        display: inline-block !important;
        line-height: 1.2 !important;
    }
    
    .guide-val-krw, .guide-val-rate {
        font-size: 0.75rem !important;
        color: var(--text-muted) !important;
        display: inline-block !important;
        line-height: 1.2 !important;
    }
    
    .guide-metrics-grid, .strat-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .guide-strategy-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .guide-strategy-col-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--card-border);
        padding-bottom: 1.25rem;
    }
}

/* --- Main Tab Navigation --- */
.main-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.main-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.main-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.main-tab-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* --- Indicators Tab Layout --- */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.indicator-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.indicator-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

/* Fear & Greed Gauge styling */
.fng-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    gap: 0.75rem;
}

.fng-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: var(--accent-glow);
    font-family: monospace;
}

.fng-label {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fng-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.fng-progress-fill {
    height: 100%;
    background: var(--primary-glow);
    border-radius: 10px;
}

/* RSI Bars styling */
.rsi-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rsi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-badge {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.rsi-value {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.05rem;
}

.rsi-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.rsi-bar::before {
    content: '';
    position: absolute;
    left: 30%;
    width: 40%;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-left: 1px dashed rgba(255, 255, 255, 0.15);
    border-right: 1px dashed rgba(255, 255, 255, 0.15);
}

.rsi-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 5px;
}

/* Market Indices list styling */
.market-index-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.market-index-row:last-child {
    border-bottom: none;
}

.index-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.index-price-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.index-price {
    font-family: monospace;
    font-weight: 600;
}

.index-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.index-change.plus {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green-glow);
}

.index-change.minus {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-glow);
}

/* --- Calculators Tab Layout --- */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.calculator-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calculator-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: var(--primary-glow);
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.calc-results {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    animation: fadeIn 0.4s ease;
}

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

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-row.highlight {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-val {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.result-val.accent-color {
    color: #a5b4fc;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.text-green {
    color: var(--green-glow) !important;
}

.text-red {
    color: var(--red-glow) !important;
}

/* --- History Tab Layout --- */
.history-grid {
    padding: 1.75rem;
    width: 100%;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.history-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.history-stats {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.history-table-wrapper {
    overflow-x: auto;
    max-height: 500px;
}

.text-center {
    text-align: center;
}

/* --- Light Theme Overrides & Improvements --- */
.glow-blob {
    opacity: 0.06;
}

.greeting-box h1 {
    color: var(--text-primary);
}

/* Modal Styling */
.modal-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-card h3 {
    color: var(--text-primary) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.btn-cancel {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Form inputs on light theme */
.form-group input, .modal-card input, select {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--text-primary) !important;
}

.form-group input:focus, .modal-card input:focus, select:focus {
    border-color: var(--accent-color) !important;
    background: #ffffff !important;
}

/* Config Table */
.config-table th {
    background: rgba(0, 0, 0, 0.03) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.config-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* Tab button controls */
.settings-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.tab-btn {
    color: var(--text-muted) !important;
}

.tab-btn.active {
    color: var(--accent-color) !important;
    border-bottom: 2px solid var(--accent-color) !important;
}

.main-tab-btn.active {
    background: rgba(0, 0, 0, 0.04) !important;
    box-shadow: none !important;
}

.main-tab-btn:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Ensure chart legend labels display correctly on white bg */
#compound-chart {
    background: transparent;
}

/* Fix input label colors */
label {
    color: var(--text-secondary) !important;
}

/* Security Lock card input size and button */
#credentials-lock-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Simulator Tab Layout --- */
.simulator-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    width: 100%;
    align-items: start;
}

.simulator-control-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.simulator-control-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.75rem;
}

.simulator-main-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.simulator-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.simulator-chart-card {
    padding: 1.5rem;
}

.simulator-log-card {
    padding: 0;
}

.sim-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.sim-table-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

/* Mobile Responsive */
@media (max-width: 900px) {
    .simulator-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .simulator-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Compact summary widgets on mobile - horizontal rows layout */
    .summary-section {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .summary-section .metric-card {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.85rem 1.2rem !important;
        border-radius: 16px !important;
        gap: 0.5rem !important;
    }
    
    .summary-section .metric-header {
        margin-bottom: 0 !important;
        flex: 1;
        display: flex;
        align-items: center;
    }
    
    .summary-section .metric-label {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        color: var(--text-secondary);
        white-space: nowrap;
    }
    
    .summary-section .metric-icon {
        display: none !important;
    }
    
    .summary-section .metric-val-main {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        text-align: right;
        margin-left: auto;
        white-space: nowrap;
    }
    
    .summary-section .metric-val-sub {
        font-size: 0.75rem !important;
        color: var(--text-muted);
        text-align: right;
        min-width: 85px;
        white-space: nowrap;
    }
}

/* --- Compact Header & Settings Button --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.compact-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-badge {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.8rem !important;
}

.compact-btn {
    padding: 0.4rem 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    box-shadow: none !important;
}

.icon-setting-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    cursor: pointer;
}

.icon-setting-btn:hover {
    color: var(--accent-color);
    background: #ffffff;
    border-color: var(--accent-color);
    transform: rotate(45deg);
}

/* --- Gradient Text (Colorful Rocket fix) --- */
.gradient-text {
    background: var(--primary-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- Settings Overlay Modal --- */
.settings-modal-card {
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem !important;
}

.close-modal-btn:hover {
    color: var(--accent-color) !important;
}

/* --- Single Column Dashboard Layout --- */
.single-dashboard {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
}

.dashboard-column-left, .dashboard-column-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .single-dashboard {
        grid-template-columns: 1fr !important;
    }
}

/* --- Learning Guide Tab --- */
.learning-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    width: 100%;
    align-items: start;
}

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

.learning-card {
    padding: 1.75rem;
}

.learning-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.learning-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.learning-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.learning-item .term {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-color);
}

.learning-item .desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.formula-box {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
}

.formula-render {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    font-family: 'Outfit', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0.5rem 0;
    overflow-x: auto;
}

/* --- Simulator Table Mobile Responsive Fix --- */
.sim-table-wrapper table {
    min-width: 900px;
}

/* Slimmer Container margins for single viewport optimization */
.container.dashboard-container {
    padding: 1.25rem 1rem !important;
}

.header-section {
    margin-bottom: 1.5rem !important;
}

.summary-section {
    margin-bottom: 1.5rem !important;
}

body.dashboard-body {
    padding-bottom: 7.5rem !important;
}

/* --- macOS Floating Dock Navigation --- */
.floating-dock {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.15);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    align-items: center;
    max-width: 95%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    border-radius: 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-btn i {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.dock-btn:hover {
    background: rgba(255, 107, 53, 0.05);
    color: var(--accent-color);
}

.dock-btn:hover i {
    transform: translateY(-2px);
}

.dock-btn.active {
    background: rgba(255, 107, 53, 0.08) !important;
    color: var(--accent-color) !important;
    border: 1px solid rgba(255, 107, 53, 0.18) !important;
}

.dock-btn.active i {
    color: var(--accent-color);
}

.dock-label {
    display: none !important;
}

/* Mobile adjustment for Dock */
@media (max-width: 768px) {
    .floating-dock {
        bottom: 1rem;
        padding: 0.35rem;
        border-radius: 20px;
        gap: 0.2rem;
        width: 92%;
        justify-content: space-around;
    }

    .dock-btn {
        border-radius: 14px;
    }
}

/* Select drop-down styling alignment */
select, .form-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: rgba(255, 107, 53, 0.02) !important;
    border: 1px solid rgba(255, 107, 53, 0.15) !important;
    color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b35' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px !important;
    padding: 0 2.5rem 0 1rem !important;
    border-radius: 12px !important;
    height: 42px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus, .form-group select:focus {
    border-color: var(--accent-color) !important;
    background-color: rgba(255, 107, 53, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12) !important;
}

/* Settings modal input fields styling */
.form-group input, .modal-card input {
    background: rgba(255, 107, 53, 0.02) !important;
    border: 1px solid rgba(255, 107, 53, 0.15) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
}

.form-group input:focus, .modal-card input:focus {
    border-color: var(--accent-color) !important;
    background: rgba(255, 107, 53, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12) !important;
}

/* Mobile responsiveness for tables - prevent vertical text wrapping */
.config-table th, .config-table td {
    white-space: nowrap !important;
}

.sim-table-wrapper, .history-table-wrapper, .ticker-settings-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Simulator stats grid 1-column layout on mobile */
@media (max-width: 600px) {
    .simulator-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* --- Bot Controls Circular Styling --- */
.header-bot-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bot-status-indicator-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bot-status-indicator-circle.running {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

.bot-status-indicator-circle.stopped {
    background: rgba(244, 63, 94, 0.1) !important;
    border-color: rgba(244, 63, 94, 0.25) !important;
}

.circle-bot-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: all 0.2s ease;
}

.circle-bot-btn i {
    width: 16px;
    height: 16px;
}

.circle-bot-btn.start {
    color: var(--green-glow);
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.05);
}

.circle-bot-btn.start:hover {
    background: rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}

.circle-bot-btn.stop {
    color: var(--red-glow);
    border-color: rgba(244, 63, 94, 0.25);
    background: rgba(244, 63, 94, 0.05);
}

.circle-bot-btn.stop:hover {
    background: rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.15);
}

/* --- Sticky Table Headers for Simulator and History --- */
.sim-table-wrapper table thead th, 
.history-table-wrapper table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #ffffff !important;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08) !important;
}

/* Fix table wrapper height to trigger vertical scrollbar */
.sim-table-wrapper {
    max-height: 400px;
    overflow-y: auto !important;
}

.history-table-wrapper {
    max-height: 500px;
    overflow-y: auto !important;
}

/* --- Settings Modal Warm Color Customization (No Gray) --- */
.config-table th {
    background: rgba(255, 107, 53, 0.05) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid rgba(255, 107, 53, 0.1) !important;
}

.add-btn {
    background: rgba(255, 107, 53, 0.03) !important;
    border: 1px dashed rgba(255, 107, 53, 0.3) !important;
    color: var(--accent-color) !important;
}

.add-btn:hover {
    background: rgba(255, 107, 53, 0.08) !important;
    border-color: var(--accent-color) !important;
}

/* --- Simulator Checkbox Horizontal layout (No wrapping) --- */
.checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    white-space: nowrap !important;
}

.checkbox-group input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    background: rgba(255, 107, 53, 0.02) !important;
    border: 1px solid rgba(255, 107, 53, 0.15) !important;
}

.checkbox-group label {
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    white-space: nowrap !important;
}

@media (min-width: 769px) {
    .strategy-card, .guide-card {
        min-height: 480px;
    }
}

/* --- Drawdown Monitor Tab CSS --- */
.drawdown-ticker-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 16px;
    width: fit-content;
    margin-bottom: 1.5rem;
}
.drawdown-ticker-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.drawdown-ticker-btn:hover {
    background: rgba(255, 107, 53, 0.05);
    color: var(--accent-color);
}
.drawdown-ticker-btn.active {
    background: var(--primary-glow) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--accent-glow);
}
.drawdown-main-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.drawdown-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}
.drawdown-main-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}
.drawdown-main-header h2 .sub-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.5rem;
    white-space: nowrap;
}
.drawdown-update-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.drawdown-stats-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
}
.drawdown-pct-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}
.drawdown-pct-card.orange-alert {
    background: rgba(245, 158, 11, 0.03);
    border-color: rgba(245, 158, 11, 0.22);
}
.drawdown-pct-card.red-alert {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.05);
}
.drawdown-pct-card .val {
    font-size: 4.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}
.drawdown-pct-card.orange-alert .val {
    text-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}
.drawdown-pct-card.red-alert .val {
    text-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}
.drawdown-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.dd-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 0.5rem;
}
.dd-detail-item > div {
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}
.dd-detail-item .lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.dd-detail-item .val {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.dd-detail-item .sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.35rem;
}
.drawdown-breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.drawdown-breakdown-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}
.breakdown-grid-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.breakdown-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.breakdown-item .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.breakdown-item .val {
    font-size: 0.95rem;
    font-weight: 700;
}
.breakdown-item .val.positive {
    color: var(--green-glow);
}
.breakdown-item .val.negative {
    color: var(--red-glow);
}
.drawdown-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.drawdown-info-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.drawdown-info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.warning-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.warning-content p {
    margin: 0 0 0.75rem 0;
}
.warning-content p:last-child {
    margin: 0;
}
.historical-crashes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.historical-crash-item {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.historical-crash-item .crash-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.historical-crash-item .crash-year {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.historical-crash-item .crash-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.historical-crash-item .crash-right {
    display: flex;
    gap: 1rem;
    text-align: right;
}
.historical-crash-item .crash-metrics {
    display: flex;
    flex-direction: column;
}
.historical-crash-item .crash-metrics .lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.historical-crash-item .crash-metrics .val {
    font-size: 0.9rem;
    font-weight: 600;
}
@media (max-width: 768px) {
    .drawdown-ticker-tabs {
        width: 100%;
        justify-content: space-between;
        gap: 0.25rem;
        padding: 0.35rem;
        border-radius: 12px;
    }
    .drawdown-ticker-btn {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
        flex: 1;
        text-align: center;
        min-width: 0;
    }
    .drawdown-main-panel {
        padding: 1.25rem 1rem;
        gap: 1.25rem;
    }
    .drawdown-main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .drawdown-main-header h2 {
        font-size: 1.3rem;
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .drawdown-main-header h2 .sub-title {
        font-size: 0.75rem;
        margin-left: 0;
        white-space: nowrap;
    }
    .drawdown-pct-card .val {
        font-size: 3.5rem;
        font-weight: 800;
    }
    .drawdown-stats-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .breakdown-grid-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    .drawdown-info-grid {
        grid-template-columns: 1fr;
    }
}

