section {
    background: var(--white);
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* --------------------- TOPBAR ------------------- */
section .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px 0 #b1aeae;
}

section .topbar button{
    background: var(--gray-100);
    color: var(--gray-600);
    border: none;
    border-radius: 0.125rem;
    font-size: 0.75rem;
    padding: 0.125rem;
}

section .topbar button:hover{
    background: var(--dark);
}

/* --------------------- BASIC DETAILS ------------------- */
.basic-details {
    display: grid;
    grid-template-columns: 1fr 4fr 4fr 1fr 2fr;
    gap: 0.25rem;
    
}
.basic-details input {
    padding-left: 0.375rem;
}
.basic-details label:nth-of-type(even) {
    text-align: right;
}
.basic-details input, .basic-details select {
    width: 100%;
    height: 1.5rem;
    background: var(--gray-100);
}


/* --------------------- ORDER TABLE ------------------- */
.order-table .head {
    background: lightgrey;
    display: grid;
      grid-template-columns: 20px 2fr 1fr 1fr 2fr 1.5fr 20px;
      border-bottom: 2px solid var(--white);
}
.order-table .head span {
    border: 1px solid white;
    padding: 0.25rem;
}

.order-table .row {
    border-bottom: 1px solid white;
    display: grid;
      grid-template-columns: 20px 2fr 1fr 1fr 2fr 1.5fr 20px;
}

.order-table .row > *{
    border: 1px solid white;
}

.order-table .row button {
    width: 1.25rem;
    height: 1.5625rem;
}

.order-table input[type="text"], .order-table input[type="number"], .order-table textarea {
    width: 100%;
    background: var(--gray-100);
    padding: 0.25rem;
}
.order-table .row-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-100);
}

.order-table .row-flex input[type="number"] {
    width: 60%;
}


.order-table .foot {
    display: grid;
    grid-template-columns: 20px 2fr 1fr 1fr 2fr 1.5fr 20px;
    gap: 0.25rem;
    
}
.order-table .foot input {
    width: 100%;
    height: 1.5rem;
}
.order-table .foot label {
    text-align: right;
}
.order-table .foot > :nth-child(1)  {
    grid-column-start: 5;
    grid-column-end: 6;
}
.order-table .foot > :nth-child(3)  {
    grid-column-start: 5;
    grid-column-end: 6;
}
.order-table .foot > :nth-child(5)  {
    grid-column-start: 5;
    grid-column-end: 6;
}

.order-table .foot > :nth-child(7)  {
    grid-column-start: 2;
    grid-column-end: 4;
    grid-row-start: 1;
    grid-row-end: 4;
}

/* --------------------- PAYMENTS & COSTS ------------------- */
.costs-payments {
    display: flex;
    justify-content: space-between;
}
.payments, .costs {
    display: inline-grid;
}
.payments {
    grid-template-columns: 1fr 2fr 2fr 2fr;
}
.costs {
    grid-template-columns: 1fr 2fr 2fr;
}
.payments > *, .costs > * {
    border: 0.0625rem solid var(--gray-200);
    padding: 0.125rem 0.5rem;
}
.payments > *:nth-child(4n), .costs > *:nth-child(3n)  {
    text-align: right;
}
.payments > *:nth-child(4n + 1), .costs > *:nth-child(3n + 1) {
    text-align: center;
}
.payments > *:nth-child(-n + 4), .costs > *:nth-child(-n + 3) {
    font-weight: 600;
}
/* --------------------- FORM BUTTON BAR ------------------- */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    box-shadow: 0 -1px 3px 0 #b1aeae;
}
/* --------------------- COMMON MARGINS ------------------- */
.basic-details, .order-table, .foot, .bottom-bar  { 
   margin-top: 0.5rem; 
}
/* --------------------- COMMON PADDING ------------------- */
.topbar, .basic-details, .order-table, .foot, .costs-payments, .bottom-bar {
    padding: .25rem;
}
