/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --box-shadow: 0 4px 20px rgb(189 189 189 / 4%);
    --primary-font-family: 'Montserrat', sans-serif;

    /* Global Colors */
    --secondary-color: #113935;   /* replaces #800020 */
    --primary-color : #C08964; /* replaces #1F1F23 */
    --text-color: #333;
    --background-light: #f4f4f4;
    --white: #ffffff;
    --hover-dark: #0d2c29; /* darker variant of primary */
}


body, h1,h2,h3,h4,h5,h6,p,a,strong,input,button {
    font-family: var(--primary-font-family);
}

a.download-btn { background:var( --primary-color); color: #fff; padding: 6px 10px; border-radius: 6px; text-decoration: none; display: inline-block; }
body {
    background: var(--background-light);
    color: var(--text-color);
    line-height: 1.6;
}

input {
    outline: none;
}
button {
    font-family: var(--primary-font-family);
}

/* Header Base */
.top-header {
    background: var(--secondary-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #ffffff26;
    position: sticky;
    top: 0;
    z-index: 999999999;
}

/* Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-text h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.header-text span {
    font-size: 14px;
    color: #aaa;
}

/* Right Section (icons) */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right a {
    color: var(--white);
    font-size: 18px;
    transition: color 0.3s;
}

/* Form Pages */
.form-box {
    width: 800px;
    margin: 50px auto;
    padding: 50px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}
.form-actions {
    margin-top: 15px;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0px;
}
.form-box h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.form-box label {
    font-weight: 400;
    display: block;
    margin: 10px 0 5px;
}

.form-box input[type="text"],
.form-box input[type="number"],
.form-box input[type="file"],
.form-box input[type="date"],
.form-box input[type="email"],
.form-box input[type="password"],
.form-box select,
.form-box textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.form-box button {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
}

.form-box button:hover {
    background: var(--hover-dark);
}

.error {
    color: red;
    margin: 10px 0;
}

.success {
    color: green;
    margin: 10px 0;
}

.main-content {
    margin-left: 250px;
    padding: 40px;
    transition: margin-left 0.3s;
}

.sidebar {
    width: 220px;
    background: var(--secondary-color);
    color: var(--white);
    height: 100vh;
    transition: width 0.3s;
    overflow: hidden;
    position: fixed;
    padding-top: 30px;
    z-index:99999999999;
}

/* expanded */
.sidebar.expanded {
    width: 70px !important;
}
selector {
    width: 50px;
    height: 50px;
    align-items: center;
    display: flex;
    flex-direction: column;
    align-content: center;
}

.toggle-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.sidebar .toggle-btn {
    display: none !important;
}
.logodiv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.sidebar .menu {
    list-style: none;
    padding: 0;
}
.sidebar .menu li {
    margin: 10px 0;
    transition: all 0.4s linear;
}
.sidebar .menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
    padding: 12px 20px;
    text-decoration: none;
    transition: background 0.3s;
}
.sidebar .menu a:hover {
   background: var(--primary-color) !important;
}
.sidebar .menu a.active {
    background: var(--primary-color) !important;
}
.sidebar .menu i {
    min-width: 20px;
    text-align: center;
}
.sidebar .menu .label {
    transition: all 0.4s ease;
    transition-delay: 0.2s;
    opacity: 1;
    transform: translateX(0%) !important;
}
.sidebar.expanded .menu .label {
    opacity: 0;
    transition-delay: 0s !important;
    transform: translateX(100%) !important;
}
.sidebar.expanded ~ .main-content {
    margin-left: 60px;
}
li.logout-btn {
    padding: 0px 20px;
}
.sidebar.expanded .logout-btn a {
    padding: 12px 0px;
}

/* Dashboard Boxes */
.dashboard-boxes {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
    grid-template-columns: repeat(3, 1fr);
}

.box {
    flex: 1;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
    padding-block: 50px !important;
}

.box h3 {
    color: var(--primary-color);
    margin: 0 0 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: var(--primary-color);
    color: var(--white);
}

tr:hover {
    background: #f9f9f9;
}

/* Logout */
.logout {
    margin-top: 20px;
    display: block;
    background: #a00028;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.logout:hover {
    background: #c00030;
}

.margin-bottom {
    margin-bottom: 20px;
    text-transform: capitalize;
}

.form-title {
    background: #e7e7e796;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
}

img {
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}
.logout-btn:hover {
    color: var(--white);
}

.select2-container .select2-selection--single {
    height: 50px;
    align-items: center;
    display: flex;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    order: 1 !important;
}


.select2-container--default .select2-selection--single{
    
    height: 50px !important;
    display:flex !important;
}


.select2-selection__clear {
    order: 2 !important;
}

.main-content.margin_0 {
    margin: auto !important;
}

.download_btn {
    color: var(--white);
    background: var(--primary-color);
    border-radius: 5px;
    padding: 8px;
    text-decoration: none;
    transition: background 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}
.download_btn:hover {
    background: var(--hover-dark);
}

table.dataTable th.dt-type-numeric,
table.dataTable th.dt-type-date,
table.dataTable td.dt-type-numeric,
table.dataTable td.dt-type-date {
    text-align: left !important;
}

.display.dataTable {
    width: 100% !important;
    margin-top: 0 !important;
}

.dt-length label {
    text-transform: capitalize !important;
}

.select2-container--default .select2-selection--single {
    border-color: #aaaaaa52 !important;
}

td {
    padding: 14px !important;
}

#usersTable_wrapper > :first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}



.sidebar {
    width: 220px;
    background: var(--secondary-color);
    color: var(--white);
    height: 100vh;
    transition: width 0.3s;
    overflow: hidden;
    position: fixed;
    padding-top: 30px;
}


.sidebar.expanded {
    width: 70px !important;
}








/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablets and small laptops (max-width: 1024px) */
@media (max-width: 1024px) {

  .dashboard-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-box {
    width: 90%;
    padding: 30px;
  }

  .main-content {
    margin-left: 200px;
    padding: 20px;
  }

  .sidebar {
    width: 200px;
  }
}

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {

  /* Header adjustments */
 .header-text{display: none !important;}
.top-header{padding: 17px 12px;}
  table {
   overflow: scroll !important;
  }

 

  .header-right {
    width: 100%;
    justify-content: flex-end;
  }

  /* Sidebar collapses */
  



  /* Adjust main content */
  .main-content {
    margin-left: 0;
    padding: 20px;
  }

  /* Dashboard grid becomes single column */
  .dashboard-boxes {
    grid-template-columns: 1fr;
  }

  /* Form width */
  .form-box {
    width: 95%;
    padding: 25px;
  }
  .form-row{
    flex-direction: column;
  }
.dt-layout-cell.dt-end,
.dt-layout-cell.dt-start,
div.dt-container div.dt-layout-cell.dt-end {
       
    text-align: left !important;
}
  /* Table adjustments */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
#usersTable_wrapper > :first-child{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap:10px;
}
  /* Sidebar menu */
  .sidebar .menu a {
    padding: 10px 15px;
  }
  .sidebar {
      z-index: 9999999;
  }

  /* Make toggle button visible on header for mobile */
  .toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
  }

  /* Logout spacing fix */
  .logout-btn {
    padding: 10px 15px;
  }

  .sidebar.expanded ~ .main-content {
    margin-left: 0px;
}
.sidebar.expanded{width: 220px !important;}
.sidebar.expanded .menu .label

 {
    opacity: 1;
    transition-delay: 0s !important;
    transform: translateX(0) !important;
}
}




@media screen and (max-width: 640px) {
    .dt-container .dt-length,.dt-container .dt-search{
        text-align: left !important;
    }

}





/* Extra small screens (max-width: 480px) */
@media (max-width: 480px) {

  h1, h2, h3 {
    font-size: 18px;
  }

  .form-box {
    padding: 20px;
  }

  .form-box input,
  .form-box select,
  .form-box textarea,
  .form-box button {
    font-size: 14px;
    padding: 12px;
  }

  .dashboard-boxes {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .top-header {
    padding: 8px 12px;
  }

  .header-text h1 {
    font-size: 16px;
  }

  .header-text span {
    font-size: 12px;
  }

  .sidebar {
    width: 0px;
  }

  .sidebar.active {
    left: 0;
  }

  .logout-btn {
    gap: 10px;
  }
}












