.mobile-bottom-nav,
.mobile-fab{
  display: none;
}

body.auth-open .mobile-bottom-nav,
body.auth-open .mobile-fab{
  display: none;
}

@media (max-width: 760px) {
  .app-shell{
    grid-template-columns: 1fr;
  }

  .content{
    padding: var(--space-4) var(--space-4) 96px;
  }

  .sidebar{
    display: none;
  }

  .topbar{
    grid-template-columns: 1fr;
    position: static;
    padding: var(--space-3) var(--space-4);
    background: var(--bg);
  }

  .panel,
  .board-panel{
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .form-panel{
    padding: 16px 14px;
  }

  .topbar-actions{
    align-items: stretch;
    flex-wrap: wrap;
  }

  .market-card,
.legal-links{
    grid-template-columns: 1fr;
  }

  .market-card{
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .market-card-meta{
    grid-template-columns: 1fr;
    width: 100%;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
  }

  .user-pill summary span{
    width: 100%;
    justify-content: center;
  }

  .user-menu{
    position: fixed;
    top: auto;
    right: 16px;
    bottom: 92px;
    left: 16px;
    width: auto;
  }

  .global-search{
    min-width: 0;
  }

  .template-board{
    gap: 18px;
    overflow: hidden;
  }

  .template-board section{
    min-width: 0;
  }

  .template-head{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .template-grid{
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
  }

  .template-chip{
    flex: 1 1 auto;
  }

  .template-card{
    gap: 14px;
    min-height: auto;
    padding: 16px;
  }

  .template-card strong{
    font-size: 17px;
  }

  .template-card .btn{
    min-height: 44px;
  }

  .wizard-steps{
    gap: 6px;
  }

  .wizard-steps button{
    min-height: 42px;
    padding: 8px 10px;
  }

  .wizard-actions{
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-actions .btn{
    width: 100%;
  }

  .filters,
.request-form,
.wizard-steps,
.wizard-step,
.template-grid,
.profile-form,
.profile-grid,
.company-contact-grid,
.meta-grid,
.detail-sections,
.spec-grid,
.chat-layout{
    grid-template-columns: 1fr;
  }

  .span-2{
    grid-column: auto;
  }

  .panel-head,
.detail-top{
    grid-template-columns: 1fr;
    display: grid;
  }

  .offer-form{
    grid-template-columns: 1fr;
  }

  .offer-form h2,
.offer-form label:has(textarea),
.offer-form .btn-primary{
    grid-column: auto;
  }

  .table-scroll{
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .request-table,
.request-table thead,
.request-table tbody,
.request-table tr,
.request-table td{
    display: block;
    width: 100%;
    min-width: 0;
  }

  .request-table thead{
    display: none;
  }

  .request-table{
    background: transparent;
  }

  .request-table tr{
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: none;
  }

  .request-table tr.accepted-row{
    background: var(--surface);
    border-color: #b7ddcb;
    box-shadow: inset 4px 0 0 var(--green);
  }

  .request-table tr.accepted-row td{
    background: transparent;
  }

  .request-table tr.accepted-row td:first-child{
    box-shadow: none;
  }

  .request-table td{
    display: grid;
    grid-template-columns: minmax(98px, auto) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 0;
    border: 0;
    min-width: 0;
  }

  .request-table td:first-child,
.request-table td:last-child{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .request-table td:not(:first-child):not(:last-child)::before{
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
  }

  .request-table td:not(:first-child):not(:last-child){
    padding-top: 9px;
    border-top: 1px solid var(--line);
  }

  .request-title{
    min-width: 0;
  }

  .request-title strong{
    font-size: 16px;
    line-height: 1.25;
  }

  .request-title span{
    overflow-wrap: anywhere;
  }

  .request-title .tag-row{
    gap: 5px;
  }

  .request-table td:last-child .tag-row{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    padding-top: 2px;
  }

  .request-table td:last-child .btn{
    width: 100%;
    min-height: 44px;
    min-width: 0;
    padding: 0 10px;
  }

  .request-table td[data-label="Бюджет"] strong{
    font-size: 18px;
  }

  .request-table td[data-label="Предложения"]{
    align-items: center;
  }

  .accepted-line{
    padding: 8px 10px;
    background: rgba(22, 132, 90, 0.08);
    border: 1px solid rgba(22, 132, 90, 0.18);
    border-radius: var(--radius);
    font-size: 12px;
  }

  .mobile-bottom-nav{
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.98);
    border: 0;
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 24px -18px rgba(17, 25, 24, 0.32);
    backdrop-filter: none;
  }

  .mobile-bottom-nav a{
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 54px;
    min-width: 0;
    place-items: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 650;
  }

  .mobile-bottom-nav a span{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav a.active{
    color: var(--primary);
    background: var(--primary-soft);
  }

  .mobile-bottom-nav a[data-mobile-nav="create"]{
    color: #fff;
    background: var(--primary);
  }

  .mobile-bottom-nav a[data-mobile-nav="create"].active{
    background: var(--primary-hover);
  }

  .mobile-nav-badge{
    position: absolute;
    top: 5px;
    right: 13px;
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    color: #fff;
    background: var(--accent);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(199, 54, 47, 0.22);
  }

  .mobile-nav-badge[hidden]{
    display: none;
  }

  .mobile-bottom-nav svg,
.mobile-fab-icon{
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-fab{
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 36;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 18px 24px -18px rgba(199, 54, 47, 0.4);
  }

  .deal-room,
.chat-form{
    grid-template-columns: 1fr;
  }

  .chat-message{
    max-width: 92%;
  }

  .chat-panel{
    min-height: calc(100vh - 160px);
  }

  .chat-layout{
    display: block;
  }

  .chat-layout:not(.chat-open) .chat-panel{
    display: none;
  }

  .chat-layout.chat-open [data-chat-list]{
    display: none;
  }

  .chat-layout.chat-open .chat-panel{
    display: grid;
  }

  .chat-back{
    display: inline-flex;
    width: fit-content;
  }

  .chat-card{
    min-height: 88px;
  }
}
