/* ==================================================== */
/* ПЕРЕМЕННЫЕ                                           */
/* ==================================================== */
:root {
    --primary: #0071e3;
    --primary-hover: #0077ed;
    --primary-light: #e8f2ff;
    --bg-color: #f2f2f7;
    --card-bg: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --border: rgba(0, 0, 0, 0.08);
    --hairline: rgba(0, 0, 0, 0.06);
    --radius: 14px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================================================== */
/* FOCUS-RING — APPLE ДВОЙНОЕ КОЛЬЦО                    */
/* ==================================================== */
*:focus {
    outline: none;
}

:focus-visible {
    outline: none !important;
    box-shadow:
        0 0 0 2px var(--card-bg),
        0 0 0 5px rgba(0, 113, 227, 0.55) !important;
    border-radius: 12px;
}

body.dark-theme {
    --bg-color: #000000;
    --card-bg: #1c1c1e;
    --text-main: #f5f5f7;
    --text-muted: #98989d;
    --border: rgba(255, 255, 255, 0.08);
    --hairline: rgba(255, 255, 255, 0.06);
    --primary-light: #0a2a52;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: 100%;
    background: #eaf1fb;
    scroll-behavior: smooth;
}

body.dark-theme,
html:has(body.dark-theme) {
    background: #050a18;
}

body {
    background-color: transparent;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
    position: relative;
}

/* ==================================================== */
/* БАЗОВЫЕ ЭЛЕМЕНТЫ                                     */
/* ==================================================== */
.mb-15 {
    margin-bottom: 12px;
}

.mt-15 {
    margin-top: 12px;
}

.input-group {
    width: 100%;
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.form-control,
.custom-select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    font-size: 15px !important;
    outline: none;
    background: var(--bg-color);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out), transform 0.2s var(--ease-spring);
    -webkit-appearance: none;
    appearance: none;
}

body.dark-theme .form-control,
body.dark-theme .custom-select {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.form-control:focus,
.custom-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
    transform: translateY(-1px);
}

textarea.form-control {
    height: auto;
    min-height: 70px;
    padding: 10px 12px;
    line-height: 1.4;
}

.custom-select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2386868b" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    padding-right: 34px;
    cursor: pointer;
}

.custom-select:active {
    transform: scale(0.985);
}

/* ==================================================== */
/* КНОПКИ                                               */
/* ==================================================== */
.btn-primary-large {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.btn-primary-large:active {
    transform: scale(0.96);
    filter: brightness(0.92);
    transition-duration: 0.1s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 9px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    transition: transform 0.25s var(--ease-spring), background-color 0.15s ease;
}

.btn-outline.active {
    background: var(--primary-light);
}

.btn-outline:active {
    transform: scale(0.96);
}

/* ==================================================== */
/* ШАПКА                                                */
/* ==================================================== */
.mobile-header {
    background: transparent !important;
    border: none !important;
    padding: max(10px, env(safe-area-inset-top, 20px)) 12px 0 12px !important;
    flex-shrink: 0;
    z-index: 100;
}

.header-top-modern {
    display: flex !important;
    align-items: center;
    padding: 8px 12px !important;
    gap: 10px;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 22px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05) !important;
    overflow: visible !important;
    position: relative;
}

body.dark-theme .header-top-modern {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5) !important;
}

.logo-block-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--bg-color);
    border: none;
    border-radius: 50% !important;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: background 0.2s ease, transform 0.25s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

body.dark-theme .logo-block-modern {
    background: #2c2c2e;
}

.logo-block-modern:active {
    background: rgba(0, 113, 227, 0.12);
    transform: scale(0.9);
}

.logo-block-modern svg {
    display: block;
    transition: opacity 0.25s ease, transform 0.35s var(--ease-spring);
}

.actions-segmented {
    display: flex;
    align-items: stretch;
    height: 40px;
    flex: 1;
    overflow: visible !important;
    background: var(--bg-color);
    border: 1px solid var(--hairline);
    border-radius: 20px !important;
}

body.dark-theme .actions-segmented {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.segmented-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1;
    border-right: 1px solid var(--hairline);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

body.dark-theme .segmented-item {
    border-right-color: rgba(255, 255, 255, 0.08);
}

.segmented-item:last-child {
    border-right: none;
}

.segmented-item:active {
    background: rgba(0, 113, 227, 0.08);
}

.theme-pill {
    padding: 0 8px;
    min-width: 56px;
}

.theme-track {
    width: 100%;
    height: 26px;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s var(--ease-out);
}

.theme-slider {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s var(--ease-spring), background 0.3s var(--ease-out);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.theme-icon {
    font-size: 11px;
    line-height: 1;
}

input#theme-toggle-mobile:checked+.theme-track {
    background: #2c2c2e;
}

input#theme-toggle-mobile:checked+.theme-track .theme-slider {
    left: calc(100% - 23px);
    background: #f5f5f7;
    color: #1d1d1f;
}

.theme-slider {
    transition:
        left 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.36s ease,
        box-shadow 0.36s ease;
}

.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1;
    transform: translateY(-0.5px);
}

.toggle-slider,
.toggle-slider:before {
    transition-duration: 0.46s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 1ms;
    }

    .theme-slider,
    .toggle-slider,
    .toggle-slider:before {
        transition-duration: 1ms;
    }
}

body.dark-theme .theme-track {
    background: #2c2c2e;
}

body.dark-theme .theme-slider {
    background: #f5f5f7;
    color: #1d1d1f;
}

.feedback-block {
    padding: 0 14px;
}

.feedback-block span {
    font-size: 16px !important;
    transition: transform 0.25s var(--ease-spring);
    display: inline-block;
}

.feedback-block:active span {
    transform: scale(1.1);
}

.segmented-item.profile-block {
    flex-direction: row;
    gap: 8px;
    padding: 0 12px;
    min-width: 0;
    color: var(--text-main);
    align-items: center;
}

.profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================================================== */
/* СКРЫТАЯ LEGACY-НАВИГАЦИЯ                             */
/* ==================================================== */
.tools-scroll-nav {
    display: none !important;
}

/* ==================================================== */
/* ГЛАВНЫЙ КОНТЕНТ                                      */
/* ==================================================== */
.main-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom)) 12px;
    background: transparent;
    position: relative;
    z-index: 2;
}

.section-content {
    display: none;
}

.section-content.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================================================== */
/* DASHBOARD                                            */
/* ==================================================== */
.mobile-dashboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
    animation: dashFadeIn 0.55s var(--ease-out) both;
}

@keyframes dashFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dash-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 18px 16px;
    min-height: 92px;
    aspect-ratio: auto;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition: transform 0.35s var(--ease-spring), box-shadow 0.3s var(--ease-out),
        background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    animation: dashTileIn 0.5s var(--ease-out) both;
}

@keyframes dashTileIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dash-tile:nth-child(1) {
    animation-delay: 0.04s;
}

.dash-tile:nth-child(2) {
    animation-delay: 0.08s;
}

.dash-tile:nth-child(3) {
    animation-delay: 0.12s;
}

.dash-tile:nth-child(4) {
    animation-delay: 0.16s;
}

.dash-tile:nth-child(5) {
    animation-delay: 0.20s;
}

.dash-tile:nth-child(6) {
    animation-delay: 0.24s;
}

.dash-tile:nth-child(7) {
    animation-delay: 0.28s;
}

.dash-tile:nth-child(8) {
    animation-delay: 0.32s;
}

.dash-tile:nth-child(9) {
    animation-delay: 0.36s;
}

.dash-tile:nth-child(10) {
    animation-delay: 0.40s;
}

.dash-tile:nth-child(11) {
    animation-delay: 0.44s;
}

.dash-tile:nth-child(12) {
    animation-delay: 0.48s;
}

.dash-tile:nth-child(13) {
    animation-delay: 0.52s;
}

body.dark-theme .dash-tile {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.dash-tile-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    flex-shrink: 0;
    transition: transform 0.4s var(--ease-spring), color 0.25s var(--ease-out);
}

.dash-tile-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    display: block;
}

.dash-tile-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    line-height: 1.2;
    flex: 1;
    color: var(--text-main);
    transition: color 0.25s var(--ease-out);
}

.dash-tile:active {
    transform: scale(0.94);
    filter: brightness(0.94);
    transition-duration: 0.1s;
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.18);
}

.dash-tile:active .dash-tile-icon {
    transform: scale(0.9);
    color: var(--primary);
}

.dash-tile:active .dash-tile-label {
    color: var(--primary);
}

.dash-tile:focus-visible {
    outline: 3px solid rgba(0, 113, 227, 0.5);
    outline-offset: 2px;
}

body.dark-theme .dash-tile:active {
    background: rgba(0, 113, 227, 0.18);
    border-color: var(--primary);
}

@media (hover: none) {
    .dash-tile:hover {
        transform: none;
    }
}

@media (max-width: 360px) {
    .dashboard-grid {
        gap: 10px;
    }

    .dash-tile {
        min-height: 72px;
        padding: 14px 12px;
        gap: 10px;
        border-radius: 16px;
    }

    .dash-tile-icon {
        width: 28px;
        height: 28px;
    }

    .dash-tile-icon svg {
        width: 24px;
        height: 24px;
    }

    .dash-tile-label {
        font-size: 12.5px;
    }
}

/* ==================================================== */
/* КАРТОЧКИ                                             */
/* ==================================================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--hairline);
    box-shadow: none;
    width: 100%;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

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

.grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* ==================================================== */
/* КНОПКИ-ЭЛЕМЕНТЫ                                      */
/* ==================================================== */
.element-grid,
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-bottom: 8px;
}

.element-btn,
.profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    min-height: 60px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s var(--ease-spring), background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.dark-theme .element-btn,
body.dark-theme .profile-btn {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.element-btn span,
.profile-btn span {
    font-size: 9px;
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
}

.element-btn svg,
.profile-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: transform 0.25s var(--ease-spring);
}

.element-btn:active,
.profile-btn:active {
    transform: scale(0.95);
}

.element-btn.active,
.profile-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.element-btn.active svg,
.profile-btn.active svg {
    stroke: #fff;
}

/* ==================================================== */
/* РЕЗУЛЬТАТЫ И ЦЕНА                                    */
/* ==================================================== */
.concrete-results-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.concrete-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    min-height: 40px;
    background: var(--bg-color);
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background 0.2s var(--ease-out);
}

body.dark-theme .concrete-row {
    background: #2c2c2e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.concrete-row span {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.concrete-row strong {
    color: var(--text-main);
    font-weight: 700;
    font-size: 13px;
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-box {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 113, 227, 0.2);
    background: linear-gradient(135deg, #f0f7ff 0%, #e0eeff 100%);
    text-align: center;
    margin-top: 10px;
}

body.dark-theme .price-box {
    background: linear-gradient(135deg, #0a2a52 0%, #061a33 100%);
    border-color: rgba(0, 113, 227, 0.4);
}

.price-box>div:first-child {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    color: var(--text-muted);
}

.price-box>div:nth-child(2) {
    font-size: 26px !important;
    font-weight: 800 !important;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--primary) !important;
}

.price-box>div:nth-child(3) {
    font-size: 12px !important;
    margin-top: 4px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==================================================== */
/* НИЖНИЙ ДОК                                           */
/* ==================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 8px)) 4px;
    z-index: 100;
    /* Уменьшено с 1000, чтобы модальные окна были выше */
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
}

body.dark-theme .bottom-nav {
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    max-width: 22%;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s ease, transform 0.2s var(--ease-spring);
}

.bottom-nav .nav-item:active {
    transform: scale(0.9);
}

.bottom-nav .nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: stroke 0.15s ease;
}

.bottom-nav .nav-item.active {
    color: var(--primary);
}

.bottom-nav .chat-fab {
    display: flex !important;
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transform: translateY(-14px);
    margin: 0 4px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    overflow: visible;
    box-shadow: 0 8px 22px rgba(0, 113, 227, 0.45);
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
}

.bottom-nav .chat-fab svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    stroke: #fff !important;
    fill: none !important;
    pointer-events: none;
}

.bottom-nav .chat-fab:active {
    transform: translateY(-14px) scale(0.94);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
}

.bottom-nav .chat-fab .chat-badge {
    position: absolute !important;
    top: -2px;
    right: -2px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

.bottom-nav .chat-fab .chat-badge[style*="flex"] {
    display: flex !important;
}

.chat-fab:not(.bottom-nav .chat-fab) {
    display: none;
}

/* ==================================================== */
/* СООБЩЕСТВО И БАРАХОЛКА                               */
/* ==================================================== */
.feed-card,
.market-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--hairline);
    margin-bottom: 12px;
    position: relative;
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #5a9bff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.large-avatar {
    width: 68px;
    height: 68px;
    font-size: 28px;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.feed-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    border-top: 1px solid var(--hairline);
    padding-top: 12px;
}

.price-tag {
    font-size: 15px;
    font-weight: 700;
    color: #34c759;
    letter-spacing: -0.02em;
}

.market-img {
    height: 130px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    background: var(--bg-color);
    border-radius: 12px;
    margin-bottom: 12px;
}

body.dark-theme .market-img {
    background: #2c2c2e;
}

.market-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.market-title {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
    font-weight: 500;
}

.market-loc {
    font-size: 12px;
    color: var(--text-muted);
}

.filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    padding: 8px 16px;
    cursor: pointer;
    transition: transform 0.25s var(--ease-spring), background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border-radius: 100px;
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

body.dark-theme .filter-btn {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.filter-btn:active {
    transform: scale(0.95);
    filter: brightness(0.93);
    transition-duration: 0.1s;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.blueprint-placeholder {
    height: 100px;
    background: var(--bg-color);
    border: 1.5px dashed var(--hairline);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    padding: 5px;
    overflow: hidden;
}

body.dark-theme .blueprint-placeholder {
    background: #2c2c2e;
}

.blueprint-placeholder svg {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}

/* ==================================================== */
/* ЧАТЫ                                                 */
/* ==================================================== */
.chat-list-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
}

.chat-list-item.active {
    background: var(--primary-light);
}

.chat-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.chat-last {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.chat-msg.sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.chat-msg.received {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

body.dark-theme .chat-msg.received {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.chat-msg-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.msg-status {
    font-size: 10px;
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.6);
}

.msg-status.read {
    color: #ffffff;
    font-weight: bold;
}

.unread-badge {
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

/* ==================================================== */
/* ПОЛНОЭКРАННЫЙ ЧАТ                                    */
/* ==================================================== */
body.chat-active .mobile-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body.chat-active {
    overflow: hidden !important;
}

body.chat-active .main-content {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 5000 !important;
    background: var(--bg-color) !important;
}

body.chat-active .section-content.active {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

body.chat-active .chat-container {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-color) !important;
}

body.chat-active .chat-main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-color) !important;
}

body.chat-active #chat-messages {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body.chat-active #chat-input-area {
    flex-shrink: 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 12px !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
    gap: 8px !important;
}

body.chat-active #chat-header {
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px 12px !important;
    padding-top: max(10px, env(safe-area-inset-top, 20px)) !important;
    background: var(--card-bg) !important;
    border-bottom: 1px solid var(--hairline) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    min-height: 56px;
}

body.chat-active .chat-container.card {
    box-shadow: none !important;
}

body.chat-active .bottom-nav {
    display: none !important;
}

/* ==================================================== */
/* ЛИЧНЫЙ КАБИНЕТ                                       */
/* ==================================================== */
.cabinet-pane {
    display: none;
}

.cabinet-pane.active {
    display: block;
    /* УБРАНО: animation: pageIn — вешает мобильный GPU */
}

.cabinet-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0071e3 0%, #5a9bff 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.cabinet-avatar::after {
    content: '📷';
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--card-bg);
    border: 2px solid var(--hairline);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.cabinet-avatar.has-photo::after {
    display: none;
}

body.dark-theme .cabinet-avatar::after {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.12);
}

.cabinet-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-avatar #cab-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cabinet-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.cabinet-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cabinet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cabinet-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border: 2px dashed var(--hairline);
    border-radius: var(--radius);
}

.cabinet-item {
    background: var(--bg-color);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

body.dark-theme .cabinet-item {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.cabinet-item-info {
    flex: 1;
    min-width: 0;
}

.cabinet-item-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.cabinet-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cabinet-item-price {
    font-weight: 700;
    color: #34c759;
    font-size: 14px;
    white-space: nowrap;
}

.cab-item-delete {
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s var(--ease-spring);
    font-family: inherit;
}

.cab-item-delete:active {
    transform: scale(0.95);
}

.cabinet-item-job {
    align-items: flex-start !important;
    flex-direction: column;
}

.cabinet-item-job>div:last-child {
    align-items: flex-start !important;
    width: 100%;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 10px !important;
}

.cabinet-reviews-summary {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

body.dark-theme .cabinet-reviews-summary {
    background: #2c2c2e;
}

.cabinet-rating-box {
    text-align: center;
}

.cabinet-rating-value {
    font-size: 44px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.04em;
}

.cabinet-rating-stars {
    font-size: 18px;
    margin: 8px 0;
    letter-spacing: 2px;
}

.cabinet-rating-count {
    font-size: 13px;
    color: var(--text-muted);
}

.cabinet-nav-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==================================================== */
/* ЛОКАЦИИ                                              */
/* ==================================================== */
.loc-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 260px;
}

.loc-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--hairline);
    border-radius: 100px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s ease;
}

body.dark-theme .loc-dropdown-toggle {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.loc-dropdown.open .loc-dropdown-toggle {
    border-color: var(--primary);
}

.loc-icon {
    flex-shrink: 0;
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.loc-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loc-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.loc-dropdown.open .loc-chevron {
    transform: rotate(180deg);
}

.loc-dropdown-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-width: 100%;
    min-width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    z-index: 500;
    transition: max-height 0.35s var(--ease-out), opacity 0.25s ease, transform 0.3s ease;
    pointer-events: none;
}

.loc-dropdown.open .loc-dropdown-panel {
    transform: translateY(0);
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    pointer-events: all;
    padding: 18px 0 calc(15px + env(safe-area-inset-bottom)) 0;
}

.loc-dropdown-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--hairline);
    border-radius: 2px;
    margin: 0 auto 10px;
}

.loc-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 18px 6px;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--hairline);
    margin-top: 4px;
}

.loc-group-title:first-child {
    border-top: none;
    margin-top: 0;
}

.loc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    position: relative;
}

.loc-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.loc-item.active::before {
    content: '✓';
    position: absolute;
    right: 18px;
    font-weight: bold;
    color: var(--primary);
}

.loc-item .loc-icon {
    opacity: 0.7;
    font-size: 12px;
}

.loc-item.active .loc-icon {
    opacity: 1;
}

.loc-dropdown-panel::-webkit-scrollbar {
    width: 6px;
}

.loc-dropdown-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ==================================================== */
/* МОДАЛЬНЫЕ ОКНА                                       */
/* ==================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    transition: opacity 0.25s var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-radius: 28px;
    padding: 32px 26px 26px;
    width: 92%;
    max-width: 400px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: scale(0.94) translateY(16px);
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
        opacity 0.28s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.auth-card::-webkit-scrollbar {
    display: none;
}

body.dark-theme .auth-card {
    background: rgba(28, 28, 30, 0.82);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.7),
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-overlay.active .auth-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-overlay.active .auth-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-color);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: transform 0.2s ease;
}

body.dark-theme .close-modal {
    background: #2c2c2e;
}

.close-modal:active {
    transform: rotate(90deg) scale(0.95);
}

/* ==================================================== */
/* APPLE STYLE AUTH MODAL — карточка входа/регистрации   */
/* ==================================================== */

/* Заголовок с иконкой */
#auth-modal .auth-card>div:first-of-type {
    text-align: center;
    margin-bottom: 24px;
}

#auth-modal .auth-card h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-main);
    margin: 0;
}

/* Иконка-эмблема сверху */
#auth-modal .auth-card>div:first-of-type>div[data-icon] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0071e3 0%, #5a9bff 100%);
    color: #fff !important;
    margin: 0 auto 16px !important;
    box-shadow:
        0 12px 28px rgba(0, 113, 227, 0.35),
        0 4px 12px rgba(0, 113, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#auth-modal .auth-card>div:first-of-type>div[data-icon] svg {
    width: 30px;
    height: 30px;
    stroke: #fff;
    fill: none;
    display: block;
}

/* Поля ввода */
#auth-modal .input-group {
    margin-bottom: 14px;
}

#auth-modal .input-group input.form-control {
    height: 52px;
    padding: 0 18px;
    font-size: 16px !important;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: rgba(120, 120, 128, 0.1);
    color: var(--text-main);
    transition:
        background 0.2s ease,
        border-color 0.25s ease,
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.2s ease;
}

body.dark-theme #auth-modal .input-group input.form-control {
    background: rgba(120, 120, 128, 0.18);
}

#auth-modal .input-group input.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
    font-weight: 500;
}

#auth-modal .input-group input.form-control:focus {
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(0, 113, 227, 0.14),
        0 4px 12px rgba(0, 113, 227, 0.12);
    transform: translateY(-1px);
    outline: none;
}

body.dark-theme #auth-modal .input-group input.form-control:focus {
    background: #2c2c2e;
    box-shadow:
        0 0 0 4px rgba(0, 113, 227, 0.32),
        0 4px 12px rgba(0, 113, 227, 0.25);
}

/* Чекбокс «Запомнить меня» — кастомный круглый */
#auth-modal .input-group:has(#auth-remember),
#auth-modal .input-group:has(#reg-remember) {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 20px;
    padding: 2px 4px;
}

#auth-modal #auth-remember,
#auth-modal #reg-remember {
    appearance: none;
    -webkit-appearance: none;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    border-radius: 50%;
    border: 2px solid rgba(120, 120, 128, 0.35);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

#auth-modal #auth-remember:checked,
#auth-modal #reg-remember:checked {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}

#auth-modal #auth-remember::after,
#auth-modal #reg-remember::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

#auth-modal #auth-remember:checked::after,
#auth-modal #reg-remember:checked::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

#auth-modal #auth-remember:active,
#auth-modal #reg-remember:active {
    transform: scale(0.9);
}

#auth-modal .input-group:has(#auth-remember) label,
#auth-modal .input-group:has(#reg-remember) label {
    margin: 0 !important;
    cursor: pointer;
    color: var(--text-main) !important;
    font-size: 14.5px !important;
    font-weight: 500;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Кнопка «Войти» / «Зарегистрироваться» */
#auth-modal .btn-primary-large {
    height: 54px;
    border-radius: 16px;
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    border: none;
    margin-top: 8px;
    box-shadow:
        0 8px 22px rgba(0, 113, 227, 0.35),
        0 2px 6px rgba(0, 113, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

#auth-modal .btn-primary-large:hover {
    box-shadow:
        0 12px 28px rgba(0, 113, 227, 0.45),
        0 4px 10px rgba(0, 113, 227, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

#auth-modal .btn-primary-large:active {
    transform: scale(0.97) translateY(0);
    filter: brightness(0.94);
    box-shadow:
        0 3px 10px rgba(0, 113, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition-duration: 0.1s;
}

/* Кнопка «Зарегистрироваться» — зелёный градиент */
#auth-modal #register-form .btn-primary-large {
    background: linear-gradient(135deg, #198754 0%, #20a866 100%);
    box-shadow:
        0 8px 22px rgba(25, 135, 84, 0.35),
        0 2px 6px rgba(25, 135, 84, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#auth-modal #register-form .btn-primary-large:hover {
    box-shadow:
        0 12px 28px rgba(25, 135, 84, 0.45),
        0 4px 10px rgba(25, 135, 84, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Ссылки «Забыли пароль?» / «Создать аккаунт» / «Уже есть аккаунт?» */
#auth-modal #login-form>p,
#auth-modal #register-form>p {
    font-size: 14px !important;
    margin-top: 14px !important;
    line-height: 1.4;
}

#auth-modal #login-form>p:first-of-type a,
#auth-modal #register-form>p a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    display: inline-block;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#auth-modal #login-form>p:first-of-type a:active,
#auth-modal #register-form>p a:active {
    background: rgba(0, 113, 227, 0.1);
    transform: scale(0.96);
}

#auth-modal #login-form>p:last-child,
#auth-modal #register-form>p:last-child {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 12px;
    display: inline-block;
    width: 100%;
    margin-left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#auth-modal #login-form>p:last-child:active,
#auth-modal #register-form>p:last-child:active {
    background: rgba(120, 120, 128, 0.1);
}

#auth-modal #login-form>p:last-child span,
#auth-modal #register-form>p:last-child span {
    color: var(--primary);
    font-weight: 700;
}

/* Кнопка закрытия — Apple стиль */
#auth-modal .close-modal {
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(120, 120, 128, 0.14);
    color: var(--text-muted);
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#auth-modal .close-modal:hover,
#auth-modal .close-modal:focus-visible {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35);
    outline: none;
}

#auth-modal .close-modal:active {
    transform: rotate(90deg) scale(0.9);
    background: #e0342b;
    transition-duration: 0.15s;
}

/* Отключаем тяжёлый blur на мобилке для производительности */
body.mobile-device #auth-modal .auth-card {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.88);
}

body.mobile-device.dark-theme #auth-modal .auth-card {
    background: rgba(28, 28, 30, 0.9);
}

/* Секция регистрации — плавное появление */
#auth-modal #register-form {
    animation: authFormSlide 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes authFormSlide {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Заголовок в режиме регистрации */
#auth-modal #register-form::before {
    content: '';
    display: block;
    margin-bottom: 4px;
}

/* Модалка восстановления пароля — тот же стиль */
#modal-forgot-password .auth-card,
#modal-change-email .auth-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark-theme #modal-forgot-password .auth-card,
body.dark-theme #modal-change-email .auth-card {
    background: rgba(28, 28, 30, 0.82);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.7),
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#modal-forgot-password .input-group input.form-control,
#modal-change-email .input-group input.form-control {
    height: 52px;
    padding: 0 18px;
    font-size: 16px !important;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: rgba(120, 120, 128, 0.1);
    color: var(--text-main);
    transition:
        background 0.2s ease,
        border-color 0.25s ease,
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme #modal-forgot-password .input-group input.form-control,
body.dark-theme #modal-change-email .input-group input.form-control {
    background: rgba(120, 120, 128, 0.18);
}

#modal-forgot-password .input-group input.form-control:focus,
#modal-change-email .input-group input.form-control:focus {
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow:
        0 0 0 4px rgba(0, 113, 227, 0.14),
        0 4px 12px rgba(0, 113, 227, 0.12);
    outline: none;
}

#modal-forgot-password .btn-primary-large,
#modal-change-email .btn-primary-large {
    height: 54px;
    border-radius: 16px;
    font-size: 16.5px;
    font-weight: 700;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    box-shadow:
        0 8px 22px rgba(0, 113, 227, 0.35),
        0 2px 6px rgba(0, 113, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-forgot-password .btn-primary-large:active,
#modal-change-email .btn-primary-large:active {
    transform: scale(0.97);
    box-shadow:
        0 3px 10px rgba(0, 113, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.mobile-device #modal-forgot-password .auth-card,
body.mobile-device #modal-change-email .auth-card {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.88);
}

body.mobile-device.dark-theme #modal-forgot-password .auth-card,
body.mobile-device.dark-theme #modal-change-email .auth-card {
    background: rgba(28, 28, 30, 0.9);
}

/* ==================================================== */
/* АДАПТАЦИЯ                                            */
/* ==================================================== */
body.mobile-device .layout-2col,
body.mobile-device .grid-3col-custom,
body.mobile-device .grid-2col,
body.mobile-device .grid-3col {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 15px !important;
}

body.mobile-device .col-left,
body.mobile-device .col-right {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
}

body.mobile-device .card {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.mobile-device .element-grid,
body.mobile-device .profile-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

body.mobile-device .header-actions,
body.mobile-device .filters {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 10px !important;
}

body.mobile-device .blueprint-placeholder {
    height: 100px !important;
    margin-bottom: 10px !important;
}

body.mobile-device #metal-dimensions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    flex-direction: row !important;
    gap: 10px !important;
}

body.mobile-device #metal-dimensions .input-group {
    margin-bottom: 0 !important;
}

@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }

    .main-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }
}

/* Скрываем полосу прокрутки только для горизонтальных каруселей и
   элементов, где она не нужна, но не для всего сайта */
.property-carousel .property-grid::-webkit-scrollbar,
.top-specialists-grid::-webkit-scrollbar,
.org-tabs::-webkit-scrollbar,
.org-projects-grid::-webkit-scrollbar,
.dashboard-tile-list::-webkit-scrollbar,
.dashboard-chat-list::-webkit-scrollbar,
.profile-view-reviews-list::-webkit-scrollbar,
.profile-view-ads-panel-list::-webkit-scrollbar,
.profile-view-ads-panel-list::-webkit-scrollbar,
.estimate-panel-list::-webkit-scrollbar,
.estimate-mobile-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.property-carousel .property-grid,
.top-specialists-grid,
.org-tabs,
.org-projects-grid,
.dashboard-tile-list,
.dashboard-chat-list,
.profile-view-reviews-list,
.profile-view-ads-panel-list,
.estimate-panel-list,
.estimate-mobile-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Кнопка удаления — только для старых карточек (не «Мои объявления») */
.market-card:not(#my-ads-list .cabinet-item),
.feed-card:not(#my-ads-list .cabinet-item),
.cabinet-item:not(#my-ads-list .cabinet-item) {
    position: relative !important;
    padding-bottom: 50px !important;
}

.market-card:not(#my-ads-list .cabinet-item) .cab-item-delete,
.feed-card:not(#my-ads-list .cabinet-item) .cab-item-delete,
.cabinet-item:not(#my-ads-list .cabinet-item) .cab-item-delete {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 99 !important;
}

/* ==================================================== */
/* ПИКЕР РОЛЕЙ — ВЫЕЗЖАЮЩИЙ АККОРДЕОН (МОБИЛЬНАЯ)       */
/* ==================================================== */
.roles-picker {
    position: relative;
    width: 100%;
}

.roles-trigger {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1.5px solid var(--hairline);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-sizing: border-box;
}

body.dark-theme .roles-trigger {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.roles-trigger:active {
    transform: scale(0.985);
}

.roles-trigger.open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.roles-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roles-trigger-text.placeholder {
    color: var(--text-muted);
}

.roles-trigger-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(0, 113, 227, 0.12);
    padding: 2px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}

.roles-trigger-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
}

.roles-trigger.open .roles-trigger-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

/* ==== ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ ==== */
.roles-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    z-index: 9999;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}

.roles-panel.open {
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom)) 14px;
    -webkit-overflow-scrolling: touch;
}

.roles-panel.keyboard-open {
    bottom: auto !important;
    top: 12px !important;
    max-height: calc(100dvh - 24px) !important;
    padding-top: max(16px, env(safe-area-inset-top)) !important;
    border-radius: 20px 20px 0 0 !important;
}

.roles-panel::-webkit-scrollbar {
    width: 4px;
}

.roles-panel::-webkit-scrollbar-thumb {
    background: var(--hairline);
    border-radius: 2px;
}

.roles-search {
    position: relative;
    margin-bottom: 12px;
}

.roles-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border: none;
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    scroll-margin-top: 20px;
    scroll-margin-bottom: 100px;
}

body.dark-theme .roles-search input {
    background: #2c2c2e;
}

.roles-search input::placeholder {
    color: var(--text-muted);
}

.roles-search svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.roles-selected {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}

