/* ==========================================================================
   INAIVOM - Layout
   File: app/static/css/layout.css
   Premium Matrimony Platform
   Theme: Maroon #800020 | Gold #D4AF37 | White
   ========================================================================== */


/* ==========================================================================
   1. LAYOUT VARIABLES
   ========================================================================== */

:root {
    --layout-maroon: #800020;
    --layout-maroon-dark: #5f0018;
    --layout-maroon-light: #9b1738;

    --layout-gold: #d4af37;
    --layout-gold-light: #ead77f;

    --layout-white: #ffffff;
    --layout-bg: #ffffff;
    --layout-bg-soft: #fdfafb;
    --layout-bg-muted: #f7f4f5;

    --layout-text: #2d282b;
    --layout-muted: #766e73;
    --layout-border: #ebe5e8;

    --layout-container-sm: 720px;
    --layout-container-md: 960px;
    --layout-container-lg: 1140px;
    --layout-container-xl: 1320px;

    --layout-gutter: 1.5rem;
    --layout-gutter-mobile: 1rem;

    --layout-header-height: 72px;

    --layout-sidebar-width: 280px;
    --layout-sidebar-collapsed: 78px;

    --layout-radius: 12px;
    --layout-radius-lg: 18px;

    --layout-shadow:
        0 8px 28px rgba(42, 24, 31, 0.06);

    --layout-transition:
        220ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   2. DOCUMENT STRUCTURE
   ========================================================================== */

html {
    min-height: 100%;

    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--layout-header-height) + 1rem);
}

body {
    min-width: 320px;
    min-height: 100vh;

    margin: 0;

    background: var(--layout-bg);
    color: var(--layout-text);
}

body.no-scroll,
body.menu-open,
body.modal-open {
    overflow: hidden;
}


/* ==========================================================================
   3. APPLICATION WRAPPER
   ========================================================================== */

.app,
.app-wrapper,
.site-wrapper,
.page-wrapper {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 100vh;
}

.site-main,
.main-content,
.page-main {
    position: relative;

    flex: 1 0 auto;

    width: 100%;
}


/* ==========================================================================
   4. STANDARD CONTAINER
   ========================================================================== */

.container,
.layout-container {
    width: 100%;
    max-width: var(--layout-container-xl);

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}

.container-fluid {
    width: 100%;

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}


/* ==========================================================================
   5. CONTAINER SIZES
   ========================================================================== */

.container-sm {
    width: 100%;
    max-width: var(--layout-container-sm);

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}

.container-md {
    width: 100%;
    max-width: var(--layout-container-md);

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}

.container-lg {
    width: 100%;
    max-width: var(--layout-container-lg);

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}

.container-xl {
    width: 100%;
    max-width: var(--layout-container-xl);

    margin-right: auto;
    margin-left: auto;

    padding-right: var(--layout-gutter);
    padding-left: var(--layout-gutter);
}


/* ==========================================================================
   6. NARROW CONTENT
   ========================================================================== */

.content-narrow {
    width: 100%;
    max-width: 760px;

    margin-right: auto;
    margin-left: auto;
}

.content-medium {
    width: 100%;
    max-width: 960px;

    margin-right: auto;
    margin-left: auto;
}

.content-wide {
    width: 100%;
    max-width: 1180px;

    margin-right: auto;
    margin-left: auto;
}


/* ==========================================================================
   7. SECTION
   ========================================================================== */

