.hp-editor-grid {
    display: grid;
    grid-template-columns: minmax(620px, 1fr) minmax(340px, 430px);
    gap: 1rem;
    align-items: start;
}

.hp-editor-main {
    display: grid;
    gap: 1rem;
}

.hp-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.hp-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: .45rem;
    padding: .75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.hp-panel h2 {
    margin: -.75rem -.75rem .75rem;
    padding: .35rem .55rem;
    font-size: 1rem;
    color: white;
    background: #bfc5bf;
}

.hp-panel-green h2 {
    background: var(--green);
}

.hp-panel-yellow h2 {
    background: var(--yellow);
    color: #1d1d1d;
}

.hp-supplier-line {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(230px, 1fr);
    gap: .75rem;
}

.hp-positions-head,
.hp-sum-bar,
.actions,
.page-head {
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hp-positions-table {
    font-size: .9rem;
}

.hp-positions-table th {
    background: #c7ccc7;
    color: #1d1d1d;
}

.hp-positions-table input,
.hp-positions-table select {
    padding: .42rem;
    min-width: 80px;
}

.hp-positions-table td:first-child input {
    min-width: 210px;
}

.hp-positions-table td:nth-child(2) select {
    min-width: 210px;
}

.remove-row {
    padding: .35rem .6rem;
    background: #8a1f11;
}

.hp-sum-bar {
    background: var(--yellow-soft);
    border: 1px solid var(--border);
    padding: .6rem;
    border-radius: .4rem;
    margin-top: .75rem;
}

.good {
    color: var(--green-dark);
}

.bad {
    color: #b42318;
}

.hp-category-preview {
    margin-top: 1rem;
}

.category-block {
    border: 1px solid var(--border);
    margin-bottom: .45rem;
}

.category-title {
    display: flex;
    justify-content: space-between;
    padding: .35rem .5rem;
    background: #bfc5bf;
    color: white;
    font-weight: 700;
}

.category-block ul {
    margin: 0;
    padding: .3rem .5rem;
    list-style: none;
}

.category-block li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eef0ee;
    padding: .2rem 0;
}

.hp-note-box {
    margin-top: 1rem;
}

.hp-pdf-panel {
    background: #c7cac7;
    border: 1px solid #777;
    padding: .75rem;
    min-height: 720px;
}

.hp-pdf-panel h1 {
    text-align: center;
    font-size: 1.9rem;
    margin: 0 0 .75rem;
}

.hp-upload-box {
    display: block;
    background: white;
    border: 1px solid var(--border);
    padding: .6rem;
    border-radius: .4rem;
    margin-bottom: .75rem;
}

.hp-pdf-frame {
    position: relative;
    height: 640px;
    background: white;
    border: 1px solid #999;
}

.hp-pdf-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: white;
}

#pdfPlaceholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #555;
    text-align: center;
    padding: 1rem;
}

.hidden {
    display: none !important;
}

.button {
    display: inline-block;
    background: var(--green);
    color: white;
    border: 0;
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-weight: 700;
}

.alert-success {
    background: #edf8ef;
    color: var(--green-dark);
    border: 1px solid #b9e2c1;
}

.status {
    display: inline-block;
    background: var(--yellow-soft);
    border-radius: 999px;
    padding: .2rem .5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.checkbox input {
    width: auto;
    margin: 0;
}

@media (max-width: 1180px) {
    .hp-editor-grid,
    .hp-meta-row,
    .hp-supplier-line {
        grid-template-columns: 1fr;
    }

    .hp-pdf-panel {
        min-height: auto;
    }

    .hp-pdf-frame {
        height: 520px;
    }
}
