/* Audit QMOD v5.14: mobile-first overrides for phones, desktop v5.13 remains unchanged. */
body.aqmodern .aq-mobile-audit-list,body.aqmodern .aq-mobile-shortcuts { display:none; }
body.aqmodern .aq-desktop-audit-table { display:block; }
body.aqmodern .aq-mobile-record[hidden] {display:none!important;}
@media (max-width: 820px) {
  body.aqmodern,html { max-width:100%;overflow-x:clip; }
  body.aqmodern .aq-workspace { width:100%;min-width:0;margin-left:0; }
  body.aqmodern .container { width:100%;max-width:100%;min-width:0; }
  body.aqmodern .aq-sidebar { max-width:88vw; }
  body.aqmodern .aq-menu {display:grid;place-items:center;min-width:44px;height:44px;}
  body.aqmodern .aq-sidebar-overlay {touch-action:manipulation;}
  body.aqmodern .topbar {padding:8px 13px;border-radius:0;}
  body.aqmodern .aq-top-titles { min-width:0;flex:1; }
  body.aqmodern .aq-top-titles strong {font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.aqmodern .aq-user {min-width:0;}
  body.aqmodern .aq-user .aq-avatar {width:33px;height:33px;flex:none;}
  body.aqmodern .aq-mobile-nav {box-sizing:border-box;min-height:72px;grid-template-columns:repeat(4,minmax(0,1fr));padding-bottom:max(8px,env(safe-area-inset-bottom));}
  body.aqmodern .aq-mobile-nav button {min-width:0;min-height:52px;font-size:11px;gap:4px;}
  body.aqmodern .aq-mobile-nav button b {font-size:21px;}
  body.aqmodern .aq-desktop-audit-table {display:none;}
  body.aqmodern .aq-mobile-audit-list {display:grid;gap:11px;padding:0 12px 15px;}
  body.aqmodern .aq-mobile-record {border:1px solid #e1e9f2;background:#fff;border-radius:15px;padding:15px;box-shadow:0 3px 12px rgba(22,51,83,.05);min-width:0;}
  body.aqmodern .aq-mobile-card-top {display:flex;justify-content:space-between;align-items:flex-start;gap:9px;}
  body.aqmodern .aq-mobile-card-heading {min-width:0;flex:1;}
  body.aqmodern .aq-mobile-card-eyebrow {font-weight:800;letter-spacing:.09em;color:#7a90a5;font-size:9px;}
  body.aqmodern .aq-mobile-card-heading h3 {font-size:17px;color:#183752;margin:4px 0 0;line-height:1.35;overflow-wrap:anywhere;}
  body.aqmodern .aq-mobile-card-document {margin:9px 0 11px;color:#60758a;font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
  body.aqmodern .aq-mobile-card-details {display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:11px 0;border-top:1px solid #edf1f6;border-bottom:1px solid #edf1f6;}
  body.aqmodern .aq-mobile-card-details span {font-size:12px;color:#334b62;overflow-wrap:anywhere;min-width:0;}
  body.aqmodern .aq-mobile-card-details b {display:block;font-size:10px;color:#8696a8;margin-bottom:4px;}
  body.aqmodern .aq-mobile-card-progress {padding:12px 0;}
  body.aqmodern .aq-mobile-card-progress>div:first-child {display:flex;justify-content:space-between;gap:10px;font-size:11px;}
  body.aqmodern .aq-mobile-card-progress>div:first-child span {color:#7b8b9d;}
  body.aqmodern .aq-mobile-card-track {height:7px;background:#e9eff6;border-radius:99px;overflow:hidden;margin-top:9px;}
  body.aqmodern .aq-mobile-card-track i {display:block;background:#149b72;height:100%;border-radius:99px;}
  body.aqmodern .aq-mobile-card-foot {display:flex;gap:9px;align-items:center;flex-wrap:wrap;}
  body.aqmodern .aq-mobile-open {display:flex;flex:1;min-width:145px;justify-content:space-between;align-items:center;border:0;border-radius:10px;background:var(--aq-accent);color:#fff;padding:12px;font-size:12px;font-weight:800;min-height:46px;cursor:pointer;}
  body.aqmodern .aq-mobile-select {display:flex;gap:5px;align-items:center;font-size:11px;color:#526f87;}
  body.aqmodern .aq-mobile-select input {width:20px;height:20px;}
  body.aqmodern .aq-mobile-more {width:100%;margin-top:1px;}
  body.aqmodern .aq-mobile-more summary {padding:9px 2px;cursor:pointer;font-size:11px;color:#285b87;font-weight:700;}
  body.aqmodern .aq-mobile-extra {display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:6px 0;}
  body.aqmodern .aq-mobile-extra button {min-height:44px;background:#f0f6fc;border:1px solid #d9e7f3;border-radius:9px;font-size:11px;color:#22537e;font-weight:750;}
  body.aqmodern .aq-mobile-extra button.danger {background:#fff1f2;color:#b3293b;}
  body.aqmodern .aq-mobile-result-count {margin:0;text-align:center;color:#7f8da0;font-size:11px;}
  body.aqmodern .aq-mobile-shortcuts {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:-3px 0 15px;}
  body.aqmodern .aq-mobile-shortcuts button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1px solid #dfebf5;border-radius:12px;padding:12px 3px;background:#fff;color:#325b7f;font-size:10px;font-weight:800;min-height:72px;}
  body.aqmodern .aq-mobile-shortcuts button span {font-size:22px;color:var(--aq-accent);}
  body.aqmodern .aq-content-grid {display:flex;flex-direction:column;}
  body.aqmodern .aq-content-grid > * {width:100%;min-width:0;}
  body.aqmodern .aq-content-grid .aq-stat-card {display:block;width:100%;}
  body.aqmodern .aq-kpis {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.aqmodern .aq-card-tools {display:grid;grid-template-columns:1fr 1fr;}
  body.aqmodern .aq-card-tools .aq-input {grid-column:1/-1;width:100%;}
  body.aqmodern .aq-card-tools .aq-select {max-width:none;width:100%;grid-column:1/-1;}
  body.aqmodern .aq-check-layout {display:block;}
  body.aqmodern .aq-check-sidebar {position:static;margin-bottom:12px;min-width:0;}
  body.aqmodern .aq-section-links {display:flex;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;}
  body.aqmodern .aq-section-link {min-width:152px;flex:none;}
  body.aqmodern .aq-check-main {width:100%;min-width:0;}
  body.aqmodern .check-top {grid-template-columns:33px minmax(0,1fr);}
  body.aqmodern .check-top .status-buttons {grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:5px;}
  body.aqmodern .check-card .status {min-width:0;min-height:46px;white-space:normal;line-height:1.3;padding:8px 5px;font-size:10px;}
  body.aqmodern .check-card .form-grid {grid-template-columns:1fr;}
  body.aqmodern .check-card .field {min-width:0;}
  body.aqmodern .check-card .field input,body.aqmodern .check-card .field textarea {font-size:16px;max-width:100%;}
  body.aqmodern .photo-tools {display:flex;flex-wrap:wrap;gap:8px;}
  body.aqmodern .photo-action {min-height:46px;flex:1;white-space:normal;}
  body.aqmodern .photos {max-width:100%;overflow-wrap:anywhere;}
  body.aqmodern .module-head {display:flex;align-items:flex-start;flex-wrap:wrap;}
  body.aqmodern .module-head>div:nth-child(2) {flex:1;min-width:0;}
  body.aqmodern .module-tools {display:flex!important;flex-wrap:wrap!important;gap:7px!important;margin:8px 0 0!important;width:100%!important;}
  body.aqmodern .module-tools .btn {flex:1 1 auto;min-width:0;min-height:45px;}
  body.aqmodern .hero {grid-template-columns:1fr;}
  body.aqmodern .hero-actions {display:flex;flex-wrap:wrap;}
  body.aqmodern .hero-actions .btn {flex:1 1 130px;}
  body.aqmodern .modules {grid-template-columns:repeat(2,minmax(0,1fr));}
  body.aqmodern .record-grid {grid-template-columns:1fr;}
  body.aqmodern .source-grid,body.aqmodern .reconcile-grid,body.aqmodern .steps {grid-template-columns:1fr;}
  body.aqmodern .compare-item,body.aqmodern .final-box {min-width:0;max-width:100%;overflow-wrap:anywhere;}
  body.aqmodern .compare-item .status-buttons,body.aqmodern .final-box .status-buttons {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;}
  body.aqmodern .compare-item .status {white-space:normal;min-width:0;min-height:44px;font-size:10px;padding:8px 5px;}
  body.aqmodern .finding-row {grid-template-columns:1fr;}
  body.aqmodern .finding-row>* {grid-column:1!important;min-width:0;}
  body.aqmodern .result-modules {grid-template-columns:1fr;}
  body.aqmodern .aq-backup-grid,.aqmodern .aq-two-cols {grid-template-columns:1fr;}
  body.aqmodern .aq-paper {margin:0 11px 15px;}
  body.aqmodern .aq-paper-meta {grid-template-columns:100px minmax(0,1fr);}
  body.aqmodern .aq-export-actions {display:grid;grid-template-columns:1fr;gap:9px;}
  body.aqmodern .aq-export-actions .btn {width:100%;min-height:47px;}
  body.aqmodern .modal {align-items:flex-end;padding:0;}
  body.aqmodern .modal-card {max-height:92dvh;max-width:100%;padding:18px 14px calc(22px + env(safe-area-inset-bottom));border-radius:19px 19px 0 0;}
  body.aqmodern .modal-actions .btn {min-height:47px;flex:1;}
  body.aqmodern .sticky-tools {top:62px;max-width:100%;}
  body.aqmodern .filter-row {max-width:100%;overflow:auto;}
  body.aqmodern .aq-settings-row {align-items:flex-start;}
  body.aqmodern .aq-settings-row select {max-width:135px;}
  body.aqmodern .scroll-top-btn {bottom:calc(84px + env(safe-area-inset-bottom));}
}
@media (max-width:390px) {
  body.aqmodern .aq-user {display:none;}
  body.aqmodern .aq-kpi-icon {width:33px;height:33px;}
  body.aqmodern .aq-kpi strong {font-size:22px;}
  body.aqmodern .aq-mobile-card-details {grid-template-columns:1fr 1fr;}
  body.aqmodern .aq-mobile-shortcuts {gap:5px;}
  body.aqmodern .aq-mobile-shortcuts button {font-size:9px;}
  body.aqmodern .aq-check-summary {gap:7px;}
  body.aqmodern .aq-check-summary .aq-mini-bar {display:none;}
  body.aqmodern .modal-actions {flex-wrap:wrap;}
}
@media (min-width:821px) {
  body.aqmodern .aq-mobile-nav {display:none!important;}
  body.aqmodern .aq-sidebar {transform:none!important;}
  body.aqmodern .aq-mobile-audit-list,body.aqmodern .aq-mobile-shortcuts {display:none!important;}
  body.aqmodern .aq-desktop-audit-table {display:block;}
}