.section {
    position: relative;

    width: 100%;

    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.section-sm {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-lg {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.section-xl {
    padding-top: 7.5rem;
    padding-bottom: 7.5rem;
}


/* ==========================================================================
   8. SECTION BACKGROUNDS
   ========================================================================== */

.section-white {
    background: #ffffff;
}

.section-soft {
    background:
        linear-gradient(
            180deg,
            #fffdfd 0%,
            var(--layout-bg-soft) 100%
        );
}

.section-muted {
    background: var(--layout-bg-muted);
}

.section-maroon {
    background:
        linear-gradient(
            145deg,
            var(--layout-maroon-dark),
            var(--layout-maroon)
        );

    color: #ffffff;
}

.section-gold-soft {
    background:
        linear-gradient(
            145deg,
            #fffdf5,
            #fff9e7
        );
}


/* ==========================================================================
   9. SECTION DIVIDER
   ========================================================================== */

.section-border-top {
    border-top: 1px solid var(--layout-border);
}

.section-border-bottom {
    border-bottom: 1px solid var(--layout-border);
}

.section-divider {
    width: 100%;
    height: 1px;

    border: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(128, 0, 32, 0.12),
            transparent
        );
}


/* ==========================================================================
   10. SECTION HEADER
   ========================================================================== */

.section-header {
    width: 100%;
    max-width: 760px;

    margin: 0 auto 2.5rem;

    text-align: center;
}

.section-header-left {
    margin-right: 0;
    margin-left: 0;

    text-align: left;
}

.section-eyebrow,
.section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;

    margin-bottom: 0.65rem;

    color: var(--layout-maroon);

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;

    color: var(--layout-maroon);

    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
}

.section-subtitle,
.section-description {
    max-width: 680px;

    margin: 0.8rem auto 0;

    color: var(--layout-muted);

    font-size: 0.92rem;
    line-height: 1.7;
}

.section-header-left .section-subtitle,
.section-header-left .section-description {
    margin-right: 0;
    margin-left: 0;
}


/* ==========================================================================
   11. ROW
   ========================================================================== */

.row {
    display: flex;
    flex-wrap: wrap;

    margin-right: calc(var(--layout-gutter) * -0.5);
    margin-left: calc(var(--layout-gutter) * -0.5);
}

.row > * {
    width: 100%;

    padding-right: calc(var(--layout-gutter) * 0.5);
    padding-left: calc(var(--layout-gutter) * 0.5);
}


/* ==========================================================================
   12. ROW GAPS
   ========================================================================== */

.row-gap-0 {
    row-gap: 0;
}

.row-gap-1 {
    row-gap: 0.5rem;
}

.row-gap-2 {
    row-gap: 1rem;
}

.row-gap-3 {
    row-gap: 1.5rem;
}

.row-gap-4 {
    row-gap: 2rem;
}

.row-gap-5 {
    row-gap: 3rem;
}


/* ==========================================================================
   13. COLUMNS
   ========================================================================== */

.col {
    flex: 1 0 0%;
}

.col-auto {
    width: auto;

    flex: 0 0 auto;
}

.col-1 {
    width: 8.333333%;
}

.col-2 {
    width: 16.666667%;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.333333%;
}

.col-5 {
    width: 41.666667%;
}

.col-6 {
    width: 50%;
}

.col-7 {
    width: 58.333333%;
}

.col-8 {
    width: 66.666667%;
}

.col-9 {
    width: 75%;
}

.col-10 {
    width: 83.333333%;
}

.col-11 {
    width: 91.666667%;
}

.col-12 {
    width: 100%;
}


/* ==========================================================================
   14. CSS GRID
   ========================================================================== */

.grid {
    display: grid;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}


/* ==========================================================================
   15. AUTO GRID
   ========================================================================== */

.grid-auto-sm {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(160px, 1fr)
        );
}

.grid-auto {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );
}

.grid-auto-lg {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );
}


/* ==========================================================================
   16. GRID GAPS
   ========================================================================== */

