.stat-card {
    display: flex;
    padding: 12px;
    justify-content: space-between;
    align-items: center;
    flex: 1 0 0;
    border-radius: 8px;
    border: 1px solid #F1F1F2;
    background: #FFF;
}

.stat-frame {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    width: 100%;
}

.stat-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.icon-style {
    width: 16px;
    height: 16px;
    padding: 0.827px 1.147px 0.78px 1.333px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.icon-outer {
    display: flex;
    padding: 12px;
    justify-content: center;
    align-items: center;
    gap: 10px;

    border-radius: 50px;
    background: #ECF8FF;

    width: 40px;
    height: 40px;
    flex-shrink: 0;
}


.stat-label {
    color: #A1A5B7;
    font-family: Inter, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 12px;
}

.stat-value {
    color: #181C32;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 14px;
}

.stats-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
}


td.status-cell {
    padding-left: 1rem;
    text-align: left;
    vertical-align: middle;
}


.status-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    width: fit-content;
}

.status-pill[data-status="pending"] {
    background-color: #FFF8DD;
    color: #FFA800;
}

.status-pill[data-status="approved"] {
    background-color: #E8FFF3;
    color: #50CD89;
}

.status-pill[data-status="rejected"] {
    background-color: #FFF5F8;
    color: #F1416C;
}

.checkbox-cell {
    padding-left: 1rem !important;
    width: 50px !important;
}

.checkbox-cell .form-check-input {
    margin: 0;
}

.edit-timesheet-btn {
    border: none;
    cursor: pointer;
    border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.custom-modal {
    display: flex !important;
    width: 900px;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 16px;
    background: #FFF;
    box-shadow: 0px 8px 16px 0px rgba(54, 54, 54, 0.10);
}

.custom-modal .modal-content {
    border-radius: 16px;
}

.custom-toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: stretch;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #D0D5DD;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    border: none;
    background-color: transparent;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Crect x='0.75' y='0.75' width='14.5' height='14.5' rx='1.25' fill='%230095E8' stroke='%230095E8' stroke-width='1.5'/%3E%3Cpath d='M12 5L6.5 11L4 8.27273' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.timesheet-badge {
    width: fit-content;
    margin-top: 2px;
}

.timesheet-description {
    color: #4B5675 !important;
}

/* Timesheet table scrolling improvements */
.table-responsive table {
  min-width: 1000px; /* Ensure table triggers horizontal scroll on smaller screens */
}

/* Better horizontal scrolling for timesheet tables */
.table-responsive {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ddd #f9f9f9;
}

/* Custom scrollbar for webkit browsers */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f9f9f9;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Action buttons styling - no sticky positioning */
.table-responsive table td:last-child .d-flex {
  min-width: 80px; /* Ensure minimum width for action buttons */
  justify-content: flex-end;
}

/* Description column styling with 4-line limit */
.description-container {
  position: relative;
  max-width: 300px; /* Prevent description column from becoming too wide */
}

.description-text {
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: max-height 0.3s ease;
  font-size: 13px;
}

.description-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 5.6em; /* 4 lines × 1.4 line-height */
}

.description-text.expanded {
  display: block;
  max-height: none;
  overflow: visible;
}

/* Fallback for browsers that don't support -webkit-line-clamp */
@supports not (-webkit-line-clamp: 4) {
  .description-text.collapsed {
    display: block;
    max-height: 5.6em;
    overflow: hidden;
    position: relative;
  }

  .description-text.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 1.4em;
    background: linear-gradient(to right, transparent, white 50%);
  }
}

.description-toggle-btn {
  padding: 2px 0 !important;
  font-size: 12px !important;
  text-decoration: none !important;
  color: #3E97FF !important;
  border: none !important;
  background: none !important;
  margin-top: 4px;
  line-height: 1.2;
  display: none; /* Hidden by default, JavaScript will show if needed */
  text-align: left;
  box-shadow: none !important;
}

.description-toggle-btn:hover {
  text-decoration: underline !important;
  color: #2F80ED !important;
  background: none !important;
  box-shadow: none !important;
}

.description-toggle-btn:focus {
  outline: 2px solid #3E97FF;
  outline-offset: 1px;
  background: none !important;
  box-shadow: none !important;
}

/* Ensure combined task & description column doesn't break table layout */
.timesheet-table table td:nth-child(4) {
  max-width: 300px;
  word-wrap: break-word;
  vertical-align: top;
  padding-top: 12px;
  padding-bottom: 12px;
}