.roles-selected-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.roles-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.roles-chips-empty {
    font-size: 13px;
    color: var(--text-muted);
    padding-left: 4px;
    font-style: italic;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    animation: chipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.role-chip-remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.role-chip-remove:active {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes chipIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.roles-group {
    margin-bottom: 16px;
}

.roles-group:last-child {
    margin-bottom: 0;
}

.roles-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px 6px;
}

.roles-list {
    display: flex;
    flex-direction: column;
}

.role-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
    border-radius: 8px;
    min-height: 48px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.role-row:active {
    background: var(--bg-color);
}

body.dark-theme .role-row:active {
    background: #2c2c2e;
}

.role-row:has(input:checked) {
    background: var(--primary-light);
}

body.dark-theme .role-row:has(input:checked) {
    background: rgba(0, 113, 227, 0.18);
}

.role-row:has(input:checked) .role-row-label {
    color: var(--primary);
    font-weight: 500;
}

body.dark-theme .role-row:has(input:checked) .role-row-label {
    color: #4a9eff;
}

.role-row-icon {
    font-size: 20px;
    line-height: 1;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.role-row-label {
    flex: 1;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-row-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.role-row-check svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.role-row:has(input:checked) .role-row-check {
    opacity: 1;
    transform: scale(1);
}

body.dark-theme .role-row-check {
    color: #4a9eff;
}

.role-row.hidden {
    display: none;
}

.roles-group.hidden {
    display: none;
}

/* ==================================================== */
/* КНОПКА ИЗБРАННОГО                                    */
/* ==================================================== */
.fav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--hairline);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.fav-btn.active {
    background: rgba(255, 59, 48, 0.1);
    border-color: #ff3b30;
    color: #ff3b30;
}

.fav-btn-market {
    position: absolute !important;
    top: 10px;
    right: 10px;
    left: auto !important;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .fav-btn-market {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff;
}

.fav-btn-property {
    position: absolute !important;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .fav-btn-property {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff;
}

/* ==================================================== */
/* ПАНЕЛЬ ИЗБРАННОГО                                    */
/* ==================================================== */
.favorites-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hairline);
}

.favorites-tab {
    padding: 7px 14px;
    border-radius: 100px;
    border: 1.5px solid var(--hairline);
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.favorites-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==================================================== */
/* ИЗБРАННОЕ — СТЕКЛО В СТИЛЕ APPLE (МОБИЛЬНАЯ)         */
/* ==================================================== */

.favorite-item {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 16px 18px 14px 18px !important;
    margin-bottom: 0 !important;

    /* Стекло */
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;

    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;

    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.2s ease !important;
}

body.dark-theme .favorite-item {
    background: rgba(28, 28, 30, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.favorite-item:active {
    transform: scale(0.985);
    border-color: rgba(0, 113, 227, 0.35) !important;
}

/* Шапка карточки */
.favorite-item-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
}

/* Бейдж категории — синяя стеклянная таблетка */
.favorite-kind-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 12px !important;
    border-radius: 100px !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    line-height: 1.2 !important;
}

body.dark-theme .favorite-kind-badge {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

/* Крестик удаления — стеклянный круг с поворотом */
.favorite-remove-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(120, 120, 128, 0.14) !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.dark-theme .favorite-remove-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

.favorite-remove-btn:active {
    background: #ff3b30 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(0.92) !important;
}

/* Информация */
.favorite-item .cabinet-item-info {
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
}

.favorite-item .cabinet-item-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.favorite-item .cabinet-item-desc {
    font-size: 12.5px !important;
    color: var(--text-muted) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Нижний блок */
.favorite-item>div:last-child {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    gap: 10px !important;
}

body.dark-theme .favorite-item>div:last-child {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.favorite-item .cabinet-item-price {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

/* Кнопка «Открыть» */
.favorite-item .btn-outline {
    padding: 8px 18px !important;
    border-radius: 100px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    border: none !important;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.dark-theme .favorite-item .btn-outline {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

.favorite-item .btn-outline:active {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: scale(0.94) !important;
}

/* Убираем «прилипание» карточек друг к другу в контейнере */
#favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================================================== */
/* ФОНОВЫЙ СЛОЙ                                         */
/* ==================================================== */
.app-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(160deg, #eaf1fb 0%, #f5f8fd 50%, #ffffff 100%);
}

body.dark-theme .app-background {
    background: linear-gradient(160deg, #050a18 0%, #0a1428 50%, #020509 100%);
}

.bg-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(45px);
    opacity: 0.65;
}

.bg-sphere-left {
    width: 280px;
    height: 280px;
    left: -110px;
    top: -90px;
    background: radial-gradient(circle at 35% 35%, #b8d4f5 0%, #d8e7f8 45%, transparent 75%);
}

.bg-sphere-right {
    width: 340px;
    height: 340px;
    right: -140px;
    bottom: -140px;
    background: radial-gradient(circle at 60% 40%, #a8ccf0 0%, #cfe0f5 50%, transparent 78%);
}

body.dark-theme .bg-sphere-left {
    background: radial-gradient(circle at 35% 35%, #0a3a78 0%, #052045 45%, transparent 75%);
}

body.dark-theme .bg-sphere-right {
    background: radial-gradient(circle at 60% 40%, #0d4a94 0%, #05214a 50%, transparent 78%);
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    background: radial-gradient(circle, #6ea8ff 0%, transparent 70%);
}

.bg-glow-tl {
    width: 220px;
    height: 220px;
    left: -70px;
    top: -60px;
}

.bg-glow-bl {
    width: 260px;
    height: 260px;
    left: -90px;
    bottom: -100px;
    opacity: 0.4;
}

.bg-glow-tr {
    width: 200px;
    height: 200px;
    right: -60px;
    top: -50px;
    opacity: 0.3;
}

body.dark-theme .bg-glow {
    background: radial-gradient(circle, #1a5fd4 0%, transparent 70%);
    opacity: 0.7;
}

.bg-arc {
    position: absolute;
    border-radius: 50%;
    border: 1.2px solid transparent;
    border-top-color: rgba(110, 168, 255, 0.5);
    pointer-events: none;
}

.bg-arc-1 {
    width: 700px;
    height: 700px;
    left: -220px;
    top: 22%;
    transform: rotate(-15deg);
}

.bg-arc-2 {
    width: 900px;
    height: 900px;
    left: -320px;
    top: 14%;
    border-top-color: rgba(110, 168, 255, 0.3);
    transform: rotate(-22deg);
}

.bg-arc-3 {
    width: 500px;
    height: 500px;
    right: -180px;
    bottom: -120px;
    border-top-color: rgba(110, 168, 255, 0.35);
    transform: rotate(35deg);
}

body.dark-theme .bg-arc {
    border-top-color: rgba(74, 145, 255, 0.65);
}

.bg-building {
    position: absolute;
    right: 4%;
    bottom: 8%;
    width: 150px;
    height: 200px;
    opacity: 0.15;
    border-left: 1.2px solid rgba(110, 168, 255, 0.8);
    border-top: 1.2px solid rgba(110, 168, 255, 0.8);
    border-right: 1.2px solid rgba(110, 168, 255, 0.5);
    clip-path: polygon(0 20%, 50% 0, 100% 20%, 100% 100%, 0 100%);
    transform: skewY(-6deg);
}

.bg-building::before {
    content: '';
    position: absolute;
    inset: 25% 12% 12% 12%;
    background-image:
        linear-gradient(to right, rgba(110, 168, 255, 0.5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(110, 168, 255, 0.5) 1px, transparent 1px);
    background-size: 22px 20px;
}

body.dark-theme .bg-building {
    opacity: 0.3;
    border-color: rgba(90, 165, 255, 0.85);
}

@media (max-width: 480px) {
    .bg-building {
        display: none;
    }

    .bg-arc-2 {
        display: none;
    }
}

/* ==================================================== */
/* МЕНЮ СООБЩЕСТВА                                      */
/* ==================================================== */
.community-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    z-index: 99999 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.community-menu-overlay.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

.community-menu {
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom)) 16px;
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-spring);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100000 !important;
}

body.dark-theme .community-menu {
    background: #1c1c1e;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.community-menu-overlay.active .community-menu {
    transform: translateY(0);
}

.community-menu-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--hairline);
    margin: 4px auto 12px;
}

.community-menu-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 0 6px 10px;
}

.community-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-color);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .community-menu-item {
    background: #2c2c2e;
}

.community-menu-item:active {
    transform: scale(0.97);
    background: var(--primary-light);
}

body.dark-theme .community-menu-item:active {
    background: rgba(0, 113, 227, 0.2);
}

.community-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

body.dark-theme .community-menu-icon {
    background: #1c1c1e;
}

.community-menu-info {
    flex: 1;
    min-width: 0;
}

.community-menu-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}

.community-menu-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.community-menu-arrow {
    color: var(--text-muted);
    font-size: 22px;
    font-weight: 300;
    opacity: 0.5;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-out);
}

.community-menu-item:active .community-menu-arrow {
    color: var(--primary);
    opacity: 1;
    transform: translateX(3px);
}

.community-menu-divider {
    height: 1px;
    background: var(--hairline);
    margin: 6px 4px;
    border-radius: 1px;
}

/* ==================================================== */
/* НЕДВИЖИМОСТЬ                                         */
/* ==================================================== */
.properties-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.properties-page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin: 0;
}

.properties-page-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.properties-page-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.properties-page-search {
    position: relative;
    flex: 1;
    min-width: 100%;
    display: flex;
    align-items: center;
}

.properties-page-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.properties-page-search-input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 38px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.properties-page-search-input:focus {
    border-color: var(--primary);
}

.properties-page-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}

.properties-page-filter-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 100px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.properties-page-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.properties-page-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.properties-page-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border: 2px dashed var(--hairline);
    border-radius: var(--radius);
}

.properties-page-grid .property-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.properties-page-grid .property-card-image {
    height: 160px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.properties-page-grid .property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.properties-page-grid .property-card-info {
    padding: 12px 14px;
}

.properties-page-grid .property-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.properties-page-grid .property-card-title {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.3;
}

.property-card-deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    z-index: 2;
}

.property-card-deal-badge.sale {
    background: #ff3b30;
}

.property-card-deal-badge.rent {
    background: #0071e3;
}

.property-modal {
    max-width: 100% !important;
    padding: 20px 16px 16px !important;
}

.property-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.property-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0071e3 0%, #5a9bff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.property-modal-icon svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}

.property-modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.property-modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.property-modal-section {
    margin-bottom: 18px;
}

.property-section-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.property-photo-uploader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-color);
    border: 2px dashed var(--hairline);
    border-radius: 12px;
    cursor: pointer;
    height: 70px;
}

.property-photo-uploader-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.property-photo-uploader-icon svg {
    width: 20px;
    height: 20px;
}

.property-photo-uploader-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.property-photo-uploader-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.property-photo-uploader-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.property-photos-preview {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.property-photo-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hairline);
}

.property-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-photo-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.property-view-modal {
    max-width: 100% !important;
    padding: 16px !important;
}

.property-view-gallery {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-color);
    margin-bottom: 10px;
}

.property-view-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-view-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-view-photo-placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.property-view-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.property-view-nav.prev {
    left: 8px;
}

.property-view-nav.next {
    right: 8px;
}

.property-view-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 9px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.property-view-thumbs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
}

.property-view-thumb {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.property-view-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-view-thumb.active {
    border-color: var(--primary);
}

.property-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.property-view-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.property-view-deal {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #0071e3;
}

.property-view-deal.sale {
    background: #ff3b30;
}

.property-view-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px;
}

.property-view-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 12px;
    white-space: pre-wrap;
}

.property-view-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.property-view-spec {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.property-view-owner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
}

.property-view-owner-info {
    flex: 1;
    min-width: 0;
}

.property-view-owner-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.property-view-owner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.property-view-owner-phone {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 2px;
}

.property-view-owner-loc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.property-view-owner-arrow {
    color: var(--text-muted);
    opacity: 0.5;
}

.property-view-contact-btn {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.property-view-own-actions {
    display: flex;
    gap: 8px;
}

.property-view-btn-close,
.property-view-btn-delete {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.property-view-btn-close {
    background: var(--bg-color);
    color: var(--text-main);
}

.property-view-btn-delete {
    background: #ff3b30;
    color: #fff;
}

/* ==================================================== */
/* ЯЗЫКОВОЙ АККОРДЕОН                                   */
/* ==================================================== */
.segmented-item.lang-block {
    position: relative;
    gap: 4px;
    padding: 0 10px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lang-display-text {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: var(--text-main);
}

.lang-chevron {
    transition: transform 0.3s var(--ease-spring);
    color: var(--text-muted);
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.segmented-item.lang-block.open .lang-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.lang-select-invisible {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.lang-panel {
    position: fixed !important;
    top: -9999px;
    left: -9999px;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 5px;
    z-index: 2147483647 !important;
    opacity: 0;
    transform: translateY(-6px) scale(0.95);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s var(--ease-out), transform 0.28s var(--ease-spring);
}

body.dark-theme .lang-panel {
    background: rgba(28, 28, 30, 0.97);
    border-color: rgba(255, 255, 255, 0.1);
}

.lang-panel.open {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: all !important;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.lang-option:active {
    background: var(--bg-color);
}

body.dark-theme .lang-option:active {
    background: #2c2c2e;
}

.lang-option.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

body.dark-theme .lang-option.active {
    background: rgba(0, 113, 227, 0.2);
}

.lang-option-flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-option-label {
    flex: 1;
    font-size: 13px;
}

.lang-option-code {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--bg-color);
    flex-shrink: 0;
}

body.dark-theme .lang-option-code {
    background: #2c2c2e;
}

.lang-option.active .lang-option-code {
    background: rgba(0, 113, 227, 0.15);
    color: var(--primary);
}

.lang-option-check {
    color: var(--primary);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.22s var(--ease-out), transform 0.25s var(--ease-spring);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.lang-option.active .lang-option-check {
    opacity: 1;
    transform: scale(1);
}

/* ==================================================== */
/* ДАШБОРД: СКРЫТИЕ ПРИ ОТКРЫТОЙ СЕКЦИИ                */
/* ==================================================== */
body:has(.section-content.active) .mobile-dashboard {
    display: none !important;
}

.mobile-dashboard {
    display: flex;
}

.mobile-dashboard:not([style*="display: none"]) {
    animation: dashFadeIn 0.5s var(--ease-out) both;
}

/* ==================================================== */
/* НОВОЕ — КОНВЕРТЕР / ГЕОМЕТРИЯ / ОРГАНАЙЗЕР / БИРЖА   */
/* ==================================================== */
#converter-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#converter-content .card {
    padding: 14px;
}

#converter-result {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    text-align: center;
    border: 1.5px solid rgba(0, 113, 227, 0.2) !important;
}

body.dark-theme #converter-result {
    background: #0a2a52 !important;
    border-color: rgba(0, 113, 227, 0.4) !important;
}

#geometry-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#geometry-content .card {
    padding: 14px;
    margin-bottom: 0 !important;
}

#geometry-content .card-title {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--primary);
}

#geometry-content .grid-2col {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

#geometry-content .concrete-results-grid {
    margin-top: 10px;
}

.assumptions-block {
    padding: 8px 10px;
    background: rgba(255, 149, 0, 0.08);
    border-left: 3px solid #ff9500;
    border-radius: 8px;
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.assumptions-block strong {
    font-size: 10.5px;
    color: #ff9500;
    font-weight: 700;
}

.job-meta-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.job-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    letter-spacing: 0.2px;
}

body.dark-theme .job-type-badge {
    background: rgba(0, 113, 227, 0.2);
}

.job-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.job-status-badge.active {
    background: rgba(0, 113, 227, 0.12);
}

.job-status-badge.done {
    background: rgba(25, 135, 84, 0.12);
}

.job-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

#modal-job-comments .auth-card {
    max-width: 480px;
    padding: 22px 18px;
}

#jc-list {
    max-height: 300px !important;
}

#jc-list::-webkit-scrollbar {
    width: 6px;
}

#jc-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

#jc-list>div:hover {
    background: var(--primary-light);
}

body.dark-theme #jc-list>div:hover {
    background: rgba(0, 113, 227, 0.1);
}

#jc-input {
    font-size: 16px !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР                                           */
/* ==================================================== */
.organizer-page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.organizer-page-header .properties-page-title {
    font-size: 22px;
}

.organizer-page-header .btn-primary {
    width: 100%;
    justify-content: center;
}

.organizer-projects-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.organizer-empty {
    padding: 40px 16px;
    text-align: center;
    border: 2px dashed var(--hairline);
    border-radius: var(--radius);
    background: var(--card-bg);
}

.organizer-empty h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.organizer-empty p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0 12px;
}

.organizer-project-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.organizer-project-card:active {
    transform: scale(0.98);
}

body.dark-theme .organizer-project-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.organizer-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.organizer-project-number {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.organizer-project-status {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 6px;
}

.organizer-project-status.active {
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
}

.organizer-project-status.done {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.organizer-project-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organizer-project-address {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organizer-project-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.organizer-project-progress {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.organizer-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--hairline);
    border-radius: 3px;
    overflow: hidden;
}

.organizer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #0080ff 100%);
    border-radius: 3px;
    transition: width 0.4s var(--ease-out);
}

.organizer-progress-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.organizer-detail-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.organizer-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.organizer-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px 0 12px;
    border-radius: 100px;
    border: 1px solid var(--hairline);
    background: var(--card-bg);
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.organizer-back-btn svg {
    display: block;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.organizer-back-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.organizer-back-btn:hover svg {
    transform: translateX(-2px);
}

.organizer-back-btn:active {
    transform: scale(0.96);
    filter: brightness(0.95);
}

body.dark-theme .organizer-back-btn {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .organizer-back-btn:hover {
    background: rgba(0, 113, 227, 0.2);
    border-color: var(--primary);
}

.organizer-detail-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.organizer-detail-number {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.organizer-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.15;
}

.organizer-detail-address {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — ВКЛАДКИ В СТИЛЕ APPLE                   */
/* ==================================================== */
.organizer-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    margin-bottom: 18px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: none;
}

.organizer-tabs::-webkit-scrollbar {
    display: none;
}

.organizer-tab-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.2s ease,
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.dark-theme .organizer-tab-btn {
    background: rgba(44, 44, 46, 0.55);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.organizer-tab-btn:hover {
    background: rgba(0, 113, 227, 0.08);
    color: var(--primary);
    border-color: rgba(0, 113, 227, 0.2);
}

.organizer-tab-btn:active {
    transform: scale(0.96);
}

.organizer-tab-btn.active {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow:
        0 6px 16px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.organizer-tab-btn span[data-icon] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.organizer-tab-btn span[data-icon] svg {
    width: 15px;
    height: 15px;
    display: block;
    stroke: currentColor;
}

.organizer-tab-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.organizer-empty-small {
    padding: 30px 16px;
    text-align: center;
    border: 2px dashed var(--hairline);
    border-radius: var(--radius);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.organizer-empty-small p {
    font-size: 13px;
    color: var(--text-muted);
}

.organizer-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.organizer-actions-row .btn-primary {
    width: 100%;
    justify-content: center;
}

.organizer-section {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 14px;
}

body.dark-theme .organizer-section {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.organizer-danger-zone {
    border-color: rgba(255, 59, 48, 0.3);
    background: rgba(255, 59, 48, 0.03);
}

body.dark-theme .organizer-danger-zone {
    background: rgba(255, 59, 48, 0.06);
    border-color: rgba(255, 59, 48, 0.3);
}

.organizer-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.organizer-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

body.dark-theme .organizer-stat-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-stat-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.organizer-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.organizer-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    line-height: 1.2;
}

.organizer-stages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.organizer-stage-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
}

body.dark-theme .organizer-stage-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-stage-card.status-planned {
    border-left: 3px solid #86868b;
}

.organizer-stage-card.status-active {
    border-left: 3px solid var(--primary);
}

.organizer-stage-card.status-done {
    border-left: 3px solid #198754;
    opacity: 0.85;
}

.organizer-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.organizer-stage-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
}

.organizer-stage-status {
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.organizer-stage-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.organizer-stage-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.organizer-stage-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.organizer-stage-actions .btn-outline {
    padding: 5px 10px;
    font-size: 11.5px;
}

.organizer-table-wrap {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.dark-theme .organizer-table-wrap {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 480px;
}

.organizer-table thead {
    background: var(--bg-color);
}

body.dark-theme .organizer-table thead {
    background: #2c2c2e;
}

.organizer-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--hairline);
    white-space: nowrap;
}

.organizer-table td {
    padding: 10px 12px;
    color: var(--text-main);
    border-bottom: 1px solid var(--hairline);
}

.organizer-table tbody tr:last-child td {
    border-bottom: none;
}

.organizer-table td:last-child {
    white-space: nowrap;
    text-align: right;
}

.organizer-purchases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.organizer-purchase-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

body.dark-theme .organizer-purchase-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-purchase-info {
    flex: 1;
    min-width: 0;
}

.organizer-purchase-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.organizer-purchase-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.organizer-purchase-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.organizer-purchase-price {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    white-space: nowrap;
}

.organizer-purchase-status {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.organizer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--primary-light);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 6px;
}

body.dark-theme .organizer-total-row {
    background: rgba(0, 113, 227, 0.15);
}

.organizer-total-row strong {
    color: var(--primary);
    font-size: 15px;
}

.organizer-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.organizer-file-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

body.dark-theme .organizer-file-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-file-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    background: var(--bg-color);
}

.organizer-file-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: var(--bg-color);
}

body.dark-theme .organizer-file-icon {
    background: #2c2c2e;
}

.organizer-file-name {
    padding: 6px 8px;
    font-size: 10.5px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.organizer-file-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.organizer-budget-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.organizer-budget-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.dark-theme .organizer-budget-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-budget-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.organizer-budget-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.organizer-budget-progress-wrap {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.dark-theme .organizer-budget-progress-wrap {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-budget-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.organizer-budget-progress-label strong {
    color: var(--text-main);
    font-size: 14px;
}

.organizer-budget-bar {
    width: 100%;
    height: 8px;
    background: var(--hairline);
    border-radius: 4px;
    overflow: hidden;
}

.organizer-budget-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #0080ff 100%);
    border-radius: 4px;
    transition: width 0.5s var(--ease-out), background 0.3s var(--ease-out);
}

.organizer-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.organizer-member-card {
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

body.dark-theme .organizer-member-card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #5a9bff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.organizer-member-info {
    flex: 1;
    min-width: 0;
}

.organizer-member-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.organizer-member-role {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2px;
}

.organizer-member-phone {
    font-size: 10.5px;
    color: var(--text-muted);
}

@media (max-width: 360px) {
    .organizer-overview-grid {
        grid-template-columns: 1fr;
    }

    .organizer-detail-title {
        font-size: 19px;
    }

    .organizer-tab-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .organizer-stat-value {
        font-size: 15px;
    }
}

/* ==================================================== */
/* КОНВЕРТЕР — ПЛИТКИ                                    */
/* ==================================================== */
.converter-tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 2px;
}

.converter-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    min-height: 84px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.converter-tile:active {
    transform: scale(0.94);
}

.converter-tile.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

body.dark-theme .converter-tile {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .converter-tile.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.converter-tile-icon {
    font-size: 22px;
    line-height: 1;
}

.converter-tile-label {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.15;
    color: inherit;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.converter-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================================================== */
/* ГЕОМЕТРИЯ — ПЛИТКИ                                    */
/* ==================================================== */
#geometry-content {
    gap: 16px;
}

.geometry-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.geometry-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0;
    padding: 0 2px;
}

.geometry-tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 2px;
}

.geometry-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    min-height: 84px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition: transform 0.2s var(--ease-spring), background 0.2s var(--ease-out),
        border-color 0.2s var(--ease-out);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.geometry-tile:active {
    transform: scale(0.94);
}

.geometry-tile.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

body.dark-theme .geometry-tile {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .geometry-tile.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.geometry-tile-icon {
    font-size: 24px;
    line-height: 1;
}

.geometry-tile-label {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.15;
    color: inherit;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.geometry-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 360px) {

    .converter-tile,
    .geometry-tile {
        min-height: 74px;
        padding: 10px 4px;
    }

    .converter-tile-icon,
    .geometry-tile-icon {
        font-size: 20px;
    }

    .converter-tile-label,
    .geometry-tile-label {
        font-size: 9.5px;
    }
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — КНОПКА УДАЛЕНИЯ                         */
/* ==================================================== */
/* ==================================================== */
/* ОРГАНАЙЗЕР — КНОПКА УДАЛЕНИЯ В КАРТОЧКЕ ПРОЕКТА       */
/* Стиль: Apple Glass, как в «Моих объявлениях»          */
/* ==================================================== */

.organizer-project-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;

    z-index: 50;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto;

    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-theme .organizer-project-delete {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

.organizer-project-delete:hover,
.organizer-project-delete:focus-visible {
    background: #ff3b30;
    color: #ffffff;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35);
    outline: none;
}

.organizer-project-delete:active {
    transform: rotate(90deg) scale(0.92);
    background: #e0342b;
    color: #ffffff;
    transition-duration: 0.15s;
}

/* Размер иконки внутри */
.organizer-project-delete svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

.organizer-project-status-row {
    display: flex;
    justify-content: flex-start;
    margin-top: -2px;
    margin-bottom: 4px;
    padding-right: 40px;
}

/* ==================================================== */
/* ПРОФИЛЬ (мобильная версия) — контент модалки         */
/* ИСПРАВЛЕН: фон теперь НЕПРОЗРАЧНЫЙ, без просвета      */
/* ==================================================== */
.profile-view-modal {
    transition: max-width 0.45s var(--ease-spring) !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .profile-view-modal {
    background: #1c1c1e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6) !important;
}

.profile-view-layout {
    display: flex;
    width: 100%;
    min-height: 0;
    max-height: 92vh;
    position: relative;
}

.profile-view-main {
    flex: 1 1 100%;
    min-width: 0;
    padding: 22px 18px 20px 18px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 92vh;
    transition: flex-basis 0.45s var(--ease-spring), padding 0.35s var(--ease-out);
}

.profile-view-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.profile-view-avatar {
    width: 64px !important;
    height: 64px !important;
    font-size: 24px !important;
    flex-shrink: 0;
}

.profile-view-header-info {
    flex: 1;
    min-width: 0;
}

.profile-view-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.profile-view-role {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.profile-view-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.profile-view-stars {
    color: #ffcc00;
    font-size: 14px;
    letter-spacing: 1px;
}

.profile-view-rating-num {
    font-weight: 700;
    color: var(--text-main);
}

.profile-view-rating-count {
    color: var(--text-muted);
}

.profile-view-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-view-action-btn {
    flex: 1;
    height: 46px;
    border-radius: 14px;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 5px;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-spring);
}

.profile-view-action-btn:active {
    transform: scale(0.96);
}

.profile-view-action-btn.primary {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.profile-view-action-btn.secondary {
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

body.dark-theme .profile-view-action-btn.secondary {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.profile-view-group {
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    margin-bottom: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.dark-theme .profile-view-group {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.06);
}

.profile-view-group-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    text-decoration: none;
    font-family: inherit;
    text-align: left;
    width: 100%;
    transition: background 0.2s var(--ease-out);
}

body.dark-theme .profile-view-group-row {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.profile-view-group-row:last-child {
    border-bottom: none;
}

.profile-view-group-row.interactive {
    cursor: pointer;
}

.profile-view-group-row.interactive:active {
    background: rgba(0, 113, 227, 0.08);
}

.profile-view-contact-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
}

.profile-view-contact-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-view-contact-arrow {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 300;
    opacity: 0.4;
}

.profile-view-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.profile-view-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-view-about {
    margin-bottom: 20px;
}

.profile-view-about-text {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    padding: 14px 16px;
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    white-space: pre-wrap;
    margin: 0;
}

body.dark-theme .profile-view-about-text {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.06);
}

.profile-view-reviews-section {
    margin-bottom: 18px;
}

.profile-view-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.profile-view-reviews-list:empty::before {
    content: 'Пока нет отзывов';
    display: block;
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-color);
    border-radius: 12px;
}

body.dark-theme .profile-view-reviews-list:empty::before {
    background: #2c2c2e;
}

.profile-review-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 12px;
}

body.dark-theme .profile-review-item {
    background: #2c2c2e;
}

.profile-review-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    flex-shrink: 0;
}

.profile-review-body {
    flex: 1;
    min-width: 0;
}

.profile-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.profile-review-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.profile-review-stars {
    font-size: 11px;
    color: #ffcc00;
    flex-shrink: 0;
}

.profile-review-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.profile-review-date {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 4px;
}

.profile-view-add-review {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--hairline);
}

.profile-view-vote-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.profile-view-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-color);
    border: 1.5px solid transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

body.dark-theme .profile-view-vote-btn {
    background: #2c2c2e;
}

.profile-view-vote-btn.like.active {
    background: rgba(25, 135, 84, 0.15);
    border-color: #198754;
    color: #198754;
}

.profile-view-vote-btn.dislike.active {
    background: rgba(255, 59, 48, 0.15);
    border-color: #ff3b30;
    color: #ff3b30;
}

.profile-view-review-textarea {
    height: 80px !important;
    min-height: 80px !important;
    padding: 10px 12px !important;
    background: var(--bg-color);
    border-radius: 10px;
    resize: none;
    font-size: 13px !important;
}

body.dark-theme .profile-view-review-textarea {
    background: #2c2c2e;
}

.profile-view-self {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-theme .profile-view-self {
    border-top-color: rgba(255, 255, 255, 0.06);
}

.profile-view-self-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-view-ads-panel {
    flex: 0 0 0%;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    padding: 0;
    transition: all 0.4s var(--ease-spring);
}

.profile-view-modal.ads-open .profile-view-main {
    flex: 0 0 0%;
    max-width: 0;
    padding: 0;
    opacity: 0;
}

.profile-view-modal.ads-open .profile-view-ads-panel {
    flex: 1 1 100%;
    max-width: 100%;
    opacity: 1;
    padding: 20px 16px;
}

.profile-view-ads-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.profile-view-ads-panel-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.profile-view-ads-panel-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
}

.profile-view-ads-panel-close:active {
    transform: rotate(90deg);
    background: #ff3b30;
    color: #fff;
}

.profile-view-ads-panel-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-view-ads-filter {
    padding: 6px 12px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s var(--ease-out);
}

.profile-view-ads-filter.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.profile-view-ads-panel-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-content: start;
}

.profile-view-ads-empty {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--card-bg);
    border-radius: 14px;
    border: 2px dashed var(--border);
}

.profile-ads-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-ads-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.profile-ads-card-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.profile-ads-card-badge.market {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
}

.profile-ads-card-badge.jobs {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
}

.profile-ads-card-badge.properties {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

body.dark-theme .profile-ads-card-badge.market {
    background: rgba(0, 113, 227, 0.25);
    color: #4a9eff;
}

body.dark-theme .profile-ads-card-badge.jobs {
    background: rgba(255, 149, 0, 0.25);
    color: #ffb340;
}

body.dark-theme .profile-ads-card-badge.properties {
    background: rgba(25, 135, 84, 0.25);
    color: #4cd964;
}

.profile-ads-card-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-ads-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.profile-ads-card-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.profile-ads-card-loc {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-view-contacts,
.profile-view-votes,
.profile-view-ads-toggle {
    display: none !important;
}

/* ==================================================== */
/* СТАТУС-БАР ДЛЯ СООБЩЕСТВА / ОРГАНАЙЗЕРА              */
/* ==================================================== */

.status-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

body.status-bar-mode .status-bar {
    display: flex;
}

body.status-bar-mode .header-default-content {
    display: none !important;
}

body.status-bar-mode .header-top-modern {
    padding: 8px 12px !important;
}

.status-bar-back,
.status-bar-home,
.status-bar-add {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .status-bar-back,
body.dark-theme .status-bar-home,
body.dark-theme .status-bar-add {
    background: #2c2c2e;
}

.status-bar-back:active,
.status-bar-home:active,
.status-bar-add:active {
    transform: scale(0.9);
    background: rgba(0, 113, 227, 0.15);
}

.status-bar-back svg,
.status-bar-home svg,
.status-bar-add svg {
    display: block;
    flex-shrink: 0;
}

/* Кнопка «Добавить» — акцентная, синяя */
.status-bar-add {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

body.dark-theme .status-bar-add {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
}

.status-bar-add:active {
    transform: scale(0.9);
    background: var(--primary-hover) !important;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.3);
}

.status-bar-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px;
}

/* ==================================================== */
/* КРЕСТИК-КНОПКА "НАЗАД"                                */
/* ==================================================== */
.close-modal {
    z-index: 100 !important;
}

.close-modal,
.property-view-close {
    display: flex !important;
}

.close-modal span,
.close-modal svg {
    display: none !important;
}

.close-modal {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    width: auto !important;
    height: 36px !important;
    padding: 0 14px 0 10px !important;
    background: var(--bg-color) !important;
    color: var(--primary) !important;
    border-radius: 100px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 1000 !important;
    transition: opacity 0.2s, transform 0.2s !important;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme .close-modal {
    background: rgba(28, 28, 30, 0.9) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.close-modal:active {
    opacity: 0.6 !important;
    transform: scale(0.96) !important;
    background: var(--bg-color) !important;
    color: var(--primary) !important;
}

.close-modal::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg);
    margin-bottom: 1px;
}

.close-modal::after {
    content: 'Назад';
    letter-spacing: -0.01em;
}

/* Отступы, чтобы кнопка "Назад" не закрывала текст */
.auth-card {
    padding-top: 56px !important;
}

.property-view-modal {
    padding-top: 56px !important;
}

.profile-view-main {
    padding-top: 56px !important;
}

/* ==================================================== */
/* ВЕРХНИЕ ТАБЫ В ПРОФИЛЕ                               */
/* ==================================================== */
.profile-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    background: var(--bg-color);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.dark-theme .profile-tabs {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.profile-tab {
    flex: 1 1 0;
    min-width: 0;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 2px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.profile-tab-icon {
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.profile-tab-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.profile-tab-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    padding: 0 2px;
    box-sizing: border-box;
}

.profile-tab:active {
    transform: scale(0.94);
}

.profile-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
}

body.dark-theme .profile-tab.active {
    background: #1c1c1e;
    color: #4a9eff;
}

.profile-tab.active .profile-tab-icon {
    transform: scale(1.1);
}

@media (max-width: 380px) {
    .profile-tabs {
        gap: 3px;
        padding: 3px;
    }

    .profile-tab {
        padding: 7px 2px;
        gap: 2px;
    }

    .profile-tab-icon svg {
        width: 16px;
        height: 16px;
    }

    .profile-tab-label {
        font-size: 9.5px;
        letter-spacing: -0.03em;
    }
}

/* ==================================================== */
/* ROLE BADGE — компактное облачко с ролями             */
/* ==================================================== */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    border: none;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    vertical-align: middle;
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .role-badge {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

.role-badge:active {
    transform: scale(0.94);
}

.role-badge-icon {
    font-size: 13px;
    line-height: 1;
}

.role-badge-count {
    font-weight: 700;
}

/* ==================================================== */
/* ROLE POPUP                                           */
/* ==================================================== */
.role-popup {
    position: fixed;
    z-index: 2147483646;
    min-width: 220px;
    max-width: 300px;
    max-height: 340px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    padding: 10px;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

body.dark-theme .role-popup {
    background: rgba(28, 28, 30, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

.role-popup.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.role-popup-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 4px 8px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}

.role-popup-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.role-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.3;
    transition: background 0.15s ease;
}

.role-popup-item:active {
    background: var(--bg-color);
}

body.dark-theme .role-popup-item:active {
    background: #2c2c2e;
}

.role-popup-item-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.role-popup-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-popup::-webkit-scrollbar {
    width: 5px;
}

.role-popup::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ==================================================== */
/* ПОЛЗУНОК ТЕМЫ                                        */
/* ==================================================== */
.theme-slider {
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box;
    color: #1d1d1f !important;
}

body.dark-theme .theme-slider {
    background: #f5f5f7 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(0, 0, 0, 0.3) !important;
    color: #1d1d1f !important;
}

.theme-icon,
body.dark-theme .theme-icon {
    color: #1d1d1f !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: bold !important;
}

input#theme-toggle-mobile:not(:checked)+.theme-track {
    background: rgba(120, 120, 128, 0.16) !important;
}

input#theme-toggle-mobile:not(:checked)+.theme-track .theme-slider {
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
}

input#theme-toggle-mobile:checked+.theme-track {
    background: rgba(120, 120, 128, 0.45) !important;
}

input#theme-toggle-mobile:checked+.theme-track .theme-slider {
    background: #f5f5f7 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(0, 0, 0, 0.3) !important;
    color: #1d1d1f !important;
}

input#theme-toggle-mobile:checked+.theme-track .theme-icon {
    color: #1d1d1f !important;
}