.gap-0 {
    gap: 0;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.gap-5 {
    gap: 3rem;
}


/* ==========================================================================
   17. FLEX
   ========================================================================== */

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.flex-grow-1 {
    flex-grow: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}


/* ==========================================================================
   18. ALIGNMENT
   ========================================================================== */

.align-items-start {
    align-items: flex-start;
}

.align-items-center {
    align-items: center;
}

.align-items-end {
    align-items: flex-end;
}

.align-items-stretch {
    align-items: stretch;
}

.justify-content-start {
    justify-content: flex-start;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-around {
    justify-content: space-around;
}


/* ==========================================================================
   19. PAGE CONTENT
   ========================================================================== */

.page-content {
    width: 100%;

    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.page-content-sm {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.page-content-lg {
    padding-top: 3rem;
    padding-bottom: 5rem;
}


/* ==========================================================================
   20. PAGE HEADER
   ========================================================================== */

.page-header {
    position: relative;

    padding: 2.2rem 0;

    border-bottom: 1px solid var(--layout-border);

    background:
        linear-gradient(
            135deg,
            #fffafb 0%,
            #ffffff 50%,
            #fffdf6 100%
        );
}

.page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.page-header-content {
    min-width: 0;
}

.page-title {
    margin: 0;

    color: var(--layout-maroon);

    font-size: clamp(1.45rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
}

.page-description {
    max-width: 720px;

    margin: 0.45rem 0 0;

    color: var(--layout-muted);

    font-size: 0.82rem;
    line-height: 1.6;
}

.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 0.6rem;

    flex-shrink: 0;
}


/* ==========================================================================
   21. BREADCRUMB AREA
   ========================================================================== */

.breadcrumb-wrapper {
    padding: 0.8rem 0;

    border-bottom: 1px solid var(--layout-border);

    background: #ffffff;
}


/* ==========================================================================
   22. HERO LAYOUT
   ========================================================================== */

.hero-section {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 520px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #fff8fa 0%,
            #ffffff 48%,
            #fffbea 100%
        );
}

.hero-container {
    position: relative;
    z-index: 2;

    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(360px, 0.95fr);

    align-items: center;

    gap: 4rem;
}

.hero-content {
    max-width: 650px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.75rem;

    margin-top: 1.5rem;
}

.hero-media {
    position: relative;

    min-width: 0;
}


/* ==========================================================================
   23. SPLIT LAYOUT
   ========================================================================== */

.split-layout {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: center;

    gap: 3.5rem;
}

.split-layout-reverse .split-media {
    order: 2;
}

.split-layout-reverse .split-content {
    order: 1;
}

.split-content,
.split-media {
    min-width: 0;
}


/* ==========================================================================
   24. SIDEBAR LAYOUT
   ========================================================================== */

.sidebar-layout {
    display: grid;
    grid-template-columns:
        minmax(220px, 280px)
        minmax(0, 1fr);

    align-items: start;

    gap: 1.75rem;
}

.sidebar-layout-wide {
    grid-template-columns:
        minmax(260px, 320px)
        minmax(0, 1fr);
}

.sidebar-layout-right {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(220px, 280px);
}

.sidebar,
.page-sidebar {
    min-width: 0;
}

.content-area,
.page-content-area {
    min-width: 0;
}


/* ==========================================================================
   25. STICKY SIDEBAR
   ========================================================================== */

.sidebar-sticky {
    position: sticky;
    top: calc(var(--layout-header-height) + 1.25rem);

    max-height: calc(100vh - var(--layout-header-height) - 2.5rem);

    overflow-y: auto;
}


/* ==========================================================================
   26. DASHBOARD LAYOUT
   ========================================================================== */

.dashboard-layout {
    display: flex;

    width: 100%;
    min-height: calc(100vh - var(--layout-header-height));

    background: #f8f5f6;
}

.dashboard-sidebar {
    position: relative;

    width: var(--layout-sidebar-width);

    flex: 0 0 var(--layout-sidebar-width);

    border-right: 1px solid var(--layout-border);

    background: #ffffff;

    transition:
        width var(--layout-transition),
        flex-basis var(--layout-transition);
}

.dashboard-main {
    min-width: 0;

    flex: 1 1 auto;
}

.dashboard-content {
    width: 100%;

    padding: 1.5rem;
}


/* ==========================================================================
   27. COLLAPSED DASHBOARD SIDEBAR
   ========================================================================== */

.dashboard-layout.sidebar-collapsed .dashboard-sidebar {
    width: var(--layout-sidebar-collapsed);

    flex-basis: var(--layout-sidebar-collapsed);
}


/* ==========================================================================
   28. DASHBOARD CONTENT HEADER
   ========================================================================== */

.dashboard-header,
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 1.5rem;
}

.dashboard-header-content,
.content-header-main {
    min-width: 0;
}

.dashboard-header-actions,
.content-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 0.55rem;

    flex-shrink: 0;
}


/* ==========================================================================
   29. DASHBOARD GRID
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    gap: 1.25rem;
}

.dashboard-col-3 {
    grid-column: span 3;
}

.dashboard-col-4 {
    grid-column: span 4;
}

.dashboard-col-6 {
    grid-column: span 6;
}

.dashboard-col-8 {
    grid-column: span 8;
}

.dashboard-col-9 {
    grid-column: span 9;
}

.dashboard-col-12 {
    grid-column: span 12;
}


/* ==========================================================================
   30. PROFILE PAGE LAYOUT
   ========================================================================== */

.profile-layout {
    display: grid;
    grid-template-columns:
        minmax(240px, 300px)
        minmax(0, 1fr);

    align-items: start;

    gap: 1.5rem;
}

.profile-sidebar {
    min-width: 0;
}

.profile-main {
    min-width: 0;
}


/* ==========================================================================
   31. PROFILE VIEW LAYOUT
   ========================================================================== */

.profile-view-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(260px, 320px);

    align-items: start;

    gap: 1.5rem;
}


