/*
 * FolioPool native mobile shell
 * Mobile-only application chrome, bottom navigation and responsive safeguards.
 * Prefix: lv / foliopool.
 */

:root {
  --lv-mobile-header-height: 64px;
  --lv-mobile-dock-height: 72px;
  --lv-mobile-gutter: 14px;
  --lv-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lv-mobile-primary: #1947c4;
  --lv-mobile-accent: #ffac26;
  --lv-mobile-ink: #15213d;
  --lv-mobile-muted: #72809d;
  --lv-mobile-line: #e4eaf5;
  --lv-mobile-surface: rgba(255, 255, 255, 0.96);
}

.lv-native-bottom-nav,
.lv-native-more-overlay,
.lv-native-more-sheet,
.lv-mobile-header-title {
  display: none;
}

@media (max-width: 991.98px) {
  html,
  body,
  #wallpaper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body {
    padding-bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom));
    background: #f5f7fb;
    -webkit-tap-highlight-color: transparent;
  }

  body.admin-bar {
    --lv-mobile-admin-offset: 46px;
  }

  body:not(.admin-bar) {
    --lv-mobile-admin-offset: 0px;
  }

  body.lv-native-sheet-open {
    overflow: hidden;
    touch-action: none;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

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

  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  button,
  a,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  .container,
  .container-fluid,
  .container-author,
  .foliopool-blog-container,
  .fp-company-shell,
  .lv-site-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: var(--lv-mobile-gutter);
    padding-right: var(--lv-mobile-gutter);
  }

  .row,
  [class*="grid"],
  [class*="-inner"],
  main,
  main > section,
  main > div,
  article,
  aside {
    min-width: 0;
  }

  /* Native top app bar for the primary and career headers. */
  .header-portfolio,
  .header-career,
  .header-author,
  .fp-company-topbar {
    position: sticky;
    top: var(--lv-mobile-admin-offset);
    z-index: 9800 !important;
    width: 100%;
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(218, 226, 241, 0.9) !important;
    box-shadow: 0 7px 22px rgba(24, 47, 92, 0.08) !important;
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
  }

  .header-portfolio .top-header,
  .header-career .top-header {
    display: none !important;
  }

  .header-portfolio .main-header,
  .header-career .main-header,
  .header-author .main-header,
  .fp-company-topbar .main-header {
    min-height: var(--lv-mobile-header-height) !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .header-portfolio .main-header > .container,
  .header-career .main-header > .container,
  .header-author .main-header > .container,
  .fp-company-topbar .main-header > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--lv-mobile-gutter) !important;
    padding-right: var(--lv-mobile-gutter) !important;
  }

  .header-portfolio .main-header-inner,
  .header-career .main-header-inner,
  .header-author .main-header-inner,
  .fp-company-topbar .main-header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: var(--lv-mobile-header-height) !important;
    padding: 7px 0 !important;
  }

  .header-portfolio .logo,
  .header-career .logo,
  .header-author .logo,
  .fp-company-topbar .logo {
    width: auto !important;
    min-width: 0 !important;
    justify-self: start !important;
  }

  .header-portfolio .logo a,
  .header-career .logo a,
  .header-author .logo a,
  .fp-company-topbar .logo a {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
  }

  .header-portfolio .logo img,
  .header-career .logo img,
  .header-author .logo img,
  .fp-company-topbar .logo img {
    display: block !important;
    width: auto !important;
    max-width: 142px !important;
    max-height: 34px !important;
    margin: 0 !important;
  }

  .header-portfolio .menu-main,
  .header-career .menu-main,
  .header-portfolio .menu-mobile,
  .header-career .menu-mobile {
    display: none !important;
  }

  .lv-mobile-header-title {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--lv-mobile-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-portfolio .account,
  .header-career .account {
    display: flex !important;
    align-items: center !important;
    justify-self: end !important;
    gap: 8px !important;
    min-width: 0;
  }

  .header-portfolio .account .cart,
  .header-career .account .cart {
    display: none !important;
  }

  .header-portfolio .account-menu,
  .header-career .account-menu {
    display: inline-flex !important;
    align-items: center;
  }

  .header-portfolio .account .tk,
  .header-career .account .tk {
    display: none !important;
  }

  .header-portfolio .account .tk-u,
  .header-career .account .tk-u,
  .header-portfolio .account .login-register,
  .header-career .account .login-register,
  .header-portfolio .foliopool-notification-button,
  .header-career .foliopool-notification-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 14px !important;
    background: #f7f9fe !important;
    border: 1px solid #dce5f5 !important;
    box-shadow: none !important;
  }

  .header-portfolio .account-avatar,
  .header-career .account-avatar {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    box-shadow: none !important;
  }

  .header-portfolio .account-greeting,
  .header-career .account-greeting {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .header-portfolio .account-hello,
  .header-portfolio .account-name,
  .header-career .account-hello,
  .header-career .account-name {
    display: none !important;
  }

  .header-portfolio .account .show-submenu,
  .header-career .account .show-submenu {
    display: none !important;
  }

  /* Public portfolio/company header: compact context title and icon CTA. */
  .header-author .info-user,
  .fp-company-topbar .info-user {
    min-width: 0 !important;
    width: auto !important;
    justify-self: center !important;
    text-align: center !important;
  }

  .header-author .welcome-copy,
  .fp-company-topbar .welcome-copy {
    max-width: 42vw !important;
    margin: 0 !important;
    overflow: hidden;
    color: var(--lv-mobile-ink) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-author .welcome-copy span:first-child {
    display: none;
  }

  .header-author .zalo-user,
  .fp-company-topbar .zalo-user {
    width: auto !important;
    min-width: 0 !important;
    justify-self: end !important;
  }

  .header-author .header-contact-cta,
  .fp-company-topbar .header-contact-cta {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    box-shadow: none !important;
  }

  .header-author .header-contact-cta span {
    display: none !important;
  }

  .fp-company-topbar .header-contact-cta {
    font-size: 0 !important;
  }

  .fp-company-topbar .header-contact-cta i {
    font-size: 16px !important;
  }

  /* Notification panel behaves like a compact app popover. */
  .foliopool-notification-dropdown {
    position: fixed !important;
    top: calc(var(--lv-mobile-admin-offset) + var(--lv-mobile-header-height) + 8px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--lv-mobile-header-height) - var(--lv-mobile-dock-height) - var(--lv-mobile-safe-bottom) - 28px) !important;
    overflow: auto;
    border-radius: 18px !important;
    box-shadow: 0 18px 55px rgba(19, 38, 79, 0.2) !important;
  }

  /* Bottom app navigation. */
  .lv-native-bottom-nav {
    position: fixed;
    z-index: 9900;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom));
    padding: 7px 5px calc(7px + var(--lv-mobile-safe-bottom));
    background: var(--lv-mobile-surface);
    border-top: 1px solid rgba(214, 223, 240, 0.94);
    box-shadow: 0 -10px 32px rgba(31, 54, 103, 0.1);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
  }

  .lv-native-nav-item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 56px;
    padding: 3px 2px 1px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--lv-mobile-muted);
    text-decoration: none;
    font: inherit;
    cursor: pointer;
  }

  .lv-native-nav-item:active {
    background: #f0f4fc;
    transform: scale(0.97);
  }

  .lv-native-nav-icon {
    position: relative;
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 10px;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .lv-native-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
  }

  .lv-native-nav-label {
    max-width: 100%;
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lv-native-nav-item.is-active {
    color: var(--lv-mobile-primary);
  }

  .lv-native-nav-item.is-active .lv-native-nav-icon {
    background: #edf3ff;
  }

  .lv-native-nav-item.is-active::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 50%;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--lv-mobile-primary);
    transform: translateX(-50%);
  }

  .lv-native-nav-item--jobs .lv-native-nav-icon {
    width: 38px;
    height: 38px;
    margin-top: -13px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffbc45 0%, #ff9718 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 153, 24, 0.28);
  }

  .lv-native-nav-item--jobs.is-active .lv-native-nav-icon {
    background: linear-gradient(145deg, #ffbc45 0%, #ff9718 100%);
  }

  .lv-native-nav-item--jobs.is-active::after {
    display: none;
  }

  /* Native bottom sheet. */
  .lv-native-more-overlay {
    position: fixed;
    z-index: 9950;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(10, 20, 43, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .lv-native-more-sheet {
    position: fixed;
    z-index: 9960;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    max-height: min(78dvh, 620px);
    padding: 10px 16px calc(22px + var(--lv-mobile-safe-bottom));
    overflow: auto;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -24px 70px rgba(14, 28, 60, 0.25);
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.24, 1);
  }

  .lv-native-sheet-open .lv-native-more-overlay {
    visibility: visible;
    opacity: 1;
  }

  .lv-native-sheet-open .lv-native-more-sheet {
    transform: translateY(0);
  }

  .lv-native-sheet-handle {
    width: 42px;
    height: 5px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #d8deea;
  }

  .lv-native-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .lv-native-sheet-header h2 {
    margin: 0;
    color: var(--lv-mobile-ink);
    font-size: 20px;
    font-weight: 700;
  }

  .lv-native-sheet-close {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: #f1f4fa;
    color: #34415c;
  }

  .lv-native-sheet-close svg {
    width: 20px;
    height: 20px;
  }

  .lv-native-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lv-native-sheet-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 70px;
    padding: 12px;
    border: 1px solid var(--lv-mobile-line);
    border-radius: 17px;
    background: #f9fbff;
    color: var(--lv-mobile-ink);
    text-decoration: none;
  }

  .lv-native-sheet-link:active {
    background: #edf3ff;
    transform: scale(0.985);
  }

  .lv-native-sheet-link-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #eaf1ff;
    color: var(--lv-mobile-primary);
  }

  .lv-native-sheet-link-icon svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
  }

  .lv-native-sheet-link-copy {
    min-width: 0;
  }

  .lv-native-sheet-link strong,
  .lv-native-sheet-link small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lv-native-sheet-link strong {
    font-size: 13px;
    font-weight: 650;
  }

  .lv-native-sheet-link small {
    margin-top: 3px;
    color: var(--lv-mobile-muted);
    font-size: 10.5px;
    line-height: 1.2;
  }

  /* Keep existing fixed actions usable above the app dock. */
  .author-actions-toolbar {
    bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom)) !important;
    z-index: 9700 !important;
  }

  #scrollToTopBtn {
    right: 14px !important;
    bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom) + 14px) !important;
  }

  .save-job-notification,
  .save-job-notification-single {
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Mobile content rhythm and app-like cards. */
  main {
    margin-bottom: 18px;
  }

  .list-portfolio,
  .list-project,
  .list-career,
  .list-freelancer,
  .foliopool-blog-content,
  .fp-company-main {
    padding-top: 12px;
  }

  .list-portfolio .filler,
  .list-portfolio .filter,
  .portfolio-filter-bar,
  .project-filter-bar,
  .career-filter-bar,
  .freelancer-filter-bar {
    width: 100%;
    min-width: 0;
  }

  .list-portfolio .filler,
  .list-portfolio .filler .search-filler form {
    flex-wrap: wrap;
    gap: 10px;
  }

  .list-portfolio .filler > span,
  .list-portfolio .filler .search-filler,
  .list-portfolio .filler .search-filler form .group-form {
    width: 100%;
    min-width: 0;
  }

  .list-portfolio .filler .search-filler form button,
  .list-portfolio .filler .search-filler form select,
  .list-portfolio .filler .search-filler form input {
    min-height: 46px;
    border-radius: 14px;
  }

  .list-portfolio .list-portfolio-inner,
  .list-project-inner,
  .projects-grid,
  .project-grid,
  .freelancer-grid,
  .career-grid,
  .foliopool-blog-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .box-portfolio,
  .project-card,
  .freelancer-card,
  .career-card,
  .foliopool-blog-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
  }

  .box-portfolio h1,
  .box-portfolio h2,
  .box-portfolio h3,
  .box-portfolio h4,
  .project-card h1,
  .project-card h2,
  .project-card h3,
  .freelancer-card h1,
  .freelancer-card h2,
  .freelancer-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .site-footer-premium,
  .footer-author {
    margin-bottom: 0;
  }

  .site-footer-premium {
    padding-top: 28px;
  }

  .site-footer-premium .copyright,
  .footer-author .copyright {
    padding-bottom: 18px;
  }
}

