:root{--hbl-ink:#17252b;--hbl-muted:#66757c;--hbl-line:#dce5e7;--hbl-soft:#f5f8f8;--hbl-brand:#315f5a;--hbl-gold:#c6a15b;--hbl-danger:#b42318}
.hbl-form-layout,.hbl-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}
.hbl-form-layout main,.hbl-detail-layout main{min-width:0;display:grid;gap:18px}
.hbl-form-layout aside,.hbl-sidebar{position:sticky;top:82px;display:grid;gap:16px}
.hbl-create-form{overflow:visible}.hbl-create-form .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}
.hbl-create-form .hbl-field-wide{grid-column:1/-1}.hbl-create-form textarea,.hbl-create-form input,.hbl-create-form select{width:100%}
.hbl-create-form textarea{min-height:108px;resize:vertical}.hbl-create-form .field label{display:flex;gap:4px;font-weight:750;color:var(--hbl-ink);margin-bottom:7px}
.hbl-create-form .field label b{color:var(--hbl-danger)}.hbl-create-form .field small{display:block;color:var(--hbl-muted);margin-top:6px}
.hbl-create-form .field em{display:block;color:var(--hbl-danger);font-style:normal;font-size:12px;margin-top:5px}
.hbl-rule-box{border:1px solid #cbdedb;background:#f1f8f6;border-radius:12px;padding:14px 16px;color:#244d49}
.hbl-rule-box p{margin:5px 0 0;line-height:1.55}.sticky-actions{position:sticky;bottom:12px;display:flex;justify-content:flex-end;gap:10px;padding:12px;margin:18px -4px -4px;border:1px solid rgba(220,229,231,.9);border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 10px 32px rgba(23,37,43,.13);z-index:5;backdrop-filter:blur(8px)}
.hbl-preview{margin-top:18px;border:1px solid #cbdedb;background:#fbfdfc;border-radius:12px;padding:16px}.hbl-preview article{display:grid;gap:7px;padding:13px 0;border-top:1px solid var(--hbl-line)}.hbl-preview article header{display:flex;justify-content:space-between;gap:12px}.hbl-preview article p,.hbl-preview article small{margin:0}.hbl-preview article small{color:var(--hbl-muted)}
.hbl-picker{display:grid;gap:9px;max-height:62vh;overflow:auto;padding-right:3px}.container-btn{display:grid;gap:3px;text-align:left;border:1px solid var(--hbl-line);border-radius:11px;background:#fff;padding:11px 12px;cursor:pointer;transition:.18s ease;color:var(--hbl-ink)}
.container-btn:hover{border-color:#8fb3ad;transform:translateY(-1px)}.container-btn.selected{border-color:var(--hbl-brand);background:#edf7f5;box-shadow:0 0 0 2px rgba(49,95,90,.1)}
.container-btn span,.container-btn small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container-btn span{color:#43565d}.container-btn small{color:var(--hbl-muted)}
.hbl-page-head{gap:18px}.hbl-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.hbl-actions form{display:inline-flex;margin:0}.title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hbl-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.hbl-status.is-draft{color:#8a5700;background:#fff3d6}.hbl-status.is-final{color:#17633c;background:#daf4e5}.hbl-status.is-void{color:#912018;background:#fee4e2}
.hbl-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;border:1px solid var(--hbl-line);border-radius:12px;overflow:hidden}.hbl-summary>div{padding:14px 16px;border-bottom:1px solid var(--hbl-line);min-width:0}.hbl-summary>div:nth-child(odd){border-right:1px solid var(--hbl-line)}.hbl-summary>div:nth-last-child(-n+2){border-bottom:0}
.hbl-summary dt,.hbl-meta dt{font-size:11px;font-weight:800;letter-spacing:.055em;color:var(--hbl-muted);margin-bottom:5px}.hbl-summary dd,.hbl-meta dd{margin:0;overflow-wrap:anywhere;line-height:1.5;color:var(--hbl-ink)}
.hbl-commodity-list{display:grid}.hbl-commodity-list article{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid var(--hbl-line)}.hbl-commodity-list article:last-child{border-bottom:0}.hbl-commodity-list article>div{display:grid;gap:6px}.hbl-commodity-list article>div:last-child{text-align:right}.hbl-commodity-list span{border-radius:7px;background:var(--hbl-soft);padding:4px 7px;font-size:12px}.hbl-commodity-list small{color:var(--hbl-muted)}
.hbl-meta{display:grid;gap:13px;margin:0}.hash{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;word-break:break-all}.hbl-timeline{display:grid;gap:0}.hbl-timeline article{display:grid;gap:4px;padding:11px 0 11px 15px;border-left:2px solid #dce8e5;position:relative}.hbl-timeline article:before{content:"";position:absolute;left:-5px;top:17px;width:8px;height:8px;border-radius:50%;background:var(--hbl-brand)}.hbl-timeline span,.hbl-timeline p{font-size:12px;color:var(--hbl-muted);margin:0}.hbl-timeline a{font-size:12px;color:var(--hbl-brand);font-weight:700}.hbl-danger{border-color:#f4c7c3}
.hbl-upload-card{padding:20px;margin-bottom:18px}.hbl-source-upload{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:14px;align-items:end}.hbl-source-upload .field{min-width:0}.hbl-source-upload label,.hbl-source-upload small{display:block}.hbl-source-upload label{font-weight:800;margin-bottom:7px}.hbl-source-upload small{color:var(--hbl-muted);font-size:11px;margin-top:5px}.hbl-source-upload input[type=file]{width:100%;border:1px dashed #b9cacc;border-radius:10px;background:var(--hbl-soft);padding:10px}
.hbl-state{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}.hbl-state.good{color:#17633c;background:#daf4e5}.hbl-state.warn{color:#8a5700;background:#fff3d6}.hbl-state.bad{color:#912018;background:#fee4e2}
@media(max-width:1050px){.hbl-form-layout,.hbl-detail-layout{grid-template-columns:1fr}.hbl-form-layout aside,.hbl-sidebar{position:static}.hbl-picker{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}.hbl-source-upload{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.hbl-create-form .form-grid,.hbl-summary{grid-template-columns:1fr}.hbl-summary>div,.hbl-summary>div:nth-child(odd){border-right:0;border-bottom:1px solid var(--hbl-line)}.hbl-summary>div:last-child{border-bottom:0}.hbl-picker{grid-template-columns:1fr}.sticky-actions{position:static;display:grid}.sticky-actions .btn{width:100%}.hbl-actions{justify-content:flex-start}.hbl-actions>*{flex:1 1 140px}.hbl-actions .btn{width:100%}.hbl-source-upload{grid-template-columns:1fr}.hbl-commodity-list article{display:grid}.hbl-commodity-list article>div:last-child{text-align:left}}
