.qbq{font-family:Arial,sans-serif;color:#172c35;max-width:1260px;margin:0 auto;padding:12px}
.qbq h2{margin:6px 0 10px;color:#002f3c}.qbq nav{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.qbq button{border:1px solid #a8bdc5;background:#fff;color:#002f3c;padding:8px 10px;border-radius:7px;cursor:pointer;font:inherit}
.qbq button.primary,.qbq button.active{background:#002f3c;color:#fff}.qbq button:disabled{opacity:.4}
.qbq .status{color:#576977;font-size:13px}.qbq .error{color:#aa2727}
.qbq .matrix-scroll{overflow:auto;max-height:68dvh;border:1px solid #d7e3e4;border-radius:9px}
.qbq table{border-collapse:separate;border-spacing:0;white-space:nowrap;font-size:12px;width:max-content;min-width:100%}
.qbq th,.qbq td{border-right:1px solid #d9e2e5;border-bottom:1px solid #e4eaec;padding:7px;min-width:140px;text-align:left;background:white}
.qbq thead th{position:sticky;top:0;z-index:3;background:#edf5f5}.qbq th:first-child,.qbq td:first-child{position:sticky;left:0;min-width:150px;z-index:2;background:#f5f9fa}.qbq thead th:first-child{z-index:4}
.qbq .qm-valid{background:#e0f4e6}.qbq .qm-soon{background:#fff0b9}.qbq .qm-expired{background:#ffdbd8}.qbq .qm-unknown{background:#f3e7d7}.qbq .qm-missing{background:#f5f7f8}.qbq .qm-indefinite{background:#e1eef6}
.qbq .matrix-cell{display:block;border:0;background:transparent;padding:0;text-align:left;width:100%;font:inherit;color:inherit}.qbq .matrix-cell small{display:block;font-size:10px}
.qbq .q-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.qbq .q-card{border:1px solid #d4e1e3;border-radius:9px;padding:11px;background:white}.qbq .q-thumbnail{height:145px;background:#f1f6f7;border-radius:7px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:8px;cursor:pointer}.qbq .q-thumbnail img{max-width:100%;max-height:100%}.qbq .q-card strong{display:block;margin-bottom:5px}.qbq .q-card small{display:block;color:#596a76;margin:4px 0}.qbq .q-card .actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}.qbq select,.qbq input,.qbq textarea{border:1px solid #bccdd1;border-radius:6px;padding:7px;font:inherit;max-width:100%}
.qbq label{display:flex;flex-direction:column;gap:3px;font-size:13px}.qbq .filters{display:flex;gap:9px;align-items:end;flex-wrap:wrap;margin:8px 0 12px}
.qbq .history{margin:15px 0;border-top:1px solid #cbd8dc;padding-top:12px}.qbq .history div{padding:5px;border-bottom:1px solid #edf1f1}
.qbq-dialog{border:1px solid #b5cbd0;border-radius:12px;width:min(690px,96vw);max-height:92dvh;padding:16px;color:#002f3c}
.qbq-dialog::backdrop{background:#001f2abd}.qbq-dialog h3{margin-top:0}.qbq-dialog .fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px;margin:12px 0}.qbq-dialog label{display:flex;flex-direction:column;gap:4px;font-size:13px}.qbq-dialog button{border:1px solid #a8bdc5;background:white;border-radius:6px;padding:8px;cursor:pointer}.qbq-dialog button.primary{background:#002f3c;color:white}.qbq-dialog .actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.qbq-dialog canvas,.qbq-dialog img{max-width:100%;height:auto}
@media(max-width:720px){.qbq{padding:6px}.qbq h2{font-size:19px}.qbq nav button{font-size:12px;padding:7px}.qbq .matrix-scroll{max-height:74dvh}.qbq .q-card-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}.qbq-dialog{width:96vw;max-width:96vw;max-height:92dvh;padding:10px}}

/* V7.135: certificate preview remains visible and dismissible on iPhone Safari. */
.qbq-dialog{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;}
.qbq-dialog-header{position:sticky;top:0;z-index:12;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:3px 0 9px;background:#fff;border-bottom:1px solid #d6e2e5;}
.qbq-dialog-header h3{margin:0;min-width:0;overflow-wrap:anywhere;}
.qbq-dialog .qbq-dialog-close{flex-shrink:0;min-width:44px;min-height:44px;font-size:20px;font-weight:bold;line-height:1;padding:8px;}
.qbq-dialog .qbq-preview-section{min-width:0;max-width:100%;overflow:hidden;}
.qbq-dialog .qbq-preview-area{overflow:auto;max-height:min(64dvh,680px);max-width:100%;text-align:center;min-height:80px;margin:6px 0;}
.qbq-dialog .qbq-preview-area canvas,.qbq-dialog .qbq-preview-area img{max-width:100%;height:auto;display:block;margin:auto;}
.qbq-dialog .qbq-preview-controls{justify-content:space-between;align-items:center;}
@media(max-width:720px){.qbq-dialog{max-height:calc(100dvh - 16px);width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:9px;}.qbq-dialog .qbq-preview-area{max-height:60dvh;}.qbq-dialog .qbq-preview-controls{gap:6px}.qbq-dialog .qbq-preview-controls button{padding:8px 5px;}}