/* ==================================================== */
/* ПРОФИЛЬ — ФИНАЛЬНЫЕ ОТСТУПЫ                          */
/* ==================================================== */
#profile.section-content.active {
    padding: 4px 12px calc(90px + env(safe-area-inset-bottom, 0px)) 12px !important;
}

#profile-auth>.card:first-child {
    padding: 20px 16px 16px !important;
    margin: 0 0 10px 0 !important;
    border-radius: 18px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme #profile-auth>.card:first-child {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#profile-auth>.card:first-child .cabinet-avatar {
    width: 88px !important;
    height: 88px !important;
    font-size: 36px !important;
    margin: 0 auto 12px !important;
}

#profile-auth>.card:first-child .cabinet-name {
    font-size: 17px !important;
    margin-bottom: 4px !important;
}

#profile-auth .profile-tabs {
    margin: 0 0 10px 0 !important;
}

#profile-auth .cabinet-pane {
    margin: 0 !important;
    padding: 0 !important;
}

#profile-auth .cabinet-pane>.card {
    padding: 16px 14px !important;
    margin: 0 !important;
    border-radius: 18px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme #profile-auth .cabinet-pane>.card {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================================================== */
/* СПИСОК МАТЕРИАЛОВ В СТИЛЕ APPLE                      */
/* ==================================================== */
/* Стили для списка материалов в калькуляторе (мобильная версия) */
#concrete .concrete-results-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    background: var(--card-bg) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme .concrete-results-grid {
    background: #1c1c1e !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.06) !important;
}

.concrete-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 16px !important;
    min-height: 44px !important;
    font-size: 14px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 0.5px solid var(--hairline) !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    transition: background 0.15s var(--ease-out) !important;
}

.concrete-row:last-child {
    border-bottom: none !important;
}

.concrete-row:not(:first-child):not([style*="primary-light"]) {
    position: relative;
}

.concrete-row:active {
    background: rgba(0, 0, 0, 0.03) !important;
}

body.dark-theme .concrete-row:active {
    background: rgba(255, 255, 255, 0.04) !important;
}

body.dark-theme .concrete-row {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.concrete-row span {
    font-size: 14px !important;
    color: var(--text-main) !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em !important;
}

.concrete-row strong {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    text-align: right !important;
}

body.dark-theme .concrete-row span {
    color: #f5f5f7 !important;
}

body.dark-theme .concrete-row strong {
    color: #98989d !important;
}

.concrete-row[style*="primary-light"] {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    padding: 9px 16px !important;
    min-height: 36px !important;
    border-bottom: 0.5px solid rgba(0, 113, 227, 0.15) !important;
    box-shadow: none !important;
}

.concrete-row[style*="primary-light"] span {
    color: var(--primary) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1px !important;
}

body.dark-theme .concrete-row[style*="primary-light"] {
    background: rgba(0, 113, 227, 0.18) !important;
    border-bottom-color: rgba(0, 113, 227, 0.3) !important;
}

body.dark-theme .concrete-row[style*="primary-light"] span {
    color: #4a9eff !important;
}

#concrete-sand-moisture,
#concrete-gravel-moisture {
    height: 38px !important;
    font-size: 15px !important;
    background: var(--bg-color) !important;
    border: 0.5px solid var(--hairline) !important;
    border-radius: 10px !important;
}

body.dark-theme #concrete-sand-moisture,
body.dark-theme #concrete-gravel-moisture {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================================================== */
/* ПАНЕЛЬ ФИЛЬТРА РОЛЕЙ — iOS-стиль (мобилка, финал)     */
/* ==================================================== */
#top-roles-panel-global {
    position: fixed !important;
    top: auto !important;
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 65vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 22px;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    z-index: 2147483647 !important;
    pointer-events: none !important;
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: opacity, transform;
}

body.dark-theme #top-roles-panel-global {
    background: rgba(28, 28, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

#top-roles-panel-global.open {
    pointer-events: auto !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

#top-roles-panel-global * {
    pointer-events: auto !important;
}

#top-roles-panel-global .top-roles-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 10px;
    border-bottom: none;
    flex-shrink: 0;
}

#top-roles-panel-global .top-roles-panel-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

#top-roles-panel-global .top-roles-panel-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme #top-roles-panel-global .top-roles-panel-close {
    background: #2c2c2e;
    color: #98989d;
}

#top-roles-panel-global .top-roles-panel-close:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg);
}

#top-roles-panel-global .top-roles-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 8px 12px;
}

#top-roles-panel-global .top-roles-option-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    margin: 0 0 4px 0;
    min-height: 48px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

#top-roles-panel-global .top-roles-option-all:active {
    background: var(--bg-color);
}

body.dark-theme #top-roles-panel-global .top-roles-option-all:active {
    background: #2c2c2e;
}

#top-roles-panel-global .top-roles-option-all.active {
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
}

body.dark-theme #top-roles-panel-global .top-roles-option-all.active {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

#top-roles-panel-global .top-roles-group {
    margin: 0;
}

#top-roles-panel-global .top-roles-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 14px 16px 6px;
    margin: 0;
    background: transparent;
    border: none;
}

#top-roles-panel-global .top-roles-group-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#top-roles-panel-global .top-roles-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    min-height: 48px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

#top-roles-panel-global .top-roles-option:active {
    background: var(--bg-color);
}

body.dark-theme #top-roles-panel-global .top-roles-option:active {
    background: #2c2c2e;
}

#top-roles-panel-global .top-roles-option.active {
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
    font-weight: 600;
}

body.dark-theme #top-roles-panel-global .top-roles-option.active {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

#top-roles-panel-global .top-roles-option-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#top-roles-panel-global .top-roles-option-check {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme #top-roles-panel-global .top-roles-option-check {
    color: #4a9eff;
}

#top-roles-panel-global .top-roles-option.active .top-roles-option-check,
#top-roles-panel-global .top-roles-option-all.active .top-roles-option-check {
    opacity: 1;
    transform: scale(1);
}

body.roles-panel-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2147483646;
    pointer-events: none;
    /* ← ключевое: подложка НЕ ловит тапы */
}

/* ==================================================== */
/* ПОИСК В ПАНЕЛИ РОЛЕЙ — APPLE-СТИЛЬ                    */
/* ==================================================== */
#top-roles-panel-global .top-roles-panel-search {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 16px 14px !important;
    padding: 0 !important;
    height: 48px !important;
    background: var(--bg-color) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.dark-theme #top-roles-panel-global .top-roles-panel-search {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#top-roles-panel-global .top-roles-panel-search>svg,
#top-roles-panel-global .top-roles-panel-search svg {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
    pointer-events: none !important;
    flex-shrink: 0 !important;
    display: block !important;
    z-index: 2 !important;
}

#top-roles-panel-global .top-roles-panel-search-input,
#top-roles-panel-global #top-roles-search-input,
#top-roles-panel-global .top-roles-panel-search input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px 0 44px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    color: var(--text-main) !important;
    outline: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 48px !important;
    position: relative !important;
    z-index: 1 !important;
}

#top-roles-panel-global .top-roles-panel-search-input::placeholder,
#top-roles-panel-global #top-roles-search-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
    font-size: 15px !important;
}

#top-roles-panel-global .top-roles-panel-search-input:focus,
#top-roles-panel-global #top-roles-search-input:focus {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

#top-roles-panel-global .top-roles-panel-search:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12) !important;
}

/* ==================================================== */
/* СЕГМЕНТ «Все / Топ / Чёрный»                          */
/* ==================================================== */
#ratings .ratings-segmented {
    display: flex !important;
    align-items: stretch !important;
    padding: 2px !important;
    gap: 1px !important;
    margin-bottom: 10px !important;
    background: var(--bg-color) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
}

body.dark-theme #ratings .ratings-segmented {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

#ratings .ratings-segment {
    position: relative !important;
    z-index: 2 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    padding: 0 2px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
    cursor: pointer !important;
    border-radius: 9px !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: color 0.2s ease !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#ratings .ratings-segment.active {
    color: var(--text-main) !important;
    font-weight: 700 !important;
}

body.dark-theme #ratings .ratings-segment.active {
    color: #f5f5f7 !important;
}

#ratings .ratings-segment-indicator {
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    height: calc(100% - 4px) !important;
    background: var(--card-bg) !important;
    border-radius: 9px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.35s var(--ease-spring), width 0.35s var(--ease-spring) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

body.dark-theme #ratings .ratings-segment-indicator {
    background: #1c1c1e !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.06) !important;
}

/* ==================================================== */
/* ОБЩИЙ ЧАТ СООБЩЕСТВА (бывшие "Специалисты")           */
/* ==================================================== */

#ratings.section-content.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    height: calc(100dvh - 140px);
    min-height: 0;
    overflow: hidden;
}

.community-chat-wrap {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    background: var(--card-bg);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    margin: 8px 4px;
}

body.dark-theme .community-chat-wrap {
    background: #1c1c1e;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* Лента сообщений */
.community-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-color);
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

body.dark-theme .community-chat-messages {
    background: #000;
}

/* Сообщение */
.community-chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    animation: communityMsgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes communityMsgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.community-chat-msg.mine {
    flex-direction: row-reverse;
}

/* Аватар */
.community-chat-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #0071e3, #5a9bff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.community-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Пузырь */
.community-chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 14.5px;
    line-height: 1.45;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}


.community-chat-msg.their .community-chat-bubble {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--hairline);
    border-bottom-left-radius: 5px;
}

body.dark-theme .community-chat-msg.their .community-chat-bubble {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.community-chat-msg.mine .community-chat-bubble {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    border-bottom-right-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
}

/* Имя автора */
.community-chat-author {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.community-chat-msg.mine .community-chat-author {
    color: rgba(255, 255, 255, 0.85);
    text-align: right;
}

/* Текст */
.community-chat-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Время + удаление */
.community-chat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10.5px;
    opacity: 0.75;
    margin-top: 3px;
    line-height: 1;
}

.community-chat-msg.mine .community-chat-meta {
    color: rgba(255, 255, 255, 0.85);
}

.community-chat-msg.their .community-chat-meta {
    color: var(--text-muted);
}

.community-chat-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.community-chat-delete-btn svg {
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.community-chat-delete-btn:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(0.9);
}

/* Пусто */
.community-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

.community-chat-empty svg {
    opacity: 0.4;
}

.community-chat-empty p {
    font-size: 14px;
    line-height: 1.4;
    max-width: 260px;
    margin: 0;
}

/* Инпут */
.community-chat-input-wrap {
    flex-shrink: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
    background: var(--card-bg);
    border-top: 1px solid var(--hairline);
}

body.dark-theme .community-chat-input-wrap {
    background: #1c1c1e;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.community-chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    box-sizing: border-box;
}

.community-chat-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--hairline);
    border-radius: 21px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.dark-theme .community-chat-input {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.community-chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.community-chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.community-chat-send-btn {
    height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 21px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.community-chat-send-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.2);
}

/* Нет доступа */
.community-chat-no-access {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

.community-chat-no-access svg {
    opacity: 0.4;
}

.community-chat-no-access p {
    font-size: 14px;
    line-height: 1.4;
    max-width: 260px;
    margin: 0;
}

/* ==================================================== */
/* СПЕЦИАЛИСТЫ — панель поиска + кнопка фильтра          */
/* ==================================================== */
#ratings .ratings-search-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#ratings .ratings-search-card #search-users-input {
    width: 100% !important;
    height: 44px !important;
    padding: 0 16px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    color: var(--text-main) !important;
    outline: none !important;
    box-sizing: border-box !important;
}

#ratings .ratings-search-card #search-users-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12) !important;
}

#ratings .ratings-search-card #search-users-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
}

#ratings .ratings-search-card .top-roles-bar-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    height: 44px !important;
    padding: 0 16px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

#ratings .ratings-search-card .top-roles-bar-btn:active {
    background: var(--bg-color) !important;
}

#ratings .ratings-search-card .top-roles-bar-btn.open {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

#ratings .ratings-search-card .top-roles-bar-btn .top-roles-bar-chevron {
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
    transition: transform 0.3s var(--ease-spring) !important;
}

#ratings .ratings-search-card .top-roles-bar-btn.open .top-roles-bar-chevron {
    transform: rotate(180deg) !important;
    color: var(--primary) !important;
    opacity: 1 !important;
}

/* ==================================================== */
/* КАРТОЧКА СПЕЦИАЛИСТА — iOS-стиль                      */
/* ==================================================== */
#ratings .rating-row,
#ratings .rating-row-specialist {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    margin: 0 0 6px 0 !important;
    border-radius: 14px !important;
    background: var(--bg-color) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#ratings .rating-row:last-child,
#ratings .rating-row-specialist:last-child {
    margin-bottom: 0 !important;
}

body.dark-theme #ratings .rating-row,
body.dark-theme #ratings .rating-row-specialist {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

#ratings .rating-row:active,
#ratings .rating-row-specialist:active {
    background: rgba(0, 113, 227, 0.08) !important;
    transform: scale(0.99) !important;
}

body.dark-theme #ratings .rating-row:active,
body.dark-theme #ratings .rating-row-specialist:active {
    background: rgba(0, 113, 227, 0.2) !important;
}

#ratings .rating-row .avatar,
#ratings .rating-row-specialist .avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    font-size: 16px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, var(--primary), #5a9bff) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

#ratings .rating-row .avatar img,
#ratings .rating-row-specialist .avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

#ratings .rating-row-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#ratings .rating-row-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

#ratings .rating-row-role {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}

#ratings .rating-row-role .role-badge {
    font-size: 11.5px !important;
    padding: 3px 9px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    border-radius: 100px !important;
}

#ratings .rating-row-rating {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    margin-top: 1px !important;
}

#ratings .rating-row-stars {
    color: #ffcc00 !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
}

#ratings .rating-row-rating-num {
    font-weight: 700 !important;
    color: var(--text-main) !important;
    font-size: 13px !important;
    margin-left: 3px !important;
}

#ratings .rating-row-rating-count {
    color: var(--text-muted) !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
}

/* ==================================================== */
/* СПЕЦИАЛИСТЫ — КОМПАКТНЫЕ ОТСТУПЫ                      */
/* ==================================================== */
#ratings.section-content.active {
    gap: 8px !important;
}

#ratings .ratings-search-card {
    margin-bottom: 8px !important;
    gap: 8px !important;
}

#ratings .ratings-segmented {
    margin-bottom: 8px !important;
    padding: 2px !important;
    gap: 1px !important;
}

#ratings .ratings-segment {
    font-size: 11px !important;
    padding: 0 2px !important;
    height: 30px !important;
    letter-spacing: -0.04em !important;
}

#ratings .ratings-segment-indicator {
    top: 2px !important;
    left: 2px !important;
    height: calc(100% - 4px) !important;
}

#ratings .card {
    padding: 12px !important;
    margin-bottom: 8px !important;
}

#ratings .card:last-child {
    margin-bottom: 0 !important;
}

#ratings .card .card-title {
    margin-bottom: 8px !important;
    font-size: 13px !important;
}

#ratings .rating-row,
#ratings .rating-row-specialist {
    margin-bottom: 6px !important;
    padding: 10px !important;
}

#ratings .rating-row:last-child,
#ratings .rating-row-specialist:last-child {
    margin-bottom: 0 !important;
}

/* ==================================================== */
/* СТРАХОВКА — если класс остался, не блокируем док      */
/* ==================================================== */

/* Подложка панели ролей не должна перекрывать нижний док */
body.roles-panel-open .bottom-nav {
    position: relative !important;
    z-index: 2147483647 !important;
}

/* Если по какой-то причине класс остался, но панель закрыта — 
   псевдоэлемент всё равно не должен ловить тапы */
body.roles-panel-open::before {
    pointer-events: none !important;
}

/* ==================================================== */
/* ПАНЕЛЬ РОЛЕЙ ЗАКРЫТА — НЕ ЛОВИТ ТАПЫ                   */
/* ==================================================== */

/* Когда панель НЕ открыта — полностью игнорим тапы */
#top-roles-panel-global:not(.open) {
    pointer-events: none !important;
    visibility: hidden !important;
}

#top-roles-panel-global:not(.open) * {
    pointer-events: none !important;
}

/* Когда открыта — всё кликабельно */
#top-roles-panel-global.open {
    visibility: visible !important;
    pointer-events: auto !important;
}

#top-roles-panel-global.open * {
    pointer-events: auto !important;
}

/* ОТКЛЮЧАЕМ ТЯЖЁЛЫЕ GPU-ЭФФЕКТЫ НА МОБИЛКЕ —
   они вешают композитор при смене вкладок */
body.mobile-device .header-top-modern,
body.mobile-device .app-background,
body.mobile-device .bg-sphere,
body.mobile-device .bg-glow,
body.mobile-device .modal-overlay,
body.mobile-device .profile-view-modal,
body.mobile-device .profile-view-contacts,
body.mobile-device .profile-view-about-text,
body.mobile-device .profile-view-vote-item,
body.mobile-device .profile-view-action-btn.secondary,
body.mobile-device .profile-review-item,
body.mobile-device .dashboard-card,
body.mobile-device .dashboard-property-block,
body.mobile-device .dash-tile,
body.mobile-device .dash-tile.wide,
body.mobile-device .dashboard-chat-item,
body.mobile-device .community-menu-overlay,
body.mobile-device .role-popup,
body.mobile-device .bottom-nav .chat-fab {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Фон под прозрачностью — просто плотный цвет */
body.mobile-device .header-top-modern {
    background: var(--card-bg) !important;
}

body.mobile-device .modal-overlay {
    background: rgba(0, 0, 0, 0.55) !important;
}

body.mobile-device .dashboard-card,
body.mobile-device .dashboard-property-block,
body.mobile-device .dash-tile,
body.mobile-device .dash-tile.wide,
body.mobile-device .dashboard-chat-item {
    background: var(--card-bg) !important;
}

/* Спрячь тяжёлые фоновые шары — они не нужны на телефоне */
body.mobile-device .bg-sphere,
body.mobile-device .bg-glow,
body.mobile-device .bg-arc,
body.mobile-device .bg-building {
    display: none !important;
}

/* ==================================================== */
/* МОИ ОБЪЯВЛЕНИЯ — APPLE-КАРТОЧКИ (МОБИЛЬНАЯ)         */
/* ==================================================== */

#my-ads-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 4px 0 !important;
}

#my-ads-list .cabinet-item {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 12px 14px !important;
    padding: 16px 16px 18px 16px !important;
    /* чуть больше снизу */
    min-height: 96px !important;
    /* гарантируем высоту под колонку цена+крестик */
    margin: 0 !important;

    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;

    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;

    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.2s ease !important;
    overflow: hidden;
}

body.dark-theme #my-ads-list .cabinet-item {
    background: rgba(28, 28, 30, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

#my-ads-list .cabinet-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
    z-index: 0;
}

body.dark-theme #my-ads-list .cabinet-item::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0) 100%);
}

#my-ads-list .cabinet-item>* {
    position: relative;
    z-index: 1;
}

#my-ads-list .cabinet-item:active {
    transform: scale(0.985);
    border-color: rgba(0, 113, 227, 0.35) !important;
}

#my-ads-list .cabinet-item-info {
    flex: 1 !important;
    min-width: 0 !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    align-self: center !important;
    /* выравнивание по центру карточки */
}

#my-ads-list .cabinet-item-title {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.015em !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

#my-ads-list .cabinet-item-title svg {
    width: 26px;
    height: 26px;
    padding: 5px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
    border-radius: 8px;
    flex-shrink: 0;
    box-sizing: border-box;
}

body.dark-theme #my-ads-list .cabinet-item-title svg {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

#my-ads-list .cabinet-item-desc {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    display: block !important;
    /* ← было flex */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
    /* ← добавлено */
    overflow-wrap: break-word !important;
    /* ← добавлено */
    padding-left: 34px;
}

#my-ads-list .cabinet-item-desc svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

#my-ads-list .cabinet-item-desc+.cabinet-item-desc {
    color: var(--text-muted) !important;
    opacity: 0.85;
    padding-left: 34px;
    margin-top: -1px;
}

/* Правая колонка */
/* Правая колонка — цена СВЕРХУ, крестик СНИЗУ, с большим зазором */
#my-ads-list .cabinet-item>div:last-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 14px !important;
    /* ← было 10px, теперь больше воздуха */
    flex-shrink: 0 !important;
    min-width: 100px !important;
    padding-left: 8px;
    padding-top: 4px;
    /* ← сдвигаем всю колонку чуть вниз */
}

#my-ads-list .cabinet-item-price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    padding: 6px 10px !important;
    border-radius: 100px !important;
    background: rgba(52, 199, 89, 0.12) !important;
    flex-shrink: 0 !important;
    margin-top: 4px;
    /* ← опускаем цену на 4px ниже */
    transform: translateY(3px);
    /* ← ещё чуть-чуть вниз для точной посадки */
}

body.dark-theme #my-ads-list .cabinet-item-price {
    background: rgba(52, 199, 89, 0.18) !important;
}

#my-ads-list .cab-item-delete {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
    border: none !important;
    font-size: 12px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    flex-shrink: 0 !important;
    margin-bottom: 4px;
    /* ← поднимаем крестик на 4px выше */
    transform: translateY(-3px);
    /* ← ещё чуть-чуть вверх */

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.dark-theme #my-ads-list .cab-item-delete {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

#my-ads-list .cab-item-delete:active {
    background: #ff3b30 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(0.9) !important;
}

#my-ads-list .cabinet-empty {
    padding: 50px 20px !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    border: 2px dashed rgba(0, 0, 0, 0.08) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

body.dark-theme #my-ads-list .cabinet-empty {
    background: rgba(28, 28, 30, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================================================== */
/* ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ — APPLE GLASS (МОБИЛЬНАЯ)      */
/* ==================================================== */

/* -------- Модалка целиком -------- */
body.mobile-device .profile-view-modal,
.profile-view-modal {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.22),
        0 6px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: 100% !important;
    width: 94% !important;
    max-height: 92vh !important;
}

body.dark-theme .profile-view-modal {
    background: rgba(28, 28, 30, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Стеклянный отблеск сверху (мягкий) */
.profile-view-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.28) 0%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
    z-index: 0;
}

body.dark-theme .profile-view-modal::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%);
}

.profile-view-layout {
    position: relative;
    z-index: 1;
}

.profile-view-main {
    padding: 60px 18px 22px 18px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
}

/* -------- Шапка профиля -------- */
.profile-view-header {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 0 16px !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.dark-theme .profile-view-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.profile-view-avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 28px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #0071e3 0%, #5a9bff 100%) !important;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

body.dark-theme .profile-view-avatar {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.profile-view-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.profile-view-header-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.profile-view-name {
    font-size: 20px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.15 !important;
    color: var(--text-main) !important;
    margin: 0 0 6px 0 !important;
}

.profile-view-role {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 10px !important;
    border-radius: 100px !important;
    background: rgba(0, 113, 227, 0.12) !important;
    color: var(--primary) !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

body.dark-theme .profile-view-role {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

.profile-view-rating {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
}

.profile-view-stars {
    color: #ffcc00 !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
}

.profile-view-rating-num {
    font-weight: 800 !important;
    color: var(--text-main) !important;
    font-size: 13px !important;
}

.profile-view-rating-count {
    color: var(--text-muted) !important;
    font-size: 11.5px !important;
}

/* -------- Кнопки действий -------- */
.profile-view-actions {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
}

.profile-view-action-btn {
    flex: 1 !important;
    height: 46px !important;
    border-radius: 14px !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    white-space: nowrap !important;
}

.profile-view-action-btn.primary {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 6px 16px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.profile-view-action-btn.primary:active {
    transform: scale(0.96);
}

.profile-view-action-btn.secondary {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme .profile-view-action-btn.secondary {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.profile-view-action-btn.secondary:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.75) !important;
}

body.dark-theme .profile-view-action-btn.secondary:active {
    background: rgba(44, 44, 46, 0.8) !important;
}

/* -------- Контактные строки -------- */
.profile-view-contacts {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    padding: 4px !important;
    margin-bottom: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    overflow: hidden !important;
}

body.dark-theme .profile-view-contacts {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-view-contact-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: background 0.15s ease !important;
}

.profile-view-contact-row:last-child {
    border-bottom: none !important;
}

body.dark-theme .profile-view-contact-row {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.profile-view-contact-row.interactive:active,
.profile-view-contact-row[href]:active {
    background: rgba(0, 113, 227, 0.1) !important;
}

.profile-view-contact-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 0 !important;
}

.profile-view-contact-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    display: block !important;
}

body.dark-theme .profile-view-contact-icon {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

.profile-view-contact-text {
    flex: 1 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.profile-view-contact-arrow {
    color: var(--text-muted) !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    opacity: 0.5 !important;
    flex-shrink: 0 !important;
}

/* -------- Плитки голосования (в мобильной версии они внутри "группового" блока) -------- */
.profile-view-votes {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.profile-view-vote-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

body.dark-theme .profile-view-vote-item {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-view-vote-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 0 !important;
}

.profile-view-vote-icon svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    display: block !important;
}

.profile-view-vote-icon.like {
    background: rgba(52, 199, 89, 0.15) !important;
    color: #34c759 !important;
}

.profile-view-vote-icon.dislike {
    background: rgba(255, 59, 48, 0.15) !important;
    color: #ff3b30 !important;
}

.profile-view-vote-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.profile-view-vote-value {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1 !important;
    letter-spacing: -0.02em !important;
}

.profile-view-vote-label {
    font-size: 10.5px !important;
    color: var(--text-muted) !important;
    margin-top: 3px !important;
    font-weight: 500 !important;
}

/* -------- Кнопка «Объявления пользователя» -------- */
.profile-view-ads-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 14px !important;
    margin-bottom: 16px !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    color: var(--text-main) !important;
    transition: all 0.2s ease !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .profile-view-ads-toggle {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-view-ads-toggle:active {
    transform: scale(0.98);
    background: rgba(0, 113, 227, 0.08) !important;
}

body.dark-theme .profile-view-ads-toggle:active {
    background: rgba(0, 113, 227, 0.15) !important;
}

.profile-view-ads-toggle-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 0 !important;
}

.profile-view-ads-toggle-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    display: block !important;
}

body.dark-theme .profile-view-ads-toggle-icon {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

.profile-view-ads-toggle-label {
    flex: 1 !important;
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.profile-view-section-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 10px !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.profile-view-ads-toggle-chevron {
    color: var(--text-muted) !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.profile-view-ads-toggle.active .profile-view-ads-toggle-chevron {
    transform: rotate(180deg) !important;
    color: var(--primary) !important;
}

/* -------- Заголовки секций -------- */
.profile-view-section-title {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
    margin-bottom: 10px !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* -------- Отзывы -------- */
.profile-view-reviews-section {
    margin-bottom: 16px !important;
}

.profile-view-reviews-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-height: 260px !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
    -webkit-overflow-scrolling: touch;
}

.profile-review-item {
    display: flex !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

body.dark-theme .profile-review-item {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-review-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #0071e3, #5a9bff) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.profile-review-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.profile-review-body {
    flex: 1 !important;
    min-width: 0 !important;
}

.profile-review-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
}

.profile-review-author {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.profile-review-stars {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
    color: #ffcc00 !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
}

.profile-review-text {
    font-size: 12.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
}

.profile-review-date {
    font-size: 10.5px !important;
    color: var(--text-muted) !important;
    opacity: 0.7 !important;
    margin-top: 5px !important;
}

/* -------- Блок «Оставить отзыв» -------- */
.profile-view-add-review {
    margin-top: 6px !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.dark-theme .profile-view-add-review {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.profile-view-vote-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.profile-view-vote-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.06) !important;
    color: var(--text-muted) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .profile-view-vote-btn {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.profile-view-vote-btn.like.active {
    background: rgba(52, 199, 89, 0.15) !important;
    border-color: #34c759 !important;
    color: #34c759 !important;
    box-shadow: 0 4px 14px rgba(52, 199, 89, 0.25) !important;
}

.profile-view-vote-btn.dislike.active {
    background: rgba(255, 59, 48, 0.15) !important;
    border-color: #ff3b30 !important;
    color: #ff3b30 !important;
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.25) !important;
}

.profile-view-review-textarea {
    width: 100% !important;
    height: 90px !important;
    min-height: 90px !important;
    padding: 12px 14px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 12px !important;
    resize: none !important;
    font-size: 14px !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

body.dark-theme .profile-view-review-textarea {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-main) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.profile-view-review-textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
}

/* -------- Блок «Это ваш профиль» -------- */
.profile-view-self {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin-top: 6px !important;
}

body.dark-theme .profile-view-self {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

.profile-view-self-text {
    font-size: 12.5px !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

/* ==================================================== */
/* ПАНЕЛЬ ОБЪЯВЛЕНИЙ — APPLE GLASS (МОБИЛЬНАЯ)         */
/* ==================================================== */
.profile-view-ads-panel {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border-left: none !important;
}

body.dark-theme .profile-view-ads-panel {
    background: rgba(20, 20, 22, 0.75) !important;
}

.profile-view-ads-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 4px 0 12px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    flex-shrink: 0 !important;
}

body.dark-theme .profile-view-ads-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.profile-view-ads-panel-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
}

.profile-view-ads-panel-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(120, 120, 128, 0.14) !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.profile-view-ads-panel-close svg {
    width: 13px !important;
    height: 13px !important;
    stroke: currentColor !important;
    display: block !important;
}

body.dark-theme .profile-view-ads-panel-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

.profile-view-ads-panel-close:active {
    background: #ff3b30 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(0.9) !important;
}

/* Фильтры объявлений */
.profile-view-ads-panel-filters {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
    flex-shrink: 0 !important;
}

.profile-view-ads-filter {
    padding: 7px 14px !important;
    border-radius: 100px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    color: var(--text-main) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    white-space: nowrap !important;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .profile-view-ads-filter {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.profile-view-ads-filter.active {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

/* Карточки объявлений */
.profile-view-ads-panel-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-content: start !important;
}

.profile-ads-card {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 14px !important;
    padding: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    transition:
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .profile-ads-card {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.profile-ads-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

body.dark-theme .profile-ads-card::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0) 100%);
}

.profile-ads-card:active {
    transform: scale(0.98);
    border-color: rgba(0, 113, 227, 0.35) !important;
}

.profile-ads-card>* {
    position: relative;
    z-index: 1;
}

.profile-ads-card-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.profile-ads-card-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 9px !important;
    border-radius: 100px !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.profile-ads-card-badge.market {
    background: rgba(0, 113, 227, 0.12) !important;
    color: #0071e3 !important;
}

.profile-ads-card-badge.jobs {
    background: rgba(255, 149, 0, 0.15) !important;
    color: #ff9500 !important;
}

.profile-ads-card-badge.properties {
    background: rgba(52, 199, 89, 0.15) !important;
    color: #34c759 !important;
}

body.dark-theme .profile-ads-card-badge.market {
    background: rgba(0, 113, 227, 0.25) !important;
    color: #4a9eff !important;
}

body.dark-theme .profile-ads-card-badge.jobs {
    background: rgba(255, 149, 0, 0.25) !important;
    color: #ffb340 !important;
}

body.dark-theme .profile-ads-card-badge.properties {
    background: rgba(52, 199, 89, 0.25) !important;
    color: #4cd964 !important;
}

.profile-ads-card-price {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.02em !important;
}

.profile-ads-card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.profile-ads-card-desc {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.35 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.profile-ads-card-loc {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 2px !important;
}

.profile-ads-card-loc svg {
    width: 11px !important;
    height: 11px !important;
    opacity: 0.7 !important;
}

/* Пустое состояние */
.profile-view-ads-empty {
    padding: 40px 20px !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    border-radius: 16px !important;
    border: 2px dashed rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

body.dark-theme .profile-view-ads-empty {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(44, 44, 46, 0.35) !important;
}

/* ==================================================== */
/* СКЕЛЕТОНЫ НЕДВИЖИМОСТИ — APPLE SHIMMER (МОБИЛЬНАЯ)  */
/* ==================================================== */

.property-card-skeleton-card {
    background: var(--card-bg);
    border: 1.5px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    pointer-events: none;
    user-select: none;
}

body.dark-theme .property-card-skeleton-card {
    background: #2c2c2e;
}

.property-card-skeleton-image {
    position: relative;
    width: 100%;
    height: 160px;
    background: rgba(120, 120, 128, 0.12);
    overflow: hidden;
}

body.dark-theme .property-card-skeleton-image {
    background: rgba(255, 255, 255, 0.05);
}

.property-card-skeleton-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.55) 50%,
            transparent 100%);
    transform: translateX(-100%);
    animation: propertyShimmerRun 1.4s infinite;
}

body.dark-theme .property-card-skeleton-shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
}

@keyframes propertyShimmerRun {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.property-card-skeleton-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.property-card-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: rgba(120, 120, 128, 0.15);
    position: relative;
    overflow: hidden;
}

body.dark-theme .property-card-skeleton-line {
    background: rgba(255, 255, 255, 0.08);
}

.property-card-skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%);
    transform: translateX(-100%);
    animation: propertyShimmerRun 1.4s infinite;
}

body.dark-theme .property-card-skeleton-line::after {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
}

.property-card-skeleton-line.short {
    width: 40%;
    height: 16px;
    margin-bottom: 2px;
}

.property-card-skeleton-line.medium {
    width: 75%;
}

.property-card-skeleton-line.long {
    width: 100%;
}

/* Задержки */
.property-card-skeleton-card:nth-child(1) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(1) .property-card-skeleton-line::after {
    animation-delay: 0s;
}

.property-card-skeleton-card:nth-child(2) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(2) .property-card-skeleton-line::after {
    animation-delay: 0.08s;
}

.property-card-skeleton-card:nth-child(3) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(3) .property-card-skeleton-line::after {
    animation-delay: 0.16s;
}

.property-card-skeleton-card:nth-child(4) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(4) .property-card-skeleton-line::after {
    animation-delay: 0.24s;
}

.property-card-skeleton-card:nth-child(5) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(5) .property-card-skeleton-line::after {
    animation-delay: 0.32s;
}

.property-card-skeleton-card:nth-child(6) .property-card-skeleton-shimmer,
.property-card-skeleton-card:nth-child(6) .property-card-skeleton-line::after {
    animation-delay: 0.40s;
}

/* На мобилке сетка в одну колонку */
#properties-page-grid:has(.property-card-skeleton-card) {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

/* ==================================================== */
/* ОПТИМИЗАЦИЯ: отключаем shimmer, если включён режим  */
/* экономии энергии или reduced-motion                  */
/* ==================================================== */
@media (prefers-reduced-motion: reduce) {

    .property-card-skeleton-shimmer,
    .property-card-skeleton-line::after,
    .properties-page-grid .property-card-skeleton::after {
        animation: none !important;
        background: rgba(120, 120, 128, 0.15) !important;
    }
}


/* ==================================================== */
/* БАРАХОЛКА (МОБИЛЬНАЯ) — APPLE GLASS КАРТОЧКИ        */
/* ==================================================== */

#market-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

.market-card {
    position: relative;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease;
}

body.dark-theme .market-card {
    background: rgba(28, 28, 30, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.market-card:active {
    transform: scale(0.98);
    border-color: rgba(0, 113, 227, 0.35);
}

.market-card-photo-wrap {
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: var(--bg-color);
}

.market-card-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-card-skeleton {
    position: absolute;
    inset: 0;
    background: rgba(120, 120, 128, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    z-index: 1;
}

.market-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.55) 50%,
            transparent 100%);
    transform: translateX(-100%);
    animation: propertyShimmerRun 1.4s infinite;
}

body.dark-theme .market-card-skeleton {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-theme .market-card-skeleton::after {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
}

.market-card-skeleton-icon {
    opacity: 0.4;
    position: relative;
    z-index: 2;
}

.market-card-photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    z-index: 3;
}

.market-card-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.market-card-delete:active {
    transform: rotate(90deg) scale(0.92);
    background: #ff3b30;
}

.market-card .fav-btn-market {
    left: auto !important;
    right: 12px !important;
    top: 12px !important;
    z-index: 4 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 34px !important;
    height: 34px !important;
}

.market-card:has(.market-card-delete) .fav-btn-market {
    right: 54px !important;
}

body.dark-theme .market-card .fav-btn-market {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
}

.market-card .market-img {
    height: 220px;
    font-size: 64px;
    margin-bottom: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
}

body.dark-theme .market-card .market-img {
    background: #2c2c2e;
}

.market-card .market-info {
    padding: 14px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.market-card .market-price {
    font-size: 18px;
    font-weight: 800;
    color: #34c759;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.market-card .market-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.market-card .market-loc {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.market-author {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s ease;
    font-weight: 500;
}

.market-author:active {
    color: var(--primary);
}

.market-author svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Галерея просмотра объявления на мобилке — высокие фото */
#modal-view-market .property-view-gallery {
    height: 260px;
}

#modal-view-market .property-view-deal {
    background: var(--primary);
}

/* Модалка публикации — компактнее для мобилки */
#modal-add-market .property-modal {
    max-width: 100% !important;
    padding: 20px 16px 16px !important;
}

#modal-add-market .property-photo-uploader {
    height: 72px;
}

/* ==================================================== */
/* БИРЖА ПОДРЯДОВ — мобильная версия (Apple Glass)       */
/* ==================================================== */

body.mobile-device #jobs.section-content.active {
    gap: 10px !important;
}

/* --- Верхняя панель: поиск + кнопка --- */
body.mobile-device #jobs>.card:first-child {
    padding: 14px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

body.dark-theme.mobile-device #jobs>.card:first-child {
    background: rgba(28, 28, 30, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #jobs>.card:first-child .form-control,
body.mobile-device #jobs>.card:first-child #jobs-search-input {
    height: 42px !important;
    border-radius: 100px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0 16px !important;
    font-size: 14.5px !important;
    color: var(--text-main) !important;
    margin: 0 !important;
}

body.dark-theme.mobile-device #jobs>.card:first-child .form-control,
body.dark-theme.mobile-device #jobs>.card:first-child #jobs-search-input {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #jobs>.card:first-child .form-control:focus,
body.mobile-device #jobs>.card:first-child #jobs-search-input:focus {
    border-color: rgba(0, 113, 227, 0.4) !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15) !important;
}

body.mobile-device #jobs>.card:first-child .form-control::placeholder,
body.mobile-device #jobs>.card:first-child #jobs-search-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.75 !important;
}

