/* HQMS gopy - nút Góp ý (cạnh phải, giữa màn hình), khung góp ý, trình khoanh / che ảnh chụp, trang tổng hợp.
   z-index trên nút / hộp Trợ lý AI (2400-2401, module trolyai của ITL) để nút Gửi không bị che.
   Dùng !important ở các thuộc tính dễ bị theme / Bootstrap của AppGini đè (dynamic.css). */
#hqms-gy-btn {
	position: fixed !important; right: 0; top: 46%; z-index: 2390; display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 10px 6px !important; border: 0 !important; border-radius: 8px 0 0 8px !important; background: #f59e0b !important; color: #fff !important;
	font: 600 12px/1.1 Arial, sans-serif !important; box-shadow: -2px 2px 8px rgba(0, 0, 0, .2); cursor: pointer; opacity: .85; transition: opacity .15s, padding .15s;
}
#hqms-gy-btn:hover, #hqms-gy-btn:focus { opacity: 1; padding-right: 10px !important; outline: none; }
#hqms-gy-btn span { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .5px; }
#hqms-gy-btn.hqms-gy-busy { cursor: progress; opacity: .6; }
#hqms-gy-btn.hqms-gy-busy .glyphicon { animation: hqms-gy-spin 1s linear infinite; }
@keyframes hqms-gy-spin { to { transform: rotate(360deg); } }
@media print { #hqms-gy-btn, #hqms-gy-panel { display: none !important; } }

#hqms-gy-panel {
	position: fixed; top: 56px; right: 12px; bottom: 12px; width: 440px; max-width: calc(100vw - 24px); z-index: 2450; display: flex; flex-direction: column;
	background: #fff; border: 1px solid #d0d7de; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 13px; color: #1f2328; text-align: left;
}
.hqms-gy-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #eaeef2; background: #fffbeb; border-radius: 8px 8px 0 0; }
.hqms-gy-head b { font-size: 15px; white-space: nowrap; }
.hqms-gy-where { flex: 1; min-width: 0; color: #57606a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hqms-gy-x { border: 0; background: none; font-size: 22px; line-height: 1; color: #57606a; cursor: pointer; }
.hqms-gy-body { flex: 1; overflow-y: auto; padding: 6px 14px 10px; }
.hqms-gy-lbl { display: block; margin: 10px 0 4px !important; font-weight: 600; }
.hqms-gy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hqms-gy-chip { border: 1px solid #d0d7de; background: #f6f8fa; border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: #1f2328; }
.hqms-gy-chip.on { background: #f59e0b; border-color: #d97706; color: #fff; }
#hqms-gy-panel textarea { resize: vertical; min-height: 96px; font-size: 13px; }
.hqms-gy-thumb { border: 1px solid #d0d7de; border-radius: 4px; overflow: hidden; cursor: crosshair; max-height: 220px; background: #f6f8fa; }
.hqms-gy-thumb img { display: block; width: 100%; }
.hqms-gy-thumb.off { opacity: .3; cursor: default; filter: grayscale(1); }
.hqms-gy-shotbar { margin-top: 4px; }
.hqms-gy-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hqms-gy-file { background: #eef2ff; border-radius: 4px; padding: 2px 4px 2px 8px; font-size: 12px; }
.hqms-gy-file button { border: 0; background: none; color: #b91c1c; font-size: 15px; line-height: 1; cursor: pointer; }
.hqms-gy-ctx { margin-top: 10px; font-size: 12px; }
.hqms-gy-ctx summary { cursor: pointer; color: #57606a; }
.hqms-gy-ctx > div > div { word-break: break-all; white-space: pre-wrap; margin-top: 3px; }
.hqms-gy-msg .alert { margin: 10px 0 0; padding: 7px 10px; }
.hqms-gy-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid #eaeef2; }

.hqms-gy-toast {
	position: fixed; right: 16px; top: 60px; z-index: 2470; max-width: 380px; padding: 10px 30px 10px 14px; border-radius: 6px;
	background: #065f46; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-size: 13px;
}
.hqms-gy-toast a { color: #fff !important; text-decoration: underline !important; font-weight: 600; }
.hqms-gy-toast button { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: #fff; font-size: 18px; cursor: pointer; }

#hqms-gy-editor { position: fixed; inset: 0; z-index: 2460; display: flex; flex-direction: column; background: rgba(15, 23, 42, .92); }
.hqms-gy-tools { display: flex; gap: 6px; align-items: center; padding: 8px 12px; background: #0f172a; }
.hqms-gy-tools button { border: 1px solid #334155; background: #1e293b; color: #e2e8f0; border-radius: 4px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.hqms-gy-tools button.on { background: #e11d48; border-color: #e11d48; color: #fff; }
.hqms-gy-tools .hqms-gy-ok { background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 600; }
.hqms-gy-sp { flex: 1; }
.hqms-gy-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hqms-gy-stage canvas { cursor: crosshair; box-shadow: 0 0 0 1px #475569; touch-action: none; }

/* trang module */
.gy-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gy-card { flex: 1 1 120px; display: block; padding: 10px 12px; border-radius: 6px; background: #fff; border: 1px solid #d0d7de; color: inherit !important; text-decoration: none !important; }
.gy-card.active { border-color: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.gy-card-n { display: block; font-size: 22px; font-weight: 700; }
.gy-card-l { color: #57606a; font-size: 12px; }
.gy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gy-box { background: #fff; border: 1px solid #d0d7de; border-radius: 6px; padding: 8px 10px; }
.gy-box h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.gy-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 12px; margin-bottom: 3px; }
.gy-bar a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gy-bar i { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.gy-bar i b { display: block; height: 100%; background: #f59e0b; }
.gy-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; margin-bottom: 10px; }
.gy-filter .form-control { width: auto; max-width: 220px; }
.gy-table td { vertical-align: top !important; }
.gy-table .gy-nd { max-width: 520px; white-space: pre-wrap; word-break: break-word; }
.gy-table .gy-sub { color: #57606a; font-size: 12px; }
.gy-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; }
@media (max-width: 900px) { .gy-detail { grid-template-columns: 1fr; } }
.gy-shot img { max-width: 100%; border: 1px solid #d0d7de; border-radius: 4px; }
.gy-kv th { white-space: nowrap; color: #57606a; font-weight: 600; padding: 3px 10px 3px 0; vertical-align: top; }
.gy-kv td { padding: 3px 0; word-break: break-word; }
.gy-reply { background: #ecfdf5; border-left: 3px solid #10b981; padding: 8px 10px; white-space: pre-wrap; margin-top: 6px; }
.gy-pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 260px; overflow: auto; }
