/* Responsive width-only layer.
   Keeps each page's original colors, theme, logo styling, and behavior intact. */

html {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    text-size-adjust: 100%;
}

* {
    box-sizing: border-box;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.container,
.shell {
    width: min(1840px, calc(100vw - clamp(24px, 4vw, 96px))) !important;
    max-width: 1840px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.grid,
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
}

.hero {
    width: 100% !important;
}

.hero h1,
h1,
h2,
h3,
p,
label,
button,
a {
    overflow-wrap: anywhere;
}

.dashboard-layout,
.main-content,
.sidebar,
.table-wrap {
    min-width: 0;
}

.dashboard-layout {
    width: 100%;
}

table {
    width: 100% !important;
    max-width: 100%;
}

.invite-box,
.header,
.dash-header,
.button-row,
.hero-actions,
.trust-row {
    flex-wrap: wrap;
}

.market-visual {
    min-height: clamp(360px, 42vw, 720px) !important;
}

input,
select,
textarea,
button,
.btn {
    max-width: 100%;
}

@media (min-width: 1800px) {
    body {
        font-size: 18px;
    }

    .hero {
        min-height: min(900px, calc(100svh - 70px)) !important;
    }
}

@media (max-width: 980px) {
    .container,
    .shell {
        width: min(100% - 28px, 1840px) !important;
    }

    .hero {
        min-height: auto !important;
    }

    .dashboard-layout {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
        position: static !important;
    }
}

@media (max-width: 680px) {
    .container,
    .shell {
        width: calc(100vw - 24px) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .navbar {
        width: 100% !important;
        box-sizing: border-box;
    }

    .grid,
    .stats-grid,
    .trust-row {
        grid-template-columns: 1fr !important;
    }

    .hero-actions .btn,
    .nav-actions .btn,
    .invite-box .btn-primary,
    .header .btn-primary {
        width: 100%;
        box-sizing: border-box;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
