.hue-un { --un-muted: #6b7178; --un-accent: #2a5885; --un-danger: #a33; --un-ok-bg: #eef6ee; --un-err-bg: #fbeeee; --un-chip: #f2f3f5; }
.hue-dark .hue-un { --un-muted: #9aa0a6; --un-accent: #8fb3d9; --un-danger: #e08080; --un-ok-bg: #22301f; --un-err-bg: #3a2323; --un-chip: #2b2d30; }
.hue-un a { color: var(--un-accent); }
.hue-un .hue-admin-body { font-size: 13px; }
@media (min-width: 641px) { .hue-un .hue-admin-body input, .hue-un .hue-admin-body select, .hue-un .hue-admin-body button { font-size: 13px; } }
.hue-un .hue-un-muted { color: var(--un-muted); font-weight: normal; }
.hue-un h4 { margin: 16px 0 6px; font-size: 13px; }
.hue-un p { margin: 6px 0; line-height: 1.45; }
.hue-un code { background: var(--un-chip); padding: 0 3px; }

.hue-un-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; border: 1px solid var(--admin-border); margin: 0 0 10px; }
.hue-un-slots > div { padding: 8px 10px; border-right: 1px solid var(--admin-border); min-width: 0; }
.hue-un-slots > div:last-child { border-right: 0; }
.hue-un-slots b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.hue-un-slots span { display: block; color: var(--un-muted); font-size: 12px; }
.hue-un-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--un-muted); font-size: 12px; margin-bottom: 8px; }
.hue-un-stats b { color: var(--admin-text); }

.hue-un-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--admin-border); margin: 0 0 10px; }
.hue-un-tabs a { padding: 7px 12px; text-decoration: none; color: var(--admin-text) !important; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.hue-un-tabs a.is-active { border-bottom-color: var(--admin-text); font-weight: bold; }
.hue-un-tabs a:hover { background: var(--admin-head); }
.hue-un-search .hue-un-reset { font-size: 12px; }

.hue-un .hue-un-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hue-un .hue-un-table th { text-align: left; padding: 7px 8px; font-size: 12px; }
.hue-un .hue-un-table td { padding: 7px 8px; border-bottom: 1px solid var(--admin-border); vertical-align: middle; overflow-wrap: anywhere; }
.hue-un .hue-un-table .hue-un-act { text-align: right; white-space: nowrap; width: 1%; }
.hue-un .hue-un-names { color: var(--un-muted); max-width: 320px; }
.hue-un-inline { display: inline; margin: 0 !important; }
.hue-un button.hue-un-danger { color: var(--un-danger) !important; }
.hue-un .hue-un-btnlink { display: inline-block; padding: 5px 10px; border: 1px solid var(--admin-border); background: var(--admin-button); color: var(--admin-text) !important; text-decoration: none; font-weight: bold; }
.hue-un .hue-un-rowform { margin: 0 !important; flex-wrap: nowrap; }
.hue-un .hue-un-rowform input[name="slug"] { flex: 1 1 160px; min-width: 0; }
.hue-un .hue-un-check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: normal; }
.hue-un .hue-un-label { color: var(--un-muted); font-size: 12px; }
.hue-un .hue-un-forms { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.4fr); gap: 8px; align-items: center; margin-bottom: 10px; }
.hue-un .hue-un-forms form { margin: 0 !important; flex-wrap: nowrap; }
.hue-un .hue-un-forms input[type="number"] { width: 90px; flex: 0 0 90px !important; }
.hue-un .hue-un-head-link { float: right; font-weight: normal; font-size: 12px; }
.hue-un-free { margin: 0 0 8px; }
.hue-un-warn { color: var(--un-danger); }
.hue-un-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hue-un-chips a { background: var(--un-chip); padding: 4px 8px; text-decoration: none; overflow-wrap: anywhere; }
.hue-un-help p { color: var(--admin-text); }

