.reports-page {
    --report-bg: #f4f7fb;
    --report-surface: #ffffff;
    --report-border: #e9eef5;
    --report-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    --report-text: #50607b;
    --report-heading: #44526a;
    --report-muted: #9aa8bd;
    --report-accent: #6270e8;
    --report-success: #31c87f;
    --report-danger: #ff4f80;
    --report-warning: #ff714f;
    --report-info: #23c7ef;
    --report-primary: #6575f1;
    --report-neutral: #8d9bb2;
    color: var(--report-text);
}

.reports-page * {
    font-family: 'Vazirmatn', sans-serif !important;
    font-variant-numeric: tabular-nums;
}

.reports-page .fa,
.reports-page .fas,
.reports-page .far,
.reports-page .fab,
.reports-page .fa-solid,
.reports-page .fa-regular,
.reports-page .fa-brands,
.reports-page [class^="fa-"],
.reports-page [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal;
    text-rendering: auto;
}

.reports-page .fas,
.reports-page .fa,
.reports-page .fa-solid {
    font-weight: 900;
}

.reports-page .far,
.reports-page .fa-regular {
    font-weight: 400;
}

.reports-page .fab,
.reports-page .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

.reports-shell {
    margin: 0 0 1.25rem;
    border: 1px solid var(--report-border) !important;
    border-radius: 1.15rem !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--report-shadow) !important;
}

.reports-shell .card-header,
.reports-shell .card-body {
    background: transparent !important;
    border: 0 !important;
}

.reports-shell .card-header {
    padding: 1rem 1rem 0 !important;
}

.reports-shell .card-body {
    padding: 0 1rem 1rem !important;
}

.reports-tabs {
    gap: 0.45rem;
    padding: 0;
    border-bottom: 0;
}

.reports-tabs .nav-item {
    margin-bottom: 0;
}

