/* Responsive layout: phone, tablet, laptop, desktop */

:root {
    --space-page: clamp(14px, 3.5vw, 24px);
    --text-base: clamp(0.9375rem, 2.4vw, 1rem);
    --text-sm: clamp(0.8125rem, 2vw, 0.875rem);
    --heading-section: clamp(1.35rem, 4.5vw, 2rem);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-size: var(--text-base);
    overflow-x: clip;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, li, label, td, th, a, button, input, textarea, select {
    overflow-wrap: break-word;
    word-break: break-word;
}

img, video, svg {
    max-width: 100%;
    height: auto;
}

.slide-wrap img,
.team-photo-wrap img,
.booking-master-card img,
.hero-slider img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
}

#root {
    overflow-x: clip;
}

/* Modals */
.modal-overlay {
    padding: var(--space-page);
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal,
.modal-wide,
.modal-scroll,
.modal-sm {
    min-width: 0 !important;
    width: min(100%, 640px);
    max-width: 100%;
    margin: auto 0;
    padding: clamp(16px, 4vw, 24px);
}

.modal.modal-scroll {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: min(90vh, 920px);
    -webkit-overflow-scrolling: touch;
}

.modal-actions {
    flex-wrap: wrap;
}

.modal-actions button {
    flex: 1 1 auto;
    min-width: min(100%, 120px);
}

/* Tables scroll on narrow screens */
.price-table-wrap,
.catalog-section,
.personnel-layout > div:last-child,
.panel-page {
    max-width: 100%;
}

@media (max-width: 768px) {
    .price-table-wrap,
    .catalog-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .data-table,
    .catalog-table {
        min-width: 520px;
    }

    .price-table {
        width: max-content;
        min-width: 100%;
        max-width: none;
        table-layout: auto;
    }

    .price-table th,
    .price-table td,
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: var(--text-sm);
        line-height: 1.35;
    }
}