/* ==========================================================================
   32. SEARCH PAGE LAYOUT
   ========================================================================== */

.search-layout {
    display: grid;
    grid-template-columns:
        minmax(240px, 285px)
        minmax(0, 1fr);

    align-items: start;

    gap: 1.5rem;
}

.search-filters {
    min-width: 0;
}

.search-results {
    min-width: 0;
}


/* ==========================================================================
   33. SEARCH RESULTS GRID
   ========================================================================== */

.profile-grid,
.search-results-grid,
.matches-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(250px, 1fr)
        );

    gap: 1.25rem;
}


/* ==========================================================================
   34. MATCHES LAYOUT
   ========================================================================== */

.matches-layout {
    width: 100%;
}

.matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 1rem;

    margin-bottom: 1.5rem;
}


/* ==========================================================================
   35. CHAT LAYOUT
   ========================================================================== */

.chat-layout {
    display: grid;
    grid-template-columns:
        minmax(260px, 340px)
        minmax(0, 1fr);

    height: calc(100vh - var(--layout-header-height) - 2rem);
    min-height: 560px;

    overflow: hidden;

    border: 1px solid var(--layout-border);
    border-radius: var(--layout-radius-lg);

    background: #ffffff;

    box-shadow: var(--layout-shadow);
}

.chat-sidebar {
    min-width: 0;

    overflow: hidden;

    border-right: 1px solid var(--layout-border);
}

.chat-main {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 0;
}


/* ==========================================================================
   36. TWO PANEL LAYOUT
   ========================================================================== */

.two-panel-layout {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1.5rem;
}

.two-panel-primary,
.two-panel-secondary {
    min-width: 0;
}


/* ==========================================================================
   37. THREE PANEL LAYOUT
   ========================================================================== */

.three-panel-layout {
    display: grid;
    grid-template-columns:
        minmax(200px, 240px)
        minmax(0, 1fr)
        minmax(220px, 280px);

    align-items: start;

    gap: 1.25rem;
}


/* ==========================================================================
   38. AUTH LAYOUT
   ========================================================================== */

.auth-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(420px, 520px);

    min-height: 100vh;

    background: #ffffff;
}

.auth-visual {
    position: relative;

    min-height: 100%;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            var(--layout-maroon-dark),
            var(--layout-maroon)
        );
}

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 3rem;
}

.auth-content-inner {
    width: 100%;
    max-width: 430px;
}


/* ==========================================================================
   39. CENTERED AUTH LAYOUT
   ========================================================================== */

.auth-centered {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 2rem 1rem;

    background:
        linear-gradient(
            145deg,
            #fff8fa,
            #ffffff 55%,
            #fffbed
        );
}

.auth-centered-inner {
    width: 100%;
    max-width: 460px;
}


/* ==========================================================================
   40. ADMIN LAYOUT SUPPORT
   ========================================================================== */

.admin-layout {
    display: flex;

    width: 100%;
    min-height: 100vh;

    background: #f6f3f4;
}

.admin-sidebar {
    width: var(--layout-sidebar-width);

    flex: 0 0 var(--layout-sidebar-width);

    background: #ffffff;

    transition:
        width var(--layout-transition),
        flex-basis var(--layout-transition);
}

.admin-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    min-width: 0;
}

.admin-content {
    flex: 1 0 auto;

    width: 100%;

    padding: 1.5rem;
}

.admin-layout.sidebar-collapsed .admin-sidebar {
    width: var(--layout-sidebar-collapsed);

    flex-basis: var(--layout-sidebar-collapsed);
}


/* ==========================================================================
   41. CARD GRID LAYOUT
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px, 1fr)
        );

    gap: 1.25rem;
}

.card-grid-lg {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(310px, 1fr)
        );

    gap: 1.5rem;
}


/* ==========================================================================
   42. STATS GRID
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 1rem;
}

.stats-grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.stats-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


/* ==========================================================================
   43. TABLE LAYOUT WRAPPER
   ========================================================================== */

.table-layout,
.table-responsive {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}

.table-layout-inner {
    min-width: 720px;
}


/* ==========================================================================
   44. TOOLBAR LAYOUT
   ========================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 0.75rem;

    margin-bottom: 1rem;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.55rem;
}


/* ==========================================================================
   45. FILTER BAR
   ========================================================================== */

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 0.75rem;

    padding: 0.9rem 1rem;

    border: 1px solid var(--layout-border);
    border-radius: var(--layout-radius);

    background: #ffffff;
}

