/* Baseline Loss Rate Page - Additional Styles */
/* Uses standard styles.css for base layout (main-container, card, header, etc.) */

/* Subtle hover behavior for configuration cards only (not results) */
#peer-group-config:hover,
#single-bank-config:hover,
#hybrid-config:hover {
    scale: 1.005 !important; /* Subtle, consistent scale for config cards */
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 15px;
}

.spinner-small {
    width: 40px;
    height: 40px;
    border: 3px solid #cbd5e1;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-container p {
    color: #7f8c8d;
    font-size: 1em;
    margin: 0;
}

/* Segmentation Info Display */
.segmentation-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
    margin: 30px 0 25px 0;
}

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

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

/* Card header with action buttons */
.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-actions h2 {
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 10px;
}

/* Export format dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}
.export-dropdown-toggle {
    white-space: nowrap;
}
.export-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 200;
    min-width: 200px;
    overflow: hidden;
}
.export-dropdown-menu.show {
    display: block;
}
/* Saved-BLR cards have overflow:hidden — use fixed positioning so the menu
   escapes the card boundary. JS sets top/right from getBoundingClientRect(). */
.saved-calculations-grid .export-dropdown-menu {
    position: fixed;
    top: auto;
    right: auto;
    z-index: 1050;
}
.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.15s;
}
.export-dropdown-item:hover {
    background: #f0f4ff;
    color: #2563eb;
}
.export-dropdown-item i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}
.export-dropdown-item:hover i {
    color: #2563eb;
}

/* Method Selection Cards */
.method-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    margin-top: 20px;
}

