@import url('editor-fonts.css');

:root {
    --hm-admin-orange: #ffbd44;
    --hm-admin-orange-rgb: 255, 189, 68;
    --hm-admin-black: #fff9ee;
    --hm-admin-ink: #222222;
    --hm-admin-muted: #68707b;
    --hm-admin-line: #dfe3e8;
    --hm-admin-soft: #fff4e2;
    --hm-admin-white: #ffffff;
    --hm-admin-bg: #fff9ee;
    --hm-admin-button-border: #808080;
}

body.hm-client-admin-page {
    margin: 0;
    background: var(--hm-admin-bg);
    color: var(--hm-admin-ink);
    font-family: Inter, Arial, sans-serif;
}

.hm-client-admin,
.hm-client-admin * {
    box-sizing: border-box;
}

.hm-client-admin {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--hm-admin-bg);
}

.hm-client-login {
    grid-column: 1 / -1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(var(--hm-admin-orange-rgb), 0.18), transparent 32%),
        var(--hm-admin-bg);
}

.hm-client-login__card {
    width: min(420px, 100%);
    display: grid;
    gap: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.hm-client-login__brand,
.hm-client-sidebar__brand {
    display: grid;
    gap: 2px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hm-client-login__brand span,
.hm-client-sidebar__brand span {
    color: var(--hm-admin-orange);
    font-size: 13px;
    font-weight: 800;
}

.hm-client-login__brand strong,
.hm-client-sidebar__brand strong {
    color: inherit;
    font-size: 24px;
    line-height: 1;
}

.hm-client-login h1 {
    margin: 6px 0 0;
    font-size: 28px;
    line-height: 1.1;
}

.hm-client-login p {
    margin: 0;
    color: var(--hm-admin-muted);
    line-height: 1.5;
}

.hm-client-login__error {
    padding: 11px 12px;
    border-radius: 8px;
    background: #fff0eb;
    color: #a33000;
    font-size: 14px;
}

.hm-client-sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px 18px;
    background: var(--hm-admin-black);
    color: var(--hm-admin-ink);
    border-right: 1px solid rgba(128, 128, 128, .28);
}

.hm-client-nav {
    display: grid;
    gap: 6px;
}

.hm-client-nav button,
.hm-client-sidebar__footer button,
.hm-client-sidebar__footer a {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--hm-admin-muted);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.hm-client-nav button:hover,
.hm-client-sidebar__footer button:hover,
.hm-client-sidebar__footer a:hover {
    border-color: var(--hm-admin-button-border);
    background: rgba(var(--hm-admin-orange-rgb), .16);
    color: var(--hm-admin-ink);
}

.hm-client-nav button.is-active {
    background: var(--hm-admin-orange);
    color: var(--hm-admin-ink);
}

.hm-client-sidebar__footer {
    display: grid;
    gap: 6px;
    margin-top: auto;
}

.hm-client-workspace {
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
    padding: 24px;
}

.hm-client-topbar,
.hm-client-editor,
.hm-client-entity,
.hm-client-categories {
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-white);
}

.hm-client-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.hm-client-topbar span,
.hm-client-editor__head span,
.hm-client-entity__head span {
    display: block;
    margin-bottom: 4px;
    color: var(--hm-admin-orange);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hm-client-topbar h1,
.hm-client-editor__head h2,
.hm-client-entity__head h2,
.hm-client-categories h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.16;
}

