/**
 * BOptionsB — единственный адаптивный слой (mobile → TV).
 * Подключается после app.css. Новые @media — только здесь.
 */
:root {
    --bp-xs: 360px;
    --bp-sm: 480px;
    --bp-md: 640px;
    --bp-lg: 767px;
    --bp-xl: 1023px;
    --bp-2xl: 1024px;
    --bp-3xl: 1536px;
    --bp-4xl: 1800px;
    --bp-5xl: 1920px;
    --bp-6xl: 2200px;
}

/* ============================================
   GLOBAL ADAPTIVE FOUNDATION
   Phones, tablets, desktops and TV screens
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    body {
        overflow-x: hidden;
    }
}

main,
section,
footer,
nav,
.card,
.card-body,
.card-header,
.card-footer,
.table-container,
.responsive-table-shell,
.payment-modal-dialog,
.payment-panel,
.payment-info-card,
.signal-card {
    min-width: 0;
}

img,
video {
    max-width: 100%;
    height: auto;
}

canvas {
    max-width: 100%;
}

@supports (content-visibility: auto) {
    main > section:not(:first-child),
    footer {
        content-visibility: auto;
        contain-intrinsic-size: auto 480px;
    }
}

svg {
    flex-shrink: 0;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.table-container,
.overflow-x-auto {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

:where(.card, .card-body, .card-header, .card-footer, .prose, .payment-modal-dialog, .signal-card, footer, nav) {
    overflow-wrap: anywhere;
}

.data-table th,
.data-table td {
    overflow-wrap: break-word;
    word-break: normal;
}

.responsive-table-shell {
    max-width: 100%;
}

.table-container .data-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.table-container .data-table--compact {
    table-layout: fixed;
    width: 100%;
}

.table-container .data-table--wide {
    width: auto;
    min-width: 56rem;
    max-width: none;
}

.table-container .data-table--wide th,
.table-container .data-table--wide td {
    max-width: none;
    overflow-wrap: break-word;
    word-break: normal;
}

.data-table th,
.data-table td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: break-word;
}

.data-table th {
    white-space: nowrap;
}

.data-table td {
    hyphens: none;
}

@media (max-width: 767px) {
    body {
        min-width: 0;
    }

    .relative.z-50.mx-auto.max-w-5xl {
        width: calc(100% - 1rem);
        padding-left: 0;
        padding-right: 0;
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav {
        border-radius: 1.25rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav .h-16 {
        height: 3.5rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav .px-5,
    .relative.z-50.mx-auto.max-w-5xl nav .sm\:px-6 {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav img.w-9 {
        width: 2rem;
        height: 2rem;
    }

    .relative.z-50.mx-auto.max-w-5xl nav .text-xl {
        font-size: 1.08rem;
        line-height: 1.2;
    }

    #mobile-menu {
        position: fixed;
        top: 4.75rem;
        left: 0.75rem;
        right: 0.75rem;
        max-height: calc(100dvh - 5.5rem);
        overflow-y: auto;
        border-radius: 1rem;
    }

    main > div[class*="max-w-"],
    section > div[class*="max-w-"],
    footer > div[class*="max-w-"] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    main > div[class*="py-8"] {
        padding-top: 1.25rem;
        padding-bottom: 1.5rem;
    }

    section.py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    section.py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .card {
        border-radius: 0.875rem;
    }

    .card-body,
    .card-header,
    .card-footer {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.45rem;
    }

    .stat-card .stat-label {
        font-size: 0.75rem;
    }

    .stat-card .flex,
    .card-body > .flex.items-center.justify-between {
        min-width: 0;
        gap: 0.875rem;
        flex-wrap: wrap;
    }

    .stat-card .stat-value,
    .stat-card .stat-label,
    .name-gradient-blue,
    .name-gradient-purple,
    .name-gradient-black {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .btn {
        min-height: 2.5rem;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    .btn-lg {
        min-height: 3rem;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .input,
    .form-input {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    aside.w-full.lg\:w-64.shrink-0 {
        display: none;
    }

    .md\:hidden.fixed.bottom-0 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .md\:hidden.fixed.bottom-0 .h-16 {
        height: 4.25rem;
    }

    .md\:hidden.fixed.bottom-0 a {
        min-width: 0;
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }

    .md\:hidden.fixed.bottom-0 span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #signal-ability-card .card-body > .flex {
        align-items: stretch;
    }

    #signal-ability-card form {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    #signal-ability-card select,
    #signal-ability-card button {
        width: 100%;
    }

    .signal-card {
        padding: 1rem !important;
    }

    .signal-card > .flex.items-center.justify-between {
        align-items: flex-start;
        gap: 1rem;
    }

    .signal-card .text-4xl,
    .signal-card .sm\:text-5xl {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1;
    }

    .signal-card .text-3xl,
    .signal-card .sm\:text-4xl {
        font-size: clamp(1.45rem, 8vw, 2.25rem);
        line-height: 1.1;
        letter-spacing: 0.04em;
    }

    .signal-card .grid.grid-cols-3 {
        gap: 0.75rem;
    }

    .signal-card form .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .card-body > .flex.gap-2:has(#referral-link) {
        flex-direction: column;
    }

    .card-body > .flex.gap-2:has(#referral-link) .btn {
        width: 100%;
    }

    footer .grid {
        gap: 1.5rem;
    }

    footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

@media (max-width: 480px) {
    h1,
    .text-2xl {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    h2,
    .text-xl {
        font-size: 1.2rem;
        line-height: 1.25;
    }

    .hero-gradient,
    section.min-h-\[600px\] {
        min-height: auto;
    }

    section.min-h-\[600px\] .py-20,
    section.min-h-\[600px\] .md\:py-32 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    section.min-h-\[600px\] h1 {
        font-size: clamp(2.15rem, 11vw, 3rem);
        line-height: 1.05;
    }

    section.min-h-\[600px\] p.text-lg {
        font-size: 1rem;
    }

    section.min-h-\[600px\] .flex.flex-wrap {
        flex-direction: column;
    }

    section.min-h-\[600px\] a {
        width: 100%;
        justify-content: center;
    }

    section.min-h-\[600px\] .grid.grid-cols-3 {
        gap: 0.75rem;
    }

    .signal-card > .flex.items-center.justify-between {
        flex-direction: column;
    }

    .signal-card .direction-up,
    .signal-card .direction-down {
        align-items: flex-start;
    }

    .signal-card .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .payment-method-track {
        grid-template-columns: 1fr !important;
    }

    #toast-container {
        left: 0.75rem !important;
        right: 0.75rem !important;
        width: auto !important;
    }
}

@media (max-width: 360px) {
    .relative.z-50.mx-auto.max-w-5xl nav .text-xl {
        max-width: 7.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .md\:hidden.fixed.bottom-0 span {
        display: none;
    }

    .md\:hidden.fixed.bottom-0 .h-16 {
        height: 3.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    aside.w-full.lg\:w-64.shrink-0 {
        display: block;
        width: 100%;
    }

    aside.w-full.lg\:w-64.shrink-0 .card {
        position: static;
    }

    aside.w-full.lg\:w-64.shrink-0 nav.space-y-1 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
        gap: 0.5rem;
    }

    aside.w-full.lg\:w-64.shrink-0 nav.space-y-1 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0 !important;
    }

    .sidebar-link {
        justify-content: center;
        text-align: center;
    }

    .grid.md\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    aside.w-full.lg\:w-64.shrink-0 {
        display: block;
    }
}

@media (min-width: 1536px) {
    .max-w-7xl {
        max-width: 88rem;
    }

    .max-w-5xl {
        max-width: 72rem;
    }

    .max-w-4xl {
        max-width: 64rem;
    }

    .card-body {
        padding: 1.75rem;
    }

    .card-header {
        padding: 1.35rem 1.75rem;
    }
}

@media (min-width: 1800px) {
    html {
        font-size: 17px;
    }

    .max-w-7xl {
        max-width: 100rem;
    }

    .max-w-5xl {
        max-width: 82rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.95rem 1.15rem;
    }

    .stat-card {
        padding: 1.45rem 1.7rem;
    }
}

@media (min-width: 2200px) {
    html {
        font-size: 18px;
    }

    .max-w-7xl {
        max-width: 116rem;
    }

    .max-w-5xl {
        max-width: 92rem;
    }
}

/* ============================================
   ADMIN PANEL RESPONSIVE LAYER
   ============================================ */