/* Кнопка «Создать заказ» */
body.mobile-device #jobs>.card:first-child .btn-primary-large {
    width: 100% !important;
    height: 44px !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #198754 0%, #20a866 100%) !important;
    box-shadow: 0 6px 18px rgba(25, 135, 84, 0.35) !important;
    color: #fff !important;
    border: none !important;
}

body.mobile-device #jobs>.card:first-child .btn-primary-large:active {
    transform: scale(0.97) !important;
    box-shadow: 0 3px 10px rgba(25, 135, 84, 0.3) !important;
}

/* ==================================================== */
/* КАРТОЧКА ЗАКАЗА — СТЕКЛО (размер как есть)            */
/* ==================================================== */
body.mobile-device #jobs-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.mobile-device #jobs-grid .job-card,
body.mobile-device #jobs-grid .feed-card {
    position: relative !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;

    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform 0.25s var(--ease-spring) !important;
}

body.dark-theme.mobile-device #jobs-grid .job-card,
body.dark-theme.mobile-device #jobs-grid .feed-card {
    background: rgba(44, 44, 46, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #jobs-grid .job-card:active,
body.mobile-device #jobs-grid .feed-card:active {
    transform: scale(0.985) !important;
}

/* Стеклянный блик сверху */
body.mobile-device #jobs-grid .job-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 55% !important;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
    border-radius: 18px 18px 0 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

body.dark-theme.mobile-device #jobs-grid .job-card::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
}

body.mobile-device #jobs-grid .job-card>* {
    position: relative !important;
    z-index: 1 !important;
}

/* --- Шапка автора --- */
body.mobile-device #jobs-grid .job-card-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

body.mobile-device #jobs-grid .job-card-author {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

body.mobile-device #jobs-grid .job-card-avatar {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #0071e3, #5a9bff) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25) !important;
    box-sizing: border-box !important;
}

body.mobile-device #jobs-grid .job-card-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
}

body.mobile-device #jobs-grid .job-card-author-info {
    min-width: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

body.mobile-device #jobs-grid .job-card-author-info .author-name {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.01em !important;
}

body.mobile-device #jobs-grid .job-card-author-info .feed-meta {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* --- Кнопки в шапке — маленькие ровные кружки --- */
body.mobile-device #jobs-grid .job-card-head-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

body.mobile-device #jobs-grid .job-delete-btn,
body.mobile-device #jobs-grid .fav-btn-inline {
    position: relative !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 50% !important;
    background: rgba(120, 120, 128, 0.14) !important;
    border: none !important;
    color: #86868b !important;
    font-size: 13px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease, color 0.2s ease !important;
}

body.mobile-device #jobs-grid .job-delete-btn svg,
body.mobile-device #jobs-grid .fav-btn-inline svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

body.dark-theme.mobile-device #jobs-grid .job-delete-btn,
body.dark-theme.mobile-device #jobs-grid .fav-btn-inline {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

body.mobile-device #jobs-grid .job-delete-btn:active {
    background: #ff3b30 !important;
    color: #fff !important;
    transform: rotate(90deg) scale(0.9) !important;
}

body.mobile-device #jobs-grid .fav-btn-inline:active {
    transform: scale(0.9) !important;
}

body.mobile-device #jobs-grid .fav-btn-inline.active {
    background: rgba(255, 59, 48, 0.95) !important;
    color: #fff !important;
}

/* --- Мета-бейджи --- */
body.mobile-device #jobs-grid .job-card-badges {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

body.mobile-device #jobs-grid .job-type-badge {
    background: rgba(0, 113, 227, 0.12) !important;
    color: #0071e3 !important;
    border-radius: 100px !important;
    padding: 4px 10px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    align-items: center !important;
}

body.dark-theme.mobile-device #jobs-grid .job-type-badge {
    background: rgba(0, 113, 227, 0.25) !important;
    color: #4a9eff !important;
}

body.mobile-device #jobs-grid .job-status-badge {
    border-radius: 100px !important;
    padding: 4px 10px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    align-items: center !important;
}

body.mobile-device #jobs-grid .job-status-badge.active {
    background: rgba(52, 199, 89, 0.14) !important;
    color: #34c759 !important;
}

body.mobile-device #jobs-grid .job-status-badge.done {
    background: rgba(120, 120, 128, 0.15) !important;
    color: var(--text-muted) !important;
}

body.mobile-device #jobs-grid .job-meta-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.1) !important;
    border: none !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    line-height: 1.3 !important;
}

body.dark-theme.mobile-device #jobs-grid .job-meta-badge {
    background: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #jobs-grid .job-meta-badge svg {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.8 !important;
}

/* --- Заголовок и описание --- */
body.mobile-device #jobs-grid .job-card-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    margin: 2px 0 0 0 !important;
    word-wrap: break-word !important;
}

body.mobile-device #jobs-grid .job-card-desc {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}

/* --- Футер: цена + кнопки --- */
body.mobile-device #jobs-grid .job-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding-top: 12px !important;
    margin-top: 4px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.dark-theme.mobile-device #jobs-grid .job-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #jobs-grid .job-card-price {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    padding: 5px 12px !important;
    border-radius: 100px !important;
    background: rgba(52, 199, 89, 0.12) !important;
}

body.dark-theme.mobile-device #jobs-grid .job-card-price {
    background: rgba(52, 199, 89, 0.18) !important;
}

body.mobile-device #jobs-grid .job-card-actions {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
}

/* --- Кнопки действий --- */
body.mobile-device #jobs-grid .job-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 10px !important;
    border-radius: 100px !important;
    border: 1px solid rgba(0, 113, 227, 0.35) !important;
    background: rgba(255, 255, 255, 0.5) !important;
    color: #0071e3 !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease !important;
}

body.dark-theme.mobile-device #jobs-grid .job-action-btn {
    background: rgba(44, 44, 46, 0.5) !important;
    border-color: rgba(0, 113, 227, 0.4) !important;
    color: #4a9eff !important;
}

body.mobile-device #jobs-grid .job-action-btn svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
}

body.mobile-device #jobs-grid .job-action-btn:active {
    transform: scale(0.96) !important;
    background: rgba(0, 113, 227, 0.1) !important;
}

body.mobile-device #jobs-grid .job-action-btn.primary {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important;
}

body.mobile-device #jobs-grid .job-action-btn.primary:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25) !important;
}

body.dark-theme.mobile-device #jobs-grid .job-action-btn.primary {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* ==================================================== */
/* БАРАХОЛКА — мобильная версия (Apple Glass, FINAL)    */
/* ==================================================== */

body.mobile-device #market.section-content.active {
    gap: 10px !important;
}

/* --- Верхняя панель --- */
body.mobile-device #market>.card:first-child {
    padding: 14px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

body.dark-theme.mobile-device #market>.card:first-child {
    background: rgba(28, 28, 30, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* Фильтры-таблетки */
body.mobile-device #market .filters {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-bottom: 0 !important;
}

body.mobile-device #market .filter-btn {
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 100px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-muted) !important;
    font-family: inherit !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

body.dark-theme.mobile-device #market .filter-btn {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #market .filter-btn.active {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35) !important;
}

/* Локация */
body.mobile-device #market #market-loc-filter {
    height: 42px !important;
    width: 100% !important;
    border-radius: 100px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0 14px !important;
    font-size: 14.5px !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    -webkit-appearance: none;
    appearance: none;
}

body.dark-theme.mobile-device #market #market-loc-filter {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Кнопка «Объявление» */
body.mobile-device #market .btn-primary-large {
    width: 100% !important;
    height: 44px !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #198754 0%, #20a866 100%) !important;
    box-shadow: 0 6px 18px rgba(25, 135, 84, 0.35) !important;
    color: #fff !important;
    border: none !important;
}

/* ==================================================== */
/* СЕТКА — 2 КОЛОНКИ                                    */
/* ==================================================== */
body.mobile-device #market-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==================================================== */
/* КАРТОЧКА — КВАДРАТ, APPLE GLASS                      */
/* ==================================================== */
body.mobile-device #market-grid .market-card {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    margin: 0 !important;

    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform 0.25s var(--ease-spring) !important;
}

body.dark-theme.mobile-device #market-grid .market-card {
    background: rgba(44, 44, 46, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #market-grid .market-card:active {
    transform: scale(0.97) !important;
}

/* Стеклянный блик сверху */
body.mobile-device #market-grid .market-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 55% !important;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
    border-radius: 18px 18px 0 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

body.dark-theme.mobile-device #market-grid .market-card::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
}

/* --- Фото: верхние 60% --- */
body.mobile-device #market-grid .market-card-photo-wrap {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60% !important;
    width: 100% !important;
    overflow: hidden !important;
    background: rgba(120, 120, 128, 0.08) !important;
    border-radius: 18px 18px 0 0 !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.dark-theme.mobile-device #market-grid .market-card-photo-wrap {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.mobile-device #market-grid .market-card-photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 0;
    transition: opacity 0.35s ease !important;
    z-index: 2 !important;
    border-radius: 18px 18px 0 0 !important;
}

/* Скелетон */
body.mobile-device #market-grid .market-card-skeleton {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(120, 120, 128, 0.1) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1 !important;
}

body.mobile-device #market-grid .market-card-skeleton::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%) !important;
    transform: translateX(-100%) !important;
    animation: propertyShimmerRun 1.4s infinite !important;
}

body.dark-theme.mobile-device #market-grid .market-card-skeleton {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme.mobile-device #market-grid .market-card-skeleton::after {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%) !important;
}

body.mobile-device #market-grid .market-card-skeleton-icon {
    opacity: 0.45 !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Эмодзи-заглушка */
body.mobile-device #market-grid .market-card-emoji-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.08) 0%,
            rgba(90, 155, 255, 0.12) 100%) !important;
}

body.dark-theme.mobile-device #market-grid .market-card-emoji-wrap {
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.18) 0%,
            rgba(90, 155, 255, 0.08) 100%) !important;
}

body.mobile-device #market-grid .market-card-emoji {
    font-size: 44px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--primary) !important;
}

body.mobile-device #market-grid .market-card-emoji svg {
    width: 44px !important;
    height: 44px !important;
}

/* Счётчик фото */
body.mobile-device #market-grid .market-card-photo-count {
    position: absolute !important;
    bottom: 6px !important;
    right: 6px !important;
    padding: 3px 8px !important;
    border-radius: 100px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    z-index: 3 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* --- Инфо: нижние 40% --- */
body.mobile-device #market-grid .market-info {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: 60% !important;
    padding: 10px 12px 12px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    z-index: 2 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

body.mobile-device #market-grid .market-price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.mobile-device #market-grid .market-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
    margin: 0 !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

body.mobile-device #market-grid .market-card-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-top: auto !important;
    padding-top: 4px !important;
    font-size: 10px !important;
    color: var(--text-muted) !important;
    min-width: 0 !important;
}

body.mobile-device #market-grid .market-card-meta .market-loc,
body.mobile-device #market-grid .market-card-meta .market-author {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 50% !important;
}

body.mobile-device #market-grid .market-card-meta svg {
    width: 11px !important;
    height: 11px !important;
    opacity: 0.75 !important;
    flex-shrink: 0 !important;
}

/* ==================================================== */
/* КНОПКИ В ШАПКЕ — МАЛЕНЬКИЕ РОВНЫЕ КРУЖКИ             */
/* ==================================================== */
body.mobile-device #market-grid .market-card-delete {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 59, 48, 0.92) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 7 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.35) !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s var(--ease-spring) !important;
}

body.mobile-device #market-grid .market-card-delete svg {
    width: 13px !important;
    height: 13px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

body.mobile-device #market-grid .market-card-delete:active {
    transform: rotate(90deg) scale(0.9) !important;
}

body.mobile-device #market-grid .fav-btn-market {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;
    color: #86868b !important;
    font-size: 13px !important;
    line-height: 1 !important;
    z-index: 6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease !important;
}

body.mobile-device #market-grid .fav-btn-market svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

body.mobile-device #market-grid .market-card:has(.market-card-delete) .fav-btn-market {
    right: 42px !important;
}

body.dark-theme.mobile-device #market-grid .fav-btn-market {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #f5f5f7 !important;
}

body.mobile-device #market-grid .fav-btn-market:active {
    transform: scale(0.9) !important;
}

body.mobile-device #market-grid .fav-btn-market.active {
    background: rgba(255, 59, 48, 0.95) !important;
    color: #fff !important;
}

/* ==================================================== */
/* НЕДВИЖИМОСТЬ — мобильная версия (Apple Glass, FINAL)  */
/* ==================================================== */

body.mobile-device #properties.section-content.active {
    gap: 10px !important;
}

/* --- Шапка --- */
body.mobile-device #properties .properties-page-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
}

body.mobile-device #properties .properties-page-title {
    font-size: 22px !important;
    letter-spacing: -0.03em !important;
}

body.mobile-device #properties .properties-page-count {
    font-size: 12px !important;
}

/* --- Панель поиска + фильтры --- */
body.mobile-device #properties .properties-page-filters.flex-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 20px !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 14px !important;
}

body.dark-theme.mobile-device #properties .properties-page-filters.flex-row {
    background: rgba(28, 28, 30, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #properties .properties-page-filters .properties-page-search {
    width: 100% !important;
    flex: 0 0 auto !important;
}

body.mobile-device #properties .properties-page-filters .properties-page-search-input {
    height: 42px !important;
    border-radius: 100px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0 14px 0 42px !important;
    font-size: 14.5px !important;
    color: var(--text-main) !important;
}

body.dark-theme.mobile-device #properties .properties-page-filters .properties-page-search-input {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #properties .properties-page-filters .properties-page-filter-group {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

body.mobile-device #properties .properties-page-filters .properties-page-filter-btn {
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 100px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-muted) !important;
    font-family: inherit !important;
    width: auto !important;
}

body.dark-theme.mobile-device #properties .properties-page-filters .properties-page-filter-btn {
    background: rgba(44, 44, 46, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #properties .properties-page-filters .properties-page-filter-btn.active {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35) !important;
}

body.mobile-device #properties .properties-page-filters>.btn-primary {
    width: 100% !important;
    height: 44px !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35) !important;
    color: #fff !important;
    border: none !important;
}

/* Пустое состояние в мобильной недвижимости — на всю ширину */
body.mobile-device #properties-page-grid .properties-page-empty {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 40px 20px !important;
    text-align: center !important;
}

/* ==================================================== */
/* СЕТКА — 2 КОЛОНКИ                                   */
/* ==================================================== */
body.mobile-device #properties-page-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
}

/* ==================================================== */
/* КАРТОЧКА — КВАДРАТ, APPLE GLASS                     */
/* ==================================================== */
body.mobile-device #properties-page-grid .property-card {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 0 !important;
    padding-bottom: 100% !important;
    margin: 0 !important;

    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 18px !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform 0.25s var(--ease-spring) !important;
}

body.dark-theme.mobile-device #properties-page-grid .property-card {
    background: rgba(44, 44, 46, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #properties-page-grid .property-card:active {
    transform: scale(0.97) !important;
}

/* Стеклянный блик */
body.mobile-device #properties-page-grid .property-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 55% !important;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
    border-radius: 18px 18px 0 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

body.dark-theme.mobile-device #properties-page-grid .property-card::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%) !important;
}

/* --- Фото: занимает верхние 60% карточки, абсолют --- */
body.mobile-device #properties-page-grid .property-card-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60% !important;
    width: 100% !important;
    overflow: hidden !important;
    background: rgba(120, 120, 128, 0.08) !important;
    border-radius: 18px 18px 0 0 !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.dark-theme.mobile-device #properties-page-grid .property-card-image {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.mobile-device #properties-page-grid .property-card-image img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body.mobile-device #properties-page-grid .property-card-image svg {
    color: var(--text-muted) !important;
    opacity: 0.45 !important;
    width: 38px !important;
    height: 38px !important;
}

/* --- Инфо: нижние 40%, абсолют --- */
body.mobile-device #properties-page-grid .property-card-info {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: 60% !important;
    padding: 10px 12px 12px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    z-index: 2 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

body.mobile-device #properties-page-grid .property-card-price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}

body.mobile-device #properties-page-grid .property-card-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-wrap: break-word !important;
    margin: 0 !important;
}

/* ==================================================== */
/* БЕЙДЖ АРЕНДА / ПРОДАЖА                               */
/* ==================================================== */
body.mobile-device #properties-page-grid .property-card-deal-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    display: inline-block !important;
    width: auto !important;
    max-width: calc(100% - 60px) !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #fff !important;
    z-index: 4 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.mobile-device #properties-page-grid .property-card-deal-badge.sale {
    background: #ff3b30 !important;
}

body.mobile-device #properties-page-grid .property-card-deal-badge.rent {
    background: #0071e3 !important;
}

/* ==================================================== */
/* КНОПКА ИЗБРАННОГО — маленький ровный кружок          */
/* ==================================================== */
body.mobile-device #properties-page-grid .fav-btn,
body.mobile-device #properties-page-grid .fav-btn-property {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: none !important;
    color: #86868b !important;
    font-size: 13px !important;
    line-height: 1 !important;
    z-index: 6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease !important;
}

body.mobile-device #properties-page-grid .fav-btn svg,
body.mobile-device #properties-page-grid .fav-btn-property svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

body.dark-theme.mobile-device #properties-page-grid .fav-btn,
body.dark-theme.mobile-device #properties-page-grid .fav-btn-property {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #f5f5f7 !important;
}

body.mobile-device #properties-page-grid .fav-btn:active,
body.mobile-device #properties-page-grid .fav-btn-property:active {
    transform: scale(0.9) !important;
}

body.mobile-device #properties-page-grid .fav-btn.active,
body.mobile-device #properties-page-grid .fav-btn-property.active {
    background: rgba(255, 59, 48, 0.95) !important;
    color: #fff !important;
}

/* ==================================================== */
/* СКЕЛЕТОН                                             */
/* ==================================================== */
body.mobile-device #properties-page-grid .property-card-skeleton {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(120, 120, 128, 0.1) !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

body.mobile-device #properties-page-grid .property-card-skeleton::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%) !important;
    transform: translateX(-100%) !important;
    animation: propertyShimmerRun 1.4s infinite !important;
}

body.dark-theme.mobile-device #properties-page-grid .property-card-skeleton {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme.mobile-device #properties-page-grid .property-card-skeleton::after {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%) !important;
}

/* ==================================================== */
/* ПРОСМОТР ОБЪЯВЛЕНИЯ (market view) — APPLE GLASS       */
/* ==================================================== */

/* Сама модалка */
body.mobile-device #modal-view-market .property-view-modal {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    padding: 16px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-modal {
    background: rgba(28, 28, 30, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* --- Галерея --- */
body.mobile-device #modal-view-market .property-view-gallery {
    position: relative !important;
    width: 100% !important;
    height: 240px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: rgba(120, 120, 128, 0.1) !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-gallery {
    background: rgba(255, 255, 255, 0.05) !important;
}

body.mobile-device #modal-view-market .property-view-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 18px !important;
}

body.mobile-device #modal-view-market .property-view-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 3 !important;
}

body.mobile-device #modal-view-market .property-view-nav.prev {
    left: 10px !important;
}

body.mobile-device #modal-view-market .property-view-nav.next {
    right: 10px !important;
}

body.mobile-device #modal-view-market .property-view-indicator {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    padding: 4px 10px !important;
    border-radius: 100px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    z-index: 3 !important;
}

/* --- Миниатюры --- */
body.mobile-device #modal-view-market .property-view-thumbs {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 2px 0 8px 0 !important;
    margin-bottom: 8px !important;
    scrollbar-width: none !important;
}

body.mobile-device #modal-view-market .property-view-thumbs::-webkit-scrollbar {
    display: none !important;
}

body.mobile-device #modal-view-market .property-view-thumb {
    flex: 0 0 auto !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, transform 0.2s var(--ease-spring) !important;
}

body.mobile-device #modal-view-market .property-view-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body.mobile-device #modal-view-market .property-view-thumb.active {
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2) !important;
    transform: scale(1.05) !important;
}

/* --- Заголовок: цена + бейдж категории --- */
body.mobile-device #modal-view-market .property-view-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.mobile-device #modal-view-market .property-view-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

body.mobile-device #modal-view-market .property-view-price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.mobile-device #modal-view-market .property-view-deal {
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    border-radius: 100px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* --- Заголовок и описание --- */
body.mobile-device #modal-view-market .property-view-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
}

body.mobile-device #modal-view-market .property-view-desc {
    font-size: 13.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

/* --- Спецификации (пилюли) --- */
body.mobile-device #modal-view-market .property-view-specs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-market .property-view-spec {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 12px !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--text-main) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-spec {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* --- Блок владельца --- */
body.mobile-device #modal-view-market .property-view-owner {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-owner {
    background: rgba(44, 44, 46, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

body.mobile-device #modal-view-market .property-view-owner:active {
    transform: scale(0.98) !important;
}

body.mobile-device #modal-view-market .property-view-owner .large-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #0071e3, #5a9bff) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

body.mobile-device #modal-view-market .property-view-owner .large-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

body.mobile-device #modal-view-market .property-view-owner-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

body.mobile-device #modal-view-market .property-view-owner-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-market .property-view-owner-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-market .property-view-owner-phone {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0071e3 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-market .property-view-owner-loc {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-market .property-view-owner-arrow {
    color: var(--text-muted) !important;
    opacity: 0.5 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* --- Кнопка «Написать» --- */
body.mobile-device #modal-view-market .property-view-contact-btn {
    width: 100% !important;
    height: 48px !important;
    border-radius: 100px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35) !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: transform 0.2s var(--ease-spring) !important;
}

body.mobile-device #modal-view-market .property-view-contact-btn:active {
    transform: scale(0.97) !important;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.3) !important;
}

/* --- Кнопки «Закрыть» / «Удалить» (если моё объявление) --- */
body.mobile-device #modal-view-market .property-view-own-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
}

body.mobile-device #modal-view-market .property-view-btn-close,
body.mobile-device #modal-view-market .property-view-btn-delete {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 46px !important;
    border-radius: 100px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    transition: transform 0.2s var(--ease-spring) !important;
}

body.mobile-device #modal-view-market .property-view-btn-close {
    background: rgba(120, 120, 128, 0.14) !important;
    color: var(--text-main) !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-btn-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f5f5f7 !important;
}

body.mobile-device #modal-view-market .property-view-btn-delete {
    background: linear-gradient(135deg, #ff3b30 0%, #ff5c52 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35) !important;
}

body.mobile-device #modal-view-market .property-view-btn-close:active,
body.mobile-device #modal-view-market .property-view-btn-delete:active {
    transform: scale(0.96) !important;
}

/* --- Кнопка «Назад» (крестик-пилюля сверху) --- */
body.mobile-device #modal-view-market .property-view-close {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    width: auto !important;
    height: 34px !important;
    padding: 0 14px 0 10px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    color: #0071e3 !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 10 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    cursor: pointer !important;
    border: none !important;
}

body.dark-theme.mobile-device #modal-view-market .property-view-close {
    background: rgba(28, 28, 30, 0.85) !important;
    color: #4a9eff !important;
}

body.mobile-device #modal-view-market .property-view-close span,
body.mobile-device #modal-view-market .property-view-close svg {
    display: none !important;
}

body.mobile-device #modal-view-market .property-view-close::before {
    content: '' !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-left: 2.5px solid currentColor !important;
    border-bottom: 2.5px solid currentColor !important;
    transform: rotate(45deg) !important;
    margin-bottom: 1px !important;
}

body.mobile-device #modal-view-market .property-view-close::after {
    content: 'Назад' !important;
    letter-spacing: -0.01em !important;
}

body.mobile-device #modal-view-market .property-view-close:active {
    opacity: 0.6 !important;
    transform: scale(0.96) !important;
}

/* Барахолка */
body.mobile-device #market-grid .properties-page-empty,
body.mobile-device #market-grid .property-empty {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 50px 20px !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    border: 2px dashed rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

body.dark-theme.mobile-device #market-grid .properties-page-empty,
body.dark-theme.mobile-device #market-grid .property-empty {
    background: rgba(28, 28, 30, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Отключаем тяжёлый blur на мобилке */
body.mobile-device #market-grid .properties-page-empty {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--card-bg) !important;
}

/* ==================================================== */
/* ШАПКА ПАНЕЛИ РОЛЕЙ + КНОПКА ЗАКРЫТИЯ                 */
/* ==================================================== */

.roles-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 8px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--hairline);
    flex-shrink: 0;
}

.roles-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.roles-panel-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.dark-theme .roles-panel-close {
    background: #2c2c2e;
    color: #98989d;
}

.roles-panel-close:active {
    background: #ff3b30;
    color: #ffffff;
    transform: rotate(90deg) scale(0.9);
}

.roles-panel-close svg {
    pointer-events: none;
    display: block;
}

/* ==================================================== */
/* ФИНАЛЬНАЯ ПРАВКА — отключаем отблеск ::before на мобилке */
/* во всех темах (светлой и тёмной), переносим в самый низ  */
/* файла, чтобы перебить все предыдущие правила.            */
/* ==================================================== */
body.mobile-device .profile-view-modal::before,
body.mobile-device.dark-theme .profile-view-modal::before,
body.dark-theme.mobile-device .profile-view-modal::before {
    display: none !important;
}

