/* Reset and Defaults */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* Root Variables */
:root {
  --menu-height: 50px;
  --menu-max-width: 200px;
}

/* --- 4-Row Page Layout Styles --- */
.page-container-4row {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  padding-top: var(--menu-height); 
  box-sizing: border-box;
}

.row {
display: block;
height: auto;
padding: 0;
margin: 0;
}

.row-1,
.row-2,
.row-3 {
  display: flex;
  align-items: center; /* vertically center content */
  height: auto;
  /* min-height: var(--menu-height);  */
  padding: 5px 10px;
  box-sizing: border-box;
}

.row-1 {
display: none;
}

.row-2 {
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
}

.row-3 {
  min-height: 10px;
  padding: 5px 10px;


  border: 0px solid #000000;
  background-color: #fff;
}


.row-4 {

  background-color: #fff;
}

/* Horizontal Menu */
#hmenu {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  height: var(--menu-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000096;
  z-index: 1000;
    
}

.hmenu-left,
.hmenu-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
}

.hmenu-left {
  justify-content: flex-start;
  flex: 1;
}

.hmenu-right {
  justify-content: flex-end;
  
 }



/* Menu Items */
#hmenu  .dropbtn,
#hmenu  .dropdown {
  flex: 0 0 auto;
  height: var(--menu-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: white;
 
  text-decoration: none;
  white-space: nowrap;

}

#hmenu > div:last-child {
  border-right: none;
}

/* Hover Effects */
#hmenu .dropbtn:hover,
#hmenu .dropdown:hover .dropbtn,
#hmenu div a:hover {
  background-color: #5b5b5b;
}

/* Dropdown Content */
#hmenu .dropdown {
  position: relative;
}

#hmenu .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: #f9f9f9;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  border: 1px solid #ddd;
}

#hmenu .dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#hmenu .dropdown-content a:hover {
  background-color: #f1f1f1;
}

#hmenu .dropdown:hover .dropdown-content,
#hmenu .dropdown.open .dropdown-content {
  display: block;
}


.dropbtn {
  flex: 0 1 auto;              /* Don't force it to fill space */
  padding: 0 20px;
  height: 100%;
  line-height: var(--menu-height);
  color: white;
  text-align: center;
  text-decoration: none;
  background-color: #000096;
  border: none;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
  min-width: 100px;            
  max-width: 200px;            
  box-sizing: border-box;      /*  ensures padding doesn't break limits */
}

.dropbtn a {
  color: white;
  text-decoration: none;
}

/* Quick Actions */
/* .quick-actions-container {
  padding-top: var(--menu-height);
} */

.quick-actions-form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px;
  align-items: center;
}

.quick-actions-form .form-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.bttn {
  background-color: #000096;
  color: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.bttn:hover {
  background-color: #333;
}

/* Responsive Enhancements */
@media (max-width: 600px) {
  .quick-actions-form {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions-form .form-row {
    flex-direction: column;
    width: 100%;
  }

  .bttn,
  input[type="text"] {
    width: 100%;
  }

  #hmenu {
    flex-direction: column;
    align-items: stretch;
    position: relative;
    height: auto;
    font-size: 1.1em;
  }

  #hmenu > .dropbtn,
  #hmenu > .dropdown {
    display: block;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid white;
  }

  .dropbtn {
    padding: 15px;
    font-size: 1.1em;
    line-height: normal;
    align-items: center;
  }

  #hmenu .dropdown-content {
    display: none;
    position: static;
    width: 100%;
    background-color: #f9f9f9;
    box-shadow: none;
    border: none;
  }

  #hmenu .dropdown.open .dropdown-content {
    display: block;
  }

  #hmenu .dropdown-content a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    color: black;
    border-bottom: 1px solid #000;
  }
}

/* CORE LAYOUT ENDS HERE - START ALL OTHER CONTENT AFTER THIS */
/* CORE LAYOUT ENDS HERE - START ALL OTHER CONTENT AFTER THIS */
/* CORE LAYOUT ENDS HERE - START ALL OTHER CONTENT AFTER THIS */


.success-message, .error-message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

   /* 
.main-content {
    flex: 1;
 margin-right: 20px;
    border:1px solid orange; 
}
    */


/* View Table on index.php - View Table on index.php */
.ViewTable {
    width: 100%;
    border-collapse: collapse;
}

.ViewTable th{
    text-align: left;
    font-weight: bold;
    Border-bottom : 3px solid black;
    Border-top : 3px solid black;
}

.ViewTable td{
    padding: 5px;
    padding: 2px 10px;
    text-align: left;
    border: 0px;
}

/* ID COLUMN */
.ViewTable td:nth-child(1){
width:80px;
}

/* Record Table COLUMN */
.ViewTable td:nth-child(2){
    width:200px;
}

.Tcolor1 {
background: #D0FFFF;
border-style: none;
/* font-weight: bold; */
}

.Tcolor2 {
background: white;
border-style: none;
/* font-weight: bold; */
}

