.hashtag-page__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hashtag-page__count {
    color: #666;
    margin: 4px 0 0;
}

.hashtag-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hashtag-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e4e4e4;
    background: #fff;
}

.hashtag-card__mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #173532;
    color: #42c1b5;
    font-size: 22px;
    flex: 0 0 48px;
}

.hashtag-card__body {
    min-width: 0;
    flex: 1;
}

.hashtag-card__name {
    font-weight: 600;
}

.hashtag-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.hashtag-admin {
    --hashtag-admin-gap: 1.25rem;
    --hashtag-admin-radius: 10px;
    --hashtag-admin-border: #e4e4e4;
    --hashtag-admin-soft: #f8f9fa;
    --hashtag-admin-fg: #212529;
    --hashtag-admin-muted: #666;
    --hashtag-admin-accent: #1e90ff;
    --hashtag-admin-warn: #d39e00;
}

.hashtag-admin__intro {
    color: var(--hashtag-admin-muted);
    margin: 0 0 0.75rem;
}

.hashtag-admin__status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--hashtag-admin-gap);
}

.hashtag-admin__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid var(--hashtag-admin-border);
    background: var(--hashtag-admin-soft);
    color: var(--hashtag-admin-fg);
}

.hashtag-admin__stack {
    display: flex;
    flex-direction: column;
}

.hashtag-admin__form {
    display: contents;
}

.hashtag-admin__tabs {
    order: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: var(--hashtag-admin-gap);
}

.hashtag-admin__tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--hashtag-admin-border);
    background: var(--hashtag-admin-soft);
    color: var(--hashtag-admin-fg);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    cursor: pointer;
}

.hashtag-admin__tab.is-active {
    background: var(--hashtag-admin-accent);
    border-color: var(--hashtag-admin-accent);
    color: #fff;
}

.hashtag-admin__tab.has-dirty::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hashtag-admin-warn);
}

.hashtag-admin__tab.is-active.has-dirty::after {
    background: #fff;
}

.hashtag-admin__panel {
    order: 2;
}

.hashtag-admin__panel[hidden] {
    display: none !important;
}

.hashtag-admin__sections {
    display: flex;
    flex-direction: column;
    gap: var(--hashtag-admin-gap);
}

.hashtag-admin__section {
    border: 1px solid var(--hashtag-admin-border);
    border-radius: var(--hashtag-admin-radius);
    background: #fff;
    margin: 0;
}

.hashtag-admin__section.has-dirty {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hashtag-admin-warn) 70%, transparent);
}

.hashtag-admin__section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--hashtag-admin-soft);
    border-bottom: 1px solid var(--hashtag-admin-border);
    border-radius: var(--hashtag-admin-radius) var(--hashtag-admin-radius) 0 0;
}

.hashtag-admin__section-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #173532;
    color: #42c1b5;
}

.hashtag-admin__section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.hashtag-admin__section-desc {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: var(--hashtag-admin-muted);
}

.hashtag-admin__section-body {
    padding: 1rem;
}

.hashtag-admin__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 0;
}

.hashtag-admin__page-all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-weight: 600;
}

.hashtag-admin__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hashtag-admin__card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--hashtag-admin-border);
    background: #fff;
    color: var(--hashtag-admin-fg);
    cursor: pointer;
}

.hashtag-admin__mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #173532;
    color: #42c1b5;
    font-size: 22px;
    font-weight: 700;
}

.hashtag-admin__card-body {
    min-width: 0;
}

.hashtag-admin__card-name {
    font-weight: 700;
    word-break: break-word;
}

.hashtag-admin__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
    font-size: 13px;
    color: #666;
}

.hashtag-admin__card-meta strong {
    color: #2dd4bf;
}

.hashtag-admin__empty {
    margin: 0;
    color: var(--hashtag-admin-muted);
}

.hashtag-admin__pager {
    margin-top: 12px;
}

.hashtag-admin__savebar {
    order: 4;
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: var(--hashtag-admin-gap);
    padding: 0.85rem 1rem;
    border: 1px solid var(--hashtag-admin-border);
    border-radius: var(--hashtag-admin-radius);
    background: #fff;
}

.hashtag-admin__savebar.is-dirty {
    border-color: var(--hashtag-admin-warn);
}

.hashtag-admin__savebar-note {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hashtag-admin-muted);
}

.hashtag-admin__field--dirty {
    border-radius: 8px;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hashtag-admin-warn) 70%, transparent);
}

.hashtag-admin textarea.form-control,
.hashtag-admin input.form-control {
    background-color: #ffffff;
    color: #111111;
    -webkit-text-fill-color: #111111;
}

@media (max-width: 767px) {
    .hashtag-admin__cards {
        grid-template-columns: 1fr;
    }

    .hashtag-admin__savebar {
        align-items: stretch;
        flex-direction: column;
    }
}

