small.text-muted {
    font-size: 12px;
}

/* Task subtasks toggle arrow: right (closed) -> down (open) */
.dropdown-icon i{display:inline-block;transition:transform .15s ease}
.dropdown-icon[aria-expanded="true"] i{transform:rotate(90deg)}

.border-end {
    border-right: 1px solid #eaeaea !important;
}

/* Fix Quill bold overridden by theme */
.ql-editor strong,
.ql-editor b {
    font-weight: 700 !important;
}

.truncate-2 {
    max-width: 280px;
    /* adjust per column */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.truncate-hover {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-link {
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.comment-text {
    white-space: normal;
    /* allow wrapping */
    word-break: break-word;
    /* break long words */
    overflow-wrap: anywhere;
    /* modern safe wrap */
    line-height: 1.4;
}

.card h5 {
    letter-spacing: 0.3px;
}

.progress {
    border-radius: 20px;
}

.progress-bar {
    border-radius: 20px;
}

.text-truncate-cell {
    max-width: 130px;
    /* control column width */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Top header row layout */
.dt-top {
    gap: 12px;
}

/* prevent line break */
.dt-top .dataTables_length,
.dt-top .dt-buttons,
.dt-top .dataTables_filter {
    display: flex;
    align-items: center;
    margin: 0 !important;
}

/* push search to right */
.dt-top .dataTables_filter {
    margin-left: auto !important;
}

/* smaller search box */
.dataTables_filter input {
    width: 180px !important;
    height: 34px;
}

/* export button spacing */
.dt-buttons {
    margin-left: 12px;
}

/* remove "Search:" text */
.dataTables_filter label {
    font-size: 0;
}

.dataTables_filter input {
    font-size: 14px;
}

.dataTables_filter input::placeholder {
    content: "Search...";
}

#allocated_export_btn,
#unallocated_export_btn .dt-buttons {
    margin: 0;
}

#task_summary_chart .apexcharts-datalabels-group text,
#task_summary_chart .apexcharts-datalabel-label,
#task_summary_chart .apexcharts-datalabel-value {
    fill: #000 !important;
}

/* Optional: also fix overdue chart */
#overdue_summary_chart .apexcharts-datalabels-group text,
#overdue_summary_chart .apexcharts-datalabel-label,
#overdue_summary_chart .apexcharts-datalabel-value {
    fill: #000 !important;
}

#task_summary_chart .apexcharts-datalabels-group text, #overdue_summary_chart {
    dominant-baseline: middle !important;
    text-anchor: middle !important;
    font-family: Inter, system-ui, sans-serif;
}
/* KPI ROW FORCE SINGLE LINE */
.admin-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

/* CARD STYLE */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
    border: none;
    transition: 0.25s;
    height: 95px;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* ICON */
.kpi-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 12px;
}