/* ——— Tablet (768–1023) ——— */
@media (min-width: 768px) and (max-width: 1023px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .team-grid:not(.team-grid--masters) {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid--masters {
        grid-template-columns: repeat(3, 1fr);
    }

    .personnel-layout {
        grid-template-columns: 240px 1fr;
    }
}

/* ——— Mobile & small tablet (≤767) ——— */
@media (max-width: 767px) {
    .topbar-inner {
        padding: 10px var(--space-page);
        gap: 10px;
        flex-wrap: wrap;
    }

    .logo {
        height: 36px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .site-name {
        font-size: 1rem;
        line-height: 1.3;
    }

    .user-badge {
        order: 3;
        width: 100%;
        margin-left: 0;
        padding-top: 4px;
        border-top: 1px solid var(--border);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .topbar-inner > .user-badge {
        display: none;
    }

    .nav.open .user-badge--nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        order: -1;
        margin: 0 0 8px;
        padding: 0 0 12px;
        border-top: none;
        border-bottom: 1px solid var(--border);
        gap: 2px;
    }

    .user-badge__name {
        font-size: 0.9rem;
    }

    .user-badge__title {
        font-size: 0.75rem;
    }

    .burger {
        order: 3;
        flex-shrink: 0;
    }

    .topbar-logout {
        order: 2;
    }

    .nav.open {
        gap: 8px;
        padding: 16px var(--space-page);
    }

    .nav.open .nav-link,
    .nav.open .lang-btn,
    .nav.open .theme-btn,
    .nav.open button.nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
        margin: 0;
    }

    .section-title {
        font-size: var(--heading-section);
        margin-bottom: 1.25rem;
        letter-spacing: 0.06em;
        line-height: 1.25;
    }

    .services-section,
    .team-section,
    .page-content {
        padding: 36px var(--space-page);
    }

    .slide-wrap {
        height: 34vh;
        min-height: 168px;
        max-height: 260px;
    }

    .hero-slider {
        margin-bottom: 0;
    }

    .hero-slider .swiper-pagination {
        bottom: 8px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .team-grid:not(.team-grid--masters) {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .team-grid--masters {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    .team-grid--masters .team-card {
        padding-bottom: 10px;
        border-radius: 12px;
    }

    .team-grid--masters .team-card h3 {
        font-size: 0.72rem;
        margin: 8px 4px 4px;
        line-height: 1.2;
        word-break: break-word;
    }

    .team-grid--masters .team-position {
        font-size: 0.62rem;
        padding: 0 4px;
        line-height: 1.2;
        margin: 0;
    }

    .team-grid--masters .team-rating {
        font-size: 0.65rem;
        margin: 4px 0;
    }

    .team-grid--masters .team-card-actions {
        padding: 4px 4px 0;
        gap: 4px;
    }

    .team-grid--masters .team-action-btn {
        padding: 5px 4px;
        font-size: 0.55rem;
        letter-spacing: 0.03em;
    }

    .team-grid--masters .team-card-head-link {
        padding: 0 4px;
    }

  .team-photo-link:hover .team-photo-wrap img,
  .team-photo-link:focus-visible .team-photo-wrap img {
        transform: none;
    }

    .team-grid--masters .team-instagram {
        font-size: 0.6rem;
    }

    .team-review-item__header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .team-review-item__header strong {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .team-review-item__text {
        font-size: var(--text-sm);
    }

    .review-page__header {
        flex-direction: column;
        align-items: stretch;
    }

    .review-page__add-btn {
        width: 100%;
    }

    .review-page-filters {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .review-page-item__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        padding: 28px var(--space-page);
        gap: 20px;
    }

    .footer-map {
        padding: 0 var(--space-page) 28px;
    }

    .footer-map__frame {
        height: 220px;
    }

    .footer-map__route {
        flex: 1 1 auto;
        min-width: 140px;
        text-align: center;
    }

    .booking-widget,
    .booking-widget--wide {
        max-width: 100%;
        padding: var(--space-page);
    }

    .booking-widget h2 {
        font-size: var(--heading-section);
        line-height: 1.25;
    }

    .booking-service-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }

    .booking-service-row__btn {
        padding: 12px 14px 8px;
        width: 100%;
    }

    .booking-service-row__info {
        line-height: 1.45;
        font-size: var(--text-sm);
    }

    .booking-service-row__actions {
        justify-content: flex-end;
        padding: 0 12px 12px;
        gap: 10px;
    }

    .booking-service-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 1.35rem;
    }

    .booking-master-card {
        flex-direction: row;
        text-align: left;
    }

    .booking-master-selected .booking-master-card {
        flex-direction: row;
        text-align: left;
        padding: 8px 10px;
        gap: 10px;
    }

    .booking-master-selected .booking-master-card img {
        width: 40px;
        height: 40px;
    }

    .booking-reviews-panel {
        max-height: 280px;
    }

    .booking-time-group__grid {
        grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
        gap: 5px;
    }

    .booking-time-btn {
        font-size: var(--text-sm);
        padding: 8px 6px;
    }

    .month-calendar {
        max-width: 100%;
        padding: 12px;
    }

    .month-calendar__day,
    .month-calendar__empty {
        height: clamp(38px, 11vw, 44px);
        min-height: clamp(38px, 11vw, 44px);
        max-height: clamp(38px, 11vw, 44px);
        font-size: 0.85rem;
    }

    .panel-page {
        padding: var(--space-page);
    }

    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-header__actions {
        width: 100%;
    }

    .panel-header__actions > * {
        flex: 1 1 auto;
    }

    .personnel-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .personnel-layout--detail .personnel-list {
        display: none;
    }

    .personnel-services__back {
        display: inline-flex;
        align-items: center;
        margin-bottom: 14px;
        width: 100%;
        justify-content: center;
    }

    .personnel-services-table-wrap {
        display: none;
    }

    .personnel-service-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .personnel-service-card {
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg2);
    }

    .personnel-service-card.personnel-duration-custom {
        border-color: rgba(201, 162, 39, 0.45);
        background: rgba(201, 162, 39, 0.04);
    }

    .personnel-service-card__head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
    }

    .personnel-service-card__head h3 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.35;
        color: var(--gold);
    }

    .personnel-service-card__field {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 10px;
        font-size: var(--text-sm);
        color: var(--muted);
    }

    .personnel-service-card__field .ui-input {
        width: 100%;
    }

    .personnel-service-card__row {
        margin-bottom: 10px;
        font-size: var(--text-sm);
    }

    .personnel-layout--detail .service-line-add {
        flex-direction: column;
        align-items: stretch;
    }

    .personnel-layout--detail .service-line-add .btn-outline {
        width: 100%;
    }

    .personnel-tabs {
        flex-wrap: wrap;
    }

    .personnel-tabs button {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        padding: 10px 12px;
        font-size: var(--text-sm);
    }

    .personnel-list-item > button {
        padding: 10px;
        font-size: var(--text-sm);
    }

    .personnel-list-item__actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 192px;
    }

    .personnel-list-item__actions button {
        flex: 1;
        min-width: 48px;
        min-height: 48px;
        padding: 12px 14px;
        font-size: 1.15rem;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .personnel-list-item__actions button + button {
        border-left: 1px solid var(--border);
    }

    .catalog-table-wrap {
        display: none;
    }

    .catalog-service-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .catalog-service-card {
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
    }

    .catalog-service-card__title {
        margin: 0 0 10px;
        font-size: 1.05rem;
        line-height: 1.35;
        color: var(--gold);
        word-break: break-word;
    }

    .catalog-service-card__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        margin-bottom: 12px;
        font-size: var(--text-sm);
        color: var(--muted);
    }

    .catalog-service-card__prices {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }

    .catalog-price-chip {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--bg2);
        color: var(--text);
        text-align: left;
        cursor: pointer;
    }

    .catalog-price-chip--empty {
        opacity: 0.75;
    }

    .catalog-price-chip__label {
        font-size: 0.78rem;
        line-height: 1.3;
        color: var(--muted);
        word-break: break-word;
    }

    .catalog-price-chip__value {
        font-size: 1rem;
        line-height: 1.2;
        color: var(--gold);
        font-weight: 600;
    }

    .catalog-price-chip--empty .catalog-price-chip__value {
        color: var(--muted);
        font-weight: 400;
    }

    .catalog-service-card__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .catalog-service-card__actions .btn-outline,
    .catalog-service-card__actions .btn-muted {
        flex: 1 1 calc(50% - 4px);
        min-height: 44px;
    }

    .catalog-product-cards .catalog-price-chip--input {
        grid-column: 1 / -1;
    }

    .catalog-section__header {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-actions {
        width: 100%;
    }

    .catalog-actions button {
        flex: 1 1 calc(50% - 3px);
        min-height: 40px;
        padding: 8px 10px;
    }

    .personnel-service-card__head button {
        min-width: 48px;
        min-height: 48px;
        padding: 10px 14px;
        font-size: var(--text-sm);
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--bg3);
        flex-shrink: 0;
    }

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

    .cabinet-stats {
        flex-direction: column;
    }

    .client-cabinet .cabinet-table-wrap--desktop {
        display: none;
    }

    .client-cabinet .cabinet-cards--mobile {
        display: block;
    }

    .client-cabinet .data-table {
        min-width: 0;
    }

    .service-line-row {
        grid-template-columns: 1fr auto;
        gap: 6px;
    }

    .service-line-row__price {
        width: 100%;
        grid-column: 1 / -1;
    }

    .service-line-row__remove {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    .service-line-add {
        flex-direction: column;
        align-items: stretch;
    }

    .service-line-add select {
        min-width: 0;
        width: 100%;
    }

    .journal-month-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .schedule-date-nav {
        gap: 6px;
        margin-bottom: 0;
    }

    .schedule-date-nav--mobile {
        display: block;
        width: 100%;
    }

    .schedule-date-nav--desktop {
        display: none;
    }

    .schedule-week-nav__row {
        gap: 5px;
    }

    .schedule-week-nav__strip {
        border-radius: 14px;
        padding: 5px;
        gap: 3px;
    }

    .schedule-week-nav__picker .ui-date-trigger {
        width: 44px;
        min-width: 44px;
        border-radius: 12px;
    }

    .schedule-week-nav__picker .ui-date-trigger__icon {
        font-size: 1.1rem;
    }

    .schedule-week-nav__picker .date-picker-dropdown {
        left: auto;
        right: 0;
        transform: none;
        width: min(320px, calc(100vw - 32px));
    }

    .schedule-week-nav__day {
        min-height: 48px;
        border-radius: 10px;
        padding: 5px 1px;
    }

    .schedule-week-nav__dow {
        font-size: 0.62rem;
    }

    .schedule-week-nav__num {
        font-size: 0.92rem;
    }

    .schedule-week-nav__month {
        font-size: 0.8rem;
    }

    .schedule-week-nav__today {
        padding: 5px 10px;
        font-size: 0.68rem;
        min-height: 30px;
    }

    .schedule-date-nav__chip {
        font-size: 0.72rem;
        padding: 6px 9px;
    }

    .schedule-date-nav__arrow {
        padding: 6px 10px;
        font-size: 1rem;
    }

    .schedule-date-nav__current {
        display: none;
    }

    .schedule-date-nav__today {
        margin-left: 0;
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 0.72rem;
        min-height: 34px;
    }

    .schedule-week-nav--dock {
        gap: 0;
    }

    .schedule-week-nav--dock > .schedule-week-nav__today {
        margin: 0;
    }

    .schedule-date-nav__picker.date-picker-field {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .schedule-date-nav__picker .ui-date-trigger {
        min-height: 34px;
        width: 100%;
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .schedule-dashboard.panel-page {
        padding-left: 0;
        padding-right: 0;
        padding-top: 10px;
        padding-bottom: 8px;
    }

    .schedule-dashboard .schedule-top {
        padding-left: var(--space-page, 16px);
        padding-right: var(--space-page, 16px);
        margin-bottom: 6px;
        gap: 6px;
    }

    .schedule-dashboard .schedule-title {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .schedule-dashboard .schedule-branch-label,
    .schedule-dashboard .schedule-live-indicator {
        font-size: 0.75rem;
    }

    .schedule-dashboard .schedule-readonly-hint,
    .schedule-dashboard .schedule-body__message {
        padding-left: var(--space-page, 16px);
        padding-right: var(--space-page, 16px);
        margin-top: 0;
        margin-bottom: 6px;
        font-size: 0.8rem;
    }

    .schedule-body {
        flex: 1;
        min-height: 0;
    }

    .schedule-grid-wrap {
        --schedule-time-width: 50px;
        --schedule-col-width: 108px;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100vw;
        border: none;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        box-shadow: none;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        max-height: calc(100dvh - var(--schedule-mobile-chrome, 248px));
        min-height: 240px;
    }

    body.has-mobile-tab-bar .schedule-dashboard .schedule-grid-wrap {
        max-height: calc(100dvh - var(--schedule-mobile-chrome, 248px) - var(--mobile-tab-bar-height, 58px));
    }

    .schedule-dashboard .schedule-columns {
        min-width: calc(var(--schedule-time-width) + var(--schedule-emp-count, 1) * var(--schedule-col-width));
        width: max(100%, calc(var(--schedule-time-width) + var(--schedule-emp-count, 1) * var(--schedule-col-width)));
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .schedule-dashboard .schedule-time-col {
        position: sticky;
        left: 0;
        z-index: 20;
        width: var(--schedule-time-width);
        flex: 0 0 var(--schedule-time-width);
        background: var(--bg2);
        border-right: 1px solid var(--border);
    }

    .schedule-dashboard .schedule-time-header {
        position: sticky;
        top: 0;
        z-index: 25;
        background: var(--bg3);
        min-height: 40px;
        padding: 4px 2px;
        font-size: 0.62rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
    }

    .schedule-dashboard .schedule-emp-header {
        position: sticky;
        top: 0;
        z-index: 15;
        background: var(--bg3);
        min-height: 40px;
        padding: 4px 3px;
        gap: 0;
    }

    .schedule-dashboard .schedule-emp-header strong {
        font-size: 0.68rem;
        line-height: 1.15;
        white-space: normal;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .schedule-dashboard .schedule-emp-header span:not(.schedule-emp-avatar),
    .schedule-dashboard .schedule-emp-header small {
        display: none;
    }

    .schedule-dashboard .schedule-emp-avatar {
        display: inline-flex;
    }

    .schedule-time-label {
        font-size: 0.62rem;
        padding: 0 1px;
    }

    .schedule-column {
        flex: 0 0 var(--schedule-col-width);
        width: var(--schedule-col-width);
        min-width: var(--schedule-col-width);
        max-width: var(--schedule-col-width);
    }

    .schedule-dashboard .schedule-toolbar {
        width: 100%;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .schedule-dashboard .schedule-toolbar::-webkit-scrollbar {
        display: none;
    }

    .schedule-dashboard .schedule-toolbar__btn {
        min-width: 40px;
        min-height: 32px;
        padding: 3px 4px;
        border-radius: 8px;
        font-size: 0.48rem;
        flex-shrink: 0;
    }

    .schedule-dashboard .schedule-toolbar__icon {
        width: 16px;
        height: 16px;
        font-size: 0.8rem;
    }

    .schedule-dashboard .schedule-toolbar__icon svg,
    .schedule-dashboard .schedule-toolbar__svg {
        width: 16px;
        height: 16px;
    }

    .schedule-dashboard .schedule-toolbar__label {
        max-width: 44px;
        font-size: 0.48rem;
    }

    .schedule-slot-line {
        min-height: 32px;
        box-sizing: border-box;
    }

    .schedule-slot-line--active {
        background: rgba(201, 162, 39, 0.12);
    }

    .schedule-appt-layer {
        left: 2px;
        right: 2px;
    }

    .schedule-appt-layer .appointment-card--compact {
        font-size: 0.58rem;
        padding: 7px 3px 2px;
    }

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

    .price-category-header h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .services-section {
        overflow-x: clip;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .price-category-block {
        width: 100%;
        max-width: 100%;
        overflow: visible;
        box-sizing: border-box;
    }

    #prices-services .price-category-block {
        border-radius: 12px;
        overflow: visible;
    }

    .price-table-wrap {
        margin: 0;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #prices-services .price-table-wrap {
        border-radius: 0;
        overflow-x: auto;
    }

    .price-table th:first-child,
    .price-table td:first-child {
        width: auto;
        min-width: 88px;
        max-width: 38vw;
    }

    .price-col-header {
        min-width: 68px;
    }

    .price-table th,
    .price-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .position-title {
        font-size: 0.68rem;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
    }

    .service-name-inner > span {
        font-size: 0.78rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .price-cell-inner > span {
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .login-page {
        padding: 24px var(--space-page);
        min-height: calc(100vh - var(--mobile-header-height, 52px) - var(--mobile-tab-bar-height, 0px) - 40px);
        align-items: center;
    }

    .login-form {
        padding: 24px 20px;
        border-radius: 16px;
        max-width: 100%;
    }

    .manage-links {
        grid-template-columns: 1fr;
    }

    .work-hours-quick {
        flex-direction: column;
        align-items: stretch;
    }

    .status-buttons {
        gap: 6px;
    }

    .duration-picker--combo {
        width: auto;
        max-width: 100%;
    }

    .duration-picker__trigger {
        min-width: 0;
        max-width: 200px;
    }

    .ui-input--time {
        max-width: 140px;
    }

    .hm-picker {
        max-width: 100%;
    }

    .status-buttons button,
    .status-buttons .status-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        font-size: var(--text-sm);
        padding: 8px 6px;
    }

    .admin-controls {
        position: static;
        margin-top: 8px;
    }

    .hero-slider > .hero-slider__admin-add,
    .hero-slider .slide-wrap > .hero-slider__admin-slide {
        position: static;
        max-width: 100%;
        margin: 8px;
        justify-content: flex-start;
    }
}

/* ——— Small phones (≤479) ——— */
@media (max-width: 479px) {
    .nav-link,
    .lang-btn {
        font-size: 11px;
        letter-spacing: 0.05em;
    }

    .team-review-item__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-master-group__title {
        font-size: 0.72rem;
    }

    .booking-master-row {
        gap: 4px;
        padding: 12px 6px 12px 12px;
    }

    .booking-master-row__select {
        padding: 0;
        gap: 12px;
    }

    .book-online-fab__label {
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
        max-width: 11rem;
        font-size: 0.85rem;
    }

    .rating-stars button {
        font-size: 1.5rem;
    }

    .schedule-slot-line--active {
        background: rgba(201, 162, 39, 0.14);
    }
}

/* ——— Desktop (≥1024) ——— */
@media (min-width: 1024px) {
    .team-grid:not(.team-grid--masters) {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .team-grid--masters {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }

    .team-grid--masters .team-card h3 {
        font-size: 0.95rem;
        margin: 10px 6px 4px;
        line-height: 1.25;
        word-break: break-word;
    }

    .team-grid--masters .team-position {
        font-size: 0.78rem;
        padding: 0 6px;
        line-height: 1.25;
    }

    .team-grid--masters .team-rating {
        font-size: 0.8rem;
    }

    .team-grid--masters .team-card-actions {
        padding: 8px 8px 0;
        gap: 6px;
    }

    .team-grid--masters .team-action-btn {
        padding: 6px 8px;
        font-size: 0.68rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .main-content {
        min-height: calc(100vh - 140px);
    }
}
