/* ===============================
   Unified Tab Styling System
   Bloomberg/FactSet Institutional Design
   Version 2.1 - Premium Terminal Aesthetic
   =============================== */

/* ==================== GLOBAL TAB IMPROVEMENTS ==================== */

/* Tab Container */
.tab-content {
    padding: 12px 16px !important;
    background-color: #0d1117 !important;
}

/* Tab Navigation - Terminal Style */
.nav-tabs,
.custom-tabs {
    border-bottom: none !important;
    padding: 0 16px !important;
    background: linear-gradient(180deg, #0d1117 0%, #10151b 100%) !important;
    position: relative !important;
    display: flex !important;
    gap: 2px !important;
}

/* Bottom border line */
.nav-tabs::after,
.custom-tabs::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent 0%, #30363d 20%, #30363d 80%, transparent 100%) !important;
}

/* Tab Items - Institutional Terminal */
.nav-tabs .nav-link,
.tab {
    color: #6e7681 !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: none !important;
    padding: 8px 14px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-right: 0 !important;
    border-radius: 4px 4px 0 0 !important;
    position: relative !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', monospace !important;
}

/* Tab underline indicator */
.nav-tabs .nav-link::after,
.tab::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #E67E22 0%, #F39C12 100%) !important;
    transform: translateX(-50%) !important;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 2px 2px 0 0 !important;
}

.nav-tabs .nav-link:hover,
.tab:hover {
    color: #c9d1d9 !important;
    background-color: rgba(230, 126, 34, 0.04) !important;
}

