* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Make the page responsive */
html,
body {
    width: 100%;
    overflow-x: hidden;
    /* prevent right-side overflow */
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    text-align: left;
    padding: 8px;
}

tr:nth-child(even) {
    background-color: #dddcfe;
}

.table-wrapper {
    margin-right: 2%;
    margin: 1%;
    margin-top: 3%;
    width: 96%;
    max-height: 80vh;
    /* limit height to 80% of viewport height */
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
    /* optional border */
}

/* Responsive table */
.table-wrapper table {
    width: 100%;
    /* fit container */
    min-width: unset;
    /* remove forced 1000px width */
}

@media (min-width: 768px) {
    form.flex {
        display: flex;
        align-items: flex-end;
    }
}

/* For smaller screens, stack the form items */
@media (max-width: 768px) {
    form.flex {
        display: flex;
        margin: 3%;
        align-items: flex-start;
        flex-direction: column;
    }

    form.flex label,
    form.flex select {
        margin-left: 2%;
        margin-right: 2%;
        margin-top: 2%;
        margin: 5px 0;
    }
}

/* Horizontal & vertical scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    /* vertical scrollbar width */
    height: 6px;
    /* horizontal scrollbar height */
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #413d65;
}

::-webkit-scrollbar-thumb:hover {
    background: #7575bf;
}


/* From Uiverse.io by felipesntr */
.button-add {
    border: 0px solid #5352bb;
    background-color: #6533d1;
    border-radius: 0.9em;
    cursor: pointer;
    padding: 0.4em 0.8em 0.4em 0.4em;
    transition: all ease-in-out 0.2s;
    font-size: 16px;
}

.button-add span {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
}

/* From Uiverse.io by felipesntr */
.button-add-admin {
    border: 0px solid #5352bb;
    background-color: #6533d1;
    border-radius: 0.9em;
    cursor: pointer;
    padding: 0.4em 0.8em 0.4em 0.4em;
    transition: all ease-in-out 0.2s;
    font-size: 16px;
}

.button-add-admin span {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
}
.button-add-admin:hover{
    background-color: #532aac;
}
button:hover {
    background-color: #9b00ae;
}

button {
    color:white;
    border: 0px solid #886cd4;
    background-color: #c52bd8;
    border-radius: 0.9em;
    cursor: pointer;
    padding: 0.6em 0.9em 0.6em 0.9em;
    transition: all ease-in-out 0.2s;
    font-size: 16px;
}

button span {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
}
/*
button:hover {
    background-color: #7544df;
}
*/
.cancel-btn {
    border: 0px solid #e6d251;
    background-color: #f2d831;
    border-radius: 0.9em;
    cursor: pointer;
    padding: 0.4em 0.8em 0.4em 0.4em;
    transition: all ease-in-out 0.2s;
    font-size: 16px;
}

.cancel-btn span {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
}

.cancel-btn:hover {
    background-color: #dec104;
}

/**DROP DOWN LIST **/
.custom-dropdown {
    position: relative;
    display: inline-block;
    width: 250px;
    font-family: Arial, sans-serif;
}

.dropdown-btn {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
}

.dropdown-btn img {
    border-radius: 4px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px #413d65;
    z-index: 999;
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f0f0f0;
}

select.custom-input {
    border: 1px solid #ccc;
    /* same as dropdown */
    border-radius: 6px;
    /* same radius */
    padding: 8px 10px;
    /* same spacing as .dropdown-item */
    outline: none;
    /* remove default blue outline */
    max-width: 350px;
    /* make it match dropdown width */
    box-sizing: border-box;
    /* prevent padding from breaking width */
}

select.custom-input:focus {
    border-color: #413d65;
    /* highlight on focus */
    box-shadow: 0 2px 8px #f0efff;
}

input.custom-input {
    border: 1px solid #ccc;
    /* same as dropdown */
    border-radius: 6px;
    /* same radius */
    padding: 8px 10px;
    /* same spacing as .dropdown-item */
    outline: none;
    /* remove default blue outline */
    max-width: 350px;
    /* make it match dropdown width */
    box-sizing: border-box;
    /* prevent padding from breaking width */
}

.input-wrapper {
  margin: 1%;    
  display: inline-block;
  max-width: 92%;
  position: relative;
}

textarea.custom-input {
  border: 0.01rem solid #ccc;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  box-sizing: content-box;
  min-width: 60%;
  max-width: 92%;
  width: auto;
  font: inherit;
  display: inline-block;
  overflow: hidden; /* hide horizontal scroll */
  resize: none; /* prevent manual resizing */
  white-space: pre-wrap; /* allow wrapping */
}

.input-mirror {
  position: absolute;
  visibility: hidden;
  height: auto;
  white-space: pre-wrap;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid transparent;
  word-wrap: break-word;
}


/* Optional: add focus style to match dropdown hover */
input.custom-input:focus {
    border-color: #413d65;
    /* highlight on focus */
    box-shadow: 0 2px 8px #f0efff;
}

/* Alternate row colors */
tr:nth-child(even) {
    background-color: #dddcfe;
}


/* Sticky Actions column */
.sticky-col {
    position: sticky;
    right: 0;
    background-color: inherit;
    /* match row background */
    z-index: 3;
    text-align: center;
    /* optional: center the Edit/Delete links */
    padding: 10px;
    /* match table cells */
}

/* Optional: subtle separator shadow */
.sticky-col::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;

    height: 100%;
    background: #ccc;
    /* subtle line instead of heavy shadow */
    z-index: 4;
}

table th,
table td {
    white-space: nowrap;
    /* Prevent text wrapping */
}

td.sticky-col a {
    display: inline-block;
    margin-right: 4px;
    /* optional spacing control */
}


/*----------------------------toggle button---------------------------------*/
/* Container */
.switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 10px 15px 10px 0;
    font-family: Arial, sans-serif;
}

/* Hide the default checkbox */
.switch input {
    display: none;
}

/* Track */
.slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 9999px;
    transition: background 0.3s;
}

/* Knob */
.slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Checked state */
.switch input:checked+.slider {
    background: #7c3aed;
    /* purple */
}

.switch input:checked+.slider::after {
    transform: translateX(20px);
}

/* Label text */
.label-text {
    margin-left: 8px;
    font-size: 14px;
    color: #333;
}