/* ==========================================================================
   Layout Shell — spacing & grid fixes (loads LAST)
   Fixes overlap from legacy style.css margins/padding
   ========================================================================== */

/* ---- App shell (user panel) ---- */
.crypto-theme .user-shell {
    margin-top: 92px;
    padding: 0 0 3rem;
}

.crypto-theme .user-shell-container {
    max-width: 1400px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.crypto-theme .user-shell-grid {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.crypto-theme .user-shell-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 108px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.crypto-theme .user-shell-main {
    min-width: 0;
    width: 100%;
}

@media (max-width: 991.98px) {
    .crypto-theme .user-shell-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .crypto-theme .user-shell-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

/* ---- Front main ---- */
.crypto-theme .vine-main {
    margin: 92px 0 2rem !important;
    padding: 0 !important;
    overflow: visible;
}

.crypto-theme .vine-main > .container {
    padding-left: 1rem;
    padding-right: 1rem;
    overflow: visible;
}

.crypto-theme .vine-navbar {
    overflow: visible;
}

/* ---- Navbar ---- */
.crypto-theme .vine-navbar {
    min-height: 64px;
    z-index: 1030;
}

.crypto-theme .vine-navbar .navbar > .container {
    gap: 0.5rem;
}

.crypto-theme .vine-navbar .navbar {
    min-height: 64px;
    padding: 0.5rem 0 !important;
}

.crypto-theme .header-end {
    flex-shrink: 1;
    min-width: 0;
    gap: 0.25rem !important;
}

.crypto-theme .header-end .h-col {
    margin-left: 0.25rem !important;
}

.crypto-theme .header-end .nav-item.ms-3 {
    margin-left: 0.35rem !important;
}

.crypto-theme .header-end .btn.rounded-5 {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.82rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .crypto-theme .header-end .btn.rounded-5.px-4 {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }
}

/* ---- Dashboard cards — kill double padding/margin ---- */
.crypto-theme .dashboard-card {
    margin: 0 0 1.25rem !important;
    padding: 0 !important;
    overflow: hidden;
}

.crypto-theme .dashboard-card .dashboard-header,
.crypto-theme .dashboard-card .dashboard-body {
    padding: 1.15rem 1.35rem !important;
}

.crypto-theme .dashboard-card .dashboard-body.p-0,
.crypto-theme .dashboard-card .dashboard-body.py-3 {
    padding: 1.15rem 1.35rem !important;
}

.crypto-theme .dashboard-card.mb-5,
.crypto-theme .dashboard-card.mb-xl-10 {
    margin-bottom: 1.25rem !important;
}

.crypto-theme .user-shell-main > .mb-4:first-child,
.crypto-theme .user-shell-main > div:first-child.mb-4 {
    margin-bottom: 1.25rem !important;
}

.crypto-theme .user-shell-main .row.g-3 {
    margin-bottom: 1.25rem !important;
}

.crypto-theme .user-shell-main h4 {
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.crypto-theme .user-shell-main .text-muted.small,
.crypto-theme .user-shell-main p.text-muted.mb-0 {
    line-height: 1.45;
}

/* ---- Sidebar ---- */
.crypto-theme .dash-sidebar {
    padding: 1rem 0.5rem 1rem 0 !important;
    margin: 0 !important;
    width: 100%;
}

.crypto-theme .dash-sidebar .ps-3 {
    padding: 0 0.75rem 0.85rem !important;
    margin-bottom: 0.65rem !important;
}

.crypto-theme .dash-sidebar .navbar-nav {
    gap: 0.1rem;
}

.crypto-theme .dash-sidebar .navbar-nav .nav-item .nav-link {
    padding: 0.55rem 0.85rem !important;
    margin: 0.08rem 0.35rem !important;
    font-size: 0.88rem !important;
    line-height: 1.35;
    white-space: normal;
}

.crypto-theme .dash-sidebar .nav-link-text {
    flex: 1;
    min-width: 0;
}

.crypto-theme .dash-sidebar .nav-icon-wrap {
    flex-shrink: 0;
    width: 1.35rem;
    margin-right: 0.65rem !important;
}

.crypto-theme .dash-sidebar .navbar-nav .nav-info {
    margin-top: 0.85rem !important;
    padding: 0.25rem 0.85rem !important;
}

.crypto-theme .dash-sidebar .sidebar-ad-wrap {
    padding: 0.5rem 0.65rem !important;
    margin: 0.5rem 0 !important;
}

.crypto-theme .dash-sidebar .sidebar-ad-box .ad-content iframe {
    min-height: 120px !important;
    max-height: 160px !important;
}

/* ---- Page sections spacing ---- */
.crypto-theme .user-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.crypto-theme .user-page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crypto-theme .user-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .crypto-theme .user-stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.crypto-theme .user-stat-grid .dashboard-card {
    margin-bottom: 0 !important;
    height: 100%;
}

.crypto-theme .user-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.crypto-theme .user-action-row .btn {
    margin: 0 !important;
}

/* ---- Forms & filters ---- */
.crypto-theme form.row.g-2.align-items-end {
    row-gap: 0.65rem !important;
}

.crypto-theme form.row.g-2.align-items-end .btn {
    margin-top: 0;
}

/* ---- Tables ---- */
.crypto-theme .table-responsive {
    margin-top: 0.5rem;
    border-radius: 10px;
}

.crypto-theme .table > :not(caption) > * > * {
    padding: 0.7rem 0.75rem;
}

/* ---- Homepage ---- */
.crypto-theme .home-content-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.crypto-theme .crypto-home-hero {
    margin-bottom: 0 !important;
}

.crypto-theme .crypto-tags-wrap {
    margin-bottom: 0 !important;
}

.crypto-theme .home-video-strip {
    margin-bottom: 0 !important;
}

.crypto-theme .home-all-videos {
    margin-top: 0 !important;
}

/* ---- Video grid ---- */
.crypto-theme .videos > .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.crypto-theme .video-post {
    margin-bottom: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.crypto-theme .video-post > a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ---- Profile ---- */
.crypto-theme .crypto-profile-card {
    margin-bottom: 1.5rem !important;
}

/* ---- Switcher don't overlap content ---- */
.crypto-theme #theme-switcher {
    z-index: 1020;
}
