/* IQ panel design preview: TAS-SAMS left accent, with existing colours and controls. */
@layer tasFlatPanels {
 @media screen {
  html body:not(#original-document):not(#iq-flat-a):not(#iq-flat-b):not(#iq-flat-c):not(#iq-flat-d) :is(
   .panel,.card,.metric,.analytics-card,.report-activity-card,.settings-invite,
   .review-card,.section-card,.management-card,.folder-card,.settings-panel,
   .iq-status-chart,.iq-settings-section,.iq-reporting-section,.tas-site-card,
   .tas-user-card,.tas-admin-stat,.tas-login-card,.tas-daily-dashboard-intro,
   .tas-submission-info,.tas-compliance-heading,.tas-form-step,.tas-evidence,
   .tas-record-month,.tas-record-day,.tas-record-report,.tas-record-item,
   .generator-filename,.generator-replacement,.generator-next,.library-folder,
   .library-login-card,.library-generator-panel,.iq-auth-card,.iq-setting-card
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *)) {
   border:1px solid #d5dfd9!important;
   border-left:4px solid var(--iq-flat-accent,var(--iq-green,#1a8f20))!important;
   border-radius:0!important;
   box-shadow:none!important;
  }
  html body:not(#original-document):not(#iq-flat-a):not(#iq-flat-b):not(#iq-flat-c):not(#iq-flat-d) :is(
   .tas-form-step,.tas-evidence,.generator-replacement,.library-folder,
   .tas-record-month,.tas-record-day,.tas-record-report,.tas-record-item
  )>summary {
   border-radius:0!important;
   box-shadow:none!important;
  }
  html body:not(#original-document) :is(.panel,.card,.metric,.analytics-card):is(
   .danger,.error,.overdue,[data-state="overdue"],[data-overdue="true"]
  ){--iq-flat-accent:#b92332}
 }
}

/* TAS-SAMS rectangular controls; preserve every existing IQ colour and state. */
@layer tasFlatPanels {
 @media screen {
  html body:not(#original-document):not(#iq-square-a):not(#iq-square-b):not(#iq-square-c):not(#iq-square-d) :is(
   button,label.button,input[type="button"],input[type="submit"],input[type="reset"],
   a,a.btn,a.button,a.primary,a.secondary,a.tas-button,a.tas-link-button,
   a[role="button"],nav a,.tabs a,.toolbar a,.library-page-title>a,
   .tas-dashboard-return>a,.tas-module-tile,.tas-utility-card,.tas-utility-icon,
   .tas-submission-fold,.tas-deadline-guide,.tas-compliance-audit,
   .tas-form-step,.generator-replacement,.library-folder,
   .tas-record-month,.tas-record-day,.tas-record-report,.tas-record-item,
   summary,.password-wrap,.password-field,.tas-login-card,
   header.tas-dual-brand-header,header.app-header,
   h1,h2,h3,.page-title,.page-banner,.section-banner,
   figure[data-evidence-view],figure[data-video-evidence]
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *)) {
   border-radius:0!important;
   box-shadow:none!important;
  }
  html body:not(#original-document):not(#iq-square-a):not(#iq-square-b):not(#iq-square-c):not(#iq-square-d) :is(
   input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="color"]):not([type="hidden"]),select,textarea
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *)) {
   border-radius:0!important;
  }
  html body:not(#original-document):not(#iq-square-a):not(#iq-square-b):not(#iq-square-c):not(#iq-square-d) :is(
   button[data-tas-icon],summary
  )::before {
   border-radius:0!important;
   box-shadow:none!important;
  }
 }

/* Square UI badges, counters, avatars, banners and containers throughout IQ. */
@layer tasFlatPanels {
 @media screen {
  html body:not(#original-document):not(#iq-square-a):not(#iq-square-b):not(#iq-square-c):not(#iq-square-d) :is(
   [class*="badge"],[class*="pill"],[class*="chip"],[class*="counter"],[class*="count"],
   [class*="avatar"],[class*="hero"],[class*="card"],[class*="panel"],[class*="banner"],
   [class*="notice"],[class*="alert"],[class*="toast"],[class*="modal"],[class*="dialog"],
   [class*="pagination"],.tas-admin-section-title>span,.tas-admin-add,fieldset,legend,
   .tas-submission-names,.tas-deadline-status,.tas-section-badge,
   details,dialog,form,.iq-fold-indicator,.dashboard-folder>strong,
   body.iq-auth-screen>main,header img
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *)) {
   border-radius:0!important;
  }
 }
}
}

/* Equal header actions, with the existing primary order and exit positions. */
@layer tasFlatPanels {
 @media screen {
  html body header.app-header nav.tabs {--iq-header-action-columns:7;}
  html body header.app-header :is(#iq-header-primary-actions,#iq-header-exit-actions) {
   display:grid!important;
   grid-template-columns:repeat(var(--iq-header-action-columns),minmax(0,1fr))!important;
   gap:10px!important;
   width:100%!important;
   min-width:0!important;
   flex:1 0 100%!important;
  }
  html body header.app-header :is(#iq-header-primary-actions,#iq-header-exit-actions)>:not([hidden]) {
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   width:100%!important;
   min-width:0!important;
   max-width:none!important;
   height:48px!important;
   min-height:48px!important;
   max-height:48px!important;
   margin:0!important;
   padding:6px 8px!important;
   box-sizing:border-box!important;
   text-align:center!important;
   white-space:normal!important;
   line-height:1.15!important;
   border-radius:0!important;
  }
  html body header.app-header #iq-header-primary-actions>#accountManagementNav,
  html body header.app-header #iq-header-exit-actions>[data-iq-back-website] {
   grid-column:-2/-1!important;
  }
  html body header.app-header #iq-header-exit-actions>[data-view="login"] {
   grid-column:1!important;
  }
 }
 @media screen and (max-width:1100px) {
  html body header.app-header nav.tabs {--iq-header-action-columns:4;}
 }
 @media screen and (max-width:640px) {
  html body header.app-header nav.tabs {--iq-header-action-columns:2;}
 }
}


/* Consistent IQ header text size. */
@layer tasFlatPanels {
 @media screen {
  html body header .tas-header-logos>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description,span) {
   font-size:18px!important;
  }
 }
}

/* Consistent red trim on IQ application headers. */
@layer tasFlatPanels {
 @media screen {
  html body:not(#iq-header-trim-a):not(#iq-header-trim-b):not(#iq-header-trim-c):not(#iq-header-trim-d):not(#iq-header-trim-e) :is(
   header,
   header.app-header nav.tabs,nav.tas-dashboard-return
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *)) {
   box-shadow:inset 2px 0 0 #b91421,inset -2px 0 0 #b91421,inset 0 -2px 0 #b91421!important;
  }
 }
}

