/* body {
    padding: 20px;
    background-color: #f5f5f7;
} */

/* Card styling */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: all 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: #0071e3;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 125, 250, 0.1);
}

.search-container::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #86868b;
}

/* Table styling */
.table-container {
    width: 98%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    display: block; /* Needed for proper overflow handling */
}

table {
    width: 100%;
    border-collapse: collapse;
    /*min-width: 800px;  Minimum width to prevent excessive shrinking */
    table-layout: fixed; /* Critical for maintaining exact column widths */
    width: auto !important; /* Let table expand beyond container */
    min-width: 1600px; /* Ensure it fills container when possible */
}

th, td {
    /* padding: 12px 15px; */
    text-align: left;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    vertical-align: middle; /* Ensure content is vertically centered */
    min-width: initial !important; /* Remove any default min-width */
    /*width: auto !important;  Allow columns to use their defined widths */
}

.inputtext {
    text-align: center;
}

.inputtextleft {
    text-align: left;
}

th {
    background-color: #fff3e0;
    color: #1d1d1f;
    font-weight: 600;
    position: sticky;
    top: 0;
}

/* Input field styling */
td input {
    width: 100%;
    /* padding: 10px 20px; */
    vertical-align: middle;
    padding-bottom: 0rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    transition: all 0.2s;
}

td .input-container {
    padding: 0rem; 
    padding-left: 5px; 
    margin: 0rem;
}

td input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 125, 250, 0.1);
}

tr:nth-child(even):hover,
tr:nth-child(odd):hover {
  background-color: #fff8e1;
}

.mini {
    font-size: 12px;
    padding: 3px;
}

.semimini {
    font-size: 13px;
    padding: 8px 5px;
}

/* Column Width Classes */
.col-xxs { width: 60px; }   /* Extra extra small */
.col-xs  { width: 80px; }   /* Extra small */
.col-sm  { width: 120px; }  /* Small */
.col-md  { width: 180px; }  /* Medium */
.col-ld  { width: 200px; }  /* Medium */
.col-lg  { width: 250px; }  /* Large */
.col-xl  { width: 350px; }  /* Extra large */
.col-xxl { width: 450px; }  /* Extra extra large */

/* Percentage-based widths */
.col-10 { width: 10%; }
.col-15 { width: 15%; }
.col-20 { width: 20%; }
.col-25 { width: 25%; }
.col-30 { width: 30%; }
.col-40 { width: 40%; }
.col-50 { width: 50%; }

/* Specifically target your width classes to prevent shrinking */
.col-xxs, .col-xs, .col-sm, 
.col-md, .col-ld, .col-lg, 
.col-xl, .col-xxl {
  min-width: initial !important; /* Remove any min-width constraints */
}

/* Status icons */
.status-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
    font-size: 14px;
    color: #86868b;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

.pagination-button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-button:hover {
    background-color: #f5f5f7;
    border-color: #d2d2d7;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.table-container {
    overflow-x: auto; /* Enables horizontal scroll */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        padding: 15px;
    }
    
    .search-container {
        width: 100%;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .table-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        /* Add momentum scrolling for iOS */
        padding-bottom: 10px; /* Add space for scrollbar */
    }
    
    /* Custom scrollbar for better mobile experience */
    .table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-container::-webkit-scrollbar-thumb {
        background-color: #c0c0c0;
        border-radius: 4px;
    }
    
    .table-container::-webkit-scrollbar-track {
        background-color: #f1f1f1;
        border-radius: 4px;
    }
}

.fa-icon {
    font-size: 16px;
}

/* Hide scrollbar by default on screens > 900px */
@media (min-width: 1600px) {
    .table-container {
        overflow-x: hidden; /* Disables horizontal scroll */
    }
}

/* Show scrollbar only when needed (< 900px) */
@media (max-width: 1500px) {
    .table-container {
        overflow-x: auto; /* Enables horizontal scroll */
    }
}