/* UI V2 mobile navigation and public Owner entry overrides. */
.mobile-owner-nav { display: none; }
.public-owner-entry { color: #7a746c !important; font-size: 0.86rem; }
.public-owner-entry:hover { color: var(--v2-accent) !important; }

@media (max-width: 60rem) {
  .owner-shell { padding-bottom: calc(4.35rem + env(safe-area-inset-bottom)); }
  .owner-app { display: block; min-height: 100vh; }
  .owner-sidebar { display: none; }
  .owner-workspace { min-height: 100vh; }
  .owner-topbar {
    min-height: 3.35rem;
    padding: 0.45rem 0.7rem;
    gap: 0.55rem;
  }
  .owner-search-link {
    width: 100%;
    max-width: none;
    min-height: 2.35rem;
    padding: 0.45rem 0.7rem;
  }
  .topbar-public-link { display: none; }
  .owner-page {
    width: min(100% - 1.25rem, 70rem);
    margin: 1rem auto 1.5rem;
  }

  .mobile-owner-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    min-height: 4rem;
    padding: 0.28rem max(0.25rem, env(safe-area-inset-right)) calc(0.28rem + env(safe-area-inset-bottom)) max(0.25rem, env(safe-area-inset-left));
    border-top: 1px solid #dfe4ea;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 -10px 30px rgba(15,23,42,0.08);
    backdrop-filter: blur(12px);
  }
  .mobile-owner-nav > a,
  .mobile-owner-more > summary {
    min-width: 0;
    min-height: 3.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.28rem 0.12rem;
    border-radius: 0.55rem;
    color: #657084;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.15;
    cursor: pointer;
  }
  .mobile-owner-nav > a.active,
  .mobile-owner-nav > a[aria-current="page"],
  .mobile-owner-more.active > summary,
  .mobile-owner-more[open] > summary {
    color: var(--v2-accent);
    background: var(--v2-accent-soft);
  }
  .mobile-nav-icon {
    min-height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
  }
  .mobile-owner-more {
    position: relative;
    min-width: 0;
  }
  .mobile-owner-more > summary {
    list-style: none;
  }
  .mobile-owner-more > summary::-webkit-details-marker { display: none; }
  .mobile-owner-menu {
    position: absolute;
    right: 0.15rem;
    bottom: calc(100% + 0.55rem);
    width: min(18rem, calc(100vw - 1rem));
    max-height: min(28rem, 68vh);
    overflow-y: auto;
    padding: 0.45rem;
    display: grid;
    gap: 0.15rem;
    border: 1px solid #d9dfe7;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 16px 44px rgba(15,23,42,0.18);
  }
  .mobile-owner-menu a {
    min-height: 2.75rem;
    display: grid;
    grid-template-columns: 1.4rem minmax(0,1fr);
    gap: 0.55rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-radius: 0.55rem;
    color: #344054;
    text-decoration: none;
    font-size: 0.9rem;
  }
  .mobile-owner-menu a:hover,
  .mobile-owner-menu a.active,
  .mobile-owner-menu a[aria-current="page"] {
    color: var(--v2-accent);
    background: var(--v2-accent-soft);
  }
  .mobile-owner-menu .logout-form {
    margin: 0.25rem 0 0;
    padding-top: 0.35rem;
    border-top: 1px solid #edf0f3;
  }
  .mobile-owner-menu .logout-form button.secondary {
    width: 100%;
    min-height: 2.7rem;
    justify-content: center;
  }
}

@media (max-width: 42rem) {
  .owner-search-link { font-size: 0.8rem; }
  .owner-page { width: calc(100% - 1rem); }

  .public-shell .site-header {
    min-height: 3.5rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .public-shell .site-header .brand > span:last-child { display: none; }
  .public-shell .main-nav {
    order: 0;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .public-shell .nav-group { flex-wrap: nowrap; gap: 0.5rem; }
  .public-shell .main-nav a {
    min-height: 2.3rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .public-owner-entry { font-size: 0.78rem !important; }
}