.install-page main {
    min-width: 0;
}

.install-page [data-install-platform] {
    min-width: 0;
}

.install-page [data-install-card] {
    min-width: 0;
}

.install-page [data-pwa-install-status] {
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .install-page [data-pwa-install],
    .install-page main .btn-lg {
        width: 100%;
    }

    .install-page [role="tablist"] {
        width: 100%;
    }

    .install-page [data-install-platform] {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .install-page main .justify-between {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 420px) {
    main .grid.grid-cols-2.lg\:grid-cols-4,
    main .grid.grid-cols-2.lg\:grid-cols-3,
    main .grid.grid-cols-2.xl\:grid-cols-6 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE LAYOUT POLISH
   ============================================ */
section {
    scroll-margin-top: 6rem;
}

.home-container,
main > .max-w-7xl,
main > .max-w-4xl,
main > .max-w-3xl,
footer > .max-w-7xl {
    width: 100%;
}

.home-hero-title {
    font-size: clamp(2.25rem, 8vw, 4rem);
    line-height: 1.04;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.14;
}

.home-hero-copy,
main p,
.card li {
    line-height: 1.65;
}

.home-cta-row > a,
.home-cta-row > button {
    min-height: 2.75rem;
}

.home-signal-preview > div {
    width: min(100%, 20rem);
}

.table-container {
    scrollbar-width: thin !important;
}

.table-container .data-table thead {
    display: table-header-group;
}

.table-container .data-table thead tr {
    width: 100%;
}

.table-container .data-table thead th {
    overflow-wrap: normal;
    white-space: nowrap;
}

.data-table--compact {
    min-width: 0 !important;
    table-layout: fixed;
}

.data-table--compact th:nth-child(1),
.data-table--compact td:nth-child(1) {
    width: 46%;
}

.data-table--compact th:nth-child(2),
.data-table--compact td:nth-child(2) {
    width: 18%;
}

.data-table--compact th:nth-child(3),
.data-table--compact td:nth-child(3) {
    width: 36%;
}

.data-table--compact th:nth-child(4),
.data-table--compact td:nth-child(4) {
    width: 22%;
}

.table-cell-value {
    min-width: 0;
}

.dark .table-container .data-table td .table-cell-value,
.dark .responsive-table-shell .data-table td .table-cell-value {
    color: #e2e8f0;
}

.dark .table-container .data-table td .table-cell-value .text-xs,
.dark .responsive-table-shell .data-table td .table-cell-value .text-xs {
    color: #94a3b8;
}

.table-container::-webkit-scrollbar {
    display: block !important;
    height: 0.5rem;
}

.card,
.payment-modal-dialog,
.payment-panel,
.payment-info-card {
    min-width: 0;
}

.stat-card {
    min-width: 0;
}

.stat-card .stat-value {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.stat-card .stat-label {
    line-height: 1.35;
}

#mobile-menu {
    max-width: calc(100vw - 2rem);
    margin-left: auto;
    margin-right: auto;
}

#toast-container {
    max-width: calc(100vw - 2rem);
}

@media (max-width: 767px) {
    .relative.z-50.mx-auto.max-w-5xl {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .relative.z-50 nav {
        border-radius: 1.25rem;
    }

    .relative.z-50 nav .h-16 {
        min-height: 4rem;
    }

    .relative.z-50 nav .text-xl {
        font-size: 1.05rem;
    }

    #mobile-menu-btn {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    #mobile-menu {
        position: fixed;
        top: 4.75rem;
        left: 0.75rem;
        right: 0.75rem;
        max-height: calc(100dvh - 6rem);
        overflow-y: auto;
    }

    .home-hero {
        min-height: auto;
    }

    .home-hero .home-container {
        padding-top: 3.5rem;
        padding-bottom: 3.75rem;
    }

    .home-hero-grid {
        gap: 2rem;
    }

    .home-hero-title br {
        display: none;
    }

    .home-cta-row {
        flex-direction: column;
    }

    .home-cta-row > a,
    .home-cta-row > button,
    .btn-lg,
    main form .btn {
        width: 100%;
    }

    .btn,
    .nav-link,
    .mobile-nav-link,
    footer a,
    footer li a {
        min-height: 2.75rem;
    }

    .home-stats {
        gap: 0.75rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .home-stats > div {
        min-width: 0;
    }

    .home-stats .text-2xl {
        font-size: clamp(1.15rem, 6vw, 1.5rem);
    }

    section.py-20,
    section.py-16 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    main > div[class*="max-w-"],
    main section > div[class*="max-w-"] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card,
    .card.bg-gradient-to-br {
        border-radius: 0.875rem;
    }

    .card.p-6,
    .card.p-8 {
        padding: 1rem;
    }

    footer .grid {
        gap: 1.75rem;
    }

    footer a,
    footer li a {
        min-height: 2.5rem;
        display: inline-flex;
        align-items: center;
    }

    aside.w-full.lg\:w-64.shrink-0 {
        display: none;
    }

    .flex.flex-col.lg\:flex-row {
        gap: 1.5rem;
    }

    .grid.grid-cols-2.lg\:grid-cols-4,
    .grid.sm\:grid-cols-3,
    .grid.md\:grid-cols-3,
    .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .grid.grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .signal-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .signal-card-head .direction-up,
    .signal-card-head .direction-down {
        align-items: flex-start;
    }

    .signal-pair {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .signal-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .signal-metrics > div {
        padding: 1rem;
    }

    .signal-loading-shell {
        padding: 1rem !important;
    }

    .signal-loading-shell .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .data-table {
        min-width: 36rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .home-hero {
        min-height: auto;
    }

    .home-hero .home-container {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .home-hero-grid {
        gap: 2.5rem;
    }

    .home-signal-preview > div {
        width: min(100%, 18rem);
        height: 24rem;
    }

    main > div[class*="max-w-"],
    main section > div[class*="max-w-"] {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    aside.w-full.lg\:w-64.shrink-0 .sticky {
        position: static;
    }

    aside.w-full.lg\:w-64.shrink-0 nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .sidebar-link {
        justify-content: center;
        min-height: 3rem;
        text-align: center;
    }

    .grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.md\:grid-cols-3,
    .grid.sm\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.md\:grid-cols-3 > .card:last-child,
    .grid.sm\:grid-cols-3 > .card:last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .home-container,
    main > .max-w-7xl,
    footer > .max-w-7xl {
        max-width: var(--content-max);
    }
}

@media (min-width: 1920px) {
    :root {
        --content-max: 92rem;
    }

    body {
        font-size: 1.0625rem;
    }

    .relative.z-50.mx-auto.max-w-5xl {
        max-width: 76rem;
    }

    .home-container,
    main > .max-w-7xl,
    footer > .max-w-7xl {
        max-width: var(--content-max);
    }

    .home-hero {
        min-height: 44rem;
    }

    .home-hero-title {
        font-size: clamp(4rem, 3.4vw, 5.25rem);
    }

    .home-hero-copy {
        font-size: 1.2rem;
        max-width: 42rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .card-body {
        padding: 1.75rem;
    }
}

/* ============================================
   DASHBOARD (ITD) — admin: assets/css/admin.css
   ============================================ */

.dashboard-page {
    padding-left: clamp(0.75rem, 3vw, 1.5rem);
    padding-right: clamp(0.75rem, 3vw, 1.5rem);
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
    .dashboard-page {
        padding-bottom: clamp(2rem, 4vw, 3rem);
    }
}

.dashboard-page {
    min-width: 0;
}

.dash-main {
    width: 100%;
    min-width: 0;
}

.dash-referral-lead,
.dash-pay-simple__status,
.payment-panel-description,
.payment-inline-hint {
    font-size: clamp(0.875rem, 2.8vw, 1rem);
    line-height: 1.55;
}

.dash-promo-form__input {
    font-size: clamp(1rem, 3.5vw, 1.0625rem);
    letter-spacing: 0.04em;
}

.dash-support-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.dash-support-actions .dash-support-btn {
    width: 100%;
    min-width: 0;
}

.dash-support-btn__text strong,
.dash-support-btn__text small {
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .dash-page-head {
        padding: clamp(1rem, 4vw, 1.25rem);
        border-radius: clamp(14px, 4vw, 20px);
    }

    .dash-page-head--welcome {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-panel__head,
    .dash-panel__body,
    .dash-panel__foot {
        padding-left: clamp(1rem, 4vw, 1.25rem);
        padding-right: clamp(1rem, 4vw, 1.25rem);
    }

    .dash-panel__head--split {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-btn,
    .dash-btn--block,
    body.site-itd .dashboard-page .btn {
        width: 100%;
        min-width: 0;
        min-height: 2.75rem;
        font-size: clamp(0.9375rem, 3.5vw, 1rem);
    }

    .dash-btn--feedback,
    .dash-btn--feedback-won,
    .dash-btn--feedback-lost {
        width: 100%;
    }

    .form-label {
        font-size: clamp(0.8125rem, 2.5vw, 0.875rem);
    }

    .form-input,
    .input,
    select.form-input,
    textarea.form-input {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: clamp(0.875rem, 3vw, 1rem);
    }

    .dash-mini-stats,
    .dash-mini-stats--referrals {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dash-ref-steps {
        grid-template-columns: 1fr;
    }

    .payment-method-track {
        flex-direction: column;
    }

    .payment-method-btn {
        width: 100%;
        min-height: 2.75rem;
    }

    .payment-panel-actions {
        flex-direction: column;
    }

    .payment-panel-actions .payment-action-btn {
        width: 100%;
    }

    .breadcrumb,
    .dash-back-link {
        font-size: clamp(0.8125rem, 2.5vw, 0.875rem);
        overflow-wrap: anywhere;
    }

    .dash-sidebar {
        display: none;
    }

    body.site-itd .dashboard-page .dash-stats,
    body.site-itd .dashboard-page .dash-charts,
    body.site-itd .dashboard-page .dash-plans {
        grid-template-columns: 1fr;
    }

    body.site-itd .dashboard-page .card-header.flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dash-history-item__top {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-chart-card,
    .dash-chart-card__canvas,
    .dash-chart-donut__ring {
        min-width: 0;
        max-width: 100%;
    }

    .dash-chart-card__canvas--line {
        height: clamp(10rem, 42vw, 14rem);
    }

    #payment-modal .payment-modal-dialog {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 1rem);
        margin: 0.5rem;
    }

}

@media (max-width: 520px) {
    .dash-history-item__metrics {
        grid-template-columns: 1fr 1fr;
    }

    .dash-history-item__metrics .dash-history-metric:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .dash-bottom-nav__label {
        font-size: 0.625rem;
        letter-spacing: -0.01em;
    }

    .dash-sidebar__id-value {
        font-size: clamp(0.8125rem, 3.5vw, 0.9375rem);
    }

    .card-header h2,
    .card-header .text-lg {
        font-size: clamp(1rem, 4vw, 1.125rem);
    }

    .auth-page {
        padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    }

    .auth-page__logo {
        margin-bottom: 2rem;
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .auth-form__title {
        font-size: clamp(1.125rem, 5vw, 1.5rem);
    }

    .auth-form__subtitle {
        font-size: clamp(0.875rem, 3.5vw, 1rem);
    }

    .auth-submit,
    .auth-page a.auth-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 2.75rem;
        text-decoration: none;
    }

    .auth-submit--inline {
        width: 100%;
    }

    .responsive-table-shell .data-table td .truncate,
    .table-container .data-table td .truncate {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* --- Tables: card layout (dashboard ≤640px; admin → admin.css) --- */
@media (max-width: 640px) {
    .dashboard-page .table-container .data-table,
    .dashboard-page .responsive-table-shell .data-table {
        min-width: 0 !important;
        table-layout: auto;
    }

    .dashboard-page .table-container,
    .dashboard-page .responsive-table-shell {
        overflow: visible !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-radius: 0;
    }

    .dashboard-page .table-container .data-table thead,
    .dashboard-page .responsive-table-shell .data-table thead,
    .dashboard-page .table-container .data-table tbody,
    .dashboard-page .responsive-table-shell .data-table tbody,
    .dashboard-page .table-container .data-table tr,
    .dashboard-page .responsive-table-shell .data-table tr,
    .dashboard-page .table-container .data-table th,
    .dashboard-page .responsive-table-shell .data-table th,
    .dashboard-page .table-container .data-table td,
    .dashboard-page .responsive-table-shell .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .dashboard-page .table-container .data-table,
    .dashboard-page .responsive-table-shell .data-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .dashboard-page .table-container .data-table thead,
    .dashboard-page .responsive-table-shell .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .dashboard-page .table-container .data-table tbody,
    .dashboard-page .responsive-table-shell .data-table tbody {
        display: grid;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .dashboard-page .dash-panel__body--flush .table-container .data-table tbody,
    .dashboard-page .dash-panel__body--flush .responsive-table-shell .data-table tbody {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dashboard-page .table-container .data-table tr,
    .dashboard-page .responsive-table-shell .data-table tr {
        border: 1px solid #e5e7eb;
        border-radius: 0.875rem;
        background: #fff;
        padding: 0.75rem;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .dashboard-page .table-container .data-table tbody tr:hover,
    .dashboard-page .responsive-table-shell .data-table tbody tr:hover {
        background: #fff;
    }

    .dashboard-page .table-container .data-table td,
    .dashboard-page .responsive-table-shell .data-table td {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
        padding: 0.6rem 0;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
        white-space: normal;
        word-break: normal;
    }

    .dashboard-page .table-container .data-table td:last-child,
    .dashboard-page .responsive-table-shell .data-table td:last-child {
        border-bottom: 0;
    }

    .dashboard-page .table-container .data-table td::before,
    .dashboard-page .responsive-table-shell .data-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.3;
        text-align: left;
        text-transform: uppercase;
    }

    .dashboard-page .table-container .data-table td .table-cell-value,
    .dashboard-page .responsive-table-shell .data-table td .table-cell-value {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        min-width: 0;
        width: 100%;
        font-size: 0.9375rem;
        line-height: 1.4;
        color: #1e293b;
    }

    .dashboard-page .table-container .data-table td .table-cell-value--end,
    .dashboard-page .responsive-table-shell .data-table td .table-cell-value--end {
        align-items: flex-end;
        text-align: right;
    }

    .dark .dashboard-page .table-container .data-table tr,
    .dark .dashboard-page .responsive-table-shell .data-table tr {
        background: #0f172a;
        border-color: rgba(51, 65, 85, 0.78);
        box-shadow: none;
    }

    .dark .dashboard-page .table-container .data-table td,
    .dark .dashboard-page .responsive-table-shell .data-table td {
        border-bottom-color: rgba(51, 65, 85, 0.5) !important;
    }

    .dark .dashboard-page .table-container .data-table td::before,
    .dark .dashboard-page .responsive-table-shell .data-table td::before {
        color: #94a3b8;
    }
}

/* Charts & canvas: never overflow viewport */
.dashboard-page canvas {
    max-width: 100%;
}

