/* ==========================================================================
   Demo Three — Vendor Dashboard (vendor-dashboard.html)
   Loaded after home.css + common.css, before responsive.css
   ========================================================================== */
.vdash-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.vdash-nav {
    position: sticky;
    top: var(--pg-sticky-top);
    padding: 0;
    overflow: hidden;
}

.vdash-store {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border-bottom: 1px solid var(--pg-border);
    background: var(--pg-accent-soft);
}

.vstore-logo.small {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--pg-btn-bg);
    color: #fff;
    font-size: 18px;
}

.vdash-store strong {
    display: block;
    font-size: 15px;
    color: var(--pg-dark);
}

.vdash-store .pg-link {
    font-size: 12px;
}

.vdash-menu {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.vdash-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--pg-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--pg-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.vdash-menu a i {
    width: 18px;
    text-align: center;
    color: var(--pg-muted);
}

.vdash-menu a:hover {
    background: var(--pg-bg-soft);
    color: var(--pg-accent);
}

.vdash-menu a.active {
    background: var(--pg-btn-bg);
    color: #fff;
}

.vdash-menu a.active i,
.vdash-menu a:hover i {
    color: inherit;
}

.vdash-logout {
    margin-top: 6px;
    border-top: 1px solid var(--pg-border);
    border-radius: 0 !important;
    color: var(--pg-danger) !important;
}

.vdash-logout i {
    color: var(--pg-danger) !important;
}

.vdash-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.vdash-welcome h2 {
    font-family: var(--pg-head-font);
    font-size: 28px;
    color: var(--pg-dark);
}

.vdash-welcome p {
    font-size: 14px;
    color: var(--pg-muted);
}

.vdash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.vdash-stat {
    display: flex;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius);
    background: #fff;
}

.vdash-stat-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--pg-accent-soft);
    color: var(--pg-accent);
    font-size: 20px;
}

.vdash-stat span {
    font-size: 13px;
    color: var(--pg-muted);
}

.vdash-stat strong {
    display: block;
    margin: 2px 0;
    font-family: var(--pg-head-font);
    font-size: 26px;
    line-height: 1.2;
    color: var(--pg-dark);
}

.vdash-stat em {
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.vdash-stat em.up {
    color: var(--pg-success);
}

.vdash-stat em.down {
    color: var(--pg-danger);
}

.vdash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.vdash-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.vdash-card-head h3 {
    font-family: var(--pg-head-font);
    font-size: 20px;
    color: var(--pg-dark);
}

.vdash-card-head span {
    font-size: 12px;
    color: var(--pg-muted);
}

.vdash-card-head .pg-input {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
}

/* CSS bar chart */
.vdash-bars {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    height: 260px;
    padding-top: 10px;
    background: repeating-linear-gradient(to top, transparent 0, transparent 51px, var(--pg-border) 51px, var(--pg-border) 52px);
}

.vdash-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    height: 100%;
}

.vdash-bar span {
    width: 100%;
    max-width: 30px;
    height: calc(var(--h) - 26px);
    min-height: 6px;
    border-radius: 8px 8px 0 0;
    background: var(--pg-btn-bg);
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom;
    animation: vdashGrow 0.9s ease-out both;
}

.vdash-bar:hover span {
    opacity: 1;
}

@keyframes vdashGrow {
    from { transform: scaleY(0); }
}

.vdash-bar em {
    font-size: 11px;
    font-style: normal;
    color: var(--pg-muted);
}

.vdash-top ul {
    list-style: none;
}

.vdash-top li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pg-border);
}

.vdash-top li:last-child {
    border-bottom: none;
}

.vdash-top .pg-thumb {
    width: 52px;
    height: 52px;
}

.vdash-top li > div {
    flex: 1;
    min-width: 0;
}

.vdash-top strong {
    display: block;
    font-size: 14px;
    color: var(--pg-dark);
}

.vdash-top span {
    font-size: 12px;
    color: var(--pg-muted);
}

.vdash-top b {
    font-size: 14px;
    color: var(--pg-accent);
}

@media (max-width: 1199.98px) {
    .vdash-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }

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

    .vdash-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    .vdash-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .vdash-nav {
        position: static;
    }

    .vdash-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        scrollbar-width: none;
    }

    .vdash-menu::-webkit-scrollbar {
        display: none;
    }

    .vdash-menu a {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .vdash-logout {
        margin-top: 0;
        border-top: none;
        border-radius: var(--pg-radius-sm) !important;
    }
}

@media (max-width: 575.98px) {
    .vdash-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .vdash-bars {
        gap: 4px;
        height: 200px;
    }

    .vdash-bar em {
        font-size: 9px;
    }

    .vdash-welcome .pg-btn {
        width: 100%;
    }
}
