:root {
    --primary-purple: #5c4fff;
    --sidebar-bg: #fff;
    --main-bg: #f2f5f9;
    --card-bg: #fff;
    --card-hover: #f9f9fb;
    --text-dark: #4b4a54;
    --text-light: #6b6b83;
    --border-radius: 12px;
    --font-family: 'Segoe UI', Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.highlight {
    background-color: #ffff99 !important;
    color: #4b4a54 !important;
}

.simplebar-placeholder,
.table .simplebar-track.simplebar-horizontal {
    height: 0 !important;
}

body {
    font-family: var(--font-family);
    background: var(--main-bg);
    color: var(--text-dark);
}

#table-container-mobile {
    margin: 15px 0;
    height: calc(100vh - 206px);
    border-top: 1px solid #585858;
    border-bottom: 1px solid #585858;
}

#table-container-mobile .mobile-row-item {
    display: flex;
    align-items: center;
}

#table-container-mobile .mobile-row-item:not(:last-child) {
    border-bottom: 1px solid #dadada;
}

#table-container-mobile .mobile-row-item .mobile-col-name,
#table-container-mobile .mobile-row-item .mobile-col-value {
    width: 50%;
    padding: 10px;
    flex: 0 0 50%;
}

#table-container-mobile .mobile-row {
    border-left: 1px solid #585858;
    border-right: 1px solid #585858;
}

#table-container-mobile .mobile-row:nth-child(odd) .mobile-row-item {
    background-color: #e0e0e0;
}

#table-container-mobile .mobile-row:nth-child(odd) .mobile-row-item:not(:last-child){
    border-bottom: 1px solid #bcbcbc;
}

#table-container-mobile .mobile-row:not(:last-child) {
    border-bottom: 1px solid #585858;
}

body {
    height: 100vh;
    position: relative;
}

.main-content {
    position: absolute;
    top: 74px;
    height: calc(100vh - 118px);
    left: 250px;
    padding: 20px;
    box-sizing: border-box;
    width: calc(100% - 250px);
}

.main-content.user {
    height: calc(100vh - 138px);
}

.custom-alert {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 20px;
    top: 10px;
    width: 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 20px;
}

.custom-alert-content {
    position: relative;
}

.custom-alert p {
    margin: 0;
    padding: 10px 0;
    font-size: 16px;
}

