:root {
    --column-width-1: 1%;
    --column-width-2: 10%;
    --column-width-3: 5%;
    --column-width-4: 28%;
    --column-width-5: 1%;
    --column-width-6: 10%;
    --column-width-7: 10%;
    --column-width-8: 5%;
    --column-width-9: 19%;
    --column-width-10: 5%;
    --column-width-11: 1%;
    --primary-color:  #4a90e2;
    --primary-color-dark:rgb(43, 87, 138);
    --danger-color:rgb(202, 227, 255);
    --light-color: #f9f9f9;
    --dark-color: #333333;
    --border-color: #ddd;
    --background-color: #f2f2f2;
    --font-family: 'Arial', sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--dark-color);
    height: 100%;
    margin: 0;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
}


/* Table */


.table-container {
    display: block;
    
}

#recordsTable {
    overflow: visible !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
thead {
    position: sticky;
    top: 0;
    background-color: white; /* To prevent transparency issues */
    z-index: 10; /* Ensure it stays above other content */
    border-bottom: 1px solid var(--dark-color);
}

th, td {
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    text-align: left;
    font-size: 14px;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

#recordsTable thead tr th {
    border-top: none !important;
    
    
}

tbody tr {
    transition: background-color 0.2s ease-in-out;
}

tbody tr:nth-child(even) {
    background-color: var(--light-color);
}

tbody tr:hover {
    background-color: rgba(59, 125, 201, 0.1);
}


/* Column width control */

td:nth-child(1) {
    width: var(--column-width-1);
}


td:nth-child(2) {
    width: var(--column-width-2);
}


td:nth-child(3) {
    width: var(--column-width-3);
    white-space: nowrap;
}


td:nth-child(4) {
    width: var(--column-width-4);
}


td:nth-child(5) {
    width: var(--column-width-5);
}


td:nth-child(6) {
    width: var(--column-width-6);
    white-space: nowrap;
}


td:nth-child(7) {
    width: var(--column-width-7);
}


td:nth-child(8) {
    width: var(--column-width-8);
    white-space: nowrap;
}


td:nth-child(9) {
    width: var(--column-width-9);
}


td:nth-child(10) {
    width: var(--column-width-10);
}


td:nth-child(11) {
    width: var(--column-width-11);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #357ab7;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #cc0000;
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    line-height: 1.6;
  font-weight: 600;
  padding: 10px 20px;

}

.wb-svg-icon:hover .wb-svg-stroke {
    stroke: white;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
}

.tab {
    padding: 3px 15px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark-color);
    transition: background-color 0.2s ease-in-out;
}

.tab:hover {
    background-color: rgba(59, 125, 201, 0.1);
}

.tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 5px 0;
}

.pagination .btn {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark-color);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.pagination .btn:hover {
    background-color: rgba(59, 125, 201, 0.1);
}

.pagination .btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Modals */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-group {
    flex: 1 1 calc(50% - 16px); /* Two columns with space between */
}

.form-actions {
    
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
    
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}









.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 90%; 
    width: 800px; /* Default width */
    box-sizing: border-box; 
    overflow: hidden; 
    border-radius: 5px;
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal h2 {
    margin-top: 0;
    font-size: 18px;
    color: var(--dark-color);
}



.modal form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal form input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.modal form button {
    width: 100%;
}

.modal .btn {
    margin: 0 5px;
}




.modal form {
    display: flex;
    flex-direction: column; /* Stack form elements */
    gap: 10px; /* Add space between elements */
}

.modal input {
    width: 100%; /* Make input take full width of its container */
    padding: 8px; /* Inner padding for better UX */
    border: 1px solid #ccc;
    border-radius: 4px; /* Optional: Add rounded corners */
    box-sizing: border-box; /* Prevent padding from adding to width */
}

.modal button {
    align-self: flex-start; /* Align buttons to the left */
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.modal button:hover {
    background-color:var(--primary-color-dark);
}

/* Records Info */
.records-info {
    text-align: center;
    font-size: 14px;
    color: var(--dark-color);
}

@media (max-width: 768px) {
    th, td {
        font-size: 12px;
        padding: 3px 8px;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }

    .btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}



/* upload / expot / import */

/* Base container styling for .controls */
.controls {
    padding: 16px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
}

/* Style the headings */
.controls p {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    margin: 0;
}

/* Hide the default file input */
.controls input[type="file"] {
    display: none;
}

/* Style the custom file input button */
.controls form input[type="file"] + label {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
    background-color: var(--primary-color);
    color: white;
    line-height: 1;
}

/* Hover effect for custom file input button */
.controls form input[type="file"] + label:hover {
    background-color: var(--primary-color-dark);
}

/* Style for submit buttons */
.controls form input[type="submit"] {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
    background-color: var(--primary-color);
    color: white;
    margin-top: 8px;
}

/* Hover effect for submit buttons */
.controls form input[type="submit"]:hover {
    background-color: var(--primary-color-dark);
}

/* Add spacing between the forms */
.controls form {
    margin-bottom: 16px;
}

/* Accessibility focus effect */
.controls form input[type="file"]:focus + label,
.controls form input[type="submit"]:focus {
    outline: 2px solid var(--primary-color-light);
    outline-offset: 2px;
}

























/* -- USER CONTROLLS */
.user-controls {
    padding: 10px;
    font-size: 14px;

}

.user-controls form button {
    display: inline-block;
    padding: 4px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
    background-color: var(--primary-color);
    color: white;
}

.user-controls form button:hover {
    background-color: var(--primary-color-dark);
}

.user-form {
    max-width: 400px;
    margin: 20px 0;
}

.success {
    color: green;
    margin: 10px 0;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 4px;
}

.error {
    color: red;
    margin: 10px 0;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
}