.method-card {
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.method-card:hover:not(.disabled) {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.method-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.method-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.method-icon {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
}

.method-content {
    flex: 1;
}

.method-content h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.method-content p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.method-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.method-badge.recommended {
    background: #28a745;
    color: white;
}

.method-badge.coming-soon {
    background: #ffc107;
    color: #333;
}

.method-select {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.method-select input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.method-select label {
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
}

.method-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #2c3e50;
}

.btn-secondary:hover:not(:disabled) {
    background: #d0d0d0;
}

.btn-secondary.active {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Peer Group Configuration */
.weight-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.weight-mode-toggle {
    display: flex;
    gap: 10px;
}

.total-weight {
    font-size: 1.2em;
    font-weight: 600;
}

.total-weight span {
    color: #28a745;
    font-size: 1.3em;
}

/* Peers List */
.peers-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.peer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.peer-item:hover {
    background: #e9ecef;
}

.peer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.peer-info i {
    color: #667eea;
    font-size: 1.2em;
    flex-shrink: 0;
}

.peer-name {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.peer-cert {
    color: #7f8c8d;
    font-size: 0.9em;
    white-space: nowrap;
    flex-shrink: 0;
}

.peer-weight {
    display: flex;
    align-items: center;
    gap: 5px;
}

.weight-input {
    width: 80px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: right;
    font-weight: 600;
    font-size: 1em;
    background: #f8f9fa;
}

.weight-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
}

.weight-input[readonly] {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Current Bank Config */
.bank-info-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.bank-info-display i {
    color: #667eea;
    font-size: 1.5em;
}

.bank-info-display span {
    font-weight: 600;
    color: #2c3e50;
}

/* Results Section */
.results-actions {
    display: flex;
    gap: 10px;
}

.calculation-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.blr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.blr-table thead {
    background-color: #f9fafb;
    color: #374151;
}

.blr-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid #e5e7eb;
}

.blr-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.blr-table tbody tr:hover {
    background: #f3f4f6;
}

.blr-table td {
    padding: 15px 12px;
    color: #2c3e50;
}

.blr-table .blr-value {
    font-weight: 700;
    color: #3b82f6;
    font-size: 1.05em;
}

/* Loading Indicator */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #cbd5e1;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-container p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.error-message i {
    font-size: 1.5em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blr-container {
        padding: 15px;
    }

    .method-options {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .calculation-summary {
        grid-template-columns: 1fr;
    }

    .weight-config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .blr-table {
        font-size: 0.85em;
    }

    .blr-table th,
    .blr-table td {
        padding: 10px 8px;
    }
}

/* Selected Peers Container */
#selected-peers-container h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Smooth Transitions */
.blr-card,
.method-card,
.peer-item {
    transition: all 0.3s ease;
}

/* Expandable Row Styling */
.segment-row {
    transition: background 0.2s;
}

.segment-row:hover {
    background: #f3f4f6;
}

.expand-icon {
    transition: transform 0.3s ease;
    color: #6b7280;
    font-size: 0.85em;
}

.detail-row {
    background: #f9fafb;
}

.detail-row td {
    padding: 0 !important;
}

/* Breakdown Container Styling */
.breakdown-container {
    padding: 25px;
    background: #ffffff;
    border-left: 4px solid #3b82f6;
}

.breakdown-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.breakdown-header h4 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 1.1em;
}

.breakdown-meta {
    display: flex;
    gap: 20px;
    color: #6b7280;
    font-size: 0.9em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Quarter-First View (Primary Calculation Display)
   ═══════════════════════════════════════════════════════════════════════════ */
.quarter-breakdown-section {
    margin-bottom: 30px;
}

.quarter-breakdown-section > h5 {
    font-size: 1.1em;
    color: #111827;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculation-note {
    color: #6b7280;
    font-size: 0.9em;
    margin: 8px 0 20px 0;
    font-style: italic;
}

.toggle-all-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.toggle-all-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.toggle-all-btn:active {
    transform: translateY(0);
}

.quarter-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.quarter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quarter-header:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.quarter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
}

.quarter-label .toggle-icon {
    color: #6b7280;
    transition: transform 0.2s ease;
    font-size: 0.85em;
}

.quarter-summary {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quarter-blr {
    color: #1f2937;
    font-size: 0.95em;
}

.quarter-blr strong {
    color: #0056d2;
    font-size: 1.05em;
}

.quarter-banks {
    color: #6b7280;
    font-size: 0.9em;
    padding: 4px 10px;
    background: #e5e7eb;
    border-radius: 12px;
}

.quarter-details {
    padding: 16px 18px;
    background: #ffffff;
}

.quarter-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.9em;
}

.quarter-metrics span {
    color: #374151;
}

.quarter-banks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.quarter-banks-table thead th {
    background: #f3f4f6;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #d1d5db;
}

.quarter-banks-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.hybrid-peer-table thead th,
.hybrid-single-table thead th {
    padding: 10px 12px;
}

.hybrid-peer-table tbody td,
.hybrid-single-table tbody td {
    padding: 4px 12px 4px 15px !important;
}

.quarter-banks-table tbody tr:hover {
    background: #f9fafb;
}

.final-blr-calculation {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 8px;
    border-left: 4px solid #0056d2;
}

.final-blr-calculation h6 {
    margin: 0 0 10px 0;
    color: #1e3a8a;
    font-size: 1em;
}

.final-blr-calculation p {
    margin: 0;
    color: #1e40af;
    font-size: 0.95em;
    line-height: 1.6;
}

.final-blr-calculation strong {
    color: #1e3a8a;
    font-size: 1.1em;
}

/* Hybrid Method Component Styling */
.hybrid-component-section {
    margin: 16px 0;
    padding: 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
}

.hybrid-component-section.single-bank-section {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.hybrid-component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #cbd5e1;
}

.hybrid-component-header i {
    margin-right: 8px;
    color: #3b82f6;
}

.single-bank-section .hybrid-component-header i {
    color: #3b82f6;
}

.hybrid-blend-badge {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.single-bank-section .hybrid-blend-badge {
    background: #3b82f6;
}

.hybrid-component-summary {
    margin-top: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 0.95em;
    color: #1e293b;
}

.single-bank-section .hybrid-component-summary {
    border-left-color: #3b82f6;
}

.hybrid-component-summary i {
    color: #64748b;
    margin-right: 8px;
}

.hybrid-component-summary strong {
    color: #0056d2;
    font-size: 1.05em;
}

.hybrid-blend-calculation {
    margin-top: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border: 2px solid #93c5fd;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: center;
    color: #1e40af;
}

.hybrid-blend-calculation i {
    margin-right: 8px;
    color: #3b82f6;
}

.hybrid-blend-calculation strong {
    color: #1e3a8a;
    font-size: 1.1em;
}

.hybrid-peer-table thead th {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.hybrid-single-table thead th {
    background: #dbeafe !important;
    color: #1e40af !important;
}

/* Bank-First View (Legacy) */
.bank-breakdown-section details > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 0;
}

.bank-breakdown-section details > summary::-webkit-details-marker {
    display: none;
}

.bank-breakdown-section details > summary h5 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 1em;
}

.bank-breakdown-section details[open] > summary h5 {
    color: #111827;
}

/* Peer Breakdown Styling */
.peer-breakdown {
    background: #f9fafb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
}

.peer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.peer-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95em;
}

.peer-weight {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Quarterly Table */
.quarterly-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.85em;
}

.quarterly-table thead {
    background: #e5e7eb;
}

.quarterly-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.quarterly-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.quarterly-table tbody tr:hover {
    background: #f3f4f6;
}

/* Treatment indicator styles for negative loss rate handling */
.quarterly-table .treatment-floored {
    background-color: #fef3c7 !important; /* Amber-100 */
}

.quarterly-table .treatment-floored:hover {
    background-color: #fde68a !important; /* Amber-200 */
}

.quarterly-table .treatment-excluded {
    background-color: #fee2e2 !important; /* Red-100 */
    opacity: 0.85;
}

.quarterly-table .treatment-excluded:hover {
    background-color: #fecaca !important; /* Red-200 */
    opacity: 1;
}

/* Peer Summary */
.peer-summary {
    margin-top: 10px;
    padding: 10px;
    background: #ffffff;
    border-radius: 6px;
    color: #4b5563;
    font-size: 0.9em;
}

/* No-data peer warning */
.peer-no-data {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.88em;
}

.peer-no-data .fas {
    margin-right: 6px;
    color: #d97706;
}

/* Weighted Summary */
.weighted-summary {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
}

.weighted-summary h5 {
    margin: 0 0 10px 0;
    color: #1e40af;
    font-size: 1em;
}

.weighted-summary p {
    margin: 0;
    color: #1f2937;
    line-height: 1.6;
}

/* Form control base — consistent across all input/select elements on this page */
.form-control {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #374151;
    background: #fff;
    transition: border-color 0.2s ease;
}

/* Focus States for Accessibility */
.form-control:focus,
.method-select input[type="radio"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ── Hybrid Analysis ─────────────────────────────────── */
.hybrid-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 4px;
}

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

.hybrid-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.hybrid-col h4 {
    margin: 0 0 4px;
    color: #1e293b;
    font-size: 1.05em;
    font-weight: 700;
}

/* Blend slider row */
.hybrid-slider-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.hybrid-slider-track { flex: 1; }

.hybrid-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #6366f1 50%, #e2e8f0 50%);
    outline: none;
    cursor: pointer;
}