/* ==================================================== */
/* ПОИСК ПОЛЬЗОВАТЕЛЕЙ В КОМАНДЕ ОРГАНАЙЗЕРА           */
/* ==================================================== */
.member-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    display: none;
    margin-top: 4px;
}

.member-search-results.open {
    display: block;
}

.member-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.member-search-item:hover {
    background: var(--bg-color);
}

.member-search-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #5a9bff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.member-search-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-search-info {
    flex: 1;
    min-width: 0;
}

.member-search-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-search-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-search-empty {
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================================================== */
/* ПОИСК В «СООБЩЕНИЯХ» (МОБИЛЬНАЯ) — APPLE STYLE       */
/* ==================================================== */

.mobile-chat-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
    background: var(--bg-color);
    min-height: 52px;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.mobile-chat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform-origin: left center;
    transition:
        opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-chat-search-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.25s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

.mobile-chat-search-btn:active {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(0.92);
}

.mobile-chat-search-wrap {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    box-sizing: border-box;

    opacity: 0;
    pointer-events: none;
    transform: translateX(20px) scale(0.96);
    transform-origin: right center;
    transition:
        opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-chat-header.search-open .mobile-chat-title {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
    pointer-events: none;
}

.mobile-chat-header.search-open .mobile-chat-search-btn {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.6);
}

.mobile-chat-header.search-open .mobile-chat-search-wrap {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.mobile-chat-search-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    border: 1.5px solid transparent;
    border-radius: 100px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-chat-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.mobile-chat-search-input:focus,
.mobile-chat-search-input:focus-visible {
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow: none !important;
    outline: 0 !important;
}

body.dark-theme .mobile-chat-search-input {
    background: #2c2c2e;
    color: #f5f5f7;
}

body.dark-theme .mobile-chat-search-input:focus {
    background: #1c1c1e;
}

.mobile-chat-search-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.3s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

.mobile-chat-search-close:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(1.05);
}

body.dark-theme .mobile-chat-search-close {
    background: #2c2c2e;
}

.mobile-chat-search-results {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
}

.mobile-chat-search-results.open {
    display: flex;
}

.mobile-chat-search-section-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 10px 4px 4px;
}

.mobile-chat-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-chat-search-item:active {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: scale(0.98);
}

body.dark-theme .mobile-chat-search-item:active {
    background: rgba(0, 113, 227, 0.2);
}

.mobile-chat-search-item .avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.mobile-chat-search-item-info {
    flex: 1;
    min-width: 0;
}

.mobile-chat-search-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-chat-search-item-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-chat-search-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================================================== */
/* SAFARI: не показываем автозаполнение, пока модалка   */
/* с полями пароля закрыта                               */
/* ==================================================== */
.modal-overlay:not(.active) input[type="password"] {
    display: none !important;
}

/* ==================================================== */
/* СМЕТА НА МОБИЛКЕ — Apple Glass                        */
/* ==================================================== */

.estimate-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.estimate-mobile-empty {
    padding: 50px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.4);
}

body.dark-theme .estimate-mobile-empty {
    background: rgba(28, 28, 30, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}

.estimate-mobile-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 40px 14px 16px;

    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);

    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.25s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

body.dark-theme .estimate-mobile-item {
    background: rgba(28, 28, 30, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.estimate-mobile-item:active {
    transform: scale(0.985);
}

.estimate-mobile-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.estimate-mobile-details {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.estimate-mobile-price {
    font-size: 14px;
    font-weight: 700;
    color: #34c759;
    margin-top: 2px;
    letter-spacing: -0.02em;
}

.estimate-mobile-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(120, 120, 128, 0.14);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .estimate-mobile-delete {
    background: rgba(255, 255, 255, 0.08);
}

.estimate-mobile-delete:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(0.92);
}

/* ==================================================== */
/* КНОПКА «СОХРАНИТЬ В СМЕТУ» — APPLE STYLE              */
/* ==================================================== */
.save-estimate-btn-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    height: 50px;
    margin-top: 14px;
    padding: 0 20px;

    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;

    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    box-shadow:
        0 8px 22px rgba(0, 113, 227, 0.35),
        0 2px 6px rgba(0, 113, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);

    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.15s ease;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.save-estimate-btn-mobile:active {
    transform: scale(0.96);
    filter: brightness(0.92);
    box-shadow:
        0 4px 12px rgba(0, 113, 227, 0.3),
        0 1px 3px rgba(0, 113, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition-duration: 0.1s;
}

.save-estimate-btn-mobile svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    display: block;
    pointer-events: none;
}

/* Анимация «успеха» — плавное превращение в зелёную на 1.2 сек */
.save-estimate-btn-mobile.saved {
    background: linear-gradient(135deg, #198754 0%, #20a866 100%) !important;
    box-shadow:
        0 8px 22px rgba(25, 135, 84, 0.4),
        0 2px 6px rgba(25, 135, 84, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

/* Если у калькулятора ещё нет результата — блокируем кнопку */
.save-estimate-btn-mobile:disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.3);
}

/* Контейнер кнопки — на всю ширину карточки результата */
.save-estimate-btn-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Отзывы в кабинете — длинный текст не должен расширять карточку */
.cabinet-pane[data-cab-pane="reviews"] .cabinet-item {
    min-width: 0 !important;
    overflow: hidden !important;
}

.cabinet-pane[data-cab-pane="reviews"] .cabinet-item-info {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.cabinet-pane[data-cab-pane="reviews"] .cabinet-item-desc {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    line-height: 1.45 !important;
}

/* ==================================================== */
/* ПАНЕЛЬ ОТЗЫВОВ — МОБИЛЬНАЯ                           */
/* ==================================================== */
.profile-view-reviews-section {
    display: none !important;
}

body.mobile-device .profile-view-modal.reviews-open .profile-view-main {
    flex: 0 0 0%;
    max-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

body.mobile-device .profile-view-modal.reviews-open .profile-view-reviews-panel {
    flex: 1 1 100%;
    max-width: 100%;
    opacity: 1;
    padding: 22px 16px;
}

body.mobile-device .profile-view-modal.reviews-open>.close-modal {
    display: none !important;
}

body.mobile-device .profile-view-reviews-panel {
    background: rgba(255, 255, 255, 0.5) !important;
    border-left: none !important;
}

body.dark-theme.mobile-device .profile-view-reviews-panel {
    background: rgba(20, 20, 22, 0.75) !important;
}

body.mobile-device .profile-view-reviews-panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 4px 0 12px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    flex-shrink: 0 !important;
}

body.dark-theme.mobile-device .profile-view-reviews-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .profile-view-reviews-panel-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
}

body.mobile-device .profile-view-reviews-panel-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(120, 120, 128, 0.14) !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
}

body.mobile-device .profile-view-reviews-panel-close svg {
    width: 13px !important;
    height: 13px !important;
    stroke: currentColor !important;
    display: block !important;
}

body.dark-theme.mobile-device .profile-view-reviews-panel-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

body.mobile-device .profile-view-reviews-panel-close:active {
    background: #ff3b30 !important;
    color: #ffffff !important;
    transform: rotate(90deg) scale(0.9) !important;
}

body.mobile-device .profile-view-reviews-panel-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* ==================================================== */
/* ПАНЕЛЬ ОТЗЫВОВ — МОБИЛЬНАЯ (выезжает, как объявления) */
/* ==================================================== */
.profile-view-reviews-section {
    display: none !important;
}

body.mobile-device .profile-view-modal.reviews-open .profile-view-main {
    flex: 0 0 0%;
    max-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

body.mobile-device .profile-view-modal.reviews-open .profile-view-reviews-panel {
    flex: 1 1 100%;
    max-width: 100%;
    opacity: 1;
    padding: 22px 16px;
}

body.mobile-device .profile-view-modal.reviews-open>.close-modal {
    display: none !important;
}

/* ==================================================== */
/* МОДАЛКА «ОТЗЫВЫ О ПОЛЬЗОВАТЕЛЕ» — МОБИЛЬНАЯ         */
/* ==================================================== */
#modal-view-reviews .reviews-view-modal {
    background: var(--card-bg) !important;
    border-radius: 22px !important;
    padding: 56px 18px 20px 18px !important;
    max-width: calc(100% - 24px) !important;
    width: calc(100% - 24px) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

body.dark-theme #modal-view-reviews .reviews-view-modal {
    background: #1c1c1e !important;
}


/* Шапка */
.reviews-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.reviews-view-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.reviews-view-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Список */
.reviews-view-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.reviews-view-list .profile-review-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 14px;
    border: 1px solid var(--border);
}

body.dark-theme .reviews-view-list .profile-review-item {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.06);
}

.reviews-view-list .profile-review-avatar {
    width: 40px !important;
    height: 40px !important;
    font-size: 15px !important;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0071e3, #5a9bff);
    color: #fff;
    font-weight: 700;
}

.reviews-view-list .profile-review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.reviews-view-list .profile-review-body {
    flex: 1;
    min-width: 0;
}

.reviews-view-list .profile-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.reviews-view-list .profile-review-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.reviews-view-list .profile-review-stars {
    color: #ffcc00;
    font-size: 12px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.reviews-view-list .profile-review-text {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    word-wrap: break-word;
}

.reviews-view-list .profile-review-date {
    font-size: 10.5px;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 5px;
}

.reviews-view-list .profile-view-ads-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    background: var(--bg-color);
}

body.dark-theme .reviews-view-list .profile-view-ads-empty {
    background: #2c2c2e;
}

/* ==================================================== */
/* ПРОСМОТР НЕДВИЖИМОСТИ — APPLE GLASS (МОБИЛЬНАЯ)      */
/* ==================================================== */

body.mobile-device #modal-view-property .property-view-modal {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    padding: 16px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-modal,
body.mobile-device.dark-theme #modal-view-property .property-view-modal {
    background: rgba(28, 28, 30, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #modal-view-property .property-view-gallery {
    position: relative !important;
    width: 100% !important;
    height: 240px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.08) 0%,
            rgba(90, 155, 255, 0.14) 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-gallery,
body.mobile-device.dark-theme #modal-view-property .property-view-gallery {
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.18) 0%,
            rgba(90, 155, 255, 0.08) 100%) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

body.mobile-device #modal-view-property .property-view-photo-placeholder {
    color: var(--primary) !important;
    opacity: 0.4 !important;
}

body.mobile-device #modal-view-property .property-view-photo-placeholder svg {
    stroke: var(--primary) !important;
    opacity: 0.5 !important;
    width: 56px !important;
    height: 56px !important;
}

body.mobile-device #modal-view-property .property-view-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 18px !important;
}

body.mobile-device #modal-view-property .property-view-specs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-property .property-view-spec {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 12px !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-main) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-spec,
body.mobile-device.dark-theme #modal-view-property .property-view-spec {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #modal-view-property .property-view-owner {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-owner,
body.mobile-device.dark-theme #modal-view-property .property-view-owner {
    background: rgba(44, 44, 46, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

/* Отключаем тяжёлый blur — только плотный цвет */
body.mobile-device #modal-view-property .property-view-modal,
body.mobile-device #modal-view-property .property-view-owner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.mobile-device #modal-view-property .property-view-modal {
    background: var(--card-bg) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-modal,
body.mobile-device.dark-theme #modal-view-property .property-view-modal {
    background: #1c1c1e !important;
}

body.mobile-device #modal-view-property .property-view-owner {
    background: rgba(120, 120, 128, 0.1) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-owner,
body.mobile-device.dark-theme #modal-view-property .property-view-owner {
    background: rgba(255, 255, 255, 0.06) !important;
}

/* ==================================================== */
/* ПРОСМОТР НЕДВИЖИМОСТИ — ПРОСТОРНАЯ РАСКЛАДКА         */
/* ==================================================== */

body.mobile-device #modal-view-property .property-view-modal {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    max-height: 94vh !important;
    padding: 0 !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--card-bg) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-modal,
body.mobile-device.dark-theme #modal-view-property .property-view-modal {
    background: #1c1c1e !important;
}

/* Внутренний скролл-контейнер */
body.mobile-device #modal-view-property .property-view-info {
    padding: 16px 18px 20px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.mobile-device #modal-view-property .property-view-gallery {
    position: relative !important;
    width: 100% !important;
    height: 260px !important;
    border-radius: 22px 22px 0 0 !important;
    overflow: hidden !important;
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.08) 0%,
            rgba(90, 155, 255, 0.14) 100%) !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    margin: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

body.dark-theme.mobile-device #modal-view-property .property-view-gallery,
body.mobile-device.dark-theme #modal-view-property .property-view-gallery {
    background: linear-gradient(135deg,
            rgba(0, 113, 227, 0.18) 0%,
            rgba(90, 155, 255, 0.08) 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #modal-view-property .property-view-photo-placeholder {
    color: var(--primary) !important;
    opacity: 0.4 !important;
}

body.mobile-device #modal-view-property .property-view-photo-placeholder svg {
    stroke: var(--primary) !important;
    opacity: 0.55 !important;
    width: 64px !important;
    height: 64px !important;
}

body.mobile-device #modal-view-property .property-view-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
}

body.mobile-device #modal-view-property .property-view-thumbs {
    display: none !important;
}

body.mobile-device #modal-view-property .property-view-thumbs:not(:empty) {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 10px 18px 4px 18px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--hairline) !important;
}

body.mobile-device #modal-view-property .property-view-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-property .property-view-price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #34c759 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
}

body.mobile-device #modal-view-property .property-view-deal {
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    border-radius: 100px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3) !important;
    white-space: nowrap !important;
}

body.mobile-device #modal-view-property .property-view-deal.sale {
    background: linear-gradient(135deg, #ff3b30 0%, #ff5c52 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35) !important;
}

body.mobile-device #modal-view-property .property-view-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
}

body.mobile-device #modal-view-property .property-view-desc {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

body.mobile-device #modal-view-property .property-view-specs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-property .property-view-spec {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 12px !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--text-main) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-spec,
body.mobile-device.dark-theme #modal-view-property .property-view-spec {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #modal-view-property .property-view-owner {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    background: rgba(120, 120, 128, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    transition: transform 0.2s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-owner,
body.mobile-device.dark-theme #modal-view-property .property-view-owner {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device #modal-view-property .property-view-owner:active {
    transform: scale(0.98);
}

body.mobile-device #modal-view-property .property-view-owner .large-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25) !important;
}

body.mobile-device #modal-view-property .property-view-owner-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

body.mobile-device #modal-view-property .property-view-owner-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-property .property-view-owner-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-property .property-view-owner-phone {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0071e3 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-property .property-view-owner-loc {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

body.mobile-device #modal-view-property .property-view-owner-arrow {
    color: var(--text-muted) !important;
    opacity: 0.5 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
}

body.mobile-device #modal-view-property .property-view-contact-btn {
    width: 100% !important;
    height: 50px !important;
    border-radius: 100px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35) !important;
    cursor: pointer !important;
    margin: 0 !important;
}

body.mobile-device #modal-view-property .property-view-own-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 4px !important;
}

body.mobile-device #modal-view-property .property-view-btn-close,
body.mobile-device #modal-view-property .property-view-btn-delete {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 48px !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
}

body.mobile-device #modal-view-property .property-view-btn-close {
    background: rgba(120, 120, 128, 0.14) !important;
    color: var(--text-main) !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-btn-close,
body.mobile-device.dark-theme #modal-view-property .property-view-btn-close {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f5f5f7 !important;
}

body.mobile-device #modal-view-property .property-view-btn-delete {
    background: linear-gradient(135deg, #ff3b30 0%, #ff5c52 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35) !important;
}

body.mobile-device #modal-view-property .property-view-close {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    right: auto !important;
    width: auto !important;
    height: 34px !important;
    padding: 0 14px 0 10px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    color: #0071e3 !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 10 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    cursor: pointer !important;
    border: none !important;
}

body.dark-theme.mobile-device #modal-view-property .property-view-close,
body.mobile-device.dark-theme #modal-view-property .property-view-close {
    background: rgba(28, 28, 30, 0.85) !important;
    color: #4a9eff !important;
}

body.mobile-device #modal-view-property .property-view-close span,
body.mobile-device #modal-view-property .property-view-close svg {
    display: none !important;
}

body.mobile-device #modal-view-property .property-view-close::before {
    content: '' !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-left: 2.5px solid currentColor !important;
    border-bottom: 2.5px solid currentColor !important;
    transform: rotate(45deg) !important;
    margin-bottom: 1px !important;
}

body.mobile-device #modal-view-property .property-view-close::after {
    content: 'Назад' !important;
    letter-spacing: -0.01em !important;
}

body.mobile-device #modal-view-property .property-card-skeleton {
    background: linear-gradient(90deg,
            rgba(120, 120, 128, 0.10) 25%,
            rgba(120, 120, 128, 0.22) 50%,
            rgba(120, 120, 128, 0.10) 75%) !important;
    background-size: 400px 100% !important;
    animation: propertyShimmerRun 1.4s infinite linear !important;
}

body.dark-theme.mobile-device #modal-view-property .property-card-skeleton,
body.mobile-device.dark-theme #modal-view-property .property-card-skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.06) 25%,
            rgba(255, 255, 255, 0.18) 50%,
            rgba(255, 255, 255, 0.06) 75%) !important;
    background-size: 400px 100% !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — КНОПКА «СМЕТА» В ОБЗОРЕ                 */
/* ==================================================== */
.organizer-overview-estimate-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    margin: 12px 0 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease,
        background 0.25s ease;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .organizer-overview-estimate-btn {
    background: rgba(28, 28, 30, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.organizer-overview-estimate-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow:
        0 10px 26px rgba(0, 113, 227, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.organizer-overview-estimate-btn:active {
    transform: scale(0.98);
}

.organizer-overview-estimate-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-theme .organizer-overview-estimate-icon {
    background: rgba(0, 113, 227, 0.25);
    color: #4a9eff;
}

.organizer-overview-estimate-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    display: block;
}

.organizer-overview-estimate-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.organizer-overview-estimate-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.organizer-overview-estimate-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

.organizer-overview-estimate-arrow {
    font-size: 22px;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.organizer-overview-estimate-btn:hover .organizer-overview-estimate-arrow {
    opacity: 1;
    color: var(--primary);
    transform: translateX(3px);
}

.organizer-estimate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background 0.15s ease;
}

body.dark-theme .organizer-estimate-row {
    background: #2c2c2e;
}

.organizer-estimate-row:hover {
    background: var(--primary-light);
}

body.dark-theme .organizer-estimate-row:hover {
    background: rgba(0, 113, 227, 0.15);
}

.organizer-estimate-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.organizer-estimate-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.organizer-estimate-qty {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.organizer-estimate-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    font-size: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .organizer-estimate-delete {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

.organizer-estimate-delete:hover,
.organizer-estimate-delete:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35);
}

.organizer-estimate-delete svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — РАСШИРЕННАЯ СТРОКА СМЕТЫ                 */
/* ==================================================== */
/* ==================================================== */
/* СМЕТА В ОРГАНАЙЗЕРЕ — APPLE STYLE (МОБИЛЬНАЯ)        */
/* ==================================================== */

/* Карточка одной сметы (одного расчёта) */
.org-estimate-entry {
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme .org-estimate-entry {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Шапка карточки (название сметы + дата + кнопки) */
.org-estimate-entry-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    background: var(--card-bg) !important;
    border-bottom: 1px solid var(--hairline) !important;
    cursor: pointer !important;
}

body.dark-theme .org-estimate-entry-head {
    background: #1c1c1e !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Заголовок сметы */
.org-estimate-entry-title {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.org-estimate-entry-name {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.org-estimate-entry-meta {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    font-variant-numeric: tabular-nums !important;
}

/* Кнопки в шапке (поделиться / удалить) */
.org-estimate-entry-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.org-icon-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.org-icon-btn svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
}

.org-icon-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: scale(1.08) !important;
}

.org-icon-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
}

.org-icon-btn.danger:hover {
    background: #ff3b30 !important;
    color: #fff !important;
}

body.dark-theme .org-icon-btn {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* Список позиций внутри сметы */
.org-estimate-items {
    display: flex !important;
    flex-direction: column !important;
    padding: 8px 16px 12px 16px !important;
    background: var(--card-bg) !important;
    gap: 0 !important;
}

body.dark-theme .org-estimate-items {
    background: #1c1c1e !important;
}

.org-estimate-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    border-bottom: 1px dashed rgba(120, 120, 128, 0.18) !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

body.dark-theme .org-estimate-item {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.org-estimate-item:last-child {
    border-bottom: none !important;
}

.org-estimate-item-name {
    color: var(--text-main) !important;
    font-weight: 500 !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.org-estimate-item-qty {
    color: var(--text-muted) !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Итоговая строка сметы */
.org-estimate-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    background: var(--bg-color) !important;
    border-top: 1px solid var(--hairline) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: var(--text-muted) !important;
}

body.dark-theme .org-estimate-total {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.org-estimate-total strong {
    color: var(--primary) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
}

body.dark-theme .org-estimate-total strong {
    color: #4a9eff !important;
}



.org-estimate-share-all:hover,
.org-estimate-share-all:active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35) !important;
    transform: translateY(-1px) !important;
}

.org-estimate-share-all:active {
    transform: scale(0.97) !important;
    filter: brightness(0.94) !important;
}

body.dark-theme .org-estimate-share-all {
    border-color: var(--primary) !important;
    color: #4a9eff !important;
}

body.dark-theme .org-estimate-share-all:hover,
body.dark-theme .org-estimate-share-all:active {
    background: var(--primary) !important;
    color: #ffffff !important;
}

/* Блок "Очистка сметы" (опасная зона) */
.org-section-danger {
    border-color: rgba(255, 59, 48, 0.3) !important;
    background: rgba(255, 59, 48, 0.03) !important;
    border-radius: 16px !important;
    padding: 16px !important;
}

body.dark-theme .org-section-danger {
    background: rgba(255, 59, 48, 0.06) !important;
    border-color: rgba(255, 59, 48, 0.3) !important;
}

.org-btn-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 46px !important;
    padding: 0 18px !important;
    border: 1.5px solid rgba(255, 59, 48, 0.35) !important;
    border-radius: 100px !important;
    background: transparent !important;
    color: #ff3b30 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

.org-btn-danger svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
    flex-shrink: 0 !important;
}

.org-btn-danger:hover,
.org-btn-danger:active {
    background: rgba(255, 59, 48, 0.1) !important;
    border-color: #ff3b30 !important;
}

body.dark-theme .org-btn-danger {
    color: #ff453a !important;
}

body.dark-theme .org-btn-danger:hover,
body.dark-theme .org-btn-danger:active {
    background: rgba(255, 59, 48, 0.18) !important;
    border-color: #ff453a !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — СЛОТ ДЕЙСТВИЙ В ДЕТАЛЬНОМ ВИДЕ          */
/* Статус + удаление, выровнены по центру               */
/* ==================================================== */

#organizer-detail-actions-slot {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.organizer-detail-delete-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    line-height: 1;

    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;

    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    box-shadow:
        0 1px 3px rgba(255, 59, 48, 0.1),
        0 2px 8px rgba(255, 59, 48, 0.06);
}

body.dark-theme .organizer-detail-delete-btn {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

.organizer-detail-delete-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
    stroke: currentColor;
}

.organizer-detail-delete-btn:hover,
.organizer-detail-delete-btn:focus-visible {
    background: #ff3b30;
    color: #ffffff;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 59, 48, 0.4);
    outline: none;
}

.organizer-detail-delete-btn:active {
    transform: rotate(90deg) scale(0.92);
    background: #e0342b;
    color: #ffffff;
    transition-duration: 0.15s;
}

body.dark-theme .organizer-detail-delete-btn:hover,
body.dark-theme .organizer-detail-delete-btn:focus-visible {
    background: #ff453a;
    color: #ffffff;
}

@media (max-width: 480px) {
    .organizer-detail-delete-btn {
        width: 38px;
        height: 38px;
    }

    .organizer-detail-delete-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ==================================================== */
/* СТАТУСЫ ОБЪЕКТА В ОРГАНАЙЗЕРЕ — ПОЛНЫЙ БЛОК          */
/* ==================================================== */

.organizer-detail-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px 0 14px;
    border-radius: 100px;
    border: 1px solid var(--hairline);
    background: var(--card-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    line-height: 1;
}

body.dark-theme .organizer-detail-status-btn {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

.organizer-detail-status-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.15);
}

.organizer-detail-status-btn:active {
    transform: scale(0.96);
}

.organizer-detail-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

body.dark-theme .organizer-detail-status-dot {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.organizer-detail-status-label {
    line-height: 1;
    letter-spacing: -0.01em;
}

/* ==================================================== */
/* МИНИ-МЕНЮ ВЫБОРА СТАТУСА (bottom sheet)              */
/* ==================================================== */
.status-picker-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.status-picker-overlay.open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.status-picker-sheet {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

body.dark-theme .status-picker-sheet {
    background: #1c1c1e;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.status-picker-overlay.open .status-picker-sheet {
    transform: translateY(0);
}

.status-picker-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--hairline);
    margin: 4px auto 12px;
    flex-shrink: 0;
}

.status-picker-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    text-align: center;
}

.status-picker-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 12px;
}

.status-picker-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-color);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    text-align: left;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .status-picker-item {
    background: #2c2c2e;
}

.status-picker-item:hover {
    background: var(--primary-light);
    transform: translateX(2px);
}

body.dark-theme .status-picker-item:hover {
    background: rgba(0, 113, 227, 0.15);
}

.status-picker-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

body.dark-theme .status-picker-item.active {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

.status-picker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.status-picker-label {
    flex: 1;
    min-width: 0;
}

.status-picker-check {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.status-picker-cancel {
    margin-top: 8px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-color);
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.status-picker-cancel:active {
    background: rgba(0, 113, 227, 0.1);
}

body.dark-theme .status-picker-cancel {
    background: #2c2c2e;
}

/* ==================================================== */
/* INLINE-СТАТУСЫ В НАСТРОЙКАХ ОБЪЕКТА                  */
/* ==================================================== */
.status-picker-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-inline-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--hairline);
    background: var(--card-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .status-inline-btn {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

.status-inline-btn:hover {
    border-color: var(--status-color, var(--primary));
    transform: translateX(2px);
}

.status-inline-btn.active {
    background: var(--status-bg, var(--primary-light));
    border-color: var(--status-color, var(--primary));
    color: var(--status-color, var(--primary));
    font-weight: 700;
}

.status-inline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .organizer-detail-status-btn {
        height: 38px;
        padding: 0 14px 0 12px;
        font-size: 12.5px;
    }

    .organizer-detail-status-dot {
        width: 8px;
        height: 8px;
    }
}

/* ==================================================== */
/* МОДАЛКА ПРОСМОТРА СМЕТЫ — МОБИЛЬНАЯ                  */
/* ==================================================== */

body.mobile-device #modal-estimate-preview .auth-card.estimate-view-modal,
body.mobile-device #modal-organizer-estimate-view .auth-card.estimate-view-modal {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    max-height: 88vh !important;
    padding: 56px 18px 20px 18px !important;
    border-radius: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow: hidden !important;
}

body.mobile-device #modal-estimate-preview .estimate-view-header,
body.mobile-device #modal-organizer-estimate-view .estimate-view-header {
    padding-right: 0;
    flex-shrink: 0;
}

body.mobile-device #modal-estimate-preview .estimate-view-title,
body.mobile-device #modal-organizer-estimate-view .estimate-view-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
    word-wrap: break-word;
}

body.mobile-device #modal-estimate-preview .estimate-view-meta,
body.mobile-device #modal-organizer-estimate-view .estimate-view-meta {
    font-size: 12px;
    margin-top: 4px;
}

body.mobile-device #modal-estimate-preview .estimate-view-items,
body.mobile-device #modal-organizer-estimate-view .estimate-view-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px;
    background: var(--bg-color);
    border-radius: 14px;
    border: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 6px;
    overscroll-behavior: contain;
}

body.dark-theme.mobile-device #modal-estimate-preview .estimate-view-items,
body.dark-theme.mobile-device #modal-organizer-estimate-view .estimate-view-items {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.06);
}

body.mobile-device #modal-estimate-preview .estimate-view-row,
body.mobile-device #modal-organizer-estimate-view .estimate-view-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed rgba(120, 120, 128, 0.18);
}

body.mobile-device #modal-estimate-preview .estimate-view-row:last-child,
body.mobile-device #modal-organizer-estimate-view .estimate-view-row:last-child {
    border-bottom: none;
}

body.mobile-device #modal-estimate-preview .estimate-view-name,
body.mobile-device #modal-organizer-estimate-view .estimate-view-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    color: var(--text-main);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body.mobile-device #modal-estimate-preview .estimate-view-qty,
body.mobile-device #modal-organizer-estimate-view .estimate-view-qty {
    flex-shrink: 0;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

body.mobile-device #modal-estimate-preview .estimate-view-empty,
body.mobile-device #modal-organizer-estimate-view .estimate-view-empty {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

body.mobile-device #modal-estimate-preview .estimate-view-total,
body.mobile-device #modal-organizer-estimate-view .estimate-view-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--primary-light);
    border-radius: 14px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

body.dark-theme.mobile-device #modal-estimate-preview .estimate-view-total,
body.dark-theme.mobile-device #modal-organizer-estimate-view .estimate-view-total {
    background: rgba(0, 113, 227, 0.18);
}

body.mobile-device #modal-estimate-preview .estimate-view-total strong,
body.mobile-device #modal-organizer-estimate-view .estimate-view-total strong {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    font-family: 'SF Mono', 'Consolas', monospace;
}

body.mobile-device #modal-estimate-preview .estimate-view-actions,
body.mobile-device #modal-organizer-estimate-view .estimate-view-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex-shrink: 0;
}

body.mobile-device #modal-estimate-preview .estimate-view-actions .calc-action-btn,
body.mobile-device #modal-organizer-estimate-view .estimate-view-actions .calc-action-btn {
    height: 50px;
    border-radius: 100px;
    font-size: 14.5px;
    font-weight: 600;
}

/* Отключаем тяжёлый blur на мобилке */
body.mobile-device #modal-estimate-preview .auth-card,
body.mobile-device #modal-organizer-estimate-view .auth-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--card-bg) !important;
}

body.dark-theme.mobile-device #modal-estimate-preview .auth-card,
body.dark-theme.mobile-device #modal-organizer-estimate-view .auth-card {
    background: #1c1c1e !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — СМЕТА: кнопки «Поделиться» (ФИКС)       */
/* ==================================================== */

.organizer-estimate-share-all,
.org-estimate-share-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    height: 46px;
    margin: 4px 0 14px 0;
    padding: 0 18px;

    border: 1.5px solid var(--primary);
    border-radius: 100px;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;

    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* ФИКС: иконки внутри кнопки «Поделиться всей сметой» */
.organizer-estimate-share-all svg,
.org-estimate-share-all svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.organizer-estimate-share-all:hover,
.organizer-estimate-share-all:focus-visible,
.org-estimate-share-all:hover,
.org-estimate-share-all:focus-visible {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35);
    transform: translateY(-1px);
    outline: none;
}

.organizer-estimate-share-all:active,
.org-estimate-share-all:active {
    transform: scale(0.97);
    filter: brightness(0.94);
}

/* ==================================================== */
/* Кнопка «Очистить смету» (danger) — ФИКС               */
/* ==================================================== */

.org-btn-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    height: 46px !important;
    padding: 0 18px !important;

    border: 1.5px solid rgba(255, 59, 48, 0.35) !important;
    border-radius: 100px !important;
    background: transparent !important;
    color: #ff3b30 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;

    transition: all 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;
}

/* ФИКС: иконка внутри кнопки «Очистить смету» */
.org-btn-danger svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.org-btn-danger:hover,
.org-btn-danger:active {
    background: rgba(255, 59, 48, 0.1) !important;
    border-color: #ff3b30 !important;
}

body.dark-theme .org-btn-danger {
    color: #ff453a !important;
}

body.dark-theme .org-btn-danger:hover,
body.dark-theme .org-btn-danger:active {
    background: rgba(255, 59, 48, 0.18) !important;
    border-color: #ff453a !important;
}

/* ==================================================== */
/* МАЛЕНЬКИЕ КРУГЛЫЕ КНОПКИ «ПОДЕЛИТЬСЯ» / «УДАЛИТЬ»    */
/* ==================================================== */

.organizer-estimate-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.organizer-estimate-share,
.org-icon-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;

    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    flex-shrink: 0 !important;

    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.organizer-estimate-share {
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
}

.org-icon-btn {
    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--text-muted) !important;
}

.org-icon-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
}

body.dark-theme .organizer-estimate-share {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.dark-theme .org-icon-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

body.dark-theme .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* ФИКС: иконки внутри маленьких круглых кнопок */
.organizer-estimate-share svg,
.org-icon-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    pointer-events: none !important;
}