.filter-bar-left,
.filter-bar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.55rem;
}


/* ==========================================================================
   46. EMPTY STATE LAYOUT
   ========================================================================== */

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    width: 100%;
    min-height: 320px;

    padding: 2.5rem 1.5rem;

    text-align: center;
}

.empty-state-content {
    width: 100%;
    max-width: 460px;
}


/* ==========================================================================
   47. ERROR PAGE LAYOUT
   ========================================================================== */

.error-layout {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: calc(100vh - var(--layout-header-height));

    padding: 3rem 1rem;

    text-align: center;
}

.error-content {
    width: 100%;
    max-width: 620px;
}


/* ==========================================================================
   48. MODAL LAYOUT SUPPORT
   ========================================================================== */

.modal-open .site-wrapper,
.modal-open .app-wrapper {
    overflow: hidden;
}


/* ==========================================================================
   49. MEDIA WRAPPER
   ========================================================================== */

.media-wrapper {
    position: relative;

    width: 100%;

    overflow: hidden;
}

.media-wrapper img,
.media-wrapper video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ==========================================================================
   50. ASPECT RATIOS
   ========================================================================== */

.ratio {
    position: relative;

    width: 100%;
}

.ratio::before {
    display: block;

    padding-top: var(--ratio);

    content: "";
}

.ratio > * {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.ratio-1x1 {
    --ratio: 100%;
}

.ratio-4x3 {
    --ratio: 75%;
}

.ratio-3x2 {
    --ratio: 66.666667%;
}

.ratio-16x9 {
    --ratio: 56.25%;
}


/* ==========================================================================
   51. STICKY ELEMENTS
   ========================================================================== */

.sticky-top {
    position: sticky;
    top: 0;

    z-index: 100;
}

.sticky-header-offset {
    position: sticky;
    top: calc(var(--layout-header-height) + 1rem);
}


/* ==========================================================================
   52. FULL HEIGHT
   ========================================================================== */

.min-vh-100 {
    min-height: 100vh;
}

.vh-100 {
    height: 100vh;
}

.full-height {
    min-height: 100%;
}


/* ==========================================================================
   53. OVERFLOW
   ========================================================================== */

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}


/* ==========================================================================
   54. POSITION
   ========================================================================== */

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.position-sticky {
    position: sticky;
}


/* ==========================================================================
   55. WIDTH
   ========================================================================== */

.w-25 {
    width: 25%;
}

.w-50 {
    width: 50%;
}

.w-75 {
    width: 75%;
}

.w-100 {
    width: 100%;
}

.w-auto {
    width: auto;
}


/* ==========================================================================
   56. HEIGHT
   ========================================================================== */

.h-25 {
    height: 25%;
}

.h-50 {
    height: 50%;
}

.h-75 {
    height: 75%;
}

.h-100 {
    height: 100%;
}

.h-auto {
    height: auto;
}


/* ==========================================================================
   57. MARGIN AUTO
   ========================================================================== */

.mx-auto {
    margin-right: auto;
    margin-left: auto;
}

.ml-auto,
.ms-auto {
    margin-left: auto;
}

.mr-auto,
.me-auto {
    margin-right: auto;
}


/* ==========================================================================
   58. LAYOUT SPACING
   ========================================================================== */

.layout-stack {
    display: flex;
    flex-direction: column;

    gap: 1rem;
}

.layout-stack-sm {
    gap: 0.5rem;
}

.layout-stack-lg {
    gap: 1.5rem;
}

.layout-cluster {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.75rem;
}


/* ==========================================================================
   59. CENTER CONTENT
   ========================================================================== */

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-content-column {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}


/* ==========================================================================
   60. CONTENT SURFACE
   ========================================================================== */

.content-surface {
    width: 100%;

    padding: 1.5rem;

    border: 1px solid var(--layout-border);
    border-radius: var(--layout-radius-lg);

    background: #ffffff;

    box-shadow: var(--layout-shadow);
}

.content-surface-flat {
    box-shadow: none;
}


/* ==========================================================================
   61. PREMIUM CONTENT SURFACE
   ========================================================================== */

.premium-surface {
    position: relative;

    overflow: hidden;

    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: var(--layout-radius-lg);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fffdf7
        );

    box-shadow:
        0 10px 30px rgba(74, 52, 10, 0.07);
}

