/* ============================================================
   Ballour Admin Theme v2 — Dashboard
   - Onboarding (.start_shop / .edit_shope)
   - Quick-operations
   - Summary
   - Website Visits
   - Charts
   ============================================================ */

/* ---------- Section heads spacing ---------- */
body.theme-v2 .row .col-12 > .head_text {
    margin-bottom: 4px;
    margin-top: 6px;
    color: var(--bl-heading);
    font-size: 16px;
    font-weight: 700;
}

/* ============================================================
   ONBOARDING (start_shop + edit_shope)
   ============================================================ */
body.theme-v2 .start_shop .head_text {
    font-size: 18px;
}

body.theme-v2 .edit_shope {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
}

body.theme-v2 .edit_shope .item {
    flex: 1 1 calc(20% - 14px);
    min-width: 200px;
}

body.theme-v2 .edit_shope .item .card {
    height: 100%;
}

body.theme-v2 .edit_shope .item .card-body {
    min-height: 250px;
    padding: 18px;
}

body.theme-v2 .edit_shope .item .card-body .content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 220px;
    justify-content: space-between;
}

body.theme-v2 .edit_shope .card .card-body img {
    max-height: 96px;
    min-height: auto;
    width: auto;
    margin: 6px auto 12px;
}

body.theme-v2 .edit_shope .card .card-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--bl-heading);
    margin: 4px 0;
}

body.theme-v2 .edit_shope .card .card-body p {
    font-size: 12px;
    color: var(--bl-text-muted);
    margin: 0 0 10px;
    line-height: 1.5;
}

body.theme-v2 .edit_shope .card .card-body a {
    margin-top: auto;
}

/* ============================================================
   QUICK OPERATIONS
   ============================================================ */