.hm-client-topbar button,
.hm-client-editor__head button,
.hm-client-entity__head button,
.hm-client-repeater__head button,
.hm-client-repeater__item-head button,
.hm-client-form-actions button,
.hm-client-category-form button,
.hm-client-primary,
.hm-client-categories__list button {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 400;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.hm-client-admin button,
.hm-client-admin .hm-client-primary,
.hm-client-admin .hm-client-sidebar__footer a,
.hm-client-admin .hm-client-product-manager-card__actions a,
.hm-client-admin .hm-client-product-actions a {
    border-color: var(--hm-admin-button-border) !important;
    font-weight: 400 !important;
}

.hm-client-topbar button:active,
.hm-client-editor__head button:active,
.hm-client-entity__head button:active,
.hm-client-repeater__head button:active,
.hm-client-repeater__item-head button:active,
.hm-client-form-actions button:active,
.hm-client-category-form button:active,
.hm-client-primary:active,
.hm-client-categories__list button:active {
    transform: translateY(1px);
}

.hm-client-primary,
.hm-client-topbar button,
.hm-client-editor__head button,
.hm-client-entity__head button {
    background: var(--hm-admin-orange);
    color: var(--hm-admin-ink);
}

.hm-client-topbar button:disabled,
.hm-client-editor__head button:disabled,
.hm-client-entity__head button:disabled,
.hm-client-repeater__head button:disabled,
.hm-client-primary:disabled {
    border-color: #c8cdd3;
    background: #d7dce2;
    color: #6f7782;
    cursor: not-allowed;
}

.hm-client-primary[aria-busy="true"] {
    cursor: progress;
}

.hm-client-primary.is-saved {
    border-color: #198754;
    background: #198754;
}

.hm-client-limit-note {
    margin: -6px 0 18px;
    color: var(--hm-admin-muted);
    line-height: 1.5;
}

.hm-client-panel {
    display: grid;
    gap: 18px;
}

.hm-client-editor,
.hm-client-entity,
.hm-client-categories {
    padding: 18px;
}

.hm-client-editor__head,
.hm-client-entity__head,
.hm-client-repeater__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.hm-client-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hm-client-field {
    display: grid;
    align-content: start;
    gap: 7px;
}

.hm-client-field span,
.hm-client-category-picker legend {
    color: #3b424a;
    font-size: 13px;
    font-weight: 750;
}

.hm-client-field small {
    color: var(--hm-admin-muted);
    font-size: 12px;
}

.hm-client-field input,
.hm-client-field textarea,
.hm-client-field select {
    width: 100%;
    min-height: 40px;
    padding: 10px 11px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--hm-admin-ink);
    font: inherit;
}

.hm-client-field textarea {
    resize: vertical;
}

.hm-client-field--rich {
    align-self: stretch;
}

.hm-client-rich {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
}

.hm-client-rich__toolbar {
    display: grid;
    grid-template-columns: minmax(142px, 1fr) 92px repeat(3, 36px);
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--hm-admin-line);
    background: #f7f9fb;
    overflow-x: auto;
}

.hm-client-rich__media {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--hm-admin-line);
    background: #ffffff;
}

.hm-client-rich__media button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--hm-admin-orange);
    border-radius: 8px;
    background: var(--hm-admin-orange);
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 400;
}

.hm-client-rich__button,
.hm-client-rich__select {
    height: 38px;
    min-height: 32px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--hm-admin-ink);
    font: inherit;
}

.hm-client-rich__button {
    width: 36px;
    min-width: 36px;
    display: inline-grid;
    place-items: center;
    padding: 6px 0;
    cursor: pointer;
}

.hm-client-rich__select {
    width: auto;
    max-width: 100%;
    padding: 6px 28px 6px 9px;
}

.hm-client-rich__editor {
    min-height: 138px;
    padding: 12px;
    outline: none;
    color: var(--hm-admin-ink);
    line-height: 1.55;
}

.hm-client-rich__editor:focus {
    box-shadow: inset 0 0 0 2px rgba(var(--hm-admin-orange-rgb), .28);
}

.hm-client-rich__source {
    display: none;
}

.hm-client-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding-top: 22px;
    color: #3b424a;
    font-weight: 700;
}

.hm-client-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 8px;
}

.hm-client-repeater {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--hm-admin-line);
}

.hm-client-repeater h3 {
    margin: 0;
    font-size: 18px;
}

.hm-client-repeater__item {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-repeater__item + .hm-client-repeater__item {
    margin-top: 12px;
}

.hm-client-repeater__item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hm-client-about-editor {
    display: grid;
    gap: 18px;
}

.hm-client-about-section {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--hm-admin-line);
}

