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

body {
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(ellipse 90% 55% at 8% -5%, rgba(47, 143, 99, 0.18), transparent 52%),
        radial-gradient(ellipse 70% 45% at 95% 5%, rgba(15, 61, 46, 0.12), transparent 48%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(231, 242, 235, 0.7), transparent 60%),
        linear-gradient(165deg, #ebe4d6 0%, #f3eee4 42%, #e8f0ea 100%);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header button styles */
.header-buttons {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

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

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

.header-subtitle {
    font-size: 0.8em;
    margin-top: 4px;
    opacity: 0.8;
}

/* Workflow section styles */
.bank-workflow-header {
    background: linear-gradient(135deg, var(--forest), var(--forest-mid));
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.bank-workflow-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.bank-workflow-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9em;
}

.header {
    background: var(--forest);
    color: white;
    padding: 14px 22px;
    text-align: left;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header h1 {
    font-family: var(--font-display);
    font-size: 1.55em;
    font-weight: 650;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 4px;
}

.warning-banner {
    background: var(--forest-mid);
    color: white;
    padding: 10px 30px;
    text-align: center;
    font-weight: bold;
}

.demo-banner {
    background: var(--leaf);
    color: white;
    padding: 10px 30px;
    text-align: center;
    font-weight: bold;
}

.fusion-banner {
    background: linear-gradient(135deg, var(--forest-mid), var(--leaf));
    color: white;
    padding: 10px 30px;
    text-align: center;
    font-weight: bold;
    animation: shimmer 2s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0% { background: linear-gradient(135deg, var(--forest-mid), var(--leaf)); }
    100% { background: linear-gradient(135deg, var(--leaf), #FFD700); }
}

.main-grid {
    display: grid;
    grid-template-columns: 350px 1fr 500px;
    gap: 20px;
    padding: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 280px 1fr 400px;
    }
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    
    .control-panel, .results-panel {
        max-height: 400px;
        overflow-y: auto;
    }
}

.control-panel {
    padding: 22px;
    background:
        linear-gradient(165deg, rgba(255, 252, 247, 0.88) 0%, rgba(231, 242, 235, 0.72) 100%);
    border: 1px solid rgba(19, 32, 25, 0.08);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    border-radius: 10px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 8px 28px rgba(19, 32, 25, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 0;
}

.workflow-section {
    background: linear-gradient(135deg, rgba(255, 252, 247, 0.9) 0%, var(--mist) 100%);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(19, 32, 25, 0.05);
    border-left: 3px solid var(--forest-mid);
    transition: all 0.3s ease;
}

.workflow-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.workflow-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--forest-mid);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.workflow-status.active {
    background: var(--forest-mid);
}

.workflow-status.completed {
    background: var(--leaf);
}

.workflow-detail {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.map-container {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 252, 247, 0.55) 0%, rgba(231, 242, 235, 0.4) 100%);
    border: 1px solid rgba(19, 32, 25, 0.08);
    display: grid;
    grid-template-rows: 1fr 200px;
    border-radius: 10px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 8px 28px rgba(19, 32, 25, 0.07);
    overflow: hidden;
    min-height: 600px;
}

.map-section {
    position: relative;
    height: 100%;
    min-height: 400px;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.map-pick-hint {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 500;
    pointer-events: none;
    background: rgba(19, 32, 25, 0.82);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.map-pick-hint.is-active {
    background: rgba(46, 125, 50, 0.92);
}

.place-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.place-search-row input {
    flex: 1;
}

.place-search-results {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    max-height: 220px;
    overflow-y: auto;
    background: var(--white);
}

.place-result-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    padding: 9px 11px;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-body);
}

.place-result-item:last-child {
    border-bottom: none;
}

.place-result-item:hover {
    background: var(--mist);
}

.place-result-item .result-kind {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--leaf);
    margin-right: 6px;
}

.place-result-item .result-meta {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.picked-place-label {
    margin: -6px 0 12px;
    padding: 8px 10px;
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--forest);
    line-height: 1.4;
}

/* Ensure map doesn't override loading overlay */
#map {
    position: relative;
    z-index: 1;
    border-radius: 8px;
}

.satellite-images-section {
    background: linear-gradient(180deg, rgba(247, 243, 235, 0.9), rgba(231, 242, 235, 0.85));
    border-top: 1px solid var(--line);
    padding: 15px;
    overflow-y: auto;
    max-height: 200px;
}

.satellite-images-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.satellite-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.satellite-image-item {
    background: rgba(255, 252, 247, 0.92);
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}

.satellite-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.satellite-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
}

.satellite-image-info {
    padding: 8px;
    font-size: 11px;
}

.satellite-image-type {
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 2px;
}

.satellite-image-desc {
    color: #666;
    line-height: 1.2;
}

.results-panel {
    padding: 22px;
    background:
        linear-gradient(165deg, rgba(255, 252, 247, 0.9) 0%, rgba(231, 242, 235, 0.75) 100%);
    border: 1px solid rgba(19, 32, 25, 0.08);
    overflow-y: auto;
    border-radius: 10px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 8px 28px rgba(19, 32, 25, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.2em;
    color: var(--forest);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--leaf);
}

.analyze-btn {
    width: 100%;
    background: var(--forest);
    color: white;
    border: none;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 12px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.demo-locations {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--mist);
    border-radius: 6px;
    border: 1px solid var(--line);
}

.demo-locations h4 {
    color: var(--forest);
    margin: 0 0 8px 0;
    font-size: 13px;
}

.demo-btn {
    background: var(--white);
    color: var(--forest);
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    margin: 2px 4px 2px 0;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-body);
}