.hue-un-msg { padding: 8px 10px; background: var(--un-ok-bg); border: 1px solid var(--admin-border); }
.hue-un-msg-err { background: var(--un-err-bg); }
.hue-un-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hue-un-grid > section { min-width: 0; }
.hue-un-grid .hue-admin-form { margin: 0 !important; }
.hue-un button[disabled] { opacity: .55; cursor: not-allowed; }
.hue-un-list { border: 1px solid var(--admin-border); margin: 6px 0 8px; }
.hue-un-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--admin-border); min-width: 0; }
.hue-un-item:last-child { border-bottom: 0; }
.hue-un-item .hue-un-info { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.hue-un-item .hue-un-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: bold; text-decoration: none; }
.hue-un-item .hue-un-src { flex: 0 1 auto; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.hue-un-item .hue-un-arrows { display: inline-flex; gap: 4px; flex: none; }
.hue-un-item .hue-un-arrows button { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: normal; line-height: 1; }
.hue-un-item .hue-un-check { flex: none; }
.hue-un-item .hue-un-check input { margin: 0; }
.hue-un-links { font-size: 12px; color: var(--un-muted); margin-top: 12px !important; overflow-wrap: anywhere; }
.hue-un-settings select { flex: 1 1 220px; min-width: 0; }
.hue-un-settings { contain: inline-size; }

.vk-extra-names, .vk-extra-names a { overflow-wrap: anywhere; word-break: normal; }

@media (max-width: 640px) {
    .hue-un .hue-un-table thead { display: none; }
    .hue-un .hue-un-table, .hue-un .hue-un-table tbody, .hue-un .hue-un-table tr, .hue-un .hue-un-table td { display: block; width: auto; }
    .hue-un .hue-un-table tr { border-bottom: 1px solid var(--admin-border); padding: 6px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
    .hue-un .hue-un-table tr > td { grid-column: 1 / -1; }
    .hue-un .hue-un-table tr > td:first-child { grid-column: 1; grid-row: 1; font-weight: bold; }
    .hue-un .hue-un-table tr > td:first-child::before { display: none; }
    .hue-un .hue-un-table tr > td.hue-un-act { grid-column: 2; grid-row: 1; padding-top: 3px !important; }
    .hue-un .hue-un-table td { border: 0; padding: 3px 0; }
    .hue-un .hue-un-table td[data-label]::before { content: attr(data-label) ": "; color: var(--un-muted); font-size: 12px; }
    .hue-un .hue-un-table td[data-label="Адрес"]::before, .hue-un .hue-un-table td[data-label="Юзернейм"]::before { display: block; margin-bottom: 3px; }
    .hue-un .hue-un-table .hue-un-act { text-align: right; width: auto; }
    .hue-un .hue-un-rowform { flex-wrap: wrap; }
    .hue-un .hue-un-rowform input[name="slug"] { flex: 1 1 100%; }
    .hue-un .hue-un-rowform > button { width: auto !important; }
    .hue-un .hue-un-forms { grid-template-columns: 1fr; }
    .hue-un .hue-un-forms form { flex-wrap: wrap; }
    .hue-un-grid { grid-template-columns: 1fr; }
    .hue-un .hue-un-head-link { float: none; display: block; margin-top: 2px; }
    .hue-un-slots { grid-template-columns: 1fr 1fr; }
    .hue-un-slots > div:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--admin-border); }
    .hue-un-slots > div:nth-child(2) { border-right: 1px solid var(--admin-border); }
    .hue-un-item .hue-un-info { flex-direction: column; align-items: stretch; gap: 1px; }
    .hue-un-item .hue-un-src { max-width: none; }
}

.mk-field.mk-fee-confirm > span { font-size: 13px; color: inherit; line-height: 1.4; }
.mk-field.mk-fee-confirm input[type="checkbox"] { width: auto; margin: 0 6px 0 0; vertical-align: -2px; }

