.bun-tickets {
    --bt-primary: #1877f2;
    --bt-navy: #10244a;
    --bt-text: #273854;
    --bt-muted: #718096;
    --bt-line: #dfe6ef;
    --bt-soft: #f7f9fc;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
    color: var(--bt-text);
}

.bun-tickets *,
.bun-tickets *::before,
.bun-tickets *::after {
    box-sizing: border-box;
}

.bun-tickets button,
.bun-tickets input,
.bun-tickets select {
    font: inherit;
}

.bun-tickets__hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    min-height: 180px;
    padding: 28px 32px 68px;
    background: #f1f6ff;
    border: 1px solid #dce8f8;
    border-radius: 18px;
}

.bun-tickets__hero-main {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 20px;
    min-width: 0;
}

.bun-tickets__hero-main>div {
    min-width: 300px;
}

.bun-tickets__hero-icon {
    display: grid;
    place-items: center;
    flex: 0 0 72px;
    height: 72px;
    color: var(--bt-primary);
    background: #fff;
    border: 1px solid #cfe0f8;
    border-radius: 18px;
}

.bun-tickets__hero h1 {
    margin: 0;
    color: var(--bt-navy);
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.bun-tickets__hero p {
    margin: 8px 0 0;
    color: var(--bt-muted);
    font-size: 14px;
}

.bun-tickets__create,
.bun-tickets__search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    color: #fff;
    font-weight: 650;
    background: var(--bt-primary);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 8px 18px rgba(24, 119, 242, .2);
    cursor: pointer;
}

.bun-tickets__stats {
    position: absolute;
    left: 32px;
    bottom: 18px;
    display: flex;
    gap: 10px;
}

.bun-tickets__stat {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #d7e3f2;
    border-radius: 9px;
}

.bun-tickets__stat-dot {
    width: 8px;
    height: 8px;
    background: var(--bt-primary);
    border-radius: 50%;
}

.bun-tickets__stat strong {
    color: var(--bt-primary);
    font-size: 18px;
}

.bun-tickets__stat span:last-child {
    color: var(--bt-muted);
    font-size: 12px;
}

.bun-tickets__stat--open .bun-tickets__stat-dot {
    background: #168447;
}

.bun-tickets__stat--open strong {
    color: #168447;
}

.bun-tickets__stat--new .bun-tickets__stat-dot {
    background: #0969da;
}

.bun-tickets__stat--new strong {
    color: #0969da;
}

.bun-tickets__filters {
    position: relative;
    z-index: 2;
    margin: -1px -8px 18px;
    padding: 16px 22px;
    background: #fff;
    border: 1px solid var(--bt-line);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(16, 36, 74, .08);
}

.bun-tickets__filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) minmax(170px, .8fr) minmax(170px, .8fr) auto auto;
    gap: 12px;
    align-items: center;
}

.bun-tickets__search {
    position: relative;
    display: block;
}

.bun-tickets__search svg {
    position: absolute;
    top: 50%;
    left: 13px;
    color: #8190a5;
    transform: translateY(-50%);
    pointer-events: none;
}

.bun-tickets__search input,
.bun-tickets__select {
    width: 100%;
    height: 44px;
    color: var(--bt-text);
    background: #fff;
    border: 1px solid #d7e0eb;
    border-radius: 9px;
    outline: none;
}

.bun-tickets__search input {
    padding: 0 14px 0 42px;
}

.bun-tickets__select {
    padding: 0 36px 0 13px;
    cursor: pointer;
}

.bun-tickets__search input:focus,
.bun-tickets__select:focus {
    border-color: #82b7fb;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, .1);
}

.bun-tickets__reset {
    padding: 10px 8px;
    color: var(--bt-muted);
    font-size: 13px;
    text-decoration: none;
}

.bun-tickets__reset:hover {
    color: var(--bt-primary);
}

.bun-tickets__card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bt-line);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(16, 36, 74, .055);
}

.bun-tickets__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--bt-line);
}

.bun-tickets__card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bun-tickets__card-title h2 {
    margin: 0;
    color: var(--bt-navy);
    font-size: 17px;
    font-weight: 740;
}