/* Square NCR cards while preserving their status colours. */
@layer tasFlatPanels {
 @media screen {
  html body main#app.ncr-workspace :is(
   .ncr-stat,.ncr-findings-heading,.ncr-detail-box,.ncr-status-pill,
   .ncr-badge,.ncr-bar,.ncr-bar span,.ncr-mini-percentage div
  ) {
   border-radius:0!important;
  }
 }
}

/* Square form feedback, joint submission and download panels. */
@layer tasFlatPanels {
 @media screen {
  html body main#app :is(
   #tas-joint-controls,.tas-form-download,[data-submission-status]
  ) {
   border-radius:0!important;
  }
 }
}

/* Shared square UI surfaces in every IQ section. */
@layer tasFlatPanels {
 @media screen {
  html body:not(#iq-square-everywhere-a):not(#iq-square-everywhere-b):not(#iq-square-everywhere-c):not(#iq-square-everywhere-d):not(#iq-square-everywhere-e) :is(
   header,nav,main,section,article,aside,footer,form,fieldset,legend,details,summary,
   button,input,select,textarea,a,div,span,figure,canvas
  ):not(:where(
   .sheet,.sheet *,#generatorContentPreview,#generatorContentPreview *,
   #libraryPreview,#libraryPreview *,.tas-original-form,.tas-original-form *,
   .tas-pdf-report,.tas-pdf-report *,.docx-preview,.docx-preview *,
   .document-content,.document-content *,[role="img"],[role="img"] *,
   .donut-chart,.donut-chart *,#statusDonut,#statusDonut *,
   #iq-loading-status,#iq-loading-status *,#tas-refresh-screen,#tas-refresh-screen *,
   .tas-refresh-ring,.tas-refresh-ring *,input[type="radio"],input[type="checkbox"]
  )),
  html body:not(#iq-square-everywhere-a):not(#iq-square-everywhere-b):not(#iq-square-everywhere-c):not(#iq-square-everywhere-d):not(#iq-square-everywhere-e) :is(
   summary,button,a,[role="button"]
  ):not(:where(.sheet *,#generatorContentPreview *,#libraryPreview *,
    .tas-original-form *,.tas-pdf-report *,.docx-preview *,.document-content *))::before {
   border-radius:0!important;
  }
 }
}

/* Align all report-detail pairs, including the contractor field's nested label. */
html body #app #tas-standard-details .tas-standard-grid{align-items:start!important}
html body #app #tas-standard-details .tas-standard-grid>div{min-width:0!important;align-self:start!important}
html body #app #tas-standard-details .tas-standard-grid>div>label{display:block!important;line-height:20px!important;min-height:20px!important;margin:0 0 8px!important;padding:0!important}
html body #app #tas-standard-details .tas-standard-grid>div>label:has(>input,>select){margin:0!important}
html body #app #tas-standard-details .tas-standard-grid>div>:is(input,select),html body #app #tas-standard-details .tas-standard-grid>div>label>:is(input,select){display:block!important;box-sizing:border-box!important;width:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:10px 12px!important;line-height:24px!important;vertical-align:top!important}
html body #app #tas-standard-details .tas-standard-grid>div>label>:is(input,select){margin-top:8px!important}
html body #app #tas-standard-details .tas-standard-grid>div>small{display:block!important;margin-top:8px!important}
/* Settings keep the existing square IQ palette and the original save controls. */
html body #settings .iq-settings-step-list{border:0!important;padding:0!important;background:transparent!important}
html body #settings details.iq-settings-step{border:1px solid #c6d5cb!important;border-left:3px solid var(--primary,#1a8f20)!important;border-radius:0!important;background:#fff!important;padding:0!important;margin:0 0 16px!important;scroll-margin-top:20px}
html body #settings details.iq-settings-step>summary{display:flex!important;align-items:center!important;gap:12px!important;list-style:none!important;cursor:pointer!important;padding:18px 20px!important;margin:0!important;border-radius:0!important;background:#edf5ef!important;color:#185c32!important;font-size:18px!important;font-weight:400!important;line-height:1.4!important}
html body #settings details.iq-settings-step>summary::-webkit-details-marker{display:none}
html body #settings details.iq-settings-step>summary::before{content:none!important}
html body #settings details.iq-settings-step[open]>summary{background:var(--primary,#1a8f20)!important;color:white!important}
html body #settings .iq-settings-step-icon{display:inline-flex;justify-content:center;align-items:center;flex:0 0 28px;width:28px;height:28px;background:#ffffff40;border-radius:0!important}
html body #settings .iq-settings-step-body{padding:20px!important}
html body #settings .iq-settings-step-body>div,html body #settings .iq-settings-step-body>section{margin-top:0!important;max-width:100%!important}
html body #settings .iq-settings-step-body>section#iq-reporting-settings{padding:0!important;border:0!important;background:transparent!important}
html body #settings .iq-settings-step-nav{display:flex!important;justify-content:space-between!important;gap:16px!important;margin-top:24px!important;padding-top:16px!important;border-top:1px solid #d7e1da}
html body #settings .iq-settings-step-nav button{min-width:140px;min-height:44px;border-radius:0!important;margin:0!important}
html body #settings .iq-settings-step-nav button:last-child:not(:first-child),html body #settings .iq-settings-step-nav button.primary{margin-left:auto!important}

