.shell-app.is-tags-view .shell-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.shell-app.is-tags-view .shell-panel {
    min-height: calc(100vh - var(--shell-header-height));
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.tags-filters {
    display: grid;
    gap: 12px;
}

.tags-filters__counters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 4px;
}

.tags-view-controls {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.tags-table-search {
    width: min(100%, 320px);
}

.tags-table-search .shell-search {
    width: 100%;
}

.tags-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tags-table {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.tags-table__header,
.tags-table__row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 130px 80px minmax(220px, auto);
    gap: 12px;
    align-items: center;
}

.tags-table__header {
    padding: 0 10px 6px;
    color: var(--shell-text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tags-table__row {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--shell-line);
    border-radius: var(--shell-radius-sm);
    background: var(--shell-panel);
    color: var(--shell-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.tags-table__row:hover,
.tags-table__row:focus {
    border-color: var(--shell-line-strong);
    background: var(--surface_hover);
}

.tags-table__row.is-selected {
    border-color: var(--shell-accent);
    background: var(--shell-accent-soft);
}

.tags-table__tag {
    min-width: 0;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tags-table__count {
    color: var(--shell-text-soft);
    font-variant-numeric: tabular-nums;
}

.tags-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    color: var(--shell-text-soft);
}

.tags-table__link {
    color: var(--shell-accent-strong);
    font-size: 0.8rem;
    font-weight: 650;
}

.tags-table__link.is-danger {
    color: var(--shell-danger);
}

.tags-visibility-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid var(--shell-line);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.tags-visibility-badge.is-public {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
}

.tags-visibility-badge.is-private {
    border-color: rgba(216, 180, 254, 0.3);
    background: rgba(216, 180, 254, 0.11);
    color: #e9d5ff;
}

.tags-editor {
    display: grid;
    gap: 14px;
}

.tags-editor.is-empty {
    align-content: start;
}

.tags-editor__header {
    display: grid;
    gap: 4px;
}

.tags-editor__field,
.tags-editor__section {
    display: grid;
    gap: 7px;
}

.tags-editor__associated {
    color: var(--shell-text);
    font-weight: 650;
}

.tags-editor__help {
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--shell-line);
    border-radius: var(--shell-radius-sm);
    color: var(--shell-text-soft);
    font-size: 0.78rem;
    line-height: 1.45;
}

.tags-editor__help p {
    margin: 0;
}

.tags-editor__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tags-editor__delete {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--shell-danger);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.tags-editor__delete:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 900px) {
    .tags-table {
        overflow-x: auto;
    }

    .tags-table__header,
    .tags-table__row {
        min-width: 680px;
    }
}
