/* Portal auth page style overrides */
.demo-grid {
    align-items: stretch;
}

.demo-card {
    min-width: 0;
}

.demo-card strong,
.demo-card small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.demo-card strong {
    line-height: 1.35;
}

.demo-password {
    margin-top: 0.35rem;
    color: var(--auth-secondary);
    font-size: 0.79rem;
    font-weight: 700;
}

/* Dashboard responsive fixes (admin + shared card/chart blocks) */
.welcome-card .welcome-vector {
    right: 0;
    bottom: 0;
    width: min(42%, 230px);
    height: auto;
    pointer-events: none;
}

.welcome-card .card-body {
    overflow: visible;
}

.welcome-card .card-body > .row {
    min-height: 100%;
}

.welcome-card .position-relative {
    overflow: visible;
}

.welcome-card .btn {
    white-space: nowrap;
}

/* Prevent icon glyph clipping at 100% zoom in dashboard cards */
.card .avatar,
.card [class*="avatar"] {
    overflow: visible;
}

/* Prevent right-side icon clipping in compact stat rows */
.card .card-body .d-flex.mb-3.gap-3 {
    flex-wrap: nowrap;
}

.card .card-body .d-flex.mb-3.gap-3 > .flex-grow-1 {
    min-width: 0;
}

.card .card-body .d-flex.mb-3.gap-3 > .avatar {
    flex: 0 0 auto;
    margin-left: auto;
}

.card .card-body .d-flex.mb-3.gap-3 .text-truncate.w-100 {
    width: auto !important;
    max-width: 100%;
}

.card .avatar i,
.card .avatar svg,
.card i[class^="ri-"],
.card i[class*=" ri-"] {
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.card [data-lucide],
.card svg.lucide {
    overflow: visible;
    vertical-align: middle;
}

#activeListingsChart,
#totalSales,
#listingsAdded {
    width: 100%;
    min-height: 140px;
}

/* Safety override: prevent clipped Apex toolbar controls in compact cards */
#activeListingsChart .apexcharts-toolbar,
#totalSales .apexcharts-toolbar,
#listingsAdded .apexcharts-toolbar,
.apexcharts-menu {
    display: none !important;
}

@media (max-width: 1199.98px) {
    .welcome-card .welcome-vector {
        width: min(38%, 200px);
        opacity: 0.92;
    }

    .welcome-card .card-body > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }

    .welcome-card .card-body .btn {
        padding-inline: 0.9rem;
    }
}

@media (max-width: 991.98px) {
    .welcome-card .welcome-vector {
        width: min(34%, 170px);
        opacity: 0.88;
    }

    .welcome-card .card-body .d-flex.align-items-center.gap-2 {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .welcome-card .card-body .d-flex.align-items-center.gap-2 > .btn {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .welcome-card .card-body {
        padding: 1rem;
    }

    .welcome-card p {
        margin-bottom: 1rem !important;
    }

    .welcome-card h6 {
        margin-bottom: 1rem !important;
    }

    #listingsAdded {
        min-height: 210px;
    }
}

@media (max-width: 767.98px) {
    .welcome-card .position-relative {
        padding-right: 0;
    }

    .welcome-card .welcome-vector {
        position: static !important;
        display: block;
        margin: 0.75rem auto 0;
        width: min(55vw, 220px);
        opacity: 1;
    }

    .welcome-card h5,
    .welcome-card p,
    .welcome-card h6 {
        text-align: left;
    }

    .welcome-card .card-body .d-flex.align-items-center.gap-2 > .btn {
        width: 100%;
        min-width: 0;
    }

    .welcome-card {
        min-height: auto !important;
    }

    .welcome-card .card-body {
        padding: 0.95rem;
    }

    .welcome-card h5 {
        font-size: 1.05rem;
    }

    .welcome-card p,
    .welcome-card h6 {
        font-size: 0.95rem;
    }

    .welcome-card .text-truncate {
        white-space: normal !important;
    }

    #activeListingsChart,
    #totalSales,
    #listingsAdded {
        min-height: 180px;
    }
}
