    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

    .t-tildalаbеl {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    html {
        height: 100%;
    }

    body,
    html {
        width: 100%;
        margin: 0;
        padding: 0;
        font-family: 'Roboto', sans-serif !important;
        background-color: #F7F9F8;
        transition: background-color 0.3s ease;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .t-records,
    .t-records_animated,
    .t-records_visible {
        opacity: 1 !important;
        flex: 1;
        transition: background-color 0.3s ease;
    }

    /* Background colors for .t-records based on active tab */
    .t-records.tab-ads {
        background-color: #E0F2F1;
    }

    .t-records.tab-parts {
        background-color: #FFF8E1;
    }

    .t-records.tab-manufacturers {
        background-color: #E3F2FD;
    }

    .t-records.tab-tender {
        background-color: #F3E5F5;
    }

    .t-records.tab-admin {
        background-color: #F7F9F8;
    }

    * {
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }

    input[type=number]::-webkit-inner-spin-button,
    input[type=number]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type=number] {
        -moz-appearance: textfield;
    }

    .price-input-wrapper {
        position: relative;
        width: 100%;
    }

    .price-input-wrapper input {
        width: 100%;
    }

    .fade-in {
        animation: fadeIn 0.6s ease-in-out forwards;
        opacity: 0;
    }

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

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

    .tm-wrapper {
        max-width: 1440px;
        margin: 40px auto;
        background: #fff;
        padding: 14px;
        border-radius: 16px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
        color: #222;
        width: 95%;
        min-height: 80vh;
    }

    /* Header layout: top row = title + login; bottom row = create/profile */
    #main-header {}

    #main-header .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    #main-header .header-title {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 8px;
    }

    #main-header .header-title h2 {
        margin: 0;
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #main-header .header-login .btn {
        height: 34px;
        padding: 0 12px;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #btn-login {
        margin-right: -1px;
    }

    #main-header .header-bottom {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 8px;
    }

    #main-header .header-bottom .btn {
        height: 34px;
        padding: 0 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* On very small screens show secondary buttons stacked under the title */
    @media (max-width: 420px) {

        /* Keep title and login on one line but reduce title size */
        #main-header .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: nowrap;
        }

        #main-header .header-title h2 {
            font-size: 18px;
        }

        /* Show secondary buttons below as a single non-wrapping row */
        #main-header .header-bottom {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
            justify-content: flex-start;
            flex-wrap: nowrap;
        }

        #main-header .header-bottom .btn {
            width: auto;
            padding: 6px 10px;
            height: 34px;
            box-sizing: border-box;
            white-space: nowrap;
        }

        #btn-create-ad:not(.hidden),
        #btn-profile:not(.hidden) {
            display: inline-flex !important;
        }
    }

    .hidden {
        display: none !important;
    }

    .btn {
        border: none;
        padding: 0 20px;
        height: 40px;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        transition: 0.2s;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .btn-black {
        background: #222;
        color: #fff;
    }

    .btn-black:hover {
        background: #000;
    }

    .btn-purple {
        background: #222;
        color: #fff;
    }

    .btn-purple:hover {
        background: #000;
    }

    .btn-blue {
        background: #0066cc;
        color: #fff;
    }

    .btn-blue:hover {
        background: #0052a3;
    }

    .btn-yellow {
        background: #FFC107;
        color: #fff;
    }

    .btn-yellow:hover {
        background: #FFA000;
    }

    .btn-green {
        background: #26A69A;
        color: #fff;
    }

    .btn-green:hover {
        background: #00897B;
    }

    /* Transparent button for "Подать объявление" */
    #btn-create-ad {
        background: transparent !important;
        color: #222 !important;
        border: 1px solid #ddd !important;
    }

    #btn-create-ad:hover {
        background: #f5f5f5 !important;
        border-color: #ccc !important;
    }

    /* Make profile button black specifically */
    #btn-profile {
        background: #222 !important;
        color: #fff !important;
        border-color: transparent !important;
    }

    #btn-profile:hover {
        background: #000 !important;
    }

    .btn-red {
        background: #222;
        color: #fff;
    }

    .btn-full {
        width: 100%;
        margin-top: 10px;
        display: block;
    }

    .action-buttons-group {
        margin-top: 30px;
        display: none;
    }

    .action-buttons-group.visible {
        display: flex !important;
        gap: 15px;
    }

    .share-btn-wrapper {
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .share-btn-wrapper:hover {
        background: #f0f0f0;
    }

    .share-icon {
        width: 24px;
        height: 24px;
        stroke: #222;
        stroke-width: 2;
        fill: none;
    }

    .modal-favorite {
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .modal-favorite svg {
        width: 24px;
        height: 24px;
    }

    .header-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-title {
        margin-right: 20px;
    }

    @media (max-width: 450px) {
        .tm-wrapper {
            max-width: 1440px;
            margin: 40px auto;
            background: #fff;
            padding: 20px;
            border-radius: 16px;
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
            color: #222;
            width: 95%;
            min-height: 80vh;
        }

        .header-title h2 {
            font-size: 18px !important;
        }

        .header-actions {
            width: 100%;
            justify-content: flex-end;
            white-space: nowrap;
        }

        .header-title {
            margin-right: 20px;
        }

        .header-actions .btn {
            padding: 0 12px;
            font-size: 12px;
            height: 36px;
            line-height: 36px;
            flex: 0 0 auto;
            min-width: 0;
            max-width: none;
        }

        @media (max-width: 480px) {
            .header-actions .btn {
                padding: 0 8px;
                font-size: 12px;
                height: 34px;
                line-height: 34px;
            }

            .header-title h2 {
                font-size: 16px;
            }
        }

        .tab-link {
            padding: 8px 12px;
            font-size: 14px;
            background: #f0f0f0;
            border-radius: 8px;
            color: #222;
            margin-right: 6px;
            cursor: pointer;
            border: none;
            transition: all 0.3s ease;
        }

        .tab-link:active {
            animation: heartBeat 0.3s ease;
        }

        /* Solid background colors for each tab - no effects */
.tab-link[onclick*="ads"] {
    background-color: rgba(181, 222, 218, 0.5) !important;
    color: #1b8a70;
}

.tab-link[onclick*="parts"] {
    background-color: rgba(255, 213, 79, 0.5) !important;
    color: #F57C00;
}

.tab-link[onclick*="manufacturers"] {
    background-color: rgba(144, 202, 249, 0.5) !important;
    color: #1565C0;
}

#tender-tab-link {
    background-color: #9C27B0 !important;
    color: #fff;
}

/* No active state changes - colors remain the same */
.tab-link[onclick*="ads"].active {
    background-color: #C8E6E2 !important;
    color: #1b8a70;
}

.tab-link[onclick*="parts"].active {
    background-color: #FFE082 !important;
    color: #F57C00;
}

.tab-link[onclick*="manufacturers"].active {
    background-color: #BBDEFB !important;
    color: #1565C0;
}

#tender-tab-link.active {
    background-color: #9C27B0 !important;
    color: #fff;
}



        .manufacturer-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 10px;
        }

        .manufacturer-card {
            padding: 12px;
        }

        .manufacturer-name {
            font-size: 16px;
        }

        .manufacturer-section-title {
            font-size: 18px;
        }

        .manufacturer-grid-inner {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }

    .form-input,
    .form-select,
    .filter-input {
        width: 100%;
        height: 42px;
        padding: 0 12px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        font-size: 15px;
        background: #f9f9f9;
        margin-bottom: 15px;
        line-height: 40px;
        appearance: none;
        -webkit-appearance: none;
    }

    @media (max-width: 768px) {

        .form-input,
        .search-container {
            max-width: 100%;
        }
        .search-container .filter-input {
            width: 100%;
            padding: 0 100px 0 14px;
        }
        .clear-filter-btn {
            font-size: 12px;
            padding: 5px 10px;
            right: 6px;
        }
    }

    @media (max-width: 480px) {
        #div-brand-model > div,
        #div-main-specs,
        #div-color-docs {
            grid-template-columns: 1fr !important;
        }
    }

    .search-container {
        position: relative;
        width: 100%;
        max-width: 500px;
    }

    .search-container .filter-input {
        width: 100%;
        height: 46px;
        margin-bottom: 0;
        padding: 0 110px 0 14px;
        border: 1px solid #e2d8ee;
        border-radius: 12px;
        background: linear-gradient(180deg, #ffffff 0%, #fbf9fe 100%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        background-size: 18px 18px;
        box-shadow: 0 4px 14px rgba(80, 41, 116, 0.08);
        transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
        box-sizing: border-box;
        flex-shrink: 0;
        cursor: text;
    }

    .search-container .filter-input::placeholder {
        color: #8f8f9a;
    }

    .search-container .filter-input:focus {
        outline: none;
        background: linear-gradient(180deg, #fff 0%, #fbf9fe 100%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        background-size: 18px 18px;
    }
    
    .clear-filter-btn {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        white-space: nowrap;
        padding: 6px 12px;
        background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        height: auto;
        display: none;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
        letter-spacing: 0.5px;
        z-index: 10;
        pointer-events: none;
    }
    
    .clear-filter-btn[style*="display: flex"] {
        pointer-events: auto;
    }
    
    .clear-filter-btn:hover {
        background: linear-gradient(135deg, #ff5252 0%, #ff3b3b 100%);
    }
    
    .clear-filter-btn:active {
        box-shadow: 0 1px 4px rgba(255, 107, 107, 0.3);
    }

    /* Search input focus colors for each tab */
    #tab-content-ads .filter-input:focus {
        border-color: #26A69A;
        box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.14), 0 8px 20px rgba(38, 166, 154, 0.12);
    }

    #tab-content-parts .filter-input:focus {
        border-color: #FFC107;
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.14), 0 8px 20px rgba(255, 193, 7, 0.12);
    }

    #tab-content-manufacturers .filter-input:focus {
        border-color: #1E88E5;
        box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.14), 0 8px 20px rgba(30, 136, 229, 0.12);
    }

    #tab-content-tender .filter-input:focus {
        border-color: #ab47bc;
        box-shadow: 0 0 0 3px rgba(171, 71, 188, 0.14), 0 8px 20px rgba(80, 41, 116, 0.12);
    }

    #tab-content-admin .filter-input:focus {
        border-color: #ab47bc;
        box-shadow: 0 0 0 3px rgba(171, 71, 188, 0.14), 0 8px 20px rgba(80, 41, 116, 0.12);
    }

    .search-suggestions {
        display: none;
        margin-top: 10px;
        border: 1px solid #ebe2f3;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 10px 26px rgba(51, 24, 80, 0.12);
        overflow: hidden;
    }

    .search-suggestions .manufacturer {
        padding: 11px 14px;
        font-size: 14px;
        color: #2f2f38;
        cursor: pointer;
        border-bottom: 1px solid #f3ecf9;
        transition: background 0.15s, color 0.15s;
    }

    .search-suggestions .manufacturer:last-child {
        border-bottom: none;
    }

    .search-suggestions .manufacturer:hover {
        background: #f7f1fb;
        color: #4b2a69;
    }

    select.form-select,
    select.filter-input {
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px auto;
        padding-right: 30px;
    }

    input.filter-input[list] {
        padding-right: 30px;
        cursor: pointer;
        position: relative;
    }

    textarea.form-input {
        resize: none;
        height: auto;
        line-height: 1.4;
        padding: 12px;
    }

    .form-section-title {
        font-size: 14px;
        font-weight: 600;
        text-transform: none;
        color: #444;
        margin-bottom: 8px;
        margin-top: 10px;
        letter-spacing: 0;
    }

    .tires-group {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 15px;
        width: 100%;
    }

    .tires-input {
        flex: 1;
        height: 42px;
        padding: 0 12px;
        font-size: 14px;
        text-align: center;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: #f9f9f9;
        min-width: 0;
    }

    .filters-toggle-btn {
        background: #E0E0E0;
        padding: 12px 15px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 2;
        position: relative;
    }

    .filters-toggle-btn::after {
        content: '▼';
        font-size: 12px;
        color: #666;
        transition: transform 0.3s;
    }

    .filters-wrapper.open+.filters-toggle-btn::after {
        transform: rotate(180deg);
    }

    .filters-wrapper {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
        opacity: 0;
        will-change: max-height;
    }

    .filters-wrapper.open {
        max-height: 1200px;
        opacity: 1;
    }

    .filters-content {
        background: #fff;
        padding: 20px 0;
    }

    .filters-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .filter-label {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 5px;
        display: block;
    }

    .filters-grid select {
        color: #0066cc;
        font-weight: 700;
    }

    .filters-grid select option {
        color: #222;
        font-weight: normal;
    }

    .filter-price-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .filter-item {
        position: relative;
    }

    .price-dropdown-trigger {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #007CB2;
        pointer-events: none;
        z-index: 1;
    }

    @media (max-width: 600px) {
        .filter-item-clear {
            order: 99;
            grid-column: 1 / -1;
            margin-top: 10px;
        }

        .filters-grid {
            grid-template-columns: 1fr 1fr;
            padding: 0 5px;
        }

        .filter-item:nth-child(1) {
            order: 1;
        }

        .filter-item:nth-child(4) {
            order: 2;
        }

        .filter-item:nth-child(2) {
            order: 3;
        }

        .filter-item:nth-child(3) {
            order: 4;
        }

        .filter-input {
            margin-bottom: 0;
        }
    }

    .listing-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
        margin-top: 30px;
        opacity: 1;
        transition: opacity 0.6s;
    }

    .listing-grid.loaded {
        opacity: 1;
    }

    .listing-card {
        border: 1px solid #eee;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
        cursor: pointer;
        transition: transform 0.2s;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .listing-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

    .favorite-heart {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10;
        cursor: pointer;
        background: transparent;
        border-radius: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: none;
    }

    .favorite-heart:hover {
        transform: scale(1.1);
        background: transparent;
        box-shadow: none;
    }

    .favorite-heart.active svg {
        animation: heartBeat 0.3s ease;
    }

    @keyframes heartBeat {

        0%,
        100% {
            transform: scale(1);
        }

        25% {
            transform: scale(1.3);
        }

        50% {
            transform: scale(1.1);
        }
    }

    .listing-card-img {
        height: 180px;
        width: 100%;
        object-fit: cover;
        background: #f0f0f0;
        display: block;
    }

    .listing-card-media {
        position: relative;
    }

    .listing-card-content {
        padding: 15px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .listing-card-tender-badge {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        text-align: left;
        padding: 8px 12px;
        font-weight: 700;
        font-size: clamp(10px, 2.5vw, 14px);
        line-height: 1.1;
        display: none;
        align-items: center;
        justify-content: flex-start;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 2;
    }

    .listing-card-tender-badge.visible {
        display: flex;
        background: #ab47bc;
        color: #fff;
    }

    /* Экстра-контроль для очень маленьких экранов */
    @media (max-width: 320px) {
        .listing-card-tender-badge {
            font-size: 10px;
            padding: 6px 8px;
        }
    }

    @media (min-width: 321px) and (max-width: 374px) {
        .listing-card-tender-badge {
            font-size: 10px;
        }
    }

    .listing-card-tender-badge.placeholder {
        display: none;
    }

    .listing-card-header {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }

    .listing-card-title {
        font-weight: 600;
        color: #0066cc;
        font-size: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 22px;
        order: 1;
    }

    .listing-card-price {
        font-weight: 800;
        font-size: 20px;
        order: 2;
    }

    .listing-card-price-text {
        font-size: 19px;
    }

    div[style*="rgba(0, 102, 204"] .form-input {
        margin-bottom: 0;
    }

    .badge-wrap {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 4px;
        flex-wrap: wrap;
        order: 3;
        margin-top: 4px;
    }

    .listing-card-info {
        font-size: 13px;
        color: #666;
        margin-top: auto;
    }

    @media (max-width: 600px) {
        .listing-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .listing-card-img {
            height: 120px !important;
        }

        .listing-card-title {
            font-size: 14px !important;
            line-height: 18px;
        }

        .listing-card-price {
            font-size: 16px !important;
        }

        .listing-card-price-text {
            font-size: 15px !important;
        }

        .badge-new,
        .badge-private,
        .badge-float {
            font-size: 10px !important;
            padding: 3px 6px !important;
            height: auto;
            line-height: 12px;
            margin: 0 !important;
        }

        .listing-card-info {
            font-size: 11px !important;
        }

        .listing-card-tender-badge {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            text-align: left;
            padding: 6px 10px;
            font-weight: 700;
            font-size: clamp(9px, 2.2vw, 12px);
            line-height: 1.15;
            display: none;
            align-items: center;
            justify-content: flex-start;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            z-index: 2;
        }

        .listing-card-tender-badge.visible {
            display: flex;
            background: #ab47bc;
            color: #fff;
        }

        /* Экстра-контроль для очень маленьких экранов */
        @media (max-width: 320px) {
            .listing-card-tender-badge {
                font-size: 9px;
                padding: 5px 8px;
            }
        }

        @media (min-width: 321px) and (max-width: 374px) {
            .listing-card-tender-badge {
                font-size: 9px;
            }
        }

        .listing-card-tender-badge.placeholder {
            display: none;
        }
    }

    .badge-new {
        background: #d4edda;
        color: #155724;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .badge-private {
        background: #f0f0f0;
        color: #555;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
    }

    .badge-float {
        background: #e3f2fd;
        color: #1976d2;
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 700;
        margin-left: 0;
        white-space: nowrap;
    }

    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 9000;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.6s;
    }

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

    .modal-window {
        background: #fff;
        width: 100%;
        max-width: 720px;
        max-height: 100vh;
        border-radius: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        margin: auto;
        overflow-y: auto;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .modal-window::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    @media (min-width: 600px) {
        .modal-overlay {
            padding: 20px;
            padding-top: calc(20px + env(safe-area-inset-top));
            padding-bottom: calc(20px + env(safe-area-inset-bottom));
        }

        .modal-window {
            border-radius: 16px;
        }
    }

    .modal-close {
        position: absolute;
        top: 12px;
        right: 16px;
        font-size: 28px;
        font-weight: bold;
        color: #333;
        cursor: pointer;
        line-height: 1;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.7);
        transition: background 0.2s;
        z-index: 10;
    }

    .modal-close:hover {
        background: rgba(240, 240, 240, 0.9);
    }

    .modal-content {
        padding: 30px;
    }

    @media (max-width: 600px) {
        .modal-content {
            padding: 20px;
        }
    }

    .modal-tender-banner {
        /* width: 100%; */
        background: #ab47bc;
        color: #fff;
        text-align: left;
        padding: 12px 20px;
        font-weight: 700;
        font-size: 14px;
        display: none;
        line-height: 1.1;
        white-space: normal;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .modal-tender-banner.visible {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    @media (max-width: 600px) {
        .modal-tender-banner {
            font-size: 11px;
            padding: 10px 15px;
        }
    }

    .modal-title-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 15px;
    }

    .modal-title-text {
        font-size: 24px;
        font-weight: 800;
        flex: 1;
        min-width: 0;
    }

    .modal-badges-row {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    @media (min-width: 600px) {
        .modal-title-row {
            align-items: center;
        }

        .modal-badges-row {
            margin-left: auto;
        }
    }

    @media (max-width: 600px) {
        .modal-title-text {
            font-size: 20px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .modal-title-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .modal-badges-row {
            width: 100%;
            justify-content: flex-start;
        }
    }

    .gallery-wrapper {
        position: relative;
        width: 100%;
        height: 400px;
        background: #000;
        flex-shrink: 0;
        overflow: hidden;
    }

    @media (max-width: 600px) {
        .gallery-wrapper {
            height: 300px;
        }
    }

    .gallery-track {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .gallery-slide {
        width: 100% !important;
        min-width: 100% !important;
        flex: 0 0 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
        overflow: hidden;
    }

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

    .gallery-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .arrow-left {
        left: 15px;
    }

    .arrow-right {
        right: 15px;
    }

    .lightbox-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #FFFFFF;
        z-index: 10000;
        display: none;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    .lightbox-overlay.active {
        display: flex;
    }

    .lightbox-img-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        touch-action: none;
    }

    .lightbox-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: none;
        transform-origin: center center;
        user-select: none;
        -webkit-user-select: none;
    }

    .lightbox-close {
        position: fixed !important;
        top: max(20px, env(safe-area-inset-top)) !important;
        right: 20px !important;
        color: #333;
        font-size: 30px;
        cursor: pointer;
        z-index: 10001 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
        pointer-events: all !important;
    }

    .specs-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 30px;
    }

    .specs-table td {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        font-size: 15px;
    }

    .specs-table td:first-child {
        color: #888;
        width: 40%;
    }

    .auth-window {
        position: relative;
        background: #fff;
        border-radius: 20px;
        padding: 30px;
        width: 100%;
        max-width: 340px;
        margin: auto;
    }

    .loader-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        transition: opacity 0.6s;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #333;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin: 0 auto;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    #preview-container {
        display: flex;
        gap: 8px;
        padding-top: 10px;
    }

    .preview-thumb {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #eee;
        flex-shrink: 0;
    }

    /* --- STYLES FOR TABS, MANUFACTURERS & ADMIN --- */
    .tabs-nav {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        border-bottom: none;
        flex-wrap: wrap;
    }

    .tab-link {
        padding: 10px 18px;
        cursor: pointer;
        border: none;
        background-color: #f5f5f5;
        font-size: 16px;
        font-weight: 600;
        color: #222;
        border-radius: 8px;
    }

    .tab-link:active {
        animation: none;
    }

    /* Solid background colors for each tab on desktop - no effects */
    .tab-link[onclick*="ads"] {
        background-color: rgba(181, 222, 218, 0.5) !important;
        color: #1b8a70;
    }

    .tab-link[onclick*="parts"] {
        background-color: rgba(255, 213, 79, 0.5) !important;
        color: #F57C00;
    }

    .tab-link[onclick*="manufacturers"] {
        background-color: rgba(144, 202, 249, 0.5) !important;
        color: #1565C0;
    }

    #tender-tab-link {
        background-color: #9C27B0 !important;
        color: #fff;
    }

    .tab-link:hover {
        background-color: inherit;
    }

    .tab-link.active {
        border-color: #d9cfe0;
        box-shadow: none;
    }

    /* No active state effects - colors remain same */
    .tab-link[onclick*="ads"].active {
        background-color: #C8E6E2 !important;
        color: #1b8a70;
    }

    .tab-link[onclick*="parts"].active {
        background-color: #FFE082 !important;
        color: #F57C00;
    }

    .tab-link[onclick*="manufacturers"].active {
        background-color: #BBDEFB !important;
        color: #1565C0;
    }

    #tender-tab-link.active {
        background-color: #9C27B0 !important;
        color: #fff;
    }

    #admin-tab-link.active {
        color: #222;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
        animation: fadeIn 0.5s;
    }

    .manufacturer-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin-top: 20px;
    }

    .manufacturer-section {
        width: 100%;
        margin-bottom: 30px;
    }

    .manufacturer-section-title {
        font-size: 24px;
        font-weight: 700;
        color: #2a2a2a;
        margin-bottom: 15px;
        padding-left: 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .manufacturer-grid-inner {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 15px;
    }

    .manufacturer-card {
        border: none;
        border-radius: 16px;
        background: #e6e6e6;
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        transition: transform 0.2s;
    }

    .manufacturer-logo-container {
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
    }

    .manufacturer-logo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* или contain — смотрите ниже */
        object-position: center;
        display: block;
    }

    .manufacturer-name {
        font-size: 20px;
        font-weight: 800;
        margin-bottom: 5px;
        color: #000;
        text-transform: uppercase;
        word-break: break-word;
    }

    .manufacturer-socials {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        padding: 0 2px;
        margin-top: auto;
        width: 100%;
    }

    .manufacturer-socials a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        aspect-ratio: 1 / 1;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.2s;
        overflow: hidden;
        text-decoration: none;
    }

    .manufacturer-socials a:hover {
        transform: scale(1.1);
    }

    .manufacturer-socials img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        display: block;
        margin: 0;
    }

    .moderation-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .moderation-card {
        display: flex;
        gap: 20px;
        align-items: center;
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 10px;
        background: #fafafa;
        flex-wrap: wrap;
    }

    .moderation-card-img {
        width: 100px;
        height: 75px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .moderation-card-info {
        flex-grow: 1;
    }

    .moderation-card-title {
        font-weight: 600;
        margin-bottom: 5px;
    }

    .moderation-card-price {
        color: #555;
        font-size: 14px;
    }

    .moderation-card-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    @media (max-width: 600px) {
        .moderation-card {
            flex-direction: column;
            align-items: flex-start;
        }

        .moderation-card-img {
            width: 100%;
            height: auto;
        }

        .moderation-card-actions {
            width: 100%;
            flex-direction: row;
            flex-wrap: wrap;
        }

        .moderation-card-actions .btn {
            flex: 1 1 120px;
        }
    }

    .btn-approve {
        background: #28a745;
        color: white;
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }

    .btn-reject {
        background: #dc3545;
        color: white;
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }

    .btn-view {
        background: #6c757d;
        color: white;
        height: 36px;
        line-height: 36px;
        font-size: 13px;
    }

    .manufacturer-socials {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        padding: 0 2px;
        margin-top: auto;
        width: 100%;
    }

    .manufacturer-socials a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        aspect-ratio: 1 / 1;
        border-radius: 50% !important;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s;
    }

    .manufacturer-socials a:hover {
        transform: scale(1.1);
    }

    .manufacturer-socials img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        border-radius: 50%;
    }

    /* Footer Styles */
    .footer {
        background-color: #3a3a3a;
        color: #fff;
        padding: 30px 20px;
        border-top: 1px solid #2a2a2a;
        margin-top: auto;
    }

    .footer-content {
        max-width: 1440px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }

    .footer-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .footer-text {
        font-size: 14px;
        line-height: 1.4;
        color: #ccc;
    }

    .footer-text:first-child {
        color: #fff;
        font-weight: 500;
    }

    .footer-center {
        display: flex;
        gap: 20px;
        align-items: center;
        justify-content: center;
    }

    .footer-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transition: all 0.3s ease;
        text-decoration: none;
        cursor: pointer;
    }

    .footer-icon:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

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

    .footer-right {
        flex: 1;
        text-align: right;
    }

    .footer-top-link {
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        padding: 8px 12px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 6px;
        transition: all 0.3s ease;
        cursor: pointer;
        display: inline-block;
    }

    .footer-top-link:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.5);
    }

    @media (max-width: 768px) {
        .footer-content {
            flex-direction: column;
            gap: 20px;
            text-align: center;
        }

        .footer-left {
            align-items: center;
        }

        .footer-right {
            text-align: center;
        }
    }

    /* ===== FORM UX IMPROVEMENTS ===== */

    /* Section cards */
    .form-card {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        padding: 18px 16px 8px;
        margin-bottom: 16px;
    }

    .form-card-title {
        font-size: 15px;
        font-weight: 700;
        color: #333;
        margin: 0 0 14px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .form-card-title svg {
        flex-shrink: 0;
    }

    /* Upload zone improved */
    .upload-zone {
        display: block;
        border: 2px dashed #c5cae9;
        padding: 28px 20px;
        text-align: center;
        border-radius: 12px;
        margin-bottom: 20px;
        cursor: pointer;
        transition: border-color 0.2s, background 0.2s;
        background: #fafbff;
    }

    .upload-zone:hover {
        border-color: #7986cb;
        background: #f0f2ff;
    }

    .upload-zone-icon {
        margin-bottom: 8px;
    }

    .upload-zone-text {
        font-weight: 600;
        color: #3f51b5;
        font-size: 15px;
        margin-bottom: 4px;
    }

    .upload-zone-hint {
        font-size: 12px;
        color: #999;
    }

    /* Inline validation */
    .form-input.input-error,
    .form-select.input-error {
        border-color: #e53935 !important;
        background: #fff5f5 !important;
    }

    .field-error-msg {
        color: #e53935;
        font-size: 12px;
        margin-top: -12px;
        margin-bottom: 10px;
        display: none;
    }

    .field-error-msg.visible {
        display: block;
    }

    /* Toggle switch for Плавающий */
    .toggle-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .toggle-label {
        font-size: 15px;
        color: #444;
        font-weight: 500;
    }

    .toggle-switch {
        position: relative;
        width: 48px;
        height: 26px;
        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: #ccc;
        border-radius: 26px;
        transition: 0.3s;
    }

    .toggle-slider:before {
        content: "";
        position: absolute;
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: 0.3s;
    }

    .toggle-switch input:checked + .toggle-slider {
        background: #3f51b5;
    }

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(22px);
    }

    /* Price with ₽ */
    .price-wrapper {
        position: relative;
    }

    .price-wrapper input {
        padding-right: 40px;
    }

    .price-suffix {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-60%);
        font-size: 16px;
        font-weight: 600;
        color: #999;
        pointer-events: none;
    }

    /* Bigger form buttons */
    #main-form .form-actions {
        display: flex;
        gap: 12px;
        margin-top: 8px;
        padding-top: 16px;
        border-top: 1px solid #eee;
    }

    #main-form .form-actions .btn {
        height: 50px;
        font-size: 16px;
        border-radius: 12px;
    }

    #main-form .form-actions .btn-cancel {
        background: #f1f3f5;
        color: #555;
        flex: 0 0 auto;
        padding: 0 24px;
    }

    #main-form .form-actions .btn-cancel:hover {
        background: #e9ecef;
    }

    #main-form .form-actions .btn-submit {
        flex: 1;
        background: linear-gradient(135deg, #26a69a 0%, #2bbbad 100%);
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 14px rgba(38, 166, 154, 0.3);
    }

    #main-form .form-actions .btn-submit:hover {
        box-shadow: 0 6px 20px rgba(38, 166, 154, 0.4);
    }

    @media (max-width: 480px) {
        .form-card {
            padding: 14px 12px 6px;
        }

        #main-form .form-actions .btn {
            height: 48px;
            font-size: 15px;
        }
    }