.hm-client-about-section__head span {
    display: block;
    margin-bottom: 4px;
    color: var(--hm-admin-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hm-client-about-section__head h3 {
    margin: 0;
    font-size: 18px;
}

.hm-client-about-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hm-client-about-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-about-card > strong {
    color: var(--hm-admin-orange);
}

.hm-client-catalog-editor {
    display: grid;
    gap: 18px;
}

.hm-client-catalog-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hm-client-catalog-tab {
    display: grid;
    min-height: 54px;
    align-content: center;
    gap: 0;
    padding: 14px 16px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 800;
    text-align: left;
    background: #ffffff;
    cursor: pointer;
}

.hm-client-catalog-tab strong {
    font-size: 17px;
    line-height: 1.2;
}

.hm-client-catalog-tab span {
    display: none;
}

.hm-client-catalog-tab:hover,
.hm-client-catalog-tab:focus-visible {
    border-color: rgba(var(--hm-admin-orange-rgb), .65);
    outline: none;
}

.hm-client-catalog-tab.is-active,
.hm-client-catalog-tab[aria-selected="true"] {
    border-color: var(--hm-admin-orange);
    box-shadow: 0 0 0 3px rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-product-form-wrap {
    width: min(1120px, 100%);
    justify-self: center;
}

.hm-client-product-form {
    display: grid;
    gap: 14px;
}

.hm-client-product-manager {
    display: grid;
    gap: 14px;
}

.hm-client-product-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .45fr));
    gap: 10px;
    align-items: end;
}

.hm-client-product-filters input,
.hm-client-product-filters select {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    background: #ffffff;
}

.hm-client-product-filters button {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 750;
    background: #ffffff;
}

.hm-client-product-manager__list {
    display: grid;
    gap: 10px;
}

.hm-client-product-manager-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) minmax(118px, auto);
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
}

.hm-client-product-manager-card.is-active {
    border-color: var(--hm-admin-orange);
    box-shadow: inset 3px 0 0 var(--hm-admin-orange);
}

.hm-client-product-manager-card__thumb {
    display: grid;
    overflow: hidden;
    min-height: 76px;
    place-items: center;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-muted);
    font-size: 12px;
    font-weight: 800;
    background: var(--hm-admin-soft);
}

.hm-client-product-manager-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-client-product-manager-card__body {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
}

.hm-client-product-manager-card__body strong,
.hm-client-product-manager-card__body span,
.hm-client-product-manager-card__body p {
    overflow: hidden;
    margin: 0;
    text-overflow: ellipsis;
}

.hm-client-product-manager-card__body p,
.hm-client-product-manager-card__body span {
    color: var(--hm-admin-muted);
    font-size: 13px;
    line-height: 1.45;
}

