body {
    font-family: Helvetica, sans-serif;
    scroll-behavior: smooth; /* ✅ Smooth scrolling */
} 
.contmupmain {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px 10px 25px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}
.table-responsive {
    /* overflow-x: auto hata diya taaki desktop par text wrap ho aur scroll na ho */
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.table-responsive::-webkit-scrollbar {
    display: none; 
}
table {
    width: 100%;
    border-collapse: collapse;
}
table th,
table td {
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px; /* Text thoda adjust kiya taaki fit ho sake */
    padding: 12px 10px;
    vertical-align: middle;
    word-break: break-word; /* Text lamba hone par wrap hoga */
}
table th {
    background-color: #f8f8f8;
    color: #555;
    font-weight: bold;
    cursor: pointer;
    position: sticky; /* Header top par sticky rahega */
    top: 0;
    z-index: 10;
    text-align: center;
    /* white-space: nowrap hata diya gaya hai jisse horizontal scroll na ho */
}
table th:hover {
    background-color: #f1f1f1;
}
table th .sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    margin-left: 8px;
    vertical-align: middle;
}
table th.asc .sort-icon {
    border-bottom: 5px solid #007bff;
}
table th.desc .sort-icon {
    border-top: 5px solid #007bff;
}
table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}
table tbody tr:hover {
    background-color: #f5f5f5;
}

/* ========================================================= */
/* --- BADGE ALIGNMENT (TEXT KE SATH) --- */
/* ========================================================= */
.company-name-wrapper {
    display: inline; 
    line-height: 1.5;
}
.company-name-wrapper a {
    text-decoration: underline;
    color: inherit;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;  
    height: 22px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); 
    cursor: pointer; 
    vertical-align: middle; 
    margin-left: 5px; 
    margin-top: -2px; 
}

.badge-upcoming { background-color: #ffc107; color: #000; } 
.badge-open { background-color: #157347; } 
.badge-ct { background-color: #fd7e14; } 
.badge-ap { background-color: #dc3545; } 
.badge-al { background-color: #6f42c1; } 
.badge-lt { background-color: #0dcaf0; color: #000; } 

/* ========================================================= */
/* --- CUSTOM BADGE POPUP / TOOLTIP --- */
/* ========================================================= */
.custom-badge-tooltip {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: max-content;
    max-width: 260px;
    font-family: Helvetica, sans-serif;
    color: #333;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none; 
}
.custom-badge-tooltip.show-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; 
}
.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f5f6f8;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 14px;
}
.tooltip-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #666;
    transition: color 0.2s;
    padding-left: 10px;
}
.tooltip-close:hover {
    color: #000;
}
.tooltip-body {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    word-wrap: break-word;
}
.custom-badge-tooltip::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -7px;
    border-width: 7px 7px 7px 0;
    border-style: solid;
    border-color: transparent #e0e0e0 transparent transparent;
}
.custom-badge-tooltip::after {
    content: "";
    position: absolute;
    top: 16px;
    left: -5px;
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}
.custom-badge-tooltip.arrow-right::before {
    left: auto;
    right: -7px;
    border-width: 7px 0 7px 7px;
    border-color: transparent transparent transparent #e0e0e0;
}
.custom-badge-tooltip.arrow-right::after {
    left: auto;
    right: -5px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent #fff;
}

/* ========================================================= */
/* --- RESPONSIVE ADJUSTMENTS --- */
/* ========================================================= */
@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-container {
        width: 100%;
        margin-top: 10px;
    }
    .search-container input {
        width: calc(100% - 70px);
    }
    .hide-on-mobile {
        display: none;
    }
    .table-responsive {
        overflow-x: auto; /* Mobile par scroll add kar diya hai */
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    .contmupmain {
        width: 100%;
        padding: 25px 5px;
    }
    table th,
    table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    .hide-on-mobile {
        display: none;
    }
}