.Tcolorborder {
    border-top: 1px solid grey;

}
.Tcolorborder td{
    border-top: 1px solid grey;
      
}
       
 .Record {
        display: flex;
        flex: 1;
        flex-direction: column;
        /* float: left;
        width: 50%;
        max-width: 50%; */
        min-width:700px;
        margin: 0px 5px 0px 0px;
        padding: 5px;
        border: 2px solid BLUE;
        box-sizing: border-box;
        min-height: 700px;
        max-height: 780px;
      }

    .RecordNotes {
        display: flex;
        /* flex-direction: column; */
        flex: 1;
        width: 100%;
        /* height: 100%;  */
        word-break: break-word;
        margin: 0;
        padding: 0;
        font-size: 110%;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .RecordFiles {
        flex: 1;
        min-height: 0;
        width: 100%;
        display: none;  /* Hidden until toggled */
        /* flex-direction: column; */
        margin: 0;
        padding: 0;
        font-size: 110%;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .striped {
        border-collapse: collapse;
        width:100%;
        max-height: 500px;
        font-family : Arial,sans-serif,Helvetica;
        line-height: 1.5;
        table-layout: auto;
        }
        
        .striped td{
        padding: 10px;
        }
        
        .striped tr:nth-child(even){
        background-color: #D0FFFF;
        }

   

    .important-notes {
        width: 99%;
        height: 60px;
        color: red;
        font-size: 16px;
        font-weight: bold;
    }

    .customer-contact-table {
       
        width: 100%;
      }
    .customer-contact-table .th-contact {
        width: 70px;
      }
      
    .customer-contact-table .th-name {
        width: 170px;
      }
      
      .customer-contact-table .th-phone {
        width: 100px;
      }
      
      .customer-contact-table .th-ext {
        width: 50px;
      }
      
      .customer-contact-table .th-email {
        width: 200px;
      }
    
      .customer-contact-table  td input.input-name {
        width: 170px;
      }
      
      .customer-contact-table  td input.input-phone {
        width: 100px;
      }
      
      .customer-contact-table  td input.input-ext {
        width: 50px;
      }
      
      .customer-contact-table  td input.input-email {
        width: 200px;
      }




/* CUSTOEMRS & PROJECTS -  CUSTOEMRS & PROJECTS - CUSTOEMRS & PROJECTS -  */
  .main-content {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 10px;
  width: 100%;
}

.two-boxes {
  display: flex;
  flex-direction: wrap;
  padding: 10px;
  border: opx solid black;
   gap: 20px;
  width: 100%;
  
}

.box-customer {
  flex: 0 0 670px; /* Grow, shrink, preferred width */
  min-width: 670px;
  max-width: 670px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 850px;
  padding: 5px; 
   border: 2px solid black;
}

.box-customer table {
  border: 0px;
  font-size: 1.0em ;
}
.box-customer table td {
border: 0px;
padding: 2px;
}


.box-record {
  flex: 1 1 700px; /* Grow, shrink, preferred width */
  min-width: 300px;
  max-width: 1300px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
   max-height: 850px;
border: 1px solid green;
}

.record-new {
    background-color: blue;
    text-align: center;
    color: yellow;
    font-weight: bold;
}

.record-open {
    background-color: green;
    text-align: center;
    color: white;
    font-weight: bold;
}

.record-closed {
    background-color: red;
    text-align: center;
    color: white;
    font-weight: bold;
}

.UpdateRecordButton {
    color: white;
    width: 140px;
    height: 25px;
    background-color: green;
    font-weight: bold;
    border: none;
    cursor: pointer;
  }
  
.CloseRecordButton {
    color: white;
    width: 140px;
    height: 25px;
    background-color: red;
    font-weight: bold;
    border: none;
    cursor: pointer;
  }

  .CreateRecordButton {
    color: yellow;
    width: 280px;
    height: 25px;
    background-color: blue;
    font-weight: bold;
    border: none;
    cursor: pointer;
  }



  /* message.php - message.php - message.php - message.php - */
.centertable {
    border-collapse: collapse;
    margin-right: auto;
    margin-left: 5px;
    text-align: Left;
    width: 100%;
    }

.centertableno {
    width: 100%;
    border-top: 3px solid black;
    border-bottom: 3px solid black;
    text-align: left;
    }

.centertableno td:nth-child(1) {
    width: 200px;
        }
 
 .centertableno th, td {
 border: 1px solid black;
 margin: 10px; /* optional */
 padding: 5px;
 }


.msgpad td { 
padding: 5px 10px 2px 2px; 
/* border-bottom: none; */
}

.msgpad tr:nth-child(even) {background: #CCFFFF}
.msgpad tr:nth-child(odd) {background: #FFF}


.msgpad td:nth-child(1)
{
width:200px;
}
    
.MsgTxtInput {
    min-width: 100%;
    min-height: 140px;
    box-sizing: border-box;

}

.MsgSelect{
    min-width: 180px;
    min-height: 120px;
}


#msgsend{ 
    margin: 0px 0px 0px 0px;
    font-size: 18px;
    width:100%;
    border: 1px solid black;
    overflow-y: hidden;
    overflow-x: hidden;
    background-color: #ffffff;
    }


#msg { 
    margin: 0px 0px 0px 0px;
    font-size: 18px;
    width:100%;
    min-height:600px;
    max-height:600px;
    border: 1px solid black;
    background-color: #ffffff;
    overflow-y: scroll;
    overflow-x: hidden;
    }

#msgsent{ 
    margin: 0px 0px 0px 0px;
    font-size: 18px;
    width:100%;
    min-height:600px;
    max-height:600px;
    border: 1px solid black;
    background-color: #ffffff;
    overflow-y: scroll;
    overflow-x: hidden;
    }