.hm-client-product-manager-card__badge {
    width: fit-content;
    padding: 4px 8px;
    border: 1px solid rgba(var(--hm-admin-orange-rgb), .42);
    border-radius: 999px;
    color: var(--hm-admin-orange);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    background: rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-product-manager-card__actions,
.hm-client-product-actions {
    display: grid;
    align-content: start;
    gap: 8px;
}

.hm-client-product-manager-card__actions button,
.hm-client-product-manager-card__actions a,
.hm-client-product-actions button,
.hm-client-product-actions a {
    display: inline-flex;
    width: 100%;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    background: #ffffff;
}

.hm-client-product-documents {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-product-documents__groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hm-client-product-documents__list {
    display: grid;
    gap: 8px;
}

.hm-client-product-documents__row {
    display: grid;
    grid-template-columns: minmax(160px, .55fr) minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.hm-client-product-documents__row input {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    background: #ffffff;
}

.hm-client-product-documents__row button,
.hm-client-product-documents button {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 750;
    background: #ffffff;
}

.hm-client-product-images,
.hm-client-characteristics,
.hm-client-rrc,
.hm-client-related-products,
.hm-client-professional-files,
.hm-client-professional-relations fieldset,
.hm-client-dealer-contacts {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-product-images legend,
.hm-client-characteristics legend,
.hm-client-rrc legend,
.hm-client-related-products legend,
.hm-client-professional-files legend,
.hm-client-professional-relations legend,
.hm-client-dealer-contacts legend {
    padding: 0 6px;
    color: var(--hm-admin-orange);
    font-weight: 850;
}

.hm-client-product-images p,
.hm-client-rrc p,
.hm-client-related-products p,
.hm-client-professional-files p,
.hm-client-professional-relations p,
.hm-client-dealer-contacts p {
    margin: 0;
    color: var(--hm-admin-muted);
    font-size: 13px;
}

.hm-client-characteristics__list {
    display: grid;
    gap: 8px;
}

.hm-client-characteristics__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.hm-client-characteristics__row input {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    background: #ffffff;
}

.hm-client-professional-files__list {
    display: grid;
    gap: 8px;
}

.hm-client-professional-files__row {
    display: grid;
    grid-template-columns: minmax(160px, .55fr) minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.hm-client-professional-files__row > input {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    background: #ffffff;
}

.hm-client-characteristics button,
.hm-client-characteristics__row button,
.hm-client-professional-files button,
.hm-client-professional-files__row button {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font-weight: 750;
    background: #ffffff;
}

.hm-client-characteristics > button,
.hm-client-professional-files > button {
    width: fit-content;
    border-color: var(--hm-admin-orange);
    color: var(--hm-admin-orange);
}

.hm-client-rrc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hm-client-rrc__actions button,
.hm-client-rrc__add-row,
.hm-client-rrc-table button {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    font-weight: 750;
    background: #ffffff;
}

.hm-client-rrc__actions button,
.hm-client-rrc__add-row {
    width: fit-content;
    border-color: var(--hm-admin-orange);
    color: var(--hm-admin-orange);
}

.hm-client-rrc-table {
    display: grid;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.hm-client-rrc-table__head,
.hm-client-rrc-table__row {
    display: grid;
    grid-template-columns: repeat(var(--hm-client-rrc-columns, 3), minmax(150px, 1fr)) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.hm-client-rrc-table__body {
    display: grid;
    gap: 8px;
}

.hm-client-rrc-table__heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.hm-client-rrc-table input {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-ink);
    font: inherit;
    background: #ffffff;
}

.hm-client-rrc-table__heading input {
    border-color: rgba(var(--hm-admin-orange-rgb), .34);
    color: var(--hm-admin-ink);
    font-weight: 850;
    background: #fff8ed;
}

.hm-client-rrc-table__heading button,
.hm-client-rrc-table__row button {
    padding-inline: 10px;
    font-size: 12px;
}

.hm-client-related-products__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hm-client-related-products__list label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
}

.hm-client-product-form .hm-client-product-section {
    display: grid;
    gap: 12px;
    min-width: 0;
    min-inline-size: 0;
    margin: 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(18, 26, 34, .035);
}

.hm-client-product-form .hm-client-product-section > legend,
.hm-client-product-form .hm-client-category-picker__title,
.hm-client-product-form .hm-client-product-documents__group h3 {
    padding: 0 8px;
    color: var(--hm-admin-orange);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.1;
}

.hm-client-product-basics {
    gap: 18px;
    border-color: rgba(var(--hm-admin-orange-rgb), .32);
    box-shadow: 0 10px 30px rgba(var(--hm-admin-orange-rgb), .12);
}

.hm-client-product-basics__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.hm-client-product-title-field {
    gap: 8px;
}

.hm-client-product-title-field .hm-client-product-title-field__heading {
    display: block;
    color: var(--hm-admin-ink);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: none;
}

.hm-client-product-title-field input {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.2;
}

.hm-client-product-form .hm-client-category-picker {
    display: grid;
    gap: 11px;
    padding: 0;
    border: 0;
    background: transparent;
}

.hm-client-product-form > .hm-client-category-picker {
    padding: 14px 16px 16px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(18, 26, 34, .035);
}

.hm-client-product-form .hm-client-category-picker__title {
    margin: 0;
    padding: 0;
}

.hm-client-product-form .hm-client-category-picker__tree {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hm-client-product-form .hm-client-category-choice {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-left: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.hm-client-product-form .hm-client-category-choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.hm-client-product-form .hm-client-category-choice span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: #333a42;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    background: var(--hm-admin-soft);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.hm-client-product-form .hm-client-category-choice--depth-1 span,
.hm-client-product-form .hm-client-category-choice--depth-2 span,
.hm-client-product-form .hm-client-category-choice--depth-3 span {
    background: #ffffff;
}

.hm-client-product-form .hm-client-category-choice input:checked + span {
    border-color: var(--hm-admin-orange);
    color: var(--hm-admin-orange);
    background: rgba(var(--hm-admin-orange-rgb), .18);
    box-shadow: 0 0 0 3px rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-product-form .hm-client-category-choice input:focus-visible + span {
    outline: 2px solid rgba(var(--hm-admin-orange-rgb), .65);
    outline-offset: 2px;
}

.hm-client-product-form .hm-client-category-choice input:active + span {
    transform: translateY(1px);
}

.hm-client-form-actions--product {
    align-items: center;
    flex-wrap: wrap;
    padding-top: 2px;
}

.hm-client-form-actions--product .hm-client-primary {
    min-width: 178px;
    background: var(--hm-admin-orange);
    color: var(--hm-admin-ink);
    box-shadow: 0 6px 16px rgba(var(--hm-admin-orange-rgb), .24);
}

.hm-client-form-actions--product .hm-client-primary.is-saved {
    border-color: #198754;
    background: #198754;
    box-shadow: 0 6px 16px rgba(25, 135, 84, .16);
}

.hm-client-product-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 14px;
    align-items: start;
}

.hm-client-product-admin-column {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.hm-client-product-image-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hm-client-image-input--main {
    grid-column: 1 / -1;
}

.hm-client-image-input {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(18, 26, 34, .08);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-image-input span {
    color: #3b424a;
    font-size: 12px;
    font-weight: 850;
}

.hm-client-upload--compact {
    grid-template-columns: 1fr;
    gap: 6px;
}

.hm-client-upload--compact input[type="file"] {
    min-height: 32px;
    padding: 6px;
    font-size: 12px;
}

.hm-client-product-side-fields {
    display: grid;
    gap: 12px;
}

.hm-client-product-side-editor .hm-client-rich__editor {
    min-height: 150px;
    max-height: 260px;
    overflow: auto;
}

.hm-client-product-description .hm-client-rich__editor {
    min-height: 240px;
}

.hm-client-product-documents__groups {
    gap: 16px;
}

.hm-client-product-documents__group {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(18, 26, 34, .08);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-product-form .hm-client-product-documents__group h3 {
    margin: 0;
    padding: 0;
}

.hm-client-product-form .hm-client-product-documents__row {
    grid-template-columns: 1fr;
    align-items: start;
}

.hm-client-product-form .hm-client-product-documents__row button {
    grid-column: 1 / -1;
    width: fit-content;
}

.hm-client-product-form .hm-client-characteristics__row {
    grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr) auto;
}

.hm-client-form-status {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
}

.hm-client-form-status[hidden] {
    display: none;
}

.hm-client-form-status--success {
    color: #12613d;
    background: #eaf7f0;
}

.hm-client-entity__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}

.hm-client-entity__list {
    display: grid;
    align-content: start;
    gap: 8px;
}

.hm-client-entity__list button {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.hm-client-entity__list button.is-active {
    border-color: var(--hm-admin-orange);
    box-shadow: inset 3px 0 0 var(--hm-admin-orange);
}

.hm-client-entity__list span,
.hm-client-entity__list p {
    margin: 0;
    color: var(--hm-admin-muted);
    font-size: 13px;
}

.hm-client-entity__form {
    display: grid;
    gap: 14px;
}

.hm-client-blog-editor,
.hm-client-cooperation-editor,
.hm-client-events-editor,
.hm-client-professionals-editor,
.hm-client-dealers-editor {
    display: grid;
    gap: 22px;
}

.hm-client-blog-form-panel,
.hm-client-blog-list,
.hm-client-cooperation-form-panel,
.hm-client-cooperation-list,
.hm-client-events-form-panel,
.hm-client-events-list,
.hm-client-professionals-form-panel,
.hm-client-professional-list,
.hm-client-professional-relations,
.hm-client-dealers-form-panel,
.hm-client-dealer-list {
    display: grid;
    gap: 16px;
}

.hm-client-blog-list__items,
.hm-client-cooperation-list__items,
.hm-client-events-list__items,
.hm-client-professional-list__items,
.hm-client-dealer-list__items {
    display: grid;
    gap: 10px;
}

.hm-client-blog-list__items article,
.hm-client-cooperation-list__items article,
.hm-client-events-list__items article,
.hm-client-professional-list__items article,
.hm-client-dealer-list__items article {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-professional-list__items article {
    grid-template-columns: minmax(0, 1fr) auto;
}

.hm-client-blog-list__items article.is-active,
.hm-client-cooperation-list__items article.is-active,
.hm-client-events-list__items article.is-active,
.hm-client-professional-list__items article.is-active,
.hm-client-dealer-list__items article.is-active {
    border-color: var(--hm-admin-orange);
    box-shadow: inset 3px 0 0 var(--hm-admin-orange);
}

.hm-client-blog-list__thumb,
.hm-client-cooperation-list__thumb,
.hm-client-events-list__thumb {
    display: grid;
    min-height: 86px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-muted);
    font-size: 12px;
    font-weight: 800;
    background: #ffffff;
}

.hm-client-blog-list__thumb img,
.hm-client-cooperation-list__thumb img,
.hm-client-events-list__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-client-blog-list__items strong,
.hm-client-blog-list__items small,
.hm-client-blog-list__items p,
.hm-client-cooperation-list__items strong,
.hm-client-cooperation-list__items p,
.hm-client-events-list__items strong,
.hm-client-events-list__items p,
.hm-client-professional-list__items strong,
.hm-client-professional-list__items p,
.hm-client-professional-list__items span,
.hm-client-dealer-list__items strong,
.hm-client-dealer-list__items p,
.hm-client-dealer-list__items span {
    display: block;
    margin: 0;
}

.hm-client-blog-list__items p,
.hm-client-cooperation-list__items p,
.hm-client-events-list__items p,
.hm-client-professional-list__items p,
.hm-client-dealer-list__items p {
    margin-top: 6px;
    color: var(--hm-admin-muted);
}

.hm-client-blog-list__items small {
    width: fit-content;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 8px;
    color: var(--hm-admin-orange);
    font-size: 11px;
    font-weight: 850;
    background: rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-blog-list__actions,
.hm-client-cooperation-list__actions,
.hm-client-events-list__actions,
.hm-client-professional-list__actions,
.hm-client-dealer-list__actions {
    display: grid;
    gap: 8px;
}

.hm-client-blog-list__actions button,
.hm-client-cooperation-list__actions button,
.hm-client-events-list__actions button,
.hm-client-professional-list__actions button,
.hm-client-dealer-list__actions button {
    min-width: 140px;
}

.hm-client-professional-list__items span {
    width: fit-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--hm-admin-orange);
    font-size: 12px;
    font-weight: 800;
    background: rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-professional-relations__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.hm-client-professional-relations fieldset {
    align-content: start;
}

.hm-client-dealer-form__main {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.hm-client-dealer-form__fields {
    display: grid;
    gap: 14px;
}

.hm-client-dealer-logo {
    display: grid;
    width: 132px;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-orange);
    font-size: 24px;
    font-weight: 900;
    background: #ffffff;
}

.hm-client-dealer-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.hm-client-dealer-list__items span {
    margin-top: 8px;
    color: var(--hm-admin-orange);
    font-size: 12px;
    font-weight: 800;
}

.hm-client-category-picker {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
}

.hm-client-category-picker__tree {
    display: grid;
    gap: 8px;
}

.hm-client-category-choice {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-category-choice--depth-1 {
    margin-left: 22px;
}

.hm-client-category-choice--depth-2 {
    margin-left: 44px;
}

.hm-client-category-choice--depth-3 {
    margin-left: 66px;
}

.hm-client-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hm-client-categories__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    gap: 18px;
}

.hm-client-categories--category-page .hm-client-editor__head {
    align-items: flex-start;
}

.hm-client-categories--category-page .hm-client-editor__head h2 {
    font-size: 22px;
}

.hm-client-categories__layout--page {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    align-items: start;
}

.hm-client-category-tree-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.hm-client-category-tree-panel__head {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
}

.hm-client-category-tree-panel__head span {
    color: var(--hm-admin-orange);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.hm-client-category-tree-panel__head strong {
    color: var(--hm-admin-ink);
    font-size: 15px;
    line-height: 1.2;
}

.hm-client-category-tree {
    display: grid;
    gap: 10px;
}

.hm-client-category-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-category-row--depth-1 {
    margin-left: 22px;
}

.hm-client-category-row--depth-2 {
    margin-left: 44px;
}

.hm-client-category-row--depth-3 {
    margin-left: 66px;
}

.hm-client-category-row__icon {
    display: grid;
    width: 46px;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    color: var(--hm-admin-orange);
    font-size: 13px;
    font-weight: 900;
    background: #ffffff;
}

.hm-client-category-row__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.hm-client-category-row strong,
.hm-client-category-row small,
.hm-client-category-row span {
    display: block;
}

.hm-client-category-row small {
    width: fit-content;
    margin: 4px 0;
    padding: 3px 7px;
    border-radius: 8px;
    color: var(--hm-admin-orange);
    font-size: 11px;
    font-weight: 850;
    background: rgba(var(--hm-admin-orange-rgb), .18);
}

.hm-client-category-row span {
    color: var(--hm-admin-muted);
}

.hm-client-category-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.hm-client-category-row__meta b {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 4px 7px;
    border-radius: 7px;
    color: #343a3c;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    background: #ffffff;
}

.hm-client-category-row__actions {
    display: grid;
    gap: 8px;
}

.hm-client-categories--category-page .hm-client-category-tree {
    gap: 8px;
}

.hm-client-category-row--compact.hm-client-category-row--depth-1,
.hm-client-category-row--compact.hm-client-category-row--depth-2,
.hm-client-category-row--compact.hm-client-category-row--depth-3 {
    margin-left: 0;
}

.hm-client-category-row--compact {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 12px;
    height: 104px;
    min-height: 104px;
    max-height: 104px;
    padding: 12px 14px;
    overflow: hidden;
    background: #ffffff;
}

.hm-client-category-row--compact .hm-client-category-row__content {
    display: grid;
    align-content: center;
    min-width: 0;
    gap: 5px;
    height: 100%;
}

.hm-client-category-row--compact strong {
    display: -webkit-box;
    overflow-wrap: anywhere;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--hm-admin-ink);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.12;
}

.hm-client-category-row--compact small {
    display: -webkit-box;
    width: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    border-radius: 0;
    color: var(--hm-admin-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.18;
    background: transparent;
}

.hm-client-category-row--compact .hm-client-category-row__actions {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 6px;
    width: 118px;
    height: 100%;
}

.hm-client-category-row--compact .hm-client-category-row__actions button {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.1;
}

.hm-client-category-row--compact .hm-client-category-row__actions button[data-delete-category] {
    color: #a33000;
}

.hm-client-category-form-wrap {
    width: min(1120px, 100%);
    justify-self: center;
}

.hm-client-category-form {
    display: grid;
    align-content: start;
    gap: 12px;
}

.hm-client-category-page-form {
    gap: 14px;
}

.hm-client-category-page-form .hm-client-field input,
.hm-client-category-page-form .hm-client-field textarea,
.hm-client-category-page-form .hm-client-field select {
    background: #ffffff;
}

.hm-client-category-section {
    display: grid;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(18, 26, 34, .035);
}

.hm-client-category-section--top {
    border-color: rgba(var(--hm-admin-orange-rgb), .32);
    box-shadow: 0 10px 30px rgba(var(--hm-admin-orange-rgb), .12);
}

.hm-client-category-section__head {
    display: grid;
    gap: 4px;
}

.hm-client-category-section__head span {
    color: var(--hm-admin-orange);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.hm-client-category-section__head h3 {
    margin: 0;
    color: var(--hm-admin-ink);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.1;
}

.hm-client-category-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, .72fr);
    gap: 14px;
    align-items: start;
}

.hm-client-category-top-main,
.hm-client-category-top-side {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.hm-client-category-title-field span {
    color: var(--hm-admin-ink);
    font-size: 18px;
    font-weight: 850;
}

.hm-client-category-title-field input {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 16px;
    font-weight: 650;
}

.hm-client-category-admin-grid,
.hm-client-category-video-grid,
.hm-client-category-fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.hm-client-category-video-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(18, 26, 34, .08);
    border-radius: 8px;
    background: var(--hm-admin-soft);
}

.hm-client-category-video-card strong {
    color: var(--hm-admin-ink);
    font-size: 14px;
    line-height: 1.2;
}

.hm-client-category-video-card .hm-client-upload {
    grid-template-columns: minmax(0, 1fr) minmax(146px, auto);
}

.hm-client-category-section--fact .hm-client-category-fact-grid > div {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.hm-client-category-section--fact .hm-client-rich__editor {
    min-height: 210px;
}

.hm-client-category-note {
    margin: 0;
    color: var(--hm-admin-muted);
    font-size: 14px;
    line-height: 1.5;
}

.hm-client-form-actions--category {
    align-items: center;
    flex-wrap: wrap;
    padding: 2px 0 0;
}

.hm-client-form-actions--category .hm-client-primary {
    min-width: 178px;
    background: var(--hm-admin-orange);
    color: var(--hm-admin-ink);
    box-shadow: 0 6px 16px rgba(var(--hm-admin-orange-rgb), .24);
}

.hm-client-form-actions--category .hm-client-primary.is-saved {
    border-color: #198754;
    background: #198754;
    box-shadow: 0 6px 16px rgba(25, 135, 84, .16);
}

.hm-client-category-form__group {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--hm-admin-line);
    border-radius: 8px;
    background: #ffffff;
}

.hm-client-category-form__group h3 {
    margin: 0;
    color: var(--hm-admin-ink);
    font-size: 14px;
    line-height: 1.2;
}

.hm-client-category-form .hm-client-category-save {
    background: var(--hm-admin-orange) !important;
    color: var(--hm-admin-ink) !important;
    box-shadow: 0 10px 22px rgba(var(--hm-admin-orange-rgb), .24);
}

.hm-client-category-form .hm-client-category-save:hover {
    filter: brightness(.96);
}

.hm-client-toast {
    padding: 12px 14px;
    border: 1px solid #bfe7c9;
    border-radius: 8px;
    background: #effaf2;
    color: #16612a;
    font-weight: 700;
}

.hm-client-toast--error {
    border-color: #ffc6b0;
    background: #fff1eb;
    color: #a33000;
}

.hm-client-loading {
    padding: 24px;
    color: var(--hm-admin-muted);
}

@media (max-width: 980px) {
    .hm-client-admin {
        grid-template-columns: 1fr;
    }

    .hm-client-sidebar {
        min-height: auto;
    }

    .hm-client-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-client-entity__layout,
    .hm-client-categories__layout,
    .hm-client-about-cards,
    .hm-client-category-top-grid,
    .hm-client-category-admin-grid,
    .hm-client-category-video-grid,
    .hm-client-category-fact-grid,
    .hm-client-related-products__list,
    .hm-client-category-row,
    .hm-client-blog-list__items article,
    .hm-client-cooperation-list__items article,
    .hm-client-events-list__items article,
    .hm-client-professional-list__items article,
    .hm-client-dealer-list__items article,
    .hm-client-product-filters,
    .hm-client-product-manager-card,
    .hm-client-product-basics__main,
    .hm-client-product-admin-grid,
    .hm-client-product-documents__groups,
    .hm-client-product-documents__row,
    .hm-client-product-form .hm-client-product-documents__row,
    .hm-client-product-form .hm-client-characteristics__row,
    .hm-client-professional-relations__grid,
    .hm-client-dealer-form__main,
    .hm-client-form-grid {
        grid-template-columns: 1fr;
    }

    .hm-client-category-tree-panel {
        position: relative;
        top: auto;
    }

    .hm-client-product-image-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-client-image-input--main {
        grid-column: 1 / -1;
    }

    .hm-client-rich__media {
        grid-template-columns: 1fr;
    }

    .hm-client-characteristics__row,
    .hm-client-professional-files__row {
        grid-template-columns: 1fr;
    }

    .hm-client-category-choice--depth-1,
    .hm-client-category-choice--depth-2,
    .hm-client-category-choice--depth-3,
    .hm-client-category-row--depth-1,
    .hm-client-category-row--depth-2,
    .hm-client-category-row--depth-3 {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .hm-client-workspace {
        padding: 14px;
    }

    .hm-client-topbar,
    .hm-client-editor__head,
    .hm-client-entity__head,
    .hm-client-repeater__head {
        align-items: stretch;
        flex-direction: column;
    }

    .hm-client-upload {
        grid-template-columns: 1fr;
    }

    .hm-client-catalog-tabs {
        grid-template-columns: 1fr;
    }

    .hm-client-product-image-fields {
        grid-template-columns: 1fr;
    }

    .hm-client-product-form .hm-client-product-section {
        padding: 14px;
    }
}