body.theme-v2 .Quick-operations .card {
    transition: all var(--bl-dur) var(--bl-ease);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

body.theme-v2 .Quick-operations .card:hover {
    box-shadow: var(--bl-shadow);
    transform: translateY(-2px);
    border-color: var(--bl-brand);
}

body.theme-v2 .Quick-operations .card .card_effect2 {
    display: none;
}

body.theme-v2 .Quick-operations .card .card-body {
    padding: 16px;
}

body.theme-v2 .Quick-operations .itemContent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.theme-v2 .Quick-operations .itemContent .right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

body.theme-v2 .Quick-operations .itemContent .right .icon {
    width: 44px;
    height: 44px;
    border-radius: var(--bl-radius);
    background: var(--bl-tint-blue-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.theme-v2 .Quick-operations .itemContent .right .icon svg {
    width: 22px;
    height: 22px;
}

body.theme-v2 .Quick-operations .itemContent .right .icon svg path {
    fill: var(--bl-brand) !important;
}

/* per-card tint variation by nth-child */
body.theme-v2 .Quick-operations > div:nth-child(1) .icon { background: var(--bl-tint-blue-bg); }
body.theme-v2 .Quick-operations > div:nth-child(1) .icon svg path { fill: var(--bl-tint-blue-fg) !important; }

body.theme-v2 .Quick-operations > div:nth-child(2) .icon { background: var(--bl-tint-green-bg); }
body.theme-v2 .Quick-operations > div:nth-child(2) .icon svg path { fill: var(--bl-tint-green-fg) !important; }

body.theme-v2 .Quick-operations > div:nth-child(3) .icon { background: var(--bl-tint-pink-bg); }
body.theme-v2 .Quick-operations > div:nth-child(3) .icon svg path { fill: var(--bl-tint-pink-fg) !important; }

body.theme-v2 .Quick-operations > div:nth-child(4) .icon { background: var(--bl-tint-yellow-bg); }
body.theme-v2 .Quick-operations > div:nth-child(4) .icon svg path { fill: var(--bl-tint-yellow-fg) !important; }

body.theme-v2 .Quick-operations .itemContent .name p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--bl-heading);
}

body.theme-v2 .Quick-operations .itemContent .left svg {
    width: 22px;
    height: 22px;
    color: var(--bl-text-soft);
    transition: color var(--bl-dur) var(--bl-ease);
}

body.theme-v2 .Quick-operations .itemContent .left svg path {
    fill: var(--bl-text-soft) !important;
}

body.theme-v2 .Quick-operations .card:hover .left svg path {
    fill: var(--bl-brand) !important;
}

body.theme-v2 .Quick-operations a {
    text-decoration: none;
}

/* RTL: arrow flip */
html[dir="rtl"] body.theme-v2 .Quick-operations .itemContent .left svg {
    transform: scaleX(-1);
}

/* ============================================================
   SUMMARY (clients / products / pending_carts / StockWarnings)
   ============================================================ */
body.theme-v2 .home_Summary .card {
    transition: all var(--bl-dur) var(--bl-ease);
    overflow: hidden;
    position: relative;
}

body.theme-v2 .home_Summary .card:hover {
    box-shadow: var(--bl-shadow);
    transform: translateY(-2px);
}

body.theme-v2 .home_Summary .card_effect {
    display: none;
}

body.theme-v2 .home_Summary .card .card-body {
    padding: 18px;
}

body.theme-v2 .home_Summary .card .card-body .row {
    margin: 0;
    align-items: center;
    flex-direction: row-reverse;
}

body.theme-v2 .home_Summary .card .col-md-4 {
    padding: 0;
    flex: 0 0 56px;
    max-width: 56px;
    text-align: center;
}

body.theme-v2 .home_Summary .card .col-md-8 {
    padding: 0;
    flex: 1;
    text-align: start !important;
}

body.theme-v2 .home_Summary .card .card-body img {
    height: 56px;
    width: 56px;
    padding: 12px;
    border-radius: var(--bl-radius);
    background: var(--bl-tint-blue-bg);
    object-fit: contain;
}

/* tint per card */
body.theme-v2 .home_Summary > div:nth-child(1) .card-body img {
    background: var(--bl-tint-pink-bg);
}

body.theme-v2 .home_Summary > div:nth-child(2) .card-body img {
    background: var(--bl-tint-blue-bg);
}

body.theme-v2 .home_Summary > div:nth-child(3) .card-body img {
    background: var(--bl-tint-green-bg);
}

body.theme-v2 .home_Summary > div:nth-child(4) .card-body img {
    background: var(--bl-tint-yellow-bg);
}

body.theme-v2 .home_Summary .summary_data {
    color: var(--bl-heading) !important;
    font-size: 26px !important;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

html[dir="rtl"] body.theme-v2 .home_Summary .summary_data {
    justify-content: flex-end;
}

body.theme-v2 .home_Summary .summary_data span {
    font-size: 12px;
    font-weight: 500;
    color: var(--bl-text-muted);
}

body.theme-v2 .home_Summary .summary_head {
    font-size: 13px !important;
    font-weight: 500;
    color: var(--bl-text-muted) !important;
    margin-top: 4px;
    display: block;
}

body.theme-v2 .home_Summary .card:hover .summary_data,
body.theme-v2 .home_Summary .card:hover .summary_head {
    color: inherit !important;
}

body.theme-v2 .home_Summary a {
    text-decoration: none;
}

/* ============================================================
   WEBSITE VISITS
   ============================================================ */
body.theme-v2 .website_visits .card {
    transition: all var(--bl-dur) var(--bl-ease);
    border-left: none !important;
    overflow: hidden;
}

body.theme-v2 .website_visits .card:hover {
    box-shadow: var(--bl-shadow);
}

body.theme-v2 .website_visits .card .card-body {
    padding: 18px;
}

body.theme-v2 .website_visits .card .card-body .row {
    margin: 0;
    align-items: center;
    flex-direction: row-reverse;
}

body.theme-v2 .website_visits .card .col-md-4,
body.theme-v2 .website_visits .card .col-md-8 {
    padding: 0;
}

body.theme-v2 .website_visits .card .col-md-4 {
    flex: 0 0 56px;
    max-width: 56px;
}

body.theme-v2 .website_visits .card .col-md-8 {
    flex: 1;
}

body.theme-v2 .website_visits .card .card-body img {
    height: 56px !important;
    width: 56px;
    padding: 12px;
    border-radius: var(--bl-radius);
    background: var(--bl-tint-blue-bg);
    object-fit: contain;
}

body.theme-v2 .website_visits > div:nth-child(1) .card-body img {
    background: var(--bl-tint-green-bg);
}

body.theme-v2 .website_visits > div:nth-child(2) .card-body img {
    background: var(--bl-tint-blue-bg);
}

body.theme-v2 .website_visits > div:nth-child(3) .card-body img {
    background: var(--bl-tint-purple-bg);
}

body.theme-v2 .website_visits > div:nth-child(4) .card-body img {
    background: var(--bl-tint-yellow-bg);
}

body.theme-v2 .website_visits > div:nth-child(5) .card-body img {
    background: var(--bl-tint-cyan-bg);
}

body.theme-v2 .website_visits > div:nth-child(6) .card-body img {
    background: var(--bl-tint-orange-bg);
}

body.theme-v2 .website_visits .card .content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    text-align: start !important;
}

html[dir="rtl"] body.theme-v2 .website_visits .card .content {
    align-items: flex-end !important;
}

body.theme-v2 .website_visits .card .content .head {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--bl-text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    justify-content: flex-start !important;
}

body.theme-v2 .website_visits .card .content p {
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 4px !important;
}

html[dir="rtl"] body.theme-v2 .website_visits .card .content p {
    justify-content: flex-end !important;
}

body.theme-v2 .website_visits .card .content p span.visitorNumber {
    background: transparent !important;
    color: var(--bl-heading) !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    display: inline-block !important;
}

/* live visitors green dot indicator */
body.theme-v2 .website_visits .card .content .head .fa-circle {
    color: var(--bl-success) !important;
    animation: blPulseDot 2s ease-in-out infinite;
}

@keyframes blPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* clock icon (live) */
body.theme-v2 .website_visits .card .card-body .icon-clock {
    border-color: var(--bl-success);
}

/* ============================================================
   CHARTS (Morris Donut + Flot Pie)
   ============================================================ */
body.theme-v2 #morris-donut-chart,
body.theme-v2 #flot-pie-chart {
    height: 240px !important;
}

