/* 
 * MAIN CSS FILE
 * Contains all styles for the entire application in organized sections
 */

/* -------------------------------------------------------------
 * GLOBAL STYLES
 * Base styles that apply throughout the application
 * ------------------------------------------------------------- */

/* Reset and base styles
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
  
*/
:root {
    --sidebar-width: 15vw;
  }

body {
    font-family: Arial, sans-serif;
    /* line-height: 1.6; */
    color: #333;
    background-color: #f4f4f4;
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;

}

.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    border: 3px solid Yellow;

}

/* MAIN CONTENT WITHOUT SIDE MENU */
.content-container {
    position: relative;
    display: block;
    margin-top: calc(var(--menu-height));
    width: 100%;
    max-width: 100%;
    z-index: 1;
    min-height: calc(100vh - var(--menu-height));
    box-sizing: border-box;
    border: 1px solid yellow;
  }

/* MAIN CONTENT WITH SIDE MENU */
.content-container-sidemenu {
    /* position: relative; */
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
      width: calc(100% - var(--sidebar-width));
    margin-top: calc(var(--menu-height));
    margin-right: var(--sidebar-width);
    max-width: 100%;
    /* z-index: 1; */
    box-sizing: border-box;
    border: 3px solid rgb(255, 0, 183);
    overflow-y: scroll;
}

  /* SIDE MENU START */

.side-menu {
    position: fixed;
    top: calc(var(--menu-height)); /* Adjust this based on your top menu height */
    height: calc(100vh - var(--menu-height) );
    right: 0;
    width: var(--sidebar-width);
    overflow-y: auto; /* Allow vertical scrolling within the menu if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    background: #fff;
    padding: 5px;
    border: 5px solid black;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    z-index: 100; /* Ensure it stays above other content */
  }
  
  /* SIDE MENU END */
 

h1, h2, h3, h4 {
    margin-bottom: 15px;
    color: #333;
}

h1 {
    font-size: 2em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

h2 {
    font-size: 1.7em;
}

h3 {
    font-size: 1.4em;
}

p {
    margin-bottom: 15px;
}

a {
    color: #007bff;
    text-decoration: none;
}

.bold {
    font-weight: bold;
}

.center {
    text-align: center;
  }

.red {
    color: red; 
    }
    
.green {
    color: green; 
    }


        .inline{
            display: inline;
                }
/* button.inline,
.bttn.inline {
  display: inline-block !important;
} */


.btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1em;
}

 .btn:hover {
    background: #0069d9;
}

.bttn {
  /* display: inline !important; */
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  color: #ffffff;
  font-size: 0.9em;
  font-weight:400;
  letter-spacing: 0.75px;
  background: #000096;
  padding: 2px 10px 2px 10px;
  border: solid #030303 2px;
  text-decoration: none;
  margin: 1px 0;
}

.bttn:hover {
  background: #000000;
  text-decoration: none;
}

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

.ViewTable {
    width: 100%;
    border-collapse: collapse;
}



.ViewTable th{
    text-align: left;
    Border-bottom : 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;
    }


/* CUSTOMER PAGE */
.wrapper {
    display: flex;
    flex-direction: row; /* Side-by-side layout */
    flex: 1;
    /* height: 90%; */
    min-height: 0;
       /* max-height: 100%; */
    width: 100%;
    overflow: hidden; /* prevent content from leaking out */

}

.custtable {
    float:left;
    min-width: 663px;
    height:780px;
    margin:0px 5px 0px 0px;
    padding: 5px;
    border: 2px solid blue;

    }
    
    .custtable table{
    min-width:300px;
    border-collapse: collapse;
 
    
    /* border: 1px solid orange; */
    }
    .custtable table td{
    padding:3px;
    border: 0px;

    }

    .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;
      }

        .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;
      
        }
        


                
    



/* CUSTOMER PAGE END */





/* Login container */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 100px auto;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #343a40;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.login-form .form-group input {
    width: 95%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form .form-group input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.login-form .password-info {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 5px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.login-form button:hover {
    background-color: #0069d9;
}

.client-info {
    margin-top: 30px;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    font-size: 0.9em;
    color: #6c757d;
}

.client-info p {
    margin-bottom: 5px;
}

/* Login page animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container {
    animation: fadeIn 0.5s ease-out;
}





/* Animation for dashboard widgets */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.widget {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.widget:nth-child(2) {
    animation-delay: 0.1s;
}

.widget:nth-child(3) {
    animation-delay: 0.2s;
}

/* -------------------------------------------------------------
 * ADMIN PANEL STYLES
 * Styles for the admin user management page
 * ------------------------------------------------------------- */

.admin-content {
    flex-direction: column;
}

/* Admin tabs navigation */
.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.admin-tabs .tab {
    padding: 10px 20px;
    margin-right: 5px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    color: #495057;
    text-decoration: none;
    transition: color 0.3s, background-color 0.3s;
}

.admin-tabs .tab:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6 #dee2e6 #fff;
    text-decoration: none;
}

.admin-tabs .tab.active {
    color: #007bff;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    margin-bottom: -1px;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Admin tables */
.user-table-container, .history-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.user-table, .history-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th, .user-table td,
.history-table th, .history-table td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.user-table th, .history-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.user-table tr:hover, .history-table tr:hover {
    background-color: #f8f9fa;
}

.history-table tr.success {
    background-color: #d4edda;
}

.history-table tr.failure {
    background-color: #f8d7da;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.edit-btn, .delete-btn {
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.edit-btn {
    background-color: #28a745;
    color: white;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.edit-btn:hover {
    background-color: #218838;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* User form */
.user-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.user-form h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-btn {
    background-color: #28a745;
    color: white;
}

.save-btn:hover {
    background-color: #218838;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.permission-info, .password-info {
    display: block;
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 5px;
}

/* Animation for tab transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-content.active {
    animation: fadeIn 0.3s ease-out;
}




.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.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;
}

.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 */
.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;
    }