.demo-btn:hover {
    background: var(--forest);
    color: var(--white);
    border-color: var(--forest);
}

.demo-btn.primary-action {
    background: var(--forest);
    color: var(--white);
    border-color: var(--forest);
}

.search-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#map {
    height: 100%;
    width: 100%;
    min-height: 400px; /* Ensure minimum height for map */
}

.loading-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(76, 175, 80, 0.15) !important;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(76, 175, 80, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(76, 175, 80, 0.3) 0%, transparent 50%);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    padding: 50px 40px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(255, 252, 247, 0.95) 0%, var(--mist) 100%);
    box-shadow:
        0 18px 40px rgba(15, 61, 46, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    max-width: 350px;
    border: 1px solid rgba(19, 32, 25, 0.1);
    animation: fadeInScale 0.4s ease-out;
    backdrop-filter: blur(12px);
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(76, 175, 80, 0.1);
    border-top: 5px solid var(--leaf);
    border-right: 5px solid var(--leaf);
    border-radius: 50%;
    animation: spinPulse 1.2s linear infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

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

@keyframes spinPulse {
    0% { 
        transform: rotate(0deg) scale(1); 
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
    50% { 
        transform: rotate(180deg) scale(1.05); 
        box-shadow: 0 0 25px rgba(76, 175, 80, 0.5);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
}

.loading-content h4 {
    color: var(--forest);
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.loading-content p {
    color: var(--leaf);
    font-size: 1em;
    margin: 0;
    opacity: 0.9;
}

.analysis-result {
    background: linear-gradient(145deg, rgba(255, 252, 247, 0.92) 0%, rgba(231, 242, 235, 0.65) 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(19, 32, 25, 0.05);
    border: 1px solid rgba(19, 32, 25, 0.07);
    border-left: 3px solid var(--leaf);
    transition: all 0.3s ease;
}

.analysis-result:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(19, 32, 25, 0.08);
}

.analysis-result h4 {
    color: var(--forest);
    margin-bottom: 10px;
    font-size: 14px;
}

/* Key Factors section removed - was duplicate of SHAP visualization */

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

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

.data-label {
    font-weight: 600;
    color: #555;
}

.data-value {
    color: var(--forest);
    font-weight: 600;
}

.data-value.error {
    color: #f44336;
}

.credit-score-display {
    text-align: center;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c8);
    padding: 30px;
    border-radius: 15px;
    margin: 40px 0 25px 0;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.2);
}

.score-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--forest);
    margin-bottom: 5px;
}

.score-status {
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
}

/* Basel III Metrics Display */
.basel-metrics-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.basel-metric {
    background: linear-gradient(135deg, var(--mist), #ffe0b2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(255, 152, 0, 0.2);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.1);
}

.basel-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basel-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #e65100;
}

.score-breakdown {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-weight: 600;
    color: #555;
}

.breakdown-value {
    color: var(--forest);
    font-weight: 600;
    font-family: monospace;
}