.premium-surface::before {
    content: "";

    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--layout-gold),
            transparent
        );
}


/* ==========================================================================
   62. PROFILE DETAILS GRID
   ========================================================================== */

.details-grid,
.profile-details-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1rem 1.5rem;
}


/* ==========================================================================
   63. ACTION BAR
   ========================================================================== */

.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 0.75rem;

    width: 100%;

    padding: 0.8rem 1rem;

    border: 1px solid var(--layout-border);
    border-radius: var(--layout-radius);

    background: #ffffff;
}


/* ==========================================================================
   64. BOTTOM ACTION BAR
   ========================================================================== */

.bottom-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 90;

    width: 100%;

    padding: 0.75rem 0;

    border-top: 1px solid var(--layout-border);

    background: rgba(255, 255, 255, 0.96);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* ==========================================================================
   65. MOBILE BOTTOM NAV SUPPORT
   ========================================================================== */

.has-mobile-bottom-nav {
    padding-bottom: 72px;
}

.mobile-bottom-nav {
    display: none;
}


/* ==========================================================================
   66. RESPONSIVE - XL
   ========================================================================== */

@media (max-width: 1399.98px) {

    .container,
    .layout-container,
    .container-xl {
        max-width: 1200px;
    }

    .hero-grid {
        gap: 3rem;
    }
}


/* ==========================================================================
   67. RESPONSIVE - LARGE
   ========================================================================== */