.reports-tabs .nav-link {
    min-height: 48px;
    border: 1px solid #edf2f8;
    border-bottom: 0;
    border-radius: 0.9rem 0.9rem 0 0;
    padding: 0.8rem 1.1rem;
    background: #f7f9fc;
    color: #6d7b91 !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}

.reports-tabs .nav-link i {
    font-size: 0.82rem;
}

.reports-tabs .nav-link:hover {
    background: #ffffff;
    color: var(--report-accent) !important;
    border-color: #e3e9f4;
}

.reports-tabs .nav-link.active {
    background: linear-gradient(135deg, #6474ef 0%, #5b65db 100%);
    border-color: #6474ef !important;
    color: #fff !important;
    box-shadow: 0 10px 18px rgba(100, 116, 239, 0.18);
}

.report-panel {
    padding: 1rem 0 0;
}

.report-toolbar {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem 1.15rem;
    border: 1px solid var(--report-border);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(148, 163, 184, 0.12);
}

.report-toolbar .row {
    row-gap: 0.95rem;
}

.report-toolbar .form-label {
    margin-bottom: 0.48rem;
    color: #7b889f;
    font-size: 0.78rem;
    font-weight: 800;
}

.report-control {
    position: relative;
}

.report-control .search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aab6c8;
    font-size: 0.85rem;
    pointer-events: none;
}

.report-input,
.report-select {
    height: 46px;
    border-radius: 0.85rem;
    border: 1px solid #e9eef5;
    background: #ffffff;
    color: var(--report-heading);
    padding: 0.72rem 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.report-input.with-icon {
    padding-left: 2.55rem;
}

.report-input::placeholder {
    color: #b1bccd;
}

.report-input:focus,
.report-select:focus {
    border-color: #ccd6ea;
    background: #fff;
    box-shadow: 0 0 0 0.18rem rgba(98, 112, 232, 0.12);
}

.report-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: nowrap;
    max-width: 100%;
}

.report-btn {
    min-width: 44px;
    height: 42px;
    padding: 0 0.9rem;
    border: 0 !important;
    border-radius: 0.78rem !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(148, 163, 184, 0.18) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    flex: 0 0 auto;
    white-space: nowrap;
}

.report-btn:hover,
.report-btn:focus {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 12px 22px rgba(148, 163, 184, 0.2) !important;
}

.report-actions .btn-primary.report-btn {
    min-width: 128px;
    padding-inline: 0.75rem;
    background: linear-gradient(135deg, #6b7af8 0%, #5d68df 100%) !important;
    justify-content: center;
}

.report-actions .btn-primary.report-btn::after {
    content: 'بروزرسانی';
    font-size: 0.8rem;
    font-weight: 800;
}

.report-actions .btn-danger.report-btn,
.report-actions .btn-success.report-btn,
.report-actions .btn-info.report-btn {
    width: 42px;
    padding: 0;
}

.report-actions .btn-danger.report-btn {
    background: linear-gradient(135deg, #ff6b7d 0%, #ef4444 100%) !important;
}

.report-actions .btn-success.report-btn {
    background: linear-gradient(135deg, #43d98e 0%, #2fc978 100%) !important;
}

.report-actions .btn-info.report-btn {
    background: linear-gradient(135deg, #36d1f5 0%, #1bbde7 100%) !important;
}

.report-count {
    min-height: 42px;
    width: fit-content;
    min-width: 118px;
    margin-inline-start: auto;
    padding: 0.55rem 0.9rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #1f2736 0%, #2f3a4f 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(31, 39, 54, 0.14);
}

.report-surface {
    background: transparent;
    border: 0;
    padding: 0;
}

.report-table-wrap {
    overflow: auto;
    border: 1px solid var(--report-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.1);
}

.reports-table {
    width: 100%;
    min-width: 1040px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--report-text);
    white-space: nowrap;
    line-height: 1.45;
}

.reports-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 1rem 0.85rem;
    background: #f2f5f8;
    color: #586780;
    border-bottom: 1px solid #e5ebf2;
    font-size: 0.84rem;
    font-weight: 900;
    text-align: center;
}

.reports-table thead th:first-child {
    border-top-right-radius: 0.95rem;
}

.reports-table thead th:last-child {
    border-top-left-radius: 0.95rem;
}

.reports-table tbody td {
    padding: 1.02rem 0.85rem;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    font-size: 0.9rem;
    vertical-align: middle;
    color: #4c5b73;
}

.reports-table tbody tr:last-child td {
    border-bottom: 0;
}

.reports-table tbody tr:hover td {
    background: #fbfcfe;
}

.reports-table td:first-child,
.reports-table th:first-child {
    padding-right: 1rem;
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.row-index {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7b74f4 0%, #6862e1 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 8px 14px rgba(104, 98, 225, 0.2);
    border: 2px solid #fff;
}

.employee-name {
    color: #45546d;
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1.4;
}

.employee-meta {
    margin-top: 0.22rem;
    color: #7f8ea5;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.employee-detail-chip,
.metric-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 32px;
    min-width: 40px;
    padding: 0.34rem 0.78rem;
    border-radius: 0.72rem;
    font-size: 0.81rem;
    font-weight: 900;
    line-height: 1.35;
}

.employee-detail-chip {
    width: fit-content;
    margin-top: 0.42rem;
    color: #5566db;
    background: #f3f6ff;
    border: 1px solid #e5ebff;
    box-shadow: none;
    font-size: 0.76rem;
    font-weight: 800;
}

.employee-detail-chip i {
    font-size: 0.74rem;
}

.metric-chip,
.status-chip {
    color: #fff;
    box-shadow: 0 8px 14px rgba(148, 163, 184, 0.16);
}

.metric-chip.is-success,
.status-chip.is-success {
    background: linear-gradient(135deg, #42d58b 0%, #2ebe72 100%);
}

.metric-chip.is-danger,
.status-chip.is-danger {
    background: linear-gradient(135deg, #ff5b81 0%, #ff4372 100%);
}

.metric-chip.is-warning,
.status-chip.is-warning {
    background: linear-gradient(135deg, #ff8a59 0%, #ff664f 100%);
}

.metric-chip.is-info {
    background: linear-gradient(135deg, #33d1f4 0%, #1bbce8 100%);
}

.metric-chip.is-primary,
.status-chip.is-primary {
    background: linear-gradient(135deg, #7080fb 0%, #5e6ae0 100%);
}

.status-chip.is-info {
    background: linear-gradient(135deg, #7080fb 0%, #5e6ae0 100%);
}

.metric-chip.is-neutral,
.status-chip.is-neutral {
    background: linear-gradient(135deg, #98a6bd 0%, #7f8ca5 100%);
}

.metric-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.35;
}

.metric-text.is-success {
    color: #2ebe72;
}

.metric-text.is-danger {
    color: #ff4f80;
}

.metric-text.is-warning {
    color: #ff714f;
}

.metric-text.is-info {
    color: #23c7ef;
}

.metric-text.is-primary {
    color: #5e6ae0;
}

.metric-text.is-neutral {
    color: #8d9bb2;
}

.metric-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
}

.metric-note {
    color: #8796ab;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.35;
}

.reports-table--monthly .metric-text {
    min-width: 56px;
}

.report-loading,
.report-empty {
    display: none;
    padding: 2.6rem 1rem;
    text-align: center;
}

.report-loading.is-visible,
.report-empty.is-visible {
    display: block;
}

.report-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #97a3ba 0%, #7f8ca3 100%);
    box-shadow: 0 14px 24px rgba(127, 140, 163, 0.18);
}

.pagination-modern {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.page-btn-modern {
    width: 40px;
    height: 40px;
    border: 1px solid #e7ecf3;
    border-radius: 0.85rem;
    background: #fff;
    color: #708097;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(148, 163, 184, 0.1);
    transition: all 0.18s ease;
}

.page-btn-modern:hover:not(:disabled) {
    color: var(--report-accent);
    border-color: #d9e0ec;
    transform: translateY(-1px);
}

.page-btn-modern.active {
    background: linear-gradient(135deg, #6b7af8 0%, #5d68df 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 18px rgba(100, 116, 239, 0.2);
}

.page-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.report-alert {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1080;
    max-width: 420px;
    border-radius: 1rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

@media (max-width: 991.98px) {
    .reports-shell .card-header {
        padding: 0.9rem 0.9rem 0 !important;
    }

    .reports-shell .card-body {
        padding: 0 0.9rem 0.9rem !important;
    }

    .reports-tabs .nav-link {
        border-radius: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .report-panel {
        padding-top: 0.9rem;
    }

    .report-toolbar {
        padding: 0.9rem;
    }

    .report-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .report-actions .btn-primary.report-btn {
        flex: 1 1 auto;
        min-width: 112px;
    }

    .report-count {
        width: 100%;
        margin-inline-start: 0;
    }

    .reports-table {
        min-width: 860px;
    }
}

@media print {
    body {
        background: #fff !important;
    }

    .no-print,
    .report-toolbar,
    .pagination-modern,
    .navbar,
    .sidenav,
    #sidebar-container {
        display: none !important;
    }

    .reports-shell,
    .report-table-wrap {
        box-shadow: none !important;
        border: 1px solid #d8e1ec !important;
    }

    .reports-table thead th {
        background: #f3f5f8 !important;
        color: #000 !important;
    }
}