.current-weather-panel {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 8px;
    border: 2px solid var(--leaf);
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.weather-item {
    display: flex;
    flex-direction: column;
    padding: 6px;
    background: rgba(255,255,255,0.7);
    border-radius: 4px;
    font-size: 12px;
}

.weather-label {
    font-weight: 600;
    color: var(--forest-mid);
    margin-bottom: 2px;
}

.weather-value {
    color: #0D47A1;
    font-weight: 600;
    font-family: monospace;
}

.hidden {
    display: none;
}

.error-message {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 13px;
}

.satellite-status {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 12px;
}

.satellite-status h5 {
    color: #1976d2;
    margin-bottom: 8px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.status-active {
    color: var(--leaf);
    font-weight: bold;
}

.status-inactive {
    color: #999;
}

.status-error {
    color: #f44336;
    font-weight: bold;
}

/* Image modal styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s;
}

.image-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    overflow-y: auto;
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--leaf);
    padding-bottom: 10px;
}

.image-modal-title {
    color: var(--forest);
    font-size: 1.4em;
    margin: 0;
}

.close-modal {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #d32f2f;
}

.modal-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.modal-satellite-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-image-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.modal-info-label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    margin-bottom: 4px;
}

.modal-info-value {
    color: var(--forest);
    font-weight: 600;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Explainable AI Styles */
.factor-item {
    margin: 8px 0;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #ddd;
    background: #f9f9f9;
    font-size: 13px;
}

.factor-positive {
    border-left-color: var(--leaf);
    background: #e8f5e8;
}

.factor-negative {
    border-left-color: #f44336;
    background: #ffebee;
}

.factor-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.factor-impact {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.factor-explanation {
    font-size: 12px;
    color: #555;
    font-style: italic;
}

.improvement-item {
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--mist);
    border-radius: 6px;
    border-left: 4px solid var(--forest-mid);
    font-size: 13px;
    color: #e65100;
}

.ai-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.ai-active {
    background: var(--leaf);
}

.ai-error {
    background: #f44336;
}

/* ML Inputs Panel (Left Column) */
.ml-inputs-panel {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 2px solid var(--leaf);
}

.ml-input-description {
    margin-bottom: 15px;
}

.ml-input-description p {
    color: var(--forest-mid);
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

/* Explanation Flow (Right Column) */
.explanation-flow {
    margin: 10px 0;
}

.process-indicator {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid var(--leaf);
}

.process-arrow-horizontal {
    font-size: 14px;
    color: var(--forest);
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.process-description {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.input-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: #f0f8ff;
    border-radius: 4px;
    border-left: 3px solid var(--leaf);
    font-size: 12px;
}

.input-feature-name {
    font-weight: 600;
    color: var(--forest-mid);
}

.input-feature-value {
    color: #333;
    font-family: monospace;
}

.output-factors {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.factor-item {
    margin: 0;
    padding: 8px;
    border-radius: 4px;
    border-left: 4px solid #ddd;
    background: #f9f9f9;
    font-size: 12px;
}

.factor-connection-line {
    position: relative;
}

.factor-connection-line::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: var(--leaf);
    transform: translateY(-50%);
}

/* Highlighting and Animation for Connected Features */
.highlighted-input {
    background: #e8f5e8 !important;
    border-left-color: var(--leaf) !important;
    animation: pulseHighlight 1.5s ease-in-out;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

@keyframes pulseHighlight {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
    }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .ml-flow-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .ml-process-arrow {
        flex-direction: row;
        min-width: auto;
        padding: 5px;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 0 10px;
    }
}

/* New UI Component Styles */
.key-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.metric-card {
    background: linear-gradient(145deg, rgba(255, 252, 247, 0.9), var(--mist));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.metric-label {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

/* Collapsible Section Styles */
.collapsible-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 15px 0;
    background: rgba(255, 252, 247, 0.7);
    overflow: hidden;
}

.collapsible-section summary {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 252, 247, 0.95), var(--mist));
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    transition: background 0.3s ease;
}

.collapsible-section summary:hover {
    background: var(--mist);
}

.collapsible-section[open] summary {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
}

.collapsible-section summary::marker {
    color: #666;
}

/* Basel III metric improvements */
.basel-metrics-display {
    display: flex;
    gap: 12px;
    margin: 15px 0;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--leaf) #f1f1f1;
}

.basel-metrics-display::-webkit-scrollbar {
    height: 6px;
}

.basel-metrics-display::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.basel-metrics-display::-webkit-scrollbar-thumb {
    background: var(--leaf);
    border-radius: 3px;
}

.basel-metrics-display::-webkit-scrollbar-thumb:hover {
    background: var(--leaf);
}

.basel-metric {
    background: white;
    border: 2px solid #e8f5e8;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    min-width: 140px;
    flex-shrink: 0;
}

.basel-label {
    font-size: 11px;
    color: var(--forest);
    font-weight: 600;
    margin-bottom: 6px;
}

.basel-value {
    font-size: 14px;
    font-weight: 700;
    color: #1b5e20;
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .key-metrics {
        grid-template-columns: 1fr;
    }
    
    .basel-metrics-display {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 10px;
    }
    
    .metric-value {
        font-size: 14px;
    }
}