.custom-alert-close {
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.actions .search-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.actions .search-container > img {
    width: 32px;
    height: 32px;
}

.actions .search-container .text {
    font-size: 15px;
    line-height: 1.2;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-alert.success {
    border-left: 5px solid #28a745;
}

.custom-alert.error {
    border-left: 5px solid #dc3545;
}

.filter-modal {
    position: fixed;
    inset: 0;
    background-color: rgb(3 3 3 / 18%);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    z-index: -1;
    pointer-events: none;
}

.filter-modal.on {
    transform: scale(1);
    z-index: 999;
    pointer-events: all;
}

.filter-modal .filter-container {
    width: 500px;
    /* height: 600px; */
    padding: 20px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.filter-modal .filter-container .filter-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.filter-modal .filter-container .close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.filter-modal .filter-container .close > span:nth-child(1) {
    position: absolute;
    top: calc(50% - 1px);
    left: 0;
    height: 2px;
    background-color: #4b4a54;
    width: 100%;
    transform: rotate(45deg);
}

.filter-modal .filter-container .close > span:nth-child(2) {
    position: absolute;
    top: calc(50% - 1px);
    left: 0;
    height: 2px;
    background-color: #4b4a54;
    width: 100%;
    transform: rotate(-45deg);
}



.filter-modal .filter-container .filter-item > label {
    font-size: 18px;
    line-height: 1.2;
    color: #151515;
    cursor: pointer;
}

.btn-filter {
    padding: 8px 18px;
    border-radius: 5px;
    background-color: rgb(88 90 138 / 82%);
    color: #fff;
    cursor: pointer;
}

.filter-modal .filter-container .filter-item select,
.filter-modal .filter-container .filter-item input[type="text"] {
    height: 35px;
    border: 1px solid #ababab;
    border-radius: 6px;
    color: #151515;
    padding: 4px 10px;
}

.invalid {
    border: 1px solid #ff1717 !important;
    background-color: #ff9292 !important;
}

.error-msg {
    font-size: 14px;
    line-height: 1.2;
    color: #fa1718;
}

.body-footer {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-select .text-wrapper .text-display {
    color: #4b4a54;
    font-size: 16px;
}

.pagination a {
    padding: 5px;
    width: 37px;
    font-size: 18px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b59b62;
    border-radius: 5px;
    color: #f7f7f9;
}

.pagination .items-count,
.pagination .dots {
    font-size: 16px;
}

.body-footer .button-container {
    display: flex;
    gap: 20px;
}

.body-footer .button-container > * {
    padding: 8px 18px;
    border-radius: 5px;
    background-color: #b59b62;
    color: #fff;
}

.tbody .left-side .simplebar-track.simplebar-vertical {
    width: 0;
}

#table-container {
    margin: 20px 0;
    height: calc(100vh - 270px);
}

#table-container .table,
#table-container .table .tbody .tbody-wrapper {
    height: 100%;
}

#table-container .table .tbody {
    height: calc(100% - 44px);
}

a {
    text-decoration: none;
    color: inherit;
}

.sidebar ul {
    margin: 0;
    list-style: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 6px;
}

.sidebar ul .item .text a {
    color: #fff;
    font-size: 16px;
}

.custom-select {
    width: 100%;
    position: absolute;
    inset: 0;
    display: none;
}

.custom-select .text-wrapper {
    width: 100%;
    outline: 0;
    border: 1px solid #ddd;
    background-color: #c8c8c8;
    border-radius: 6px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select .text-wrapper .chevron {
    width: 12px;
    flex: 0 0 12px;
    height: 12px;
    position: relative;
}

.custom-select .dropdown:not([data-simplebar]) {
    overflow: hidden;
}

.custom-select .dropdown {
    position: absolute;
    height: 250px;
    top: calc(100% - 3px);
    width: 100%;
    left: 0;
    z-index: 10;
    max-height: 0;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.custom-select.open .dropdown {
    max-height: 1000px;
    transition: max-height 1s ease-in-out;
}

.custom-select.open .dropdown .item {
    opacity: 1;
    z-index: 10;
    pointer-events: all;
}

.custom-select.on .text-wrapper {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select.on .dropdown {
    max-height: 250px;
    transition: max-height 1s ease-in-out;
}

.custom-select.on .text-wrapper .chevron::before {
    left: 6px;
}

.custom-select.on .text-wrapper .chevron::after {
    left: calc(50% - 4px);
}

.hide {
    display: none;
}

input[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

.custom-select .dropdown .dropdown-wrapper {
    background-color: #c8c8c8;
    padding: 5px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.custom-select .dropdown .dropdown-wrapper .item {
    cursor: pointer;
    position: relative;
    color: #4b4a54;
    font-size: 16px;
}

.custom-select .dropdown .dropdown-wrapper .item:hover,
.custom-select .dropdown .dropdown-wrapper .item.active {
    padding-left: 10px;
}

.custom-select .dropdown .dropdown-wrapper .item:hover::after,
.custom-select .dropdown .dropdown-wrapper .item.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -2px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #4b4a54;
    border-radius: 6px;
}

.custom-select .text-wrapper .chevron::before {
    content: "";
    position: absolute;
    left: 1px;
    top: calc(50% - .5px);
    height: 1px;
    width: 50%;
    background-color: #4b4a54;
    transform: rotate(45deg);
}

.custom-select .text-wrapper .chevron::after {
    content: "";
    position: absolute;
    left: calc(50% - 1px);
    top: calc(50% - .5px);
    height: 1px;
    width: 50%;
    background-color: #4b4a54;
    transform: rotate(-45deg);
}

/* DatePicker */

.calendar-overlay.off {
    display: none;
}
.calendar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
  }
  
  /* το panel */
  .calendar-panel {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    width: 300px;
  }
  
  /* υπόλοιπο styling calendar */
  .calendar-panel .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .calendar-panel .header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
  }
  .calendar-panel table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
  }
  .calendar-panel th {
    font-size: 12px;
    padding: 4px;
  }
  .calendar-panel td {
    width: 14%;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
  }
  .calendar-panel td:hover {
    background: #eee;
  }
  .calendar-panel .selected {
    background: #127b81;
    color: #fff;
  }

  /* προσθήκη CSS */
  .time-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
  }
  .time-segment {
    display: flex;
    align-items: center;
  }
  .time-segment .box {
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 24px;
    border-radius: 6px;
    margin: 0 4px;
    background: #f0f0f0;
    cursor: pointer;
  }
  .time-segment .box.active {
    background: #d5b8ff;
    color: #5d00d4;
  }
  
  input[readonly] {
    opacity: 0.7;
    pointer-events: none;
  }
  .am-pm {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 8px;
  }
  .am-pm div {
    padding: 6px;
    text-align: center;
    cursor: pointer;
  }
  .am-pm .active {
    background: #d5b8ff;
    color: #5d00d4;
  }

  /* Buttons */
  .calendar-actions {
    text-align: right;
    margin-top: 12px;
  }
  .calendar-actions button {
    padding: 6px 12px;
    margin-left: 8px;
    cursor: pointer;
  }
  
  

@media screen and (max-width: 1020px) {
    .main-content {
        top: 45px;
        height: calc(100vh - 85px);
        left: 180px;
        width: calc(100% - 180px);
        padding: 10px;
    }

    .actions .search-container > img {
        width: 22px;
        height: 22px;
    }

    .actions .search-container .text {
        font-size: 13px;
    }

    #table-container {
        margin: 15px 0;
        height: calc(100vh - 206px);
    }

    .body-footer .button-container > * {
        font-size: 13px;
    }
}

#table-container {
    display: block;
}

#table-container-mobile {
    display: none;
}
@media screen and (max-width: 860px) {
    #table-container {
        display: none;
    }

    #table-container-mobile {
        display: block;
    }
}

@media screen and (max-width: 820px) {
    .actions {
        flex-direction: column-reverse;
        gap: 10px;
        align-items: start;    
    }

    #table-container-mobile {
        height: calc(100vh - 238px);
    }

    #table-container-mobile .mobile-row-item .mobile-col-name, #table-container-mobile .mobile-row-item .mobile-col-value {
        width: 50%;
        padding: 7px;
        flex: 0 0 50%;
        font-size: 14px;
    }

    .sidebar ul .item .text a {
        font-size: 14px;
    }
}

@media screen and (max-width: 640px) {
    .main-content {
        left: 0;
        width: calc(100% - 0px);
    }
}

@media screen and (max-width: 432px) {
    #table-container-mobile {
        height: calc(100vh - 258px);
    }
}

.switch-wrapper {
    display: flex;
    gap: 6px;
  }
  
  .switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
  
  .switch input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
  }
  
  .switch .slider {
    position: relative;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: 0.4s;
  }
  
  .switch .slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
  }
  
  .switch input:checked + .slider::before {
    transform: translateX(24px);
  }
  
  .switch input:checked + .slider {
    background-color: #4CAF50;
  }
  
  .switch-label {
    font-weight: bold;
  }