@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Semi+Condensed:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

* { box-sizing: border-box; }

body {
    background: #f9fafb;
    color: #111827;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}


/* ---- HEADER ---- */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 2.5px;
    color: #111827;
    margin: 0;
    line-height: 1;
    display: inline;
}

.app-title-year {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 2.5px;
    color: #e10600;
    margin-left: 10px;
    display: inline;
}

.app-watermark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: 0.5px;
}


/* ---- SIDEBAR ---- */

.sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    min-height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar-section-label {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 8px;
    margin-top: 16px;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 14px 0;
}

.sidebar .form-label,
.sidebar label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}


/* ---- INFO CARD ---- */

.info-card {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    margin: 10px 0;
}

.info-card-title {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 6px;
}

.info-card-detail {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.8;
}

.model-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 8px;
}

.model-badge-bayesian {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.model-badge-prior {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}


/* ---- BUTTONS ---- */

.run-button {
    width: 100%;
    padding: 10px 20px;
    background: #e10600;
    border: none;
    color: white;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.run-button:hover {
    background: #ff1a14;
}

.run-button:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.reset-button {
    width: 100%;
    padding: 8px 24px;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reset-button:hover {
    border-color: #6b7280;
    color: #374151;
    background: #f3f4f6;
}


/* ---- MAIN CONTENT ---- */

.main-content {
    padding: 28px 32px;
    min-height: calc(100vh - 56px);
    background: #f9fafb;
}


/* ---- WELCOME ---- */

.welcome-container {
    display: flex;
    flex-direction: column;
    padding-top: 48px;
}

.welcome-title {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #111827;
    margin-bottom: 12px;
}

.welcome-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    max-width: 720px;
}

.welcome-detail {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.7;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    max-width: 720px;
    width: 100%;
}

.methodology-heading {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-top: 16px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.methodology-heading:first-child {
    margin-top: 0;
}

.methodology-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 0;
}


/* ---- STRATEGY CARDS ---- */

.strategy-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.strategy-card-name {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 8px;
}

.stint-sequence {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stint-block {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
}

.stint-block-soft {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stint-block-medium {
    background: #fefce8;
    color: #ca8a04;
    border: 1px solid #fde68a;
}

.stint-block-hard {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.stint-arrow {
    color: #9ca3af;
    font-size: 12px;
}


/* ---- STRATEGY EDITOR ---- */

.editor-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.editor-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.editor-total-valid {
    color: #16a34a;
}

.editor-total-invalid {
    color: #dc2626;
}


/* ---- TABS ---- */

.nav-tabs {
    border-bottom: 1px solid #e5e7eb;
}

.nav-tabs .nav-link {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #6b7280;
    border: none;
    padding: 8px 16px;
    border-radius: 0;
    background: transparent;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    color: #111827;
    border-bottom-color: #d1d5db;
}

.nav-tabs .nav-link.active {
    color: #e10600;
    background: transparent;
    border: none;
    border-bottom: 2px solid #e10600;
}

.tab-content {
    padding-top: 16px;
}


/* ---- METRIC CARDS ---- */

.metric-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 18px;
    text-align: center;
}

.metric-label {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
}

.metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    color: #111827;
}

.metric-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}


/* ---- EXPORT BUTTONS ---- */

.export-btn {
    padding: 6px 14px;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-right: 8px;
}

.export-btn:hover {
    border-color: #9ca3af;
    color: #111827;
    background: #f3f4f6;
}


/* ---- SLIDER ---- */

.rc-slider-track { background-color: #e10600; }
.rc-slider-handle {
    border-color: #e10600;
    background: #e10600;
}
.rc-slider-handle:hover,
.rc-slider-handle:active {
    border-color: #ff1a14;
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}
.rc-slider-rail { background-color: #e5e7eb; }
.rc-slider-dot-active { border-color: #e10600; }
.rc-slider-mark-text {
    color: #9ca3af;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}


/* ---- CHECKBOXES ---- */

.form-check-input:checked {
    background-color: #e10600;
    border-color: #e10600;
}

.form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.15);
    border-color: #e10600;
}

.form-check-label {
    color: #374151;
    font-size: 13px;
}


/* ---- FOOTER ---- */

.app-footer {
    text-align: center;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    margin-top: 40px;
}


/* ---- LOADING ---- */

._dash-loading { background: transparent; }
.dash-spinner { color: #e10600; }


/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    .main-content {
        padding: 20px 16px;
    }
    .app-header {
        padding: 12px 16px;
    }
    .app-title,
    .app-title-year {
        font-size: 20px;
    }
}