.nav-tabs .nav-link:hover::after,
.tab:hover::after {
    width: 60% !important;
    background: linear-gradient(90deg, #484f58 0%, #6e7681 100%) !important;
}

.nav-tabs .nav-link.active,
.tab--selected {
    color: #E67E22 !important;
    background: linear-gradient(180deg, rgba(230, 126, 34, 0.08) 0%, rgba(230, 126, 34, 0.02) 100%) !important;
    text-shadow: 0 0 20px rgba(230, 126, 34, 0.3) !important;
}

.nav-tabs .nav-link.active::after,
.tab--selected::after {
    width: 100% !important;
    background: linear-gradient(90deg, #D35400 0%, #E67E22 50%, #F39C12 100%) !important;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.5) !important;
}

/* Dash custom tabs override */
.custom-tab {
    background-color: transparent !important;
    border: none !important;
    color: #6e7681 !important;
    padding: 12px 16px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    position: relative !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace !important;
    border-radius: 4px 4px 0 0 !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.custom-tab::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #E67E22 0%, #F39C12 100%) !important;
    transform: translateX(-50%) !important;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.custom-tab:hover {
    color: #c9d1d9 !important;
    background-color: rgba(230, 126, 34, 0.04) !important;
}

.custom-tab:hover::after {
    width: 60% !important;
    background: linear-gradient(90deg, #484f58 0%, #6e7681 100%) !important;
}

.custom-tab--selected {
    color: #E67E22 !important;
    background: linear-gradient(180deg, rgba(230, 126, 34, 0.08) 0%, rgba(230, 126, 34, 0.02) 100%) !important;
    text-shadow: 0 0 20px rgba(230, 126, 34, 0.3) !important;
}

.custom-tab--selected::after {
    width: 100% !important;
    background: linear-gradient(90deg, #D35400 0%, #E67E22 50%, #F39C12 100%) !important;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.5) !important;
}

/* ==================== SECTION HEADERS - INSTITUTIONAL ==================== */

/* Main Section Headers (H2) - Terminal Style */
h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #E67E22 !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #21262d !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace !important;
    text-transform: uppercase !important;
}

h2::before {
    content: '▸' !important;
    color: #E67E22 !important;
    font-size: 14px !important;
    opacity: 0.7 !important;
}

h2::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 0 !important;
    width: 60px !important;
    height: 2px !important;
    background: linear-gradient(90deg, #E67E22, transparent) !important;
}

/* Sub-section Headers (H3) */
h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #c9d1d9 !important;
    margin-bottom: 14px !important;
    margin-top: 20px !important;
    letter-spacing: 0.01em !important;
}

/* Component Headers (H4) */
h4 {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #8b949e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    margin-bottom: 10px !important;
}

/* Field Labels (H5) - Terminal Data Labels */
h5 {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #8b949e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace !important;
}

h5.text-light {
    color: #8b949e !important;
}

/* H6 - Smaller section labels */
h6 {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #6e7681 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 8px !important;
}

/* ==================== CARDS ==================== */

/* Standard Card */
.card {
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%) !important;
    border: 1px solid #30363d !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}

.card:hover {
    border-color: #484f58 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%) !important;
    border-bottom: 1px solid #30363d !important;
    padding: 16px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #E67E22 !important;
}

/* Card Body */
.card-body {
    padding: 20px !important;
    background-color: transparent !important;
}

/* Card Footer */
.card-footer {
    background-color: #0d1117 !important;
    border-top: 1px solid #21262d !important;
    padding: 16px 20px !important;
}

/* ==================== FORM ELEMENTS ==================== */

/* Labels */
label,
.form-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #8b949e !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Input Fields */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    height: 42px !important;
    background-color: #21262d !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 0 14px !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #E67E22 !important;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15) !important;
    outline: none !important;
}

/* Placeholder */
::placeholder {
    color: #6e7681 !important;
    opacity: 1 !important;
}

/* ==================== BUTTONS ==================== */

/* Primary Button (Warning/Orange) */
.btn-warning {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.45) !important;
}

.btn-warning:active {
    transform: translateY(0) !important;
}

/* Info Button - INSTITUTIONAL ORANGE (override blue) */
.btn-info {
    background: linear-gradient(135deg, #C05621 0%, #A04518 100%) !important;
    border: 1px solid #E67E22 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 10px rgba(230, 126, 34, 0.2) !important;
    transition: all 0.2s ease !important;
}

.btn-info:hover {
    background: linear-gradient(135deg, #D35400 0%, #C05621 100%) !important;
    border-color: #F39C12 !important;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35) !important;
    transform: translateY(-1px) !important;
}

.btn-info:active {
    transform: translateY(0) !important;
}

/* Secondary Button - Subtle Dark */
.btn-secondary {
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%) !important;
    border: 1px solid #30363d !important;
    color: #8b949e !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2d333b 0%, #21262d 100%) !important;
    border-color: #484f58 !important;
    color: #c9d1d9 !important;
}

/* Success Button - INSTITUTIONAL ORANGE (override green) */
.btn-success {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.45) !important;
}

.btn-success:active {
    transform: translateY(0) !important;
}

/* Danger Button - Keep Red for destructive actions */
.btn-danger {
    background: linear-gradient(135deg, #f85149 0%, #b62324 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 3px 10px rgba(248, 81, 73, 0.25) !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff6b63 0%, #f85149 100%) !important;
    transform: translateY(-1px) !important;
}

/* Primary Button - INSTITUTIONAL ORANGE */
.btn-primary {
    background: linear-gradient(135deg, #E67E22 0%, #C05621 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.45) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
}

/* Outline Buttons - INSTITUTIONAL */
.btn-outline-warning,
.btn-outline-info,
.btn-outline-success,
.btn-outline-primary {
    background: transparent !important;
    border: 1px solid #E67E22 !important;
    color: #E67E22 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-outline-warning:hover,
.btn-outline-info:hover,
.btn-outline-success:hover,
.btn-outline-primary:hover {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15) 0%, rgba(211, 84, 0, 0.1) 100%) !important;
    border-color: #F39C12 !important;
    color: #F39C12 !important;
}

.btn-outline-secondary {
    background: transparent !important;
    border: 1px solid #30363d !important;
    color: #8b949e !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-outline-secondary:hover {
    background-color: rgba(48, 54, 61, 0.5) !important;
    border-color: #484f58 !important;
    color: #c9d1d9 !important;
}

/* Button Size Adjustments */
.btn {
    min-height: 42px !important;
    padding: 10px 20px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-sm {
    min-height: 34px !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
}

.btn-lg {
    min-height: 52px !important;
    padding: 14px 28px !important;
    font-size: 14px !important;
}

/* Full Width Buttons */
.btn.w-100 {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Button Groups - Perfect Alignment */
.btn-group {
    display: inline-flex !important;
    gap: 0 !important;
}

.btn-group .btn {
    border-radius: 0 !important;
    margin: 0 !important;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px !important;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0 !important;
}

/* Button Rows - Consistent Spacing */
.d-flex .btn + .btn,
.d-grid .btn + .btn,
.row .btn + .btn {
    margin-left: 8px !important;
}

/* Button with Icon */
.btn svg,
.btn i {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

/* Button Margin Consistency */
.btn.mb-2 {
    margin-bottom: 8px !important;
}

.btn.mt-2 {
    margin-top: 8px !important;
}

.btn.ms-1 {
    margin-left: 4px !important;
}

/* ==================== DROPDOWNS ==================== */

.Select-control {
    min-height: 42px !important;
    background-color: #21262d !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
}

.Select-control:hover {
    border-color: #484f58 !important;
}

.Select.is-focused .Select-control {
    border-color: #E67E22 !important;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15) !important;
}

.Select-placeholder,
.Select-value-label {
    line-height: 40px !important;
    padding-left: 14px !important;
    font-size: 14px !important;
    color: #c9d1d9 !important;
}

.Select-menu-outer {
    background-color: #21262d !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    margin-top: 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    z-index: 1000 !important;
}

.Select-option {
    padding: 10px 14px !important;
    font-size: 14px !important;
    background-color: #21262d !important;
    color: #c9d1d9 !important;
    border-bottom: 1px solid #161b22 !important;
}

.Select-option:hover,
.Select-option.is-focused {
    background-color: #2d333b !important;
}

.Select-option.is-selected {
    background-color: rgba(230, 126, 34, 0.15) !important;
    color: #E67E22 !important;
}

/* Multi-select Tags */
.Select--multi .Select-value {
    background: linear-gradient(135deg, #2d333b 0%, #21262d 100%) !important;
    border: 1px solid #30363d !important;
    border-radius: 4px !important;
    color: #c9d1d9 !important;
    font-size: 12px !important;
    margin: 3px !important;
}

.Select--multi .Select-value-icon {
    border-right: 1px solid #30363d !important;
    padding: 3px 6px !important;
}

.Select--multi .Select-value-icon:hover {
    background-color: rgba(248, 81, 73, 0.2) !important;
    color: #f85149 !important;
}

/* ==================== TABLES ==================== */

/* Standard Table */
table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
}

th {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%) !important;
    color: #E67E22 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #30363d !important;
    text-align: left !important;
}

td {
    padding: 12px 16px !important;
    color: #c9d1d9 !important;
    border-bottom: 1px solid #21262d !important;
    background-color: #161b22 !important;
}

tr:hover td {
    background-color: #1c2128 !important;
}

/* Dash DataTable */
.dash-table-container {
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #30363d !important;
}

/* ==================== CHARTS ==================== */

/* Chart Containers */
.js-plotly-plot,
.plotly,
.dash-graph {
    border-radius: 10px !important;
    overflow: hidden !important;
    background-color: #0d1117 !important;
}

/* Chart Borders */
#pf-3d-bubble,
#pf-rolling-corr,
.dash-graph > div {
    border: 1px solid #21262d !important;
    border-radius: 10px !important;
}

/* ==================== DIVIDERS ==================== */

hr {
    border: none !important;
    border-top: 1px solid #21262d !important;
    margin: 24px 0 !important;
    opacity: 1 !important;
}

/* ==================== SPACING ==================== */

/* Row gaps */
.row {
    margin-bottom: 24px !important;
}

/* Column padding */
[class*="col-"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* ==================== LOADING STATES ==================== */

.dash-loading {
    background-color: rgba(13, 17, 23, 0.9) !important;
}

._dash-loading {
    color: #E67E22 !important;
}

/* ==================== SCROLLBARS ==================== */

::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #0d1117 !important;
}

::-webkit-scrollbar-thumb {
    background: #30363d !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58 !important;
}

/* ==================== UTILITY CLASSES ==================== */

.bg-dark {
    background-color: #0d1117 !important;
}

.bg-secondary {
    background-color: #161b22 !important;
}

.text-light {
    color: #c9d1d9 !important;
}

.text-muted {
    color: #6e7681 !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* ==================== RADIO BUTTONS - INSTITUTIONAL ==================== */

/* Radio Items Container */
.form-check,
[class*="RadioItems"] label {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    margin-bottom: 4px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background-color: transparent !important;
}

[class*="RadioItems"] label:hover {
    background-color: rgba(230, 126, 34, 0.06) !important;
}

/* Radio Input */
input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #484f58 !important;
    border-radius: 50% !important;
    background-color: #21262d !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

input[type="radio"]:hover {
    border-color: #6e7681 !important;
}

input[type="radio"]:checked {
    border-color: #E67E22 !important;
    background-color: #21262d !important;
}

input[type="radio"]:checked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #E67E22 0%, #F39C12 100%) !important;
    box-shadow: 0 0 6px rgba(230, 126, 34, 0.5) !important;
}

/* ==================== CHECKBOXES - INSTITUTIONAL ==================== */

input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid #484f58 !important;
    border-radius: 4px !important;
    background-color: #21262d !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

input[type="checkbox"]:checked {
    border-color: #E67E22 !important;
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%) !important;
}

input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* ==================== ALERTS - INSTITUTIONAL ==================== */

.alert {
    border-radius: 8px !important;
    padding: 14px 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 1px solid !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.12) 0%, rgba(230, 126, 34, 0.06) 100%) !important;
    border-color: rgba(230, 126, 34, 0.3) !important;
    color: #F39C12 !important;
}

.alert-info {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.12) 0%, rgba(88, 166, 255, 0.06) 100%) !important;
    border-color: rgba(88, 166, 255, 0.3) !important;
    color: #79b8ff !important;
}

