/* ==========================================================================
   SERVESAAS HR - HR DASHBOARD COMPLETE STYLESHEET
   Path: static/css/hr_dashboard.css
   ========================================================================== */

/* --- Section Headings --- */
.dash-section-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 20px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

/* --- Quick Actions Grid & Cards --- */
.quick-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 992px) {
    .quick-actions-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }
}

.action-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 6px !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.action-card .action-icon {
    font-size: 22px !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
}

.action-card .action-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.action-card:hover {
    border-color: #3182ce !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.12) !important;
    background: #f8fafc !important;
}

.action-card:active {
    transform: scale(0.97) !important;
}

/* Quick Actions Responsiveness */
@media (min-width: 992px) {
    .action-card {
        padding: 16px 12px !important;
    }
    .action-card .action-icon {
        font-size: 26px !important;
        margin-bottom: 6px !important;
    }
    .action-card .action-label {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .action-card {
        padding: 10px 4px !important;
    }
    .action-card .action-icon {
        font-size: 18px !important;
        margin-bottom: 3px !important;
    }
    .action-card .action-label {
        font-size: 9px !important;
    }
}

/* --- Employee Summary KPI Grid --- */
.kpi-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

@media (max-width: 1200px) and (min-width: 768px) {
    .kpi-grid-mobile {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }
}

@media (max-width: 767px) {
    .kpi-grid-mobile {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
}

@media (max-width: 420px) {
    .kpi-grid-mobile {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* --- KPI Boxes --- */
.kpi-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    border-left: 4px solid #3b82f6 !important;
    box-sizing: border-box !important;
    min-height: 80px !important;
}

.kpi-box:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.kpi-box.green  { border-left-color: #10b981 !important; }
.kpi-box.red    { border-left-color: #ef4444 !important; }
.kpi-box.blue   { border-left-color: #06b6d4 !important; }
.kpi-box.purple { border-left-color: #8b5cf6 !important; }
.kpi-box.orange { border-left-color: #f59e0b !important; }

.kpi-lbl {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    display: block !important;
    line-height: 1.2 !important;
}

.kpi-val {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.1 !important;
    display: block !important;
}

.kpi-box.green .kpi-val  { color: #10b981 !important; }
.kpi-box.red .kpi-val    { color: #ef4444 !important; }
.kpi-box.blue .kpi-val   { color: #06b6d4 !important; }
.kpi-box.purple .kpi-val { color: #8b5cf6 !important; }
.kpi-box.orange .kpi-val { color: #f59e0b !important; }

/* Mobile font sizes for KPI boxes */
@media (max-width: 767px) {
    .kpi-box {
        padding: 10px 8px !important;
        min-height: 65px !important;
    }
    .kpi-lbl {
        font-size: 9px !important;
        margin-bottom: 4px !important;
    }
    .kpi-val {
        font-size: 18px !important;
    }
}

/* --- Dashboard Standard Cards --- */
.dash-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 20px 22px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.card-header-flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.card-header-flex h3 {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.text-link-btn {
    background: #ebf8ff !important;
    color: #2b6cb0 !important;
    border: 1px solid #bee3f8 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.text-link-btn:hover {
    background: #3182ce !important;
    color: #ffffff !important;
    border-color: #3182ce !important;
}

/* --- Attendance Trends Line Chart --- */
.line-chart-container {
    min-height: 200px !important;
    width: 100% !important;
    position: relative !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    border: 1px dashed #e2e8f0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chart-legend-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    margin-top: 14px !important;
    font-size: 12px !important;
    color: #64748b !important;
    justify-content: center !important;
}

.chart-legend-grid span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 600 !important;
}

.chart-legend-grid .dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

/* --- Payroll Snapshot Rows --- */
.pay-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 0 !important;
    font-size: 13px !important;
    border-bottom: 1px dashed #f1f5f9 !important;
}

.pay-row.total {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 12px !important;
    margin-bottom: 6px !important;
}

.progress-bg {
    width: 100% !important;
    height: 10px !important;
    background: #edf2f7 !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    margin: 14px 0 6px 0 !important;
}

.progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #3182ce, #10b981) !important;
    border-radius: 5px !important;
    transition: width 0.4s ease !important;
}

/* --- Pending Leave Mini Requests --- */
.mini-request {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    border: 1px solid #edf2f7 !important;
    margin-bottom: 10px !important;
}

.mini-request p {
    font-size: 13px !important;
    color: #334155 !important;
    margin: 0 !important;
    font-weight: 600 !important;
}

.req-btns {
    display: flex !important;
    gap: 8px !important;
}

.req-btn {
    padding: 6px 12px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.req-btn.acc { background: #10b981 !important; }
.req-btn.rej { background: #ef4444 !important; }
