/* ================= GLOBAL ================= */
*{
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body{
    margin: 0;
    background: #f1f5f9;
    color: #0f172a;
}

a{
    text-decoration: none;
    color: #2563eb;
}

h2{
    margin: 0 0 12px 0;
}

/* ================= TOP HEADER ================= */
.header{
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header a{
    color: #fff;
    margin-left: 15px;
    font-size: 14px;
}

/* ================= CONTAINER ================= */
.container{
    margin: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ================= BUTTONS ================= */
.btn{
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover{
    background: #1d4ed8;
}

/* ================= PROCUREMENT HEADER ================= */
.proc-header{
    display: grid;
    grid-template-columns:
        120px   /* Arrival Date */
        180px   /* Project */
        120px   /* Procurement */
        100px   /* Gate Pass */
        150px   /* Gate Pass Weight */
        160px   /* Middle Man */
        130px   /* Payment */
        130px   /* Truck */
        130px;  /* Load Button */
    gap: 10px;
    align-items: end;
    background: #f8fafc;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.proc-header label{
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3px;
    display: block;
}

.proc-header input,
.proc-header select{
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.header-btn{
    text-align: right;
}

/* ================= FARMER TABLE ================= */
.table-wrapper{
    margin-top: 12px;
    height: 320px;              /* ~10 rows */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.table-wrapper table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
    background: #fff;
}

.table-wrapper thead th{
    position: sticky;
    top: 0;
    background: #f1f5f9;
    z-index: 5;
}

.table-wrapper th,
.table-wrapper td{
    border: 1px solid #e5e7eb;
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths (NO horizontal scroll) */
.table-wrapper th:nth-child(1),
.table-wrapper td:nth-child(1){ width: 50px; text-align: center; }

.table-wrapper th:nth-child(2),
.table-wrapper td:nth-child(2){ width: 60px; }

.table-wrapper th:nth-child(3),
.table-wrapper td:nth-child(3){ width: 120px; }

.table-wrapper th:nth-child(4),
.table-wrapper td:nth-child(4){ width: 150px; }

.table-wrapper th:nth-child(5),
.table-wrapper td:nth-child(5){ width: 120px; }

.table-wrapper th:nth-child(6),
.table-wrapper td:nth-child(6){ width: 110px; }

.table-wrapper th:nth-child(7),
.table-wrapper td:nth-child(7){ width: 110px; }

.table-wrapper th:nth-child(8),
.table-wrapper td:nth-child(8){ width: 100px; }

.table-wrapper th:nth-child(9),
.table-wrapper td:nth-child(9){ width: 90px; }

.table-wrapper th:nth-child(10),
.table-wrapper td:nth-child(10){ width: 110px; }

/* Inputs inside table */
.table-wrapper input[type="number"]{
    width: 90%;
    padding: 4px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
}

/* Amount cell */
.amount{
    font-weight: 600;
    text-align: right;
    color: #0f172a;
}

/* ================= TOTAL SECTION ================= */
.total-bar{
    margin-top: 10px;
    display: flex;
    gap: 25px;
    align-items: center;
    font-size: 14px;
}

.total-bar strong{
    color: #0f172a;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px){
    .proc-header{
        grid-template-columns: repeat(4, 1fr);
    }
}