.alert-success {
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.12) 0%, rgba(63, 185, 80, 0.06) 100%) !important;
    border-color: rgba(63, 185, 80, 0.3) !important;
    color: #56d364 !important;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.12) 0%, rgba(248, 81, 73, 0.06) 100%) !important;
    border-color: rgba(248, 81, 73, 0.3) !important;
    color: #f85149 !important;
}

/* ==================== LINKS - INSTITUTIONAL ==================== */

a {
    color: #58a6ff !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

a:hover {
    color: #79b8ff !important;
    text-decoration: underline !important;
}

/* Action Links (All/Clear) */
.link-action {
    color: #E67E22 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.link-action:hover {
    color: #F39C12 !important;
    text-shadow: 0 0 8px rgba(230, 126, 34, 0.4) !important;
}

/* ==================== SMALL/MUTED TEXT - INSTITUTIONAL ==================== */

small,
.small {
    font-size: 11px !important;
    color: #6e7681 !important;
    line-height: 1.5 !important;
}

.text-info {
    color: #58a6ff !important;
}

.text-warning {
    color: #E67E22 !important;
}

.text-success {
    color: #3fb950 !important;
}

.text-danger {
    color: #f85149 !important;
}

/* ==================== BADGES/PILLS - INSTITUTIONAL ==================== */

.badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-family: 'SF Mono', 'Monaco', monospace !important;
}