@media (max-width: 374px) {
  :root {
    --lv-mobile-gutter: 10px;
  }

  .header-portfolio .logo img,
  .header-career .logo img,
  .header-author .logo img,
  .fp-company-topbar .logo img {
    max-width: 124px !important;
  }

  .header-author .welcome-copy,
  .fp-company-topbar .welcome-copy {
    max-width: 34vw !important;
    font-size: 12px !important;
  }

  .lv-native-nav-label {
    font-size: 9.5px;
  }

  .lv-native-sheet-grid {
    gap: 8px;
  }

  .lv-native-sheet-link {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 64px;
    padding: 9px;
  }

  .lv-native-sheet-link-icon {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --lv-mobile-gutter: 20px;
  }

  .lv-native-bottom-nav,
  .lv-native-more-sheet {
    right: 50%;
    left: auto;
    width: min(620px, 100%);
    transform-origin: bottom center;
  }

  .lv-native-bottom-nav {
    transform: translateX(50%);
    border: 1px solid rgba(214, 223, 240, 0.94);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
  }

  .lv-native-more-sheet {
    right: 50%;
    left: auto;
    width: min(620px, 100%);
    transform: translate(50%, 105%);
    border-radius: 24px 24px 0 0;
  }

  .lv-native-sheet-open .lv-native-more-sheet {
    transform: translate(50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lv-native-more-overlay,
  .lv-native-more-sheet,
  .lv-native-nav-item,
  .lv-native-nav-icon {
    transition: none !important;
  }
}

/* Late specificity guards for legacy header rules loaded after wp_head. */
@media (max-width: 991.98px) {
  .header-portfolio .main-header .main-header-inner > .menu-main,
  .header-career .main-header .main-header-inner > .menu-main,
  .header-portfolio .main-header .main-header-inner .menu-mobile,
  .header-career .main-header .main-header-inner .menu-mobile {
    display: none !important;
  }

  .header-portfolio .main-header .main-header-inner .account a.register.login-register,
  .header-career .main-header .main-header-inner .account a.register.login-register,
  .header-portfolio .main-header .main-header-inner .account .foliopool-bell-button,
  .header-career .main-header .main-header-inner .account .foliopool-bell-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .header-portfolio .main-header .main-header-inner .account .account-menu .tk-u,
  .header-career .main-header .main-header-inner .account .account-menu .tk-u {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    overflow: visible !important;
    border-radius: 14px !important;
  }

  .header-portfolio .main-header .main-header-inner .account .account-greeting,
  .header-career .main-header .main-header-inner .account .account-greeting {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    padding: 2px !important;
    justify-content: center !important;
    overflow: visible !important;
  }
}

@media (max-width: 991.98px) {
  .lv-native-more-sheet {
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.24, 1), visibility 0.28s ease;
  }

  .lv-native-sheet-open .lv-native-more-sheet {
    visibility: visible;
    pointer-events: auto;
  }

  .hint-popup,
  .cv-toast {
    bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom) + 14px) !important;
  }

  .btn-fixed-portfolio,
  .tool-menu-fixed {
    bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom) + 14px) !important;
  }

  .tool-menu-popup {
    bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom) + 70px) !important;
  }

  .portfolio-popup-overlay,
  .fp-apply-modal,
  #career-popup-overlay {
    z-index: 10020 !important;
  }
}

