@media (max-width: 768px) {
  .auth-card {
    width: calc(100vw - 28px);
    max-width: 380px;
    padding: 30px 22px;
    transform: none;
  }

  .fg input,
  .fg select,
  .fg textarea,
  .modal .fg input,
  .modal .fg select,
  .modal .fg textarea,
  .sb input,
  select.ff,
  .client-staff-filter select,
  .stato-select {
    font-size: 16px;
  }

  .app.visible {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px 10px;
    border-right: none;
    border-bottom: 1px solid #EBEBF0;
    position: sticky;
    top: 0;
    z-index: 50;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .logo-wrap,
  .user-chip,
  .nav-section {
    display: none;
  }

  .booking-mobile-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #EBEBF0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
  }

  .booking-logo-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #EEE;
    overflow: hidden;
  }

  .booking-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  .booking-logo-name {
    min-width: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--txt);
  }

  .nav {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: max-content;
    min-height: 40px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #EBEBF0;
    background: var(--surface2);
    font-size: 12px;
    font-weight: 700;
    border-radius: 9px;
  }

  .nav i {
    width: auto;
    font-size: 16px;
  }

  #sidebar-admin[style*="block"],
  #sidebar-cliente[style*="block"] {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .sidebar > .nav {
    margin: 0 !important;
  }

  .main {
    width: 100%;
    overflow-x: hidden;
  }

  .page {
    padding: 12px;
    gap: 14px;
  }

  .page-header {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }

  .page-title {
    font-size: 19px;
    line-height: 1.15;
  }

  .page-header .btn {
    min-height: 38px;
  }

  .grid3 {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .cli-book-grid,
  .frow,
  .modal .frow {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 14px;
  }

  .card-header {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .table-scroll {
    border-radius: 10px;
    border: 1px solid #F0F0F5;
    background:
      linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)) left center / 18px 100% no-repeat,
      linear-gradient(270deg, rgba(255,255,255,1), rgba(255,255,255,0)) right center / 18px 100% no-repeat,
      var(--surface);
  }

  .table-scroll table {
    min-width: 760px;
  }

  th,
  td {
    padding: 10px 9px;
  }

  .schedule-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }

  .schedule-day {
    grid-column: 1 / -1;
  }

  .schedule-row select[class*="preset"] {
    grid-column: 1 / -1;
  }

  .schedule-row .time-start,
  .schedule-row .time-end {
    min-height: 38px;
  }

  .client-staff-filter {
    max-width: none;
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .client-staff-filter select {
    width: 100%;
    min-height: 40px;
  }

  .cal-tb {
    align-items: stretch;
  }

  .cal-tb > div {
    width: 100%;
    justify-content: space-between;
  }

  .cal-actions {
    width: 100%;
    align-items: stretch;
  }

  .cal-actions > .ff {
    width: 100%;
    min-width: 0;
  }

  .cal-week-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cal-week-actions .btn {
    justify-content: center;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .cal-tb-title {
    min-width: 0;
    flex: 1;
  }

  .wgrid {
    overflow-x: auto;
    border-radius: 12px;
  }

  .wgrid-inner {
    min-width: 760px;
  }

  .check-row {
    grid-template-columns: 18px minmax(0, 1fr);
    justify-items: start;
  }

  .check-row label {
    width: 100%;
  }

  .slot[data-time]:hover::after {
    display: none;
  }

  .slot-staff {
    font-size: 9px;
    line-height: 1.1;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .slot-request-count {
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
  }

  .modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 18px;
    overflow-y: auto;
    border-radius: 16px;
  }

  .modal-wide {
    width: calc(100vw - 24px);
  }

  .modal h3 {
    font-size: 15px;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .modal .ma {
    position: sticky;
    bottom: -18px;
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -18px;
    padding: 10px 18px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), var(--surface) 35%);
    flex-wrap: wrap;
  }

  .modal .ma .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 40px;
  }

  .client-sheet-stats,
  .client-sheet-grid,
  .client-notes-grid {
    grid-template-columns: 1fr;
  }

  .client-sheet-contact {
    align-items: flex-start;
  }

  .client-sheet-contact strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .client-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-history-main span {
    white-space: normal;
  }

  .notif-toolbar .btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  .settings-tags span {
    font-size: 10px;
    padding: 5px 8px;
  }

  .info-hero {
    align-items: flex-start;
    padding: 16px;
  }

  .info-grid,
  .info-services {
    grid-template-columns: 1fr;
  }

  .info-service {
    align-items: flex-start;
  }

  #timepick-options {
    grid-template-columns: 1fr !important;
  }
}