.bun-tickets__card-title>span {
    color: var(--bt-muted);
    font-size: 12px;
}

.bun-tickets input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--bt-primary);
    cursor: pointer;
}

.bun-tickets__close-selected {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    color: #e3364d;
    background: #fff;
    border: 1px solid #f0aab4;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.bun-tickets__close-selected:disabled {
    color: #a8b0bd;
    background: #f7f8fa;
    border-color: #e3e7ed;
    cursor: not-allowed;
}

.bun-tickets__table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
}

.bun-tickets__table th {
    padding: 13px 14px;
    color: #64738a;
    background: #fbfcfe;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

.bun-tickets__table td {
    padding: 16px 14px;
    color: var(--bt-text);
    border-top: 1px solid var(--bt-line);
    vertical-align: middle;
}

.bun-tickets__table tbody tr {
    position: relative;
    transition: background .16s ease;
}

.bun-tickets__table tbody tr:hover td {
    background: #f9fbff;
}

.bun-tickets__table tbody tr.is-new td {
    background: #f8fbff;
}

.bun-tickets__table tbody tr.is-new td:first-child {
    box-shadow: inset 3px 0 0 var(--bt-primary);
}

.bun-tickets__select-column {
    width: 48px;
    text-align: center !important;
}

.bun-tickets__action-column {
    width: 78px;
    text-align: center !important;
}

.bun-tickets__subject a,
.bun-tickets__owner a {
    color: #155fc7;
    font-weight: 700;
    text-decoration: none;
}

.bun-tickets__subject small {
    display: block;
    margin-top: 3px;
    color: var(--bt-muted);
    font-size: 11px;
}

.bun-tickets__status,
.bun-tickets__category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
}

.bun-tickets__status {
    color: #536275;
    background: #edf1f5;
    border: 1px solid #dce3eb;
}

.bun-tickets__status--new {
    color: #0969da;
    background: #eaf3ff;
    border-color: #b9d6ff;
}

.bun-tickets__status--open {
    color: #168447;
    background: #eaf8f0;
    border-color: #b9e4ca;
}

.bun-tickets__status--closed {
    color: #d92d45;
    background: #fff0f2;
    border-color: #ffcbd2;
}

.bun-tickets__category {
    color: #7253b6;
    background: #f2edff;
    border: 1px solid #ddd1ff;
}

.bun-tickets__date {
    display: inline-flex;
    flex-direction: column;
    color: var(--bt-text);
    font-style: normal;
    line-height: 1.35;
}

.bun-tickets__date small {
    margin-top: 2px;
    color: var(--bt-muted);
    font-size: 11px;
}

.bun-tickets__unread {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    color: #fff;
    background: var(--bt-primary);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.bun-tickets__open-ticket {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--bt-primary);
    border: 1px solid #d4deeb;
    border-radius: 50%;
}

.bun-tickets__open-ticket:hover {
    color: #fff;
    background: var(--bt-primary);
    border-color: var(--bt-primary);
}

.bun-tickets__paging {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .bun-tickets__filter-form {
        grid-template-columns: 1fr 1fr;
    }
    .bun-tickets__search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .bun-tickets {
        width: min(100% - 22px, 1180px);
        padding-top: 20px;
    }
    .bun-tickets__hero {
        min-height: 270px;
        padding: 22px 20px 122px;
    }
    .bun-tickets__hero-main {
        align-items: flex-start;
    }
    .bun-tickets__hero-icon {
        flex-basis: 54px;
        height: 54px;
    }
    .bun-tickets__create {
        position: absolute;
        right: 20px;
        bottom: 76px;
    }
    .bun-tickets__stats {
        right: 20px;
        bottom: 18px;
        left: 20px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .bun-tickets__stat {
        min-width: 0;
        padding: 8px;
    }
    .bun-tickets__filters {
        margin-left: 0;
        margin-right: 0;
    }
    .bun-tickets__filter-form {
        grid-template-columns: 1fr;
    }
    .bun-tickets__search {
        grid-column: auto;
    }
    .bun-tickets__card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}