.hd-box { margin: 40px 0 8px; border: 1px solid rgba(118,255,3,0.45); border-radius: 12px; background: rgba(118,255,3,0.04); overflow: hidden; }
.hd-box[hidden] { display: none; }
.hd-head { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 22px; cursor: pointer; }
.hd-head:focus-visible { outline: 2px solid #76ff03; outline-offset: -4px; }
.hd-title { display: flex; align-items: center; gap: 10px; color: #76ff03; font-weight: bold; font-size: 15px; letter-spacing: 3px; }
.hd-title svg { flex: none; }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-tri { color: #76ff03; transition: transform 0.2s; display: inline-block; }
.hd-box.open .hd-tri { transform: rotate(90deg); }
.hd-badge { background: #ffd75e; color: #0a0e17; font-weight: bold; font-size: 11px; padding: 3px 7px; letter-spacing: 1px; border-radius: 3px; }
.hd-badge[hidden] { display: none; }
.hd-body { display: none; border-top: 1px solid rgba(118,255,3,0.22); padding: 18px 22px 22px; }
.hd-box.open .hd-body { display: block; }
.hd-intro { color: #cfd8dc; font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.hd-new { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; background: #76ff03; color: #0a0e17; font-family: inherit; font-weight: bold; letter-spacing: 2px; font-size: 13px; border: none; border-radius: 6px; cursor: pointer; }
.hd-new:hover { background: #aed581; }
.hd-new:disabled { opacity: 0.5; cursor: default; }
.hd-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 12px; }
.hd-chip { font-family: inherit; padding: 7px 11px; border: 1px solid rgba(207,216,220,0.25); background: transparent; color: #78909c; font-size: 12px; letter-spacing: 1px; cursor: pointer; border-radius: 4px; }
.hd-chip.on { border-color: #76ff03; color: #76ff03; }
.hd-list { display: flex; flex-direction: column; gap: 10px; }
.hd-card { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border: 1px solid rgba(90,184,255,0.4); background: rgba(90,184,255,0.04); border-radius: 6px; cursor: pointer; }
.hd-card:hover, .hd-card:focus-visible { border-color: #b9f6ca; }
.hd-card.replied { border-color: rgba(255,215,94,0.6); background: rgba(255,215,94,0.06); }
.hd-card.closed { border-color: rgba(207,216,220,0.18); background: transparent; opacity: 0.78; }
.hd-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #78909c; font-size: 12px; }
.hd-subj { color: #fff; font-weight: bold; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.hd-st { font-weight: bold; font-size: 11px; padding: 2px 7px; letter-spacing: 1px; border: 1px solid #5ab8ff; color: #5ab8ff; border-radius: 3px; white-space: nowrap; }
.hd-st.replied { background: #ffd75e; border-color: #ffd75e; color: #0a0e17; }
.hd-st.closed { border-color: #78909c; color: #78909c; }
.hd-empty { color: #78909c; font-size: 12px; padding: 8px 0; }
.hd-foot { margin-top: 16px; padding-top: 12px; border-top: 1px dashed rgba(118,255,3,0.22); color: #78909c; font-size: 12px; line-height: 1.7; }
.hd-foot img { height: 17px; width: auto; vertical-align: -4px; }
.hd-foot a { color: #b9f6ca; }
.hd-msg { color: #ff8a80; font-size: 12px; margin-top: 10px; min-height: 16px; letter-spacing: 1px; line-height: 1.5; }
.hd-msg.ok { color: #76ff03; }

.hd-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hd-back { all: unset; box-sizing: border-box; width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(118,255,3,0.3); border-radius: 6px; cursor: pointer; }
.hd-back:focus-visible { outline: 2px solid #76ff03; }
.hd-bar-t { color: #76ff03; font-weight: bold; letter-spacing: 3px; font-size: 14px; }
.hd-bar-t small { display: block; color: #78909c; font-weight: normal; letter-spacing: 0; font-size: 12px; margin-bottom: 3px; }
.hd-bar-t b { color: #fff; letter-spacing: 0; font-size: 14px; overflow-wrap: anywhere; }
.hd-lbl { display: block; color: #b9f6ca; font-size: 12px; letter-spacing: 2px; margin: 16px 0 8px; }
.hd-lbl span { color: #78909c; letter-spacing: 0; }
.hd-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.hd-cat { font-family: inherit; text-align: left; min-height: 54px; padding: 8px 10px; border: 1px solid rgba(207,216,220,0.25); background: transparent; color: #cfd8dc; font-weight: bold; font-size: 13px; letter-spacing: 1px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.hd-cat small { color: #78909c; font-weight: normal; font-size: 11px; letter-spacing: 0; }
.hd-cat.on { border: 2px solid #76ff03; background: rgba(118,255,3,0.1); color: #76ff03; }
.hd-cat.on small { color: #b9f6ca; }
.hd-in, .hd-sel, .hd-ta { box-sizing: border-box; width: 100%; min-height: 46px; padding: 0 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(118,255,3,0.3); color: #fff; font-family: 'Courier New', monospace; font-size: 14px; border-radius: 6px; }
.hd-sel { appearance: none; background-image: none; }
.hd-ta { padding: 12px; line-height: 1.5; min-height: 120px; resize: vertical; }
.hd-in:focus, .hd-sel:focus, .hd-ta:focus { outline: none; border-color: #76ff03; }
.hd-count { text-align: right; color: #78909c; font-size: 11px; margin-top: 4px; }
.hd-drop { all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 86px; border: 1px dashed rgba(118,255,3,0.55); background: rgba(118,255,3,0.03); border-radius: 6px; cursor: pointer; text-align: center; }
.hd-drop.drag { background: rgba(118,255,3,0.1); }
.hd-drop b { color: #76ff03; font-size: 13px; letter-spacing: 1px; }
.hd-drop small { color: #78909c; font-size: 11px; }
.hd-drop:focus-visible { outline: 2px solid #76ff03; }
.hd-files { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hd-file { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(118,255,3,0.22); border-radius: 6px; }
.hd-file.bad { border-color: rgba(255,82,82,0.5); }
.hd-thumb { width: 52px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; border: 1px solid rgba(90,184,255,0.4); color: #5ab8ff; background: #0e1522; overflow: hidden; border-radius: 3px; }
.hd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hd-thumb.pdf { border-color: rgba(255,82,82,0.5); color: #ff8a80; background: rgba(255,82,82,0.08); }
.hd-fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hd-fname { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-fsub { color: #78909c; font-size: 11px; }
.hd-file.bad .hd-fsub { color: #ff8a80; }
.hd-prog { height: 4px; background: rgba(255,255,255,0.08); }
.hd-prog i { display: block; height: 4px; width: 0; background: #76ff03; }
.hd-x { all: unset; width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #78909c; }
.hd-x:focus-visible { outline: 2px solid #76ff03; }
.hd-send { margin-top: 18px; }
.hd-note { color: #78909c; font-size: 12px; text-align: center; margin-top: 10px; line-height: 1.6; }

.hd-track { display: flex; align-items: center; margin: 0 0 18px; }
.hd-step { display: flex; align-items: center; gap: 6px; color: #78909c; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.hd-step i { width: 10px; height: 10px; border: 1px solid #78909c; display: inline-block; box-sizing: border-box; }
.hd-step.done { color: #76ff03; } .hd-step.done i { background: #76ff03; border-color: #76ff03; }
.hd-step.now { color: #ffd75e; font-weight: bold; } .hd-step.now i { background: #ffd75e; border-color: #ffd75e; }
.hd-line { flex: 1; height: 1px; background: rgba(207,216,220,0.2); margin: 0 6px; min-width: 8px; }
.hd-line.done { background: #76ff03; }
.hd-thread { display: flex; flex-direction: column; gap: 16px; }
.hd-m { max-width: 86%; display: flex; flex-direction: column; gap: 6px; }
.hd-m.you { align-self: flex-end; }
.hd-m.staff { align-self: flex-start; }
.hd-m.system { align-self: center; max-width: 100%; color: #78909c; font-size: 11px; letter-spacing: 1px; text-align: center; }
.hd-who { color: #78909c; font-size: 11px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hd-m.you .hd-who { justify-content: flex-end; }
.hd-who b { color: #b9f6ca; }
.hd-tag { background: #76ff03; color: #0a0e17; font-weight: bold; font-size: 10px; padding: 1px 5px; letter-spacing: 1px; border-radius: 2px; }
.hd-bub { padding: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 6px; font-size: 13px; color: #cfd8dc; }
.hd-m.you .hd-bub { background: rgba(118,255,3,0.08); border: 1px solid rgba(118,255,3,0.35); }
.hd-m.staff .hd-bub { background: rgba(255,255,255,0.05); border: 1px solid rgba(207,216,220,0.2); }
.hd-atts { display: flex; gap: 8px; flex-wrap: wrap; }
.hd-m.you .hd-atts { justify-content: flex-end; }
.hd-att { display: flex; flex-direction: column; width: 124px; border: 1px solid rgba(90,184,255,0.4); border-radius: 4px; overflow: hidden; text-decoration: none; }
.hd-att img { width: 124px; height: 78px; object-fit: cover; display: block; background: #0e1522; }
.hd-att.pdf { border-color: rgba(255,82,82,0.5); }
.hd-att .pdfbox { height: 78px; display: flex; align-items: center; justify-content: center; color: #ff8a80; font-weight: bold; background: rgba(255,82,82,0.08); }
.hd-att span { padding: 5px 6px; color: #b9f6ca; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-reply { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(118,255,3,0.22); }
.hd-rrow { display: flex; gap: 10px; margin-top: 10px; }
.hd-attach { all: unset; box-sizing: border-box; width: 52px; min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(118,255,3,0.4); border-radius: 6px; cursor: pointer; }
.hd-attach:focus-visible { outline: 2px solid #76ff03; }
.hd-rrow .hd-new { flex: 1; }
.hd-closebtn { width: 100%; min-height: 44px; margin-top: 10px; font-family: inherit; background: transparent; border: 1px solid rgba(207,216,220,0.25); color: #cfd8dc; font-size: 12px; letter-spacing: 1px; border-radius: 6px; cursor: pointer; }
.hd-closebtn:hover { border-color: #b9f6ca; color: #fff; }
.hd-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 520px) {
  .hd-head, .hd-body { padding-left: 14px; padding-right: 14px; }
  .hd-step { font-size: 9px; letter-spacing: 0; gap: 4px; }
  .hd-line { margin: 0 3px; }
  .hd-m { max-width: 94%; }
}
