.dashboard-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 20px;
    margin-top: 22px;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-topbar {
    min-height: 88px;
    justify-content: flex-start;
    position: relative;
    padding-left: 74px;
}

.dashboard-notification-btn {
    position: absolute;
    left: 22px;
    top: 22px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(154, 77, 255, 0.12);
    color: var(--purple-soft);
    cursor: pointer;
}

.dashboard-notification-btn svg,
.metric-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-notification-btn span {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.dashboard-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.dashboard-breadcrumb strong {
    color: #fff;
}

.dashboard-brand .brand-text h1 {
    font-size: 24px;
}

.dashboard-brand .brand-text p {
    display: none;
}

.dashboard-brand .logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.dashboard-brand .logo-fallback {
    display: none;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.dashboard-brand .logo-mark.is-fallback .logo-fallback {
    display: block;
}

.premium-kpi {
    min-height: 138px;
    padding: 22px 24px;
    border-radius: 14px;
}

.premium-kpi::before {
    display: none;
}

.metric-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    background: rgba(154, 77, 255, 0.16);
    color: var(--purple-soft);
}

.premium-kpi .value {
    margin-top: 28px;
    font-size: 27px;
}

.premium-kpi .sub {
    color: var(--text-dim);
}

.kpi-green .metric-icon {
    background: rgba(32, 227, 159, 0.14);
    color: var(--green);
}

.kpi-cyan .metric-icon {
    background: rgba(0, 212, 255, 0.14);
    color: var(--cyan-soft);
}

.kpi-amber .metric-icon {
    background: rgba(255, 182, 72, 0.14);
    color: var(--amber);
}

.kpi-red .metric-icon {
    background: rgba(255, 95, 122, 0.15);
    color: var(--red);
}

@media (max-width: 1180px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-grid,
    .dashboard-panel-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .dashboard-topbar {
        min-height: 64px;
    }

    .dashboard-breadcrumb {
        display: none;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .premium-kpi {
        min-height: 104px;
        padding: 16px 18px;
    }

    .premium-kpi .value {
        margin-top: 18px;
        font-size: 22px;
    }
}

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.95fr) minmax(320px, 0.95fr);
    gap: 18px;
    margin-top: 22px;
}

.dashboard-chart-card,
.dashboard-orders-card {
    background: rgba(17, 21, 34, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.dashboard-chart-card {
    min-height: 324px;
    padding: 24px;
}

.dashboard-orders-card {
    margin-top: 20px;
    padding: 24px;
}

.chart-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.chart-card-header h2 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.chart-card-header p {
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 13px;
}

.dashboard-chart-wrap {
    width: 100%;
    overflow: hidden;
}

.line-chart {
    width: 100%;
    height: 230px;
    display: block;
}

.chart-grid line {
    stroke: rgba(148, 163, 184, 0.18);
    stroke-dasharray: 3 4;
}

.chart-grid text,
.chart-x-labels text {
    fill: var(--text-dim);
    font-family: var(--font-body);
    font-size: 11px;
}

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

.chart-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-revenue {
    stroke: var(--purple);
}

.chart-line-profit {
    stroke: #20eec0;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 8px;
    color: var(--text-dim);
    font-size: 12px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chart-legend i {
    width: 18px;
    height: 3px;
    display: inline-block;
    border-radius: 999px;
}

.legend-revenue {
    background: var(--purple);
}

.legend-profit {
    background: #20eec0;
}

.dashboard-bars {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    height: 222px;
}

.bar-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0 28px;
    color: var(--text-dim);
    font-size: 12px;
}

.bar-plot {
    display: grid;
    grid-template-columns: repeat(7, minmax(28px, 1fr));
    align-items: end;
    gap: 13px;
    padding-top: 6px;
}

.bar-item {
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr 22px;
    align-items: end;
    gap: 8px;
}

.bar-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: end;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
}

.bar-fill {
    width: 100%;
    min-height: 6px;
    border-radius: 7px 7px 3px 3px;
    background: linear-gradient(180deg, #18c7e7, #0ea9c8);
    box-shadow: 0 12px 24px rgba(0, 212, 255, 0.15);
}

.bar-item span {
    color: var(--text-dim);
    font-size: 12px;
    text-align: center;
}

.dashboard-orders-table table {
    min-width: 860px;
}

.dashboard-orders-table th,
.dashboard-orders-table td {
    padding: 17px 0;
}

.dashboard-orders-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.order-code {
    color: var(--purple-soft);
    font-weight: 700;
}

.cell-muted {
    color: var(--text-dim);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    color: var(--amber);
    background: rgba(255, 182, 72, 0.14);
}

.status-ready {
    color: var(--purple-soft);
    background: rgba(154, 77, 255, 0.16);
}

.status-delivered {
    color: var(--green);
    background: rgba(32, 227, 159, 0.14);
}

.status-canceled {
    color: var(--red);
    background: rgba(255, 95, 122, 0.15);
}

.btn-soft-purple {
    border-color: rgba(154, 77, 255, 0.36);
    background: rgba(154, 77, 255, 0.14);
    color: var(--purple-soft);
}

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

@media (max-width: 640px) {
    .dashboard-chart-card,
    .dashboard-orders-card {
        padding: 16px;
    }

    .dashboard-bars {
        height: 190px;
    }

    .bar-plot {
        gap: 8px;
    }

    .line-chart {
        min-width: 620px;
    }

    .dashboard-chart-wrap {
        overflow-x: auto;
    }
}
