body {
    overflow-x: hidden;
    background-color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: 0;
    transition: margin .25s ease-out;
    width: 20rem;
    position: fixed; /* Fixed sidebar */
    z-index: 1000;
    height: 100%;
    overflow-y: auto;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2e4053;
    text-align: center;
}

.sidebar-logo {
    position: relative;
    top: -10px;
    vertical-align: middle;
}

#page-content-wrapper {
    width: 100%;
    padding-left: 20rem; /* Push content */
    transition: padding-left .25s ease-out;
}

/* Responsive behavior */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
        position: relative;
        width: 100%;
        min-height: auto;
    }
    #page-content-wrapper {
        padding-left: 0;
    }
    .result-image {
        max-height: 300px;
    }
}

.result-image {
    max-height: 500px;
    width: auto;
    max-width: 100%;
}

.metric-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.metric-card h5 {
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-card h3 {
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
    font-size: 1.8rem;
}

.card-header {
    background-color: #fff;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding: 1rem;
}

.btn-primary {
    background-color: #ff4b4b; /* Streamlit red-ish */
    border-color: #ff4b4b;
}

.btn-primary:hover {
    background-color: #ff3333;
    border-color: #ff3333;
}

.list-group-item.active {
    background-color: #f0f2f6;
    color: #ff4b4b;
    border-color: transparent;
    font-weight: bold;
    border-left: 4px solid #ff4b4b;
}
