:root {
    --brand-green: #16b39a;
    --brand-green-600: #0f9a85;
    --brand-green-50: #e8f7f3;
    --brand-green-100: #d5f0e9;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f4f9;
    --navy-900: #0c1c3a;
    --navy-800: #122747;
    --navy-700: #1a3358;
    --navy-600: #25406a;
    --ink-900: #0c1c3a;
    --ink-700: #243559;
    --ink-600: #455472;
    --ink-500: #6c7a96;
    --ink-400: #94a0b8;
    --ink-300: #c2cad8;
    --line: #e6eaf1;
    --line-2: #eef1f6;
    --line-strong: #d6dce6;
    --red: #e0526a;
    --amber: #d99016;
    --amber-50: #fff7e6;
    --blue: #2f6df0;
    --blue-50: #ecf2ff;
    --green: #16a36b;
    --green-50: #e7f6ee;
    --shadow-sm: 0 1px 2px rgba(12, 28, 58, 0.06);
    --shadow-md: 0 4px 14px rgba(12, 28, 58, 0.08);
    --shadow-lg: 0 18px 48px rgba(12, 28, 58, 0.16);
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --row-h: 56px;
    --pad-x: 22px;
}

.card-index-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-500);
    margin-top: 15px;
}

.card-index-indicator span:first-child {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--brand-green-50);
    color: var(--brand-green-600);
    display: grid;
    place-items: center;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0;
}

.card-index-indicator span:not(:first-child) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-500);
    font-weight: 600;
}

.card-v2 h2 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--ink-900);
    margin: 4px 0 2px;
}

.card-v2 .pageTitle-section {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line-2);
}

.card-v2 .desc {
    color: var(--ink-500);
    font-size: 13px;
    text-wrap: pretty;
}

.card-v2 .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--ink-700);
    border-color: var(--line-strong);
    transition: background .12s ease, border-color .12s ease, color .12s ease, transform .04s ease;
    text-decoration: none;
    white-space: nowrap;
}

.card-v2 .btn.primary {
    background: var(--brand-green);
    border-color: var(--brand-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 179, 154, 0.28);
}

.card-v2 .btn-dark {
    color: #fff;
    background-color: #343a40;
    border-color: #343a40;
}

.payroll-table-card {
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 12px;
}

.payroll-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.payroll-table th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #707d93;
    letter-spacing: 0.06em;
    padding: 16px 20px;
    border-bottom: 1.5px solid #eaedf2;
    text-align: left;
    background-color: #f8fafc;
}

.payroll-table th:last-child {
    text-align: right;
}

.payroll-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #eaedf2;
    vertical-align: middle;
}

.payroll-row {
    transition: background-color 0.15s ease;
}

.payroll-row:hover {
    background-color: #fcfdfe;
}

.entity-arrow {
    color: #94a3b8;
    margin-right: 14px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s ease, color 0.15s ease;
}

.payroll-row:hover .entity-arrow {
    transform: translateX(3px);
    color: #17a589;
}

.entity-cell {
    display: flex;
    align-items: center;
}

.entity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.entity-info {
    display: flex;
    flex-direction: column;
}

.entity-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entity-name {
    font-weight: 700;
    color: #0d2137;
    font-size: 0.88rem;
}

.fallback-badge {
    background-color: #f3e8fd;
    color: #9333ea;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entity-subtext {
    font-size: 0.76rem;
    color: #707d93;
    margin-top: 2px;
}

.cycle-progress-container {
    max-width: 280px;
}

.cycle-days-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.cycle-progress-bar-bg {
    height: 8px;
    border-radius: 9999px;
    background-color: #f1f5f9;
    position: relative;
    overflow: visible;
}

.cycle-progress-bar-fill2 {
    height: 100%;
    border-radius: 9999px;
    background-color: #17a589;
    transition: width 0.3s ease;
}

.cycle-progress-pin {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%; 
    z-index: 2;
}

.cycle-progress-pin::after {
    content: '';
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5px;
    height: 12px;
}

.cycle-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 0.74rem;
}

.cutoff-text {
    color: #17a589;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.est-days-text {
    color: #707d93;
}

.no-cutoff-text {
    color: #707d93;
    font-size: 0.74rem;
    margin-top: 6px;
}

.big-number-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0d2137;
}

.number-subtext {
    font-size: 0.74rem;
    color: #707d93;
    margin-top: 1px;
}

