body {
  font-family: Helvetica, sans-serif;
  scroll-behavior: smooth; /* ✅ Smooth scrolling */
  padding-left:0;
  padding-right:0;
}

.contmsubmain {
    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 --- */
/* ========================================================= */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

table th,
table td {
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size:16px;
}

table th {
    background-color: #f8f8f8;
    color: #555;
    font-weight: bold;
    cursor: pointer;
    position: sticky; /* Wapas Sticky Header lagaya gaya hai */
    top: 0;
    z-index: 10;
    text-align: center;
    height:50px;
    white-space:nowrap;
}

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;
}

/* ========================================================= */
/* --- COMPANY NAME & ROUND STATUS BADGE --- */
/* ========================================================= */
.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;
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 18px;
    }
    .contmsubmain {
        width:100%;
        padding: 25px 5px;
    }
    table{
        min-width:320px !important;
    }
    table th,
    table td {
        padding: 10px 8px;
        font-size: 10px;
    }
    .hide-on-mobile {
        display: none;
    }
}
@media (max-width: 375px) {
    .contmupmain {
        padding: 10px 5px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow: hidden;
    }

    .contmupmain .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: 0;
        margin-right: 0;
    }

    .contmupmain table th, 
    table td {
        padding: 6px 3px !important; 
        font-size: 13px !important;
        white-space: normal !important; 
        word-wrap: break-word; 
    }

    .contmupmain table td:first-child,
    table th:first-child {
        text-align: left !important;
        padding-left: 5px !important;
    }

    .contmupmain table {
        table-layout: fixed;
        width: 100%;
        min-width: 100%;
    }

    .contmupmain h1 {
        font-size: 18px !important;
        margin-bottom: 12px;
        padding: 0 5px;
    }
}