/**
 * Minimal dashboard style
 */

.dashboard-page {
    --dashboard-ad-sticky-top: calc(var(--nav-total-height, 56px) + var(--dash-subnav-height, 48px) + 0.75rem);
    --dashboard-ad-sticky-height: calc(
        100vh - var(--nav-total-height, 56px) - var(--dash-subnav-height, 48px) - 2rem - env(safe-area-inset-bottom, 0px)
    );
    --dashboard-ad-mobile-max-height: min(220px, calc(
        100vh - var(--nav-total-height, 56px) - var(--bottom-nav-height, 64px) - 14rem - env(safe-area-inset-bottom, 0px)
    ));
}

/* Content always centered; side ads sit immediately beside the content block */
.dashboard-minimal__layout {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 0.75rem;
    box-sizing: border-box;
}

.dashboard-minimal__cluster {
    position: relative;
    width: min(1040px, 100%);
    max-width: 1040px;
    flex: 0 0 auto;
}

.dashboard-minimal__container {
    width: 100%;
    max-width: 1040px;
    padding-top: 0.75rem;
    margin: 0 auto;
}

/* Side rails — beside content edges, not at screen edges */
.dashboard-ad-rail {
    position: absolute;
    top: 0.75rem;
    width: 150px;
    padding-top: 0;
    z-index: 1;
}

.dashboard-ad-rail--left {
    right: calc(100% + 1rem);
}

.dashboard-ad-rail--right {
    left: calc(100% + 1rem);
}

.dashboard-ad-rail .rishthe-ad-banner--rail {
    position: sticky;
    top: var(--dashboard-ad-sticky-top);
    height: var(--dashboard-ad-sticky-height);
    max-height: var(--dashboard-ad-sticky-height);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--soft-bg, #f8f6fc);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dashboard-ad-rail .rishthe-ad-banner--rail .rishthe-ad-banner__img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
}

.dashboard-minimal__main {
    display: grid;
    gap: 0.9rem;
}

/* Dashboard advertisement carousel */
.rishthe-ad-slot--dashboard.rishthe-ad-slot--slider {
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.rishthe-ad-slot--dashboard-mobile.rishthe-ad-slot--slider {
    margin-bottom: 0;
    max-height: var(--dashboard-ad-mobile-max-height);
    overflow: hidden;
}

.rishthe-ad-slot--dashboard .rishthe-ad-carousel {
    border-radius: var(--radius-md);
}

.rishthe-ad-slot--dashboard .rishthe-ad-carousel .carousel-inner {
    background: var(--soft-bg, #f8f6fc);
    max-height: var(--dashboard-ad-mobile-max-height);
}

.rishthe-ad-slot--dashboard .rishthe-ad-carousel .carousel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: var(--dashboard-ad-mobile-max-height);
}

.rishthe-ad-slot--dashboard .rishthe-ad-banner--slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: var(--dashboard-ad-mobile-max-height);
    background: var(--soft-bg, #f8f6fc);
}

.rishthe-ad-slot--dashboard .rishthe-ad-banner--slide .rishthe-ad-banner__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: var(--dashboard-ad-mobile-max-height);
    object-fit: contain;
    object-position: center center;
}

.rishthe-ad-carousel__indicators {
    margin-bottom: 0.35rem;
}

.rishthe-ad-carousel__indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(123, 44, 191, 0.35);
    border: none;
    opacity: 1;
}

.rishthe-ad-carousel__indicators .active {
    background-color: var(--primary);
}

.rishthe-ad-carousel__control {
    width: 2.5rem;
    opacity: 0.85;
}

.rishthe-ad-carousel__control .carousel-control-prev-icon,
.rishthe-ad-carousel__control .carousel-control-next-icon {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.rishthe-ad-banner__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    pointer-events: none;
}

.rishthe-ad-banner--slide {
    position: relative;
}

.rishthe-ad-banner__overlay .rishthe-ad-banner__caption {
    font-size: 0.8rem;
    font-weight: 600;
}

.rishthe-ad-banner__overlay .rishthe-ad-banner__text {
    font-size: 0.72rem;
    opacity: 0.95;
}

.dm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.dm-head__greet {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dm-head__name {
    margin: 0.1rem 0 0;
    font-size: 1.3rem;
    color: var(--primary-dark);
}

.dm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

/* Home overview — app order: Request Received, Sent, Match, Shortlist, Visitors, Unread */
.dm-quick-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.55rem;
}

.dm-quick-stat {
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dm-quick-stat:hover {
    transform: translateY(-1px);
    border-color: rgba(123, 44, 191, 0.28);
    box-shadow: 0 4px 14px rgba(91, 31, 150, 0.08);
    color: inherit;
}

.dm-quick-stat__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f6f0ff;
    color: var(--primary);
    font-size: 0.78rem;
}

.dm-quick-stat strong {
    font-size: 1.15rem;
    color: var(--primary-dark);
    line-height: 1.1;
}

.dm-quick-stat > span:last-child {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.25;
}

.dm-section__empty {
    margin: 0;
    padding: 0.85rem 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Home profile rows — use standard listing card width (not multi-column squeeze) */
.dashboard-minimal .dm-section .profiles-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-minimal .dm-section .profiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dashboard-minimal .dash-feed-item {
    min-width: 0;
}

.dashboard-minimal .dash-feed-item .profile-card {
    width: 100%;
}

.dm-stat {
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dm-stat strong {
    font-size: 1.25rem;
    color: var(--primary-dark);
    line-height: 1.1;
}

.dm-stat span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dm-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.dm-action {
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 0.45rem;
}

.dm-action:hover {
    background: var(--soft-lavender);
    color: var(--primary-dark);
}

.dm-section {
    background: var(--white);
    border: 1px solid var(--lavender);
    border-radius: var(--radius-md);
    padding: 0.95rem;
}

.dm-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.dm-section__head h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-dark);
}

.dm-section__head a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.dm-section__head a:hover {
    text-decoration: underline;
}

.dash-feed-item {
    position: relative;
}

.dash-new-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--rose, #e91e63);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
}

.dash-match-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
}

.dm-notes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.dm-notes li {
    border: 1px solid var(--lavender);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    background: #fff;
}

.dm-notes li.is-unread {
    border-color: rgba(123, 44, 191, 0.25);
    background: #faf5ff;
}

.dm-notes p {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    color: var(--text-dark);
}

.dm-notes small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

@media (max-width: 991.98px) {
    .dashboard-minimal__layout {
        display: block;
        padding: 0;
    }

    .dashboard-minimal__cluster {
        width: 100%;
        max-width: none;
    }

    .dashboard-minimal__container {
        width: 100%;
        max-width: 1040px;
        margin: 0 auto;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .dashboard-ad-rail {
        position: static;
        width: auto;
    }

    .dm-quick-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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