/*
Dashboard visual refresh
*/

.dashboard-page {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 32%),
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.10) 0%, rgba(45, 212, 191, 0) 26%);
}

.dashboard-page .container-fluid {
    position: relative;
    z-index: 1;
}

.dashboard-page-title {
    padding-bottom: 18px;
}

.dashboard-page-title h4 {
    font-size: 24px !important;
    letter-spacing: 0.06em;
}

.dashboard-page-title .breadcrumb-item {
    color: rgba(226, 232, 240, 0.72);
    font-size: 13px;
}

.dashboard-page-title .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.88);
}

.dashboard-hero-card,
.dashboard-kpi-card,
.dashboard-panel-card,
.dashboard-empty-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px !important;
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.82) 0%, rgba(30, 41, 59, 0.92) 100%);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3), 0 8px 10px -6px rgba(15, 23, 42, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

.dashboard-hero-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.30) 0%, rgba(45, 212, 191, 0.15) 100%);
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.dashboard-hero-copy {
    padding: 14px 16px 10px;
}

.dashboard-hero-tag {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 8px;
    border-radius: 8px !important;
    background: rgba(15, 23, 42, 0.28);
    color: #e2e8f0;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-hero-copy h5 {
    margin-bottom: 4px;
    color: #ffffff !important;
    font-size: 16px;
    line-height: 1.15;
}

.dashboard-hero-copy p {
    margin-bottom: 0;
    max-width: 145px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-hero-image {
    max-height: 72px;
    margin: 0 auto -6px;
}

.dashboard-hero-body {
    padding: 8px 16px 12px;
}

.dashboard-profile-icon {
    width: 36px;
    height: 36px;
    margin-top: 0;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.24);
}

.dashboard-profile-icon .header-profile-user {
    width: 100%;
    height: 100%;
    background: transparent;
    color: #ffffff !important;
    font-size: 18px;
}

.dashboard-user-name {
    margin-top: 4px;
    margin-bottom: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.3;
}

.dashboard-user-meta {
    padding-top: 0;
}

.dashboard-user-meta>div {
    padding-top: 4px !important;
}

.dashboard-user-detail {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
}

.dashboard-user-detail i {
    margin-right: 5px;
    color: rgba(165, 180, 252, 0.92);
    font-size: 13px;
}

.dashboard-kpi-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-kpi-card:before {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -46px;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-kpi-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.4), 0 10px 10px -5px rgba(15, 23, 42, 0.4) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

.dashboard-kpi-card .card-body {
    position: relative;
    z-index: 1;
    padding: 24px 26px;
}

.dashboard-kpi-label {
    margin-bottom: 10px;
    color: rgba(226, 232, 240, 0.76) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-kpi-value {
    margin-bottom: 0;
    color: #ffffff;
    font-size: 32px;
}

.dashboard-kpi-card .mini-stat-icon,
.dashboard-kpi-card .avatar-sm {
    width: 56px;
    height: 56px;
}

.dashboard-kpi-card .avatar-title {
    border-radius: 8px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dashboard-kpi-primary .avatar-title {
    background: linear-gradient(135deg, #5b73ff 0%, #7c8dff 100%) !important;
}

.dashboard-kpi-success .avatar-title {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.dashboard-kpi-info .avatar-title {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
}

.dashboard-kpi-action {
    display: inline-flex;
    align-items: center;
    margin-top: 18px;
    padding: 9px 14px;
    border: none;
    border-radius: 8px !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out !important;
}

.dashboard-kpi-action:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    filter: brightness(1.1) !important;
}

.dashboard-kpi-action i {
    margin-right: 7px;
}

.dashboard-panel-card .card-body {
    padding: 26px 28px;
}

.dashboard-section-title {
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.dashboard-section-copy {
    margin-bottom: 18px;
    color: rgba(226, 232, 240, 0.68);
}

.dashboard-chart-wrap {
    min-height: 280px;
}

#order_history_chart {
    min-height: 280px;
}

.dashboard-link-more {
    font-weight: 600;
}

.dashboard-empty-card .card-body {
    padding: 56px 20px;
}

.dashboard-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 8px !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(45, 212, 191, 0.18) 100%);
    color: #ffffff;
    font-size: 34px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dashboard-empty-card .card-title {
    color: #ffffff;
}

.dashboard-empty-card .card-text {
    color: rgba(226, 232, 240, 0.72);
}

body.light-mode .dashboard-page {
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0) 30%),
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.08) 0%, rgba(20, 184, 166, 0) 26%);
}

body.light-mode .dashboard-page-title .breadcrumb-item {
    color: #64748b;
}

body.light-mode .dashboard-page-title .breadcrumb-item.active {
    color: #334155;
}

body.light-mode .dashboard-hero-card,
body.light-mode .dashboard-kpi-card,
body.light-mode .dashboard-panel-card,
body.light-mode .dashboard-empty-card {
    border-color: rgba(148, 163, 184, 0.18);
    border-radius: 8px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .dashboard-hero-panel {
    border-bottom-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(20, 184, 166, 0.12) 100%);
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

body.light-mode .dashboard-hero-tag {
    background: #eef2ff;
    color: #3730a3;
    border-radius: 8px !important;
}

body.light-mode .dashboard-hero-copy h5,
body.light-mode .dashboard-user-name,
body.light-mode .dashboard-kpi-value,
body.light-mode .dashboard-section-title,
body.light-mode .dashboard-empty-card .card-title {
    color: #0f172a !important;
}

body.light-mode .dashboard-hero-copy p,
body.light-mode .dashboard-user-detail,
body.light-mode .dashboard-kpi-label,
body.light-mode .dashboard-section-copy,
body.light-mode .dashboard-empty-card .card-text {
    color: #64748b !important;
}

body.light-mode .dashboard-profile-icon {
    border-color: #dbe4ef;
    border-radius: 8px !important;
    background: #ffffff;
    box-shadow: 0 14px 24px rgba(148, 163, 184, 0.18);
}

body.light-mode .dashboard-kpi-card:hover {
    box-shadow: 0 12px 20px -3px rgba(148, 163, 184, 0.2), 0 4px 6px -2px rgba(148, 163, 184, 0.2) !important;
    border-color: rgba(79, 70, 229, 0.3) !important;
}

body.light-mode .dashboard-profile-icon .header-profile-user {
    color: #0f172a !important;
}

body.light-mode .dashboard-user-detail i {
    color: #4f46e5;
}

body.light-mode .dashboard-kpi-card:before {
    background: rgba(79, 70, 229, 0.06);
}

body.light-mode .dashboard-empty-icon {
    color: #4338ca;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(45, 212, 191, 0.12) 100%);
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.1);
}

@media (max-width: 991px) {
    .dashboard-page-title h4 {
        font-size: 21px !important;
    }

    .dashboard-panel-card .card-body,
    .dashboard-hero-body {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 767px) {
    .dashboard-page-title {
        padding-bottom: 14px;
    }

    .dashboard-hero-copy {
        padding: 18px 18px 14px;
        padding-bottom: 18px;
    }

    .dashboard-hero-copy h5 {
        font-size: 20px;
    }

    .dashboard-hero-copy p {
        max-width: 100%;
    }

    .dashboard-hero-body {
        padding: 16px 18px 18px;
    }

    .dashboard-user-meta {
        padding-top: 8px;
    }

    .dashboard-kpi-card .card-body,
    .dashboard-panel-card .card-body {
        padding: 22px;
    }

    .dashboard-chart-wrap,
    #order_history_chart {
        min-height: 240px;
    }
}