@media (min-width: 783px) and (max-width: 991.98px) {
  body.admin-bar {
    --lv-mobile-admin-offset: 32px;
  }
}

@media (max-width: 991.98px) {
  html {
    scroll-padding-top: calc(var(--lv-mobile-header-height) + var(--lv-mobile-admin-offset) + 12px);
    scroll-padding-bottom: calc(var(--lv-mobile-dock-height) + var(--lv-mobile-safe-bottom) + 12px);
  }

  /* Public profile tabs: native horizontally scrollable segmented navigation. */
  .author-box-info .menu-profile,
  .author-nav-shell {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .author-box-info .menu-profile .menu-profile-list,
  .menu-profile-list {
    display: flex !important;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    padding: 2px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .author-box-info .menu-profile .menu-profile-list::-webkit-scrollbar,
  .menu-profile-list::-webkit-scrollbar {
    display: none;
  }

  .author-box-info .menu-profile .menu-profile-list li,
  .menu-profile-list li {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
  }

  .author-box-info .menu-profile .menu-profile-list li a,
  .menu-profile-list li a {
    min-width: 86px !important;
    min-height: 40px;
    padding: 8px 13px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  .author-box-info,
  .author-content-wrapper,
  #foliopool-author-view,
  #foliopool-author-view .main-author,
  #foliopool-author-view .main-author > .container-author {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .profile-image,
  .profile-image.layouts_one,
  .profile-image.layouts_tow,
  .profile-image.layouts_three,
  .profile-image.default-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    column-count: 1 !important;
  }

  .portfolio-item-display,
  .portfolio-item-display img,
  .portfolio-item-display video,
  .portfolio-item-display iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Account screens remain one coherent app screen instead of a squeezed desktop split. */
  .page-full .woocommerce,
  .page-full .woocommerce-MyAccount-navigation,
  .page-full .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
  }

  .page-full .woocommerce-MyAccount-navigation {
    margin-bottom: 12px;
  }

  .page-full .woocommerce-MyAccount-content {
    padding: 0 !important;
  }

  .page-full .account-menu-toggle {
    min-height: 48px;
    padding: 0 15px;
    border-radius: 15px;
    box-shadow: none;
  }

  .page-full .woocommerce-MyAccount-navigation-list.is-open {
    gap: 5px;
    margin: 8px 0 14px;
    padding: 10px;
    border: 1px solid var(--lv-mobile-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(25, 47, 92, 0.07);
  }

  .page-full .woocommerce-MyAccount-navigation ul li,
  .page-full .woocommerce-MyAccount-navigation ul li a {
    margin: 0 !important;
  }

  .page-full .woocommerce-MyAccount-navigation ul li a {
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px 13px;
    border-radius: 12px;
  }

  .page-full .content-account .form-profile .acf-field {
    display: block !important;
    width: 100%;
    padding: 0 !important;
    margin-bottom: 15px !important;
  }

  .page-full .content-account .form-profile .acf-field .acf-label,
  .page-full .content-account .form-profile .acf-field .acf-input {
    width: 100% !important;
  }

  .page-full .content-account .form-profile .acf-field .acf-label {
    margin-bottom: 7px;
  }

  /* Tables and management panels stay inside the viewport. */
  .page-full table,
  .woocommerce table,
  .company-info-management table,
  .tuyen-dung-management table,
  .portfolio-management table {
    max-width: 100%;
  }

  .page-full .table-responsive,
  .woocommerce .table-responsive,
  .company-info-management .table-responsive,
  .tuyen-dung-management .table-responsive,
  .portfolio-management .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-dialog {
    width: auto;
    max-width: calc(100% - 20px);
    margin: 10px auto;
  }

  .modal-content {
    max-height: calc(100dvh - var(--lv-mobile-header-height) - 20px);
    overflow: auto;
    border-radius: 20px;
  }

  /* Horizontal taxonomy controls behave like native tab rails. */
  .project-category-list,
  .project-categories,
  .category-tabs,
  .filter-tabs,
  .career-tabs,
  .freelancer-tabs,
  .filedohoa-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .project-category-list::-webkit-scrollbar,
  .project-categories::-webkit-scrollbar,
  .category-tabs::-webkit-scrollbar,
  .filter-tabs::-webkit-scrollbar,
  .career-tabs::-webkit-scrollbar,
  .freelancer-tabs::-webkit-scrollbar,
  .filedohoa-tabs::-webkit-scrollbar {
    display: none;
  }
}

/* 2.3.34 — mobile interaction and account-screen polish */
@media (max-width: 767.98px) {
  /* Project archive: compact native search row and swipeable category rail. */
  .list-portfolio-wrap .fp-site-shell {
    padding-inline: 12px !important;
  }

  .list-portfolio-wrap .list-portfolio__header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin: 12px 0 10px !important;
    padding: 0 !important;
  }

  .list-portfolio-wrap .header-left {
    display: flex !important;
    min-width: 0;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .list-portfolio-wrap .back-to-projects {
    min-height: 34px;
    margin: 0 !important;
    padding: 6px 10px !important;
    flex: 0 0 auto;
    border-radius: 10px !important;
    background: #f0f3f8 !important;
    color: #3e4656 !important;
    font-size: 12px !important;
  }

  .list-portfolio-wrap .results-count {
    min-width: 0;
    overflow: hidden;
    color: #26344f;
    font-size: 16px !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .list-portfolio-wrap .header-right,
  .list-portfolio-wrap .filter-form-wrap {
    width: 100% !important;
    min-width: 0;
  }

  .list-portfolio-wrap .search-form-custom {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px auto !important;
    width: 100% !important;
    min-width: 0;
    gap: 7px !important;
    align-items: stretch !important;
  }

  .list-portfolio-wrap .fp-project-search-autocomplete {
    min-width: 0;
  }

  .list-portfolio-wrap .search-input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 1px solid #d9dfeb !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 14px !important;
  }

  .list-portfolio-wrap .search-input:focus {
    border-color: #8eacef !important;
    box-shadow: 0 0 0 3px rgba(25, 71, 196, 0.1) !important;
  }

  .list-portfolio-wrap .search-btn {
    display: grid !important;
    width: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    place-items: center;
    border: 0 !important;
    border-radius: 13px !important;
    background: var(--lv-mobile-accent) !important;
    color: #17213a !important;
    box-shadow: 0 7px 17px rgba(255, 172, 38, 0.22) !important;
    font-size: 16px !important;
  }

  .list-portfolio-wrap .custom-dropdown {
    min-width: 0;
  }

  .list-portfolio-wrap .dropdown-btn {
    min-width: 112px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    border: 1px solid #d9dfeb !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #27324a !important;
    font-size: 13px !important;
    white-space: nowrap;
  }

  .list-portfolio-wrap .dropdown-content {
    right: 0 !important;
    left: auto !important;
    min-width: 150px !important;
    overflow: hidden;
    border: 1px solid #e0e6f1 !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 35px rgba(26, 43, 79, 0.16) !important;
  }

  .list-portfolio-wrap .project-filter-bar {
    position: relative;
    display: block !important;
    margin: 0 0 14px !important;
    overflow: hidden !important;
  }

  .list-portfolio-wrap .project-filter-bar::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    bottom: 0;
    width: 22px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(245,247,251,0), #f5f7fb 82%);
  }

  .list-portfolio-wrap .filter-prev,
  .list-portfolio-wrap .filter-next {
    display: none !important;
  }

  .list-portfolio-wrap .project-filter-inner {
    display: flex !important;
    width: 100% !important;
    min-width: 0;
    gap: 7px !important;
    padding: 1px 20px 3px 0;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
  }

  .list-portfolio-wrap .project-filter-inner::-webkit-scrollbar {
    display: none;
  }

  .list-portfolio-wrap .filter-btn {
    min-height: 36px;
    padding: 8px 13px !important;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
    border: 1px solid transparent;
    border-radius: 999px !important;
    background: #f0f2f6 !important;
    color: #4b5363 !important;
    font-size: 12.5px !important;
    line-height: 1;
  }

  .list-portfolio-wrap .filter-btn.active {
    border-color: #1947c4 !important;
    background: #1947c4 !important;
    color: #fff !important;
  }

  .list-portfolio-wrap .list-portfolio-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  /* Project card thumbnails keep the source top edge visible so embedded CASE STUDY labels are not cropped. */
  .list-portfolio-wrap .project-item {
    overflow: hidden !important;
    border-radius: 15px !important;
  }

  .list-portfolio-wrap .project-thumb-wrapper {
    height: auto !important;
    padding-top: 56.25% !important;
    overflow: hidden !important;
  }

  .list-portfolio-wrap .project-thumb-wrapper img {
    top: 0 !important;
    height: 100% !important;
    object-position: center top !important;
    transform: none !important;
  }

  .list-portfolio-wrap .project-title-overlay {
    padding: 18px 14px 12px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .list-portfolio-wrap .project-meta {
    min-height: 48px;
    padding: 9px 11px !important;
  }

  /* Public profile segmented tabs: one line, true touch scrolling, active item remains visible. */
  #foliopool-author-view .author-menu-wrap,
  #foliopool-author-view .author-nav-shell,
  #foliopool-author-view .menu-profile {
    width: 100% !important;
    min-width: 0 !important;
  }

  #foliopool-author-view .author-nav-shell {
    position: relative;
    padding: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
  }

  #foliopool-author-view .author-nav-shell::-webkit-scrollbar {
    display: none;
  }

  #foliopool-author-view .menu-profile-list,
  #foliopool-author-view .author-box-info .menu-profile .menu-profile-list {
    display: flex !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    gap: 7px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    touch-action: pan-x;
  }

  #foliopool-author-view .menu-profile-list li {
    flex: 0 0 auto !important;
  }

  #foliopool-author-view .menu-profile-list li a {
    min-width: 98px !important;
    min-height: 42px !important;
    padding: 9px 14px !important;
    white-space: nowrap !important;
  }

  /* Account tab rails: stay on one line and swipe instead of wrapping. */
  .portfolio-management-v2 .pm-tabs,
  .portfolio-management-v2 .pm-upload-picker,
  .vip-packages-management .package-tabs,
  .saved-tabs-container .saved-tabs-nav {
    display: flex !important;
    width: 100% !important;
    min-width: 0;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
  }

  .portfolio-management-v2 .pm-tabs::-webkit-scrollbar,
  .portfolio-management-v2 .pm-upload-picker::-webkit-scrollbar,
  .vip-packages-management .package-tabs::-webkit-scrollbar,
  .saved-tabs-container .saved-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .portfolio-management-v2 {
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .portfolio-management-v2 .pm-tabs {
    margin: 0 0 12px !important;
    padding: 2px 2px 4px !important;
    border: 0 !important;
  }

  .portfolio-management-v2 .pm-tabs .nav-item,
  .vip-packages-management .package-tabs .nav-item,
  .saved-tabs-container .saved-tabs-nav .tab-item {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
  }

  .portfolio-management-v2 .pm-tabs .nav-link {
    min-height: 42px;
    padding: 9px 14px !important;
    border: 1px solid #e0e6f1 !important;
    border-radius: 13px !important;
    background: #fff !important;
    color: #48536b !important;
    white-space: nowrap;
  }

  .portfolio-management-v2 .pm-tabs .nav-link.active {
    border-color: #1947c4 !important;
    background: #1947c4 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(25, 71, 196, 0.2);
  }

  .portfolio-management-v2 .pm-section {
    border-radius: 16px !important;
  }

  .portfolio-management-v2 .pm-section-header {
    padding: 13px 15px !important;
  }

  .portfolio-management-v2 .pm-section-body {
    padding: 14px !important;
  }

  .portfolio-management-v2 .pm-upload-picker-wrap {
    margin-bottom: 12px !important;
    padding: 12px !important;
    border-radius: 15px !important;
  }

  .portfolio-management-v2 .pm-upload-picker-title {
    margin: 0 0 10px !important;
    text-align: left;
  }

  .portfolio-management-v2 .pm-upload-picker {
    padding-bottom: 3px;
  }

  .portfolio-management-v2 .pm-upload-action {
    min-width: 130px !important;
    min-height: 48px;
    padding: 7px 11px !important;
    flex: 0 0 auto !important;
    border-radius: 13px !important;
  }

  .portfolio-management-v2 .pm-upload-action-icon {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
  }

  /* Manage project: title is its own row; count and add button share the next row. */
  .project-manager-v2 {
    padding: 16px !important;
    border: 1px solid #e4e9f2 !important;
    border-radius: 17px !important;
    box-shadow: 0 8px 24px rgba(28, 48, 91, 0.07) !important;
  }

  .project-manager-v2 .pm-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 13px !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
    align-items: stretch !important;
  }

  .project-manager-v2 .pm-header-title {
    width: 100%;
    min-width: 0;
    gap: 10px !important;
  }

  .project-manager-v2 .pm-header-title i {
    width: 30px;
    text-align: center;
    font-size: 21px !important;
  }

  .project-manager-v2 .pm-header-title h3 {
    margin: 0 !important;
    font-size: 21px !important;
    line-height: 1.25;
    white-space: nowrap;
  }

  .project-manager-v2 .pm-header-actions {
    display: flex !important;
    width: 100%;
    min-width: 0;
    gap: 12px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .project-manager-v2 .project-limit-info {
    width: auto !important;
    min-width: 0;
    max-width: 170px;
    flex: 1 1 auto;
    color: #68738a !important;
    font-size: 12px !important;
  }

  .project-manager-v2 .project-limit-info .progress {
    width: 100%;
    height: 5px !important;
    margin-top: 5px !important;
    border-radius: 999px;
  }

  .project-manager-v2 #addProjectBtn {
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 13px !important;
    flex: 0 0 auto;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--lv-mobile-accent) !important;
    color: #1c2437 !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    white-space: nowrap;
  }

  .project-manager-v2 .project-list-wrapper {
    min-height: 150px !important;
  }

  /* VIP/package dashboard: readable cards, no vertical letter wrapping. */
  .vip-packages-management {
    width: 100% !important;
    min-width: 0;
  }

  .vip-packages-management > .d-flex {
    margin-bottom: 14px !important;
  }

  .vip-packages-management > .d-flex h2 {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.25;
  }

  .vip-packages-management .package-tabs {
    margin-bottom: 18px !important;
    padding: 2px 1px 4px;
  }

  .vip-packages-management .package-tabs .nav-link {
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 14px !important;
    border: 1px solid #e1e6ef !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #657087 !important;
    white-space: nowrap;
  }

  .vip-packages-management .package-tabs .nav-link.active {
    border-color: var(--lv-mobile-accent) !important;
    background: var(--lv-mobile-accent) !important;
    color: #263047 !important;
    box-shadow: none !important;
  }

  .vip-packages-management .package-section > h4 {
    margin: 0 0 10px !important;
    font-size: 20px !important;
    line-height: 1.3;
  }

  .vip-packages-management .current-package-card .card {
    overflow: hidden !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 28px rgba(19, 46, 98, 0.14) !important;
  }

  .vip-packages-management .current-package-card .card-body {
    padding: 17px !important;
  }

  .vip-packages-management .current-package-card .card-body > .row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 15px !important;
    margin: 0 !important;
  }

  .vip-packages-management .current-package-card .card-body > .row > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    flex: none !important;
  }

  .vip-packages-management .current-package-card h5 {
    margin-bottom: 5px !important;
    font-size: 20px !important;
    line-height: 1.25;
  }

  .vip-packages-management .current-package-card p,
  .vip-packages-management .current-package-card .text-white-75 {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .vip-packages-management .current-package-card .row.text-center {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin: 0 !important;
  }

  .vip-packages-management .current-package-card .row.text-center > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    padding: 0 !important;
    flex: none !important;
  }

  .vip-packages-management .feature-stat {
    min-height: 100px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    background: rgba(255,255,255,0.1);
  }

  .vip-packages-management .feature-stat h4 {
    margin: 0 0 4px !important;
    font-size: 24px !important;
    line-height: 1.05 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  .vip-packages-management .feature-stat small,
  .vip-packages-management .feature-stat .usage-info small {
    display: block;
    max-width: 100%;
    font-size: 12px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  .vip-packages-management .feature-stat .usage-info {
    margin-top: 5px !important;
  }

  /* Saved items: compact empty state and platform-sized CTA. */
  .saved-tabs-container {
    padding: 14px !important;
    border-radius: 17px !important;
    box-shadow: 0 8px 24px rgba(28, 48, 91, 0.07) !important;
  }

  .saved-tabs-container .saved-tabs-nav {
    margin-bottom: 18px !important;
    padding: 0 0 5px !important;
    border-bottom: 1px solid #e6eaf1 !important;
  }

  .saved-tabs-container .saved-tabs-nav .tab-item {
    min-height: 40px;
    padding: 9px 14px !important;
    border: 1px solid #e1e6ef;
    border-radius: 999px !important;
    background: #f7f9fc !important;
    color: #536078 !important;
    white-space: nowrap;
  }

  .saved-tabs-container .saved-tabs-nav .tab-item.active {
    border-color: #1947c4 !important;
    background: #1947c4 !important;
    color: #fff !important;
  }

  .saved-tabs-container .empty-state {
    min-height: 300px;
    padding: 38px 18px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #d8dee9;
    border-radius: 16px;
    background: #fbfcfe;
    text-align: center;
  }

  .saved-tabs-container .empty-state > i {
    margin: 0 0 16px !important;
    color: #b9c0ca !important;
    font-size: 48px !important;
    line-height: 1 !important;
  }

  .saved-tabs-container .empty-state h4 {
    margin: 0 0 8px !important;
    color: #1d263b;
    font-size: 20px !important;
    line-height: 1.3;
  }

  .saved-tabs-container .empty-state p {
    max-width: 320px;
    margin: 0 0 18px !important;
    color: #747f92;
    font-size: 14px !important;
    line-height: 1.5;
  }

  .saved-tabs-container .empty-state .btn {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--lv-mobile-accent) !important;
    color: #252d3f !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  .saved-tabs-container .empty-state .btn i {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }
}

@media (max-width: 389.98px) {
  .list-portfolio-wrap .search-form-custom {
    grid-template-columns: minmax(0, 1fr) 44px !important;
  }

  .list-portfolio-wrap .custom-dropdown {
    grid-column: 1 / -1;
  }

  .list-portfolio-wrap .dropdown-btn {
    width: 100% !important;
  }

  .project-manager-v2 .pm-header-title h3 {
    font-size: 19px !important;
  }

  .project-manager-v2 #addProjectBtn {
    padding-inline: 10px !important;
    font-size: 12px !important;
  }
}

