.dashboard-page {
    padding-bottom: 44px;
}

.dashboard-header {
    display: flex;
    margin-bottom: 26px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-overline {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 680;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(31px, 4vw, 44px);
    font-weight: 690;
    letter-spacing: -0.052em;
}

.dashboard-subtitle {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-date {
    display: flex;
    min-width: 170px;
    padding: 10px 14px;
    flex-direction: column;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.dashboard-date span {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 620;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-date strong {
    font-size: 12px;
    font-weight: 620;
}

.dashboard-main-metrics {
    display: grid;
    margin-bottom: 30px;
    grid-template-columns:
        minmax(0, 1.45fr)
        repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.dashboard-main-card {
    position: relative;
    display: flex;
    min-height: 180px;
    padding: 21px;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 19px;
    background: var(--surface);
    box-shadow:
        0 6px 24px rgba(15, 23, 42, 0.035);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.dashboard-main-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.07);
}

.dashboard-main-card-featured {
    border-color: rgba(37, 99, 235, 0.18);
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(96, 165, 250, 0.2),
            transparent 43%
        ),
        linear-gradient(
            145deg,
            #eff6ff 0%,
            #ffffff 70%
        );
}

.dashboard-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-card-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 580;
}

.dashboard-live-indicator {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: #2563eb;
    font-size: 10px;
    font-weight: 660;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dashboard-main-value {
    margin-top: auto;
    color: var(--text-primary);
    font-size: clamp(29px, 3.3vw, 42px);
    font-weight: 700;
    letter-spacing: -0.055em;
    font-variant-numeric: tabular-nums;
}

.dashboard-main-card-featured
.dashboard-main-value {
    color: #1d4ed8;
    font-size: clamp(35px, 4vw, 50px);
}

.dashboard-main-caption {
    margin: 7px 0 0;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-featured-footer {
    display: flex;
    margin-top: 17px;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 11px;
}

.dashboard-inline-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 11px;
    font-weight: 650;
}

.dashboard-inline-button:hover {
    text-decoration: underline;
}

.dashboard-comparison-positive {
    color: #15803d;
}

.dashboard-comparison-negative {
    color: #b91c1c;
}



.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section-heading {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-section-heading h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 660;
    letter-spacing: -0.025em;
}

.dashboard-section-heading p {
    margin: 5px 0 0;
    color: var(--text-tertiary);
    font-size: 12px;
}

.dashboard-production-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.dashboard-production-card {
    display: flex;
    min-height: 110px;
    padding: 19px;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow:
        0 5px 20px rgba(15, 23, 42, 0.025);
}

.dashboard-production-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-production-label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 580;
}

.dashboard-production-header strong {
    display: block;
    margin-top: 9px;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.dashboard-production-dot {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border-radius: 999px;
    box-shadow:
        0 0 0 6px rgba(148, 163, 184, 0.1);
}

.production-blue {
    background: #3b82f6;
}

.production-amber {
    background: #f59e0b;
}

.production-violet {
    background: #8b5cf6;
}



.dashboard-production-card p {
    margin: auto 0 0;
    padding-top: 13px;
    color: var(--text-tertiary);
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-analytics-grid {
    display: grid;
    margin-bottom: 22px;
    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(310px, 0.8fr);
    gap: 18px;
}

.dashboard-chart-card,
.dashboard-payment-chart-card {
    overflow: hidden;
}

.dashboard-chart-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.dashboard-chart-total span {
    color: var(--text-tertiary);
    font-size: 10px;
    text-transform: uppercase;
}

.dashboard-chart-total strong {
    font-size: 17px;
    font-weight: 670;
    font-variant-numeric: tabular-nums;
}

.dashboard-line-chart {
    width: 100%;
    min-height: 300px;
}

.dashboard-line-chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.dashboard-chart-grid-line {
    stroke: #e8edf3;
    stroke-width: 1;
}

.dashboard-chart-axis-text,
.dashboard-chart-date {
    fill: #8b94a5;
    font-family: inherit;
    font-size: 10px;
}

.dashboard-chart-date {
    font-weight: 560;
    text-transform: capitalize;
}

.dashboard-chart-area {
    fill: url(#dashboardAreaGradient);
}

.dashboard-chart-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter:
        drop-shadow(
            0 7px 8px rgba(37, 99, 235, 0.2)
        );
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    animation:
        dashboardDrawLine 950ms ease forwards;
}

.dashboard-chart-point-area {
    fill: transparent;
}

.dashboard-chart-point {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 3;
    transition:
        r 160ms ease;
}

.dashboard-chart-point-group:hover
.dashboard-chart-point {
    r: 6;
}

.dashboard-payment-chart-layout {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-donut {
    position: relative;
    display: grid;
    width: 174px;
    height: 174px;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            #e5e7eb 0deg 360deg
        );
    transition: background 400ms ease;
}

.dashboard-donut::after {
    position: absolute;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: var(--surface);
    content: "";
}

.dashboard-donut-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.dashboard-donut-center span {
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 610;
    text-transform: uppercase;
}

.dashboard-donut-center strong {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}

.dashboard-payment-legend {
    width: 100%;
    margin-top: 24px;
}

.dashboard-payment-legend-row {
    display: flex;
    padding: 11px 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.dashboard-payment-legend-row:last-child {
    border-bottom: 0;
}

.dashboard-payment-legend-row > div {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-secondary);
    font-size: 12px;
}

.dashboard-payment-legend-row strong {
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.dashboard-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.legend-cash {
    background: #2563eb;
}

.legend-transfer {
    background: #7c3aed;
}

.legend-card {
    background: #14b8a6;
}

.dashboard-recent-card {
    overflow: hidden;
}

.dashboard-sales-list {
    display: flex;
    flex-direction: column;
}

.dashboard-sale-row {
    display: grid;
    width: 100%;
    min-height: 72px;
    padding: 15px 20px;
    grid-template-columns:
        80px
        minmax(180px, 1.5fr)
        115px
        minmax(130px, 1fr)
        minmax(120px, 0.7fr);
    align-items: center;
    gap: 16px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    transition:
        background 150ms ease;
}

.dashboard-sale-row:last-child {
    border-bottom: 0;
}

.dashboard-sale-row:hover {
    background: var(--surface-secondary);
}

.dashboard-sale-note {
    font-size: 13px;
    font-weight: 670;
    font-variant-numeric: tabular-nums;
}

.dashboard-sale-patient {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.dashboard-sale-patient strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-sale-patient small,
.dashboard-sale-date,
.dashboard-sale-value small {
    color: var(--text-tertiary);
    font-size: 11px;
}

.dashboard-sale-status {
    display: flex;
}

.dashboard-sale-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.dashboard-sale-value strong {
    font-size: 13px;
    font-weight: 680;
    font-variant-numeric: tabular-nums;
}

@keyframes dashboardDrawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@media (max-width: 1220px) {
    .dashboard-main-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-card-featured {
        grid-column: span 2;
    }
}

@media (max-width: 980px) {
    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-production-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sale-row {
        grid-template-columns:
            70px
            minmax(160px, 1fr)
            minmax(120px, 0.8fr)
            minmax(110px, 0.6fr);
    }

    .dashboard-sale-date {
        display: none;
    }
}

@media (max-width: 720px) {
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-date {
        width: 100%;
    }

    .dashboard-main-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-main-card-featured {
        grid-column: auto;
    }

    .dashboard-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-chart-total {
        align-items: flex-start;
    }

    .dashboard-sale-row {
        grid-template-columns:
            65px
            minmax(0, 1fr)
            auto;
    }

    .dashboard-sale-status,
    .dashboard-sale-date {
        display: none;
    }
}

@media (max-width: 480px) {
    .dashboard-main-card {
        min-height: 160px;
    }

    .dashboard-featured-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-donut {
        width: 155px;
        height: 155px;
    }

    .dashboard-donut::after {
        width: 103px;
        height: 103px;
    }

    .dashboard-sale-row {
        padding: 14px;
        grid-template-columns:
            55px
            minmax(0, 1fr);
    }

    .dashboard-sale-value {
        display: none;
    }
}