.organizer-estimate-share:hover,
.organizer-estimate-share:focus-visible {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
    outline: none;
}

.org-icon-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: scale(1.08);
}

.org-icon-btn.danger:hover {
    background: #ff3b30 !important;
    color: #fff !important;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35);
}

.organizer-estimate-share:active {
    transform: scale(0.92);
    background: var(--primary-hover) !important;
}

/* ==================================================== */
/* ФИКС: отступ у кнопки «К чату» в панелях проекта     */
/* ==================================================== */

body.mobile-device .project-pane-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 40px !important;
    padding: 0 18px 0 12px !important;
    margin: 0 0 18px 0 !important;
    border: none !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--primary) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: max-content !important;
}

body.mobile-device .project-pane-back-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
}

body.dark-theme.mobile-device .project-pane-back-btn {
    background: rgba(120, 120, 128, 0.22) !important;
}

/* ==================================================== */
/* ЗАГОЛОВОК ПРОЕКТА + КОРЗИНА В ШАПКЕ                  */
/* ==================================================== */

.header-project-title {
    display: none;
    flex: 1;
    min-width: 0;
    text-align: center;
    overflow: hidden;
}

.header-project-title-text {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.header-project-delete {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .header-project-delete {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

.header-project-delete:active {
    transform: rotate(90deg) scale(0.92);
    background: #ff3b30;
    color: #fff;
}

.header-project-delete svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
    stroke: currentColor;
}

body.organizer-detail-open .header-project-title {
    display: block;
    animation: headerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.organizer-detail-open .header-project-delete {
    display: inline-flex;
    animation: headerFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.organizer-detail-open .actions-segmented {
    display: none;
}

@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.org-detail-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    min-height: 52px;
    box-sizing: border-box;
}

body.dark-theme .org-detail-mini {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.org-detail-mini-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.org-detail-mini-number {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
}

.org-detail-mini-address {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-detail-mini-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.org-detail-header {
    display: none !important;
}

body.mobile-device .org-detail-mini {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
}

body.mobile-device .org-detail-mini-number {
    font-size: 10px;
}

body.mobile-device .org-detail-mini-address {
    font-size: 12px;
}

body.mobile-device .org-detail-mini-actions .org-status-btn {
    height: 34px;
    padding: 0 12px 0 10px;
    font-size: 12px;
    gap: 6px;
}

body.mobile-device .org-detail-mini-actions .org-status-dot {
    width: 7px;
    height: 7px;
}

/* ==================================================== */
/* ШАПКА В РЕЖИМЕ КАЛЬКУЛЯТОРА (Apple Style)            */
/* ==================================================== */

/* Панель калькулятора — скрыта по умолчанию */
.header-top-modern .actions-calc {
    display: none !important;
    align-items: center;
    gap: 8px;
    height: 48px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Стандартная панель — плавно прячется */
.header-top-modern .actions-segmented {
    transition:
        opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
        max-width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === РЕЖИМ КАЛЬКУЛЯТОРА === */
body.calc-mode .header-top-modern .actions-segmented {
    display: none !important;
}

/* ==================================================== */
/* ВОЗВРАТ ПАНЕЛИ НА МЕСТО (обычный режим)              */
/* ==================================================== */

/* Стандартная панель — на всю доступную ширину */
.header-top-modern .actions-segmented {
    display: flex;
    flex: 1 1 auto;
    height: 40px;
    align-items: stretch;
}

/* И логотип-домик остаётся слева как обычно */
.header-top-modern .logo-block-modern {
    display: flex;
}

body.calc-mode .header-top-modern .actions-calc {
    display: flex !important;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    flex: 1 1 auto;
}

/* === Кнопка «Назад» === */
.header-top-modern .calc-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    font-family: inherit;
    transition:
        background 0.2s ease,
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.header-top-modern .calc-back-btn:active {
    transform: scale(0.92);
    background: rgba(0, 113, 227, 0.18);
}

body.dark-theme .header-top-modern .calc-back-btn {
    background: #2c2c2e;
}

body.dark-theme .header-top-modern .calc-back-btn:active {
    background: rgba(0, 113, 227, 0.25);
}

/* === Название калькулятора === */
.header-top-modern .calc-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    text-align: left;
    padding-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Кнопки-иконки (сохранить / отправить) === */
.header-top-modern .calc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition:
        background 0.2s ease,
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.header-top-modern .calc-icon-btn:active {
    transform: scale(0.92);
    background: rgba(0, 113, 227, 0.18);
}

body.dark-theme .header-top-modern .calc-icon-btn:active {
    background: rgba(0, 113, 227, 0.22);
}

/* Внутренние SVG — фиксированный размер */
.header-top-modern .calc-back-btn svg,
.header-top-modern .calc-icon-btn svg {
    display: block;
    flex-shrink: 0;
}

/* ==================================================== */
/* КАЛЬКУЛЯТОР — СКРЫВАЕМ ЛОГОТИП-ДОМИК (там своя ←)   */
/* ==================================================== */

/* В режиме калькулятора логотип-домик полностью скрыт —
   у нас уже есть своя кнопка назад в .actions-calc */
body.calc-mode .header-top-modern .logo-block-modern {
    display: none !important;
}

/* И заголовок проекта (который тоже показывает крестик-удаление)
   тоже не нужен в калькуляторе */
body.calc-mode .header-top-modern .header-project-title {
    display: none !important;
}

body.calc-mode .header-top-modern .header-project-delete {
    display: none !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — DRAG & DROP (Mobile Apple Style)        */
/* ==================================================== */

/* Карточка — держит долгое нажатие */
.org-card {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* Ручка — на мобилке всегда видна тонко, чтобы пользователь знал */
.org-card-drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.55;
    cursor: grab;
    z-index: 10;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.org-card-drag-handle:active {
    opacity: 1;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
}

body.dark-theme .org-card-drag-handle:active {
    background: rgba(0, 113, 227, 0.25);
}

/* В момент тач-перетаскивания карточка «поднимается» */
.org-card.org-card-dragging {
    opacity: 0.9;
    transform: scale(1.03);
    box-shadow:
        0 20px 50px rgba(0, 113, 227, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(0, 113, 227, 0.55) !important;
    z-index: 100;
    transition: none;
}

body.dark-theme .org-card.org-card-dragging {
    box-shadow:
        0 20px 50px rgba(0, 113, 227, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

/* Пока тащим — блокируем скролл только у самой карточки */
body.organizer-dragging {
    overflow: hidden;
    touch-action: none;
}

/* ==================================================== */
/* КНОПКА РУЧНОЙ СОРТИРОВКИ — МОБИЛЬНАЯ                 */
/* ==================================================== */
.org-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

#org-sort-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: 100px;
    border: 1px solid var(--hairline);
    background: var(--card-bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex: 1 1 auto;
}

body.dark-theme #org-sort-toggle {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

#org-sort-toggle.active {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#org-sort-toggle svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#org-sort-toggle.active svg {
    transform: rotate(180deg);
}

/* В режиме сортировки — на мобилке ручки всегда видны */
body.org-sort-mode .org-card-drag-handle {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ==================================================== */
/* ПРОСМОТР ФИРМЫ — APPLE GLASS (ПК)                    */
/* ==================================================== */

#modal-view-company .company-view-modal {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: 420px !important;
    width: 90% !important;
}

body.dark-theme #modal-view-company .company-view-modal {
    background: rgba(28, 28, 30, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* Стеклянный блик сверху */
#modal-view-company .company-view-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.25) 0%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
    z-index: 0;
}

body.dark-theme #modal-view-company .company-view-modal::before {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%);
}

.company-view-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px 20px;
    gap: 8px;
}

.company-view-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(255, 149, 0, 0.35);
}

.company-view-logo svg {
    width: 36px;
    height: 36px;
    stroke: #fff;
    fill: none;
}

.company-view-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}

.company-view-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.company-view-spec-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
}

body.dark-theme .company-view-spec-badge {
    background: rgba(0, 113, 227, 0.25);
    color: #4a9eff;
}

.company-view-contacts {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-view-contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.2s ease;
}

.company-view-contact-row[href]:hover {
    background: rgba(0, 113, 227, 0.08);
    cursor: pointer;
}

body.dark-theme .company-view-contact-row[href]:hover {
    background: rgba(0, 113, 227, 0.15);
}

.company-view-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-theme .company-view-contact-icon {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

.company-view-contact-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

.company-view-contact-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-view-contact-arrow {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 300;
    opacity: 0.5;
    flex-shrink: 0;
}

.company-view-about {
    position: relative;
    z-index: 1;
    padding: 16px 24px 0;
}

.company-view-section-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.company-view-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
}

.company-view-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    padding: 24px 20px 20px;
}

.company-view-action-btn {
    flex: 1;
    height: 48px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
}

.company-view-action-btn.primary {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
}

.company-view-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 113, 227, 0.4);
}

.company-view-action-btn.secondary {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

body.dark-theme .company-view-action-btn.secondary {
    background: rgba(44, 44, 46, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.company-view-action-btn:active {
    transform: scale(0.96);
    filter: brightness(0.94);
}

/* ==================================================== */
/* ПРОСМОТР ФИРМЫ — МОБИЛЬНАЯ (APPLE BOTTOM SHEET)      */
/* ==================================================== */

body.mobile-device #modal-view-company .modal-overlay {
    align-items: flex-end;
    padding: 0;
}

body.mobile-device #modal-view-company .company-view-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 28px 28px 0 0 !important;
    margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--card-bg) !important;
}

body.dark-theme.mobile-device #modal-view-company .company-view-modal {
    background: #1c1c1e !important;
}

/* Кнопка "Назад" на мобилке */
body.mobile-device #modal-view-company .close-modal {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    width: auto !important;
    height: 36px !important;
    padding: 0 14px 0 10px !important;
    background: var(--bg-color) !important;
    color: var(--primary) !important;
    border-radius: 100px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

body.mobile-device #modal-view-company .close-modal::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-left: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg);
    margin-bottom: 1px;
}

body.mobile-device #modal-view-company .close-modal::after {
    content: 'Назад';
}

body.mobile-device #modal-view-company .close-modal span,
body.mobile-device #modal-view-company .close-modal svg {
    display: none !important;
}

/* Отступ сверху, чтобы кнопка не закрывала контент */
body.mobile-device .company-view-header {
    padding-top: 60px;
}

/* ==================================================== */
/* ПОДРЯДЧИКИ — МОБИЛЬНАЯ КАРТОЧКА                       */
/* ==================================================== */

body.mobile-device .company-card {
    padding: 16px;
    border-radius: 18px;
    gap: 10px;
}

body.mobile-device .company-card:hover {
    transform: none;
}

body.mobile-device .company-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

body.mobile-device .company-card-logo {
    width: 46px;
    height: 46px;
    font-size: 19px;
    border-radius: 12px;
}

body.mobile-device .company-card-name {
    font-size: 15.5px;
}

body.mobile-device .company-card-specs {
    font-size: 12px;
}

body.mobile-device .company-card-btn {
    width: 30px;
    height: 30px;
}

body.mobile-device .company-card-btn svg {
    width: 13px;
    height: 13px;
}

body.mobile-device .company-card-desc {
    font-size: 12.5px;
}

body.mobile-device .company-card-phone {
    font-size: 13.5px;
}

body.mobile-device .company-card-btn-site {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

/* Отключаем blur на мобилке для производительности */
body.mobile-device .company-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ==================================================== */
/* ПОДРЯДЧИКИ (ФИРМЫ) — МОБИЛЬНАЯ ВЕРСИЯ (APPLE STYLE)   */
/* ==================================================== */

body.mobile-device .company-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;

    /* Стеклянный фон в стиле Apple */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);

    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    cursor: pointer;
    transition: transform 0.25s var(--ease-spring);
    overflow: hidden;
    box-sizing: border-box;
}

body.dark-theme.mobile-device .company-card {
    background: rgba(28, 28, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.mobile-device .company-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

/* --- Шапка: логотип + инфо + кнопки --- */
body.mobile-device .company-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

body.mobile-device .company-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9500 0%, #ffcc00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

body.dark-theme.mobile-device .company-card-logo {
    border-color: rgba(255, 255, 255, 0.12);
}

body.mobile-device .company-card-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 0;
}

body.mobile-device .company-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.mobile-device .company-card-specs {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Кнопки действий (edit / delete) — в правом верхнем углу --- */
body.mobile-device .company-card-actions {
    position: static;
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

body.mobile-device .company-card-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.mobile-device .company-card-btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}

body.mobile-device .company-card-btn.edit {
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
}

body.dark-theme.mobile-device .company-card-btn.edit {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

body.mobile-device .company-card-btn.edit:active {
    background: var(--primary);
    color: #fff;
    transform: scale(0.9);
}

body.mobile-device .company-card-btn.delete {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

body.dark-theme.mobile-device .company-card-btn.delete {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

body.mobile-device .company-card-btn.delete:active {
    background: #ff3b30;
    color: #fff;
    transform: rotate(90deg) scale(0.9);
}

/* --- Описание --- */
body.mobile-device .company-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* --- Футер: телефон + кнопка сайта --- */
body.mobile-device .company-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    margin-top: 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

body.dark-theme.mobile-device .company-card-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.mobile-device .company-card-owner-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

body.mobile-device .company-card-phone {
    font-size: 14px;
    font-weight: 700;
    color: #34c759;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

body.mobile-device .company-card-btn-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 34px;
    padding: 0 14px;
    border-radius: 100px;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.mobile-device .company-card-btn-site svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

body.mobile-device .company-card-btn-site:active {
    background: var(--primary);
    color: #fff;
    transform: scale(0.96);
}

body.dark-theme.mobile-device .company-card-btn-site {
    color: #4a9eff;
    border-color: #4a9eff;
}

body.dark-theme.mobile-device .company-card-btn-site:active {
    background: #4a9eff;
    color: #fff;
}

body.mobile-device .company-card-btn-site {
    min-height: 40px;
    border: 0;
    background: linear-gradient(135deg, #0071e3, #1688ff);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.22);
}

body.dark-theme.mobile-device .company-card-btn-site {
    border: 0;
    color: #fff;
}

body.mobile-device .company-card-btn-site:active {
    background: linear-gradient(135deg, #0066cc, #0077ed);
    color: #fff;
}

body.mobile-device #companies-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 14px;
    width: 100%;
}

body.mobile-device #companies-grid .company-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 12px;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

body.dark-theme.mobile-device #companies-grid .company-card {
    background: #1c1c1e;
    border-color: rgba(255,255,255,.09);
    box-shadow: 0 7px 22px rgba(0,0,0,.24);
}

body.mobile-device #companies-grid .company-card-art {
    display: grid;
    place-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    margin: 0 0 10px;
    border-radius: 15px;
    overflow: hidden;
    background: #f2f2f7;
}

body.dark-theme.mobile-device #companies-grid .company-card-art {
    background: #2c2c2e;
}

body.mobile-device #companies-grid .company-card-art > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.mobile-device #companies-grid .company-card-image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,113,227,.09), transparent 55%), #f2f2f7;
}

body.mobile-device #companies-grid .company-card-image-placeholder span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(0,113,227,.14);
    border-radius: 17px;
    background: rgba(255,255,255,.8);
    color: #0071e3;
    font-size: 26px;
    font-weight: 700;
}

body.dark-theme.mobile-device #companies-grid .company-card-image-placeholder {
    background: radial-gradient(circle at center, rgba(0,113,227,.18), transparent 55%), #2c2c2e;
}

body.dark-theme.mobile-device #companies-grid .company-card-image-placeholder span {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.12);
    color: #78b5ff;
}

body.mobile-device #companies-grid .company-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
}

body.mobile-device #companies-grid .company-card-header-info {
    padding: 0;
}

body.mobile-device #companies-grid .company-card-logo {
    display: none;
}

body.mobile-device #companies-grid .company-card-name {
    font-size: 16px;
    line-height: 1.2;
}

body.mobile-device #companies-grid .company-card-specs {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.mobile-device #companies-grid .company-card-actions {
    position: static;
    flex-shrink: 0;
    margin-left: auto;
}

body.mobile-device #companies-grid .company-card-desc {
    display: -webkit-box;
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.mobile-device #companies-grid .company-card-footer {
    display: flex;
    justify-content: stretch;
    margin: 9px 0 0;
    padding: 0;
    border: 0;
}

body.mobile-device #companies-grid .company-card-btn-site {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1677e8, #3689f5);
    color: #fff;
    font-size: 12px;
}

body.mobile-device #companies-grid .company-card-owner-label {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(0,113,227,.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 650;
}

body.mobile-device #companies .company-card-image-preview {
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-color);
}

body.mobile-device #companies .company-card-image-preview:empty {
    display: none;
}

body.mobile-device #companies .company-card-image-preview-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================================================== */
/* НОВЫЙ ЭКРАН-ХАБ ОРГАНАЙЗЕРА (APPLE STYLE)            */
/* ==================================================== */

#organizer-hub-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
}

/* Заголовок */
.org-hub-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.org-hub-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text-main);
    margin: 0;
}

.org-hub-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* Кнопка "Создать проект" */
.org-hub-create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.org-hub-create-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.org-hub-create-btn:active {
    transform: scale(0.97);
    filter: brightness(0.94);
}

/* Сетка 2 колонки: Проекты + Заметки */
.org-hub-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Карточка-плитка */
.org-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 16px;
    min-height: 130px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    text-align: left;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

body.dark-theme .org-hub-card {
    background: rgba(28, 28, 30, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.org-hub-card:active {
    transform: scale(0.96);
}

.org-hub-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.org-hub-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}

body.dark-theme .org-hub-card-icon {
    background: rgba(0, 113, 227, 0.25);
    color: #4a9eff;
}

.org-hub-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-top: 4px;
}

.org-hub-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.org-hub-card-count {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

/* Большая кнопка "Общая смета" */
.org-hub-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    text-align: left;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    margin-top: 4px;
}

body.dark-theme .org-hub-cta {
    background: rgba(28, 28, 30, 0.65);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.org-hub-cta:active {
    transform: scale(0.98);
}

.org-hub-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9500, #ffcc00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
}

.org-hub-cta-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}

.org-hub-cta-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.org-hub-cta-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.org-hub-cta-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

.org-hub-cta-arrow {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
    line-height: 1;
}

/* Заголовок "Последние проекты" */
.org-hub-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 2px;
}

.org-hub-recent-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin: 0;
}

.org-hub-recent-all {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
    -webkit-tap-highlight-color: transparent;
}

.org-hub-recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Контейнер «Последние проекты» */
.org-hub-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Компактный вариант карточки проекта для хаба */
.org-hub-recent-list .org-card {
    padding: 16px 18px;
    gap: 8px;
    border-radius: 18px;
}

.org-hub-recent-list .org-card-title {
    font-size: 15px;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Заголовок списка проектов с кнопкой Назад */
.org-page-header-left {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

/* Старая шапка списка с кнопками — не нужна (кроме заметок) */
.org-page-header {
    display: none !important;
}

/* НО: в экране заметок — шапка нужна (кнопка Назад + Добавить) */
#organizer-notes-view .org-page-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
}

/* И в списке проектов — тоже нужна (заголовок + кнопка Создать) */
#organizer-list-view .org-page-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
}

#organizer-list-view .org-page-title-block {
    flex: 1;
    padding: 0 12px;
}

#organizer-list-view .org-page-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0;
}

/* Заголовок "Последние проекты" — без кнопки справа */
.org-hub-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 2px;
}

.org-hub-recent-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin: 0;
}

/* Убираем кнопку "Все ›", если она где-то осталась */
.org-hub-recent-all {
    display: none !important;
}

/* ==================================================== */
/* ФИНАЛЬНАЯ ЗАЧИСТКА: старый вид органайзера не нужен   */
/* ==================================================== */

/* Старый экран списка проектов — скрыт по умолчанию,
   но показывается, если JS явно ставит display: block */
#organizer-list-view {
    display: none;
}

#organizer-list-view[style*="display: block"],
#organizer-list-view[style*="display:block"] {
    display: block !important;
}

/* Кнопка ручной сортировки — удалена из дизайна */
#org-sort-toggle {
    display: none !important;
}

/* Старые стили кнопки "Назад" в шапке списка — не используем */
.org-page-header-left {
    display: none !important;
}

/* ==================================================== */
/* ЗАМЕТКИ — СТИЛЬ APPLE (iOS Notes)                    */
/* ==================================================== */

body.mobile-device .notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0 100px 0;
}

/* --- Карточка заметки --- */
body.mobile-device .note-row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

body.dark-theme.mobile-device .note-row {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.mobile-device .note-row:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Основной контент */
body.mobile-device .note-row-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 44px;
}

body.mobile-device .note-row-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.mobile-device .note-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.3;
    min-width: 0;
}

body.mobile-device .note-row-date {
    font-weight: 500;
    flex-shrink: 0;
}

body.mobile-device .note-row-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.8;
    min-width: 0;
}

/* Контейнер действий (только share) */
body.mobile-device .note-row-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Кнопка "Поделиться" — маленькая, аккуратная */
body.mobile-device .note-row-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(120, 120, 128, 0.12);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

body.dark-theme.mobile-device .note-row-action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #98989d;
}

body.mobile-device .note-row-action-btn:active {
    background: var(--primary);
    color: #fff;
    transform: scale(0.92);
}

body.mobile-device .note-row-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    display: block;
    pointer-events: none;
}

/* Убираем старую стрелку ">" */
body.mobile-device .note-row-chevron {
    display: none !important;
}

/* --- Редактор --- */
body.mobile-device .note-editor-body {
    padding: 4px 0 0 0;
    gap: 10px;
}

body.mobile-device .note-editor-textarea {
    width: 100%;
    min-height: calc(100dvh - 240px);
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-overflow-scrolling: touch;
}

body.mobile-device .note-editor-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

body.mobile-device .note-editor-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.55;
}

body.dark-theme.mobile-device .note-editor-textarea {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme.mobile-device .note-editor-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3);
}

body.mobile-device .note-editor-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0 4px;
    margin-top: -4px;
}

body.mobile-device .note-editor-date {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* --- Кнопка "Сохранить" в редакторе --- */
body.mobile-device .note-editor-save-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    margin-right: 6px;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.mobile-device .note-editor-save-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    display: block;
    pointer-events: none;
}

body.mobile-device .note-editor-save-btn:active {
    transform: scale(0.92);
    background: var(--primary);
    color: #fff;
}

body.dark-theme.mobile-device .note-editor-save-btn {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

/* --- Кнопка удаления в редакторе --- */
body.mobile-device .note-editor-delete-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.mobile-device .note-editor-delete-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    display: block;
    pointer-events: none;
}

body.mobile-device .note-editor-delete-btn:active {
    transform: rotate(90deg) scale(0.92);
    background: #ff3b30;
    color: #fff;
}

body.dark-theme.mobile-device .note-editor-delete-btn {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

/* --- Убираем скролл body при открытом редакторе --- */
body.mobile-device.organizer-notes-open .main-content {
    overscroll-behavior: contain;
}

/* --- Шапка заметок (Назад + Заголовок + Добавить) --- */
body.mobile-device #organizer-notes-view .org-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
}

body.mobile-device #organizer-notes-view .org-page-title-block {
    flex: 1;
    padding: 0 8px;
    text-align: center;
    min-width: 0;
}

body.mobile-device #organizer-notes-view .org-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Кнопка "Назад" — Apple-пилюля */
body.mobile-device #organizer-notes-view .organizer-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px 0 10px;
    border: none;
    border-radius: 100px;
    background: rgba(120, 120, 128, 0.12);
    color: var(--primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

body.dark-theme.mobile-device #organizer-notes-view .organizer-back-btn {
    background: rgba(120, 120, 128, 0.22);
}

body.mobile-device #organizer-notes-view .organizer-back-btn:active {
    transform: scale(0.96);
    background: rgba(0, 113, 227, 0.15);
}

body.mobile-device #organizer-notes-view .organizer-back-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    display: block;
    flex-shrink: 0;
}

/* Кнопка "Добавить" — Apple-пилюля */
body.mobile-device #organizer-notes-view .org-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: 100px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

body.mobile-device #organizer-notes-view .org-btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}

body.mobile-device #organizer-notes-view .org-btn-primary svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

/* На очень узких экранах — прячем текст кнопки "Назад" */
@media (max-width: 380px) {
    body.mobile-device #organizer-notes-view .organizer-back-btn span {
        display: none;
    }

    body.mobile-device #organizer-notes-view .organizer-back-btn {
        padding: 0 12px;
        width: 38px;
        justify-content: center;
    }
}


/* ==================================================== */
/* ЧАТ ПРОЕКТА — APPLE iMESSAGE STYLE (ФИНАЛ)           */
/* ==================================================== */

/* --- Общий контейнер: карточка с закруглениями --- */
body.mobile-device #organizer-project-view #project-chat-view,
body.mobile-device #organizer-project-view>#project-chat-view {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 160px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.dark-theme.mobile-device #project-chat-view {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-theme.mobile-device #project-chat-view {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- Шапка чата внутри карточки --- */
body.mobile-device .project-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    margin: 0;
    border-bottom: 1px solid var(--hairline);
    min-height: 56px;
    box-sizing: border-box;
    flex-shrink: 0;
    background: var(--card-bg);
}

body.dark-theme.mobile-device .project-chat-header {
    background: #1c1c1e;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.mobile-device .project-chat-title-block {
    flex: 1;
    min-width: 0;
    display: block !important;
}

body.mobile-device .project-chat-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

body.mobile-device .project-chat-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    line-height: 1.2;
}

/* --- Кнопки в шапке — маленькие круглые --- */
body.mobile-device .project-chat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

body.mobile-device .project-chat-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme.mobile-device .project-chat-icon-btn {
    background: #2c2c2e;
}

body.mobile-device .project-chat-icon-btn:active {
    transform: scale(0.9);
    background: rgba(0, 113, 227, 0.15);
}

body.mobile-device .project-chat-icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* --- Лента сообщений: скролл + фон --- */
body.mobile-device .project-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-color);
    scroll-behavior: smooth;
}

body.dark-theme.mobile-device .project-chat-messages {
    background: #000000;
}

/* --- Пузырь сообщения --- */
body.mobile-device .project-chat-msg {
    display: flex;
    width: 100%;
    margin: 0;
}

body.mobile-device .project-chat-msg.mine {
    justify-content: flex-end;
}

body.mobile-device .project-chat-msg.their {
    justify-content: flex-start;
}

body.mobile-device .project-chat-msg-bubble {
    max-width: 78%;
    padding: 9px 14px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    animation: chatMsgIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatMsgIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Мои сообщения — синие, справа */
body.mobile-device .project-chat-msg.mine .project-chat-msg-bubble {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
}

/* Чужие — серые, слева */
body.mobile-device .project-chat-msg.their .project-chat-msg-bubble {
    background: var(--card-bg);
    color: var(--text-main);
    border-bottom-left-radius: 6px;
    border: 1px solid var(--hairline);
}

body.dark-theme.mobile-device .project-chat-msg.their .project-chat-msg-bubble {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- Имя автора в чужом сообщении --- */
body.mobile-device .project-chat-msg-author {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

body.mobile-device .project-chat-msg.mine .project-chat-msg-author {
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

/* --- Текст сообщения --- */
body.mobile-device .project-chat-msg-text {
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* --- Время --- */
body.mobile-device .project-chat-msg-time {
    font-size: 10.5px;
    opacity: 0.7;
    margin-top: 3px;
    text-align: right;
    line-height: 1;
}

body.mobile-device .project-chat-msg.mine .project-chat-msg-time {
    color: rgba(255, 255, 255, 0.85);
}

body.mobile-device .project-chat-msg.their .project-chat-msg-time {
    color: var(--text-muted);
}

/* --- Пустое состояние --- */
body.mobile-device .project-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

body.mobile-device .project-chat-empty svg {
    width: 44px;
    height: 44px;
    opacity: 0.4;
    stroke: var(--text-muted);
}

body.mobile-device .project-chat-empty p {
    font-size: 14px;
    line-height: 1.4;
    max-width: 240px;
    margin: 0;
}

/* --- Поле ввода: Apple-стиль --- */
body.mobile-device .project-chat-input-wrap {
    padding: 10px 12px 12px 12px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--hairline);
}

body.dark-theme.mobile-device .project-chat-input-wrap {
    background: #1c1c1e;
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.mobile-device .project-chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    box-sizing: border-box;
}

/* Круглая кнопка «+» */
body.mobile-device .project-chat-attach-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme.mobile-device .project-chat-attach-btn {
    background: #2c2c2e;
}

body.mobile-device .project-chat-attach-btn:active {
    transform: scale(0.9);
}

body.mobile-device .project-chat-attach-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Само поле ввода — капсула */
body.mobile-device .project-chat-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--hairline);
    border-radius: 20px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

body.dark-theme.mobile-device .project-chat-input {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.08);
}

body.mobile-device .project-chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

body.mobile-device .project-chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

/* Кнопка «Отправить» — капсула */
body.mobile-device .project-chat-send-btn {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.mobile-device .project-chat-send-btn:active {
    transform: scale(0.96);
    filter: brightness(0.94);
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.2);
}

/* --- Заглушка «нет доступа» --- */
body.mobile-device .project-chat-no-access {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

body.mobile-device .project-chat-no-access svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

body.mobile-device .project-chat-no-access p {
    font-size: 13px;
    line-height: 1.4;
    max-width: 240px;
    margin: 0;
}

/* ==================================================== */
/* ЧАТ — ЖЁСТКАЯ РАСКЛАДКА (ЭТОТ БЛОК ДОЛЖЕН БЫТЬ ПОСЛЕДНИМ) */
/* ==================================================== */

body.mobile-device #organizer-project-view {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    width: 100% !important;
}

body.mobile-device #organizer-project-view #project-chat-view,
body.mobile-device #project-chat-view {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 160px) !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    border-radius: 0 !important;
}

/* Шапка чата — сверху, отдельной строкой */
body.mobile-device #project-chat-view .project-chat-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 12px 14px !important;
    flex: 0 0 auto !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: var(--card-bg) !important;
    min-height: 56px !important;
}

body.mobile-device #project-chat-view .project-chat-title-block {
    flex: 1 !important;
    min-width: 0 !important;
}

body.mobile-device #project-chat-view .project-chat-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--text-main) !important;
}

body.mobile-device #project-chat-view .project-chat-subtitle {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
}

body.mobile-device #project-chat-view .project-chat-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

body.mobile-device #project-chat-view .project-chat-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    background: var(--bg-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

/* Лента сообщений — растягивается, скроллится */
body.mobile-device #project-chat-view .project-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    padding: 16px 14px !important;
    order: 2 !important;
}

/* Поле ввода — прижато к низу */
body.mobile-device #project-chat-view .project-chat-input-wrap {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    width: 100% !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;
    order: 3 !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
}

/* Заглушка «нет доступа» */
body.mobile-device #project-chat-view .project-chat-no-access {
    flex: 0 0 auto !important;
    width: 100% !important;
    order: 4 !important;
}

body.mobile-device #project-chat-view .project-chat-header {
    flex: 0 0 auto !important;
    order: 1 !important;
    position: relative !important;
    z-index: 2 !important;
}

body.mobile-device #project-chat-view .project-chat-messages {
    flex: 1 1 auto !important;
    order: 2 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
}

body.mobile-device #project-chat-view .project-chat-input-wrap {
    flex: 0 0 auto !important;
    order: 3 !important;
    margin-top: auto !important;
    position: relative !important;
    z-index: 2 !important;
}

body.mobile-device #project-chat-view .project-chat-no-access {
    flex: 0 0 auto !important;
    order: 4 !important;
}

/* ==================================================== */
/* КАРТОЧКА СМЕТЫ В ЧАТЕ                                */
/* ==================================================== */

body.mobile-device .project-chat-estimate-card {
    max-width: 88% !important;
    padding: 12px 14px !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 18px !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-card {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35) !important;
}

body.dark-theme.mobile-device .project-chat-estimate-card {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme.mobile-device .project-chat-msg.mine .project-chat-estimate-card {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
}

.project-chat-estimate-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.project-chat-estimate-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.project-chat-estimate-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-chat-estimate-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-items {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme.mobile-device .project-chat-estimate-items {
    background: rgba(255, 255, 255, 0.06);
}

.project-chat-estimate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.3;
}

.project-chat-estimate-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

.project-chat-estimate-item-qty {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
    opacity: 0.85;
    flex-shrink: 0;
}

.project-chat-estimate-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: 600;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-total {
    border-top-color: rgba(255, 255, 255, 0.25);
}

body.dark-theme.mobile-device .project-chat-estimate-total {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.project-chat-estimate-total strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.project-chat-estimate-store {
    font-size: 11px;
    opacity: 0.7;
    text-align: center;
    padding-top: 2px;
}

/* ==================================================== */
/* ПОЛНОЭКРАННОЕ МЕНЮ ПРОЕКТА (мобилка)                 */
/* ==================================================== */

.project-menu-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.25s ease;
    will-change: transform;
}

.project-menu-screen.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Шапка */
.project-menu-screen-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--hairline);
    min-height: 56px;
    box-sizing: border-box;
}