@media (max-width: 1199.98px) {

    .container,
    .layout-container,
    .container-xl {
        max-width: 1140px;
    }

    .grid-5,
    .grid-6 {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-col-3 {
        grid-column: span 6;
    }

    .dashboard-col-4 {
        grid-column: span 6;
    }

    .three-panel-layout {
        grid-template-columns:
            minmax(200px, 230px)
            minmax(0, 1fr);
    }

    .three-panel-layout > :last-child {
        grid-column: 1 / -1;
    }
}


/* ==========================================================================
   68. RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 991.98px) {

    :root {
        --layout-header-height: 64px;
    }

    .container,
    .layout-container,
    .container-lg,
    .container-xl {
        max-width: 960px;
    }

    .section {
        padding-top: 3.75rem;
        padding-bottom: 3.75rem;
    }

    .section-lg {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .section-xl {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .grid-4,
    .grid-5,
    .grid-6 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .hero-section {
        min-height: auto;

        padding: 4rem 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;

        gap: 2.5rem;
    }

    .hero-content {
        max-width: 760px;
    }

    .split-layout {
        grid-template-columns: 1fr;

        gap: 2rem;
    }

    .split-layout-reverse .split-media,
    .split-layout-reverse .split-content {
        order: initial;
    }

    .sidebar-layout,
    .sidebar-layout-wide,
    .sidebar-layout-right,
    .profile-layout,
    .profile-view-layout,
    .search-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-sticky {
        position: static;

        max-height: none;

        overflow: visible;
    }

    .dashboard-sidebar,
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1100;

        width: var(--layout-sidebar-width);

        transform: translateX(-100%);

        box-shadow:
            8px 0 30px rgba(30, 17, 22, 0.14);

        transition:
            transform var(--layout-transition);
    }

    .dashboard-layout.sidebar-open .dashboard-sidebar,
    .admin-layout.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .dashboard-layout.sidebar-collapsed .dashboard-sidebar,
    .admin-layout.sidebar-collapsed .admin-sidebar {
        width: var(--layout-sidebar-width);

        flex-basis: var(--layout-sidebar-width);
    }

    .dashboard-content,
    .admin-content {
        padding: 1.25rem;
    }

    .dashboard-col-8,
    .dashboard-col-9 {
        grid-column: span 12;
    }

    .chat-layout {
        grid-template-columns:
            minmax(240px, 300px)
            minmax(0, 1fr);
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-content {
        min-height: 100vh;

        padding: 2.5rem 1.5rem;
    }
}


/* ==========================================================================
   69. RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 767.98px) {

    :root {
        --layout-gutter: 1rem;
        --layout-header-height: 60px;
    }

    .container,
    .layout-container,
    .container-fluid,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: 100%;

        padding-right: var(--layout-gutter-mobile);
        padding-left: var(--layout-gutter-mobile);
    }

    .section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section-sm {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .section-lg,
    .section-xl {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .section-header {
        margin-bottom: 1.75rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .section-subtitle,
    .section-description {
        font-size: 0.84rem;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5,
    .grid-6 {
        grid-template-columns: 1fr;
    }

    .page-content {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }

    .page-header {
        padding: 1.5rem 0;
    }

    .page-header-inner {
        align-items: flex-start;
        flex-direction: column;

        gap: 1rem;
    }

    .page-header-actions {
        justify-content: flex-start;

        width: 100%;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-grid {
        gap: 2rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn,
    .hero-actions button {
        width: 100%;
    }

    .dashboard-content,
    .admin-content {
        padding: 1rem;
    }

    .dashboard-header,
    .content-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header-actions,
    .content-header-actions {
        justify-content: flex-start;

        width: 100%;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    .dashboard-col-3,
    .dashboard-col-4,
    .dashboard-col-6,
    .dashboard-col-8,
    .dashboard-col-9,
    .dashboard-col-12 {
        grid-column: span 12;
    }

    .stats-grid,
    .stats-grid-2,
    .stats-grid-3 {
        grid-template-columns: 1fr;
    }

    .profile-grid,
    .search-results-grid,
    .matches-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(220px, 1fr)
            );
    }

    .chat-layout {
        position: relative;

        display: block;

        height: calc(100vh - var(--layout-header-height));
        min-height: 500px;

        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .chat-sidebar {
        width: 100%;
        height: 100%;

        border-right: 0;
    }

    .chat-main {
        position: absolute;
        inset: 0;

        width: 100%;

        background: #ffffff;

        transform: translateX(100%);

        transition:
            transform var(--layout-transition);
    }

    .chat-layout.chat-open .chat-main {
        transform: translateX(0);
    }

    .two-panel-layout,
    .three-panel-layout {
        grid-template-columns: 1fr;
    }

    .three-panel-layout > :last-child {
        grid-column: auto;
    }

    .details-grid,
    .profile-details-grid {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .filter-bar,
    .action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar-left,
    .toolbar-right,
    .filter-bar-left,
    .filter-bar-right {
        width: 100%;
    }

    .content-surface {
        padding: 1.1rem;

        border-radius: 14px;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;

        display: flex;
        align-items: center;
        justify-content: space-around;

        min-height: 64px;

        padding:
            0.4rem
            max(0.5rem, env(safe-area-inset-right))
            calc(0.4rem + env(safe-area-inset-bottom))
            max(0.5rem, env(safe-area-inset-left));

        border-top: 1px solid var(--layout-border);

        background: rgba(255, 255, 255, 0.97);

        box-shadow:
            0 -6px 22px rgba(35, 21, 27, 0.08);

        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}


/* ==========================================================================
   70. RESPONSIVE - SMALL MOBILE
   ========================================================================== */

@media (max-width: 575.98px) {

    .section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .section-lg,
    .section-xl {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .page-title {
        font-size: 1.45rem;
    }

    .page-description {
        font-size: 0.78rem;
    }

    .profile-grid,
    .search-results-grid,
    .matches-grid,
    .card-grid,
    .card-grid-lg,
    .grid-auto-sm,
    .grid-auto,
    .grid-auto-lg {
        grid-template-columns: 1fr;
    }

    .matches-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-content,
    .admin-content {
        padding: 0.85rem;
    }

    .auth-content {
        padding: 2rem 1rem;
    }

    .auth-centered {
        padding: 1.5rem 1rem;
    }

    .content-surface {
        padding: 1rem;

        border-radius: 12px;
    }

    .bottom-action-bar {
        padding-bottom:
            calc(0.75rem + env(safe-area-inset-bottom));
    }
}


/* ==========================================================================
   71. RESPONSIVE COLUMNS - MD
   ========================================================================== */

@media (min-width: 768px) {

    .col-md-1 {
        width: 8.333333%;
    }

    .col-md-2 {
        width: 16.666667%;
    }

    .col-md-3 {
        width: 25%;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-5 {
        width: 41.666667%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-7 {
        width: 58.333333%;
    }

    .col-md-8 {
        width: 66.666667%;
    }

    .col-md-9 {
        width: 75%;
    }

    .col-md-10 {
        width: 83.333333%;
    }

    .col-md-11 {
        width: 91.666667%;
    }

    .col-md-12 {
        width: 100%;
    }
}


/* ==========================================================================
   72. RESPONSIVE COLUMNS - LG
   ========================================================================== */

@media (min-width: 992px) {

    .col-lg-1 {
        width: 8.333333%;
    }

    .col-lg-2 {
        width: 16.666667%;
    }

    .col-lg-3 {
        width: 25%;
    }

    .col-lg-4 {
        width: 33.333333%;
    }

    .col-lg-5 {
        width: 41.666667%;
    }

    .col-lg-6 {
        width: 50%;
    }

    .col-lg-7 {
        width: 58.333333%;
    }

    .col-lg-8 {
        width: 66.666667%;
    }

    .col-lg-9 {
        width: 75%;
    }

    .col-lg-10 {
        width: 83.333333%;
    }

    .col-lg-11 {
        width: 91.666667%;
    }

    .col-lg-12 {
        width: 100%;
    }
}


/* ==========================================================================
   73. RESPONSIVE COLUMNS - XL
   ========================================================================== */

@media (min-width: 1200px) {

    .col-xl-1 {
        width: 8.333333%;
    }

    .col-xl-2 {
        width: 16.666667%;
    }

    .col-xl-3 {
        width: 25%;
    }

    .col-xl-4 {
        width: 33.333333%;
    }

    .col-xl-5 {
        width: 41.666667%;
    }

    .col-xl-6 {
        width: 50%;
    }

    .col-xl-7 {
        width: 58.333333%;
    }

    .col-xl-8 {
        width: 66.666667%;
    }

    .col-xl-9 {
        width: 75%;
    }

    .col-xl-10 {
        width: 83.333333%;
    }

    .col-xl-11 {
        width: 91.666667%;
    }

    .col-xl-12 {
        width: 100%;
    }
}


/* ==========================================================================
   74. MOBILE VISIBILITY
   ========================================================================== */

.mobile-only {
    display: none;
}

.desktop-only {
    display: initial;
}

@media (max-width: 767.98px) {

    .mobile-only {
        display: initial;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-d-flex {
        display: flex !important;
    }

    .mobile-d-block {
        display: block !important;
    }

    .mobile-d-none {
        display: none !important;
    }
}


/* ==========================================================================
   75. TABLET VISIBILITY
   ========================================================================== */

@media (max-width: 991.98px) {

    .tablet-d-none {
        display: none !important;
    }

    .tablet-d-block {
        display: block !important;
    }

    .tablet-d-flex {
        display: flex !important;
    }
}


/* ==========================================================================
   76. LAYOUT OVERLAY
   ========================================================================== */

.layout-overlay,
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;

    background: rgba(25, 12, 17, 0.48);

    opacity: 0;
    visibility: hidden;

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    transition:
        opacity var(--layout-transition),
        visibility var(--layout-transition);
}

.layout-overlay.show,
.sidebar-overlay.show,
.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}


/* ==========================================================================
   77. SAFE AREA SUPPORT
   ========================================================================== */

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-top {
    padding-top: env(safe-area-inset-top);
}


/* ==========================================================================
   78. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .dashboard-sidebar,
    .admin-sidebar,
    .chat-main,
    .layout-overlay,
    .sidebar-overlay {
        transition: none !important;
    }
}


/* ==========================================================================
   79. PRINT
   ========================================================================== */

@media print {

    body {
        min-width: 0;

        background: #ffffff !important;
    }

    .site-wrapper,
    .app-wrapper,
    .page-wrapper,
    .site-main,
    .main-content {
        display: block;

        min-height: auto;
    }

    .container,
    .layout-container,
    .container-fluid,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: none;

        padding-right: 0;
        padding-left: 0;
    }

    .section,
    .section-sm,
    .section-lg,
    .section-xl {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .dashboard-sidebar,
    .admin-sidebar,
    .page-sidebar,
    .search-filters,
    .mobile-bottom-nav,
    .bottom-action-bar,
    .layout-overlay,
    .sidebar-overlay {
        display: none !important;
    }

    .dashboard-layout,
    .admin-layout,
    .sidebar-layout,
    .search-layout,
    .profile-layout,
    .profile-view-layout {
        display: block;

        min-height: auto;
    }

    .dashboard-content,
    .admin-content,
    .page-content {
        padding: 0;
    }

    .content-surface,
    .premium-surface {
        border: 1px solid #cccccc;

        box-shadow: none !important;
    }

    .sticky-top,
    .sticky-header-offset,
    .sidebar-sticky {
        position: static;
    }

    .table-responsive,
    .table-layout {
        overflow: visible;
    }
}