﻿
    .home-section-head .section-head__tools {
        margin-inline-start: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        align-items: center;
        gap: 8px;
        width: min(100%, 580px);
        direction: ltr;
    }

    .home-section-head .section-head__sort {
        grid-column: 1;
        width: clamp(160px, 24vw, 220px);
        min-width: 0;
    }

    .home-view-toggle {
        grid-column: 2;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        white-space: nowrap;
        min-width: max-content;
        flex: 0 0 auto;
        padding: 4px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.82);
    }

    [dir="rtl"] .home-section-head .section-head__sort {
        grid-column: 1;
        justify-self: start;
        direction: rtl;
        text-align: right;
    }

    [dir="rtl"] .home-view-toggle {
        grid-column: 2;
        justify-self: end;
        direction: ltr;
    }

    .home-view-btn {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: rgba(100, 116, 139, 0.96);
        display: inline-grid;
        place-items: center;
        cursor: pointer;
    }

    .home-view-btn svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }

    .home-view-btn.is-on {
        color: #fff;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    .home-myads {
        margin: 16px 0 2px;
        padding: 14px;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(15, 23, 42, 0.10);
        background:
            radial-gradient(140% 140% at 100% 0%, rgba(var(--brand-rgb), 0.20) 0%, transparent 56%),
            rgba(255, 255, 255, 0.88);
        box-shadow: 0 12px 24px rgba(2, 6, 23, 0.06);
    }

    .home-myads__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    .home-myads__copy {
        display: grid;
        gap: 6px;
    }

    .home-myads__copy h3 {
        margin: 0;
        font-size: 18px;
        letter-spacing: -0.02em;
    }

    .home-myads__copy p {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.45;
    }

    .home-myads__actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .home-myads__btn {
        min-height: 38px;
        padding: 8px 12px;
        border-radius: 12px;
        border: 1px solid rgba(15, 23, 42, 0.12);
        background: rgba(255, 255, 255, 0.86);
        color: rgba(15, 23, 42, 0.88);
        font-size: 12px;
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .home-myads__btn--primary {
        border: 0;
        color: #fff;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    .home-myads__preview {
        margin: 12px 0 0;
        padding: 0;
        list-style: none;
        display: grid;
        gap: 8px;
    }

    .home-myads__item {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        align-items: center;
        padding: 9px 10px;
        border-radius: 12px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        background: rgba(255, 255, 255, 0.72);
    }

    .home-myads__item-title {
        font-size: 12px;
        font-weight: 800;
        color: rgba(15, 23, 42, 0.90);
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .home-myads__status {
        padding: 5px 9px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 900;
        line-height: 1;
        color: #fff;
        background: rgba(2, 6, 23, 0.56);
    }

    .home-myads__status.is-published { background: rgba(15, 118, 110, 0.86); }
    .home-myads__status.is-pending { background: rgba(180, 83, 9, 0.88); }
    .home-myads__status.is-rejected { background: rgba(185, 28, 28, 0.88); }
    .home-myads__status.is-archived { background: rgba(71, 85, 105, 0.88); }
    .home-myads__status.is-expired { background: rgba(107, 114, 128, 0.88); }

    .ads-grid.home-view-grid1 {
        grid-template-columns: 1fr;
    }

    @media (min-width: 900px) {
        .ads-grid.home-view-grid1 {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (min-width: 1500px) {
        .ads-grid.home-view-grid1 {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    .ads-grid.home-view-grid2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ads-grid.home-view-grid2 .ad-media {
        height: auto;
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .ads-grid.home-view-grid2 .ad-body {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .ads-grid.home-view-grid2 .ad-title {
        order: 1;
        margin: 0;
    }

    .ads-grid.home-view-grid2 .ad-desc {
        order: 2;
        margin: 0;
    }

    .ads-grid.home-view-grid2 .ad-meta {
        order: 3;
        margin: auto 0 0;
        padding-top: 2px;
        gap: 8px;
        font-size: 10px;
    }

    .ads-grid.home-view-grid2 .ad-meta-chip {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: rgba(71, 85, 105, 0.9);
        gap: 4px;
    }

    .ads-grid.home-view-grid2 .ad-meta-chip svg {
        width: 12px;
        height: 12px;
    }

    @media (min-width: 1200px) {
        .ads-grid.home-view-grid2 {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    @media (min-width: 1500px) {
        .ads-grid.home-view-grid2 {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }

    .ads-grid.home-view-list {
        grid-template-columns: 1fr;
    }

    @media (min-width: 900px) {
        .ads-grid.home-view-list {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    .ads-grid.home-view-list .ad-card {
        display: grid;
        grid-template-columns: 136px 1fr;
        align-items: stretch;
    }

    .ads-grid.home-view-list .ad-media {
        height: 100%;
        min-height: 136px;
        aspect-ratio: auto;
    }

    .ads-grid.home-view-list .ad-media img {
        height: 100%;
    }

    .ads-grid.home-view-grid1 .ad-body,
    .ads-grid.home-view-list .ad-body {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .ads-grid.home-view-grid1 .ad-meta,
    .ads-grid.home-view-list .ad-meta {
        order: 3;
        margin: auto 0 0;
    }

    .ads-grid.home-view-grid1 .ad-title,
    .ads-grid.home-view-list .ad-title {
        order: 1;
        margin: 0;
    }

    .ads-grid.home-view-grid1 .ad-desc,
    .ads-grid.home-view-list .ad-desc {
        order: 2;
        margin: 0;
    }

    .ads-grid.home-view-list .ad-body {
        height: 100%;
    }

    .home-modal {
        position: fixed;
        inset: 0;
        z-index: 182;
        display: none;
    }

    .home-modal.is-on {
        display: block;
    }

    .home-modal__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, 0.45);
    }

    .home-modal__sheet {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: min(520px, 92vw);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(15, 23, 42, 0.10);
        box-shadow: 0 30px 70px rgba(2, 6, 23, 0.28);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .home-modal__head,
    .home-modal__foot {
        padding: 12px 14px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .home-modal__foot {
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        border-bottom: 0;
        justify-content: stretch;
    }

    .home-modal__body {
        padding: 14px;
        display: grid;
        gap: 12px;
    }

    .home-modal__close {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.06);
        cursor: pointer;
        display: inline-grid;
        place-items: center;
        color: rgba(15, 23, 42, 0.72);
    }

    .home-modal__close svg {
        width: 16px;
        height: 16px;
        display: block;
        stroke: currentColor;
        stroke-width: 2.2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .home-modal__field {
        display: grid;
        gap: 6px;
        font-size: 13px;
        font-weight: 800;
    }

    .home-modal__field span {
        color: var(--muted);
    }

    .home-modal__field select {
        min-height: 42px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 14px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.85);
        outline: none;
    }

    .home-modal__field select:focus {
        box-shadow: var(--ring);
        border-color: rgba(var(--brand-rgb), 0.35);
    }

    .home-modal__btn {
        flex: 1;
        min-height: 42px;
        border: 1px solid rgba(15, 23, 42, 0.10);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.85);
        font-weight: 900;
        cursor: pointer;
    }

    .home-modal__btn--primary {
        border: 0;
        color: #fff;
        background: linear-gradient(135deg, var(--brand), var(--brand-2));
    }

    @media (max-width: 820px) {
        .home-section-head .section-head__tools {
            width: 100%;
        }
    }

    @media (min-width: 821px) {
        .home-section-head {
            display: block;
        }

        .home-section-head .section-head__tools {
            margin-inline-start: 0;
            width: 100%;
            max-width: none;
            grid-template-columns: minmax(0, 1fr) max-content;
            gap: 12px;
        }

        .home-section-head .section-head__sort {
            grid-column: 1;
            justify-self: start;
        }

        .home-view-toggle {
            grid-column: 2;
            justify-self: end;
        }

        [dir="rtl"] .home-section-head .section-head__sort {
            grid-column: 1;
            justify-self: start;
        }

        [dir="rtl"] .home-view-toggle {
            grid-column: 2;
            justify-self: end;
        }
    }

    @media (max-width: 640px) {
        .home-myads {
            padding: 12px;
        }

        .home-myads__actions {
            width: 100%;
        }

        .home-myads__btn {
            flex: 1;
        }

        .ads-grid.home-view-list .ad-card {
            grid-template-columns: 118px 1fr;
        }

        .ads-grid.home-view-list .ad-media {
            min-height: 118px;
        }

        .home-modal__sheet {
            left: 0;
            right: 0;
            bottom: 0;
            top: auto;
            transform: none;
            width: 100vw;
            border-radius: 22px 22px 0 0;
        }
    }
