/* Front-end quick reply popover */
.hmy-ticket-quick-reply-button{margin-left:8px!important}
.hmy-ticket-quick-reply-panel{position:fixed;z-index:2099;width:360px;max-width:calc(100vw - 24px);height:min(430px,calc(100vh - 24px));display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #dfe5ec;border-radius:8px;box-shadow:0 12px 32px rgba(15,23,42,.18);padding:8px}.hmy-ticket-quick-reply-panel [data-hmyqr-body]{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.hmy-ticket-quick-reply-head{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 10px;border-bottom:1px solid #edf0f5;color:#1e293b;font-size:14px;font-weight:600}
.hmy-ticket-quick-reply-head [data-hmyqr-back]{border:0;background:transparent;color:#2563eb;cursor:pointer;padding:4px 0;font-size:12px}
.hmy-ticket-quick-reply-close{border:0;background:transparent;color:#64748b;font-size:18px;line-height:1;cursor:pointer;padding:4px}
.hmy-ticket-quick-reply-group{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid #f2f4f7;background:#fff;text-align:left;padding:13px 8px;cursor:pointer;color:#334155;font-size:13px}
.hmy-ticket-quick-reply-group:hover,.hmy-ticket-quick-reply-item:hover{background:#f5f8ff}
.hmy-ticket-quick-reply-group:focus-visible,.hmy-ticket-quick-reply-item:focus-visible,.hmy-ticket-quick-reply-close:focus-visible,.hmy-ticket-quick-reply-head [data-hmyqr-back]:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:-2px}
.hmy-ticket-quick-reply-group em{font-style:normal;color:#94a3b8;font-size:12px}
.hmy-ticket-quick-reply-item{display:block;width:100%;border:0;border-bottom:1px solid #f2f4f7;background:#fff;text-align:left;padding:11px 8px;cursor:pointer;color:#334155}
.hmy-ticket-quick-reply-name{font-size:13px;font-weight:600;color:#2563eb;margin-bottom:4px}
.hmy-ticket-quick-reply-text{font-size:12px;color:#64748b;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.hmy-ticket-quick-reply-state{padding:24px 8px;text-align:center;color:#94a3b8;font-size:13px}
.hmy-ticket-quick-reply-button[disabled]{opacity:.6;cursor:wait}

/* Admin management page: keep all rules inside the plugin namespace. */
.hmyqr-wrap{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#1e293b;background:#f1f5f9;padding:24px 20px 32px;min-height:calc(100vh - 80px)}
.hmyqr-wrap *{box-sizing:border-box}
.hmyqr-head{display:flex;align-items:flex-start;justify-content:space-between;margin:0 auto 20px;max-width:1840px}
.hmyqr-title{font-size:24px;line-height:1.3;font-weight:700;color:#0f172a}
.hmyqr-muted{color:#94a3b8;font-size:13px;line-height:1.6;margin-top:5px}.hmyqr-display-settings{display:flex;align-items:center;flex-wrap:wrap;gap:10px;max-width:1840px;margin:0 auto 20px;padding:14px 16px;background:#fff;border:1px solid #dfe7f1;border-radius:8px}.hmyqr-display-settings label{font-size:13px;font-weight:600;color:#334155}.hmyqr-display-settings select{height:40px;min-width:150px;border:1px solid #d8e1ec;border-radius:5px;background:#f8fafc;color:#334155;padding:8px 11px;font-size:13px}.hmyqr-setting-note{color:#94a3b8;font-size:12px;line-height:1.5}.hmyqr-protected{display:inline-block;color:#64748b;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:6px 9px;line-height:1.3;font-size:12px}
.hmyqr-grid{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:20px;max-width:1840px;margin:0 auto;align-items:start}
.hmyqr-card{background:#fff;border:1px solid #dfe7f1;border-radius:8px;padding:20px;box-shadow:0 2px 8px rgba(15,23,42,.04);min-width:0}
.hmyqr-card h4{margin:0 0 16px;color:#172033;font-size:20px;line-height:1.35;font-weight:600}
.hmyqr-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 110px 116px;gap:10px;align-items:start;margin-bottom:20px}
.hmyqr-group-row{display:grid;grid-template-columns:minmax(0,1fr) 78px 86px 62px;gap:8px;align-items:start;margin-bottom:18px}
.hmyqr-form textarea,.hmyqr-form input,.hmyqr-form select,.hmyqr-group-row input,.hmyqr-group-row select{width:100%;min-width:0;height:40px;box-sizing:border-box;border:1px solid #d8e1ec;border-radius:5px;background:#f8fafc;color:#334155;padding:8px 11px;font-size:13px;line-height:1.4;transition:border-color .2s,box-shadow .2s,background .2s}
.hmyqr-form textarea{grid-column:1/-1;height:auto;min-height:86px;resize:vertical;line-height:1.6}
.hmyqr-form textarea:focus,.hmyqr-form input:focus,.hmyqr-form select:focus,.hmyqr-group-row input:focus,.hmyqr-group-row select:focus{outline:0;border-color:#2563eb;background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.hmyqr-btn{min-height:40px;border:1px solid #d8e1ec;background:#fff;color:#334155;border-radius:5px;padding:8px 14px;cursor:pointer;font-size:13px;line-height:1.4;transition:color .2s,border-color .2s,background .2s,box-shadow .2s}
.hmyqr-btn:hover{border-color:#93b4ef;color:#1d4ed8;background:#f8fbff}
.hmyqr-btn:focus-visible,.hmyqr-switch:focus-visible{outline:2px solid rgba(37,99,235,.35);outline-offset:1px}
.hmyqr-primary{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 2px 5px rgba(37,99,235,.2)}
.hmyqr-primary:hover{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.hmyqr-primary:disabled,.hmyqr-btn:disabled{opacity:.55;cursor:not-allowed}
.hmyqr-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;table-layout:auto}
.hmyqr-table th,.hmyqr-table td{padding:11px 9px;border-top:1px solid #edf2f7;text-align:left;vertical-align:top;line-height:1.55}
.hmyqr-table th{background:#f8fafc;color:#475569;font-weight:600;white-space:nowrap;border-top:0}
.hmyqr-table thead th:first-child{border-radius:5px 0 0 0}.hmyqr-table thead th:last-child{border-radius:0 5px 0 0}
.hmyqr-table tbody tr:hover td{background:#fbfdff}
.hmyqr-content{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-width:720px;line-height:1.65;color:#475569}
.hmyqr-actions button{margin:0 5px 5px 0}
.hmyqr-empty{text-align:center;color:#94a3b8;padding:28px!important}
.hmyqr-switch{display:inline-block;cursor:pointer;color:#2563eb;border:1px solid #d8e1ec;background:#fff;border-radius:4px;padding:6px 9px;line-height:1.3;white-space:nowrap}
.hmyqr-switch:hover{border-color:#93b4ef;background:#f8fbff;color:#1d4ed8}
.hmyqr-group-table th:last-child,.hmyqr-group-table td:last-child{min-width:166px}

@media (min-width:901px){.hmyqr-grid>.hmyqr-card:first-child{min-height:478px}.hmyqr-grid>.hmyqr-card:last-child{min-width:0}.hmyqr-card:last-child .hmyqr-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 110px 116px}}
@media (max-width:1200px) and (min-width:901px){.hmyqr-wrap{padding-left:16px;padding-right:16px}.hmyqr-grid{grid-template-columns:minmax(280px,32%) minmax(0,1fr);gap:16px}.hmyqr-card{padding:16px}.hmyqr-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 90px 100px}}
@media (max-width:900px){.hmyqr-wrap{padding:18px 12px 28px;min-height:0}.hmyqr-head{margin-bottom:16px}.hmyqr-title{font-size:21px}.hmyqr-grid{grid-template-columns:1fr;gap:14px}.hmyqr-card{padding:16px;border-radius:7px}.hmyqr-card h4{font-size:19px;margin-bottom:14px}.hmyqr-group-row,.hmyqr-form{grid-template-columns:1fr;gap:9px;margin-bottom:16px}.hmyqr-form textarea{grid-column:auto;min-height:104px}.hmyqr-form textarea,.hmyqr-form input,.hmyqr-form select,.hmyqr-group-row input,.hmyqr-group-row select,.hmyqr-btn{min-height:42px;height:auto}.hmyqr-form button,.hmyqr-group-row button{width:100%}.hmyqr-table{display:table;table-layout:fixed;word-break:break-word}.hmyqr-table th,.hmyqr-table td{padding:10px 6px;white-space:normal;overflow-wrap:anywhere}.hmyqr-table th{font-size:12px}.hmyqr-table td{font-size:12px}.hmyqr-table th:nth-child(1),.hmyqr-table td:nth-child(1){width:11%}.hmyqr-table th:nth-child(2),.hmyqr-table td:nth-child(2){width:18%}.hmyqr-table th:nth-child(3),.hmyqr-table td:nth-child(3){width:18%}.hmyqr-table th:nth-child(4),.hmyqr-table td:nth-child(4){width:24%}.hmyqr-table th:nth-child(5),.hmyqr-table td:nth-child(5){width:10%}.hmyqr-table th:nth-child(6),.hmyqr-table td:nth-child(6){width:10%}.hmyqr-table th:nth-child(7),.hmyqr-table td:nth-child(7){width:19%}.hmyqr-group-table{table-layout:auto}.hmyqr-group-table th:last-child,.hmyqr-group-table td:last-child{min-width:0;width:46%}.hmyqr-group-table td:last-child{white-space:normal}.hmyqr-actions button,.hmyqr-table td:last-child .hmyqr-btn{margin:0 3px 5px 0;padding:7px 8px}.hmyqr-content{max-width:none;line-height:1.55}.hmyqr-switch{padding:6px 7px}}
@media (max-width:380px){.hmyqr-wrap{padding-left:8px;padding-right:8px}.hmyqr-card{padding:12px}.hmyqr-table th,.hmyqr-table td{padding-left:4px;padding-right:4px}.hmyqr-table th,.hmyqr-table td{font-size:11px}.hmyqr-table th:nth-child(1),.hmyqr-table td:nth-child(1){width:10%}.hmyqr-table th:nth-child(2),.hmyqr-table td:nth-child(2){width:17%}.hmyqr-table th:nth-child(3),.hmyqr-table td:nth-child(3){width:17%}.hmyqr-table th:nth-child(4),.hmyqr-table td:nth-child(4){width:25%}.hmyqr-table th:nth-child(5),.hmyqr-table td:nth-child(5){width:9%}.hmyqr-table th:nth-child(6),.hmyqr-table td:nth-child(6){width:9%}.hmyqr-table th:nth-child(7),.hmyqr-table td:nth-child(7){width:20%}}

@media (max-width:767px){.hmy-ticket-quick-reply-panel{width:auto;left:12px!important;right:12px;max-width:none;max-height:calc(100vh - 24px)}.hmy-ticket-quick-reply-mobile-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}.hmy-ticket-quick-reply-mobile-actions>.hmy-ticket-quick-reply-actions{display:flex!important;flex:0 0 100%!important;flex-wrap:nowrap!important;order:3!important;gap:8px!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin:8px 0 0!important}.hmy-ticket-quick-reply-actions>.hmy-ticket-quick-reply-upload-source,.hmy-ticket-quick-reply-actions>.hmy-ticket-quick-reply-button{box-sizing:border-box!important;flex:1 1 0!important;width:0!important;max-width:none!important;min-width:0!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important}.hmy-ticket-quick-reply-actions>.hmy-ticket-quick-reply-upload-source{display:block!important}.hmy-ticket-quick-reply-actions>.hmy-ticket-quick-reply-upload-source>.hmy-ticket-quick-reply-upload{width:100%!important;max-width:100%!important;margin:0!important}.hmy-ticket-quick-reply-actions>.hmy-ticket-quick-reply-button{display:block!important}}