/* iq-login-no-footer: visible authentication screens only; inactive admin panels must not hide content footers. */
@layer tasFlatPanels {
  @media screen {
    html body.iq-auth-screen footer,
    html body:has(#login.view.active) footer,
    html body.iq-admin:has(#login:not([hidden])) footer,
    html body:has(#management-login) footer,
    html body:has(#libraryLogin) footer,
    html body:has(#gate2app #send) footer {
      display: none !important;
    }
  }
}

/* TAS dual-brand presentation. Only visual properties are changed. */
@layer tasFlatPanels { @media screen {
 html body header .tas-header-logos>.tas-platform-copy,
 html body header .tas-header-logos>.tas-header-platform-copy {text-align:center!important;align-items:center!important;min-width:0!important}
 html body header .tas-header-logos :is(.tas-platform-title,.tas-platform-description){font-size:18px!important;font-weight:400!important}
 html body :is(button,a[role="button"],.tab,.external-app-tab,.tas-module-tile,.tas-utility-card){font-weight:400!important}
 html body>footer.tas-brand-footer{display:grid!important;grid-template-columns:240px minmax(0,1fr) minmax(180px,240px)!important;grid-template-areas:"tas contact policies"!important;gap:24px!important;align-items:center!important;border-top:4px solid #166534!important;border-radius:0!important;background:#fff!important;padding:24px!important;box-sizing:border-box!important;color:#243b2b!important}
 html body>footer.tas-brand-footer>.footer-logo-box{grid-area:tas!important;justify-self:start!important;max-width:220px!important}
 html body>footer.tas-brand-footer>.footer-logo-box img{display:block!important;width:200px!important;height:100px!important;object-fit:contain!important;max-width:100%!important}
 html body>footer.tas-brand-footer>.tas-footer-contact{grid-area:contact!important;text-align:center!important}
 html body>footer.tas-brand-footer>.tas-footer-policies{grid-area:policies!important;text-align:right!important}
 html body>footer.tas-brand-footer :is(p,a,strong){font-size:13px!important;line-height:1.6!important;font-weight:400!important;color:inherit!important}
 html body>footer.tas-brand-footer a{display:block!important}
 html body nav.tas-dashboard-return{display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important;box-sizing:border-box!important}
 html body nav.tas-dashboard-return>.tas-signed-in{margin-left:auto!important}
 html body .tas-added-module{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:12px 16px!important;min-height:46px!important;border:1px solid #ccd7d0!important;background:#f4f8f5!important;color:#285d39!important;text-decoration:none!important;border-radius:0!important;font:14px Arial,sans-serif!important;box-sizing:border-box!important}
}
@media screen and (max-width:760px){
 html body>footer.tas-brand-footer{grid-template-columns:1fr 1fr!important;grid-template-areas:"tas policies" "contact contact"!important;gap:18px!important}
 html body header .tas-header-logos :is(.tas-platform-title,.tas-platform-description){font-size:13px!important}
}
}

@layer tasFlatPanels { @media screen {
 html body header .tas-header-logos .tas-platform-title{font-weight:400!important}
 html body:has(#login.view.active)>footer,html body.tas-auth-screen footer,
 html body:has(#management-login) footer {display:none!important}
 html body .tas-management-header .tas-header-logos{display:grid!important;grid-template-columns:240px minmax(0,1fr) 230px!important;align-items:center!important;gap:24px!important;padding:28px!important;min-height:170px!important}
 html body .tas-management-header .tas-header-logos img{width:100%!important;height:110px!important;object-fit:contain!important}
 html body .tas-management-header .tas-platform-copy{display:flex!important;flex-direction:column!important;gap:12px!important;text-align:center!important}
 html body .tas-management-header .brand-meta{display:flex!important;gap:14px!important;flex-wrap:wrap!important;padding:14px 20px!important;background:#087b20!important;color:white!important;font:12px Arial,sans-serif!important;border-bottom:2px solid #b91421!important}
 html body .tas-management-header .brand-meta a{color:inherit!important}
 html body .tas-management-header nav{display:flex!important;justify-content:space-between!important;padding:14px 20px!important}
 html body.iq-audit-management .title{background:white!important;color:#243b2b!important;border-bottom:2px solid #b91421!important;padding:24px!important}
 html body.iq-audit-management .signed-in-details{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:12px;line-height:1.6}
 html body.iq-audit-management .workspace>aside nav{display:grid!important;grid-template-columns:1fr!important}
 html body.iq-audit-management .workspace>aside nav a{background:#edf3ef!important;border:1px solid #d5dfd9!important;font-weight:400!important}
 html body.iq-audit-management .workspace>aside nav a.active{background:#147c20!important;color:white!important}
 html body.iq-audit-management .panel{padding:22px!important}
}
@media screen and (max-width:760px){
 html body .tas-management-header .tas-header-logos{grid-template-columns:110px minmax(0,1fr) 110px!important;padding:16px!important;gap:12px!important;min-height:130px!important}
 html body .tas-management-header .tas-header-logos img{height:80px!important}
}}

@layer tasFlatPanels{@media screen{html body.iq-audit-management .workspace>aside nav a{color:#285d39!important}html body.iq-audit-management .workspace>aside nav a.active{color:#fff!important}}}

@layer tasFlatPanels{@media screen{html body>nav.tas-dashboard-return{width:calc(100% - 48px)!important;max-width:1320px!important;margin:0 auto!important;padding:14px 18px!important;justify-content:flex-start!important;gap:12px!important}html body>nav.tas-dashboard-return>#tas-user-heading-details{margin-left:auto!important}}@media screen and (max-width:600px){html body>nav.tas-dashboard-return{width:calc(100% - 24px)!important}}}

/* One dual-logo header across TAS EHSQ, RAL, VDC and all Library screens. */
@layer tasFlatPanels{@media screen{
 html body header:is(.tas-dual-brand-header,.app-header,.tas-management-header){border-left:0!important;border-right:0!important;border-bottom:0!important;border-radius:0!important;box-sizing:border-box!important}
 html body header:is(.tas-dual-brand-header,.app-header,.tas-management-header) .tas-header-logos{display:grid!important;grid-template-columns:298px minmax(0,1fr) 205px!important;align-items:center!important;gap:24px!important;min-height:148px!important;padding:16px 24px!important;box-sizing:border-box!important;background:white!important}
 html body header .tas-header-logos>.tas-header-iqaudit{grid-column:1!important;width:298px!important;height:112px!important;max-width:100%!important;object-fit:contain!important;justify-self:start!important}
 html body header .tas-header-logos>.tas-platform-copy{grid-column:2!important;text-align:center!important;align-items:center!important;min-width:0!important}
 html body header .tas-header-logos>:is(.tas-header-tas,.header-logo-frame){grid-column:3!important;justify-self:end!important;width:205px!important;height:112px!important;max-width:100%!important;min-height:0!important;max-height:112px!important;padding:0!important;margin:0!important;object-fit:contain!important}
 html body header .tas-header-logos>.header-logo-frame img{width:100%!important;height:100%!important;object-fit:contain!important}
 html body header :is(.brand-meta,.tas-matched-brand){border-bottom:2px solid #b91421!important}
}
@media screen and (max-width:1000px){html body header:is(.tas-dual-brand-header,.app-header,.tas-management-header) .tas-header-logos{grid-template-columns:180px minmax(0,1fr) 180px!important}html body header .tas-header-logos>:is(.tas-header-iqaudit,.tas-header-tas,.header-logo-frame){width:180px!important}}
@media screen and (max-width:600px){html body header:is(.tas-dual-brand-header,.app-header,.tas-management-header) .tas-header-logos{grid-template-columns:100px minmax(0,1fr) 100px!important;gap:12px!important;padding:16px 12px!important;min-height:140px!important}html body header .tas-header-logos>:is(.tas-header-iqaudit,.tas-header-tas,.header-logo-frame){width:100px!important;height:80px!important}html body header .tas-header-logos :is(.tas-platform-title,.tas-platform-description){font-size:12px!important}}
}

@layer tasFlatPanels{@media screen{html body>nav.tas-dashboard-return{border:0!important;border-radius:0!important;box-sizing:border-box!important}}}

@layer tasFlatPanels{@media screen{html body #dashboard button.dashboard-folder::after{border-radius:0!important}}}

/* Equal main-dashboard menu boxes; existing visibility, destinations and colours remain. */
@layer tasFlatPanels{@media screen{
 html body header.app-header>nav.tabs{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:10px!important;align-items:stretch!important}
 html body header.app-header>nav.tabs>:is(button,a),html body header.app-header #tas-header-exit-actions>:is(button,a){box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:6px 8px!important;line-height:1.15!important;white-space:normal!important;text-align:center!important;align-content:center!important;justify-content:center!important;border-radius:0!important}
 html body header.app-header>nav.tabs>#tas-header-exit-actions{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-column:1/-1!important;width:100%!important;max-width:none!important;margin:0!important;gap:10px!important}
 html body header.app-header #tas-header-exit-actions>[data-view="login"]{grid-column:1!important}
 html body header.app-header #tas-header-exit-actions>#tas-back-website{grid-column:7!important}
}@media screen and (max-width:900px){html body header.app-header>nav.tabs,html body header.app-header>nav.tabs>#tas-header-exit-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}html body header.app-header #tas-header-exit-actions>[data-view="login"]{grid-column:2!important}html body header.app-header #tas-header-exit-actions>#tas-back-website{grid-column:3!important}}
@media screen and (max-width:540px){html body header.app-header>nav.tabs,html body header.app-header>nav.tabs>#tas-header-exit-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}html body header.app-header #tas-header-exit-actions>[data-view="login"]{grid-column:1!important}html body header.app-header #tas-header-exit-actions>#tas-back-website{grid-column:2!important}}}

@layer tasFlatPanels{@media screen{
 html body header.app-header{border-bottom:0!important}
 html body header.app-header>nav.tabs>[data-view="dashboard"]:not([hidden]){display:flex!important;align-items:center!important}
 html body header.app-header>nav.tabs>[data-view="dashboard"]{order:1!important}
 html body header.app-header>nav.tabs>button.external-app-tab:not([data-view]){order:2!important}
 html body header.app-header>nav.tabs>a[href="safety-file-review.html"]{order:3!important}
 html body header.app-header>nav.tabs>button.external-app-tab[onclick*="gate2-online.html"]{order:4!important}
 html body header.app-header>nav.tabs>a[href^="ehsqe/management/"]{order:5!important}
 html body header.app-header>nav.tabs>[data-view="settings"]{order:6!important}
 html body header.app-header>nav.tabs>#tea-owner-button{order:7!important}
 html body header.app-header>nav.tabs>#tas-header-exit-actions{order:8!important}
}}

/* Keep the attendance contractor control aligned with every report-details pair. */
@layer tasFlatPanels{@media screen{
 html body #app #tas-standard-details .tas-standard-grid #tas-contractor-choice{min-width:0!important;margin:0!important;padding:0!important}
 html body #app #tas-standard-details .tas-standard-grid #tas-contractor-choice>label{display:block!important;box-sizing:border-box!important;line-height:20px!important;min-height:20px!important;margin:0 0 8px!important;padding:0!important}
 html body #app #tas-standard-details .tas-standard-grid #tas-contractor-choice>label>[data-required-star]{display:inline!important;padding:0!important;margin:0!important}
 html body #app #tas-standard-details .tas-standard-grid #tas-contractor-choice>:is(input,select){display:block!important;box-sizing:border-box!important;width:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:10px 12px!important;line-height:24px!important;vertical-align:top!important}
}}

/* One upper red trim, matching IQ: prevent the contact strip and navigation borders stacking. */
@layer tasFlatPanels { @media screen {
 html body header.app-header>.brand-meta{border-bottom:3px solid #b91421!important}
 html body header.app-header>nav.tabs{border-top:0!important}
} }

/* View records: one report outline, without stacked month/date/attachment accents. */
@layer tasFlatPanels { @media screen {
 html body main#app#app#app#app#app#app :is(.tas-record-month,.tas-record-month>.tas-record-day){border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;min-width:0!important}
 html body main#app#app#app#app#app#app .tas-record-month{margin:20px 0!important}
 html body main#app#app#app#app#app#app .tas-record-month>.tas-record-day{margin:12px 0 0!important}
 html body main#app#app#app#app#app#app .tas-record-month .tas-record-day>details.card.tas-record-entry{border:1px solid #166534!important;border-radius:0!important;padding:0!important;margin:12px 0!important;background:#fff!important;box-shadow:none!important}
 html body main#app#app#app#app#app#app .tas-record-month .tas-record-day>details.card.tas-record-entry[open]{padding:16px!important}
 html body main#app#app#app#app#app#app .tas-record-month .tas-record-day>details.card.tas-record-entry[open]>summary{margin:-16px -16px 16px!important}
 html body main#app#app#app#app#app#app .tas-record-entry :is(details,.card,.tas-evidence){border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;margin:16px 0!important;min-width:0!important}
 html body main#app#app#app#app#app#app .tas-record-entry details>summary{margin:0!important;border-radius:0!important}
 html body main#app#app#app#app#app#app .tas-record-entry details.tas-saved-form-details>dl.tas-saved-fields{padding:12px 0!important}
 html body main#app#app#app#app#app#app .tas-record-entry details.tas-saved-form-details>p{padding:0 0 12px!important}
}
@media screen and (max-width:640px){
 html body main#app#app#app#app#app#app .tas-record-month .tas-record-day>details.card.tas-record-entry[open]{padding:12px!important}
 html body main#app#app#app#app#app#app .tas-record-month .tas-record-day>details.card.tas-record-entry[open]>summary{margin:-12px -12px 12px!important}
}}

/* Consistent TAS green for the two platform header lines on every TAS screen. */
@layer tasFlatPanels { @media screen {
 html body header :is(.tas-platform-title,.tas-platform-description),
 html body header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos :is(.tas-platform-copy,.tas-header-platform-copy) :is(.tas-platform-title,.tas-platform-description),
 html body .tas-platform-login-copy :is(.tas-platform-title,.tas-platform-description){color:#245b36!important}
}}

/* Shared TAS branding: match the approved main-dashboard header and footer. */
@layer tasFlatPanels {
 @media screen {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) {
   box-sizing:border-box!important;
   width:calc(100% - 48px)!important;
   max-width:1320px!important;
   margin:24px auto 0!important;
   padding:0!important;
   background:#fff!important;
  }
  html body>header .tas-header-logos>.tas-platform-copy {
   display:block!important;
   min-width:0!important;
   margin:0!important;
   padding:8px 0!important;
   text-align:center!important;
  }
  html body>header .tas-header-logos>.tas-platform-copy>.tas-platform-title {
   display:block!important;
   margin:0!important;
   padding:0!important;
   font-family:Arial,sans-serif!important;
   font-size:18px!important;
   font-weight:700!important;
   line-height:1.3!important;
   color:#245b36!important;
   text-align:center!important;
  }
  html body>header .tas-header-logos>.tas-platform-copy>.tas-platform-description {
   display:block!important;
   margin:8px 0 0!important;
   padding:0!important;
   font-family:Arial,sans-serif!important;
   font-size:18px!important;
   font-weight:400!important;
   line-height:1.5!important;
   color:#245b36!important;
   text-align:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header)>.brand-meta {
   box-sizing:border-box!important;
   display:flex!important;
   align-items:center!important;
   flex-wrap:wrap!important;
   gap:4px 16px!important;
   margin:0!important;
   padding:12px 20px!important;
   background:#2e8d47!important;
   border-bottom:3px solid #b91421!important;
   font:400 12px/1.5 Arial,Helvetica,sans-serif!important;
   color:#fff!important;
  }
  html body>header>.brand-meta :is(span,a) {
   font:inherit!important;
   color:inherit!important;
   text-decoration:none!important;
  }
  html body>header>.brand-meta>.contact-links {
   display:inline-flex!important;
   align-items:center!important;
   gap:7px!important;
  }
  html body>footer.tas-brand-footer {
   box-sizing:border-box!important;
   width:calc(100% - 48px)!important;
   max-width:1320px!important;
   margin:28px auto 0!important;
   padding:24px!important;
   background:#fff!important;
   border-top:4px solid #166534!important;
   font-family:Arial,sans-serif!important;
   color:#20232b!important;
  }
  html body>footer.tas-brand-footer :is(.tas-footer-contact,.tas-footer-policies) {
   margin:0!important;
   padding:0!important;
   border:0!important;
   background:transparent!important;
   font:400 13px/1.6 Arial,sans-serif!important;
   color:#20232b!important;
  }
  html body>footer.tas-brand-footer :is(.tas-footer-contact,.tas-footer-policies)>strong {
   display:block!important;
   margin:0 0 4px!important;
   padding:0!important;
   font:inherit!important;
   color:inherit!important;
  }
  html body>footer.tas-brand-footer :is(.tas-footer-contact,.tas-footer-policies)>p {
   display:block!important;
   margin:4px 0!important;
   padding:0!important;
   font:inherit!important;
   color:inherit!important;
  }
  html body>footer.tas-brand-footer :is(.tas-footer-contact,.tas-footer-policies)>a {
   display:block!important;
   margin:0!important;
   padding:0!important;
   font:inherit!important;
   color:inherit!important;
   text-decoration:none!important;
  }
  html body>footer.tas-brand-footer .tas-footer-policies>p.tas-footer-copyright {
   margin:12px 0 4px!important;
  }
  html body>footer.tas-brand-footer .tas-footer-policies::after {
   content:"Website developed by \2013  TAS Capital Group"!important;
   display:block!important;
   margin:8px 0 0!important;
   padding:0!important;
   font:400 12px/1.6 Arial,sans-serif!important;
   color:#20232b!important;
  }
  html body>footer.tas-brand-footer>.footer-logo-box {
   display:flex!important;
   align-items:center!important;
   justify-content:center!important;
   width:220px!important;
   max-width:100%!important;
   margin:0!important;
   padding:0!important;
   border:0!important;
   background:#fff!important;
  }
 }
 @media screen and (max-width:640px) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header),
  html body>footer.tas-brand-footer {
   width:calc(100% - 20px)!important;
  }
 }
}

/* The management page already has the standard 24px body inset. */
@layer tasFlatPanels{@media screen{html body.iq-audit-management>header.tas-management-header{margin-top:0!important}}}

/* Keep all footer columns visible; the Library already provides the page inset. */
@layer tasFlatPanels {
 @media screen {
  html body>footer.tas-brand-footer>:is(.tas-footer-contact,.tas-footer-policies) {
   display:block!important;
  }
  html body:has(#libraryArea)>header.tas-dual-brand-header {
   width:100%!important;
   margin-top:0!important;
  }
  html body:has(#libraryArea)>footer.tas-brand-footer {
   width:100%!important;
  }
 }
}

/* Shorten only IQAudit logos in page headers; preserve the existing layout. */
@layer tasFlatPanels {
 @media screen {
  html body > header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos img.tas-header-iqaudit {
   transform:scale(.91)!important;
   transform-origin:left center!important;
  }
 }
}

/* Mobile layout corrections, 5 November 2026. Screen only; desktop and print keep their layouts. */
@layer tasFlatPanels {
 @media screen and (max-width:760px) {
  html body>footer.tas-brand-footer {
   grid-template-columns:minmax(0,1fr)!important;
   grid-template-areas:none!important;
   gap:20px!important;
  }
  html body>footer.tas-brand-footer>:is(.footer-logo-box,.tas-footer-powered,.tas-footer-contact,.tas-footer-policies,.iq-footer-contact,.iq-footer-policies) {
   grid-area:auto!important;
   grid-column:1!important;
   grid-row:auto!important;
   min-width:0!important;
   max-width:100%!important;
   text-align:center!important;
   justify-self:center!important;
  }
  html body>footer.tas-brand-footer>:is(.footer-logo-box,.tas-footer-powered) {
   margin-left:auto!important;
   margin-right:auto!important;
   align-items:center!important;
   justify-content:center!important;
  }
  html body>footer.tas-brand-footer :is(.footer-logo-box,.tas-footer-powered) img {
   display:block!important;
   max-width:100%!important;
   margin-left:auto!important;
   margin-right:auto!important;
   align-self:center!important;
   object-position:center!important;
  }
  html body>footer.tas-brand-footer .tas-footer-powered p {text-align:center!important}
  html body header.app-header #iq-header-primary-actions>#accountManagementNav,
  html body header.app-header .tabs>:is(#tea-owner-button,#tma-admin-button),
  html body header.app-header .tabs>[data-view="accounts"] {
   grid-column:1/-1!important;
   flex:1 0 100%!important;
   width:100%!important;
   max-width:100%!important;
   margin:0!important;
  }
  html body :is(main,.view,.panel,.card,fieldset,.form-grid,.settings-grid,.panel-grid,.tas-form-grid,.tas-standard-grid,.tas-site-card,.tas-record-entry,.management-shell,.workspace)>* {
   min-width:0;
  }
  html body :is(main,header,footer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {
   box-sizing:border-box!important;
   min-width:0!important;
   max-width:100%!important;
  }
  html body :is(.page-title,.page-banner,.section-banner,.settings-actions,.form-actions,.tas-site-controls,.toolbar,.iq-settings-step-nav) {
   flex-wrap:wrap!important;
   min-width:0!important;
  }
  html body :is(h1,h2,h3,label,.save-status,.tas-site-card,.tas-record-entry,.review-card,.iq-setting-card) {overflow-wrap:anywhere}
  html body :is(.table-wrap,.table-wrapper,.table-scroll,.records-table-wrap) {max-width:100%;overflow-x:auto}
  html body :is(.modal,.modal-content,[role="dialog"]) {box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
 }
 @media screen and (max-width:600px) {
  html body :is(.form-grid,.settings-grid,.panel-grid,.tas-form-grid,.tas-standard-grid) {grid-template-columns:minmax(0,1fr)!important}
  html body :is(.form-grid,.settings-grid,.panel-grid,.tas-form-grid,.tas-standard-grid)>* {grid-column:auto!important}
  html body #settings .iq-settings-step-nav button {min-width:0!important;flex:1 1 120px!important;max-width:100%!important}
 }
}

/* Mobile footer reading order after stacking the columns. */
@layer tasFlatPanels{@media screen and (max-width:760px){html body>footer.tas-brand-footer>.footer-logo-box{order:-1!important}html body>footer.tas-brand-footer>.tas-footer-contact{order:0!important}html body>footer.tas-brand-footer>.tas-footer-policies{order:1!important}}

/* TAS tablets: logos beside the copy; Account, Log out and website on one row. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos {
   display:grid!important;
   grid-template-columns:minmax(110px,1fr) minmax(220px,1.45fr) minmax(110px,1fr)!important;
   grid-template-rows:auto!important;
   align-items:center!important;
   gap:16px!important;
   min-height:168px!important;
   height:auto!important;
   padding:20px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-header-iqaudit {
   grid-column:1!important;grid-row:1!important;
   align-self:center!important;justify-self:center!important;
   width:100%!important;max-width:210px!important;
   height:96px!important;max-height:none!important;
   margin:0!important;object-fit:contain!important;
   object-position:center!important;transform:none!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy {
   grid-column:2!important;grid-row:1!important;
   min-width:0!important;max-width:100%!important;
   text-align:center!important;align-self:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>:is(.tas-header-tas,.header-logo-frame) {
   grid-column:3!important;grid-row:1!important;
   align-self:center!important;justify-self:center!important;
   width:100%!important;max-width:170px!important;
   height:104px!important;min-height:0!important;max-height:104px!important;
   margin:0!important;padding:0!important;object-fit:contain!important;
   object-position:center!important;transform:none!important;
  }
  html body header.app-header>nav.tabs {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body header.app-header>nav.tabs>#tas-header-exit-actions {display:contents!important}
  html body header.app-header>nav.tabs>#tea-owner-button {
   grid-column:1!important;grid-row:3!important;
   width:100%!important;max-width:100%!important;margin:0!important;
  }
  html body header.app-header>nav.tabs #tas-header-exit-actions>[data-view="login"] {grid-column:2!important;grid-row:3!important;background:#2e8d47!important;color:#fff!important;border-color:#2e8d47!important}
  html body header.app-header>nav.tabs #tas-header-exit-actions>#tas-back-website {grid-column:3!important;grid-row:3!important}
  html body header.app-header>nav.tabs #tas-header-exit-actions>#tas-news-strip {grid-column:1/-1!important;grid-row:4!important}
  html body header.app-header>nav.tabs>#tma-admin-button {grid-column:1/-1!important;order:90!important}
 }
}

/* Introduction only: align the logo and copy inside the same phone/tablet margins. */
@layer tasFlatPanels {
 @media screen and (max-width:1199px),screen and (max-width:1366px) and (pointer:coarse) {
  html body #dashboard>.dashboard-overview-intro {
   grid-template-columns:minmax(0,1fr)!important;
   gap:20px!important;
  }
  html body #dashboard>.dashboard-overview-intro>.intro-logo-row {
   display:flex!important;align-items:center!important;justify-content:center!important;
   box-sizing:border-box!important;width:100%!important;min-width:0!important;
   height:auto!important;margin:0!important;padding:0!important;
  }
  html body #dashboard>.dashboard-overview-intro>.intro-logo-row img {
   box-sizing:border-box!important;display:block!important;
   width:100%!important;max-width:none!important;height:auto!important;
   min-height:0!important;max-height:none!important;
   object-fit:contain!important;object-position:center!important;
   margin:0!important;padding:0!important;
  }
  html body #dashboard>.dashboard-overview-intro>p {
   box-sizing:border-box!important;min-width:0!important;width:100%!important;
   margin:0!important;
  }
 }
}

/* Phones only: readable full-width copy below the existing two logos. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos {
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   grid-template-rows:auto auto!important;align-items:center!important;
   gap:12px 16px!important;min-height:0!important;height:auto!important;
   padding:16px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>img.tas-header-iqaudit {
   grid-column:1!important;grid-row:1!important;
   justify-self:center!important;align-self:center!important;
   width:100%!important;max-width:180px!important;height:80px!important;
   min-height:0!important;max-height:80px!important;margin:0!important;
   object-fit:contain!important;object-position:center!important;transform:none!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>:is(.tas-header-tas,.header-logo-frame) {
   grid-column:2!important;grid-row:1!important;
   justify-self:center!important;align-self:center!important;
   width:100%!important;max-width:160px!important;height:80px!important;
   min-height:0!important;max-height:80px!important;padding:0!important;margin:0!important;
   object-fit:contain!important;object-position:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>:is(.tas-platform-copy,.tas-header-platform-copy) {
   grid-column:1/-1!important;grid-row:2!important;
   box-sizing:border-box!important;display:block!important;
   width:100%!important;min-width:0!important;max-width:none!important;
   margin:0!important;padding:0!important;text-align:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description) {
   display:block!important;box-sizing:border-box!important;width:100%!important;
   min-width:0!important;max-width:none!important;white-space:normal!important;
   word-break:normal!important;overflow-wrap:normal!important;text-align:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>.tas-platform-title {font-size:18px!important;line-height:1.3!important}
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>.tas-platform-description {font-size:16px!important;line-height:1.45!important;margin:8px 0 0!important}
 }
}

/* Pages using the shared app loader reveal the entire brand group together. */
@layer tasFlatPanels {
 @media screen {
  html:has(script[src*="app-install.js"]) body>header .tas-header-logos:not([data-tas-brand-ready]) {
   opacity:0;
   animation:tasHeaderBrandFallback 6s steps(1,end) forwards!important;
  }
 }
}
/* Keep the header usable if the optional loader cannot be downloaded. */
@keyframes tasHeaderBrandFallback {from{opacity:0}to{opacity:1}}

/* Phones only: equal-size dashboard return and signed-in details, stacked. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body>nav.tas-dashboard-return {
   display:grid!important;grid-template-columns:minmax(0,1fr)!important;
   grid-auto-rows:1fr!important;gap:10px!important;
   align-items:stretch!important;justify-items:stretch!important;
  }
  html body>nav.tas-dashboard-return>:is(a,#tas-user-heading-details,.tas-signed-in) {
   grid-column:1!important;grid-row:auto!important;
   box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
   align-items:center!important;justify-content:center!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   min-height:72px!important;height:100%!important;
   margin:0!important;text-align:center!important;white-space:normal!important;
   overflow-wrap:anywhere;
  }
 }
}

/* Phones only: equal reminder actions side by side. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body main#app #tas-due-guide-bar {
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   align-items:stretch!important;gap:12px!important;
  }
  html body main#app #tas-due-guide-bar>div {grid-column:1/-1!important;min-width:0!important}
  html body main#app #tas-due-guide-bar>:is(#tas-due-guide-launch,#tas-due-guide-retry) {
   grid-row:2!important;box-sizing:border-box!important;
   display:flex!important;align-items:center!important;justify-content:center!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   min-height:64px!important;height:100%!important;margin:0!important;padding:10px 8px!important;
   font-size:13px!important;line-height:1.3!important;text-align:center!important;
   white-space:normal!important;overflow-wrap:anywhere;
  }
  html body main#app #tas-due-guide-launch {grid-column:1!important}
  html body main#app #tas-due-guide-retry {grid-column:2!important}
 }
}

/* Phones only: activity rows grow to fit wrapped labels. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body main#app #iq-daily-required :is(details.tas-deadline-guide,details.tas-submission-fold) {
   height:auto!important;max-height:none!important;min-height:0!important;
  }
  html body main#app #iq-daily-required :is(details.tas-deadline-guide,details.tas-submission-fold)>summary {
   box-sizing:border-box!important;height:auto!important;max-height:none!important;
   min-height:56px!important;padding:14px 16px!important;
   line-height:1.4!important;white-space:normal!important;
   overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;
  }
  html body main#app #iq-daily-required :is(details.tas-deadline-guide,details.tas-submission-fold)>summary>span:not(.tas-guide-plus):not([aria-hidden]) {
   min-width:0!important;white-space:normal!important;overflow:visible!important;
   text-overflow:clip!important;overflow-wrap:anywhere;
  }
  html body main#app #iq-daily-required .tas-daily-guides>.tas-deadline-guides>li {
   height:auto!important;max-height:none!important;min-height:0!important;
  }
 }
}

/* Phones only: download actions span the available width of their panel. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body main#app .tas-form-download>:is(button,a) {
   box-sizing:border-box!important;display:flex!important;
   align-items:center!important;justify-content:center!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   min-height:52px!important;height:auto!important;
   margin:12px 0 0!important;text-align:center!important;
   white-space:normal!important;overflow-wrap:anywhere;
  }
 }
}

/* Authentication state takes precedence over responsive navigation layouts. */
@layer tasFlatPanels {
 @media screen {
  html body:has(#app>.tas-login-page)>nav.tas-dashboard-return,
  html body>nav.tas-dashboard-return[style*="width: 0px"],
  html body>nav.tas-dashboard-return[style*="width:0px"] {
   display:none!important;
  }
 }
}

@layer tasFlatPanels{@media screen{:root{--tas-combined-logo:url("/tool/assets/iq-clean-logo.svg")}}}
/* TAS EHSQ Tool: supplied combined logo at left, platform copy at right. */
@layer tasFlatPanels {
 @media screen {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos,
  html body .tas-login-page .tas-login-brands {
   display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)!important;
   grid-template-rows:auto!important;align-items:center!important;gap:24px!important;
   min-height:148px!important;height:auto!important;padding:20px 24px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>img.tas-header-iqaudit,
  html body .tas-login-page .tas-login-brands>img:first-child {
   content:var(--tas-combined-logo);
   grid-column:1!important;grid-row:1!important;justify-self:start!important;align-self:center!important;
   display:block!important;width:100%!important;max-width:560px!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   aspect-ratio:1006/250!important;object-fit:contain!important;object-position:left center!important;
   margin:0!important;padding:0!important;transform:none!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>:is(.tas-header-tas,.header-logo-frame),
  html body .tas-login-page .tas-login-brands>img:last-child {display:none!important}
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy,
  html body .tas-login-page .tas-login-brands>.tas-platform-copy {
   grid-column:2!important;grid-row:1!important;display:block!important;
   min-width:0!important;width:100%!important;max-width:none!important;
   margin:0!important;padding:0!important;text-align:right!important;align-items:flex-end!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description),
  html body .tas-login-page .tas-login-brands>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description) {
   display:block!important;min-width:0!important;width:100%!important;
   max-width:none!important;white-space:normal!important;text-align:right!important;
   word-break:normal!important;overflow-wrap:normal!important;
  }
 }
 @media screen and (max-width:640px) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos,
  html body .tas-login-page .tas-login-brands {grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)!important;gap:14px!important;padding:16px!important;min-height:132px!important}
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>.tas-platform-title,
  html body .tas-login-page .tas-login-brands>.tas-platform-copy>.tas-platform-title {font-size:14px!important;line-height:1.3!important}
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos>.tas-platform-copy>.tas-platform-description,
  html body .tas-login-page .tas-login-brands>.tas-platform-copy>.tas-platform-description {font-size:13px!important;line-height:1.4!important;margin:8px 0 0!important}
 }
}

/* Phones and tablets: supplied combined logo centred above the platform copy. */
@layer tasFlatPanels {
 @media screen and (max-width:1199px), screen and (max-width:1366px) and (pointer:coarse) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos,
  html body .tas-login-page .tas-login-brands.tas-login-brands {
   grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;
   gap:18px!important;min-height:0!important;padding:24px 20px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>img.tas-header-iqaudit,
  html body .tas-login-page .tas-login-brands.tas-login-brands>img:first-child {
   grid-column:1!important;grid-row:1!important;justify-self:center!important;
   width:100%!important;max-width:560px!important;object-position:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy,
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy {
   grid-column:1!important;grid-row:2!important;text-align:center!important;align-items:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description),
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description) {
   text-align:center!important;
  }
 }
}

/* Compact D3 utility icons share the capture tiles' fixed left icon column. */
@layer tasFlatPanels {
 @media screen and (max-width:1199px), screen and (max-width:1366px) and (pointer:coarse) {
  html body main#app .tas-capture-grid>.tas-module-tile>button.tas-utility-card {
   position:relative!important;padding:26px 22px 26px 88px!important;
   justify-content:flex-start!important;text-align:left!important;
  }
  html body main#app .tas-capture-grid>.tas-module-tile>button.tas-utility-card>.tas-utility-icon {
   position:absolute!important;left:22px!important;top:50%!important;
   transform:translateY(-50%)!important;width:46px!important;height:46px!important;
   min-width:46px!important;min-height:46px!important;max-width:46px!important;max-height:46px!important;
   margin:0!important;flex:0 0 46px!important;
  }
  html body main#app .tas-capture-grid>.tas-module-tile>button.tas-utility-card>.tas-utility-label {
   display:block!important;width:100%!important;min-width:0!important;
   margin:0!important;padding:0!important;text-align:left!important;overflow-wrap:anywhere!important;
  }
 }
}

/* Tablets: both reminder actions share the bottom row at equal sizes. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px), screen and (min-width:641px) and (max-width:1366px) and (pointer:coarse) {
  html body main#app #tas-due-guide-bar {
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   grid-template-rows:auto auto!important;align-items:stretch!important;gap:12px!important;
  }
  html body main#app #tas-due-guide-bar>div {grid-column:1/-1!important;grid-row:1!important;min-width:0!important}
  html body main#app #tas-due-guide-bar>:is(#tas-due-guide-launch,#tas-due-guide-retry) {
   grid-row:2!important;box-sizing:border-box!important;display:flex!important;
   align-items:center!important;justify-content:center!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   min-height:64px!important;height:100%!important;margin:0!important;padding:10px 12px!important;
   font-size:15px!important;line-height:1.3!important;text-align:center!important;
   white-space:normal!important;overflow-wrap:anywhere;
  }
  html body main#app #tas-due-guide-retry {grid-column:1!important}
  html body main#app #tas-due-guide-launch {grid-column:2!important}
 }
}

/* Tablet header: give the combined logo more room and slightly reduce the right-hand copy. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px), screen and (min-width:641px) and (max-width:1366px) and (any-pointer:coarse) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos,
  html body .tas-login-page .tas-login-brands.tas-login-brands {
   grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)!important;grid-template-rows:auto!important;
   align-items:center!important;gap:24px!important;min-height:148px!important;padding:20px 24px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>img.tas-header-iqaudit,
  html body .tas-login-page .tas-login-brands.tas-login-brands>img:first-child {
   grid-column:1!important;grid-row:1!important;justify-self:start!important;
   width:100%!important;max-width:660px!important;object-position:left center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy,
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy {
   grid-column:2!important;grid-row:1!important;text-align:right!important;align-items:flex-end!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy>.tas-platform-title,
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy>.tas-platform-title {
   font-size:16px!important;line-height:1.3!important;text-align:right!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy>.tas-platform-description,
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy>.tas-platform-description {
   font-size:15px!important;line-height:1.4!important;text-align:right!important;margin:8px 0 0!important;
  }
 }
}

/* Phones: enlarge the combined artwork to the full header width, keeping the copy inset. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>img.tas-header-iqaudit,
  html body .tas-login-page .tas-login-brands.tas-login-brands>img:first-child {
   width:calc(100% + 40px)!important;max-width:none!important;box-sizing:border-box!important;
   justify-self:center!important;object-position:center!important;
  }
 }
}

/* Tablets follow the phone header: enlarged twin logo centred above centred copy. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px), screen and (min-width:641px) and (max-width:1366px) and (any-pointer:coarse) {
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos,
  html body .tas-login-page .tas-login-brands.tas-login-brands {
   grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;
   gap:18px!important;min-height:0!important;padding:24px 20px!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>img.tas-header-iqaudit,
  html body .tas-login-page .tas-login-brands.tas-login-brands>img:first-child {
   grid-column:1!important;grid-row:1!important;justify-self:center!important;
   width:100%!important;max-width:660px!important;object-position:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy,
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy {
   grid-column:1!important;grid-row:2!important;text-align:center!important;align-items:center!important;
  }
  html body>header:is(.app-header,.tas-dual-brand-header,.tas-management-header) .tas-header-logos.tas-header-logos>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description),
  html body .tas-login-page .tas-login-brands.tas-login-brands>.tas-platform-copy>:is(.tas-platform-title,.tas-platform-description) {
   text-align:center!important;
  }
 }
}

/* Tablets: View records spans both capture-grid columns. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px), screen and (min-width:641px) and (max-width:1366px) and (any-pointer:coarse) {
  html body main#app .tas-capture-grid>.tas-module-tile.tas-records-tile {display:contents!important}
  html body main#app .tas-capture-grid>.tas-module-tile.tas-records-tile>button {
   grid-column:1/-1!important;justify-self:stretch!important;
   width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box!important;
  }
 }
}

/* Tablet View records: centre the icon and label together within the full-row tile. */
@layer tasFlatPanels {
 @media screen and (min-width:641px) and (max-width:1199px), screen and (min-width:641px) and (max-width:1366px) and (any-pointer:coarse) {
  html body main#app .tas-capture-grid>.tas-module-tile.tas-records-tile>button.tas-utility-card {
   display:flex!important;justify-content:center!important;align-items:center!important;
   padding:24px 22px!important;gap:18px!important;text-align:center!important;
  }
  html body main#app .tas-capture-grid>.tas-module-tile.tas-records-tile>button.tas-utility-card>.tas-utility-icon {
   position:static!important;left:auto!important;top:auto!important;transform:none!important;
   margin:0!important;flex:0 0 46px!important;
  }
  html body main#app .tas-capture-grid>.tas-module-tile.tas-records-tile>button.tas-utility-card>.tas-utility-label {
   width:auto!important;max-width:100%!important;min-width:0!important;
   flex:0 1 auto!important;margin:0!important;padding:0!important;text-align:center!important;
  }
 }
}

/* Small phones only: statistics/site, rotation statement, then the full-row control. */
@layer tasFlatPanels {
 @media screen and (max-width:640px) {
  html body #tasStatsRotation {
   display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;
   align-items:center!important;gap:12px!important;
  }
  html body #tasStatsRotation>label {
   grid-column:1!important;grid-row:1!important;margin:0!important;white-space:nowrap!important;
  }
  html body #tasStatsRotation>#tasStatsSite {
   grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;
   max-width:100%!important;box-sizing:border-box!important;margin:0!important;
  }
  html body #tasStatsRotation>span {
   grid-column:1/-1!important;grid-row:2!important;display:block!important;
   min-width:0!important;margin:0!important;text-align:center!important;
  }
  html body #tasStatsRotation>#tasStatsPause {
   grid-column:1/-1!important;grid-row:3!important;display:flex!important;
   align-items:center!important;justify-content:center!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   min-height:48px!important;box-sizing:border-box!important;margin:0!important;
   white-space:normal!important;text-align:center!important;
  }
 }
}
