/* =========================================
   VenDir GLOBAL STYLES (Pro Dashboard Theme)
   ========================================= */

/* 1. RESET & BASICS */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9; /* Light Gray Dashboard Background */
    color: #334155;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. HEADER (Teal App Bar) */
.site-header {
    background: #0e7490; /* Brand Teal */
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 1000;
}

.header-inner {
    width: 98%; margin: 0 auto;
    height: 60px; /* Fixed robust height */
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 10px;
}

.logo-area {
    font-weight: 800; color: #ffffff; text-decoration: none; font-size: 1.4rem;
    display: flex; align-items: center; gap: 8px;
}

.main-nav ul { display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; }
.nav-link { 
    text-decoration: none; color: rgba(255,255,255,0.8); 
    font-size: 0.9rem; font-weight: 500; transition: 0.2s;
}
.nav-link:hover, .nav-link.active { color: #ffffff; opacity: 1; }

/* Mobile Toggle (White) */
.mobile-toggle { 
    display: none; background: none; border: none; 
    color: white; font-size: 1.4rem; cursor: pointer; 
}

/* 3. MAIN CARD (The Tool) */
.module-container {
    width: 98%;           
    margin: 20px auto;    
    padding: 25px;        
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #0e7490; /* Accent Bar at top */
}

/* Section Titles */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 30px; }

h2.section-title {
    color: #0f172a; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px;
}
p.section-subtitle { color: #64748b; font-size: 0.95rem; }

/* 4. NAVIGATION TABS (Segmented Control Look) */
.nav-pills {
    display: flex; justify-content: center; gap: 5px;
    background: #f1f5f9; padding: 4px; border-radius: 8px;
    width: fit-content; margin: 0 auto 25px;
    border: 1px solid #e2e8f0;
}

.pill-btn {
    background: transparent; border: none;
    color: #64748b; padding: 8px 20px;
    border-radius: 6px; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: 0.2s;
}
.pill-btn:hover { color: #0e7490; }
.pill-btn.active {
    background: #ffffff; color: #0e7490;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 5. INPUTS (Clean & Big) */
.input-grid {
    display: flex; align-items: flex-end; gap: 15px;
    background: #fff; padding: 10px 0;
}

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

.form-label {
    font-size: 0.75rem; font-weight: 700; color: #64748b; 
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Update Only This Section in global.css */

.form-control {
    width: 100%; 
    padding: 6px 10px;   /* Reduced padding (Slim Look) */
    border: 1px solid #cbd5e1; 
    border-radius: 4px;
    font-size: 0.9rem;   /* Slightly smaller text */
    color: #1e293b; 
    outline: none; 
    transition: 0.2s;
    height: 38px;        /* Fixed height to match button */
}

.input-grid {
    display: flex; align-items: flex-end; gap: 10px;
    background: #fff; padding: 5px 0; /* Reduced padding */
}

/* Adjust Button Size to Match */
.btn-circle {
    width: 38px; height: 38px; /* Matching height */
    margin-bottom: 0;
    border-radius: 4px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}

.form-control:focus { border-color: #0e7490; box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.1); }
.form-control[readonly] { background-color: #f8fafc; color: #475569; font-weight: 600; }

/* Swap Button */
.btn-circle {
    width: 45px; height: 45px; margin-bottom: 2px;
    border-radius: 50%; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.btn-circle:hover { 
    background: #0e7490; color: white; border-color: #0e7490; 
}

/* 6. TABLES */
.table-clean { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-clean th { padding: 12px; background: #f8fafc; text-align: left; border-bottom: 2px solid #e2e8f0; color: #475569; }
.table-clean td { padding: 12px; border-bottom: 1px solid #f1f5f9; }

/* 7. FOOTER (Dark & Compact) */
.site-footer {
    background: #1e293b; color: #94a3b8;
    padding: 20px 0; margin-top: auto;
    font-size: 0.85rem; border-top: 1px solid #334155;
}
.footer-content {
    width: 98%; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.footer-col a { color: #cbd5e1; text-decoration: none; margin-right: 15px; }
.footer-col a:hover { color: #22d3ee; }
.footer-bottom { 
    width: 98%; margin: 15px auto 0; padding-top: 15px; 
    border-top: 1px solid #334155; text-align: center; font-size: 0.75rem; 
}

/* 8. MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .main-nav {
        display: none; position: absolute; top: 60px; left: 0; right: 0;
        background: #0e7490; padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .main-nav.show-menu { display: block; }
    .main-nav ul { flex-direction: column; gap: 15px; text-align: center; }
    
    .input-grid { flex-direction: column; gap: 20px; }
    .btn-circle { transform: rotate(90deg); margin: 0 auto; }
}

/* =========================================
   GRAPHICAL BAR CHART (Row Styles)
   ========================================= */

.chart-section-title {
    color: #475569;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 25px 0 15px;
    display: flex; align-items: center; gap: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.chart-section-title i { color: #0e7490; }

/* Grid for 2-Column Layout */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Side-by-side on desktop */
    gap: 20px;
    align-items: start;
}

/* Individual Bar Row */
.bar-row {
    display: flex;
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden; /* Keeps corners round */
    border: 1px solid #cbd5e1;
    transition: transform 0.2s;
}
.bar-row:hover { transform: translateX(5px); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Left Side: The "Bar" (Unit Name) */
.bar-label {
    background: #0e7490; /* Teal Bar */
    color: #ffffff;
    padding: 10px 15px;
    width: 45%; /* Fixed width for alignment */
    font-size: 0.85rem;
    font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.bar-label i { opacity: 0.7; font-size: 0.9rem; }

/* Right Side: The Value */
.bar-value {
    background: #ffffff;
    color: #1e293b;
    padding: 10px 15px;
    width: 55%;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex; align-items: center;
    border-left: 1px solid #cbd5e1;
}

/* Mobile Fix */
@media (max-width: 600px) {
    .chart-grid { grid-template-columns: 1fr; }
    .bar-label { width: 50%; font-size: 0.75rem; }
    .bar-value { width: 50%; font-size: 0.8rem; }
}

/* =========================================
   SMART RESULT DASHBOARD (All Units Grid)
   ========================================= */

.results-area {
    margin-top: 30px;
    border-top: 2px dashed #e2e8f0;
    padding-top: 20px;
    display: none; /* Hidden initially */
}

.results-title {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.res-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    transition: 0.2s;
}

.res-card:hover {
    background: #fff;
    border-color: #0e7490;
    box-shadow: 0 4px 10px rgba(14, 116, 144, 0.1);
    transform: translateY(-2px);
}

/* Decorative Bar on Left */
.res-card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: #0e7490;
}

.res-unit {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.res-value {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
    word-break: break-all;
}

/* --- DYNAMIC HEADER COMPACT LAYOUT --- */
.site-header-wrapper {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 30px 0; /* Tight padding */
    margin-bottom: 30px;
}

.header-split-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left; /* Center hatakar Left kar diya */
}

/* Left Side: Text */
.header-text-area {
    flex: 1; /* Takes 50-60% width */
}
.header-text-area h1 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 10px;
}
.header-text-area p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

/* Right Side: Feature Grid */
.header-features-area {
    flex: 1;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.features-grid-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns side-by-side */
    gap: 12px;
}

.feat-item {
    font-size: 0.85rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feat-item i {
    color: #0e7490;
    font-size: 1rem;
}

/* Mobile Responsive (Stack on small screens) */
@media (max-width: 768px) {
    .header-split-layout {
        flex-direction: column;
        text-align: center;
    }
    .features-grid-box {
        grid-template-columns: 1fr; /* 1 Column on mobile */
        text-align: left;
    }
}