html[data-bs-theme="dark"] .hashtag-page .btn-default,
body.dark .hashtag-page .btn-default,
.theme-dark .hashtag-page .btn-default {
    background-color: #2a2a2e;
    color: #f2f2f2;
    border-color: #444;
}

html[data-bs-theme="dark"] .hashtag-page__count,
body.dark .hashtag-page__count,
.theme-dark .hashtag-page__count {
    color: #b0b0b0;
}

html[data-bs-theme="dark"] .hashtag-card,
body.dark .hashtag-card,
.theme-dark .hashtag-card {
    background: #1c1c1e;
    border-color: #333;
    color: #f2f2f2;
}

html[data-bs-theme="dark"] .hashtag-card__mark,
body.dark .hashtag-card__mark,
.theme-dark .hashtag-card__mark {
    background: #173532;
    color: #2dd4bf;
}

html[data-bs-theme="dark"] .hashtag-admin,
body.dark .hashtag-admin,
.theme-dark .hashtag-admin {
    --hashtag-admin-border: #333;
    --hashtag-admin-soft: #1c1c1e;
    --hashtag-admin-fg: #f2f2f2;
    --hashtag-admin-muted: #b0b0b0;
    --hashtag-admin-accent: #2dd4bf;
}

html[data-bs-theme="dark"] .hashtag-admin__section,
body.dark .hashtag-admin__section,
.theme-dark .hashtag-admin__section,
html[data-bs-theme="dark"] .hashtag-admin__card,
body.dark .hashtag-admin__card,
.theme-dark .hashtag-admin__card,
html[data-bs-theme="dark"] .hashtag-admin__savebar,
body.dark .hashtag-admin__savebar,
.theme-dark .hashtag-admin__savebar {
    background: #1c1c1e;
    border-color: #333;
    color: #f2f2f2;
}

html[data-bs-theme="dark"] .hashtag-admin__card-meta,
body.dark .hashtag-admin__card-meta,
.theme-dark .hashtag-admin__card-meta {
    color: #b0b0b0;
}

html[data-bs-theme="dark"] .hashtag-admin__card-meta strong,
body.dark .hashtag-admin__card-meta strong,
.theme-dark .hashtag-admin__card-meta strong {
    color: #2dd4bf;
}

html[data-bs-theme="dark"] .hashtag-admin__tab.is-active,
body.dark .hashtag-admin__tab.is-active,
.theme-dark .hashtag-admin__tab.is-active {
    color: #111;
}

html[data-bs-theme="dark"] .hashtag-admin .btn-default,
body.dark .hashtag-admin .btn-default,
.theme-dark .hashtag-admin .btn-default {
    background-color: #2a2a2e;
    color: #f2f2f2;
    border-color: #444;
}

html[data-bs-theme="dark"] .hashtag-admin textarea.form-control,
html[data-bs-theme="dark"] .hashtag-admin input.form-control,
body.dark .hashtag-admin textarea.form-control,
body.dark .hashtag-admin input.form-control,
.theme-dark .hashtag-admin textarea.form-control,
.theme-dark .hashtag-admin input.form-control {
    background-color: #1c1c1e;
    color: #f2f2f2;
    -webkit-text-fill-color: #f2f2f2;
}

.hashtag-suggest {
    position: fixed;
    z-index: 2000;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    width: max-content;
    max-width: min(420px, calc(100vw - 16px));
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.hashtag-suggest__card,
.hashtag-suggest__empty {
    display: inline-flex;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    background: #fff;
    color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.hashtag-suggest__card {
    cursor: pointer;
    font-weight: 600;
}

.hashtag-suggest__empty {
    font-size: 13px;
    color: #666;
}

.hashtag-suggest__card.is-current,
.hashtag-suggest__card:hover {
    border-color: #42c1b5;
    background: #e7f7f5;
    color: #0f766e;
}

html[data-bs-theme="dark"] .hashtag-suggest__card,
html[data-bs-theme="dark"] .hashtag-suggest__empty,
body.dark .hashtag-suggest__card,
body.dark .hashtag-suggest__empty,
.theme-dark .hashtag-suggest__card,
.theme-dark .hashtag-suggest__empty {
    background: #1c1c1e;
    border-color: #333;
    color: #f2f2f2;
}

html[data-bs-theme="dark"] .hashtag-suggest__empty,
body.dark .hashtag-suggest__empty,
.theme-dark .hashtag-suggest__empty {
    color: #b0b0b0;
}

html[data-bs-theme="dark"] .hashtag-suggest__card.is-current,
html[data-bs-theme="dark"] .hashtag-suggest__card:hover,
body.dark .hashtag-suggest__card.is-current,
body.dark .hashtag-suggest__card:hover,
.theme-dark .hashtag-suggest__card.is-current,
.theme-dark .hashtag-suggest__card:hover {
    background: #173532;
    border-color: #2dd4bf;
    color: #2dd4bf;
}

@media (max-width: 767px) {
    .hashtag-cards {
        grid-template-columns: 1fr;
    }
}