.badge-primary,
.bg-primary {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%) !important;
    color: white !important;
}

.badge-secondary,
.bg-secondary {
    background: linear-gradient(135deg, #30363d 0%, #21262d 100%) !important;
    color: #c9d1d9 !important;
}

.badge-success {
    background: linear-gradient(135deg, #3fb950 0%, #2d7a3e 100%) !important;
    color: white !important;
}

.badge-info {
    background: linear-gradient(135deg, #58a6ff 0%, #388bfd 100%) !important;
    color: white !important;
}

/* ==================== LOADING SPINNER - INSTITUTIONAL ==================== */

.dash-spinner {
    border-color: #E67E22 !important;
}

.dash-spinner::after {
    border-color: #E67E22 transparent transparent transparent !important;
}

/* Loading overlay */
.dash-loading-callback {
    background-color: rgba(13, 17, 23, 0.85) !important;
}

/* ==================== PROGRESS BARS - INSTITUTIONAL ==================== */

.progress {
    height: 6px !important;
    background-color: #21262d !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

.progress-bar {
    background: linear-gradient(90deg, #D35400 0%, #E67E22 50%, #F39C12 100%) !important;
    border-radius: 3px !important;
    transition: width 0.3s ease !important;
}

/* ==================== TOOLTIPS - INSTITUTIONAL ==================== */

[data-bs-toggle="tooltip"],
.tooltip-trigger {
    position: relative !important;
    cursor: help !important;
}

.tooltip-inner {
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%) !important;
    color: #c9d1d9 !important;
    border: 1px solid #30363d !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    max-width: 280px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ==================== MODAL - INSTITUTIONAL ==================== */

.modal-content {
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%) !important;
    border: 1px solid #30363d !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%) !important;
    border-bottom: 1px solid #30363d !important;
    padding: 16px 20px !important;
}

.modal-title {
    color: #E67E22 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.modal-body {
    padding: 20px !important;
    color: #c9d1d9 !important;
}

.modal-footer {
    background-color: #0d1117 !important;
    border-top: 1px solid #21262d !important;
    padding: 16px 20px !important;
}

.btn-close {
    filter: invert(1) !important;
    opacity: 0.6 !important;
}

.btn-close:hover {
    opacity: 1 !important;
}

/* ==================== LIST GROUPS - INSTITUTIONAL ==================== */

.list-group-item {
    background-color: #161b22 !important;
    border: 1px solid #21262d !important;
    color: #c9d1d9 !important;
    padding: 12px 16px !important;
    transition: all 0.15s ease !important;
}

.list-group-item:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.list-group-item:last-child {
    border-radius: 0 0 8px 8px !important;
}

.list-group-item:hover {
    background-color: #1c2128 !important;
}

/* ==================== ACCORDION - INSTITUTIONAL ==================== */

.accordion-button {
    background-color: #161b22 !important;
    color: #c9d1d9 !important;
    border: none !important;
    padding: 14px 18px !important;
    font-weight: 600 !important;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #21262d 0%, #161b22 100%) !important;
    color: #E67E22 !important;
}

.accordion-button::after {
    filter: invert(1) !important;
}

.accordion-body {
    background-color: #0d1117 !important;
    border-top: 1px solid #21262d !important;
    padding: 16px 18px !important;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 992px) {
    .card-body {
        padding: 16px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    .tab-content {
        padding: 16px !important;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 12px !important;
    }
    
    h2 {
        font-size: 16px !important;
    }
    
    .tab-content {
        padding: 12px !important;
    }
    
    .nav-tabs .nav-link,
    .tab,
    .custom-tab {
        padding: 10px 14px !important;
        font-size: 11px !important;
    }
}