.hybrid-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #6366f1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: box-shadow 0.2s;
}

.hybrid-range-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

.hybrid-range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #6366f1;
    cursor: pointer;
}

.hybrid-slider-label {
    min-width: 115px;
    font-size: 0.9em;
    color: #374151;
    line-height: 1.6;
}

.hybrid-label-left  { text-align: left; }
.hybrid-label-right { text-align: right; }

.hybrid-slider-label strong {
    font-size: 1.5em;
    color: #6366f1;
}

.hybrid-preset-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ── Hybrid step layout ─────────────────────────── */
.hybrid-step {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 22px;
}

.hybrid-step-label {
    font-size: 1em;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hybrid-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    font-size: 0.85em;
    font-weight: 700;
    flex-shrink: 0;
}

/* Weight summary chips */
.hybrid-weight-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hybrid-weight-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ede9fe;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.83em;
    white-space: nowrap;
}

.hybrid-weight-chip i {
    color: #7c3aed;
    font-size: 0.85em;
}

.hybrid-weight-chip strong {
    color: #5b21b6;
}

/* Breakdown role tags */
.hybrid-role-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 700;
    background: #dbeafe;
    color: #1d4ed8;
    vertical-align: middle;
}

.hybrid-role-tag.hybrid-role-peer {
    background: #dcfce7;
    color: #166534;
}

/* Highlighted single-bank breakdown row */
.peer-breakdown--highlight {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

/* Hybrid blend weight — numeric inputs flanking the slider */
.hybrid-weight-input-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
}

.hybrid-weight-direct {
    width: 68px;
    padding: 5px 6px;
    border: 1.5px solid #c7d2fe;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: 700;
    color: #6366f1;
    text-align: center;
    background: #fff;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.hybrid-weight-direct::-webkit-outer-spin-button,
.hybrid-weight-direct::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hybrid-weight-direct:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.hybrid-weight-pct {
    font-size: 1em;
    font-weight: 700;
    color: #6366f1;
}

/* ── BLR Configuration Option Labels ──────────────────────────────────── */

/* Base style for all option labels (balance basis and treatment) */
.blr-option-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    background: #fff;
    transition: all 0.2s ease;
}

.blr-option-label:hover {
    border-color: #93c5fd;
}

.blr-option-label input[type="radio"] {
    accent-color: #3b82f6;
    margin: 0;
}

/* Checked state */
.blr-option-label:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Balance Basis container */
.blr-balance-basis-options {
    display: flex;
    gap: 8px;
}

/* Negative Loss Rate Treatment container */
.blr-treatment-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Section headers */
.blr-config-section-header {
    margin: 0 0 6px;
    color: #374151;
}

.blr-config-section-header i {
    margin-right: 6px;
    color: #6366f1;
}

.blr-config-section-desc {
    color: #64748b;
    font-size: 0.87em;
    margin-bottom: 10px;
}

/* Legacy selector support (for backwards compatibility) */
[id^="blr-basis-ending-lbl-"]:has(input:checked)          { border-color: #3b82f6; background: #eff6ff; }
[id^="blr-basis-beginning-lbl-"]:has(input:checked)       { border-color: #3b82f6; background: #eff6ff; }
[id^="blr-basis-ending-lbl-"]:has(input:not(:checked))    { border-color: #e5e7eb; background: #fff; }
[id^="blr-basis-beginning-lbl-"]:has(input:not(:checked)) { border-color: #e5e7eb; background: #fff; }

/* Excluded Quarter Styling */
.quarter-excluded {
    opacity: 0.75;
    border-left: 3px solid #dc2626;
}

.excluded-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    background-color: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.quarter-excluded-message {
    padding: 12px;
    margin: 12px 0;
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    color: #92400e;
    font-size: 0.95em;
}

.quarter-excluded-message i {
    margin-right: 8px;
    color: #f59e0b;
}

.excluded-quarters-note {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
    color: #1e40af;
    font-size: 0.9em;
    border-radius: 4px;
}

.excluded-quarters-note i {
    margin-right: 6px;
}