.currency-badge {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.action-buttons-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.edit-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.edit-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.more-actions-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.more-actions-btn:hover {
    color: #475569;
    background-color: #f1f5f9;
}

.payroll-table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.payroll-table thead th { padding: 10px 14px; font-size: 12px; font-weight: 600; color: #6B7280; background: #F9FAFB; border-bottom: 1px solid #E5E7EB; text-transform: uppercase; letter-spacing: 0.04em; }
.payroll-row td { padding: 12px 14px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
.payroll-row:last-child td { border-bottom: none; }
.payroll-row:hover td { background: #FAFAFA; }

.card-index-indicator { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9CA3AF; }
.card-index-indicator span:first-child { background: #F3F4F6; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #374151; }

.entity-cell { display: flex; align-items: center; gap: 10px; }
.entity-arrow { color: #D1D5DB; flex-shrink: 0; }
.entity-avatar { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.entity-info { min-width: 0; }
.entity-title-row { display: flex; align-items: center; gap: 6px; }
.entity-name { font-weight: 600; font-size: 13px; color: #111827; }
.entity-subtext { font-size: 11px; color: #9CA3AF; }

.cycle-progress-container { min-width: 140px; }
.cycle-days-label { display: flex; justify-content: space-between; font-size: 10px; color: #9CA3AF; margin-bottom: 4px; }
.cycle-progress-bar-bg { position: relative; height: 6px; background: #E5E7EB; border-radius: 99px; }
.cycle-progress-bar-fill { height: 100%; background: #3B82F6; border-radius: 99px; }
.cycle-progress-pin { position: absolute; top: -3px; width: 12px; height: 12px; background: #fff; border: 2px solid #3B82F6; border-radius: 50%; transform: translateX(-50%); }
.cycle-info-row { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; }
.cutoff-text { color: #6B7280; }
.est-days-text { color: #9CA3AF; }
.no-cutoff-text { color: #9CA3AF; font-style: italic; }

.big-number-val { font-size: 14px; font-weight: 700; color: #111827; }
.number-subtext { font-size: 10px; color: #9CA3AF; }
.currency-badge { background: #F3F4F6; border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: 600; color: #374151; }

.action-buttons-cell { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.edit-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; font-size: 12px; font-weight: 500; color: #D1D5DB; background: #fff; border: 1px solid #D1D5DB; border-radius: 6px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.edit-btn:hover { background: #F9FAFB; border-color: #9CA3AF; }
.payroll-edit-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 12px; font-weight: 500; color: #374151; background: #fff; border: 1px solid #D1D5DB; border-radius: 6px; cursor: pointer; transition: background 0.15s, border-color 0.15s; height: 30px; line-height: 1; }
.payroll-edit-btn:hover { background: #F9FAFB; border-color: #9CA3AF; }
.more-actions-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #fff; border: 1px solid #D1D5DB; border-radius: 6px; cursor: pointer; transition: background 0.15s; color: #6B7280; }
.more-actions-btn:hover { background: #F3F4F6; border-color: #9CA3AF; }

.more-actions-wrapper { position: relative; }
.more-actions-dropdown { position: absolute; right: 0; top: calc(100% + 4px); z-index: 999; background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.10); min-width: 150px; padding: 4px 0; }
.more-actions-dropdown .dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 14px; font-size: 13px; color: #374151; background: none; border: none; cursor: pointer; text-align: left; transition: background 0.12s; }
.more-actions-dropdown .dropdown-item:hover { background: #F9FAFB; }
.more-actions-dropdown .dropdown-item.danger { color: #DC2626; }
.more-actions-dropdown .dropdown-item.danger:hover { background: #FEF2F2; }
.more-actions-dropdown .dropdown-divider { height: 1px; background: #F3F4F6; margin: 4px 0; }

/* ── Entity Cycle Preview inline row ─────────────────────────────────────── */
.cycle-preview-row td { padding: 0 !important; border-bottom: 1px solid #d1faf3; }
.cycle-preview-row:hover td { background: transparent !important; }
.cycle-preview-panel { padding: 16px 20px 12px; background: transparent; border-top: 2px solid #d1faf3; }
.cp-header-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #17a589; margin-bottom: 2px; }
.cp-date-range { font-size: 1rem; font-weight: 700; color: #111827; }
.cp-inherited-badge { font-size: 0.78rem; font-weight: 400; color: #6B7280; margin-left: 8px; }
.cp-legend { display: flex; align-items: center; gap: 14px; font-size: 0.72rem; color: #6B7280; flex-shrink: 0; }
.cp-legend-item { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.cp-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.cp-day-strip { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; background: #f0f4f8; border-radius: 8px; margin: 10px 0 0; }
.cp-day-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 32px; height: 40px; border-radius: 6px; font-size: 0.7rem; font-weight: 500; }
.cp-day-chip .cp-month { font-size: 0.58rem; opacity: 0.75; line-height: 1; margin-bottom: 1px; }
.cp-day-chip.real { border: 1.5px solid #17a589; color: #17a589; background: transparent; }
.cp-day-chip.estimated { border: 1px solid #D1D5DB; color: #9CA3AF; background: #fff; }
.cp-day-chip.cutoff { border: 1.5px solid #212529; background: #212529; color: #fff; }
.cp-day-chip.salary { border: 1.5px solid #3B82F6; background: #EFF6FF; color: #1D4ED8; }
.cp-stats { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cp-stat { display: flex; flex-direction: column; padding: 10px 16px; background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; }
.cp-stat + .cp-stat { border-left: 1px solid #E5E7EB; }
.cp-stat-label { font-size: 0.63rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #9CA3AF; margin-bottom: 3px; }
.cp-stat-value { font-size: 0.88rem; font-weight: 700; color: #111827; }
.cp-stat-value.salary-credit { color: #3B82F6; }
.cp-stat-value.realDays { color: #17a589; }
.predicted-row td {background-color: #FFFBEB !important;     border-top: 1px solid #FDE68A !important; color: #92400E !important; }
.ant-design-v2 * {font-size: 13px !important;}
.ant-design-v2 .ant-table-thead > tr, .ant-design-v2 .ant-table-tbody > tr > td, .ant-design-v2 .ant-table tfoot > tr > th, .ant-design-v2 .ant-table tfoot > tr > td {padding: 0 3px !important;}
.ant-design-v2 .tbody, .ant-design-v2 td, .ant-design-v2 tfoot, .ant-design-v2 th, .ant-design-v2 thead, .ant-design-v2 tr {height: 30px !important;}
.ant-design-v2 .separator-row td {background-color: #FFFBEB !important;     border-top: 1px solid #FDE68A !important; color: #92400E !important; padding: 0 !important; border-top: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8; }
.ant-design-v2  .payroll-cutoff-banner { text-align: center;font-size: 11px !important; font-weight: 700;letter-spacing: 2px;text-transform: uppercase;color: #a14f1b;padding: 5px 5px;   background: linear-gradient(90deg, #f5f4ef 0%, #efe4a8 20%, #f8edb7 50%, #efe4a8 80%, #f5f4ef 100%);}
.cutoff-info  {background-color: #FFFBEB !important; padding: 5px 10px; border-radius: 5px;  border: 1px solid #FDE68A !important; color: #92400E !important; }
.empPhoto .profile-initials{    border-radius: 50%;  color: #fff; display: inline-block; font-weight: 500; height: 36px; line-height: 36px; margin: 0 5px 0 5px; text-align: center; text-decoration: none; text-transform: uppercase; vertical-align: middle; width: 36px; position: relative; white-space: nowrap;}
.custom-confirm-alert {  width: 520px;  background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); font-family: inherit;}
.custom-confirm-alert .popup-header {display: flex; align-items: center; gap: 12px; margin-bottom: 18px;}
.custom-confirm-alert .popup-header i { font-size: 28px; color: #f59e0b;}
.custom-confirm-alert .popup-header h4 {margin: 0;font-size: 20px;font-weight: 600;color: #1f2937;}
.custom-confirm-alert .popup-body { color: #4b5563;font-size: 14px;line-height: 1.6;}
.custom-confirm-alert .popup-body p {margin-bottom: 14px;}
.custom-confirm-alert .highlight {font-size: 15px;font-weight: 600;color: #111827;}
.custom-confirm-alert .info-box {display: flex;gap: 10px;align-items: flex-start;margin-top: 16px;padding: 14px;background: #eff6ff;border-left: 4px solid #3b82f6;border-radius: 8px;}
.custom-confirm-alert .info-box i {color: #3b82f6;font-size: 16px;margin-top: 2px;}
.custom-confirm-alert .info-box span {color: #1e40af;font-size: 13px;}
.custom-confirm-alert .popup-actions {display: flex;justify-content: flex-end;gap: 10px;margin-top: 24px;}
.custom-confirm-alert .popup-actions .btn {min-width: 110px;border-radius: 8px;font-weight: 500;padding: 8px 18px;}
.salary-container {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.salary-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #d9d9d9;
    min-height: 100%;
    background: #E9F2FF;
}

.salary-header {
    background: #E9F2FF;
    padding: 7px;
    font-size: 16px;
    min-height: 30px;
    border-bottom: 1px solid #d9d9d9;
}

.salary-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.salary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 15px;
    border-bottom: 1px solid #d9d9d9;
    min-height: 30px;
    gap: 10px;
}

.salary-row strong,
.salary-row span:first-child {
    flex: 1;
    word-break: break-word;
}

.salary-row span:last-child {
    white-space: nowrap;
}

.arrears-box {
    background: #f7f4e8;
    border-bottom: 1px solid #d9d9d9;
    padding: 15px;
}

.arrears-header {
    font-size: 14px;
}

.arrears-row {
    padding: 6px 0;
    min-height: auto;
    border-bottom: none;
    font-size: 12px;
}

.salary-total {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 600;
    background: #E9F2FF;
    border-top: 1px solid #d9d9d9;
}