@import url(../bs-icon/bootstrap-icons.min.css);

:root {
    --color-1: #1f3d2e;
    --color-2: #6fa886;
    --color-3: #3fbe6e;
}

@font-face {
    font-family: montserrat;
    src: url(../font/montserrat.ttf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-family: montserrat;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0 !important;
}

input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.main-layout {
    width: 100%;
    height: 100vh;
    display: flex;
    overflow-y: hidden;

    .sidebar {
        height: 100%;
        overflow-y: auto;
        background: var(--color-1);
        position: relative;

        .sidebar-img {
            display: block;
            width: 100%;
            aspect-ratio: 1/.5;
            position: sticky;
            top: 0;
            z-index: 50;
            margin-bottom: 30px;
            padding-top: 20px;
        }

        .sidebar-item {
            display: block;
            width: 100%;
            padding: 14px 8px;
            font-size: 18px;
            font-weight: 300;
            text-decoration: none;
            color: white;
            letter-spacing: 1px;

            &:hover {
                transition: .15s ease-in-out;
                background: color-mix(in srgb, var(--color-1) 80%, black);
            }
        }

        .sidebar-item.active {
            background: color-mix(in srgb, var(--color-1) 80%, black);
        }
    }

    .content {
        height: 100%;
        overflow-y: auto;
        position: relative;

        .topbar {
            width: 100%;
            padding-top: .6rem;
            padding-bottom: .6rem;
            border-radius: 6px;
            background: var(--color-3);
            position: sticky;
            top: 0px;
        }
    }
}

.header-1 {
    font-size: 30px;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

.text-color-white {
    color: white;
}

.mobile-nav-link {
    display: block;
    width: 100%;
    padding: 14px 8px;
    font-size: 18px;
    font-weight: 300;
    text-decoration: none;
    color: white;
    letter-spacing: 1px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: color-mix(in srgb, var(--color-1) 80%, black);
    color: white;
}

@media (max-width: 991.98px) {
    .main-layout .content {
        padding-top: 70px;
    }
}

/* ===== reports / analytics ===== */
:root {
    --rp-bg: #f4f6f5;
    --rp-card: #ffffff;
    --rp-border: #e7ebe9;
    --rp-muted: #6b7773;
    --rp-ink: #1c2622;
    --rp-success: #198754;
    --rp-danger: #dc3545;
    --rp-warning: #d9a300;
    --rp-info: #0d9bb5;
    --rp-purple: #7a5af0;
}

.reports-wrap {
    background: var(--rp-bg);
    border-radius: 14px;
    padding: 18px;
    margin-top: 6px;
}

@media (max-width: 575.98px) {
    .reports-wrap {
        padding: 12px;
    }
}

/* tabs */
.report-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
}

.report-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--rp-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: all 0.15s ease;
}

.report-tab:hover {
    color: var(--color-1);
    background: #e9efec;
}

.report-tab.active {
    color: #fff;
    font-weight: 600;
    background: var(--color-1);
    box-shadow: 0 2px 8px rgba(31, 61, 46, 0.25);
}

.report-tab i {
    font-size: 15px;
}

/* date filter chips */
.filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.range-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #e9efec;
    border-radius: 999px;
    padding: 4px;
}

.range-chip {
    border: 0;
    background: transparent;
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 15px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.range-chip:hover {
    color: var(--color-1);
}

.range-chip.active {
    background: #fff;
    color: var(--color-1);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.custom-range-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.custom-range-fields input[type='date'] {
    border: 1px solid var(--rp-border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--rp-ink);
}

.filter-meta {
    font-size: 12px;
    color: var(--rp-muted);
    margin: 0;
}

/* section heading */
.report-section-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rp-muted);
    font-weight: 700;
    margin: 6px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* KPI cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 991.98px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479.98px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 14px;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 116px;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

a.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(28, 38, 34, 0.1);
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-1);
    background: #eef3f0;
}

.kpi-icon--success {
    color: var(--rp-success);
    background: rgba(25, 135, 84, 0.12);
}
.kpi-icon--danger {
    color: var(--rp-danger);
    background: rgba(220, 53, 69, 0.12);
}
.kpi-icon--warning {
    color: var(--rp-warning);
    background: rgba(217, 163, 0, 0.14);
}
.kpi-icon--info {
    color: var(--rp-info);
    background: rgba(13, 155, 181, 0.12);
}
.kpi-icon--primary {
    color: var(--color-1);
    background: rgba(63, 190, 110, 0.16);
}
.kpi-icon--purple {
    color: var(--rp-purple);
    background: rgba(122, 90, 240, 0.12);
}
.kpi-icon--secondary {
    color: #5c6b66;
    background: #eceeed;
}

.kpi-label {
    font-size: 12px;
    color: var(--rp-muted);
    font-weight: 500;
    margin: 0;
}

.kpi-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--rp-ink);
    line-height: 1.1;
    margin: 0;
    word-break: break-word;
}

.kpi-sub {
    font-size: 12px;
    color: #9aa6a1;
    margin: 0;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
}

.kpi-delta--up {
    color: var(--rp-success);
    background: rgba(25, 135, 84, 0.12);
}

.kpi-delta--down {
    color: var(--rp-danger);
    background: rgba(220, 53, 69, 0.12);
}

.kpi-delta--flat {
    color: var(--rp-muted);
    background: #eceeed;
}

/* panels (charts + tables) */
.panel {
    background: var(--rp-card);
    border: 1px solid var(--rp-border);
    border-radius: 14px;
    padding: 18px;
    height: 100%;
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rp-ink);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* donut */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.donut {
    --size: 132px;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.donut::after {
    content: '';
    position: absolute;
    inset: 26%;
    background: var(--rp-card);
    border-radius: 50%;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    text-align: center;
}

.donut-center .dc-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rp-ink);
    line-height: 1;
}

.donut-center .dc-label {
    font-size: 10px;
    color: var(--rp-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
    min-width: 150px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}

.legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-name {
    color: var(--rp-ink);
    text-transform: capitalize;
}

.legend-val {
    margin-left: auto;
    font-weight: 600;
    color: var(--rp-ink);
}

.legend-pct {
    color: var(--rp-muted);
    font-size: 12px;
    min-width: 38px;
    text-align: right;
}

/* horizontal bars */
.bars {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: center;
}

.bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    grid-column: 1 / -1;
}

.bar-name {
    font-size: 13px;
    color: var(--rp-ink);
    text-transform: capitalize;
}

.bar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-ink);
}

.bar-track {
    grid-column: 1 / -1;
    height: 8px;
    background: #eceeed;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--color-3);
    transition: width 0.4s ease;
}

/* report tables */
.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rp-muted);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--rp-border);
    text-align: left;
}

.report-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f4f3;
    font-size: 13px;
    color: var(--rp-ink);
    vertical-align: middle;
}

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

.report-table tbody tr:hover td {
    background: #f7faf8;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #eef3f0;
    color: var(--color-1);
    font-size: 12px;
    font-weight: 700;
}

/* empty state */
.empty-state {
    text-align: center;
    color: #9aa6a1;
    padding: 28px 10px;
    font-size: 13px;
}

.empty-state i {
    display: block;
    font-size: 26px;
    margin-bottom: 6px;
    opacity: 0.6;
}