.hm-ecp-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e7dff0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 20, 51, 0.06);
}

.hm-ecp-panel__title {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.3;
    color: #2f2940;
}

.hm-ecp-panel__body,
.hm-ecp-panel__field,
.hm-ecp-panel__field label,
.hm-ecp-panel__field span {
    color: #2f2940;
}

.hm-ecp-panel__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #2f2940;
    font-weight: 600;
}

.hm-ecp-panel__details[hidden] { display: none !important; }

.hm-ecp-panel__profile-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: end;
}

.hm-ecp-panel__profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hm-ecp-panel__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.hm-ecp-panel__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hm-ecp-panel__field--grow { min-width: 0; }
.hm-ecp-panel__field--full { grid-column: 1 / -1; }
.hm-ecp-panel__field > span {
    color: #6f6784;
    font-size: 12px;
    font-weight: 600;
}

.hm-ecp-panel__input,
.hm-ecp-panel__textarea,
.hm-ecp-panel__select,
.hm-ecp-panel__input:focus,
.hm-ecp-panel__textarea:focus,
.hm-ecp-panel__select:focus {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d8d3e6;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fff;
    color: #2f2940 !important;
    caret-color: #2f2940;
}

.hm-ecp-panel__input::placeholder,
.hm-ecp-panel__textarea::placeholder {
    color: #8a839b !important;
    opacity: 1;
}

.hm-ecp-panel__textarea {
    min-height: 90px;
    resize: vertical;
}

.hm-ecp-panel__hint {
    display: block;
    margin-top: 6px;
    color: #6f6784;
    font-size: 12px;
}

#hm-ecp-generate {
    align-self: flex-start;
    margin-top: 8px;
}

.hm-ecp-panel__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.hm-ecp-panel__status {
    font-size: 12px;
    color: #6f6784;
}
.hm-ecp-panel__status.is-success { color: #0A7A3F; }
.hm-ecp-panel__status.is-error { color: #a32136; }

.hm-ecp-modal[hidden] { display: none !important; }
.hm-ecp-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(17, 13, 29, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.hm-ecp-modal__dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(17, 13, 29, 0.2);
    padding: 20px;
}
.hm-ecp-modal__header,
.hm-ecp-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.hm-ecp-modal__title {
    margin: 0;
    font-size: 18px;
    color: #2f2940;
}
.hm-ecp-modal__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6f6784;
}
.hm-ecp-modal__body { margin: 16px 0; }
body.hm-ecp-modal-open { overflow: hidden; }

.hm-file-card__title-row,
.hm-dropfiles-single__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.hm-ecp-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.hm-ecp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(15, 169, 88, 0.20);
    border-radius: 999px;
    background: rgba(15, 169, 88, 0.08);
    color: #0a7a3f !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none !important;
}
.hm-ecp-badge:hover,
.hm-ecp-badge:focus,
.hm-ecp-badge:active {
    background: rgba(15, 169, 88, 0.12);
    border-color: rgba(15, 169, 88, 0.30);
    color: #0a7a3f !important;
}
.hm-ecp-badge__icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
}
.hm-ecp-badge__icon img {
    width: 100%;
    height: 100%;
    display: block;
}
.tooltip.hm-ecp-bootstrap-tooltip .tooltip-inner {
    max-width: 340px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    color: #2f2940;
    border: 1px solid #e7dff0;
    box-shadow: 0 12px 30px rgba(31, 20, 51, 0.14);
    text-align: left;
    font-size: 13px;
    line-height: 1.45;
}
.hm-ecp-tooltip__title {
    margin: 0 0 8px;
    font-weight: 700;
    color: #2f2940;
}
.hm-ecp-tooltip__row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.hm-ecp-tooltip__label { color: #6f6784; }
.hm-ecp-tooltip__value,
.hm-ecp-tooltip__text { color: #2f2940; word-break: break-word; }

@media (max-width: 991.98px) {
    .hm-ecp-panel__profile-row,
    .hm-ecp-panel__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .hm-ecp-modal { padding: 12px; }
    .hm-ecp-modal__dialog { padding: 16px; }
    .hm-ecp-tooltip__row { grid-template-columns: 1fr; gap: 2px; }
}


/* v0.1.2.2 admin UI polish */
.hm-ecp-panel__profile-row {
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: end;
}

.hm-ecp-panel__select {
    min-width: 220px;
    appearance: auto;
}

.hm-ecp-panel__action-btn {
    min-height: 42px;
    padding: 0 16px;
    white-space: nowrap;
}

.hm-ecp-panel__field.is-disabled > span {
    opacity: .72;
}

.hm-ecp-panel__input:disabled,
.hm-ecp-panel__select:disabled {
    background: #f3f5f9 !important;
    color: #6f6784 !important;
    border-color: #d8dfe9 !important;
    cursor: not-allowed;
    opacity: 1;
}

.hm-ecp-panel__textarea {
    color: #2f2940 !important;
}

@media (max-width: 991.98px) {
    .hm-ecp-panel__profile-row {
        grid-template-columns: 1fr;
    }

    .hm-ecp-panel__action-btn {
        width: 100%;
    }
}


/* v0.1.3.2 backend polish */
.hm-ecp-panel__preview {
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #e7dff0;
    border-radius: 12px;
    background: #fbfafd;
}

.hm-ecp-panel__preview-head {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6f6784;
}

.hm-ecp-panel__preview-text,
.hm-ecp-panel__preview-json {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #2f2940;
    background: #fff;
    border: 1px solid #ece7f3;
    border-radius: 10px;
    padding: 10px 12px;
}

.hm-ecp-panel__snapshot {
    margin-top: 10px;
}

.hm-ecp-panel__snapshot summary {
    cursor: pointer;
    color: #6A2C91;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* 0.1.3.2.2 admin text visibility + profile lock */
.hm-ecp-panel__input,
.hm-ecp-panel__textarea,
.hm-ecp-panel__input:focus,
.hm-ecp-panel__textarea:focus {
    color: #2f2940 !important;
    caret-color: #2f2940;
}
.hm-ecp-panel__input::placeholder,
.hm-ecp-panel__textarea::placeholder {
    color: #8a839b !important;
    opacity: 1;
}
.hm-ecp-panel__field,
.hm-ecp-panel__field > span,
.hm-ecp-panel__body,
.hm-ecp-panel__toggle,
.hm-ecp-panel__hint {
    color: #2f2940 !important;
}
.hm-ecp-panel__field.is-disabled {
    opacity: .85;
}
.hm-ecp-panel__field.is-disabled .hm-ecp-panel__input {
    background: #f6f4fa;
    color: #5e576f !important;
}
