/* ========================================
   HRMS DASHBOARD - EXACT REFERENCE MATCH
   ======================================== */

/* ========================================
   GLOBAL STYLES
   ======================================== */
body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
}

.hrms-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   GREETING & QUOTE WIDGET
   ======================================== */
.greeting-widget .widget-content {
    align-items: flex-start;
    text-align: left;
    height: 100%;
    justify-content: center;
}

.greeting-text {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quote-container {
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 10px;
}

.quote-text {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px 0;
    font-style: italic;
    color: #5a6c7d;
}

.quote-author {
    font-size: 13px;
    margin: 0;
    color: #95a5a6;
    font-weight: 500;
    display: block;
}

/* ========================================
   LEAVE BALANCE CARDS
   ======================================== */
.leave-balance-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.leave-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border-top: 2px solid #667eea;
    transition: all 0.3s ease;
}

.leave-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leave-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.leave-type {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.leave-granted {
    font-size: 11px;
    color: #7f8c8d;
}

.leave-granted strong {
    color: #2c3e50;
    font-weight: 600;
}

.leave-balance-display {
    text-align: center;
    margin: 12px 0;
}

.balance-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 6px;
}

.balance-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.view-details-link {
    display: block;
    text-align: center;
    color: #5c6ac4;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    margin: 12px 0 8px 0;
    transition: color 0.3s ease;
}

.view-details-link:hover {
    color: #4a5ab3;
    text-decoration: underline;
}

