/* === OVERRIDE THEME CONTAINERS (Only for this page) === */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #f4f6f9 !important;
}

/* Kill the theme's container */
.et_pb_section .et_pb_row,
.et_pb_section .et_pb_column,
.entry-content,
.post-content,
.single-content,
.page-content,
.content-area,
.site-content,
#main-content,
#primary,
#main,
.wrap,
.container,
.row,
.col,
.hentry,
.et-l--post,
.et-l {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: both !important;
    display: block !important;
}

/* === FULL WIDTH & HEIGHT FIX === */
html, body {
    height: 100% !important;
    min-height: 100vh !important;
}

.entry-content,
.post-content,
.single-content,
.page-content,
.content-area,
.site-content,
#main-content,
#primary,
#main,
.et_pb_section,
.et_pb_row,
.et_pb_column {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
}

/* === YOUR APP STYLES - ALL NESTED UNDER .app-container === */
.app-container {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background: white;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh !important;
    height: auto !important;
    max-height: none !important;
}

/* On large screens, add back padding */
@media (min-width: 1200px) {
    .app-container {
        border-radius: 2rem !important;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15) !important;
        margin: 1.5rem auto !important;
    }
}

/* All styles inside .app-container */
.app-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.app-container header {
    background: linear-gradient(135deg, #1e3c2f 0%, #2a5a3a 100%);
    color: white !important;
    padding: 1.5rem 2rem;
    flex-shrink: 0;
}

.app-container header h1 {
    font-weight: 500;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white !important;
}

.app-container header h1 span {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white !important;
}

.app-container header .subtitle {
    opacity: 0.85;
    margin-top: 0.3rem;
    font-weight: 300;
    font-size: 1rem;
    color: rgba(255,255,255,0.9) !important;
}

/* === MAIN GRID - SCROLLABLE === */
.app-container main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #ffffff;
    width: 100% !important;
    flex: 1;
    min-height: 0;
}

/* === PANELS - SCROLLABLE === */
.app-container .input-panel {
    padding: 1.5rem;
    border-right: 1px solid #e9edf2;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    height: auto;
}

.app-container .results-panel {
    padding: 1.5rem;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    height: auto;
}

/* === SECTIONS === */
.app-container .section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #4a5b6e !important;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* === INPUT GROUPS === */
.app-container .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.4rem;
}

.app-container .input-row {
    display: flex;
    gap: 0.8rem;
}

.app-container .input-row .input-group {
    flex: 1;
}

.app-container label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155 !important;
}

.app-container input,
.app-container select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d9e6;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    background: white;
    transition: all 0.2s;
    width: 100%;
    color: #1e293b !important;
}

.app-container input:focus,
.app-container select:focus {
    outline: none;
    border-color: #2a5a3a;
    box-shadow: 0 0 0 3px rgba(42,90,58,0.15);
}

/* === BUTTON === */
.app-container button {
    background: #1e3c2f;
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.app-container button:hover {
    background: #2a5a3a;
}

/* === METRICS === */
.app-container .metric-card {
    background: white;
    border-radius: 0.8rem;
    padding: 0.8rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #eef2f6;
    flex-shrink: 0;
}

.app-container .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3c2f !important;
    line-height: 1.2;
}

.app-container .metric-label {
    font-size: 0.7rem;
    color: #64748b !important;
    text-transform: uppercase;
    font-weight: 600;
}

/* === CHART === */
.app-container .chart-container {
    height: 150px;
    margin: 0.3rem 0;
    min-height: 120px;
    flex-shrink: 0;
}

/* === RECOMMENDATIONS === */
.app-container .recommendation-box {
    background: #f0f7ff;
    border-left: 4px solid #2563eb;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #1e3a5f !important;
    max-height: 180px;
    overflow-y: auto;
    flex-shrink: 0;
}

.app-container .ai-badge {
    background: #eef2ff;
    color: #4338ca !important;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    letter-spacing: 0.3px;
    display: inline-block;
    margin-left: 0.3rem;
}

/* === FOOTER NOTE === */
.app-container .input-panel > div:last-child {
    font-size: 0.7rem;
    color: #94a3b8 !important;
    flex-shrink: 0;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .app-container main {
        grid-template-columns: 1fr !important;
    }
    .app-container .input-panel {
        border-right: none;
        border-bottom: 1px solid #e9edf2;
        max-height: 400px !important;
    }
    .app-container .results-panel {
        max-height: 500px !important;
    }
}

@media (max-width: 600px) {
    .app-container header h1 {
        font-size: 1.3rem !important;
    }
    .app-container header .subtitle {
        font-size: 0.8rem !important;
    }
    .app-container .metric-value {
        font-size: 1.3rem !important;
    }
    .app-container .input-panel {
        padding: 1rem !important;
    }
    .app-container .results-panel {
        padding: 1rem !important;
    }
}

/* === SCROLLBAR STYLING (Optional) === */
.app-container .input-panel::-webkit-scrollbar,
.app-container .results-panel::-webkit-scrollbar,
.app-container .recommendation-box::-webkit-scrollbar {
    width: 4px;
}
.app-container .input-panel::-webkit-scrollbar-thumb,
.app-container .results-panel::-webkit-scrollbar-thumb,
.app-container .recommendation-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.app-container .input-panel::-webkit-scrollbar-track,
.app-container .results-panel::-webkit-scrollbar-track,
.app-container .recommendation-box::-webkit-scrollbar-track {
    background: transparent;
}