/* Audit QMOD v5.15: field-ready mobile UI. Pure presentation overrides; v5.14 engines and storage stay intact. */
body.aqmodern{--aq-accent:#096d3c;--aq-accent-dark:#07552f;--aq-ink:#172b30;--aq-muted:#617479;--aq-border:#e2e9e6;--aq-bg:#f5f8f6;--aq-sidebar:#193034;--aq-sidebar-2:#122629;--navy:#096d3c;--navy2:#07552f;--good:#087846;--bad:#c93840;--soft:#f0f7f2;--line:#e2e9e6;background:var(--aq-bg);color:var(--aq-ink)}
body.aqmodern[data-accent="teal"]{--aq-accent:#087f70;--aq-accent-dark:#06675a;--navy:#087f70;--navy2:#06675a}
body.aqmodern .aq-sidebar{background:linear-gradient(175deg,#20383a,#152b2d);color:#fff}
body.aqmodern .aq-sidebar-brand strong{color:#fff}
body.aqmodern .aq-sidebar-brand small,body.aqmodern .aq-sidebar-group{color:#9fb5b2}
body.aqmodern .aq-nav{color:#e2edeb}
body.aqmodern .aq-nav.active{background:var(--aq-accent);box-shadow:none}
body.aqmodern .aq-nav:hover{background:rgba(255,255,255,.11)}
body.aqmodern .topbar{background:#1c3234;color:#fff;border-color:#1c3234;backdrop-filter:none;box-shadow:none}
body.aqmodern .aq-top-titles strong{color:#fff}
body.aqmodern .aq-top-titles small{color:#b7cac6}
body.aqmodern .aq-menu{background:transparent;color:#fff;border-color:#4c6463}
body.aqmodern .aq-avatar{background:#3b5a58}
body.aqmodern .aq-user{border-color:#3a5452}
body.aqmodern .aq-user span{color:#b7cac6}
body.aqmodern .aq-search{background:#284445;border-color:#426261;color:#d8e9e3}
body.aqmodern .aq-search input{color:#fff}
body.aqmodern .aq-search input::placeholder{color:#c0d1cb}
body.aqmodern .icon-btn{background:#294547;border-color:#486460;color:#fff}
body.aqmodern .container{max-width:1440px}
body.aqmodern .panel{border-color:#e0e8e2;box-shadow:0 4px 16px rgba(18,48,39,.035)}
body.aqmodern .btn{font-size:13px;min-height:44px}
body.aqmodern .btn.primary,body.aqmodern .btn.gold{background:var(--aq-accent);color:#fff}
body.aqmodern .btn.primary:hover,body.aqmodern .btn.gold:hover{background:var(--aq-accent-dark)}
body.aqmodern .btn.light{background:#e9f5ed;color:#075c35}
body.aqmodern .btn.outline{border-color:#c9d9d0;color:#235943}
body.aqmodern .aq-page-head h1,body.aqmodern .aq-headline h1,body.aqmodern .module-head h1{color:#172d2d}
body.aqmodern .aq-kpi-icon,body.aqmodern .module-icon{color:#0e7046;background:#e6f6ed}
body.aqmodern .aq-pill.final{color:#086a3b;background:#e3f5e9}
body.aqmodern .aq-pill.review{color:#9f6711;background:#fff2d7}
body.aqmodern .aq-pill.progress{color:#165ba4;background:#e6f0fe}
body.aqmodern .aq-pill.draft{color:#536a70;background:#ebf0f0}
body.aqmodern .aq-quick.primary{background:var(--aq-accent);border-color:var(--aq-accent)}
body.aqmodern .aq-mobile-open{background:var(--aq-accent)}
body.aqmodern .hero-main{background:linear-gradient(130deg,#1d443b,#0a713e)}
body.aqmodern .module-card{border-top-color:#dcebe2}
body.aqmodern .module-card:hover{border-top-color:var(--aq-accent)}
body.aqmodern .aq-step.active{color:#086b3c}
body.aqmodern .aq-section-link.active{background:#e7f4eb;color:#0c6b3e}
body.aqmodern .aq-section-link.active em{background:#d3ebda;color:#096a3d}
body.aqmodern .num{color:#08633d;background:#e8f4ed;border-color:#d4e9db}
body.aqmodern .chip.active{background:#dff1e5;border-color:#afd9be;color:#086638}
body.aqmodern .aq-mini-bar i,body.aqmodern .bar>i{background:#0b8751}
body.aqmodern .aq-check-summary strong{color:#1b4033}
body.aqmodern .details-toggle{color:#0a7244}
body.aqmodern .aq-feature-icon{color:#0c7649;background:#e8f6ee}
body.aqmodern .aq-report-choice.active{background:#e9f5ed;border-color:#b8dec4}
body.aqmodern .aq-report-choice strong{color:#1e4435}
body.aqmodern .aq-card-title,body.aqmodern .aq-card-header h2{color:#203c33}

/* Landing screen: exactly two prominent routes, as per approved design. */
body.aqmodern .field-home{width:min(980px,100%);margin:4px auto 0}
body.aqmodern .field-home-status{display:flex;align-items:center;gap:12px;border:1px solid #cde8d6;background:#e8f7ed;border-radius:13px;padding:13px 15px;color:#16633e}
body.aqmodern .field-online-dot{width:32px;height:32px;display:grid;place-items:center;flex:none;background:#bce7c9;border-radius:50%;font-size:18px;font-weight:800}
body.aqmodern .field-home-status b{display:block;font-size:13px}
body.aqmodern .field-home-status small{display:block;font-size:11px;margin-top:3px;color:#487660}
body.aqmodern .field-welcome{padding:30px 4px 18px}
body.aqmodern .field-welcome h1{font-size:clamp(29px,4vw,40px);letter-spacing:-.045em;color:#192d31;margin:0 0 8px}
body.aqmodern .field-welcome p{font-size:14px;color:#697a78;margin:0;line-height:1.6}
body.aqmodern .field-home-actions{display:grid;grid-template-columns:1fr 1fr;gap:15px}
body.aqmodern .field-launch-card{min-height:213px;display:flex;flex-direction:column;align-items:flex-start;position:relative;gap:8px;text-align:left;border-radius:16px;border:1px solid transparent;padding:24px;cursor:pointer;transition:transform .15s ease,filter .15s ease;width:100%}
body.aqmodern .field-launch-card:hover{transform:translateY(-2px);filter:brightness(.98)}
body.aqmodern .field-launch-card:focus-visible{outline:3px solid #80c7a1;outline-offset:3px}
body.aqmodern .field-launch-card.primary{background:linear-gradient(135deg,#0f7b46,#096338);color:#fff}
body.aqmodern .field-launch-card.secondary{background:#26363c;color:#fff}
body.aqmodern .field-launch-icon{display:grid;place-items:center;width:49px;height:49px;border-radius:11px;border:1px solid rgba(255,255,255,.3);font-size:26px;font-weight:750;margin-bottom:9px}
body.aqmodern .field-launch-card strong{font-size:22px;line-height:1.25;letter-spacing:-.03em;max-width:80%}
body.aqmodern .field-launch-card small{font-size:13px;line-height:1.48;max-width:80%;color:#ecf4ef}
body.aqmodern .field-launch-arrow{position:absolute;right:19px;top:50%;font-size:28px;transform:translateY(-50%)}
body.aqmodern .field-recent{margin-top:22px;padding:17px 18px}
body.aqmodern .field-recent-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:8px}
body.aqmodern .field-recent-head h2{font-size:16px;margin:0}
body.aqmodern .field-text-link{background:none;border:0;padding:6px;color:#0b7847;font-size:12px;font-weight:800;cursor:pointer}
body.aqmodern .field-recent-item{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:12px 4px;border:0;border-top:1px solid #ebf0ec;background:none;cursor:pointer}
body.aqmodern .field-recent-item .field-file-icon{width:33px;height:37px;border-radius:9px;display:grid;place-items:center;color:#146941;background:#eaf4ed;font-size:20px;flex:none}
body.aqmodern .field-recent-info{display:grid;gap:4px;flex:1;min-width:0}
body.aqmodern .field-recent-info b{font-size:12px;color:#243c39;overflow-wrap:anywhere}
body.aqmodern .field-recent-info small{font-size:11px;color:#72837e;overflow-wrap:anywhere}
body.aqmodern .field-empty{padding:18px 10px;text-align:center;color:#6d7b75;font-size:13px}

/* Audit setup: actual fields backed by the existing audit record schema. */
body.aqmodern .field-page{width:min(940px,100%);margin:0 auto}
body.aqmodern .field-page-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:19px}
body.aqmodern .field-page-head .field-back{width:42px;height:42px;flex:none;border-radius:11px;background:#fff;border:1px solid #dbe6df;color:#285641;font-size:23px;cursor:pointer}
body.aqmodern .field-page-head h1{font-size:25px;letter-spacing:-.04em;margin:0;color:#213735}
body.aqmodern .field-page-head p{font-size:13px;color:#74817d;margin:5px 0 0;line-height:1.5}
body.aqmodern .field-form-panel{padding:23px}
body.aqmodern .field-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px 16px}
body.aqmodern .field-form-grid label{display:grid;gap:7px;font-weight:750;font-size:12px;color:#344b43}
body.aqmodern .field-form-grid label.span-all{grid-column:1/-1}
body.aqmodern .field-form-grid input,body.aqmodern .field-form-grid select,body.aqmodern .field-form-grid textarea{display:block;width:100%;max-width:100%;min-width:0;border:1px solid #d6e3da;border-radius:10px;min-height:47px;padding:11px 13px;background:#fff;color:#1a3330;font-size:14px;font-weight:500;outline:none}
body.aqmodern .field-form-grid textarea{min-height:81px;resize:vertical}
body.aqmodern .field-form-grid input:focus,body.aqmodern .field-form-grid select:focus{border-color:#0d8b56;box-shadow:0 0 0 3px #dff2e6}
body.aqmodern .field-label{font-size:12px;font-weight:850;color:#344b43;display:block;margin:19px 0 10px}
body.aqmodern .field-module-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
body.aqmodern .field-module-option{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 8px;cursor:pointer;border:1px solid #d9e6df;border-radius:11px;background:#f9fcfa;min-height:56px;font-size:12px;font-weight:800}
body.aqmodern .field-module-option:has(input:checked){border-color:#0b7947;background:#e6f5ec;color:#075c37}
body.aqmodern .field-module-option input{accent-color:#0b7947;flex:none}
body.aqmodern .field-hint{font-size:11px;color:#7a8881;line-height:1.5;margin:11px 0 0}
body.aqmodern .field-form-actions{display:flex;justify-content:space-between;align-items:center;gap:13px;margin-top:23px}
body.aqmodern .field-form-actions .btn{min-width:166px}
body.aqmodern .field-form-actions .btn[disabled]{opacity:.58;cursor:wait}

/* Review list and result details: read from actual local records, no invented data. */
body.aqmodern .field-review-filters{display:flex;gap:9px;margin:15px 0;flex-wrap:wrap}
body.aqmodern .field-review-filters input,body.aqmodern .field-review-filters select{background:#fff;border:1px solid #d9e5dc;border-radius:10px;padding:11px 12px;min-height:45px;min-width:0;font-size:13px}
body.aqmodern .field-review-filters input{flex:2 1 250px}
body.aqmodern .field-review-filters select{flex:1 1 160px}
body.aqmodern .field-review-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-bottom:20px}
body.aqmodern .field-review-record{display:block;width:100%;text-align:left;background:#fff;border:1px solid #e0e9e3;border-radius:14px;padding:16px;cursor:pointer;box-shadow:0 3px 12px rgba(20,50,35,.035)}
body.aqmodern .field-review-record:hover{border-color:#b4d8c0}
body.aqmodern .field-review-record[hidden]{display:none!important}
body.aqmodern .field-review-title{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px}
body.aqmodern .field-review-title b{font-size:14px;overflow-wrap:anywhere;color:#1e3830}
body.aqmodern .field-review-record p{margin:5px 0;font-size:12px;color:#667b6e;line-height:1.45;overflow-wrap:anywhere}
body.aqmodern .field-review-record .field-review-link{display:block;color:#097249;font-weight:800;font-size:12px;margin-top:10px}
body.aqmodern .field-workflow-panel{margin-top:22px}
body.aqmodern .field-workflow-panel > .field-workflow-title{font-size:17px;color:#244435;margin-bottom:11px}
body.aqmodern .field-workflow-panel > .field-workflow-note{font-size:12px;color:#72867b;line-height:1.6;margin-bottom:13px}
body.aqmodern .field-result-header{background:#fff;border:1px solid #dfeae2;border-radius:13px;padding:18px;margin-bottom:16px}
body.aqmodern .field-result-header h2{margin:0 0 7px;font-size:19px;color:#233c31;overflow-wrap:anywhere}
body.aqmodern .field-result-header p{margin:5px 0;font-size:12px;color:#607b6a;line-height:1.5;overflow-wrap:anywhere}
body.aqmodern .field-result-header .aq-pill{margin-bottom:10px}
body.aqmodern .field-result-tabs{display:flex;gap:3px;overflow-x:auto;border-bottom:1px solid #dfe8e0;margin-bottom:16px}
body.aqmodern .field-result-tabs button{flex:1 0 auto;min-height:45px;padding:9px 13px;background:none;border:0;border-bottom:3px solid transparent;color:#6c7e72;font-weight:800;font-size:12px;cursor:pointer}
body.aqmodern .field-result-tabs button.active{border-color:#08753f;color:#086e3d}
body.aqmodern .field-result-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0 19px}
body.aqmodern .field-result-kpi{background:#f3f8f4;border:1px solid #e1ece4;border-radius:11px;padding:18px}
body.aqmodern .field-result-kpi strong{display:block;font-size:25px;color:#1b4b35}
body.aqmodern .field-result-kpi small{font-size:11px;color:#5d7969}
body.aqmodern .field-result-kpi.good{background:#e4f6e9}
body.aqmodern .field-result-kpi.bad{background:#fff0ec}
body.aqmodern .field-result-kpi.bad strong{color:#ba392e}
body.aqmodern .field-result-kpi.neutral{background:#eef1f3}
body.aqmodern .field-result-section{padding:17px;margin:12px 0}
body.aqmodern .field-result-section h3{font-size:15px;color:#233f32;margin:0 0 13px}
body.aqmodern .field-decision{display:inline-flex;padding:5px 8px;border-radius:7px;font-weight:780;font-size:10px;white-space:nowrap}
body.aqmodern .field-decision.good{color:#087042;background:#e3f5e8}
body.aqmodern .field-decision.bad{color:#be3e3a;background:#ffeceb}
body.aqmodern .field-decision.neutral{color:#68777e;background:#edf1f2}
body.aqmodern .field-decision.pending{color:#9a6b15;background:#fff3d9}
body.aqmodern .field-checklist-row{padding:12px 2px;border-bottom:1px solid #ebf0ec}
body.aqmodern .field-checklist-row:last-child{border-bottom:0}
body.aqmodern .field-checklist-row b{display:block;font-size:12px;color:#2b453a;line-height:1.5;margin-bottom:8px}
body.aqmodern .field-checklist-row .field-compare-line{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap}
body.aqmodern .field-checklist-row small{color:#73877b;font-size:11px}
body.aqmodern .field-result-module{display:flex;align-items:center;justify-content:space-between;gap:13px;border-top:1px solid #e9efe9;padding:12px 2px;font-size:13px}
body.aqmodern .field-result-module b{color:#324d40}
body.aqmodern .field-result-module span{color:#6c7c72;font-size:12px}
body.aqmodern .field-result-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}
body.aqmodern .field-result-actions .btn{flex:1}
body.aqmodern .field-result-module-select{width:100%;min-height:44px;border:1px solid #d8e5db;border-radius:9px;background:#fff;padding:9px;margin:0 0 10px}

/* Checklist keeps the original response, camera, evidence and review handlers. */
body.aqmodern .check-card .evidence-expected-box{background:#f1f6f2;border-color:#dce9dd;color:#405b48}
body.aqmodern .check-card .status{transition:background .12s ease}
body.aqmodern .check-card .status.selected.complied{background:#0b7b42;color:#fff;border-color:#0b7b42}
body.aqmodern .check-card .status.selected.not{background:#be333a;color:#fff;border-color:#be333a}
body.aqmodern .check-card .status.selected.na{background:#526570;color:#fff;border-color:#526570}
body.aqmodern .field-question-nav{display:none}
body.aqmodern .field-checklist-mode .check-card .evidence-expected-box{font-size:12px;line-height:1.55;padding:11px;margin-top:11px}
body.aqmodern .field-checklist-mode .check-card .photo-action{min-height:46px}

/* Touch-first presentation. Desktop keeps multi-card checklist and sidebar. */
@media(max-width:820px){
  body.aqmodern .topbar{min-height:62px;padding:8px 13px;padding-top:max(8px,env(safe-area-inset-top))}
  body.aqmodern .aq-menu{min-width:44px;min-height:44px}
  body.aqmodern .aq-top-titles strong{font-size:17px}
  body.aqmodern .aq-mobile-nav{border-color:#dfe9e2;background:#fff}
  body.aqmodern .aq-mobile-nav button.active{color:#097445}
  body.aqmodern .aq-mobile-nav button{font-size:11px}
  body.aqmodern .container{padding:18px 13px calc(102px + env(safe-area-inset-bottom))}
  body.aqmodern .field-home{margin:0 auto}
  body.aqmodern .field-home-actions{grid-template-columns:1fr;gap:13px}
  body.aqmodern .field-launch-card{min-height:163px;padding:20px 21px}
  body.aqmodern .field-launch-card strong{font-size:20px}
  body.aqmodern .field-launch-card small{font-size:12px}
  body.aqmodern .field-launch-icon{width:43px;height:43px;margin-bottom:4px}
  body.aqmodern .field-welcome{padding:33px 3px 23px;text-align:center}
  body.aqmodern .field-welcome h1{font-size:29px}
  body.aqmodern .field-home-status{padding:12px}
  body.aqmodern .field-recent{padding:14px 13px;margin-top:16px}
  body.aqmodern .field-page-head h1{font-size:23px}
  body.aqmodern .field-form-panel{padding:16px}
  body.aqmodern .field-form-grid{grid-template-columns:1fr;gap:15px}
  body.aqmodern .field-module-options{grid-template-columns:1fr 1fr}
  body.aqmodern .field-module-option{font-size:11px;padding:12px 5px;min-height:53px}
  body.aqmodern .field-form-actions{flex-direction:column-reverse;align-items:stretch}
  body.aqmodern .field-form-actions .btn{width:100%;min-height:50px}
  body.aqmodern .field-review-list{grid-template-columns:1fr}
  body.aqmodern .field-review-record{padding:15px}
  body.aqmodern .field-result-kpis{grid-template-columns:1fr 1fr;gap:9px}
  body.aqmodern .field-result-kpi{padding:15px}
  body.aqmodern .field-result-kpi strong{font-size:24px}
  body.aqmodern .field-result-header{padding:15px}
  body.aqmodern .field-result-section{padding:14px}
  body.aqmodern .field-result-actions{display:grid;grid-template-columns:1fr}
  body.aqmodern .field-result-actions .btn{width:100%;min-height:48px}
  body.aqmodern.field-checklist-mode .container{padding-bottom:calc(205px + env(safe-area-inset-bottom))}
  body.aqmodern.field-checklist-mode .aq-check-main .section-block:not(.field-section-active){display:none!important}
  body.aqmodern.field-checklist-mode .aq-check-main .check-card:not(.field-card-active){display:none!important}
  body.aqmodern.field-checklist-mode .aq-check-main .details-toggle{display:none}
  body.aqmodern.field-checklist-mode .aq-check-main .check-card.field-card-active .details{display:block!important}
  body.aqmodern.field-checklist-mode .aq-check-main > .aq-page-actions{display:none}
  body.aqmodern.field-checklist-mode .aq-check-main .sticky-tools{position:static!important;padding:6px 0;background:transparent}
  body.aqmodern.field-checklist-mode .aq-stepper{display:none}
  body.aqmodern.field-checklist-mode .aq-check-sidebar{margin-bottom:8px}
  body.aqmodern.field-checklist-mode .aq-check-nav-title{margin:2px 0 8px}
  body.aqmodern.field-checklist-mode .check-top{grid-template-columns:31px minmax(0,1fr);gap:10px}
  body.aqmodern.field-checklist-mode .check-top .status-buttons{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  body.aqmodern.field-checklist-mode .check-card .status{min-height:56px;font-size:11px;padding:8px 4px}
  body.aqmodern.field-checklist-mode .check-card{scroll-margin-top:85px;padding:15px;margin-top:9px}
  body.aqmodern.field-checklist-mode .check-card textarea{font-size:16px;min-height:95px}
  body.aqmodern.field-checklist-mode .section-block{margin:7px 0}
  body.aqmodern.field-checklist-mode .section-header h3{font-size:13px}
  body.aqmodern.field-checklist-mode .field-question-nav{display:flex;position:fixed;left:0;right:0;bottom:calc(68px + env(safe-area-inset-bottom));padding:10px 13px;z-index:29;background:#fff;border-top:1px solid #dce9df;box-shadow:0 -5px 18px rgba(18,43,30,.06);gap:8px;align-items:center}
  body.aqmodern.field-checklist-mode .field-question-nav button{border:1px solid #cadbcf;background:#fff;border-radius:10px;color:#1f6345;font-weight:800;min-height:48px;font-size:12px;padding:9px 11px;flex:1}
  body.aqmodern.field-checklist-mode .field-question-nav button.field-next{background:var(--aq-accent);color:#fff;border-color:var(--aq-accent);flex:1.3}
  body.aqmodern.field-checklist-mode .field-question-nav small{text-align:center;font-size:10px;color:#617e6d;flex:0 0 62px;line-height:1.3}
  body.aqmodern.field-checklist-mode .field-question-nav button:disabled{opacity:.42}
  body.aqmodern .aq-mobile-shortcuts{display:none!important}
  body.aqmodern .aq-mobile-card-heading h3{color:#244337}
  body.aqmodern .aq-mobile-card-progress{color:#244a38}
}
@media(max-width:390px){
  body.aqmodern .field-welcome{padding-top:19px}
  body.aqmodern .field-launch-card{min-height:152px}
  body.aqmodern .field-launch-card small{max-width:88%}
  body.aqmodern .field-result-tabs button{font-size:11px;padding:8px}
  body.aqmodern.field-checklist-mode .field-question-nav{padding:8px;gap:5px}
  body.aqmodern.field-checklist-mode .field-question-nav button{padding:8px 5px;font-size:11px}
  body.aqmodern.field-checklist-mode .field-question-nav small{flex-basis:52px}
}
@media print{
  body.aqmodern .field-question-nav{display:none!important}
}