body.dark-theme .project-menu-screen-header {
    background: #1c1c1e;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.project-menu-screen-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 38px;
    padding: 0 14px 0 10px;
    border: none;
    border-radius: 100px;
    background: var(--bg-color);
    color: var(--primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.project-menu-screen-back:active {
    transform: scale(0.95);
    background: rgba(0, 113, 227, 0.1);
}

body.dark-theme .project-menu-screen-back {
    background: #2c2c2e;
}

.project-menu-screen-back svg {
    display: block;
    flex-shrink: 0;
}

.project-menu-screen-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 58px;
    /* компенсируем ширину кнопки «Назад» */
}

/* Сетка плиток — 3 колонки, как калькуляторы на мобилке */
.project-menu-screen-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 14px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-content: start;
}

/* Плитка */
.project-menu-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 6px 14px;
    min-height: 100px;
    background: var(--card-bg);
    border: 1.5px solid var(--hairline);
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    text-align: center;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    overflow: hidden;
}

.project-menu-tile:active {
    transform: scale(0.95);
}

.project-menu-tile.active {
    background: rgba(0, 113, 227, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

body.dark-theme .project-menu-tile {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .project-menu-tile.active {
    background: rgba(0, 113, 227, 0.22);
    border-color: var(--primary);
    color: #4a9eff;
}

.project-menu-tile-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.project-menu-tile-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

.project-menu-tile-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
    color: inherit;
}

.project-menu-tile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Футер с «К списку проектов» */
.project-menu-screen-footer {
    flex-shrink: 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--card-bg);
    border-top: 1px solid var(--hairline);
}

body.dark-theme .project-menu-screen-footer {
    background: #1c1c1e;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.project-menu-screen-back-to-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border: 1.5px solid var(--primary);
    border-radius: 100px;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.project-menu-screen-back-to-list:active {
    transform: scale(0.97);
    background: var(--primary);
    color: #fff;
}

.project-menu-screen-back-to-list svg {
    display: block;
    flex-shrink: 0;
}

/* Отключаем блюр на мобилке для производительности */
body.mobile-device .project-menu-screen {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР ПРОЕКТА НА МОБИЛКЕ — ОДНА КОЛОНКА         */
/* Перебиваем ПК-стили из organizer-apple.css           */
/* ==================================================== */

/* Убираем фиксированную высоту и грид с 2 колонками */
body.mobile-device #organizer-project-view {
    display: none;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

body.mobile-device #organizer-project-view[style*="display: block"],
body.mobile-device #organizer-project-view[style*="display:block"] {
    display: block !important;
}

body.mobile-device .project-layout {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Левое меню с плитками — полностью скрываем на мобилке.
   Его роль выполняет полноэкранное меню по кнопке ☰ */
body.mobile-device .project-menu {
    display: none !important;
}

/* Карточка чата — на всю ширину, без рамок */
body.mobile-device .project-content {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
}

body.mobile-device .project-content-pane {
    display: none;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

body.mobile-device .project-content-pane.active {
    display: block !important;
}

/* ==================================================== */
/* ЖЁСТКАЯ РАСКЛАДКА ЧАТА НА ВСЮ ВЫСОТУ ЭКРАНА            */
/* ==================================================== */

body.mobile-device #organizer-project-view #project-chat-view,
body.mobile-device #project-chat-view {
    display: flex !important;
    flex-direction: column !important;

    /* Жёстко на всю высоту вьюпорта, минус только шапка приложения.
       Используем 100vh, а не 100dvh, для лучшей совместимости. */
    height: calc(100vh - 80px) !important;
    /* 80px — это примерно высота шапки */
    max-height: none !important;
    min-height: 300px !important;

    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    border-radius: 0 !important;
    background: var(--card-bg) !important;
    box-shadow: none !important;
    border: none !important;

    /* Прижимаем к верху, чтобы не было отступов */
    margin-top: 0 !important;
    top: 0 !important;
}

body.dark-theme.mobile-device #project-chat-view {
    background: #1c1c1e !important;
}

/* Шапка чата — сверху, отдельной строкой */
body.mobile-device #project-chat-view .project-chat-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 12px 14px !important;
    flex: 0 0 auto !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: var(--card-bg) !important;
    min-height: 56px !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 2;
}

body.dark-theme.mobile-device #project-chat-view .project-chat-header {
    background: #1c1c1e !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #project-chat-view .project-chat-title-block {
    flex: 1 !important;
    min-width: 0 !important;
}

body.mobile-device #project-chat-view .project-chat-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--text-main) !important;
}

body.mobile-device #project-chat-view .project-chat-subtitle {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
}

body.mobile-device #project-chat-view .project-chat-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

body.mobile-device #project-chat-view .project-chat-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 50% !important;
    background: var(--bg-color) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

/* Лента сообщений — растягивается, скроллится */
body.mobile-device #project-chat-view .project-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    padding: 16px 14px !important;
    order: 2 !important;
    background: var(--bg-color) !important;
}

body.dark-theme.mobile-device #project-chat-view .project-chat-messages {
    background: #000 !important;
}

/* Поле ввода — прижато к низу, всегда видно */
body.mobile-device #project-chat-view .project-chat-input-wrap {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    width: 100% !important;

    /* Отступ снизу для safe-area (iPhone с вырезом) */
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;

    order: 3 !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 3;
}

body.dark-theme.mobile-device #project-chat-view .project-chat-input-wrap {
    background: #1c1c1e !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Сам инпут — крупнее и удобнее */
body.mobile-device #project-chat-view .project-chat-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 44px !important;
    box-sizing: border-box !important;
}

body.mobile-device #project-chat-view .project-chat-input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 16px !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 20px !important;
    background: var(--bg-color) !important;
    color: var(--text-main) !important;
    font-size: 15px !important;
    font-family: inherit !important;
    outline: none !important;
    box-sizing: border-box !important;
}

body.dark-theme.mobile-device #project-chat-view .project-chat-input {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device #project-chat-view .project-chat-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12) !important;
}

/* Кнопка "Отправить" — не сжимается */
body.mobile-device #project-chat-view .project-chat-send-btn {
    height: 40px !important;
    padding: 0 18px !important;
    border: none !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25) !important;
    -webkit-tap-highlight-color: transparent !important;
}

body.mobile-device #project-chat-view .project-chat-attach-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background: var(--bg-color) !important;
    color: var(--primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

body.dark-theme.mobile-device #project-chat-view .project-chat-attach-btn {
    background: #2c2c2e !important;
}

/* Заглушка «нет доступа» */
body.mobile-device #project-chat-view .project-chat-no-access {
    flex: 0 0 auto !important;
    width: 100% !important;
    order: 4 !important;
    padding: 20px;
    text-align: center;
}

/* ==================================================== */
/* ФИНАЛЬНЫЙ ФИКС: ОРГАНАЙЗЕР ПРОЕКТА НА МОБИЛКЕ        */
/* Жёстко перебиваем ПК-стили. Работает на любой ширине, */
/* главное — чтобы body имел класс mobile-device.       */
/* ==================================================== */

/* 1. Обёртка проекта — без фиксированной высоты */
body.mobile-device #organizer-project-view {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* 2. Сетка layout — одна колонка */
body.mobile-device .project-layout {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    height: auto !important;
    overflow: visible !important;
}

/* 3. Левое меню с плитками — скрыть полностью */
body.mobile-device .project-menu {
    display: none !important;
}

/* 4. Правая колонка — на всю ширину, без рамок */
body.mobile-device .project-content {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
}

/* 5. Пейны — переключаются как раньше */
body.mobile-device .project-content-pane {
    display: none;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

body.mobile-device .project-content-pane.active {
    display: block !important;
}

/* 6. Шапка чата — прижата, без рамок по бокам */
body.mobile-device .project-content-pane--chat .project-chat-header {
    display: flex !important;
    padding: 12px 14px !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    background: var(--card-bg) !important;
    min-height: 56px !important;
}

/* 7. Лента сообщений — на всю ширину */
body.mobile-device .project-content-pane--chat .project-chat-messages {
    padding: 16px 14px !important;
    border-radius: 0 !important;
    min-height: 240px !important;
}

/* 8. Поле ввода — прижать к низу, safe area */
body.mobile-device .project-content-pane--chat .project-chat-input-wrap {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0 !important;
}

/* 9. Кнопка ☰ — показать */
body.mobile-device .project-chat-menu-btn {
    display: inline-flex !important;
}

/* 10. Три иконки в шапке — уменьшить отступы */
body.mobile-device .project-chat-actions {
    gap: 4px !important;
}

body.mobile-device .project-chat-icon-btn {
    width: 34px !important;
    height: 34px !important;
    background: var(--bg-color) !important;
}

/* 11. Убираем рамку и тень с самого контейнера чата */
body.mobile-device .project-content-pane--chat {
    padding: 0 !important;
    border-radius: 0 !important;
}

/* ==================================================== */
/* ПАНЕЛИ ВКЛАДОК ПРОЕКТА                                */
/* ==================================================== */

body.mobile-device #organizer-project-view>.project-content-pane {
    display: none;
    width: 100%;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)) 14px;
    background: var(--bg-color);
    box-sizing: border-box;
    min-height: 0;
}

body.mobile-device #organizer-project-view>.project-content-pane.active {
    display: block;
    animation: paneIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paneIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.mobile-device #organizer-project-view>#project-chat-view.hidden-by-tab {
    display: none !important;
}

/* ==================================================== */
/* КНОПКА «К ЧАТУ» В ПАНЕЛЯХ ПРОЕКТА — APPLE STYLE     */
/* ==================================================== */

.project-pane-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px 0 12px;
    margin: 0 0 18px 0;
    border: none;
    border-radius: 100px;
    background: rgba(120, 120, 128, 0.12);
    color: var(--primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

body.dark-theme .project-pane-back-btn {
    background: rgba(120, 120, 128, 0.22);
}

.project-pane-back-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-pane-back-btn:hover {
    background: rgba(0, 113, 227, 0.12);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.15);
}

body.dark-theme .project-pane-back-btn:hover {
    background: rgba(0, 113, 227, 0.25);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25);
}

.project-pane-back-btn:hover svg {
    transform: translateX(-3px);
}

.project-pane-back-btn:active {
    transform: scale(0.96);
    background: rgba(0, 113, 227, 0.18);
    transition-duration: 0.1s;
}

body.dark-theme .project-pane-back-btn:active {
    background: rgba(0, 113, 227, 0.32);
}

/* Финальная полировка — убираем дефолтный фокус-обвод */
.project-pane-back-btn:focus {
    outline: none;
}

.project-pane-back-btn:focus-visible {
    box-shadow:
        0 0 0 2px var(--card-bg),
        0 0 0 5px rgba(0, 113, 227, 0.55);
}

/* ==================================================== */
/* ТРИ КНОПКИ ЧАТОВ СООБЩЕСТВА (Apple-style)            */
/* ==================================================== */

.community-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

.community-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.2s ease,
        box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.community-header-btn:active {
    transform: scale(0.94);
}

.community-header-btn.back {
    padding: 0 16px 0 12px;
    background: rgba(120, 120, 128, 0.14);
    color: var(--primary);
}

body.dark-theme .community-header-btn.back {
    background: rgba(255, 255, 255, 0.08);
    color: #4a9eff;
}

.community-header-btn.add {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 18px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.community-header-btn.add span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.community-header-btn.home {
    width: 40px;
    padding: 0;
    background: rgba(120, 120, 128, 0.14);
}

body.dark-theme .community-header-btn.home {
    background: rgba(255, 255, 255, 0.08);
}

body.community-mode .header-default-content .actions-segmented,
body.community-mode .header-default-content .header-project-title,
body.community-mode .header-default-content .logo-block-modern {
    display: none !important;
}

body.community-mode .community-header-actions {
    display: flex !important;
}

/* ==================================================== */
/* МОДАЛКА ПРОСТОГО ОБЪЯВЛЕНИЯ — КОМПАКТНАЯ             */
/* ==================================================== */
.simple-ad-modal {
    max-width: 440px !important;
    padding: 20px 18px 18px !important;
    border-radius: 20px !important;
}

.simple-ad-header {
    text-align: center;
    margin-bottom: 18px;
    padding-right: 32px;
    /* место под крестик */
}

.simple-ad-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
}

.simple-ad-modal .input-group {
    margin-bottom: 12px;
}

.simple-ad-modal label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.simple-ad-modal .form-control,
.simple-ad-modal .custom-select {
    height: 44px;
    font-size: 15px;
    border-radius: 12px;
    background: var(--bg-color);
    border: 1px solid var(--hairline);
}

.simple-ad-modal .form-control:focus,
.simple-ad-modal .custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.simple-ad-modal .property-photo-uploader {
    height: 64px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
}

.simple-ad-modal .property-photo-uploader-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.simple-ad-modal .property-photo-uploader-icon svg {
    width: 18px;
    height: 18px;
}

.simple-ad-modal .property-photo-uploader-text strong {
    font-size: 13px;
    font-weight: 600;
}

.simple-ad-modal .property-photo-uploader-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.simple-ad-modal .property-submit-btn {
    height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

/* ==================================================== */
/* ТРИ КНОПКИ ЧАТОВ СООБЩЕСТВА (Apple-style)            */
/* ==================================================== */

.community-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

.community-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.2s ease,
        box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.community-header-btn:active {
    transform: scale(0.94);
}

.community-header-btn.back {
    padding: 0 16px 0 12px;
    background: rgba(120, 120, 128, 0.14);
    color: var(--primary);
}

body.dark-theme .community-header-btn.back {
    background: rgba(255, 255, 255, 0.08);
    color: #4a9eff;
}

.community-header-btn.back svg {
    flex-shrink: 0;
}

.community-header-btn.add {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 18px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.community-header-btn.add span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.community-header-btn.add svg {
    flex-shrink: 0;
}

.community-header-btn.home {
    width: 40px;
    padding: 0;
    background: rgba(120, 120, 128, 0.14);
}

body.dark-theme .community-header-btn.home {
    background: rgba(255, 255, 255, 0.08);
}

.community-header-btn.home svg {
    display: block;
}

/* Когда активен community-режим — прячем стандартную панель */
body.community-mode .header-default-content .actions-segmented,
body.community-mode .header-default-content .header-project-title,
body.community-mode .header-default-content .logo-block-modern {
    display: none !important;
}

body.community-mode .community-header-actions {
    display: flex !important;
}

/* Модалка упрощённого объявления */
.simple-ad-modal {
    max-width: 480px !important;
    padding: 28px 24px 24px !important;
}

.simple-ad-modal .input-group {
    margin-bottom: 14px;
}

.simple-ad-modal label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

/* ==================================================== */
/* ЧАТЫ СООБЩЕСТВА — ЕДИНАЯ РАСКЛАДКА НА МОБИЛКЕ        */
/* market / properties / ratings                         */
/* ФИКС: работаем и когда есть mobile-device, и когда   */
/* есть только chat-community-active (страховка)         */
/* ==================================================== */

/* Случай 1: оба класса на месте (норма) */
body.mobile-device.chat-community-active #market.section-content.active,
body.mobile-device.chat-community-active #properties.section-content.active,
body.mobile-device.chat-community-active #ratings.section-content.active,
/* Случай 2: только chat-community-active (fallback) */
body.chat-community-active #market.section-content.active,
body.chat-community-active #properties.section-content.active,
body.chat-community-active #ratings.section-content.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Скрываем нижний док — по обоим классам */
body.mobile-device.chat-community-active .bottom-nav,
body.chat-community-active .bottom-nav {
    display: none !important;
}

body.mobile-device.chat-community-active .community-chat-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--card-bg) !important;
    overflow: hidden !important;
}

body.mobile-device.chat-community-active .community-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px !important;
    background: var(--bg-color) !important;
    order: 1 !important;
}

body.mobile-device.chat-community-active .community-chat-input-wrap {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    width: 100% !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
    order: 2 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 5 !important;
}

body.mobile-device.chat-community-active .community-chat-no-access {
    flex: 0 0 auto !important;
    order: 3 !important;
    padding: 20px !important;
    text-align: center !important;
    width: 100% !important;
}

body.mobile-device.chat-community-active .bottom-nav {
    display: none !important;
}

body.dark-theme.mobile-device.chat-community-active .community-chat-wrap {
    background: #1c1c1e !important;
}

body.dark-theme.mobile-device.chat-community-active .community-chat-messages {
    background: #000 !important;
}

body.dark-theme.mobile-device.chat-community-active .community-chat-input-wrap {
    background: #1c1c1e !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================================================== */
/* ЧАТЫ СООБЩЕСТВА — ФИНАЛЬНАЯ РАСКЛАДКА                */
/* market / properties / ratings на мобилке              */
/* ==================================================== */

/* 1. Секция чата = flex-колонка на всю высоту вьюпорта */
body.mobile-device.chat-community-active #market.section-content.active,
body.mobile-device.chat-community-active #properties.section-content.active,
body.mobile-device.chat-community-active #ratings.section-content.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* 2. Обёртка чата = flex-колонка на всю высоту секции */
body.mobile-device.chat-community-active #market .community-chat-wrap,
body.mobile-device.chat-community-active #properties .community-chat-wrap,
body.mobile-device.chat-community-active #ratings .community-chat-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--card-bg) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 3. Лента сообщений — растягивается и скроллится */
body.mobile-device.chat-community-active #market .community-chat-messages,
body.mobile-device.chat-community-active #properties .community-chat-messages,
body.mobile-device.chat-community-active #ratings .community-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px !important;
    background: var(--bg-color) !important;
    box-sizing: border-box !important;
    order: 1 !important;
}

/* 4. Поле ввода — прижато к низу, никогда не улетает */
body.mobile-device.chat-community-active #market .community-chat-input-wrap,
body.mobile-device.chat-community-active #properties .community-chat-input-wrap,
body.mobile-device.chat-community-active #ratings .community-chat-input-wrap {
    flex: 0 0 auto !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 5 !important;
    order: 2 !important;
}

/* 5. Заглушка «нет доступа» — на всю ширину */
body.mobile-device.chat-community-active #market .community-chat-no-access,
body.mobile-device.chat-community-active #properties .community-chat-no-access,
body.mobile-device.chat-community-active #ratings .community-chat-no-access {
    flex: 0 0 auto !important;
    order: 3 !important;
    width: 100% !important;
    padding: 20px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* 6. Прячем нижний док */
body.mobile-device.chat-community-active .bottom-nav {
    display: none !important;
}

/* 7. Обнуляем отступы у main-content, чтобы не сдвигал */
body.mobile-device.chat-community-active .main-content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* 8. Тёмная тема */
body.dark-theme.mobile-device.chat-community-active #market .community-chat-wrap,
body.dark-theme.mobile-device.chat-community-active #properties .community-chat-wrap,
body.dark-theme.mobile-device.chat-community-active #ratings .community-chat-wrap {
    background: #1c1c1e !important;
}

body.dark-theme.mobile-device.chat-community-active #market .community-chat-messages,
body.dark-theme.mobile-device.chat-community-active #properties .community-chat-messages,
body.dark-theme.mobile-device.chat-community-active #ratings .community-chat-messages {
    background: #000 !important;
}

body.dark-theme.mobile-device.chat-community-active #market .community-chat-input-wrap,
body.dark-theme.mobile-device.chat-community-active #properties .community-chat-input-wrap,
body.dark-theme.mobile-device.chat-community-active #ratings .community-chat-input-wrap {
    background: #1c1c1e !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==================================================== */
/* ЧИСТАЯ ШАПКА (только логотип)                        */
/* ==================================================== */

.header-top-clean {
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    gap: 12px !important;
}

.header-top-clean .logo-block-modern {
    flex-shrink: 0;
}

.header-top-clean .header-project-title {
    flex: 1 !important;
    display: block !important;
    text-align: center;
    padding-right: 48px;
    /* компенсация логотипа */
}

body:not(.organizer-detail-open):not(.calc-mode) .header-top-clean .header-project-title {
    display: none !important;
}

/* В режиме калькулятора — шапка тоже чистая */
body.calc-mode .header-top-clean .header-project-title {
    display: block !important;
}

/* ==================================================== */
/* НАСТРОЙКИ ПРИЛОЖЕНИЯ (в личном кабинете)             */
/* ==================================================== */

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
}

.setting-label svg {
    stroke: var(--text-muted);
    flex-shrink: 0;
}

.setting-arrow {
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 300;
    opacity: 0.5;
    flex-shrink: 0;
}

.setting-button {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--hairline);
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-button:last-child {
    border-bottom: none;
}

.setting-button:active {
    background: var(--bg-color);
}

/* Переключатель (тумблер) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(120, 120, 128, 0.16);
    border-radius: 30px;
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #34c759;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

body.dark-theme .toggle-slider {
    background-color: rgba(120, 120, 128, 0.3);
}

body.dark-theme .toggle-switch input:checked+.toggle-slider {
    background-color: #34c759;
}

/* Селект для языка */
.setting-select {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-align: right;
    padding-right: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.setting-select:focus {
    outline: none;
}

body.dark-theme .setting-select {
    color: #4a9eff;
}

/* ==================================================== */
/* ШАПКА — УПРАВЛЕНИЕ ВИДИМОСТЬЮ                        */
/* Показывается ТОЛЬКО в:                               */
/*  - калькуляторах (calc-mode)                         */
/*  - органайзере-проекте (organizer-detail-open)       */
/*  - чатах сообщества (community-mode)                 */
/* На главном экране и в остальных разделах — скрыта    */
/* ==================================================== */

/* Скрываем шапку по умолчанию */
body:not(.calc-mode):not(.organizer-detail-open):not(.community-mode) .mobile-header {
    display: none !important;
}

/* Показываем шапку в режимах: калькулятор, чат сообщества */
body.calc-mode .mobile-header,
body.community-mode .mobile-header {
    display: block !important;
}

/* В органайзере шапку ПОКАЗЫВАЕМ — в ней кнопки «Назад» и «Домой» */
body.organizer-detail-open .mobile-header {
    display: block !important;
}

/* --- Чистая шапка --- */
.header-top-clean {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    gap: 10px !important;
    min-height: 56px;
    box-sizing: border-box;
}

/* --- Режим "Назад + название" --- */
.header-back-mode {
    display: none;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

body.calc-mode .header-back-mode,
body.organizer-detail-open .header-back-mode {
    display: flex;
}

body.community-mode .header-back-mode {
    display: none !important;
}

.header-top-clean .logo-block-modern {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.header-top-clean .header-project-title {
    flex: 1;
    min-width: 0;
    display: block !important;
    text-align: center;
    overflow: hidden;
    padding-right: 40px;
}

.header-top-clean .header-project-title-text {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Три кнопки сообщества --- */
body.community-mode .community-header-actions {
    display: flex !important;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.community-header-btn.back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: rgba(120, 120, 128, 0.14);
    color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .community-header-btn.back {
    background: rgba(255, 255, 255, 0.08);
    color: #4a9eff;
}

.community-header-btn.back:active {
    transform: scale(0.92);
    background: rgba(0, 113, 227, 0.15);
}

.community-header-btn.add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.community-header-btn.add span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.community-header-btn.add svg {
    flex-shrink: 0;
}

.community-header-btn.add:active {
    transform: scale(0.96);
    box-shadow:
        0 3px 10px rgba(0, 113, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.community-header-btn.home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(120, 120, 128, 0.14);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

body.dark-theme .community-header-btn.home {
    background: rgba(255, 255, 255, 0.08);
}

.community-header-btn.home:active {
    transform: scale(0.92);
    background: rgba(0, 113, 227, 0.15);
}

.community-header-btn.home svg {
    display: block;
}

/* ==================================================== */
/* НОВАЯ МИНИМАЛЬНАЯ ШАПКА — ДВА КРУГЛЫХ КНОПКИ         */
/* Кнопки — по углам (абсолютное позиционирование),     */
/* заголовок проекта — по центру между ними.            */
/* ==================================================== */

.header-top-modern.header-top-clean {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: 52px;
    height: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    /* ← якорь для абсолютных кнопок */
}

.mob-round-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    position: absolute !important;
    /* ← фиксируем в углах */
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease;
}

.mob-round-btn:active {
    transform: translateY(-50%) scale(0.92) !important;
}

.mob-round-btn svg {
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

/* Назад — нейтральная, стеклянная — СЛЕВА */
.mob-back-btn {
    left: 12px !important;
    right: auto !important;
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-theme .mob-back-btn {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
    color: #4a9eff;
}

.mob-back-btn:active {
    background: rgba(0, 113, 227, 0.12);
}

/* Домой — синяя заливка — СПРАВА */
.mob-home-btn {
    right: 12px !important;
    left: auto !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.32);
}

.mob-home-btn:active {
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}

/* Название проекта — по центру между кнопками */
.header-top-modern.header-top-clean .header-project-title {
    display: none !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: center !important;
    overflow: hidden !important;
    padding: 0 60px !important;
    /* не заезжать под кнопки */
    box-sizing: border-box !important;
}

.header-top-modern.header-top-clean .header-project-title-text {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Скрываем старые обёртки (на случай, если где-то в HTML остались) */
.header-top-modern .header-back-mode,
.header-top-modern .community-header-actions {
    display: none !important;
}

/* --- Верхний header заметок (Назад + Заголовок + Добавить) --- */
body.mobile-device #organizer-notes-view .org-page-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
}

body.mobile-device #organizer-notes-view .org-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
    margin: 0;
}

body.mobile-device #organizer-notes-view .org-btn-primary {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

body.mobile-device #organizer-notes-view .organizer-back-btn {
    height: 40px;
    padding: 0 14px 0 10px;
    font-size: 13px;
    border-radius: 100px;
    flex-shrink: 0;
}

/* --- Кнопка «Сохранить» в редакторе заметки --- */
body.mobile-device .note-editor-save-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    margin-right: 6px;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.mobile-device .note-editor-save-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    display: block;
    pointer-events: none;
}

body.mobile-device .note-editor-save-btn:active {
    transform: scale(0.92);
    background: var(--primary);
    color: #fff;
}

body.dark-theme.mobile-device .note-editor-save-btn {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

/* ==================================================== */
/* ЗАГЛУШКА СПИСКА ПРОЕКТОВ                            */
/* ==================================================== */

#organizer-projects-list:empty::before {
    content: '';
    display: block;
    padding: 20px;
}

#organizer-projects-list .org-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    border: 2px dashed rgba(120, 120, 128, 0.25);
    border-radius: 20px;
    background: var(--card-bg);
    gap: 14px;
    min-height: 260px;
}

body.dark-theme #organizer-projects-list .org-empty {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.08);
}

#organizer-projects-list .org-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.5;
}

#organizer-projects-list .org-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
}

#organizer-projects-list .org-empty-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

#organizer-projects-list .org-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 6px;
    -webkit-tap-highlight-color: transparent;
}

#organizer-projects-list .org-btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.3);
}

#organizer-projects-list .org-btn-primary svg {
    stroke: #fff;
    flex-shrink: 0;
}

/* ==================================================== */
/* БЛОК СОВМЕСТИМОСТИ С DESKTOP-ORGANIZER.CSS           */
/* Эти стили уже есть в mobile-style.css выше,          */
/* но на случай если что-то не покрыто — повторяем.     */
/* ==================================================== */

/* Заголовок хаба */
.org-hub-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.org-hub-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text-main);
    margin: 0;
}

.org-hub-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* Кнопка создать */
.org-hub-create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.org-hub-create-btn:active {
    transform: scale(0.97);
    filter: brightness(0.94);
}

.org-hub-create-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Сетка 2 колонки (остаётся на случай, если где-то используется) */
.org-hub-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Карточка-плитка */
.org-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 16px;
    min-height: 130px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.org-hub-card:active {
    transform: scale(0.96);
}

.org-hub-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.org-hub-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}

.org-hub-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-top: 4px;
}

.org-hub-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.org-hub-card-count {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Список проектов */
.org-page-header {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
}

.org-page-title-block {
    flex: 1;
    padding: 0 12px;
}

.org-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
    margin: 0;
}

.org-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.28);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-btn-primary:active {
    transform: scale(0.97);
}

.org-projects-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

/* Карточка проекта */
.org-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.org-card:active {
    transform: scale(0.98);
}

.org-card-drag-handle {
    display: none !important;
}

.org-card-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 50;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
}

.org-card-delete:active {
    transform: rotate(90deg) scale(0.92);
    background: #ff3b30;
    color: #fff;
}

.org-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-right: 40px;
}

.org-card-number {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.org-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.org-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.org-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-card-address {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-card-address svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.75;
}

.org-card-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.org-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.org-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0071e3 0%, #0080ff 100%);
    border-radius: 3px;
}

.org-progress-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Пустое состояние */
.org-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
    border: 2px dashed var(--border);
    border-radius: 20px;
    background: var(--card-bg);
    gap: 12px;
    min-height: 260px;
}

.org-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.5;
}

.org-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
}

.org-empty-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* Экран проекта */
#organizer-project-view {
    display: block !important;
    height: auto !important;
    padding: 0 !important;
}

#project-chat-view {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 80px) !important;
    min-height: 320px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: var(--card-bg) !important;
    border: none !important;
}

.project-chat-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--card-bg) !important;
    flex-shrink: 0 !important;
    min-height: 56px !important;
}

.project-chat-title-block {
    flex: 1;
    min-width: 0;
}

.project-chat-title {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.project-chat-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.project-chat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.project-chat-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.project-chat-icon-btn:active {
    transform: scale(0.9);
    background: rgba(0, 113, 227, 0.15);
}

.project-chat-icon-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.project-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: var(--bg-color) !important;
}

.project-chat-msg {
    display: flex;
    width: 100%;
}

.project-chat-msg.mine {
    justify-content: flex-end;
}

.project-chat-msg.their {
    justify-content: flex-start;
}

.project-chat-msg-bubble {
    max-width: 78%;
    padding: 9px 14px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    word-wrap: break-word;
}

.project-chat-msg.mine .project-chat-msg-bubble {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.project-chat-msg.their .project-chat-msg-bubble {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-bottom-left-radius: 6px;
}

.project-chat-msg-author {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.project-chat-msg.mine .project-chat-msg-author {
    color: rgba(255, 255, 255, 0.85);
    text-align: right;
}

.project-chat-msg-text {
    font-size: 14.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.project-chat-msg-time {
    font-size: 10.5px;
    opacity: 0.7;
    margin-top: 3px;
    text-align: right;
}

.project-chat-input-wrap {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    width: 100% !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--border) !important;
    box-sizing: border-box !important;
}

.project-chat-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 44px !important;
}

.project-chat-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.project-chat-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.project-chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.project-chat-send-btn {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25);
}

.project-chat-no-access {
    flex: 0 0 auto;
    width: 100%;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Панели вкладок */
body.mobile-device .project-content-pane {
    display: none;
    width: 100%;
    padding: 16px 14px;
    background: var(--bg-color);
    box-sizing: border-box;
}

body.mobile-device .project-content-pane.active {
    display: block;
}

/* Кнопка назад к чату */
body.mobile-device .project-pane-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px 0 12px;
    margin: 0 0 18px 0;
    border: none;
    border-radius: 100px;
    background: rgba(120, 120, 128, 0.12);
    color: var(--primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

body.mobile-device .project-pane-back-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

body:not(.mobile-device) .project-pane-back-btn {
    display: none !important;
}

/* Полноэкранное меню проекта */
.project-menu-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
    will-change: transform;
}

.project-menu-screen.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.project-menu-screen-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    min-height: 56px;
    box-sizing: border-box;
}

.project-menu-screen-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 38px;
    padding: 0 14px 0 10px;
    border: none;
    border-radius: 100px;
    background: var(--bg-color);
    color: var(--primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.project-menu-screen-back:active {
    transform: scale(0.95);
}

.project-menu-screen-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 58px;
}

.project-menu-screen-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 14px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-content: start;
}

.project-menu-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 6px 14px;
    min-height: 100px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.project-menu-tile:active {
    transform: scale(0.95);
}

