:root {
    --touch-target: 44px;
    --section-padding-mobile: 16px;
    --section-gutter: 12px;
}

.mobile-hidden {
    display: revert;
}

.touch-target-44 {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
}

.mobile-layout-pad {
    padding-left: var(--section-padding-mobile);
    padding-right: var(--section-padding-mobile);
}

.mobile-no-shrink {
    flex-shrink: 0;
}

.mobile-stack,
.mobile-stack > * {
    width: auto;
}

@media (max-width: 1024px) {
    .mobile-gutter {
        padding-left: var(--section-padding-mobile);
        padding-right: var(--section-padding-mobile);
    }

    .mobile-card-title {
        font-size: 1rem;
        line-height: 1.35;
        letter-spacing: -0.01em;
    }
}

@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-hidden {
        display: none;
    }

    .mobile-stack,
    .mobile-stack > * {
        width: 100%;
    }

    body {
        font-size: 0.97rem;
    }

    .mobile-full {
        width: 100%;
        min-width: 0;
    }

    .mobile-btn {
        min-height: var(--touch-target);
        min-width: var(--touch-target);
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .mobile-spacing {
        gap: var(--section-gutter);
    }

    .table-responsive-mobile {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-table {
        width: 100%;
        border-collapse: collapse;
    }
}

@media (min-width: 769px) {
    .menu-toggle,
    .mobile-menu-backdrop,
    #mobileMenu,
    .mobile-bottom-nav {
        display: none !important;
    }

    .header-bottom {
        display: flex !important;
    }

    .header-top {
        gap: 40px !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        height: 60px !important;
    }

    .header-top .header-logo {
        margin-right: 0 !important;
    }

    .header-logo span,
    .header-user-menu span,
    .header-user-menu .mobile-hidden {
        display: inline !important;
    }

    .header-user-menu {
        gap: 8px !important;
    }

    .header-user-menu a {
        height: auto !important;
        padding: 6px 12px !important;
        font-size: 0.8em !important;
    }

    .header-logo img {
        height: 28px !important;
    }

    main {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.94rem;
    }

    .mobile-narrow {
        margin-left: 0;
        margin-right: 0;
    }
}
