/* SEARCH BAR */
.tims-search{
  margin-bottom:16px;
}

.tims-search-input{
  width:100%;
  max-width:420px;
}

.tims-list-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}

.tims-table-wrap{
  width:100%;
  overflow-x:auto;
}

.tims-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
}

.tims-table th,
.tims-table td{
  padding:12px;
  border-bottom:1px solid #e5e7eb;
  text-align:left;
  vertical-align:middle;
  white-space:nowrap;
  font-size:14px;
}

.tims-table th{
  background:#f9fafb;
  font-size:13px;
  font-weight:700;
}

.tims-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:600;
}

.tims-status::before{
  content:'';
  width:8px;
  height:8px;
  border-radius:50%;
  background:#16a34a;
}

.tims-status--inactive::before{
  background:#dc2626;
}

.tims-actions-cell{
  white-space:nowrap;
}


/* CSS for Pagination and search box start */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
  }

  .container {
    max-width: 1200px;
    margin: auto;
    background: #fff;
    padding: 20px 0px;
    border-radius: 10px;
  }

  h2 {
    margin-bottom: 20px;
  }

  .search-box {
    margin-bottom: 20px;
  }

  .search-box form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .search-box input {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }

  .search-box button {
    padding: 10px 20px;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
  }

  /* Table */

  .tims-table-wrap {
    overflow-x: auto;
  }

  table {
    width: 100%;
    border-collapse: collapse;
  }

  table th,
  table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
  }

  table th {
    background: #333 !important;
    color: #fff;
  }



  /* Mobile Responsive */

  @media(max-width:768px) {

    table,
    thead,
    tbody,
    th,
    td,
    tr {
      display: block;
      width: 100%;
    }

    thead {
      display: none;
    }

    tr {
      background: #fff;
      margin-bottom: 15px;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 10px;
    }

    td {
      border: none;
      padding-left: 50%;
      position: relative;
      min-height: 40px;
    }

    td:before {
      /*        position:absolute;*/
      top: 12px;
      left: 10px;
      width: 45%;
      font-weight: bold;
    }

    td:nth-of-type(1):before {
      content: "Name";
    }
  
   
  }

  /* Pagination */

  .pagination {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pagination a {
    padding: 10px 15px;
    text-decoration: none;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 5px;
  }

  .pagination a.active {
    background: #333;
    color: #fff;
    border-color: #333;
  }

  .no-data {
    text-align: center;
    padding: 20px;
  }


/************************************* */
.tims-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
  }

  .tims-btn:hover {
    background: #f3f4f6;
  }

  .tims-btn:active {
    transform: translateY(1px);
  }

  .tims-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
  }

  .tims-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
  }

  .tims-btn--secondary {
    background: #fff;
    color: #111827;
    border-color: #94a3b8;
  }

  .tims-btn--secondary:hover {
    background: #f8fafc;
  }

  /* Give header action buttons some space from the right edge */
  .tims-list-head .tims-btn { margin-right: 12px; }

  /* Search button sizing */
  .tims-search button.tims-btn {
    height: 38px;
  }

  /* Table wrapper responsive */
  .tims-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Header and search responsive */
  @media (max-width: 768px) {
    .tims-list-head {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }

    .tims-search form {
      flex-direction: column;
      width: 100%;
      gap: 8px;
    }

    .tims-search input[type="search"],
    .tims-search button.tims-btn {
      width: 100%;
    }

    /* remove right margin on small screens so layout stacks cleanly */
    .tims-list-head .tims-btn { margin-right: 0; }

    .tims-actions-cell .tims-btn {
      width: auto;
    }

    .tims-table thead {
      display: table-header-group;
    }

    .tims-table td,
    .tims-table th {
      white-space: nowrap;
    }
  }
/* CSS for Pagination END */



/* MOBILE */
@media(max-width:700px){
   .tims-search-input{
    max-width:100%;
  }

  .tims-list-head{
    flex-direction:column;
    align-items:stretch;
  }

  .tims-list-head .tims-btn{
    width:100%;
    text-align:center;
  }

  .tims-table th,
  .tims-table td{
    padding:10px 8px;
    font-size:13px;
  }

  .tims-hide-sm{
    display:none;
  }

  .tims-actions-cell .tims-btn{
    padding:8px 12px;
    font-size:12px;
  }

   .tims-table thead{
      display:none;
    }
}

@media(max-width:480px){
  .tims-hide-xs{
    display:none;
  }
}