/* TEXT */
.kpi-title {
    font-size: 12px;
    color: #8c8c8c;
    letter-spacing: .5px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.kpi-sub {
    font-size: 12px;
    color: #9aa0ac;
}

/* COLORS */
.kpi-primary { background:#f1f6ff }
.kpi-success { background:#ecfbf3 }
.kpi-warning { background:#fff7e6 }
.kpi-danger  { background:#fff1f1 }
.kpi-info    { background:#eef7ff }

.kpi-primary .kpi-icon { background:#dbeafe; color:#2563eb }
.kpi-success .kpi-icon { background:#d1fae5; color:#059669 }
.kpi-warning .kpi-icon { background:#fef3c7; color:#d97706 }
.kpi-danger  .kpi-icon { background:#fee2e2; color:#dc2626 }
.kpi-info    .kpi-icon { background:#dbeafe; color:#0284c7 }
@media (max-width:1400px){
    .admin-kpi-row { grid-template-columns: repeat(3,1fr); }
}
@media (max-width:900px){
    .admin-kpi-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:500px){
    .admin-kpi-row { grid-template-columns: repeat(1,1fr); }
}
/* ===== KPI BAR ===== */
.admin-kpi-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    gap: 6px;
    border: 1px solid #e9edf3;
}

/* each item */
.kpi-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    transition: .2s;
}

.kpi-item:hover {
    background: #f7f9fc;
}

/* icon box */
.kpi-left {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #4f46e5;
}

.kpi-left.success { background:#e7f8ef; color:#16a34a; }
.kpi-left.warning { background:#fff6e5; color:#d97706; }
.kpi-left.danger  { background:#fdeaea; color:#dc2626; }
.kpi-left.info    { background:#e6f4ff; color:#0284c7; }

/* text */
.kpi-label {
    font-size: 12px;
    color: #7a8599;
}

.kpi-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.kpi-mini {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* responsive */
@media(max-width:1200px){
    .admin-kpi-bar{ grid-template-columns: repeat(3,1fr); }
}
@media(max-width:700px){
    .admin-kpi-bar{ grid-template-columns: repeat(2,1fr); }
}
/* TASK KPI DESIGN */
.kpi-tasks .task-badges{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.kpi-tasks .badge{
    padding:4px 10px;
    font-size:11px;
    border-radius:20px;
    font-weight:500;
}

.kpi-tasks .badge b{
    margin-left:4px;
    font-weight:700;
}

.badge.ongoing{ background:#fff4e5; color:#b45309 }
.badge.completed{ background:#e8faf0; color:#15803d }
.badge.overdue{ background:#fdecec; color:#dc2626 }

/* PROGRESS BAR */
.task-progress{
    height:6px;
    background:#eef1f6;
    border-radius:20px;
    overflow:hidden;
}

.task-progress-bar{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#22c55e,#facc15,#ef4444);
    transition:width .6s ease;
}
/* Remove "Search:" text */
#freeEmployeeSearch label{
    margin:0;
    font-weight:500;
}

#freeEmployeeSearch label span{
    display:none;
}

/* nicer input */
#freeEmployeeSearch input{
    width:220px;
    height:34px;
    border-radius:8px;
}
/* make datatable filter inline */
#freeEmployeeSearch .dataTables_filter{
    margin:0;
    width:auto;
}

/* remove label block behaviour */
#freeEmployeeSearch .dataTables_filter label{
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
}

/* remove "Search:" text */
#freeEmployeeSearch .dataTables_filter label::before{
    content:"";
}

/* style input */
#freeEmployeeSearch .dataTables_filter input{
    margin:0;
    width:230px;
    height:36px;
    padding:6px 12px;
    border-radius:8px;
    border:1px solid #e2e8f0;
}

/* align header perfectly */
.card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
}
#freeEmployeeSearch .dataTables_filter label{
    font-size:0;
}

#freeEmployeeSearch .dataTables_filter input{
    font-size:14px;
}
.leave-summary-card{
    border-radius:12px;
    transition:all .25s ease;
}

.leave-summary-card:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 18px rgba(0,0,0,0.08);
}

.summary-icon{
    width:46px;
    height:46px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
}

.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 4px;
    width: 10px;
    height: 10px;
    background: #4f46e5;
    border-radius: 50%;
}

.timeline-time {
    font-size: 12px;
    color: #6b7280;
}

.timeline-text {
    font-size: 14px;
}

/* Timesheet table (Velzon-style spacing/alignment) */
.timesheet-table thead th:first-child,
.timesheet-table tbody td:first-child {
    padding-left: 1rem;
}
.timesheet-table thead th:last-child,
.timesheet-table tbody td:last-child {
    padding-right: 1rem;
    min-width: 120px;
    white-space: nowrap;
}
.timesheet-table thead th,
.timesheet-table tbody td {
    padding-top: .75rem;
    padding-bottom: .75rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
.timesheet-table td,
.timesheet-table th {
    vertical-align: middle;
}

/* Type / Priority / Status column: wrapped, labeled rows */
.timesheet-table .timesheet-tps-col {
    white-space: normal;
    max-width: none;
    vertical-align: middle;
}

.timesheet-tps-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: none;
}

.timesheet-tps-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.timesheet-tps-k {
    flex: 0 0 auto;
    min-width: 3.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #878a99;
}

/* Project timesheet: no inner scrollbars; table fits card width */
.project-timesheet-card,
.project-timesheet-card-body {
    max-height: none !important;
    overflow-y: visible !important;
}

.project-timesheet-table-wrap {
    overflow-x: visible;
    overflow-y: visible;
    max-height: none !important;
}

.project-timesheet-table-wrap .dataTables_wrapper {
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
}

/* Fit table to card: fixed layout + wrap long cells (timesheet page only) */
.project-timesheet-table-wrap table.timesheet-table {
    table-layout: fixed;
    width: 100% !important;
}

.project-timesheet-table-wrap .timesheet-table thead th:last-child,
.project-timesheet-table-wrap .timesheet-table tbody td:last-child {
    min-width: 0;
}

.project-timesheet-table-wrap .timesheet-task-col {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.project-timesheet-table-wrap .timesheet-spent-col {
    white-space: normal;
    word-break: break-word;
}

/* agent: freeze Actions column for #scroll-horizontal and #candidatesTable */
.dataTables_wrapper .dataTables_scrollHead table#scroll-horizontal th:last-child,
.dataTables_wrapper .dataTables_scrollHead table#scroll-horizontal td:last-child,
.dataTables_wrapper .dataTables_scrollBody table#scroll-horizontal th:last-child,
.dataTables_wrapper .dataTables_scrollBody table#scroll-horizontal td:last-child,
.dataTables_wrapper table#scroll-horizontal th:last-child,
.dataTables_wrapper table#scroll-horizontal td:last-child,
.dataTables_wrapper .dataTables_scrollHead table#candidatesTable th:last-child,
.dataTables_wrapper .dataTables_scrollHead table#candidatesTable td:last-child,
.dataTables_wrapper .dataTables_scrollBody table#candidatesTable th:last-child,
.dataTables_wrapper .dataTables_scrollBody table#candidatesTable td:last-child,
.dataTables_wrapper table#candidatesTable th:last-child,
.dataTables_wrapper table#candidatesTable td:last-child,
table#scroll-horizontal th:last-child,
table#scroll-horizontal td:last-child,
table#candidatesTable th:last-child,
table#candidatesTable td:last-child{position:sticky;right:0;z-index:2;background:var(--vz-card-bg,#fff);box-shadow:-8px 0 8px -8px rgba(0,0,0,.25)}
.dataTables_wrapper .dataTables_scrollHead table#scroll-horizontal thead th:last-child,
.dataTables_wrapper table#scroll-horizontal thead th:last-child,
.dataTables_wrapper .dataTables_scrollHead table#candidatesTable thead th:last-child,
.dataTables_wrapper table#candidatesTable thead th:last-child,
table#scroll-horizontal thead th:last-child,
table#candidatesTable thead th:last-child{z-index:3;background:var(--vz-gray-100,#f3f6f9)}
#candidatesTable th.candidate-actions-cell,#candidatesTable td.candidate-actions-cell{width:1%!important;white-space:nowrap!important}
#candidatesTable td.candidate-actions-cell>div{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:.25rem}