body{
margin:0;
font-family:Arial,sans-serif;
background:#f4f4f4;
}

header{
background:#2e7d32;
color:#fff;
}

.container{
padding:15px;
}

input,select,button{
width:100%;
padding:12px;
margin:8px 0;
border:1px solid #ccc;
border-radius:8px;
box-sizing:border-box;
font-size:16px;
}

button{
background:#2e7d32;
color:white;
border:none;
font-weight:bold;
cursor:pointer;
}

button:hover{
background:#1b5e20;
}

.card{
background:white;
margin-top:15px;
padding:15px;
border-radius:10px;
box-shadow:0 2px 8px rgba(0,0,0,.2);
}

.total{
color:green;
font-weight:bold;
}

.balance{
color:red;
font-weight:bold;
}

table{
width:100%;
border-collapse:collapse;
margin-top:15px;
table-layout:auto;
}

th,td{
border:1px solid #ddd;
padding:8px;
text-align:center;
}

th{
background:#2e7d32;
color:white;
}
.action{
display:flex;
flex-direction:row;
justify-content:center;
align-items:center;
gap:5px;
flex-wrap:nowrap;
}

.action button{
width:24px;
height:24px;
min-width:24px;
font-size:14px;
padding:0;
margin:0;
}

th:last-child,
td:last-child{
width:80px;
}
.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
gap:15px;
margin:20px 0;
}

.card{
background:#ffffff;
border-radius:15px;
padding:18px;
text-align:center;
box-shadow:0 4px 12px rgba(0,0,0,.12);
transition:.3s;
}

.card:hover{
transform:translateY(-4px);
}

.card h3{
margin:0;
font-size:16px;
color:#2e7d32;
}

.card h2{
margin-top:10px;
font-size:26px;
color:#111;
}
/* ===== Premium Header ===== */

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:linear-gradient(135deg,#0b5d1e,#2e7d32);
    padding:18px 30px;
    border-radius:0 0 18px 18px;
    box-shadow:0 8px 20px rgba(0,0,0,.20);
    color:#fff;
}

.header-left h2{
    margin:0;
    font-size:36px;
    font-weight:800;
}

.header-left p{
    margin:5px 0 0;
    font-size:16px;
    color:#dff5df;
}

.header-right{
    display:flex;
    gap:15px;
}

.header-right button{
    width:auto;
    padding:12px 22px;
    background:transparent;
    color:#fff;
    border:2px solid rgba(255,255,255,.6);
    border-radius:12px;
    font-size:15px;
    font-weight:bold;
    transition:.3s;
}

.header-right button:hover{
    background:#fff;
    color:#1b5e20;
}

@media(max-width:768px){

header{
    flex-direction:column;
    text-align:center;
    gap:15px;
}

.header-left h2{
    font-size:28px;
}

.header-right{
    width:100%;
    justify-content:center;
    flex-wrap:wrap;
}

.header-right button{
    width:46%;
}

}
/* Dashboard One Row */
.dashboard{
    display:flex;
    flex-wrap:nowrap;
    gap:12px;
    overflow-x:auto;
    margin:20px 0;
}

.dashboard .card{
    flex:1;
    min-width:150px;
    margin:0;
    text-align:center;
}

.dashboard .card h2{
    font-size:32px;
    margin:10px 0;
}

.dashboard .card h3{
    font-size:16px;
    margin-bottom:8px;
    }
.dashboard .card{
    background:#fff;
    border-radius:16px;
    padding:18px;
    box-shadow:0 6px 18px rgba(0,0,0,.12);
    min-width:170px;
    text-align:center;
}

.dashboard .card h2{
    font-size:38px;
    margin:8px 0;
    font-weight:700;
}

.dashboard .card h3{
    font-size:17px;
    margin-bottom:6px;
    color:#333;
}
/* Search Row */
.search-row{
    display:flex;
    gap:12px;
    align-items:end;
    flex-wrap:wrap;
    margin-bottom:15px;
}

.search-row input,
.search-row select{
    flex:1;
    min-width:160px;
}

.search-row button{
    width:auto;
    padding:12px 22px;
    white-space:nowrap;
}

@media(max-width:768px){
    .search-row{
        flex-direction:column;
    }

    .search-row input,
    .search-row select,
    .search-row button{
        width:100%;
    }
}
/* ===== Part 2 : Add Farmer Section ===== */

.section-title{
    background:#fff;
    margin-top:18px;
    margin-bottom:10px;
    padding:14px 18px;
    border-radius:14px 14px 0 0;
    font-size:22px;
    font-weight:bold;
    color:#1b5e20;
    box-shadow:0 3px 12px rgba(0,0,0,.12);
    border-left:6px solid #2e7d32;
}

input,
select{
    border-radius:10px;
}

button{
    border-radius:10px;
}
/* ===== AI मुंशी Fix ===== */

#ai-chat-box input{
    width:auto !important;
    flex:1 !important;
    margin:0 !important;
}

#ai-chat-box button{
    width:auto !important;
    margin:0 !important;
}

#ai-chat-box div:last-child{
    display:flex !important;
    align-items:center;
    gap:6px;
}