#hue-tag-modal { --htm-card: var(--card, #FFFFFF); --htm-text: var(--text, #222222); --htm-muted: var(--muted, #888888);
                 --htm-line: var(--line, #E7E8EC); --htm-edge: var(--line-strong, #DCE1E6);
                 position: fixed; inset: 0; z-index: 10050; background: rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
html.hue-dark #hue-tag-modal { --htm-card: var(--dk-card, #1e1f21); --htm-text: var(--dk-text, #e6e6e6); --htm-muted: var(--dk-muted, #9aa0a6);
                               --htm-line: var(--dk-line, #3a3d41); --htm-edge: var(--dk-raise-2, #44484d); }
#hue-tag-modal .htm-box { position: relative; background: var(--htm-card); color: var(--htm-text); width: 360px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; min-width: 0; padding: 22px 20px 18px; box-sizing: border-box; box-shadow: 0 0 0 1px var(--htm-edge); font-family: inherit; }
#hue-tag-modal .htm-x { position: absolute; top: 8px; right: 12px; font-size: 22px; line-height: 1; color: var(--htm-muted) !important; text-decoration: none; }
#hue-tag-modal .htm-name { font-size: 20px; line-height: 1.25; font-weight: 600; word-break: normal; overflow-wrap: anywhere; padding-right: 24px; }
#hue-tag-modal .htm-sub { color: var(--htm-muted); font-size: 13px; margin: 4px 0 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hue-tag-modal .htm-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--htm-line); font-size: 14px; min-width: 0; }
#hue-tag-modal .htm-rows span { color: var(--htm-muted); flex: none; }
#hue-tag-modal .htm-rows b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
#hue-tag-modal .htm-acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
#hue-tag-modal .htm-acts .vk-btn { flex: 1 1 auto; min-width: 0; text-align: center; box-sizing: border-box; padding: 7px 10px; text-decoration: none; }
html:not(.theme-modern) #hue-tag-modal .htm-acts .vk-btn { border: 1px solid var(--htm-edge); background: var(--htm-line); color: var(--htm-text) !important; font: bold 13px Arial, sans-serif; }
html:not(.theme-modern) #hue-tag-modal .htm-acts .vk-btn-primary { background: #3A3A3A; border-color: #3A3A3A; color: #FFFFFF !important; }
.hue-un-item .hue-un-drag { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 30px; cursor: grab; color: var(--muted, #888888); font-size: 16px; line-height: 30px; touch-action: none; user-select: none; }
.hue-un-item.is-dragging { opacity: 0.6; background: var(--hover, rgba(127, 127, 127, 0.12)); }
.hue-un-list.is-sorting { user-select: none; }
@media (min-width: 701px) {
    .hue-new-panels .hue-un-grid .hue-admin-form { flex-wrap: nowrap; align-items: stretch; }
    .hue-new-panels .hue-un-grid .hue-admin-form > input[name="name"] { flex: 1 1 0; min-width: 0; margin: 0; }
    .hue-new-panels .hue-un-grid .hue-admin-form > button { flex: none; margin: 0; }
}
.hue-un-buy { display: flex; align-items: stretch; gap: 6px; }
.hue-un-buy-info { flex: 1 1 0; min-width: 0; height: 32px; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 0 10px;
    border: 1px solid var(--admin-border); white-space: nowrap; overflow: hidden; font-size: 13px; }
.hue-un-buy-info b { font-size: 14px; }
.hue-un-buy-info span { color: var(--un-muted); overflow: hidden; text-overflow: ellipsis; }
.hue-un-buy form { margin: 0; flex: none; display: flex; }
.hue-new-panels .hue-un-buy button { height: 32px; padding: 0 14px; margin: 0; flex: none; white-space: nowrap; }
.hue-un-buy button[disabled] { opacity: 0.55; cursor: default; }
.hue-new-panels .hue-un-grid .hue-admin-form > input[name="name"] { height: 32px; box-sizing: border-box; }
.hue-new-panels .hue-un-grid .hue-admin-form > button { height: 32px; padding: 0 14px; }
@media (max-width: 700px) {
    .hue-un-buy { flex-direction: column; }
    .hue-un-buy-info { flex: none; height: 38px; }
    .hue-un-buy form, .hue-new-panels .hue-un-buy button { width: 100%; height: 38px; }
    .hue-new-panels .hue-un-grid .hue-admin-form > input[name="name"], .hue-new-panels .hue-un-grid .hue-admin-form > button { height: 38px; }
}
.hue-un-pager { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 8px 0 0; }
.hue-un-pager button { min-width: 32px; height: 32px; padding: 0 8px; margin: 0; font-weight: normal; }
.hue-un-pager button.is-on { font-weight: bold; outline: 2px solid var(--accent, #B01E1E); outline-offset: -2px; }
.hue-un-pager button[disabled] { opacity: 0.4; cursor: default; }
.hue-un-order .hue-un-save { margin-top: 10px; }
@media (max-width: 700px) { .hue-un-order .hue-un-save { width: 100%; height: 36px; } }
.hue-un-offers { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.hue-un-offer { display: flex; align-items: center; gap: 6px; border: 1px solid var(--admin-border); padding: 6px 8px; min-width: 0; }
.hue-un-offer-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.hue-un-offer form { margin: 0; flex: none; }
.hue-new-panels .hue-un-offer button, .hue-new-panels .hue-offer-btns button { height: 32px; padding: 0 14px; margin: 0; }
.hue-new-panels .hue-offer-ok { background: #B01E1E !important; border-color: #B01E1E !important; color: #FFFFFF !important; }
.hue-offer .hue-admin-body { text-align: center; padding: 24px 16px; }
.hue-offer-name { font-size: 26px; font-weight: bold; overflow-wrap: anywhere; }
.hue-offer-who { margin: 6px 0 18px; color: var(--un-muted); }
.hue-offer-btns { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.hue-offer-btns form { margin: 0; }
.hue-offer-state { color: var(--un-muted); font-size: 13px; }
@media (max-width: 700px) {
    .hue-un-offer { flex-wrap: wrap; }
    .hue-un-offer-txt { flex: 1 1 100%; white-space: normal; }
    .hue-un-offer form { flex: 1 1 0; }
    .hue-new-panels .hue-un-offer button { width: 100%; height: 36px; }
    .hue-offer-btns form { flex: 1 1 0; }
    .hue-new-panels .hue-offer-btns button { width: 100%; height: 38px; }
}
.hue-un-search { display: block; width: 100%; box-sizing: border-box; height: 34px; margin: 0 0 8px 0; padding: 0 10px; border: 1px solid var(--line-strong, #DCE1E6); border-radius: 0; background: var(--card, #FFFFFF); color: inherit; font: inherit; }
.hue-un-pager[hidden] { display: none !important; }
.hue-ck { --ck-ok: #2E7D32; --ck-used: #2A5885; --ck-off: #A33333; --ck-old: #7A7F86; }
.hue-dark .hue-ck { --ck-ok: #8DCE8F; --ck-used: #8FB3D9; --ck-off: #E08080; --ck-old: #9AA0A6; }
.hue-new-panels .hue-ck-form { display: grid; grid-template-columns: 120px 80px 100px minmax(0, 1fr) 150px auto; gap: 8px; align-items: end; margin: 0; }
.hue-ck-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.hue-ck-f > span { font-size: 12px; color: var(--un-muted); line-height: 1.2; }
.hue-new-panels .hue-ck-f input:not([type="hidden"]) { width: 100%; height: 34px; margin: 0; padding: 0 8px; }
.hue-new-panels .hue-ck-create { height: 34px; margin: 0; padding: 0 18px; }
.hue-new-panels .hue-ck-copy { height: 30px; margin: 0; padding: 0 12px; flex: none; white-space: nowrap; font-weight: bold; }
.hue-new-panels .hue-ck-copy.is-done { color: var(--ck-ok); }
.hue-new-panels .hue-ck-head { display: flex; align-items: center; gap: 8px; padding-top: 6px; padding-bottom: 6px; min-height: 42px; box-sizing: border-box; }
.hue-ck-head .hue-ck-copy { margin-left: auto !important; }
.hue-ck-list { border: 1px solid var(--admin-border); }
.hue-ck-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-bottom: 1px solid var(--admin-border); min-width: 0; }
.hue-ck-item:last-child { border-bottom: 0; }
.hue-un .hue-ck-code { font: bold 14px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.5px; background: none; padding: 0; white-space: nowrap; }
.hue-ck-meta { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--un-muted); font-size: 12px; }
.hue-ck-st { display: inline-block; padding: 0 6px; border: 1px solid currentColor; font-size: 12px; line-height: 18px; font-weight: bold; }
.hue-ck-st-active { color: var(--ck-ok); }
.hue-ck-st-used { color: var(--ck-used); }
.hue-ck-st-revoked { color: var(--ck-off); }
.hue-ck-st-expired { color: var(--ck-old); }
.hue-ck-row.is-used .hue-ck-code, .hue-ck-row.is-revoked .hue-ck-code, .hue-ck-row.is-expired .hue-ck-code { color: var(--un-muted); }
.hue-ck-row.is-revoked .hue-ck-code { text-decoration: line-through; }
.hue-un .hue-un-table td.hue-ck-note { min-width: 130px; max-width: 220px; overflow-wrap: break-word; }
.hue-un .hue-ck-table th { white-space: nowrap; }
.hue-un .hue-ck-table td.hue-ck-num { white-space: nowrap; }
.hue-un .hue-ck-table td.hue-ck-num > .hue-un-muted { display: block; font-size: 12px; }
.hue-un .hue-ck-table td.hue-ck-who > .hue-ck-users { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.hue-un .hue-ck-table td.hue-ck-who > * { display: block; white-space: nowrap; }
.hue-un .hue-ck-table td.hue-ck-who > .hue-ck-st { display: inline-block; margin-bottom: 2px; }
.hue-ck-tap { cursor: pointer; }
.hue-ck-tap:hover { text-decoration: underline dotted; }
.hue-ck-tap.is-done { color: var(--ck-ok); }
.hue-new-panels .hue-ck-act button { height: 30px; margin: 0; padding: 0 12px; vertical-align: middle; }
.hue-ck-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 10px 0 0; }
.hue-ck-pager a, .hue-ck-pager span { min-width: 32px; height: 32px; padding: 0 8px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.hue-ck-pager a { border: 1px solid var(--admin-border); text-decoration: none; }
.hue-ck-pager a.is-on { font-weight: bold; background: var(--admin-head); color: var(--admin-text) !important; }
.hue-ck-empty { margin: 8px 0 0 !important; }
@media (max-width: 700px) {
    .hue-new-panels .hue-ck-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .hue-ck-f-amount, .hue-ck-f-count, .hue-ck-f-uses { grid-column: span 2; }
    .hue-ck-f-note { grid-column: 1 / -1; }
    .hue-ck-f-date, .hue-new-panels .hue-ck-create { grid-column: span 3; }
    .hue-new-panels .hue-ck-f input:not([type="hidden"]), .hue-new-panels .hue-ck-create { height: 38px; width: 100%; }
    .hue-ck-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; }
    .hue-ck-item .hue-ck-code { grid-column: 1; grid-row: 1; }
    .hue-ck-item .hue-ck-meta { grid-column: 1; grid-row: 2; }
    .hue-ck-item .hue-ck-copy { grid-column: 2; grid-row: 1 / span 2; height: 36px; }
    .hue-un .hue-ck-table td.hue-ck-who > * { display: inline; white-space: normal; }
    .hue-un .hue-ck-table td.hue-ck-who > * + * { margin-left: 6px; }
    .hue-un .hue-ck-table td.hue-ck-who > .hue-ck-st { display: inline-block; margin-bottom: 0; }
    .hue-new-panels .hue-ck-act button { height: 32px; }
    .hue-un .hue-un-table td.hue-ck-note { min-width: 0; max-width: none; }
}
@media (min-width: 641px) {
    .hue-un .hue-ck-table { table-layout: fixed; }
    .hue-un .hue-ck-table th:nth-child(1) { width: 186px; }
    .hue-un .hue-ck-table th:nth-child(2) { width: 78px; }
    .hue-un .hue-ck-table th:nth-child(4) { width: 118px; }
    .hue-un .hue-ck-table th:nth-child(5) { width: 128px; }
    .hue-un .hue-ck-table th:nth-child(6) { width: 92px; }
    .hue-un .hue-ck-table .hue-ck-code { font-size: 13px; letter-spacing: 0; }
    .hue-un .hue-ck-table .hue-un-act { width: 92px; }
}