body.theme-v2 #morris-donut-chart text,
body.theme-v2 #morris-donut-chart tspan {
    fill: var(--bl-text) !important;
    color: var(--bl-text) !important;
    font-family: var(--bl-font) !important;
}

/* Tooltip overrides for charts */
body.theme-v2 .morris-hover.morris-default-style {
    background: var(--bl-heading) !important;
    color: #fff !important;
    border-radius: var(--bl-radius-sm) !important;
    border: none !important;
    box-shadow: var(--bl-shadow-lg) !important;
    padding: 8px 12px !important;
}

body.theme-v2 .morris-hover.morris-default-style .morris-hover-row-label {
    color: #fff !important;
    font-weight: 700 !important;
}

/* ============================================================
   PLATFORM UPDATES MODAL
   ============================================================ */
body.theme-v2 .platform_updates_model .modal-content {
    border-radius: var(--bl-radius-lg);
    overflow: hidden;
}

body.theme-v2 .platform_updates_model .modal-body .data h1 {
    font-size: 20px;
    font-weight: 700;
}

body.theme-v2 .platform_updates_model .modal-body .data a {
    background: var(--bl-brand);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--bl-radius-sm);
    font-weight: 600;
    display: inline-block;
    margin-top: 12px;
    text-decoration: none;
    transition: background var(--bl-dur) var(--bl-ease);
}

body.theme-v2 .platform_updates_model .modal-body .data a:hover {
    background: var(--bl-brand-600);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    body.theme-v2 .edit_shope .item {
        flex: 1 1 calc(50% - 14px);
    }
}

@media (max-width: 575.98px) {
    body.theme-v2 .edit_shope .item {
        flex: 1 1 100%;
    }

    body.theme-v2 .home_Summary .summary_data {
        font-size: 22px !important;
    }

    body.theme-v2 .website_visits .card .content p span.visitorNumber {
        font-size: 22px !important;
    }
}