.leave-consumed {
    text-align: center;
    font-size: 10px;
    color: #95a5a6;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Leave Details Grid - for displaying expired, used, pending */
.leave-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 6px;
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.leave-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.detail-label {
    font-size: 9px;
    color: #95a5a6;
    text-transform: uppercase;
    font-weight: 500;
}

.detail-value {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.detail-value.pending {
    color: #f39c12;
}

.detail-value.expired {
    color: #e74c3c;
}

/* Responsive design for leave cards */
@media (max-width: 1024px) {
    .leave-balance-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .leave-balance-section {
        grid-template-columns: 1fr;
    }
}

.hrms-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   DASHBOARD LAYOUT - 3 COLUMNS
   ======================================== */
.dashboard-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.row-top {
    grid-template-columns: repeat(3, 1fr);
}

.row-middle {
    grid-template-columns: 280px 1fr 280px;
}

.middle-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   WIDGET CARDS WITH HOVER ZOOM EFFECTS
   ======================================== */
.hrms-widget {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hrms-widget:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.view-link {
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 18px;
    display: inline-block;
}

.view-link:hover {
    color: #5c6ac4;
    transform: translateX(5px) scale(1.2) rotate(15deg);
}

.widget-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.widget-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 12px;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.widget-icon:hover {
    transform: scale(1.15);
    opacity: 1;
    animation: pulse 1s infinite;
}

.widget-icon-small {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.widget-icon-small:hover {
    transform: scale(1.2);
    opacity: 1;
    animation: pulse 1s infinite;
}

.widget-message {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   REVIEW WIDGET
   ======================================== */
.review-widget {
    background: #ffffff;
}

/* ========================================
   ATTENDANCE WIDGET (Who is in?)
   ======================================== */
.attendance-widget .widget-content {
    align-items: stretch;
    text-align: left;
}

.attendance-status {
    width: 100%;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-item:last-of-type {
    border-bottom: none;
}

.status-label {
    font-size: 13px;
    color: #555;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    transition: transform 0.2s ease;
    display: inline-block;
}

.status-badge:hover {
    transform: scale(1.15);
    cursor: pointer;
}

.badge-yellow {
    background: #fff3cd;
    color: #856404;
}

.badge-red {
    background: #f8d7da;
    color: #721c24;
}

.badge-green {
    background: #d4edda;
    color: #155724;
}

.employee-initials {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 6px 0 8px 0;
}

.initial-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.initial-badge:hover {
    transform: scale(1.15);
}

.initial-badge.badge-yellow {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.initial-badge.badge-red {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.initial-badge.badge-green {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.attendance-message {
    margin-top: 6px;
    color: #95a5a6;
    font-size: 12px;
    text-align: center;
}

/* ========================================
   CLOCK WIDGET
   ======================================== */
.clock-widget {
    background: linear-gradient(135deg, #5c6ac4 0%, #4a5ab3 100%);
    color: #ffffff;
}

.clock-widget .widget-title,
.clock-widget .widget-subtitle {
    color: #ffffff;
}

.widget-subtitle {
    font-size: 11px;
    font-weight: 400;
    margin-bottom: 8px;
    opacity: 0.9;
}

.timer-display {
    margin: 8px 0;
}

.timer {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.widget-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   BUTTONS WITH HOVER ZOOM EFFECTS
   ======================================== */
.btn-primary,
.btn-secondary,
.btn-link,
.btn-apply {
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #5c6ac4;
    color: #ffffff;
}

.btn-primary:hover {
    background: #4a5ab3;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 106, 196, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-link {
    background: transparent;
    color: #5c6ac4;
    padding: 4px 8px;
}

.btn-link:hover {
    background: #f0f0f0;
    transform: scale(1.08);
}

.btn-apply {
    background: transparent;
    color: #5c6ac4;
    border: 1px solid #5c6ac4;
    padding: 4px 12px;
    font-size: 11px;
}

.btn-apply:hover {
    background: #5c6ac4;
    color: #ffffff;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 106, 196, 0.3);
}

/* Specific button styles for HRMS Dashboard */
.btn-sign-out,
.btn-view-swipes {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-sign-out {
    background: #ffffff;
    color: #5c6ac4;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-sign-out:hover {
    background: #f0f0f0;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

.btn-sign-out:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-view-swipes {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-view-swipes:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-download,
.btn-show-salary {
    background: transparent;
    color: #5c6ac4;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover,
.btn-show-salary:hover {
    background: #f0f0f0;
    transform: scale(1.08);
    color: #4a5ab3;
}

/* ========================================
   PAYSLIP WIDGET
   ======================================== */
.payslip-widget {
    min-height: 400px;
}

.payslip-chart {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 15px auto;
}

.chart-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.month {
    display: block;
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.paid-days {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
}

.paid-days small {
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: #7f8c8d;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payslip-breakdown {
    width: 100%;
    margin: 15px 0;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-row .label {
    color: #7f8c8d;
}

.breakdown-row .value {
    font-weight: 600;
    color: #2c3e50;
}

/* ========================================
   QUICK ACCESS WIDGET
   ======================================== */
.quick-access-widget {
    background: #ffffff;
}

.quick-access-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-access-item:hover {
    background: #e9ecef;
    transform: scale(1.03) translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-access-item strong {
    display: block;
    margin-bottom: 4px;
}

.item-note {
    font-size: 11px;
    color: #95a5a6;
    margin: 4px 0 0 0;
}

/* ========================================
   HOLIDAYS WIDGET
   ======================================== */
.holidays-widget .widget-content {
    align-items: stretch;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.holiday-item:hover {
    transform: translateX(5px);
    background: #f9fafb;
    padding-left: 8px;
    border-radius: 4px;
}

.holiday-item:last-child {
    border-bottom: none;
}

.holiday-info {
    flex: 1;
    font-size: 12px;
    line-height: 1.6;
}

.holiday-info strong {
    color: #2c3e50;
    font-weight: 600;
}

.holiday-name {
    color: #7f8c8d;
    font-size: 13px;
}

/* Holiday Footer with Show All Button */
.holiday-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-show-all-holidays {
    display: inline-block;
    padding: 6px 14px;
    background: #667eea;
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-show-all-holidays:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}


/* ========================================
   TRACK WIDGET
   ======================================== */
.track-widget {
    background: #ffffff;
}

/* ========================================
   LEAVE WIDGET
   ======================================== */
.leave-widget {
    background: #ffffff;
}

.team-leave-list {
    width: 100%;
}

.leave-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leave-item:hover {
    background: #f9fafb;
    padding-left: 8px;
    border-radius: 4px;
}

.leave-item:last-child {
    border-bottom: none;
}

.leave-employee-initial {
    flex-shrink: 0;
}

.initial-badge-leave {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #1976d2;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.initial-badge-leave:hover {
    transform: scale(1.1);
}

.leave-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leave-type {
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.leave-dates {
    color: #7f8c8d;
    font-size: 11px;
}

/* ========================================
   POI & IT WIDGETS
   ======================================== */
.poi-widget,
.it-widget {
    background: #ffffff;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .row-middle {
        grid-template-columns: 1fr;
    }

    .middle-column,
    .right-column {
        grid-column: 1;
    }
}

/* ========================================
   UPCOMING HOLIDAYS WIDGET
   ======================================== */
.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.holiday-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    transition: all 0.2s ease;
}

.holiday-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.holiday-date-info {
    display: flex;
    flex-direction: column;
    min-width: 70px;
}

.holiday-date {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
}

.holiday-weekday {
    font-size: 10px;
    color: #7f8c8d;
    text-transform: capitalize;
}

.holiday-details {
    flex: 1;
    margin: 0 12px;
}

.holiday-name {
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.btn-apply-holiday {
    padding: 4px 12px;
    background: white;
    border: 1px solid #667eea;
    color: #667eea;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-apply-holiday:hover {
    background: #667eea;
    color: white;
}

.loading-message {
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
    padding: 20px;
}


@media (max-width: 768px) {
    .row-top {
        grid-template-columns: 1fr;
    }

    .timer {
        font-size: 28px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(1.25);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hrms-widget {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   SIDEBAR MENU ICON COLORS
   ======================================== */

/* Customize HRMS Dashboard workspace icon in sidebar */
.workspace-sidebar-item[data-page-name="hrms-dashboard"] .sidebar-item-icon,
.workspace-sidebar-item[data-page-name="HRMS Dashboard"] .sidebar-item-icon {
    color: #5c6ac4 !important;
    /* Purple/Blue color */
}

/* Active/Selected state for HRMS workspace */
.workspace-sidebar-item.selected[data-page-name="hrms-dashboard"] .sidebar-item-icon,
.workspace-sidebar-item.selected[data-page-name="HRMS Dashboard"] .sidebar-item-icon,
.workspace-sidebar-item.active[data-page-name="hrms-dashboard"] .sidebar-item-icon,
.workspace-sidebar-item.active[data-page-name="HRMS Dashboard"] .sidebar-item-icon {
    color: #4a5ab3 !important;
    /* Darker shade when active */
}

/* Hover state for HRMS workspace icon */
.workspace-sidebar-item[data-page-name="hrms-dashboard"]:hover .sidebar-item-icon,
.workspace-sidebar-item[data-page-name="HRMS Dashboard"]:hover .sidebar-item-icon {
    color: #4a5ab3 !important;
}

/* Alternative: Target all sidebar icons globally */
/* Uncomment these if you want to change ALL sidebar icons */
/*
.workspace-sidebar-item .sidebar-item-icon {
    color: #5c6ac4 !important;
}

.workspace-sidebar-item.selected .sidebar-item-icon,
.workspace-sidebar-item.active .sidebar-item-icon {
    color: #4a5ab3 !important;
}

.workspace-sidebar-item:hover .sidebar-item-icon {
    color: #4a5ab3 !important;
}
*/

/* Customize specific workspace icons by name */
.workspace-sidebar-item[data-page-name="hrms-dashboard"] svg,
.workspace-sidebar-item[data-page-name="HRMS Dashboard"] svg {
    fill: #5c6ac4 !important;
    stroke: #5c6ac4 !important;
}

/* Icon size adjustments (optional) */
.workspace-sidebar-item .sidebar-item-icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   REVIEW WIDGET STYLES
   ======================================== */
.review-items-container {
    width: 100%;
    padding: 10px 0;
}

.review-count {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 500;
}

.review-initials-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.review-employee-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.review-initial-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.review-initial-badge:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.review-item-count {
    font-size: 10px;
    color: #7f8c8d;
    font-weight: 600;
}

/* Review Items Dialog */
.review-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.review-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-item-header strong {
    color: #2c3e50;
    font-size: 13px;
}

.review-item-date {
    font-size: 11px;
    color: #95a5a6;
}

.review-item-description {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.review-item-link {
    font-size: 11px;
    color: #667eea;
    font-weight: 500;
}

.review-item:hover .review-item-link {
    color: #5568d3;
}