.project-menu-tile.active {
    background: rgba(0, 113, 227, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.project-menu-tile-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.project-menu-tile-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

.project-menu-tile-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: inherit;
}

.project-menu-tile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-menu-screen-footer {
    flex-shrink: 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}

.project-menu-screen-back-to-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border: 1.5px solid var(--primary);
    border-radius: 100px;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.project-menu-screen-back-to-list:active {
    transform: scale(0.97);
    background: var(--primary);
    color: #fff;
}

/* Заголовок проекта в шапке приложения */
.header-project-title {
    display: none;
    flex: 1;
    min-width: 0;
    text-align: center;
    overflow: hidden;
    padding-right: 40px;
}

.header-project-title-text {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.organizer-detail-open .header-project-title {
    display: block;
}

/* Дополнительные панели */
.organizer-detail-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.organizer-detail-number {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.organizer-detail-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.15;
}

.organizer-detail-address {
    font-size: 13px;
    color: var(--text-muted);
}

.organizer-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px 0 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.organizer-back-btn svg {
    display: block;
    flex-shrink: 0;
}

.organizer-back-btn:active {
    transform: scale(0.96);
}

@media (max-width: 380px) {
    .org-hub-title {
        font-size: 24px;
    }

    .org-hub-grid-2 {
        grid-template-columns: 1fr;
    }

    .org-hub-card {
        min-height: 110px;
    }

    #project-chat-view {
        height: calc(100vh - 70px) !important;
    }
}

/* ==================================================== */
/* ФИНАЛЬНАЯ ПРАВКА — отключаем отблеск ::before на мобилке */
/* во всех темах (светлой и тёмной), переносим в самый низ  */
/* файла, чтобы перебить все предыдущие правила.            */
/* ==================================================== */
body.mobile-device .profile-view-modal::before,
body.mobile-device.dark-theme .profile-view-modal::before,
body.dark-theme.mobile-device .profile-view-modal::before {
    display: none !important;
}

/* ==================================================== */
/* КНОПКА "РАЗМЕСТИТЬ ОБЪЯВЛЕНИЕ" В ШАПКЕ СООБЩЕСТВА    */
/* ==================================================== */

.community-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 100px;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.community-add-btn:active {
    transform: scale(0.96);
    box-shadow:
        0 3px 10px rgba(0, 113, 227, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.community-add-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* ==================================================== */
/* ОБЪЯВЛЕНИЕ В ЧАТЕ СООБЩЕСТВА — как обычное сообщение */
/* ==================================================== */

.community-chat-bubble.ad-card {
    max-width: 88% !important;
    padding: 12px 14px !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 18px !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow: hidden !important;
}

body.dark-theme .community-chat-bubble.ad-card {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

/* Мои объявления — синие */
.community-chat-msg.mine .community-chat-bubble.ad-card {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3) !important;
}

/* Заголовок — имя автора */
.ad-card-author {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.community-chat-msg.mine .ad-card-author {
    color: rgba(255, 255, 255, 0.9);
}

/* Тело — описание */
.ad-card-body {
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text-main);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.community-chat-msg.mine .ad-card-body {
    color: #ffffff;
}

/* Фото */
.ad-card-photo {
    width: 100%;
    max-height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(120, 120, 128, 0.08);
    margin-top: 2px;
}

.ad-card-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
}

/* Мета — дата и время */
.ad-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    opacity: 0.85;
    line-height: 1.2;
}

.community-chat-msg.mine .ad-card-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* Убираем старые неиспользуемые классы */
.ad-card-header,
.ad-card-badge,
.ad-card-title,
.ad-card-rows,
.ad-card-row,
.ad-card-row-icon,
.ad-card-row-value,
.ad-card-footer {
    display: none !important;
}

/* ==================================================== */
/* СМЕТА НА МОБИЛКЕ — КНОПКИ ШАРИНГА                    */
/* ==================================================== */

.estimate-mobile-item {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 14px 14px 14px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.dark-theme .estimate-mobile-item {
    background: rgba(28, 28, 30, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.estimate-mobile-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.estimate-mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.estimate-mobile-share,
.estimate-mobile-delete {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.estimate-mobile-share {
    background: rgba(0, 113, 227, 0.12);
    color: var(--primary);
}

body.dark-theme .estimate-mobile-share {
    background: rgba(0, 113, 227, 0.22);
    color: #4a9eff;
}

.estimate-mobile-share:active {
    transform: scale(0.9);
    background: var(--primary);
    color: #fff;
}

.estimate-mobile-delete {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

body.dark-theme .estimate-mobile-delete {
    background: rgba(255, 69, 58, 0.16);
    color: #ff453a;
}

.estimate-mobile-delete:active {
    background: #ff3b30;
    color: #ffffff;
    transform: rotate(90deg) scale(0.9);
}

/* Футер сметы с двумя кнопками */
.estimate-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.estimate-mobile-share-all {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.estimate-mobile-share-all:active {
    transform: scale(0.97);
    filter: brightness(0.94);
}

.estimate-mobile-clear-all {
    background: #dc3545 !important;
}

.estimate-mobile-clear-all:active {
    transform: scale(0.97);
    filter: brightness(0.94);
}

/* ==================================================== */
/* КАРТОЧКА СМЕТЫ В ЧАТЕ ПРОЕКТА — МОБИЛЬНАЯ            */
/* ==================================================== */

body.mobile-device .project-chat-estimate-card {
    max-width: 92% !important;
    padding: 14px 16px !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 18px !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-card {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35) !important;
}

body.dark-theme.mobile-device .project-chat-estimate-card {
    background: #2c2c2e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme.mobile-device .project-chat-msg.mine .project-chat-estimate-card {
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
}

body.mobile-device .project-chat-estimate-card:active {
    transform: scale(0.98);
}

/* Шапка карточки */
body.mobile-device .project-chat-estimate-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

body.mobile-device .project-chat-estimate-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

body.mobile-device .project-chat-estimate-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Список позиций */
body.mobile-device .project-chat-estimate-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-items {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme.mobile-device .project-chat-estimate-items {
    background: rgba(255, 255, 255, 0.06);
}

body.mobile-device .project-chat-estimate-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.35;
}

body.mobile-device .project-chat-estimate-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.92;
}

body.mobile-device .project-chat-estimate-item-qty {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
    opacity: 0.88;
    flex-shrink: 0;
}

body.mobile-device .project-chat-estimate-more {
    font-size: 11.5px;
    opacity: 0.7;
    text-align: center;
    padding-top: 4px;
    font-style: italic;
}

/* Итог */
body.mobile-device .project-chat-estimate-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-total {
    border-top-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-theme.mobile-device .project-chat-estimate-total {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.mobile-device .project-chat-estimate-total strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--primary);
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-total strong {
    color: #ffffff;
}

body.dark-theme.mobile-device .project-chat-estimate-total strong {
    color: #4a9eff;
}

body.dark-theme.mobile-device .project-chat-msg.mine .project-chat-estimate-total strong {
    color: #ffffff;
}

/* Мета: автор + дата */
body.mobile-device .project-chat-estimate-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    opacity: 0.7;
    line-height: 1.2;
}

body.mobile-device .project-chat-msg.mine .project-chat-estimate-meta {
    color: rgba(255, 255, 255, 0.85);
}

body.mobile-device .project-chat-msg.their .project-chat-estimate-meta {
    color: var(--text-muted);
}

/* ─── Карточка сметы в списке смет проекта (bottom sheet) ─── */
body.mobile-device .project-estimates-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================================================== */
/* ФИКС: ИКОНКИ В КНОПКАХ ОРГАНАЙЗЕРА (МОБИЛЬНАЯ)      */
/* Перебивает все предыдущие правила жёстко.             */
/* ==================================================== */

/* ─── 1. МАЛЕНЬКИЕ КНОПКИ-ПИЛЮЛИ (Завершить / Начать) ─── */
.org-mini-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    height: 34px !important;
    padding: 0 14px !important;

    border: 1px solid var(--hairline) !important;
    border-radius: 100px !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;

    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;

    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;

    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.org-mini-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

.org-mini-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.org-mini-btn.danger {
    color: #ff3b30 !important;
    border-color: rgba(255, 59, 48, 0.3) !important;
}

.org-mini-btn.danger:hover {
    background: rgba(255, 59, 48, 0.1) !important;
    border-color: #ff3b30 !important;
}

/* ─── 2. КРУГЛЫЕ КНОПКИ-ИКОНКИ (удалить закупку и т.п.) ─── */
.org-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;

    border-radius: 50% !important;
    border: none !important;
    padding: 0 !important;
    flex-shrink: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;

    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;

    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.org-icon-btn svg {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

.org-icon-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

.org-icon-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
}

.org-icon-btn.danger:hover {
    background: #ff3b30 !important;
    color: #fff !important;
    transform: rotate(90deg) scale(1.08) !important;
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35) !important;
}

body.dark-theme .org-icon-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #98989d !important;
}

body.dark-theme .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

body.dark-theme .org-mini-btn {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f5f5f7 !important;
}

body.dark-theme .org-mini-btn.danger {
    background: #1c1c1e !important;
    color: #ff453a !important;
    border-color: rgba(255, 69, 58, 0.3) !important;
}

/* ─── 3. БОЛЬШИЕ СИНИЕ КНОПКИ (Добавить этап / закупку / материал) ─── */
.org-btn-primary,
.organizer-project-card+.org-btn-primary,
.org-empty .org-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    height: 46px !important;
    padding: 0 22px !important;

    border: none !important;
    border-radius: 100px !important;
    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;

    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;

    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;

    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.org-btn-primary svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

.org-btn-primary:active {
    transform: scale(0.97) !important;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.3) !important;
}

/* ─── 4. Кнопки внутри панелей на мобилке — на всю ширину ─── */
body.mobile-device .project-content-pane .org-btn-primary,
body.mobile-device .org-tab-content .org-btn-primary,
body.mobile-device .project-content-pane .org-btn-secondary {
    width: auto !important;
    max-width: 100% !important;
}

/* ─── 5. КАРТОЧКА СТАДИИ (Завершить / Начать) ─── */
.org-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.org-stage-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 4px !important;
}

/* ─── 6. ТАБЛИЦА МАТЕРИАЛОВ — НЕ ВЫХОДИТ ЗА ЭКРАН ─── */
.org-table-wrap {
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.org-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 12.5px !important;
    min-width: 480px !important;
}

.org-table th {
    text-align: left !important;
    padding: 10px 12px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--hairline) !important;
    white-space: nowrap !important;
    background: var(--bg-color) !important;
}

.org-table td {
    padding: 10px 12px !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--hairline) !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
}

.org-table td.name {
    font-weight: 600 !important;
    white-space: normal !important;
    min-width: 120px !important;
}

.org-table td.num {
    text-align: right !important;
    font-family: 'SF Mono', 'Consolas', monospace !important;
    font-weight: 600 !important;
}

.org-table td.actions {
    text-align: right !important;
    white-space: nowrap !important;
}

.org-table td.actions .org-mini-btn {
    height: 28px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    margin-left: 4px !important;
}

body.dark-theme .org-table thead,
body.dark-theme .org-table th {
    background: #2c2c2e !important;
}

body.dark-theme .org-table-wrap {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ─── 7. КАРТОЧКА ЗАКУПКИ (удалить покупку) ─── */
.org-purchase {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.org-purchase-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.org-purchase-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    margin-bottom: 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.org-purchase-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 12px !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
}

.org-purchase-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

.org-purchase-price {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    white-space: nowrap !important;
}

.org-purchase-status {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
}

/* ─── 8. КАРТОЧКА МАТЕРИАЛА (табличная строка) ─── */
body.mobile-device .org-table td.actions .org-mini-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    border-color: transparent !important;
    margin-left: 4px !important;
}

body.mobile-device .org-table td.actions .org-mini-btn svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    min-height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
}

body.mobile-device .org-table td.actions .org-mini-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
}

body.dark-theme.mobile-device .org-table td.actions .org-mini-btn {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.dark-theme.mobile-device .org-table td.actions .org-mini-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — APPLE STYLE (ФИНАЛЬНАЯ ПОЛИРОВКА)      */
/* Перебивает всё, что было выше.                       */
/* ==================================================== */

/* ─────────────────────────────────────────────────── */
/* 1. ОБЩИЙ КОНТЕЙНЕР ПАНЕЛИ ПРОЕКТА                    */
/* ─────────────────────────────────────────────────── */

body.mobile-device .project-content-pane:not(.project-content-pane--chat) {
    padding: 16px 14px 24px 14px !important;
    background: var(--bg-color) !important;
    min-height: calc(100dvh - 160px) !important;
    box-sizing: border-box !important;
}

body.mobile-device .project-content-pane.active {
    display: block !important;
}

/* Кнопка «Назад в чат» — компактная пилюля */
body.mobile-device .project-pane-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;

    height: 36px !important;
    width: auto !important;
    max-width: max-content !important;
    padding: 0 14px 0 10px !important;
    margin: 0 0 18px 0 !important;

    border: none !important;
    border-radius: 100px !important;
    background: rgba(120, 120, 128, 0.12) !important;
    color: var(--primary) !important;

    font-family: inherit !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;

    -webkit-tap-highlight-color: transparent !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

body.mobile-device .project-pane-back-btn svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    min-height: 13px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
}

body.mobile-device .project-pane-back-btn:active {
    transform: scale(0.96) !important;
    background: rgba(0, 113, 227, 0.15) !important;
}

body.dark-theme.mobile-device .project-pane-back-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #4a9eff !important;
}

/* ─────────────────────────────────────────────────── */
/* 2. КНОПКИ «ДОБАВИТЬ ...» — ЗЕЛЁНЫЕ ПИЛЮЛИ           */
/* ─────────────────────────────────────────────────── */

body.mobile-device .project-content-pane .org-btn-primary,
body.mobile-device .org-tab-content .org-btn-primary,
body.mobile-device .project-content-pane>div>.org-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    height: 48px !important;
    padding: 0 22px !important;
    margin: 0 0 18px 0 !important;

    border: none !important;
    border-radius: 14px !important;

    background: linear-gradient(135deg, #0071e3 0%, #0080ff 100%) !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;

    cursor: pointer !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;

    box-shadow:
        0 6px 18px rgba(0, 113, 227, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;

    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.mobile-device .project-content-pane .org-btn-primary svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.4 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

body.mobile-device .project-content-pane .org-btn-primary:active {
    transform: scale(0.97) !important;
    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.28) !important;
}

/* Внутри flex-обёртки кнопка не растягивается */
body.mobile-device .project-content-pane>div[style*="display: flex"] {
    margin-bottom: 18px !important;
}

body.mobile-device .project-content-pane>div[style*="display: flex"]>.org-btn-primary {
    margin-bottom: 0 !important;
    width: auto !important;
    min-width: 180px !important;
}

/* ─────────────────────────────────────────────────── */
/* 3. КАРТОЧКА СТАДИИ (Этапы)                           */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-stages-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.mobile-device .org-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;

    padding: 16px 18px !important;
    margin: 0 !important;

    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-left: 3px solid #86868b !important;
    border-radius: 16px !important;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 14px rgba(0, 0, 0, 0.03) !important;

    box-sizing: border-box !important;
    width: 100% !important;
}

body.dark-theme.mobile-device .org-stage {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

body.mobile-device .org-stage.status-planned {
    border-left-color: #86868b !important;
}

body.mobile-device .org-stage.status-active {
    border-left-color: var(--primary) !important;
}

body.mobile-device .org-stage.status-done {
    border-left-color: #34c759 !important;
    opacity: 0.88 !important;
}

/* Шапка карточки стадии */
body.mobile-device .org-stage-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
}

body.mobile-device .org-stage-title {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    flex: 1 !important;
    min-width: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

body.mobile-device .org-stage-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 4px 10px !important;
    border-radius: 100px !important;

    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

body.mobile-device .org-stage-desc {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
}

body.mobile-device .org-stage-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
}

body.mobile-device .org-stage-meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

body.mobile-device .org-stage-meta svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
    opacity: 0.7 !important;
}

/* Кнопки действий стадии — РЯДОМ, в строку */
body.mobile-device .org-stage-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 4px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(120, 120, 128, 0.12) !important;
}

body.dark-theme.mobile-device .org-stage-actions {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-mini-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;

    height: 36px !important;
    padding: 0 14px !important;

    border: 1px solid var(--hairline) !important;
    border-radius: 100px !important;
    background: var(--card-bg) !important;
    color: var(--text-main) !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;

    -webkit-tap-highlight-color: transparent !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

body.mobile-device .org-mini-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

body.mobile-device .org-mini-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

body.mobile-device .org-mini-btn.danger {
    color: #ff3b30 !important;
    border-color: rgba(255, 59, 48, 0.3) !important;
    background: rgba(255, 59, 48, 0.04) !important;
    padding: 0 !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
}

body.mobile-device .org-mini-btn.danger svg {
    width: 14px !important;
    height: 14px !important;
}

body.dark-theme.mobile-device .org-mini-btn {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f5f5f7 !important;
}

body.dark-theme.mobile-device .org-mini-btn.danger {
    color: #ff453a !important;
    border-color: rgba(255, 69, 58, 0.3) !important;
    background: rgba(255, 69, 58, 0.08) !important;
}

/* ─────────────────────────────────────────────────── */
/* 4. ТАБЛИЦА МАТЕРИАЛОВ — APPLE LIST                  */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-table-wrap {
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.dark-theme.mobile-device .org-table-wrap {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    font-size: 13px !important;
}

body.mobile-device .org-table thead {
    background: transparent !important;
}

body.mobile-device .org-table th {
    text-align: left !important;
    padding: 12px 14px 8px 14px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--text-muted) !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: transparent !important;
    white-space: nowrap !important;
    vertical-align: bottom !important;
}

body.mobile-device .org-table td {
    padding: 14px !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--hairline) !important;
    font-variant-numeric: tabular-nums !important;
    font-size: 14px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

body.dark-theme.mobile-device .org-table th,
body.dark-theme.mobile-device .org-table td {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device .org-table tbody tr:last-child td {
    border-bottom: none !important;
}

body.mobile-device .org-table tbody tr:active {
    background: rgba(0, 113, 227, 0.06) !important;
}

body.mobile-device .org-table td.name {
    font-weight: 600 !important;
    font-size: 14.5px !important;
    letter-spacing: -0.01em !important;
    white-space: normal !important;
    min-width: 100px !important;
    max-width: 140px !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

body.mobile-device .org-table td.num {
    text-align: right !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}

body.mobile-device .org-table td.actions {
    text-align: right !important;
    padding: 8px 10px !important;
    white-space: nowrap !important;
    width: 1% !important;
}

body.mobile-device .org-table td.actions .org-mini-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    margin-left: 6px !important;
    border-radius: 50% !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    border-color: transparent !important;
}

body.mobile-device .org-table td.actions .org-mini-btn svg {
    width: 14px !important;
    height: 14px !important;
}

body.mobile-device .org-table td.actions .org-mini-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
    border-color: transparent !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
}

body.dark-theme.mobile-device .org-table td.actions .org-mini-btn {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.dark-theme.mobile-device .org-table td.actions .org-mini-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* ─────────────────────────────────────────────────── */
/* 5. КАРТОЧКА ЗАКУПКИ                                  */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-purchases-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

body.mobile-device .org-purchase {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    align-items: center !important;
    gap: 12px !important;

    padding: 16px 18px !important;
    margin: 0 !important;

    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 14px rgba(0, 0, 0, 0.03) !important;

    box-sizing: border-box !important;
    width: 100% !important;
}

body.dark-theme.mobile-device .org-purchase {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

body.mobile-device .org-purchase-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

body.mobile-device .org-purchase-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.015em !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.mobile-device .org-purchase-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 12px !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    line-height: 1.3 !important;
}

body.mobile-device .org-purchase-meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

body.mobile-device .org-purchase-meta svg {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.7 !important;
}

body.mobile-device .org-purchase-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

body.mobile-device .org-purchase-price {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

body.mobile-device .org-purchase-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 9px !important;
    border-radius: 100px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

body.mobile-device .org-purchase .org-icon-btn.danger {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
    border: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

body.mobile-device .org-purchase .org-icon-btn.danger svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
}

body.mobile-device .org-purchase .org-icon-btn.danger:active {
    transform: rotate(90deg) scale(0.92) !important;
    background: #ff3b30 !important;
    color: #fff !important;
}

body.dark-theme.mobile-device .org-purchase .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* Итоговая строка закупок */
body.mobile-device .org-purchases-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 18px !important;
    margin-top: 12px !important;
    background: rgba(0, 113, 227, 0.08) !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.01em !important;
}

body.dark-theme.mobile-device .org-purchases-total {
    background: rgba(0, 113, 227, 0.18) !important;
}

body.mobile-device .org-purchases-total-label {
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

body.mobile-device .org-purchases-total-value {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    font-variant-numeric: tabular-nums !important;
}

/* ─────────────────────────────────────────────────── */
/* 6. ПАНЕЛЬ СМЕТЫ ПРОЕКТА                              */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-estimate-share-all {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    height: 48px !important;
    padding: 0 22px !important;
    margin: 0 0 18px 0 !important;

    border: 1.5px solid var(--primary) !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: var(--primary) !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    cursor: pointer !important;
    box-sizing: border-box !important;

    -webkit-tap-highlight-color: transparent !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

body.mobile-device .org-estimate-share-all svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
}

body.mobile-device .org-estimate-share-all:active {
    background: rgba(0, 113, 227, 0.1) !important;
    transform: scale(0.98) !important;
}

/* Карточка сметы */
body.mobile-device .org-estimate-entry {
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    margin-bottom: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.dark-theme.mobile-device .org-estimate-entry {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

body.mobile-device .org-estimate-entry-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    background: rgba(0, 113, 227, 0.05) !important;
    border-bottom: 1px solid var(--hairline) !important;
}

body.dark-theme.mobile-device .org-estimate-entry-head {
    background: rgba(0, 113, 227, 0.12) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device .org-estimate-entry-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.015em !important;
    line-height: 1.25 !important;
}

body.mobile-device .org-estimate-entry-meta {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    margin-top: 2px !important;
}

body.mobile-device .org-estimate-entry-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

body.mobile-device .org-estimate-entry-actions .org-icon-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

body.mobile-device .org-estimate-entry-actions .org-icon-btn svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
}

body.mobile-device .org-estimate-entry-actions .org-icon-btn.danger {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #ff3b30 !important;
}

body.mobile-device .org-estimate-entry-actions .org-icon-btn:active {
    transform: scale(0.9) !important;
}

body.mobile-device .org-estimate-entry-actions .org-icon-btn.danger:active {
    transform: rotate(90deg) scale(0.9) !important;
    background: #ff3b30 !important;
    color: #fff !important;
}

body.dark-theme.mobile-device .org-estimate-entry-actions .org-icon-btn {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.dark-theme.mobile-device .org-estimate-entry-actions .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* Строки-позиции сметы */
body.mobile-device .org-estimate-items {
    display: flex !important;
    flex-direction: column !important;
    padding: 4px 16px 12px 16px !important;
    gap: 0 !important;
}

body.mobile-device .org-estimate-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    gap: 12px !important;
    padding: 9px 0 !important;
    border-bottom: 1px dashed rgba(120, 120, 128, 0.15) !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
}

body.dark-theme.mobile-device .org-estimate-item {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-estimate-item:last-child {
    border-bottom: none !important;
}

body.mobile-device .org-estimate-item-name {
    color: var(--text-main) !important;
    font-weight: 500 !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.mobile-device .org-estimate-item-qty {
    color: var(--text-muted) !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
    font-variant-numeric: tabular-nums !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Итоговая строка сметы */
body.mobile-device .org-estimate-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    border-top: 1px solid var(--hairline) !important;
    background: rgba(0, 113, 227, 0.05) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: var(--text-muted) !important;
}

body.dark-theme.mobile-device .org-estimate-total {
    background: rgba(0, 113, 227, 0.12) !important;
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}

body.mobile-device .org-estimate-total strong {
    color: var(--primary) !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
    font-variant-numeric: tabular-nums !important;
}

/* ─────────────────────────────────────────────────── */
/* 7. БЛОК «ОЧИСТКА СМЕТЫ»                              */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-section-danger {
    background: rgba(255, 59, 48, 0.04) !important;
    border: 1px solid rgba(255, 59, 48, 0.2) !important;
    border-radius: 16px !important;
    padding: 18px !important;
    margin-top: 18px !important;
    box-sizing: border-box !important;
}

body.dark-theme.mobile-device .org-section-danger {
    background: rgba(255, 59, 48, 0.08) !important;
    border-color: rgba(255, 69, 58, 0.25) !important;
}

body.mobile-device .org-section-danger .org-section-title {
    color: #ff3b30 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 8px 0 !important;
}

body.mobile-device .org-btn-danger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    width: 100% !important;
    height: 48px !important;
    padding: 0 22px !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 14px !important;

    background: linear-gradient(135deg, #ff3b30 0%, #ff5c52 100%) !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;

    cursor: pointer !important;
    box-sizing: border-box !important;

    box-shadow:
        0 6px 18px rgba(255, 59, 48, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;

    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.mobile-device .org-btn-danger svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    pointer-events: none !important;
}

body.mobile-device .org-btn-danger:active {
    transform: scale(0.97) !important;
    box-shadow: 0 3px 10px rgba(255, 59, 48, 0.28) !important;
}

/* ─────────────────────────────────────────────────── */
/* 8. КАРТОЧКА УЧАСТНИКА КОМАНДЫ                        */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-team-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

body.mobile-device .org-member {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;

    padding: 14px 16px !important;
    margin: 0 !important;

    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

body.dark-theme.mobile-device .org-member {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-member-avatar {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    border-radius: 50% !important;

    background: linear-gradient(135deg, #0071e3 0%, #5a9bff 100%) !important;
    color: #ffffff !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 17px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    flex-shrink: 0 !important;

    box-shadow: 0 3px 10px rgba(0, 113, 227, 0.25) !important;
}

body.mobile-device .org-member-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

body.mobile-device .org-member-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

body.mobile-device .org-member-role {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 10px !important;
    border-radius: 100px !important;
    background: rgba(0, 113, 227, 0.1) !important;
    color: var(--primary) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    align-self: flex-start !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.dark-theme.mobile-device .org-member-role {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.mobile-device .org-member-phone {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    margin-top: 2px !important;
}

body.mobile-device .org-member-phone svg {
    width: 11px !important;
    height: 11px !important;
    opacity: 0.7 !important;
}

body.mobile-device .org-member-you {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    border-radius: 100px !important;
    background: rgba(0, 113, 227, 0.12) !important;
    color: var(--primary) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
}

body.dark-theme.mobile-device .org-member-you {
    background: rgba(0, 113, 227, 0.22) !important;
    color: #4a9eff !important;
}

body.mobile-device .org-member .org-icon-btn.danger {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 59, 48, 0.1) !important;
    color: #ff3b30 !important;
    border: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}

body.mobile-device .org-member .org-icon-btn.danger svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
}

body.mobile-device .org-member .org-icon-btn.danger:active {
    transform: rotate(90deg) scale(0.9) !important;
    background: #ff3b30 !important;
    color: #fff !important;
}

body.dark-theme.mobile-device .org-member .org-icon-btn.danger {
    background: rgba(255, 69, 58, 0.16) !important;
    color: #ff453a !important;
}

/* ─────────────────────────────────────────────────── */
/* 9. ПУСТЫЕ СОСТОЯНИЯ — КРАСИВЫЕ                       */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    padding: 56px 24px !important;
    gap: 14px !important;

    border: 2px dashed rgba(120, 120, 128, 0.2) !important;
    border-radius: 20px !important;
    background: var(--card-bg) !important;

    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 260px !important;
}

body.dark-theme.mobile-device .org-empty {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.mobile-device .org-empty-icon {
    width: 64px !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted) !important;
    opacity: 0.4 !important;
    margin-bottom: 4px !important;
}

body.mobile-device .org-empty-icon svg {
    width: 48px !important;
    height: 48px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.5 !important;
}

body.mobile-device .org-empty-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    max-width: 280px !important;
}

body.mobile-device .org-empty-desc {
    font-size: 13.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    max-width: 300px !important;
}

/* ─────────────────────────────────────────────────── */
/* 10. КАРТОЧКА ФАЙЛА                                   */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-files-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
}

body.mobile-device .org-file {
    position: relative !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

body.dark-theme.mobile-device .org-file {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-file img {
    width: 100% !important;
    height: 110px !important;
    object-fit: cover !important;
    display: block !important;
    background: var(--bg-color) !important;
}

body.mobile-device .org-file-icon {
    height: 110px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-color) !important;
    color: var(--text-muted) !important;
    opacity: 0.6 !important;
}

body.mobile-device .org-file-name {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.mobile-device .org-file-delete {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 11px !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

body.mobile-device .org-file-delete svg {
    width: 11px !important;
    height: 11px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.5 !important;
}

body.mobile-device .org-file-delete:active {
    background: #ff3b30 !important;
    transform: rotate(90deg) scale(0.9) !important;
}

/* ─────────────────────────────────────────────────── */
/* 11. БЮДЖЕТ — КАРТОЧКИ                                */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-budget-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 12px !important;
}

body.mobile-device .org-budget-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;

    padding: 16px 18px !important;
    margin: 0 !important;

    background: var(--card-bg) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
}

body.dark-theme.mobile-device .org-budget-card {
    background: #1c1c1e !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.mobile-device .org-budget-label {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.2 !important;
}

body.mobile-device .org-budget-value {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    font-variant-numeric: tabular-nums !important;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace !important;
}

/* ─────────────────────────────────────────────────── */
/* 12. ФИКС: убираем лишнюю высоту у контейнера проекта */
/* ─────────────────────────────────────────────────── */

body.mobile-device #organizer-project-view {
    background: var(--bg-color) !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
}

body.dark-theme.mobile-device #organizer-project-view {
    background: #000000 !important;
}

/* ─────────────────────────────────────────────────── */
/* 13. ФИКС: заголовок «Запланировано» — не растягивать */
/* ─────────────────────────────────────────────────── */

body.mobile-device .org-stage .org-stage-status {
    max-width: max-content !important;
    width: auto !important;
}

/* ─────────────────────────────────────────────────── */
/* 14. ФИКС: min-height для панели, чтобы не было пустоты */
/* ─────────────────────────────────────────────────── */

body.mobile-device .project-content-pane.active {
    min-height: auto !important;
    padding-bottom: 40px !important;
}

/* ==================================================== */
/* ОРГАНАЙЗЕР — ПРОЕКТ ОТКРЫТ: скрываем нижний док       */
/* ==================================================== */

/* Прячем нижний док, когда открыт проект в органайзере */
body.organizer-detail-open .bottom-nav {
    display: none !important;
}

body.mobile-device:not(.organizer-detail-open) #organizer-project-view {
    display: none !important;
}

/* Также убираем нижний отступ у main-content — он больше не нужен */
body.organizer-detail-open .main-content {
    padding-bottom: 0 !important;
}

/* На всякий случай — скрываем любой FAB */
body.organizer-detail-open .chat-fab {
    display: none !important;
}

/* ==========================================================
   ФИКС: ЧАТ ПРОЕКТА В ОРГАНАЙЗЕРЕ НА МОБИЛКЕ
   Поле ввода должно стоять на месте дока, док — скрыт.
   ========================================================== */

/* 1. Прячем нижний док, когда открыт проект */
body.organizer-detail-open .bottom-nav {
    display: none !important;
}

/* 2. Убираем отступ у main-content, чтобы ничего не сдвигало */
body.organizer-detail-open .main-content {
    padding-bottom: 0 !important;
}

/* 3. Корневой контейнер чата — жёсткая flex-колонка на всю высоту */
body.mobile-device.organizer-detail-open #project-chat-view,
body.mobile-device.organizer-detail-open #organizer-project-view #project-chat-view {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    /* страховка для старых браузеров */
    height: 100dvh !important;
    /* современные мобильные браузеры */
    max-height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--card-bg) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* 4. Шапка чата — фиксированная высота, не сжимается */
body.mobile-device.organizer-detail-open #project-chat-view .project-chat-header {
    flex: 0 0 auto !important;
    order: 1 !important;
}

/* 5. Лента сообщений — занимает ВСЁ свободное место */
body.mobile-device.organizer-detail-open #project-chat-view .project-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    order: 2 !important;
}

/* 6. Поле ввода — прижато к низу, всегда видно */
body.mobile-device.organizer-detail-open #project-chat-view .project-chat-input-wrap {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    order: 3 !important;
    width: 100% !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px !important;
    background: var(--card-bg) !important;
    border-top: 1px solid var(--hairline) !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

body.dark-theme.mobile-device.organizer-detail-open #project-chat-view .project-chat-input-wrap {
    background: #1c1c1e !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* 7. Заглушка «нет доступа» — на всю ширину */
body.mobile-device.organizer-detail-open #project-chat-view .project-chat-no-access {
    flex: 0 0 auto !important;
    order: 4 !important;
    width: 100% !important;
}

/* ==========================================================
   ФИКС: при открытом проекте в органайзере нижний док скрыт
   ========================================================== */
body.organizer-detail-open .bottom-nav {
    display: none !important;
}
.theme-slider {
    transition:
        left 0.46s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.36s ease,
        box-shadow 0.36s ease;
}
.theme-icon {
    font-family: Arial, sans-serif;
    transform: translateY(-0.5px);
}
.toggle-slider,
.toggle-slider:before {
    transition-duration: 0.46s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
    .theme-slider,
    .toggle-slider,
    .toggle-slider:before {
        transition-duration: 1ms;
    }
}