body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 10px;
}
#customersubmit {
    border: 1px solid black;
    padding: 10px;
    border-radius: 5px;
    margin-left: 50%;
}

h2 {
  /*  border: 1px solid black; */
    width: fit-content;
    
}
  #jcard {
   /*  border: 2px solid black; */
     width: 200px;
    background-color: rgb(166, 183, 188);
}

input, textarea {
    padding: 6px;
    width: auto;
    margin-bottom: 5px;
    box-sizing: border-box; 
    border-radius: 8px;
} 

 .saveNewLine {
    background: rgba(0, 200, 255, 0.606);
    color: rgb(0, 0, 0);
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin: 2px;
}
 .saveNewLine:hover {
    background-color: #9db7d0;
}
 #bcard {
 /*  border: 1px solid black; */ 
    background-color: rgb(166, 183, 188);
    max-width: 250px;
    
    flex: 1;
    
 }

 #totals {
  border: 1px solid black;
  margin-left: auto;    /* Pushes the element to the right */
  margin-right: 0;
  background-color: #dddddd;
  width: 200px;
  padding-left: 5px;
}
 .parentCard {
    display: flex;
   border: 1px solid black;
   background-color: rgb(166, 183, 188);
 }
 /* 
 #lineItemsInputForm {
    border: 1px solid rgb(255, 0, 0);
    margin: 8px;
    width: 100%;
    table-layout: fixed;
 }
 */

 nav {
    background-color: #222;
    padding: 8px;
    margin-bottom: 8px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
}


.row {
  /* border: 1px solid rgb(255, 0, 0);*/
    padding: 1px;
}
*/
    #items {
    border: 1px solid black;
    margin-top: 5px;
    overflow-x: auto; 
    width: 100%;
    table-layout: fixed;
 }

/*===============================================

/* Wrap the form so the table can scroll on small screens */
#lineItemsInputForm {
/*  border: 2px solid black; */ 
  
  overflow-x: auto;   /* ← KEY FIX: enables horizontal scroll */
  width: 100%;
  box-sizing: border-box; 
  padding: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  /*
  margin: 20px 0;
  */
  font-family: sans-serif;
  min-width: 600px;   /* ← keep a min-width but let it scroll */
  table-layout: fixed; /* ← prevents columns from auto-expanding */
}

textarea {
  field-sizing: content;
  min-width: 50px; /* Prevents the input from completely collapsing when empty */
  max-width: 100%; /* Prevents the input from blowing out its container */
}
/*
textarea.Inputclass {
  resize: vertical;      /* lets user drag to resize 
  min-height: 38px;
  width: 100%;
  box-sizing: border-box;
}
*/
/* Make inputs fill their cell instead of overflowing */
.Inputclass {
  border: 1px solid darkblue;
  width: 100%;        /* ← KEY FIX: was "auto", caused overflow */
  box-sizing: border-box;
  padding: 4px 6px;   /* ← reduce padding inside table cells */
}

th, td {
  padding: 5px; 
  border: 1px solid #dddddd;
  overflow: hidden;   /* ← clips content to cell boundary */
}
