:root {
  --qt-primary: #174A5B;
  --qt-secondary: #2E6875;
  --qt-success: #48745C;
  --qt-warning: #C7952D;
  --qt-caution: #A9663F;
  --qt-neutral: #5B6875;
  --primary: #2563eb;
  --primary-strong: #1746b3;
  --primary-soft: #eef5ff;
  --accent: #0ea5e9;
  --ink: #172033;
  --heading: #102a62;
  --muted: #64748b;
  --subtle: #8a98ad;
  --border: #d9e5f6;
  --border-strong: #bfd2ee;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --page: #f2f6fc;
  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #9a5b00;
  --warning-soft: #fff7df;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --shadow-sm: 0 7px 18px rgba(15, 35, 70, .06);
  --shadow-md: 0 18px 44px rgba(15, 35, 70, .09);
  --shadow-menu: 0 24px 64px rgba(15, 35, 70, .18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a,
button,
summary,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: var(--primary);
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Hidden form fields must never become visible when generic input styling is applied. */
input[type="hidden"] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 5000;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--heading);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Shared application shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
  padding: 7px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 24px rgba(15, 35, 70, .045);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  color: var(--heading);
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(23, 70, 179, .14));
}

.brand-name {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 900;
}

.nav-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.main-nav,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.main-nav {
  overflow: visible;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  color: #35445b;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-utility-link > span:first-child {
  color: var(--primary-strong);
  font-size: .95rem;
  line-height: 1;
}

.topbar-utility-link:hover,
.topbar-utility-link:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.qt360-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}

.qt360-breadcrumbs a {
  color: var(--primary-strong);
  text-decoration: none;
}

.qt360-breadcrumbs a:hover,
.qt360-breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.qt360-breadcrumbs .current {
  color: var(--heading);
  font-weight: 850;
}

.build-version-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #cbdcf3;
  border-radius: 6px;
  background: #fff;
  color: var(--heading);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.build-version-control:hover,
.build-version-control.active {
  border-color: #8db2ec;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.version-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #16855b;
  box-shadow: 0 0 0 3px rgba(22, 133, 91, .12);
}

.main-nav > a,
.nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #e1e8f2;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: #243044;
  box-shadow: 0 5px 14px rgba(15, 35, 70, .035);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.main-nav > a:hover,
.main-nav > a.active,
.main-nav > a[aria-current="page"],
.nav-dropdown > summary:hover,
.nav-dropdown.nav-active > summary,
.nav-dropdown[open] > summary {
  border-color: #a8c5f3;
  background: var(--primary-soft);
  color: var(--primary-strong);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .11);
}

.nav-dropdown,
.user-menu {
  position: relative;
}

.nav-dropdown > summary,
.user-menu > summary {
  list-style: none;
}

.nav-dropdown > summary::marker,
.user-menu > summary::marker {
  content: "";
}

.nav-dropdown > summary::-webkit-details-marker,
.user-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: -3px 1px 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--primary);
  font-size: 0;
  line-height: 0;
  transform: rotate(45deg);
  transform-origin: center;
  transition: margin .16s ease, transform .16s ease;
}

.nav-dropdown[open] .nav-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2000;
  display: grid;
  gap: 3px;
  min-width: 270px;
  max-width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: #27364d;
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
  white-space: normal;
}

.menu a:hover,
.menu a.active,
.menu a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.nav-modules .menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: min(540px, calc(100vw - 32px));
}

.menu-section {
  grid-column: 1 / -1;
  margin: 5px 8px 2px;
  padding-top: 8px;
  border-top: 1px solid #e7edf6;
  color: #62718a;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.menu-section:first-child {
  margin-top: 0;
  padding-top: 4px;
  border-top: 0;
}

.company-switch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 245px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: var(--shadow-sm);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.company-switch-chip:hover {
  border-color: #94b8ef;
  background: var(--primary-soft);
}

.company-switch-chip span {
  color: var(--muted);
}

.company-switch-chip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--primary-strong);
  font-weight: 900;
  text-overflow: ellipsis;
}

.company-chip-logo,
.user-company-logo {
  flex: 0 0 auto;
  width: 76px;
  height: 30px;
  border: 1px solid #d7e2f0;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.user-company-logo {
  width: 86px;
  height: 34px;
}

.standard-profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 260px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid #bbd7f4;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: #17406f;
  box-shadow: var(--shadow-sm);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.standard-profile-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standard-profile-chip:hover {
  border-color: #86b6ea;
  background: #dbeeff;
}

.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  max-width: 340px;
  padding: 6px 11px 6px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  list-style: none;
  text-align: left;
}

.user-menu-button:hover,
.user-menu[open] .user-menu-button {
  border-color: #a8c5f3;
  background: var(--primary-soft);
}

.user-menu-button strong,
.user-menu-button small {
  display: block;
  line-height: 1.15;
}

.user-menu-button strong {
  max-width: 210px;
  overflow: hidden;
  font-size: .84rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-button small {
  color: var(--primary);
  font-size: .72rem;
  font-weight: 750;
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
}

.user-dropdown-menu {
  right: 0;
  left: auto;
  min-width: 230px;
}

.danger-item {
  color: var(--danger) !important;
}

.mobile-nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--heading);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.mobile-nav-icon,
.mobile-nav-icon::before,
.mobile-nav-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transition: transform .16s ease, opacity .16s ease;
}

.mobile-nav-icon {
  position: relative;
}

.mobile-nav-icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.mobile-nav-icon::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.topbar.nav-open .mobile-nav-icon {
  background: transparent;
}

.topbar.nav-open .mobile-nav-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.topbar.nav-open .mobile-nav-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Page structure */
.container {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 28px;
}

.qms-list-page .container {
  width: min(100%, 1760px);
  max-width: 1760px;
  padding: 28px;
}

.page-heading,
.hero,
.panel,
.clause-card {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.page-heading,
.panel,
.clause-card {
  padding: 28px;
}

.page-heading {
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.page-heading::before {
  display: none;
}

.page-heading h1 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 2.55rem;
  font-weight: 900;
  line-height: 1.04;
}

.page-heading p {
  max-width: 84ch;
  margin: 7px 0 0;
  color: var(--muted);
}

.record-heading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  margin-top: 17px;
}

.record-page-heading h1 {
  margin: 7px 0;
}

.record-module-eyebrow {
  display: block;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-heading-state {
  display: grid;
  min-width: 150px;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #bfd3ef;
  border-radius: 8px;
  background: #f6f9fe;
}

.record-heading-state span {
  color: var(--heading);
  font-size: .84rem;
  font-weight: 850;
}

.record-heading-state small {
  color: #08775a;
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-strong);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.back-link::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.tenant-pill {
  display: inline-flex;
  width: auto;
  margin-top: 14px !important;
  padding: 6px 11px;
  border: 1px solid #bdd3f5;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong) !important;
  font-size: .9rem;
  font-weight: 850;
}

.panel-heading,
.brief-card-heading,
.report-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading h2,
.panel-heading h3,
.brief-card-heading h3,
.report-title-row h2 {
  margin: 0;
  color: var(--heading);
  line-height: 1.2;
}

.panel-heading h2 {
  font-size: 1.4rem;
}

.panel-heading p,
.report-title-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.muted,
label small {
  color: var(--muted);
}

.muted {
  display: block;
  margin-top: 6px;
  font-size: .86rem;
}

.empty-state {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

footer {
  padding: 24px 28px 32px;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

.footer-build-revision {
  margin-left: 8px;
  color: var(--heading);
  font-weight: 800;
  text-decoration: none;
}

.footer-build-revision:hover,
.footer-build-revision:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
}

/* Buttons and commands */
.button-link,
.form-actions a,
.toolbar-actions a,
.workflow-actions a,
button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 9px 20px rgba(37, 99, 235, .17);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.button-link:hover,
.form-actions a:hover,
.toolbar-actions a:hover,
.workflow-actions a:hover,
button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card):hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  box-shadow: 0 11px 24px rgba(37, 99, 235, .23);
  transform: translateY(-1px);
}

.compact {
  width: max-content;
  min-height: 36px !important;
  padding: 7px 11px !important;
  font-size: .86rem;
  white-space: nowrap;
}

.secondary {
  border-color: var(--border-strong) !important;
  background: var(--surface) !important;
  color: var(--primary-strong) !important;
  box-shadow: var(--shadow-sm) !important;
}

.secondary:hover {
  border-color: #94b8ef !important;
  background: var(--primary-soft) !important;
}

.danger-button {
  border-color: var(--danger) !important;
  background: var(--danger) !important;
}

.brief-card-heading a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--primary-strong);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.brief-card-heading a:hover {
  border-color: #94b8ef;
  background: var(--primary-soft);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

/* Forms */
input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd9eb;
  border-radius: var(--radius-sm);
  background: #fbfdff;
  color: var(--ink);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #9eb9dd;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .16);
  outline: none;
}

input[readonly],
textarea[readonly],
select:disabled,
input:disabled {
  background: #eef2f7;
  color: #56657a;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--primary);
}

label {
  min-width: 0;
}

label > span {
  display: block;
  margin-bottom: 6px;
  color: #26364e;
  font-size: .85rem;
  font-weight: 800;
}

label small {
  display: block;
  margin-top: 6px;
  font-size: .8rem;
  line-height: 1.35;
}

.filterable-select-search {
  min-height: 36px;
  margin-bottom: 6px;
  padding: 7px 10px;
  font-size: .86rem;
}

.record-form .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

label.wide {
  grid-column: 1 / -1;
}

label.span-full {
  grid-column: 1 / -1;
}

.ncr-record-header {
  display: grid;
  gap: 12px;
}

.ncr-header-meta,
.ncr-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ncr-meta-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ncr-meta-card span {
  display: block;
  color: #64748b;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ncr-meta-card strong {
  display: block;
  margin-top: 4px;
  color: var(--heading);
}

.ncr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ncr-tabs a {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--heading);
  font-size: .86rem;
  font-weight: 850;
  text-decoration: none;
}

.ncr-tabs a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ncr-section-title {
  margin: 0 0 14px;
}

.ncr-section-title h2 {
  margin: 0;
}

.ncr-section-title p {
  margin: 4px 0 0;
  color: #64748b;
}

.ncr-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.ncr-form-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.inline-form input {
  width: min(100%, 420px);
}

.admin-form,
.role-permission-form {
  display: grid;
  gap: 16px;
}

.upload-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #92b7ed;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.file-list-row form {
  margin: 0;
}

.file-access-denied {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #f0c6c2;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 850;
}

.file-access-denied small {
  color: #8d2d25;
  font-size: .78rem;
  font-weight: 750;
}

.success-note,
.readonly-note {
  margin: 10px 0 0;
  font-weight: 800;
}

.success-note {
  color: var(--success) !important;
}

.readonly-note {
  color: var(--warning) !important;
}

.alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #f7c5bf;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: #912018;
}

.alert.success {
  border-color: #9ee3ba;
  background: var(--success-soft);
  color: var(--success);
}

/* Tables and lists */
.data-table-wrap,
.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.qms-list-page .module-list-panel {
  padding: 24px;
}

.module-list-table-wrap {
  overscroll-behavior-inline: contain;
  scrollbar-color: #9cafc9 #edf2f8;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

/* Work order command center: compact rail + light execution workspace. */
.qt360-wo-command {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 620px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid #d9e2ee;
  border-radius: 18px;
  background: #f4f7fb;
  box-shadow: 0 16px 38px rgba(22, 43, 78, .09);
}

.qt360-wo-rail {
  padding: 22px 14px 18px;
  color: #eef4ff;
  background: linear-gradient(180deg, #111f44 0%, #182b5b 58%, #20366b 100%);
}

.qt360-wo-rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 22px;
}

.qt360-wo-rail-brand strong,
.qt360-wo-rail-brand small { display: block; }
.qt360-wo-rail-brand strong { font-size: 1rem; letter-spacing: -.01em; }
.qt360-wo-rail-brand small { margin-top: 2px; color: #9eb3db; font-size: .78rem; font-weight: 750; }

.qt360-wo-rail-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #3159c9;
  box-shadow: 0 7px 14px rgba(0, 0, 0, .18);
}

.qt360-wo-rail-nav { display: grid; gap: 5px; }
.qt360-wo-rail-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #c7d4ef;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.qt360-wo-rail-nav a:hover,
.qt360-wo-rail-nav a.active { color: #fff; background: rgba(104, 137, 221, .28); border-color: rgba(173, 196, 255, .24); }
.qt360-wo-rail-nav a b { margin-left: auto; color: #9ebcfb; font-size: .72rem; }
.qt360-wo-rail-divider { height: 1px; margin: 23px 8px 17px; background: rgba(188, 207, 245, .19); }
.qt360-wo-rail-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 10px; color: #8ea6d5; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.qt360-wo-rail-heading a { color: #bed0f4; }
.qt360-wo-rail-heading .qt360-icon { width: 15px; height: 15px; }
.qt360-wo-rail-list { display: grid; gap: 3px; }
.qt360-wo-rail-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 8px; color: #e8effd; text-decoration: none; }
.qt360-wo-rail-item:hover { background: rgba(255, 255, 255, .08); }
.qt360-wo-rail-item > span:last-child { min-width: 0; }
.qt360-wo-rail-item strong, .qt360-wo-rail-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt360-wo-rail-item strong { font-size: .73rem; }
.qt360-wo-rail-item small { max-width: 162px; margin-top: 2px; color: #9db2da; font-size: .66rem; }
.qt360-wo-rail-item-icon { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #9fc0ff; background: rgba(113, 151, 237, .18); }
.qt360-wo-rail-item-icon.qt360-status-success { color: #7be0a5; background: rgba(68, 182, 112, .2); }
.qt360-wo-rail-item-icon.qt360-status-danger { color: #ff9d9d; background: rgba(214, 76, 76, .23); }
.qt360-wo-rail-item-icon.qt360-status-warning { color: #ffd57e; background: rgba(224, 165, 50, .22); }
.qt360-wo-rail-item-icon .qt360-icon { width: 14px; height: 14px; }
.qt360-wo-rail-empty { margin: 0 8px; color: #9db2da; font-size: .76rem; line-height: 1.5; }

.qt360-wo-command-main { min-width: 0; background: #f5f7fb; }
.qt360-wo-command-header { display: flex; justify-content: space-between; gap: 22px; padding: 24px 26px 21px; color: #fff; background: linear-gradient(105deg, #182955 0%, #2b4385 100%); }
.qt360-wo-kicker, .qt360-wo-card-kicker { display: flex; align-items: center; gap: 6px; color: #a9c1f3; font-size: .67rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.qt360-wo-kicker .qt360-icon, .qt360-wo-card-kicker .qt360-icon { width: 14px; height: 14px; }
.qt360-wo-command-header h2 { max-width: 680px; margin: 8px 0 5px; color: #fff; font-size: clamp(1.08rem, 2vw, 1.5rem); letter-spacing: -.025em; }
.qt360-wo-command-header p { margin: 0; color: #cfdbf4; font-size: .79rem; }
.qt360-wo-header-actions { display: flex; align-items: center; align-self: flex-start; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.qt360-wo-header-tool { display: inline-flex; align-items: center; gap: 5px; padding: 8px 9px; border: 1px solid rgba(205, 220, 255, .2); border-radius: 7px; color: #e9effe; font-size: .72rem; font-weight: 800; text-decoration: none; }
.qt360-wo-header-tool:hover { background: rgba(255, 255, 255, .1); }
.qt360-wo-header-tool .qt360-icon { width: 14px; height: 14px; }
.qt360-wo-start-button { min-height: 35px; border: 0; background: #53b56b; box-shadow: 0 7px 15px rgba(9, 25, 62, .2); }
.qt360-wo-tabs { display: flex; gap: 4px; min-height: 43px; padding: 0 25px; overflow-x: auto; background: #263a75; }
.qt360-wo-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 3px solid transparent; color: #bdc9e4; font-size: .71rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.qt360-wo-tabs a .qt360-icon { width: 13px; height: 13px; opacity: .82; }
.qt360-wo-tabs a:hover, .qt360-wo-tabs a.active { color: #fff; border-color: #91b7ff; background: rgba(255, 255, 255, .08); }
.qt360-wo-filter-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 13px 25px 3px; }
.qt360-wo-filter-title { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; color: #52627c; font-size: .72rem; font-weight: 900; }
.qt360-wo-filter-strip a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #d7dfeb; border-radius: 999px; color: #465875; background: #fff; font-size: .7rem; font-weight: 800; text-decoration: none; }
.qt360-wo-filter-strip a:hover { color: #244fc1; border-color: #9ab4e9; }
.qt360-wo-filter-strip .qt360-icon { width: 13px; height: 13px; color: #5979b8; }
.qt360-wo-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 13px 25px 0; }
.qt360-wo-kpi-card { position: relative; display: grid; grid-template-columns: 29px 1fr; column-gap: 8px; min-width: 0; padding: 13px 13px 12px; border: 1px solid #dce4ef; border-radius: 11px; color: #223451; background: #fff; box-shadow: 0 5px 13px rgba(27, 51, 91, .045); text-decoration: none; }
.qt360-wo-kpi-card:hover { border-color: #97b2e4; transform: translateY(-1px); }
.qt360-wo-kpi-icon { display: grid; grid-row: span 3; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: #315fd0; background: #eaf0ff; }
.qt360-wo-kpi-icon.amber { color: #ad7711; background: #fff3d7; }.qt360-wo-kpi-icon.red { color: #c43d3d; background: #ffe5e5; }.qt360-wo-kpi-icon.green { color: #258e4b; background: #e2f7e9; }.qt360-wo-kpi-icon.purple { color: #7450bd; background: #eee8ff; }
.qt360-wo-kpi-icon .qt360-icon { width: 16px; height: 16px; }
.qt360-wo-kpi-label { color: #687793; font-size: .67rem; font-weight: 850; }
.qt360-wo-kpi-card strong { margin-top: 4px; color: #172b4d; font-size: 1.55rem; line-height: 1; letter-spacing: -.04em; }
.qt360-wo-kpi-card small { margin-top: 5px; overflow: hidden; color: #7b889d; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.qt360-wo-kpi-card.risk { border-color: #f0caca; }.qt360-wo-kpi-card.risk .qt360-wo-kpi-label { color: #a84444; }
.qt360-wo-insight-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 10px; padding: 13px 25px 24px; }
.qt360-wo-insight-card { min-width: 0; padding: 16px; border: 1px solid #dce4ef; border-radius: 11px; background: #fff; }
.qt360-wo-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.qt360-wo-card-heading h3 { margin: 5px 0 0; color: #243653; font-size: .96rem; }
.qt360-wo-card-heading a { display: inline-flex; align-items: center; gap: 4px; color: #315cc8; font-size: .68rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.qt360-wo-card-heading a .qt360-icon { width: 13px; height: 13px; }
.qt360-wo-bars { display: grid; gap: 12px; }
.qt360-wo-bar-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.qt360-wo-bar-row > span { overflow: hidden; color: #52617a; font-size: .71rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.qt360-wo-bar-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #edf1f7; }.qt360-wo-bar-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #486fd0, #7e9ced); }
.qt360-wo-bar-row strong { color: #2b3c59; font-size: .7rem; text-align: right; }
.qt360-wo-alert-count { display: grid; min-width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #b64242; background: #ffe8e8; font-size: .72rem; font-weight: 900; }
.qt360-wo-alert-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #edf1f6; color: #2b3b58; text-decoration: none; }.qt360-wo-alert-row:first-of-type { border-top: 0; }
.qt360-wo-alert-row > span { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #b44646; background: #ffe8e8; }.qt360-wo-alert-row.clear > span { color: #2e9657; background: #e5f7eb; }.qt360-wo-alert-row.info > span { color: #416abf; background: #eaf0ff; }
.qt360-wo-alert-row .qt360-icon { width: 15px; height: 15px; }.qt360-wo-alert-row div { min-width: 0; flex: 1; }.qt360-wo-alert-row strong, .qt360-wo-alert-row small { display: block; }.qt360-wo-alert-row strong { font-size: .72rem; }.qt360-wo-alert-row small { margin-top: 2px; color: #7b889e; font-size: .66rem; }.qt360-wo-alert-row b { color: #b44646; font-size: .78rem; }.qt360-wo-alert-row.clear b { color: #2e9657; }.qt360-wo-alert-row.info b { color: #416abf; }
.qt360-wo-muted { margin: 26px 0; color: #7b889e; font-size: .77rem; }
.qt360-work-order-table-anchor { display: block; position: relative; top: -10px; }

@media (max-width: 1050px) {
  .qt360-wo-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qt360-wo-command-header { flex-direction: column; }
  .qt360-wo-header-actions { justify-content: flex-start; }
}
@media (max-width: 780px) {
  .qt360-wo-command { grid-template-columns: 1fr; }
  .qt360-wo-rail { padding: 15px; }.qt360-wo-rail-list { display: none; }.qt360-wo-rail-divider { margin: 12px 8px; }.qt360-wo-rail-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qt360-wo-kpi-grid, .qt360-wo-insight-grid { grid-template-columns: 1fr 1fr; }.qt360-wo-insight-grid { padding-left: 15px; padding-right: 15px; }.qt360-wo-kpi-grid { padding-left: 15px; padding-right: 15px; }.qt360-wo-filter-strip { padding-left: 15px; padding-right: 15px; }.qt360-wo-tabs { padding-left: 15px; padding-right: 15px; }.qt360-wo-command-header { padding-left: 17px; padding-right: 17px; }
}
@media (max-width: 520px) {
  .qt360-wo-kpi-grid, .qt360-wo-insight-grid { grid-template-columns: 1fr; }.qt360-wo-rail-nav { grid-template-columns: 1fr 1fr; }.qt360-wo-header-tool span { display: none; }
}

.module-data-table {
  table-layout: auto;
  min-width: 100%;
}

.module-data-table th,
.module-data-table td {
  padding: 10px 12px;
}

.module-data-table th:first-child,
.module-data-table td:first-child {
  width: 138px;
  min-width: 138px;
}

.module-data-table th:nth-child(2),
.module-data-table td:nth-child(2) {
  width: 72px;
  min-width: 72px;
}

.module-data-table th:nth-child(n+3):not(:last-child),
.module-data-table td:nth-child(n+3):not(:last-child) {
  min-width: 120px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.module-data-table th:last-child,
.module-data-table td:last-child {
  width: 160px;
  min-width: 160px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7edf5;
  color: #29364a;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf4fd;
  color: #35445b;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.qms-list-page th[data-sortable="true"] {
  padding: 0;
}

.qms-list-page .qt360-sort-button {
  display: inline-flex;
  width: 100%;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  text-transform: inherit;
  white-space: nowrap;
}

.qms-list-page .qt360-sort-button:hover {
  background: #e1ecfb;
  color: var(--primary-strong);
  transform: none;
}

.qms-list-page .qt360-sort-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(14, 165, 233, .28);
  outline-offset: -3px;
}

.qms-list-page .qt360-sort-indicator {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: .9rem;
  line-height: 1;
  opacity: .72;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #f7faff;
}

tfoot td {
  border-top: 2px solid #c9daf1;
  background: #f3f7fc;
  color: #10235a;
  font-weight: 850;
}

.clickable-record-row {
  cursor: pointer;
}

.clickable-record-row:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .25);
  outline-offset: -3px;
}

.actions-cell {
  display: flex;
  min-width: 200px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.actions-cell form {
  margin: 0;
}

.actions-cell a,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #c9daf1;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-strong);
  box-shadow: none;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.actions-cell a:hover,
.link-button:hover {
  border-color: #94b8ef;
  background: #e4efff;
}

.positive-link {
  color: var(--success);
}

.danger-link {
  color: var(--danger);
}

.danger-link:hover {
  border-color: #efb2aa;
  background: var(--danger-soft);
}

.kpi-status,
.ticket-pill,
.status-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}

.status-open {
  background: #e8f1ff;
  color: var(--primary-strong);
}

.status-closed {
  background: var(--success-soft);
  color: var(--success);
}

.status-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-neutral {
  background: #eef2f7;
  color: var(--qt-neutral);
}

/* Dashboard */
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  align-items: stretch;
  gap: 28px;
  margin: 0 0 22px;
  padding: 38px;
  overflow: hidden;
}

.dashboard-hero > div:first-child {
  display: grid;
  align-content: center;
  gap: 16px;
}

.dashboard-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.02;
}

.dashboard-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.dashboard-hero .tenant-pill {
  justify-self: start;
}

.standard-tenant-pill {
  background: #eef8f5;
  color: #145f50;
}

.company-brand-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  border: 1px solid #d4e4f8;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.dashboard-company-logo {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d4e4f8;
  border-radius: 10px;
  background: #fff;
}

.dashboard-company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-brand-card strong {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 900;
}

.company-brand-card span,
.sidebar-quick-actions > strong,
.module-card > span,
.clause-card > div > span,
.module-clause-kicker {
  color: var(--primary);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.company-brand-card p {
  margin: 0;
  color: var(--muted);
}

.standard-profile-note {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.standard-checkbox-group {
  display: grid;
  gap: 8px;
}

.standard-checkbox-group label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #f8fbff;
}

.standard-checkbox-group input {
  margin-top: 3px;
}

.standard-checkbox-group strong,
.standard-checkbox-group small {
  display: block;
}

.standard-checkbox-group small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.dashboard-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.my-work-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: grid;
  align-self: start;
  gap: 14px;
}

.side-nav,
.sidebar-quick-actions,
.quick-action-list,
.brief-list,
.module-group-grid {
  display: grid;
  gap: 10px;
}

.sidebar-quick-actions {
  padding-top: 14px;
  border-top: 1px solid #e6ecf4;
}

.side-nav a,
.quick-action-list a {
  position: relative;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(15, 35, 70, .04);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  font-weight: 800;
}

.quick-action-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  padding: 11px 12px;
}

.side-nav a::after,
.quick-action-list a::after {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  color: var(--primary);
  content: "";
  transform: rotate(45deg);
}

.quick-action-list a span {
  min-width: 0;
  font-weight: 800;
}

.quick-action-list a small {
  grid-column: 1 / 2;
  min-width: 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.side-nav a:hover,
.quick-action-list a:hover {
  border-color: #9bbcf0;
  background: var(--primary-soft);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .1);
  transform: translateY(-1px);
}

.sidebar-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-metrics div {
  display: grid;
  min-height: 78px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.sidebar-metrics span {
  color: var(--primary);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.sidebar-metrics small {
  color: var(--muted);
  font-weight: 700;
}

.cards,
.module-grid,
.status-card-grid {
  display: grid;
  gap: 12px;
}

.cards,
.status-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-area-panel .settings-module-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.settings-area-panel .settings-module-card {
  min-width: 0;
  height: 100%;
}

@media (max-width: 1400px) {
  .settings-area-panel .settings-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .settings-area-panel .settings-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .settings-area-panel .settings-module-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.status-card,
.module-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 128px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.status-card:hover,
.module-card:hover {
  border-color: #94b8ef;
  background: #fbfdff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.status-card strong {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.status-card span,
.module-card strong {
  font-weight: 800;
}

.status-card small,
.module-card p {
  color: var(--muted);
  line-height: 1.35;
}

.module-card strong {
  margin-top: 2px;
  font-size: 1.06rem;
}

.module-card p {
  margin: 0;
}

.dashboard-kpi-grid,
.dashboard-chart-grid,
.module-directory-grid {
  display: grid;
  gap: 14px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi-card {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 17px;
  border: 1px solid #d8e5f7;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 35, 70, .05);
}

.dashboard-kpi-card span {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-kpi-card strong {
  color: var(--heading);
  font-size: 2.25rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-kpi-card small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-chart-panel {
  min-width: 0;
}

.dashboard-bar-list {
  display: grid;
  gap: 12px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.dashboard-bar-row span {
  color: #334155;
  font-size: .86rem;
  font-weight: 850;
}

.dashboard-bar-row div {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf6;
}

.dashboard-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.dashboard-bar-list-cool .dashboard-bar-row i {
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.dashboard-bar-row strong {
  color: var(--heading);
  font-weight: 950;
  text-align: right;
}

.dashboard-module-link-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #c7d2fe;
}

.dashboard-module-link-panel h2 {
  margin: 0 0 4px;
  color: var(--heading);
  font-size: 1.05rem;
}

.dashboard-module-link-panel p {
  margin: 0;
  color: var(--muted);
}

.module-directory-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
}

.module-directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-directory-list {
  display: grid;
  gap: 9px;
}

.module-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid #e2e9f3;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.module-directory-row strong,
.module-directory-row small {
  display: block;
}

.module-directory-row small,
.module-directory-row p {
  color: var(--muted);
}

.module-directory-row p {
  margin: 4px 0 0;
  line-height: 1.35;
}

.module-directory-row > span {
  display: grid;
  min-width: 44px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: #eaf2ff;
  color: var(--primary);
  font-weight: 950;
}

.digest-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.digest-controls {
  display: grid;
  gap: 14px;
}

.digest-controls h2,
.digest-preview h3 {
  margin: 0;
  color: var(--heading);
}

.digest-checkbox-group {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.digest-checkbox-group legend {
  padding: 0 6px;
  color: var(--heading);
  font-size: .84rem;
  font-weight: 900;
}

.digest-checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 750;
  line-height: 1.35;
}

.digest-checkbox-group input {
  width: auto;
  margin-top: 2px;
}

.digest-checkbox-group small {
  color: var(--muted);
  font-weight: 700;
}

.digest-employee-picker {
  max-height: 280px;
  overflow: auto;
}

.digest-preview {
  min-width: 0;
}

.digest-preview pre {
  min-height: 520px;
  margin: 12px 0 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius-md);
  background: #0f172a;
  color: #e2e8f0;
  font: 700 .88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.pdf-toolbar,
.pdf-report-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pdf-report-selector {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pdf-report-selector select {
  min-width: 230px;
}

.pdf-sheet {
  display: grid;
  gap: 18px;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pdf-brand-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid #dbe6f5;
}

.pdf-logo-box {
  display: grid;
  width: 180px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.pdf-logo-box img {
  display: block;
  max-width: 168px;
  max-height: 62px;
  object-fit: contain;
}

.pdf-logo-box strong {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 950;
}

.pdf-brand-header h1 {
  margin: 0 0 5px;
  color: var(--heading);
  font-size: 1.8rem;
}

.pdf-brand-header p,
.pdf-footer {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.pdf-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pdf-summary-grid div {
  padding: 12px;
  border: 1px solid #e2e9f3;
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.pdf-summary-grid strong,
.pdf-summary-grid span {
  display: block;
}

.pdf-summary-grid strong {
  color: var(--heading);
  font-size: 1.55rem;
  font-weight: 950;
}

.pdf-summary-grid span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.pdf-section {
  break-inside: avoid;
}

.pdf-section h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 1.15rem;
}

.pdf-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.pdf-report-table th,
.pdf-report-table td {
  padding: 8px;
  border: 1px solid #dbe6f5;
  text-align: left;
  vertical-align: top;
}

.pdf-report-table th {
  background: #eff6ff;
  color: #1e3a8a;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pdf-footer {
  padding-top: 14px;
  border-top: 1px solid #dbe6f5;
  font-size: .8rem;
}

.audit-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.audit-workflow-card {
  display: grid;
  gap: 10px;
}

.audit-workflow-card span {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.audit-workflow-card p,
.audit-workflow-card small,
.audit-workflow-note p,
.audit-workflow-list {
  color: var(--muted);
}

.audit-workflow-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.45;
}

.audit-workflow-card small {
  line-height: 1.45;
}

.audit-workflow-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.readiness-command-bar {
  align-items: center;
}

.readiness-month-form {
  justify-content: flex-end;
}

.readiness-month-form input[type="month"] {
  width: 160px;
}

.readiness-table th,
.readiness-table td {
  white-space: nowrap;
}

.readiness-score {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

.readiness-ready {
  color: #116149;
  background: #dcfce7;
}

.readiness-watch {
  color: #76540a;
  background: #fef3c7;
}

.readiness-risk {
  color: #9f1239;
  background: #ffe4e6;
}

.readiness-missing {
  color: #4b5563;
  background: #e5e7eb;
}

.readiness-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.readiness-required-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.readiness-required-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #f8fbff;
}

.readiness-required-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.readiness-required-heading span {
  color: var(--primary);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.readiness-required-heading h3 {
  margin: 4px 0 0;
  font-size: .98rem;
  line-height: 1.25;
}

.readiness-required-heading strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .74rem;
  white-space: nowrap;
}

.readiness-required-card > p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}

.readiness-area-card {
  display: grid;
  gap: 14px;
}

.readiness-area-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.readiness-area-heading span {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.readiness-area-heading h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.readiness-area-heading strong {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .88rem;
}

.readiness-meter {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf7;
}

.readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22c55e);
}

.readiness-mini-stats,
.readiness-gap-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.readiness-mini-stats div {
  padding: 10px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #f8fbff;
}

.readiness-mini-stats dt,
.readiness-gap-columns h4 {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-mini-stats dd {
  margin: 4px 0 0;
  color: var(--heading);
  font-weight: 950;
}

.readiness-gap-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.readiness-gap-columns ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.readiness-gap-columns p {
  margin: 8px 0 0;
}

.readiness-gap-list .brief-list-item {
  text-decoration: none;
}

@media (max-width: 900px) {
  .readiness-area-grid,
  .readiness-required-grid,
  .readiness-gap-columns,
  .readiness-mini-stats {
    grid-template-columns: 1fr;
  }

  .readiness-command-bar,
  .readiness-month-form {
    align-items: stretch;
  }

  .readiness-month-form,
  .readiness-month-form input[type="month"] {
    width: 100%;
  }

  .policy-ack-layout {
    grid-template-columns: 1fr;
  }
}

/* Field service dispatch calendar */
.field-service-page .container {
  max-width: 1720px;
}

.field-service-page .field-service-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 10px;
}

.field-service-eyebrow {
  margin: 0 0 2px;
  color: #5267b9;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field-service-header h1 {
  margin: 0;
  color: #162b63;
  font-size: 1.55rem;
  line-height: 1.1;
}

.field-service-header p:not(.field-service-eyebrow) {
  margin: 4px 0 0;
  color: #6b7892;
  font-size: .82rem;
}

.field-service-actions,
.field-service-period-controls,
.field-service-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-service-calendar {
  padding: 0 !important;
  overflow: hidden;
}

.field-service-calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe7f4;
}

.field-service-calendar-toolbar h2 {
  margin: 0;
  color: #1b3068;
  font-size: 1rem;
  text-align: center;
}

.field-service-view-switch {
  justify-self: end;
  padding: 3px;
  border: 1px solid #d6e0ef;
  border-radius: 7px;
  background: #f5f8fd;
}

.field-service-view-switch a {
  padding: 5px 9px;
  border-radius: 5px;
  color: #61708b;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.field-service-view-switch a.active {
  background: #405dde;
  color: #fff;
}

.field-service-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #ccd8ed;
  border-radius: 6px;
  background: #fff;
  color: #29449a;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
}

.field-service-date-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-service-date-form label {
  color: #5e6c87;
  font-size: .7rem;
  font-weight: 800;
}

.field-service-date-form input {
  width: 138px;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #ccd8ed;
  border-radius: 6px;
  color: #25375e;
  font-size: .76rem;
}

.field-service-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 12px;
  border-bottom: 1px solid #e5ebf5;
  background: #f8faff;
  color: #6c7890;
  font-size: .73rem;
}

.field-service-summary strong {
  color: #203e93;
}

.field-service-week-scroll {
  overflow: auto;
}

.field-service-week-grid {
  display: grid;
  grid-template-columns: minmax(165px, 215px) repeat(var(--field-service-days), minmax(145px, 1fr));
  min-width: 1120px;
}

.field-service-resource-heading,
.field-service-day-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 46px;
  padding: 8px;
  border-bottom: 1px solid #dbe4f1;
  background: #f3f6fb;
  color: #53627d;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field-service-resource-heading {
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
}

.field-service-day-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.field-service-day-heading strong {
  color: #1e377a;
  font-size: 1rem;
}

.field-service-resource-cell,
.field-service-week-cell {
  min-height: 82px;
  padding: 6px;
  border-right: 1px solid #e1e8f3;
  border-bottom: 1px solid #e1e8f3;
}

.field-service-resource-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.field-service-resource-cell strong {
  color: #26385f;
  font-size: .78rem;
}

.field-service-resource-cell small {
  margin-top: 2px;
  color: #8490a4;
  font-size: .66rem;
}

.field-service-week-cell.is-today,
.field-service-day-heading.is-today,
.field-service-month-cell.is-today {
  background: #f2f6ff;
}

.field-service-event {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-bottom: 4px;
  padding: 5px 6px;
  border-left: 3px solid #526be1;
  border-radius: 4px;
  background: #edf2ff;
  color: #263b82;
  font-size: .67rem;
  line-height: 1.15;
  text-decoration: none;
}

.field-service-event strong,
.field-service-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-service-event .field-service-event-time {
  color: inherit;
  font-size: .63rem;
  font-weight: 800;
}

.field-service-event.is-active {
  border-left-color: #1d8653;
  background: #eaf7ef;
  color: #256440;
}

.field-service-event.is-complete {
  border-left-color: #718196;
  background: #f0f3f7;
  color: #59677a;
}

.field-service-event.is-warning {
  border-left-color: #c88115;
  background: #fff6df;
  color: #865b12;
}

.field-service-empty-week {
  grid-column: 1 / -1;
  padding: 18px;
  color: #728097;
  font-size: .8rem;
}

.field-service-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.field-service-month-day-label {
  padding: 7px 8px;
  border-right: 1px solid #e1e8f3;
  border-bottom: 1px solid #dbe4f1;
  background: #f3f6fb;
  color: #53627d;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field-service-month-cell {
  min-height: 126px;
  padding: 6px;
  border-right: 1px solid #e1e8f3;
  border-bottom: 1px solid #e1e8f3;
  background: #fff;
}

.field-service-month-cell > header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
  color: #33476f;
  font-size: .75rem;
}

.field-service-month-cell.is-outside-month {
  background: #fafbfd;
}

.field-service-month-cell.is-outside-month > header {
  color: #a5afbf;
}

.field-service-month-events .field-service-event {
  margin-bottom: 3px;
  padding: 4px 5px;
}

.field-service-empty-state {
  margin: 0;
  padding: 12px;
  color: #6f7c92;
  font-size: .78rem;
}

@media (max-width: 900px) {
  .field-service-page .field-service-header,
  .field-service-calendar-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .field-service-page .field-service-header {
    flex-direction: column;
  }

  .field-service-actions {
    justify-content: flex-end;
  }

  .field-service-calendar-toolbar h2 {
    order: -1;
    text-align: left;
  }

  .field-service-period-controls {
    flex-wrap: wrap;
  }

  .field-service-view-switch {
    justify-self: start;
  }

  .field-service-month-grid {
    min-width: 720px;
  }

  .field-service-calendar:has(.field-service-month-grid) {
    overflow-x: auto;
  }
}

.employee-brief-panel {
  border-color: #c6dcf7;
}

.employee-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.employee-brief-card {
  min-width: 0;
}

.brief-card-heading {
  align-items: center;
  margin-bottom: 10px;
}

.brief-card-heading h3 {
  font-size: 1rem;
}

.brief-card-heading > span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.brief-list-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e9f3;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.brief-list-item strong,
.brief-list-item small {
  display: block;
}

.brief-list-item small,
.brief-list-item p {
  color: var(--muted);
}

.brief-list-item p {
  margin: 0;
}

.dashboard-notification-panel {
  border-color: #bfdbfe;
}

.notification-mini-summary,
.notification-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-mini-summary {
  margin-bottom: 12px;
}

.notification-mini-summary span,
.notification-tabs a,
.notification-row-main span {
  border: 1px solid #d8e5f7;
  border-radius: 999px;
  background: #f8fbff;
  color: #23406f;
  font-size: .76rem;
  font-weight: 850;
}

.notification-mini-summary span {
  padding: 6px 9px;
}

.notification-mini-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.notification-mini-item a {
  color: var(--primary);
  font-size: .85rem;
  font-weight: 850;
  text-decoration: none;
}

.notification-hero {
  min-height: auto;
}

.notification-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.notification-summary-card {
  display: grid;
  gap: 4px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 35, 70, .05);
}

.notification-summary-card span {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-summary-card strong {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.notification-summary-card small {
  color: var(--muted);
  font-weight: 700;
}

.notification-summary-card.is-danger strong {
  color: var(--danger);
}

.notification-summary-card.is-warning strong {
  color: #b45309;
}

.notification-tabs {
  margin: 8px 0 16px;
}

.notification-tabs a {
  padding: 8px 11px;
  text-decoration: none;
}

.notification-tabs a.active,
.notification-tabs a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, .7fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe6f5;
  border-left-width: 5px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.notification-row-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.notification-row-main span {
  width: fit-content;
  padding: 4px 8px;
}

.notification-row-main strong {
  color: var(--heading);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.notification-row-main p {
  margin: 0;
  color: var(--muted);
}

.notification-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.notification-row dt,
.notification-row dd {
  margin: 0;
}

.notification-row dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-row dd {
  color: var(--ink);
  font-size: .85rem;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.btn-small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: .88rem;
}

.notification-state-overdue {
  border-left-color: var(--danger);
}

.notification-state-due {
  border-left-color: #f59e0b;
}

.notification-state-new,
.notification-state-assigned {
  border-left-color: var(--primary);
}

.notification-state-scheduled {
  border-left-color: #64748b;
}

.policy-ack-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}

.policy-reader,
.policy-ack-panel {
  min-width: 0;
}

.policy-text-block {
  max-height: 520px;
  overflow: auto;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  line-height: 1.6;
}

.policy-ack-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  background: #f8fbff;
}

.policy-ack-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.policy-ack-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.policy-ack-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2eaf5;
}

.policy-ack-panel dt {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-ack-panel dd {
  margin: 0;
  text-align: right;
  font-weight: 850;
}

.policy-ack-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #c9d9ee;
  border-radius: 10px;
  background: #fff;
}

.policy-ack-check input {
  margin-top: 3px;
}

.kpi-item dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.kpi-item dl div {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.kpi-item dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-item dd {
  margin: 0;
  font-weight: 800;
}

/* Module list, workflow, and clause help */
.clause-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: #f7faff;
  box-shadow: none;
}

.clause-card strong {
  display: block;
  margin-top: 5px;
  color: var(--heading);
}

.clause-card p {
  max-width: 86ch;
  margin: 5px 0 0;
  color: var(--muted);
}

.clause-card > a {
  flex: 0 0 auto;
}

.module-help-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7faff;
}

.module-help-bar strong {
  display: block;
  margin-top: 4px;
  color: var(--heading);
}

.module-help-bar p {
  max-width: 86ch;
  margin: 4px 0 0;
  color: var(--muted);
}

.help-icon-button,
.help-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #bfd2f1;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.help-icon-button:hover,
.help-modal-close:hover {
  border-color: #94b8ef;
  background: #eef5ff;
}

.help-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
}

.help-modal {
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid #d7e2f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}

.help-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.help-modal-heading h2 {
  margin: 4px 0 0;
  color: var(--heading);
  font-size: 1.15rem;
}

.help-modal-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.help-modal-close {
  width: 34px;
  height: 34px;
  box-shadow: none;
}

.page-help-grid {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr);
  gap: 16px;
  margin-top: 14px;
}

.page-help-grid h3 {
  margin: 0 0 7px;
  color: var(--heading);
  font-size: .84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.page-help-grid ul {
  margin: 0;
  padding-left: 18px;
}

.page-help-grid li {
  margin: 3px 0;
  color: #475569;
}

.page-help-grid p {
  margin: 0;
  color: #475569;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.toolbar form,
.search-form {
  display: flex;
  flex: 1 1 420px;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.search-form input:not([type="hidden"]) {
  min-width: 180px;
}

.toolbar-actions,
.workflow-actions,
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workflow-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #bed4f2;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
}

.workflow-panel strong,
.workflow-panel span {
  display: block;
}

.workflow-panel strong {
  color: var(--heading);
}

.workflow-panel span {
  margin-top: 3px;
  color: var(--muted);
}

.workflow-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.workflow-guide-step {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid #bfd4f1;
  border-radius: var(--radius-md);
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.workflow-guide-step:hover {
  border-color: #7ca6e6;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.workflow-guide-step > span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.workflow-guide-step strong {
  color: var(--heading);
  font-size: 1rem;
}

.workflow-guide-step p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.4;
}

.workflow-guide-step em {
  color: #31517c;
  font-style: normal;
  font-weight: 800;
}

.workflow-process-panel {
  padding: 24px;
}

.workflow-process-list {
  display: grid;
  gap: 8px;
}

.workflow-process-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(15, 35, 70, .035);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.workflow-process-row:hover {
  border-color: #a8c5f3;
  box-shadow: 0 12px 28px rgba(15, 35, 70, .07);
  transform: translateY(-1px);
}

.workflow-step-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 900;
}

.workflow-step-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workflow-step-main strong {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 900;
}

.workflow-step-main small {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}

.workflow-process-row em {
  color: var(--primary-strong);
  font-size: .84rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.workflow-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.workflow-mini-list {
  display: grid;
  gap: 10px;
}

.workflow-mini-list a {
  display: block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  color: inherit;
  text-decoration: none;
}

.workflow-mini-list a:hover {
  border-color: #9dbce8;
  background: #eef6ff;
}

.workflow-mini-list strong,
.workflow-mini-list span {
  display: block;
}

.workflow-mini-list strong {
  color: var(--heading);
}

.workflow-mini-list span {
  margin-top: 3px;
  color: #31517c;
  font-weight: 750;
}

.workflow-mini-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

.risk-opportunity-menu {
  flex-wrap: wrap;
}

.module-tab,
.role-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #bfd2ee;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-strong);
  font-size: .84rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.module-tab > span,
.role-tabs a > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #dfeaff;
  color: var(--primary-strong);
  font-size: .72rem;
}

.module-tab:hover,
.module-tab.active,
.role-tabs a:hover,
.role-tabs a.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.module-tab:hover > span,
.module-tab.active > span,
.role-tabs a:hover > span,
.role-tabs a.active > span {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

/* Administration */
.module-group-grid {
  grid-template-columns: 1fr;
}

.module-group {
  padding: 20px;
}

.module-group-heading {
  margin-bottom: 14px;
}

.module-group-heading h3 {
  margin: 0 0 4px;
  color: var(--heading);
  font-size: 1.2rem;
}

.module-group-heading p {
  margin: 0;
  color: var(--muted);
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.add-role-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.add-role-form label {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

.add-role-form label span {
  color: var(--heading);
  font-size: .84rem;
  font-weight: 800;
}

.add-role-form input {
  min-height: 40px;
  border: 1px solid #bfd2ee;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--heading);
}

.permission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.permission-toolbar strong,
.permission-toolbar span {
  display: block;
}

.permission-toolbar strong {
  color: var(--heading);
  font-size: 1.02rem;
}

.permission-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
}

.role-permission-table td:first-child strong,
.role-permission-table td:first-child small {
  display: block;
}

.role-permission-table td:first-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .75rem;
}

.role-permission-table {
  min-width: 1760px;
}

.role-permission-table th:not(:first-child),
.role-permission-table td:not(:first-child) {
  text-align: center;
  white-space: nowrap;
}

.role-permission-table .table-section-row th {
  background: #eef4fb;
  color: var(--heading);
  font-size: .78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.permission-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
}

.permission-checkbox span {
  margin: 0;
  color: #29364a;
  font-size: .82rem;
  font-weight: 750;
}

.permission-checkbox input:disabled + span {
  color: #9aa6b6;
}

.role-permission-table .permission-checkbox {
  justify-content: center;
  width: 100%;
}

.role-permission-table .permission-checkbox span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.module-setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.module-setting {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  cursor: pointer;
}

.module-card .form-field {
  margin-top: 12px;
}

.module-card .form-field select {
  width: 100%;
}

.module-setting input {
  margin-top: 3px;
}

.module-setting strong,
.module-setting small {
  display: block;
}

.module-setting strong {
  color: var(--heading);
  font-size: .9rem;
}

.module-setting small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
}

.module-control-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.module-control-summary > div {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fbff;
}

.module-control-summary strong,
.module-control-summary span,
.module-control-heading h3,
.module-control-heading p,
.module-control-table td:first-child strong,
.module-control-table td:first-child small {
  display: block;
}

.module-control-summary strong {
  color: var(--heading);
  font-size: .92rem;
}

.module-control-summary span,
.module-control-heading p,
.module-control-table td:first-child small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}

.module-company-picker {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 0 0 18px;
}

.module-company-picker label {
  max-width: 360px;
}

.module-control-heading {
  margin: 20px 0 10px;
}

.module-control-heading h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1.05rem;
}

.module-control-table select {
  min-width: 150px;
  padding: 8px 9px;
  font-size: .8rem;
}

.module-scope-fields {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.module-scope-fields label {
  display: grid;
  gap: 3px;
}

.module-scope-fields span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.module-scope-fields input,
.module-scope-fields select {
  min-height: 32px;
  padding: 7px 8px;
  font-size: .78rem;
}

.report-filter-form,
.report-definition-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.report-definition-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.report-filter-form label,
.report-definition-form label {
  display: grid;
  gap: 6px;
  color: var(--heading);
  font-weight: 850;
}

.report-filter-form input,
.report-filter-form select,
.report-definition-form input,
.report-definition-form select,
.report-definition-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}

.report-definition-form textarea {
  min-height: 86px;
  resize: vertical;
}

.report-definition-form .span-2 {
  grid-column: span 2;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.report-summary-grid h3 {
  margin-top: 0;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  color: var(--muted);
  font-weight: 800;
}

.report-bar-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.report-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #16a34a);
}

.report-card-grid .module-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.dependency-chip-list,
.impact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dependency-chip-list span,
.impact-list span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #24456f;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.2;
}

.impact-list span {
  border-radius: var(--radius-sm);
  background: #fff8e6;
  color: #7a4b00;
}

.impact-list.blocked span {
  background: #fff1f2;
  color: #991b1b;
}

.status-ready {
  background: #eafaf0;
  color: #166534;
}

.status-setup-required,
.status-degraded,
.status-pilot {
  background: #fff8e6;
  color: #8a4b00;
}

.status-suspended,
.status-historical-only,
.status-available {
  background: #eef2f7;
  color: #475569;
}

.status-dependency-blocked {
  background: #fff1f2;
  color: #991b1b;
}

.dropdown-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.dropdown-shortcuts a {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none;
}

.dropdown-shortcuts a:hover,
.dropdown-shortcuts a.active {
  border-color: #94b8ef;
  background: var(--primary-soft);
}

.dropdown-shortcuts strong {
  color: var(--heading);
}

.dropdown-shortcuts small {
  color: var(--muted);
  line-height: 1.35;
}

/* Company switching */
.company-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.company-switch-grid form {
  margin: 0;
}

.company-switch-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 94px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
}

.company-switch-card:hover,
.company-switch-card.active {
  border-color: #78a5e7;
  background: var(--primary-soft);
}

.company-switch-card strong {
  color: var(--heading);
  font-size: 1.04rem;
}

.company-switch-logo {
  width: 100%;
  max-width: 220px;
  height: 64px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.company-switch-card span {
  color: var(--muted);
  font-size: .82rem;
}

/* Record editor */
.record-edit-form {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.record-field-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(27, 45, 76, .07);
}

.record-field-panel-heading {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  background: #edf4fd;
  cursor: pointer;
  list-style: none;
}

.record-field-panel-heading::-webkit-details-marker {
  display: none;
}

.record-field-panel-heading::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 5px 2px 0 3px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  content: "";
  transform: rotate(45deg);
  transition: margin .15s ease, transform .15s ease;
}

.record-field-panel[open] .record-field-panel-heading::before {
  margin-top: 9px;
  transform: rotate(225deg);
}

.record-field-panel:not([open]) .record-field-panel-heading {
  border-bottom: 0;
}

.record-field-panel-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: .9rem;
  font-weight: 850;
  text-transform: uppercase;
}

.record-field-panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.record-field-panel-heading > span {
  align-self: start;
  padding: 5px 9px;
  border: 1px solid #bdd3f5;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-strong);
  font-size: .75rem;
  font-weight: 800;
}

.record-field-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-field-panel-grid label {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border-right: 1px solid #e7edf5;
  border-bottom: 1px solid #e7edf5;
}

.record-field-panel-grid label:nth-child(3n) {
  border-right: 0;
}

.record-field-panel-grid label.field-wide,
.record-field-panel-grid label.wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.record-field-panel-grid label.field-half {
  grid-column: span 2;
}

.record-field-panel-grid label.checkbox-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
}

.record-field-panel-grid label.checkbox-field span {
  margin: 0;
}

.record-field-panel-grid label.checkbox-field input[type="checkbox"] {
  justify-self: start;
  margin: 0;
}

.record-field-panel-grid label.field-compact input,
.record-field-panel-grid label.field-compact select {
  max-width: 260px;
}

.record-field-panel-grid input[type="date"] {
  max-width: 190px;
}

.record-field-panel-grid textarea {
  min-height: 82px;
}

.record-field-panel-grid .field-wide textarea {
  min-height: 120px;
}

.attachment-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 0;
  border-style: solid;
}

.attachment-panel div {
  min-width: 220px;
}

.attachment-panel strong {
  display: block;
  color: var(--heading);
}

.attachment-panel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.company-logo-panel {
  align-items: center;
}

.company-logo-upload {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: min(100%, 420px);
}

.company-logo-preview {
  width: 180px;
  height: 64px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.logo-path-note {
  font-family: Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}

.readonly-record-form input:not([type="hidden"]),
.readonly-record-form textarea,
.readonly-record-form select {
  background: #eef2f7;
  color: #56657a;
}

.record-edit-form .form-actions {
  justify-content: flex-end;
  margin-top: 2px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(27, 45, 76, .07);
}

/* Training matrix */
.training-matrix-page .container {
  width: min(100%, 1800px);
}

.matrix-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.matrix-summary > div {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-top: 4px solid #708096;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(27, 45, 76, .06);
}

.matrix-summary strong {
  display: block;
  color: var(--heading);
  font-size: 1.65rem;
  line-height: 1;
}

.matrix-summary span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.matrix-summary .matrix-summary-current {
  border-top-color: #13855f;
}

.matrix-summary .matrix-summary-due {
  border-top-color: #d18a0a;
}

.matrix-summary .matrix-summary-overdue {
  border-top-color: #c83f3f;
}

.matrix-control-panel {
  padding: 17px;
}

.matrix-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(220px, 1.3fr) auto;
  align-items: end;
  gap: 12px;
}

.matrix-filter-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
}

.matrix-filter-form label > span {
  color: var(--heading);
  font-size: .78rem;
  font-weight: 850;
}

.matrix-filter-form input,
.matrix-filter-form select {
  min-width: 0;
  margin: 0;
}

.matrix-filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
}

.matrix-filter-actions button {
  min-height: 43px;
  padding-inline: 18px;
}

.matrix-filter-actions a {
  color: var(--primary-strong);
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
}

.matrix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #46556b;
  font-size: .76rem;
  font-weight: 750;
}

.matrix-legend i {
  width: 11px;
  height: 11px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #edf1f6;
}

.matrix-legend .matrix-legend-current {
  border-color: #8bcdb3;
  background: #dff4e9;
}

.matrix-legend .matrix-legend-due {
  border-color: #e1b55f;
  background: #fff0c9;
}

.matrix-legend .matrix-legend-overdue {
  border-color: #e39999;
  background: #ffe4e4;
}

.matrix-legend .matrix-legend-progress {
  border-color: #8eb0ea;
  background: #e5efff;
}

.matrix-legend .matrix-legend-gap {
  border-color: #d98c58;
  background: #ffeadc;
}

.matrix-legend .matrix-legend-na {
  border-color: #d3dbe5;
  background: #f2f4f7;
}

.matrix-section {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.matrix-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--border);
}

.matrix-section-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.08rem;
}

.matrix-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.matrix-section-heading > span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.training-matrix-wrap {
  max-height: 68vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9cafc9 #edf2f8;
  scrollbar-width: thin;
}

.training-matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.training-matrix-table th,
.training-matrix-table td {
  border-right: 1px solid #dfe6ef;
  border-bottom: 1px solid #dfe6ef;
}

.training-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 142px;
  padding: 0;
  vertical-align: top;
  background: #edf4fd;
}

.training-matrix-table .matrix-employee-column {
  left: 0;
  z-index: 5;
  width: 270px;
  min-width: 270px;
  padding: 17px;
  text-align: left;
}

.matrix-employee-column span,
.matrix-employee-column small {
  display: block;
}

.matrix-employee-column span {
  color: var(--heading);
  font-size: .86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.matrix-employee-column small {
  margin-top: 5px;
  color: var(--muted);
  font-size: .76rem;
}

.training-matrix-table .matrix-task-column {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

.matrix-task-column a {
  display: flex;
  height: 142px;
  flex-direction: column;
  gap: 5px;
  padding: 12px 10px;
  color: inherit;
  text-decoration: none;
}

.matrix-task-column a:hover {
  background: #e3edfb;
}

.matrix-task-column strong {
  display: block;
  min-height: 31px;
  color: var(--primary-strong);
  font-size: .68rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.matrix-task-column span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--heading);
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.matrix-task-column small {
  margin-top: auto;
  color: var(--muted);
  font-size: .67rem;
}

.training-matrix-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  padding: 0;
  background: var(--surface);
  text-align: left;
}

.matrix-employee-cell a {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: center;
  padding: 11px 15px;
  color: inherit;
  text-decoration: none;
}

.matrix-employee-cell a:hover {
  background: #f4f7fb;
}

.matrix-employee-cell strong,
.matrix-employee-cell span,
.matrix-employee-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-employee-cell strong {
  color: var(--heading);
  font-size: .86rem;
}

.matrix-employee-cell span {
  margin-top: 3px;
  color: var(--primary-strong);
  font-size: .72rem;
  font-weight: 800;
}

.matrix-employee-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .7rem;
}

.training-matrix-table .matrix-status-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  height: 82px;
  padding: 5px;
  background: #f5f7fa;
  text-align: center;
}

.matrix-status-cell a {
  display: grid;
  min-height: 70px;
  place-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.matrix-status-cell a:hover {
  border-color: currentColor;
  box-shadow: 0 5px 12px rgba(27, 45, 76, .1);
}

.matrix-status-cell strong {
  font-size: 1.1rem;
  line-height: 1;
}

.matrix-status-cell span {
  font-size: .71rem;
  font-weight: 850;
}

.matrix-status-cell small {
  font-size: .64rem;
  font-weight: 700;
  opacity: .82;
}

.matrix-state-current a {
  background: #dff4e9;
  color: #086747;
}

.matrix-state-due a {
  background: #fff0c9;
  color: #855300;
}

.matrix-state-overdue a {
  background: #ffe4e4;
  color: #a12828;
}

.matrix-state-progress a {
  background: #e5efff;
  color: #174fae;
}

.matrix-state-assigned a {
  background: #dff1f1;
  color: #0b6268;
}

.matrix-state-gap a {
  border-color: #e8b08c;
  border-style: dashed;
  background: #ffeadc;
  color: #8a400c;
}

.matrix-state-na {
  color: #a0abba;
  font-size: 1rem;
}

.matrix-empty-state {
  padding: 42px 24px;
  text-align: center;
}

.matrix-empty-state strong {
  color: var(--heading);
}

.matrix-empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
}

/* Audit history */
.audit-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.audit-summary > div {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-top: 4px solid #708096;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(27, 45, 76, .06);
}

.audit-summary strong {
  display: block;
  color: var(--heading);
  font-size: 1.65rem;
  line-height: 1;
}

.audit-summary span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

.audit-summary .audit-summary-success {
  border-top-color: #13855f;
}

.audit-summary .audit-summary-danger {
  border-top-color: #c83f3f;
}

.audit-summary .audit-summary-warning {
  border-top-color: #d18a0a;
}

.audit-summary .audit-summary-change {
  border-top-color: #2e67c7;
}

.audit-control-panel {
  padding: 17px;
}

.audit-view-tabs {
  justify-content: flex-start;
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.audit-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, .8fr)) minmax(190px, 1fr) repeat(2, minmax(150px, .75fr)) auto;
  align-items: end;
  gap: 12px;
}

.audit-filter-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
}

.audit-filter-form label > span {
  color: var(--heading);
  font-size: .78rem;
  font-weight: 850;
}

.audit-filter-form input,
.audit-filter-form select {
  min-width: 0;
  margin: 0;
}

.audit-filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
}

.audit-filter-actions button {
  min-height: 43px;
  padding-inline: 18px;
}

.audit-filter-actions a {
  color: var(--primary-strong);
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
}

.audit-table-section {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.audit-table-wrap {
  max-height: 70vh;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  scrollbar-color: #9cafc9 #edf2f8;
  scrollbar-width: thin;
}

.audit-history-table {
  min-width: max(100%, 1500px);
}

.audit-history-table th,
.audit-history-table td {
  padding: 12px 14px;
}

.audit-history-table th:nth-child(1),
.audit-history-table td:nth-child(1) {
  width: 150px;
  min-width: 150px;
}

.audit-history-table th:nth-child(2),
.audit-history-table td:nth-child(2) {
  width: 205px;
  min-width: 205px;
}

.audit-history-table th:nth-child(3),
.audit-history-table td:nth-child(3) {
  width: 145px;
  min-width: 145px;
}

.audit-history-table th:nth-child(4),
.audit-history-table td:nth-child(4),
.audit-history-table th:nth-child(5),
.audit-history-table td:nth-child(5) {
  width: 140px;
  min-width: 140px;
}

.audit-history-table th:nth-child(6),
.audit-history-table td:nth-child(6) {
  width: 170px;
  min-width: 170px;
}

.audit-history-table th:nth-child(7),
.audit-history-table td:nth-child(7) {
  width: 190px;
  min-width: 190px;
}

.audit-history-table th:last-child,
.audit-history-table td:last-child {
  min-width: 280px;
  white-space: normal;
}

.audit-when-cell strong,
.audit-when-cell span,
.audit-user-cell strong,
.audit-user-cell span,
.audit-user-cell small,
.audit-record-cell strong,
.audit-record-cell span,
.audit-source-cell strong,
.audit-source-cell span {
  display: block;
}

.audit-when-cell strong,
.audit-user-cell strong,
.audit-record-cell strong,
.audit-source-cell strong {
  color: var(--heading);
  font-size: .82rem;
}

.audit-when-cell span,
.audit-user-cell span,
.audit-record-cell span,
.audit-source-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}

.audit-user-cell small {
  margin-top: 4px;
  color: #08775a;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-action-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1;
}

.audit-action-success {
  border-color: #9bcfb8;
  background: #e3f5ec;
  color: #086747;
}

.audit-action-danger {
  border-color: #e3a1a1;
  background: #ffe8e8;
  color: #a12828;
}

.audit-action-warning {
  border-color: #e2b969;
  background: #fff1cc;
  color: #855300;
}

.audit-action-create {
  border-color: #89b1ea;
  background: #e8f1ff;
  color: #174fae;
}

.audit-action-change {
  border-color: #8bcac9;
  background: #e2f3f2;
  color: #0b6268;
}

.audit-action-neutral {
  border-color: #cbd5e1;
  background: #f1f4f8;
  color: #475569;
}

.audit-event-login_failed td {
  background: #fffafa;
}

.audit-event-session_timeout td {
  background: #fffdf7;
}

.audit-summary-cell {
  color: #35445b;
  line-height: 1.45;
}

/* Reports */
.report-title-row {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.report-grid > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid #e7edf5;
  border-bottom: 1px solid #e7edf5;
  background: var(--surface);
}

.report-grid > div:nth-child(3n) {
  border-right: 0;
}

.report-grid > div.wide {
  grid-column: 1 / -1;
  border-right: 0;
}

.report-grid span {
  display: block;
  color: var(--heading);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.report-grid p {
  margin: 6px 0 0;
  color: #29364a;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Manager snapshot and code annex */
.snapshot-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.snapshot-command-bar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.snapshot-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.snapshot-total-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-top: 5px solid #708096;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.snapshot-total-card strong,
.snapshot-total-card span {
  display: block;
}

.snapshot-total-card strong {
  color: var(--heading);
  font-size: 2rem;
  line-height: 1;
}

.snapshot-total-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 850;
}

.snapshot-current {
  border-top-color: #13855f;
}

.snapshot-due {
  border-top-color: #d18a0a;
}

.snapshot-missing {
  border-top-color: #c83f3f;
}

.snapshot-bars {
  display: grid;
  gap: 13px;
}

.snapshot-bar-row {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e1e9f4;
  border-radius: 8px;
  background: #fbfdff;
}

.snapshot-bar-label strong,
.snapshot-bar-label a {
  display: block;
}

.snapshot-bar-label strong {
  color: var(--heading);
  font-size: .92rem;
}

.snapshot-bar-label a {
  margin-top: 3px;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.snapshot-bar-track {
  display: flex;
  width: 100%;
  height: 22px;
  overflow: hidden;
  border: 1px solid #cedced;
  border-radius: 999px;
  background: #eef3f9;
}

.snapshot-bar-track span {
  display: block;
  min-width: 0;
  height: 100%;
}

.bar-current {
  background: #22a06b;
}

.bar-due {
  background: #f0a92a;
}

.bar-missing {
  background: #d94d45;
}

.snapshot-bar-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, auto));
  gap: 8px;
  margin: 0;
}

.snapshot-bar-row dl div {
  padding: 6px 8px;
  border: 1px solid #e2e9f3;
  border-radius: 6px;
  background: var(--surface);
}

.snapshot-bar-row dt,
.snapshot-bar-row dd {
  margin: 0;
  text-align: center;
}

.snapshot-bar-row dt {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.snapshot-bar-row dd {
  color: var(--heading);
  font-size: .9rem;
  font-weight: 900;
}

.annex-section .panel-heading {
  align-items: center;
}

.annex-table {
  min-width: max(100%, 1050px);
}

.annex-table th,
.annex-table td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sign in */
.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: #eaf1fb;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 420px;
  align-items: stretch;
  gap: 24px;
  width: min(1120px, calc(100vw - 48px));
}

.login-brand,
.login-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.login-brand {
  display: flex;
  min-height: 610px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
}

.login-logo-frame {
  display: grid;
  min-height: 260px;
  flex: 1;
  place-items: center;
}

.login-brand img {
  display: block;
  width: min(430px, 82%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 22px 28px rgba(23, 70, 179, .14));
}

.login-brand > span,
.login-card > span {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-brand h1 {
  max-width: 760px;
  margin: 14px 0 0;
  color: #101827;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.08;
}

.login-brand > p {
  max-width: 680px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.login-card {
  align-self: center;
  padding: 32px;
}

.login-card > span {
  color: #08775a;
}

.login-card h2 {
  margin: 8px 0 10px;
  color: #101827;
  font-size: 2rem;
  line-height: 1.08;
}

.login-intro {
  margin: 0 0 24px;
  color: var(--muted);
}

.login-card label {
  display: block;
  margin-bottom: 14px;
  color: #26364e;
  font-weight: 750;
}

.login-card input {
  margin-top: 5px;
}

.login-card button {
  width: 100%;
}

.login-security-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Temporary setup and repair tools */
.diagnostic-page {
  min-height: 100vh;
  padding: 32px;
  background: var(--page);
}

.diagnostic-card {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.diagnostic-card h1 {
  margin: 0 0 8px;
  color: #101827;
  font-size: 2.1rem;
  line-height: 1.1;
}

.diagnostic-card h2 {
  margin-top: 22px;
  color: var(--heading);
}

.diagnostic-card table {
  margin-top: 18px;
}

.diagnostic-card pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  white-space: pre-wrap;
}

.diagnostic-card code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--primary-soft);
}

.diagnostic-card .ok {
  color: var(--success);
  font-weight: 800;
}

.diagnostic-card .bad {
  color: var(--danger);
  font-weight: 800;
}

.diagnostic-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

/* Responsive shell */
@media (max-width: 1480px) {
  .topbar {
    align-items: start;
  }

  .brand {
    min-height: 44px;
  }

  .nav-shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    padding-top: 4px;
  }

  .topbar-actions {
    grid-row: 1;
    grid-column: 2;
  }
}

@media (max-width: 1120px) {
  .audit-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-filter-actions {
    justify-content: flex-start;
  }

  .matrix-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-filter-actions {
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .my-work-sidebar {
    position: static;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 900px) {
  .ncr-header-meta,
  .ncr-summary-grid,
  .ncr-two-column {
    grid-template-columns: 1fr;
  }

  .audit-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-view-tabs {
    justify-content: flex-start;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 9px 16px;
  }

  .mobile-nav-toggle {
    display: grid;
  }

  .nav-shell {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  .topbar.nav-open .nav-shell {
    display: grid;
  }

  .main-nav,
  .topbar-actions {
    grid-row: auto;
    grid-column: auto;
    align-items: stretch;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 0 0;
    border-top: 1px solid var(--border);
  }

  .main-nav > a,
  .nav-dropdown > summary {
    width: 100%;
    justify-content: space-between;
    border-radius: var(--radius-md);
  }

  .nav-dropdown {
    min-width: 0;
  }

  .nav-dropdown .menu {
    position: static;
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin-top: 6px;
    border-color: #cbdcf3;
    box-shadow: none;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .build-version-control,
  .company-switch-chip,
  .user-menu,
  .user-menu-button {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .user-menu-button > span:last-child {
    min-width: 0;
    overflow: hidden;
  }

  .user-menu-button strong {
    max-width: 100%;
  }

  .user-dropdown-menu {
    right: 0;
    left: auto;
  }

  .container {
    padding: 20px;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .dashboard-hero h1 {
    font-size: 2.5rem;
  }

  .employee-brief-grid,
  .dashboard-chart-grid,
  .digest-layout,
  .audit-workflow-grid,
  .workflow-split-grid,
  .module-directory-hero,
  .module-directory-grid,
  .page-help-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .pdf-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notification-row dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .snapshot-command-bar,
  .snapshot-bar-row {
    grid-template-columns: 1fr;
  }

  .snapshot-command-bar {
    align-items: stretch;
  }

  .snapshot-summary-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-bar-row dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-grid > div,
  .report-grid > div:nth-child(3n) {
    border-right: 0;
  }

  .record-form .form-grid,
  .record-field-panel-grid {
    grid-template-columns: 1fr;
  }

  .record-heading-layout {
    grid-template-columns: 1fr;
  }

  .record-heading-state {
    min-width: 0;
    width: fit-content;
  }

  .matrix-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .matrix-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .record-field-panel-grid label,
  .record-field-panel-grid label:nth-child(3n),
  .record-field-panel-grid label.field-half,
  .record-field-panel-grid label.field-wide,
  .record-field-panel-grid label.wide {
    grid-column: auto;
    border-right: 0;
  }

  .toolbar,
  .clause-card,
  .module-help-bar,
  .workflow-panel,
  .attachment-panel,
  .permission-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions,
  .workflow-actions,
  .module-tabs {
    justify-content: flex-start;
  }

  .login-shell {
    grid-template-columns: 1fr;
    width: min(680px, calc(100vw - 32px));
  }

  .login-brand {
    min-height: auto;
  }

  .login-logo-frame {
    min-height: 220px;
  }
}

@media (max-width: 600px) {
  .brand-name {
    font-size: .92rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .main-nav,
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .user-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 6px;
    box-shadow: none;
  }

  .container {
    padding: 14px;
  }

  .page-heading,
  .panel,
  .clause-card,
  .module-help-bar {
    padding: 17px;
    border-radius: 14px;
  }

  .page-heading h1 {
    font-size: 1.85rem;
  }

  .matrix-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filter-form {
    grid-template-columns: 1fr;
  }

  .audit-control-panel {
    border-radius: 8px;
  }

  .matrix-filter-form {
    grid-template-columns: 1fr;
  }

  .matrix-control-panel {
    border-radius: 8px;
  }

  .report-filter-form,
  .report-definition-form,
  .report-summary-grid {
    grid-template-columns: 1fr;
  }

  .report-definition-form .span-2 {
    grid-column: 1;
  }

  .report-bar-row {
    grid-template-columns: 1fr 1fr auto;
  }

  .matrix-section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .training-matrix-table .matrix-employee-column,
  .training-matrix-table tbody th {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
  }

  .training-matrix-table .matrix-task-column,
  .training-matrix-table .matrix-status-cell {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }

  .dashboard-hero {
    padding: 22px;
    border-radius: 14px;
  }

  .dashboard-hero h1 {
    font-size: 2.15rem;
  }

  .dashboard-kpi-grid,
  .notification-row dl {
    grid-template-columns: 1fr;
  }

  .workflow-process-row {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
  }

  .workflow-process-row em {
    grid-column: 2;
  }

  .dashboard-bar-row {
    grid-template-columns: 1fr 42px;
  }

  .dashboard-bar-row span {
    grid-column: 1 / -1;
  }

  .dashboard-module-link-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-toolbar,
  .pdf-report-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-brand-header,
  .pdf-summary-grid {
    grid-template-columns: 1fr;
  }

  .side-nav,
  .sidebar-metrics {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .brief-card-heading,
  .report-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-form button {
    width: 100%;
  }

  .module-tab,
  .role-tabs a {
    min-height: 40px;
  }

  .record-field-panel-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .record-field-panel-heading > span {
    grid-column: 2;
    justify-self: start;
  }

  .login-page {
    padding: 16px;
  }

  .login-shell {
    width: 100%;
  }

  .login-brand,
  .login-card {
    border-radius: 14px;
  }

  .login-brand {
    padding: 22px;
  }

  .login-brand h1 {
    font-size: 2rem;
  }

  .login-card {
    padding: 24px;
  }

  .diagnostic-page {
    padding: 14px;
  }

.diagnostic-card {
    padding: 18px;
    border-radius: 14px;
  }
}

.audit-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.audit-plan-grid label {
  display: grid;
  gap: 8px;
  color: #25324a;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
}

.audit-plan-grid input,
.audit-plan-grid select,
.audit-plan-grid textarea,
.audit-matrix-table input,
.audit-matrix-table select,
.audit-matrix-table textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #aebfdb;
  border-radius: 6px;
  padding: 10px 12px;
  color: #1f2937;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .04);
  font: inherit;
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.4;
}

.audit-plan-grid textarea,
.audit-matrix-table textarea {
  min-height: 108px;
  resize: vertical;
}

.audit-plan-grid input:hover,
.audit-plan-grid select:hover,
.audit-plan-grid textarea:hover {
  border-color: #7f98c4;
}

.audit-plan-grid input:focus,
.audit-plan-grid select:focus,
.audit-plan-grid textarea:focus {
  border-color: #315fcb;
  box-shadow: 0 0 0 3px rgba(49, 95, 203, .14);
  outline: none;
}

.audit-plan-grid input[readonly],
.audit-plan-grid textarea[readonly] {
  background: #fff;
  color: #56657a;
}

.schedule-internal-audit-page .panel {
  font-weight: 500;
}

.schedule-internal-audit-page .audit-plan-grid {
  margin-top: 4px;
}

.schedule-internal-audit-page .audit-plan-grid + .audit-plan-grid {
  margin-top: 18px;
}

.audit-plan-grid .span-2 {
  grid-column: 1 / -1;
}

.audit-qualification-note {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid #d7e7ff;
  border-bottom: 1px solid #d7e7ff;
  color: #506075;
  font-size: .9rem;
  line-height: 1.45;
}

.audit-qualification-note strong {
  color: #172554;
  font-size: .94rem;
  font-weight: 700;
}

.schedule-internal-audit-page .form-actions {
  gap: 12px;
  margin-top: 24px;
}

.schedule-internal-audit-page .form-actions button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card),
.schedule-internal-audit-page .form-actions a {
  min-height: 42px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
}

.audit-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.audit-preview-header h2 {
  margin: 0;
}

.audit-preview-header > div:last-child {
  display: grid;
  gap: 4px;
  min-width: 180px;
  text-align: right;
}

.audit-preview-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.audit-preview-meta span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.audit-summary-tools,
.audit-matrix-scope-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.audit-summary-filter,
.audit-matrix-scope-filter {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-summary-filter label,
.audit-matrix-scope-filter label {
  display: grid;
  gap: 4px;
  color: #4b5f7e;
  font-size: .7rem;
  font-weight: 850;
}

.audit-summary-filter select,
.audit-matrix-scope-filter select {
  width: auto;
  min-width: 170px;
  min-height: 34px;
  padding: 5px 30px 5px 8px;
  border: 1px solid #bdcbe0;
  border-radius: 7px;
  background: #fff;
  color: #1f3155;
  font-size: .76rem;
}

.audit-summary-filter button,
.audit-summary-filter .button-link,
.audit-matrix-scope-filter button,
.audit-matrix-scope-filter .button-link { min-height: 34px; padding: 6px 10px; font-size: .73rem; }
.audit-summary-tools > span,
.audit-matrix-scope-panel > small { color: #687995; font-size: .72rem; font-weight: 750; }
.audit-matrix-scope-panel > div { display: grid; gap: 3px; }
.audit-matrix-scope-panel > div strong { color: #1b2d52; font-size: .88rem; }
.audit-matrix-scope-panel > div span { color: #687995; font-size: .74rem; }

.audit-summary-process strong,
.audit-summary-process small { display: block; }
.audit-summary-process small { margin-top: 3px; color: #6c7c94; font-size: .68rem; font-weight: 750; }
.audit-summary-status { text-align: center; vertical-align: middle !important; }
.audit-summary-status span { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 850; }
.audit-summary-status span::before { width: 7px; height: 7px; border-radius: 50%; background: #ca8a04; content: ""; }
.audit-summary-status.is-completed span { color: #166534; }
.audit-summary-status.is-completed span::before { background: #16a34a; }
.audit-summary-status.is-planned span { color: #854d0e; }
.audit-summary-status.is-empty { background: #fff; }

.audit-matrix-table {
  min-width: 1180px;
}

.audit-matrix-table.compact {
  min-width: 980px;
}

.audit-matrix-table th,
.audit-matrix-table td {
  vertical-align: top;
}

.audit-matrix-table input {
  min-width: 170px;
}

.audit-matrix-table textarea {
  min-width: 220px;
}

.matrix-status-cell {
  min-width: 92px;
}

.matrix-cell-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-bottom: 6px;
  border: 1px solid #b8c9ff;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.inline-check,
.approval-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.approval-select select {
  min-width: 260px;
}

@media (max-width: 760px) {
  .audit-plan-grid,
  .audit-preview-meta {
    grid-template-columns: 1fr;
  }

  .audit-preview-header {
    flex-direction: column;
  }

  .audit-preview-header > div:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  @page {
    margin: .5in;
  }

  body {
    background: #fff !important;
  }

  .topbar,
  footer,
  .pdf-toolbar,
  .audit-print-hide,
  .back-link,
  .form-actions,
  .snapshot-command-bar .toolbar-actions {
    display: none !important;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .page-heading,
  .panel,
  .clause-card,
  .module-help-bar {
    border-color: #ccd3dc;
    box-shadow: none;
  }

  .pdf-sheet {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .pdf-section {
    page-break-inside: avoid;
  }

  .pdf-report-table {
    font-size: 8.5pt;
  }
}

/* QT360 COMPACT DENSITY — 2026-09-01
   Global desktop density reduction. Mobile preserves readable/touch-friendly sizing. */
:root {
  --header-height: 58px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body {
  font-size: 14px;
  line-height: 1.4;
}

.container,
.qms-list-page .container {
  padding: 18px;
}

.page-heading,
.panel,
.clause-card {
  margin-bottom: 14px;
  padding: 18px;
}

.page-heading h1 {
  margin: 4px 0 5px;
  font-size: 1.85rem;
  line-height: 1.08;
}

.panel-heading {
  margin-bottom: 11px;
}

.panel-heading h2 {
  font-size: 1.15rem;
}

.qms-list-page .module-list-panel {
  padding: 16px;
}

input,
select,
textarea {
  min-height: 36px;
  padding: 7px 9px;
  font-size: .9rem;
}

textarea { min-height: 88px; }
label > span { margin-bottom: 4px; font-size: .8rem; }
label small { margin-top: 4px; font-size: .74rem; }
.record-form .form-grid { gap: 10px; }

.button-link,
.form-actions a,
.toolbar-actions a,
.workflow-actions a,
button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card),
.btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: .82rem;
  box-shadow: none;
}

.compact,
.btn-small {
  min-height: 30px !important;
  padding: 5px 8px !important;
  font-size: .76rem;
}

.toolbar { gap: 10px; margin-bottom: 10px; }
.toolbar form,
.search-form { gap: 6px; }
.toolbar-actions,
.workflow-actions,
.module-tabs { gap: 6px; }

.module-data-table th,
.module-data-table td,
th,
td {
  padding: 7px 9px;
  font-size: .82rem;
}

th { font-size: .7rem; }
.module-data-table th:first-child,
.module-data-table td:first-child { width: 118px; min-width: 118px; }
.module-data-table th:nth-child(2),
.module-data-table td:nth-child(2) { width: 62px; min-width: 62px; }
.module-data-table th:last-child,
.module-data-table td:last-child { width: 138px; min-width: 138px; }

/* Dashboard density */
.dashboard-hero {
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
}
.dashboard-hero > div:first-child { gap: 9px; }
.dashboard-hero h1 { font-size: 2rem; }
.company-brand-card { padding: 14px; }
.company-brand-card strong { font-size: 1.05rem; }
.dashboard-grid { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: 14px; }
.dashboard-main { gap: 12px; }
.my-work-sidebar { gap: 10px; }
.side-nav,
.sidebar-quick-actions,
.quick-action-list,
.brief-list,
.module-group-grid { gap: 7px; }
.side-nav a,
.quick-action-list a { min-height: 38px; }
.side-nav a,
.quick-action-list a { padding: 8px 9px; }
.quick-action-list a small { font-size: .72rem; }
.sidebar-metrics { gap: 6px; }
.sidebar-metrics div { min-height: 58px; padding: 8px; }
.sidebar-metrics span { font-size: 1.35rem; }

.cards,
.module-grid,
.status-card-grid { gap: 8px; }
.cards,
.status-card-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.module-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.status-card,
.module-card {
  gap: 3px;
  min-height: 92px;
  padding: 11px;
}
.status-card strong { font-size: 1.55rem; }
.module-card strong { font-size: .92rem; }
.status-card small,
.module-card p { font-size: .78rem; }

.dashboard-kpi-grid,
.dashboard-chart-grid,
.module-directory-grid { gap: 9px; }
.dashboard-kpi-card {
  gap: 4px;
  min-height: 92px;
  padding: 11px;
  box-shadow: none;
}
.dashboard-kpi-card span { font-size: .66rem; }
.dashboard-kpi-card strong { font-size: 1.65rem; }
.dashboard-kpi-card small { font-size: .74rem; }
.dashboard-bar-list { gap: 8px; }
.dashboard-bar-row { grid-template-columns: 112px minmax(0,1fr) 34px; gap: 7px; }
.dashboard-bar-row span { font-size: .76rem; }
.dashboard-bar-row div { height: 9px; }
.dashboard-module-link-panel { gap: 12px; }
.dashboard-module-link-panel h2 { font-size: .95rem; }

/* Tabs / workflow blocks */
.workflow-panel { gap: 10px; margin-bottom: 11px; padding: 10px 12px; }
.workflow-guide-grid { gap: 8px; margin: 12px 0; }
.workflow-guide-step { min-height: 128px; gap: 5px; padding: 11px; }
.workflow-guide-step > span { width: 26px; height: 26px; }
.workflow-guide-step strong { font-size: .9rem; }
.workflow-guide-step p { font-size: .8rem; }

@media (max-width: 900px) {
  body { font-size: 15px; }
  :root { --header-height: 62px; }
  .container,
  .qms-list-page .container { padding: 12px; }
  input, select, textarea { min-height: 40px; font-size: 16px; }
  .button-link,
  .form-actions a,
  .toolbar-actions a,
  .workflow-actions a,
  button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card),
  .btn { min-height: 38px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* QT360 LIST HEADER CLEANUP 2026-09-01
   - list table uses full width
   - Add/New action is moved by JS to the far-right list toolbar
   - duplicate company logo is suppressed only inside user/account control */
.qms-list-page .qt360-full-width-list {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  min-width: 0 !important;
}
.qms-list-page .qt360-list-summary-removed { display: none !important; }
.qms-list-page .module-list-table-wrap,
.qms-list-page .data-table-wrap,
.qms-list-page .table-wrap { width: 100% !important; max-width: 100% !important; }

/* Schedule audit form readability */
.schedule-internal-audit-page .audit-plan-grid label {
  color: #25324a;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
}

.schedule-internal-audit-page .audit-plan-grid input,
.schedule-internal-audit-page .audit-plan-grid select,
.schedule-internal-audit-page .audit-plan-grid textarea {
  min-height: 42px;
  border: 1px solid #aebfdb;
  border-radius: 6px;
  padding: 10px 12px;
  color: #1f2937;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .04);
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.4;
}

.schedule-internal-audit-page .audit-plan-grid textarea {
  min-height: 108px;
}

.schedule-internal-audit-page .form-actions button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card),
.schedule-internal-audit-page .form-actions a {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
}

/* Compact edit-page fields */
.record-edit-form {
  gap: 10px;
}

.record-field-panel {
  border-radius: 7px;
}

.record-field-panel-heading {
  padding: 10px 12px;
}

.record-field-panel-heading h2 {
  font-size: .84rem;
  font-weight: 750;
}

.record-field-panel-heading p {
  margin-top: 2px;
  font-size: .78rem;
}

.record-field-panel-heading > span {
  padding: 4px 8px;
  font-size: .7rem;
  font-weight: 700;
}

.record-field-panel-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.record-field-panel-grid label {
  padding: 9px 10px;
}

.record-field-panel-grid label:nth-child(3n) {
  border-right: 1px solid #e7edf5;
}

.record-field-panel-grid label:nth-child(4n) {
  border-right: 0;
}

.record-field-panel-grid label > span {
  margin-bottom: 4px;
  color: #34435a;
  font-size: .74rem;
  font-weight: 650;
}

.record-field-panel-grid input,
.record-field-panel-grid select,
.record-field-panel-grid textarea {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.35;
}

.record-field-panel-grid label.field-date input[type="date"],
.record-field-panel-grid input[type="date"] {
  width: 11.75rem;
  max-width: 100%;
}

.record-field-panel-grid label.field-compact input,
.record-field-panel-grid label.field-compact select {
  width: 14rem;
  max-width: 100%;
}

.record-field-panel-grid label.field-half,
.record-field-panel-grid label.field-third-text {
  grid-column: span 2;
}

.record-field-panel-grid textarea {
  min-height: 74px;
}

.record-field-panel-grid .field-wide textarea {
  min-height: 96px;
}

.record-edit-form .form-actions {
  margin-top: 0;
  padding: 11px;
}

.schedule-internal-audit-page .audit-plan-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.schedule-internal-audit-page .audit-plan-grid label {
  min-width: 0;
}

.schedule-internal-audit-page .audit-plan-grid .field-medium {
  grid-column: span 2;
}

.schedule-internal-audit-page .audit-plan-grid .field-date,
.schedule-internal-audit-page .audit-plan-grid .field-short {
  grid-column: span 1;
}

.schedule-internal-audit-page .audit-plan-grid input[type="date"] {
  width: 11.75rem;
  max-width: 100%;
}

.schedule-internal-audit-page .audit-plan-grid .field-short select {
  width: 14rem;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .record-field-panel-grid,
  .schedule-internal-audit-page .audit-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-field-panel-grid label:nth-child(3n) {
    border-right: 1px solid #e7edf5;
  }

  .record-field-panel-grid label:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .record-field-panel-grid,
  .schedule-internal-audit-page .audit-plan-grid {
    grid-template-columns: 1fr;
  }

  .record-field-panel-grid label,
  .record-field-panel-grid label:nth-child(2n),
  .record-field-panel-grid label:nth-child(3n),
  .record-field-panel-grid label:nth-child(4n),
  .record-field-panel-grid label.field-half,
  .record-field-panel-grid label.field-third-text,
  .record-field-panel-grid label.field-wide,
  .record-field-panel-grid label.wide,
  .schedule-internal-audit-page .audit-plan-grid .field-medium,
  .schedule-internal-audit-page .audit-plan-grid .field-date,
  .schedule-internal-audit-page .audit-plan-grid .field-short {
    grid-column: auto;
    border-right: 0;
  }

  .record-field-panel-grid label.field-date input[type="date"],
  .record-field-panel-grid input[type="date"],
  .record-field-panel-grid label.field-compact input,
  .record-field-panel-grid label.field-compact select,
  .schedule-internal-audit-page .audit-plan-grid input[type="date"],
  .schedule-internal-audit-page .audit-plan-grid .field-short select {
    width: 100%;
  }
}
.qms-list-page .qt360-list-primary-actions {
  display: inline-flex; align-items: center; justify-content: flex-end;
  gap: 7px; margin-left: auto; flex: 0 0 auto;
}
.qms-list-page .qt360-list-primary-actions > a,
.qms-list-page .qt360-list-primary-actions > button { white-space: nowrap; }
.user-menu-button .user-company-logo,
.user-menu .user-company-logo,
.user-account-card .company-logo,
.user-profile-card .company-logo,
.account-context-card .company-logo { display: none !important; }
@media (max-width: 900px) {
  .qms-list-page .qt360-list-primary-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
}



/* QT360 Employee Form Upgrade 2026-09-01 */
.employee-record-form {
  padding: 18px;
}
.employee-record-form .record-field-panel {
  margin: 0 0 14px;
  border-radius: 14px;
}
.employee-record-form .record-field-panel > summary {
  cursor: default;
  padding: 14px 16px 10px;
}
.employee-record-form .record-field-panel > summary::-webkit-details-marker { display: none; }
.employee-record-form .record-field-panel > summary::marker { content: ''; }
.employee-record-form .record-field-panel-heading > span { display: none; }
.employee-record-form .record-field-panel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 8px 16px 16px;
}
.employee-record-form .record-field > span {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.employee-record-form .record-field input,
.employee-record-form .record-field select,
.employee-record-form .record-field textarea {
  min-height: 40px;
}
.employee-access-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border, #d6dfef);
  border-radius: 14px;
  background: #f8faff;
}
.employee-access-summary h2 { margin: 2px 0 3px; font-size: 1.05rem; }
.employee-access-summary p { margin: 0; color: var(--muted, #5d6b82); }
@media (max-width: 1100px) {
  .employee-record-form .record-field-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .employee-record-form { padding: 12px; }
  .employee-record-form .record-field-panel-grid { grid-template-columns: 1fr; }
  .employee-access-summary { align-items: flex-start; flex-direction: column; }
}

/* Final edit-form density pass */
.record-edit-form .record-field-panel-grid,
.record-edit-form.employee-record-form .record-field-panel-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 0;
  padding: 0;
}

.record-edit-form .record-field-panel,
.record-edit-form.employee-record-form .record-field-panel {
  margin: 0;
  border-radius: 7px;
}

.record-edit-form .record-field-panel > summary,
.record-edit-form.employee-record-form .record-field-panel > summary {
  min-height: auto;
  padding: 10px 12px;
}

.record-edit-form .record-field,
.record-edit-form.employee-record-form .record-field {
  padding: 9px 10px;
}

.record-edit-form .record-field > span,
.record-edit-form.employee-record-form .record-field > span {
  margin-bottom: 4px;
  color: #34435a;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: 0;
}

.record-edit-form .record-field input,
.record-edit-form .record-field select,
.record-edit-form .record-field textarea,
.record-edit-form.employee-record-form .record-field input,
.record-edit-form.employee-record-form .record-field select,
.record-edit-form.employee-record-form .record-field textarea {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.35;
}

.record-edit-form .record-field textarea,
.record-edit-form.employee-record-form .record-field textarea {
  min-height: 72px;
}

.record-edit-form .record-field.field-wide textarea,
.record-edit-form.employee-record-form .record-field.field-wide textarea {
  min-height: 96px;
}

.record-edit-form .record-field input[type="date"],
.record-edit-form.employee-record-form .record-field input[type="date"],
.schedule-internal-audit-page .audit-plan-grid input[type="date"] {
  width: 11.75rem;
  max-width: 100%;
}

.record-edit-form .record-field.field-compact input,
.record-edit-form .record-field.field-compact select,
.record-edit-form.employee-record-form .record-field.field-compact input,
.record-edit-form.employee-record-form .record-field.field-compact select,
.schedule-internal-audit-page .audit-plan-grid .field-short select {
  width: 14rem;
  max-width: 100%;
}

.schedule-internal-audit-page .audit-plan-grid .field-medium input,
.schedule-internal-audit-page .audit-plan-grid .field-medium select {
  width: 34rem;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .record-edit-form .record-field-panel-grid,
  .record-edit-form.employee-record-form .record-field-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .record-edit-form .record-field-panel-grid,
  .record-edit-form.employee-record-form .record-field-panel-grid {
    grid-template-columns: 1fr;
  }

  .record-edit-form .record-field input[type="date"],
  .record-edit-form.employee-record-form .record-field input[type="date"],
  .record-edit-form .record-field.field-compact input,
  .record-edit-form .record-field.field-compact select,
  .record-edit-form.employee-record-form .record-field.field-compact input,
  .record-edit-form.employee-record-form .record-field.field-compact select,
  .schedule-internal-audit-page .audit-plan-grid input[type="date"],
  .schedule-internal-audit-page .audit-plan-grid .field-short select,
  .schedule-internal-audit-page .audit-plan-grid .field-medium input,
  .schedule-internal-audit-page .audit-plan-grid .field-medium select {
    width: 100%;
  }
}

/* Shared list/edit cleanup: compact rows, inline actions, and tighter edit fields */
.qms-list-page .module-help-bar,
.qms-list-page .help-modal-backdrop {
  display: none !important;
}

.qms-list-page .toolbar {
  align-items: center;
  gap: 10px;
}

.qms-list-page .search-form {
  flex: 1 1 360px;
  min-width: 260px;
}

.qms-list-page .toolbar-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.qms-list-page .module-data-table th:first-child,
.qms-list-page .module-data-table td:first-child {
  width: 250px;
  min-width: 250px;
}

.qms-list-page .module-data-table td.actions-cell,
.qms-list-page .actions-cell-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.qms-list-page .module-data-table td.actions-cell form,
.qms-list-page .actions-cell-left form {
  display: inline-flex;
  flex: 0 0 auto;
}

.qms-list-page .module-data-table td.actions-cell a,
.qms-list-page .module-data-table td.actions-cell .link-button,
.qms-list-page .actions-cell-left a,
.qms-list-page .actions-cell-left .link-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 8px;
  font-size: .76rem;
  font-weight: 650;
}

.record-edit-form,
.record-edit-form.employee-record-form {
  gap: 9px;
}

.record-edit-form .record-field-panel,
.record-edit-form.employee-record-form .record-field-panel {
  box-shadow: none;
}

.record-edit-form .record-field-panel-grid,
.record-edit-form.employee-record-form .record-field-panel-grid {
  grid-template-columns: repeat(5, minmax(145px, 1fr));
}

.record-edit-form .record-field,
.record-edit-form.employee-record-form .record-field {
  padding: 8px 9px;
}

.record-edit-form .record-field > span,
.record-edit-form.employee-record-form .record-field > span {
  color: #42516a;
  font-size: .72rem;
  font-weight: 550;
  text-transform: none;
}

.record-edit-form .record-field input,
.record-edit-form .record-field select,
.record-edit-form.employee-record-form .record-field input,
.record-edit-form.employee-record-form .record-field select {
  width: 100%;
  max-width: 22rem;
  min-height: 32px;
  padding: 5px 8px;
  font-size: .82rem;
}

.record-edit-form .record-field textarea,
.record-edit-form.employee-record-form .record-field textarea {
  min-height: 64px;
  padding: 6px 8px;
  font-size: .82rem;
  font-weight: 400;
}

.record-edit-form .record-field.field-wide textarea,
.record-edit-form.employee-record-form .record-field.field-wide textarea {
  min-height: 84px;
}

.record-edit-form .record-field input[type="date"],
.record-edit-form.employee-record-form .record-field input[type="date"],
.record-field-panel-grid label.field-date input[type="date"],
.record-field-panel-grid input[type="date"],
.schedule-internal-audit-page .audit-plan-grid input[type="date"] {
  width: 9.75rem;
  max-width: 100%;
}

.record-edit-form .record-field.field-compact input,
.record-edit-form .record-field.field-compact select,
.record-edit-form.employee-record-form .record-field.field-compact input,
.record-edit-form.employee-record-form .record-field.field-compact select,
.schedule-internal-audit-page .audit-plan-grid .field-short select {
  width: 11.5rem;
  max-width: 100%;
}

@media (max-width: 1220px) {
  .record-edit-form .record-field-panel-grid,
  .record-edit-form.employee-record-form .record-field-panel-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 1000px) {
  .record-edit-form .record-field-panel-grid,
  .record-edit-form.employee-record-form .record-field-panel-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .qms-list-page .toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .qms-list-page .module-data-table th:first-child,
  .qms-list-page .module-data-table td:first-child {
    width: 220px;
    min-width: 220px;
  }

  .record-edit-form .record-field-panel-grid,
  .record-edit-form.employee-record-form .record-field-panel-grid {
    grid-template-columns: 1fr;
  }

  .record-edit-form .record-field input,
  .record-edit-form .record-field select,
  .record-edit-form .record-field input[type="date"],
  .record-edit-form.employee-record-form .record-field input,
  .record-edit-form.employee-record-form .record-field select,
  .record-edit-form.employee-record-form .record-field input[type="date"],
  .schedule-internal-audit-page .audit-plan-grid input[type="date"] {
    width: 100%;
    max-width: 100%;
  }
}

/* QT360 list density and search helper pass 2026-09-06 */
.qms-list-page .container {
  padding: 12px 16px;
}

.qms-list-page .page-heading {
  margin-bottom: 10px;
  padding: 12px 14px;
}

.qms-list-page .page-heading h1 {
  margin: 3px 0;
  font-size: 1.45rem;
  line-height: 1.08;
}

.qms-list-page .page-heading p {
  margin-top: 4px;
  font-size: .82rem;
  line-height: 1.3;
}

.qms-list-page .tenant-pill {
  margin-top: 8px !important;
  padding: 4px 8px;
  font-size: .76rem;
}

/* Shared page-level company context. The same Super Admin selector is moved
   from the dark navigation into every page's white heading/action surface. */
.page-heading .page-company-context,
.list-page-header-compact .page-company-context,
.page-company-context-row .page-company-context {
  width: min(245px, 100%);
  max-width: 245px;
  min-height: 40px;
  box-shadow: none;
}

.page-heading .form-actions > .page-company-context,
.page-heading .page-heading-actions > .page-company-context,
.page-heading .heading-actions > .page-company-context,
.page-heading .page-actions > .page-company-context {
  margin-right: 2px;
}

.page-heading.has-page-company-context {
  min-height: 70px;
  padding-right: 285px;
}

.page-heading.has-page-company-context > .page-company-context {
  position: absolute;
  top: 14px;
  right: 14px;
}

.page-company-context-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}

.qms-list-page .panel,
.qms-list-page .module-list-panel {
  margin-bottom: 10px;
  padding: 10px 12px;
}

.qms-list-page .list-page-header-compact,
.qms-list-page .toolbar,
.qms-list-page .list-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.qms-list-page .list-page-header-compact {
  justify-content: space-between;
}

.operations-list-page .topbar-actions > .company-switch-chip {
  display: none;
}

.operations-list-page .list-page-header-compact .list-company-context {
  flex: 0 1 245px;
  width: min(245px, 100%);
  max-width: 245px;
  min-height: 40px;
  margin-left: auto;
  box-shadow: none;
}

.operations-list-page .list-page-header-compact .list-search-right {
  margin-left: 0;
}

.qms-list-page .list-page-title-compact {
  display: flex;
  flex: 1 1 auto;
  min-width: 220px;
  align-items: baseline;
  gap: 8px;
}

.qms-list-page .list-page-title-compact h1 {
  margin: 0;
  color: var(--heading);
  font-size: 1.35rem;
  line-height: 1.05;
}

.qms-list-page .list-record-count,
.qms-list-page .list-record-context {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}

.qms-list-page .search-form,
.qms-list-page .qt-search {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

.qms-list-page .search-form input[type="search"],
.qms-list-page .search-form input[name="search"],
.qms-list-page .qt-search input[type="search"] {
  flex: 0 1 280px;
  width: clamp(180px, 22vw, 300px);
  min-width: 180px;
  max-width: 100%;
}

.qms-list-page .search-form select {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
}

.qms-list-page .list-primary-actions,
.qms-list-page .toolbar-actions,
.qms-list-page .qt360-list-primary-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: 0;
  white-space: nowrap;
}

.qms-list-page .list-actions-left {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  white-space: nowrap;
}

.qms-list-page .module-tabs {
  margin-bottom: 7px;
}

.qms-list-page .module-table-section {
  margin: 0;
}

.qms-list-page .data-table-wrap,
.qms-list-page .table-wrap,
.qms-list-page .module-list-table-wrap {
  border-radius: 8px;
}

.qms-list-page .module-data-table th,
.qms-list-page .module-data-table td,
.qms-list-page .data-table th,
.qms-list-page .data-table td,
.qms-list-page .record-table th,
.qms-list-page .record-table td {
  padding: 5px 8px;
  font-size: .79rem;
  line-height: 1.25;
}

.qms-list-page .module-data-table th,
.qms-list-page .data-table th,
.qms-list-page .record-table th {
  font-size: .67rem;
}

.qms-list-page .module-data-table th:first-child,
.qms-list-page .module-data-table td:first-child {
  width: 116px;
  min-width: 116px;
}

.qms-list-page .module-data-table td.actions-cell,
.qms-list-page .actions-cell-left {
  min-height: 0;
  gap: 5px;
}

.qms-list-page .module-data-table td.actions-cell a,
.qms-list-page .module-data-table td.actions-cell .link-button,
.qms-list-page .actions-cell-left a,
.qms-list-page .actions-cell-left .link-button,
.qms-list-page .actions-cell-left button,
.qms-list-page .qt-row-actions a {
  min-height: 26px;
  padding: 4px 7px;
  font-size: .72rem;
  line-height: 1.1;
}

.qms-list-page .empty-state {
  margin: 8px 0 0;
  padding: 11px;
}

@media (max-width: 900px) {
  .page-heading.has-page-company-context {
    min-height: 0;
    padding-right: 17px;
  }

  .page-heading.has-page-company-context > .page-company-context {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 10px;
  }

  .page-heading .form-actions > .page-company-context,
  .page-heading .page-heading-actions > .page-company-context,
  .page-heading .heading-actions > .page-company-context,
  .page-heading .page-actions > .page-company-context,
  .page-company-context-row .page-company-context {
    width: 100%;
    max-width: none;
  }

  .qms-list-page .list-page-header-compact,
  .qms-list-page .toolbar,
  .qms-list-page .list-toolbar,
  .qms-list-page .qt-search {
    align-items: stretch;
    flex-direction: column;
  }

  .qms-list-page .search-form,
  .qms-list-page .qt-search,
  .qms-list-page .toolbar-actions,
  .qms-list-page .list-primary-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .operations-list-page .list-page-header-compact .list-company-context {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .qms-list-page .search-form input[type="search"],
  .qms-list-page .search-form input[name="search"],
  .qms-list-page .qt-search input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Maintenance forecast form layout */
.maintenance-forecast-page .maintenance-panel {
  margin-bottom: 14px;
}

.maintenance-forecast-page .maintenance-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.maintenance-forecast-page .maintenance-form-grid,
.maintenance-forecast-page .maintenance-meter-form {
  display: grid;
  align-items: start;
  gap: 12px 14px;
}

.maintenance-forecast-page .maintenance-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.maintenance-forecast-page .maintenance-meter-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.maintenance-forecast-page .maintenance-form-grid label,
.maintenance-forecast-page .maintenance-meter-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.maintenance-forecast-page .maintenance-form-grid label > span,
.maintenance-forecast-page .maintenance-meter-form label > span {
  margin: 0;
  color: var(--heading);
  font-size: .78rem;
  font-weight: 850;
}

.maintenance-forecast-page .maintenance-form-grid textarea {
  min-height: 76px;
}

.maintenance-forecast-page .field-span-2 {
  grid-column: span 2;
}

.maintenance-forecast-page .field-span-full {
  grid-column: 1 / -1;
}

.maintenance-forecast-page .maintenance-form-grid .form-actions,
.maintenance-forecast-page .maintenance-meter-form .form-actions {
  align-self: end;
  margin-top: 0;
}

.maintenance-forecast-page .maintenance-row-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 190px;
  margin: 0;
}

.maintenance-forecast-page .maintenance-row-action label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}

.maintenance-forecast-page .maintenance-row-action label > span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.maintenance-forecast-page .maintenance-row-action button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: .78rem;
}

@media (max-width: 1180px) {
  .maintenance-forecast-page .maintenance-config-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .maintenance-forecast-page .maintenance-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maintenance-forecast-page .maintenance-meter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .maintenance-forecast-page .maintenance-form-grid,
  .maintenance-forecast-page .maintenance-meter-form {
    grid-template-columns: 1fr;
  }

  .maintenance-forecast-page .field-span-2,
  .maintenance-forecast-page .field-span-full {
    grid-column: auto;
  }

  .maintenance-forecast-page .maintenance-row-action {
    min-width: 0;
  }
}

/* Consistent list-page actions and sharper form controls */
.qms-list-page .module-data-table th:first-child,
.qms-list-page .module-data-table td:first-child {
  width: 250px;
  min-width: 250px;
}

.qms-list-page .module-data-table td.actions-cell,
.qms-list-page .actions-cell-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 250px;
  white-space: normal;
}

.qms-list-page .module-data-table td.actions-cell form,
.qms-list-page .actions-cell-left form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

.qms-list-page .module-data-table td.actions-cell a,
.qms-list-page .module-data-table td.actions-cell .link-button,
.qms-list-page .actions-cell-left a,
.qms-list-page .actions-cell-left .link-button,
.qms-list-page .actions-cell-left button,
.qms-list-page .qt-row-actions a {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.qms-list-page .button-link,
.qms-list-page .search-form button,
.qms-list-page .toolbar-actions a,
.qms-list-page .toolbar-actions button {
  min-height: 30px !important;
  padding: 6px 10px !important;
  border-radius: 4px;
  font-size: .78rem;
  line-height: 1.1;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
select,
textarea {
  border-radius: 4px;
}

.audit-record-form .record-field-panel-grid label {
  min-width: 0;
  overflow: hidden;
}

.audit-record-form .record-field-panel-grid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.audit-record-form .record-field-panel-grid select,
.audit-record-form .record-field-panel-grid textarea {
  width: 100%;
  max-width: 100%;
}

.audit-record-form .record-field-panel-grid label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-record-form .record-field-panel-grid label:has(input[type="radio"]) > span {
  min-width: 0;
  margin: 0;
}

.audit-record-form .record-field-panel-grid label input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
}

/* Dark QT360 application surfaces for list and edit workflows */
body.qms-app-page {
  --primary: #4f8cff;
  --primary-strong: #79adff;
  --primary-soft: #173866;
  --accent: #65c7ff;
  --ink: #e8f0ff;
  --heading: #f4f7ff;
  --muted: #a9bad6;
  --subtle: #8197b8;
  --border: #284a78;
  --border-strong: #3b6397;
  --surface: #0b2045;
  --surface-soft: #102b52;
  --page: #06132d;
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .22);
  --shadow-md: 0 20px 52px rgba(0, 0, 0, .28);
  background: radial-gradient(circle at 88% -8%, rgba(47, 100, 184, .28), transparent 34rem), var(--page);
}

html:has(body.qms-app-page) {
  background: var(--page);
}

body.qms-app-page .topbar {
  border-bottom-color: #274976;
  background: rgba(6, 19, 45, .94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
}

body.qms-app-page .brand,
body.qms-app-page .brand-name,
body.qms-app-page .main-nav > a,
body.qms-app-page .nav-dropdown > summary,
body.qms-app-page .topbar-utility-link,
body.qms-app-page .user-menu-button,
body.qms-app-page .user-menu-button strong {
  color: #e8f0ff;
}

body.qms-app-page .page-heading,
body.qms-app-page .hero,
body.qms-app-page .panel,
body.qms-app-page .clause-card,
body.qms-app-page .module-clause-card,
body.qms-app-page .record-field-panel,
body.qms-app-page .attachment-panel,
body.qms-app-page .upload-box,
body.qms-app-page .company-brand-card,
body.qms-app-page .metric-card,
body.qms-app-page .notification-summary-card,
body.qms-app-page .quick-action-list a,
body.qms-app-page .file-list-row {
  border-color: #284a78;
  background: #0b2045;
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

body.qms-app-page .page-heading h1,
body.qms-app-page .panel-heading h2,
body.qms-app-page .panel-heading h3,
body.qms-app-page .brief-card-heading h3,
body.qms-app-page .report-title-row h2,
body.qms-app-page label > span,
body.qms-app-page .record-field-panel-heading h2 {
  color: #f4f7ff;
}

body.qms-app-page .page-heading p,
body.qms-app-page .panel-heading p,
body.qms-app-page .report-title-row p,
body.qms-app-page .muted,
body.qms-app-page label small,
body.qms-app-page footer {
  color: #a9bad6;
}

body.qms-app-page .page-help-grid li,
body.qms-app-page .page-help-grid p {
  color: #a9bad6;
}

body.qms-app-page .module-help-bar {
  border-color: #284a78;
  background: #102b52;
}

body.qms-app-page .tenant-pill,
body.qms-app-page .secondary,
body.qms-app-page .brief-card-heading a {
  border-color: #3b6397 !important;
  background: #102b52 !important;
  color: #cfe1ff !important;
  box-shadow: none !important;
}

body.qms-app-page .button-link:not(.secondary),
body.qms-app-page .form-actions a:not(.secondary),
body.qms-app-page .toolbar-actions a:not(.secondary),
body.qms-app-page button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card):not(.secondary) {
  border-color: #f5c400;
  background: #f5c400;
  color: #071735;
  box-shadow: 0 10px 24px rgba(245, 196, 0, .18);
}

body.qms-app-page .button-link:not(.secondary):hover,
body.qms-app-page .form-actions a:not(.secondary):hover,
body.qms-app-page .toolbar-actions a:not(.secondary):hover,
body.qms-app-page button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card):not(.secondary):hover {
  border-color: #ffd84a;
  background: #ffd84a;
  color: #071735;
}

body.qms-app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.qms-app-page select,
body.qms-app-page textarea {
  border-color: #365a8b;
  background: #102b52;
  color: #eef4ff;
}

body.qms-app-page input:hover,
body.qms-app-page select:hover,
body.qms-app-page textarea:hover {
  border-color: #5b8ed0;
}

body.qms-app-page input:focus,
body.qms-app-page select:focus,
body.qms-app-page textarea:focus {
  border-color: #65c7ff;
  background: #173866;
  box-shadow: 0 0 0 3px rgba(101, 199, 255, .2);
}

body.qms-app-page input[readonly],
body.qms-app-page textarea[readonly],
body.qms-app-page select:disabled,
body.qms-app-page input:disabled {
  border-color: #2a456d;
  background: #0a1c3a;
  color: #8197b8;
}

body.qms-app-page .data-table-wrap,
body.qms-app-page .table-wrap {
  border-color: #284a78;
  background: #081b3a;
}

body.qms-app-page table {
  background: #0b2045;
}

body.qms-app-page th,
body.qms-app-page td {
  border-bottom-color: #213e68;
  color: #dce8fb;
}

body.qms-app-page th {
  background: #163761;
  color: #d8e7ff;
}

body.qms-app-page tbody tr:hover td {
  background: #173866;
}

body.qms-app-page tfoot td {
  border-top-color: #3b6397;
  background: #102b52;
  color: #eef4ff;
}

body.qms-app-page .qms-list-page .qt360-sort-button:hover {
  background: #204574;
  color: #ffffff;
}

body.qms-app-page .empty-state {
  border-color: #3b6397;
  background: #102b52;
  color: #a9bad6;
}

body.qms-app-page .module-tabs,
body.qms-app-page .workflow-panel,
body.qms-app-page .toolbar,
body.qms-app-page .record-heading-state {
  border-color: #284a78;
  background: #102b52;
}

body.qms-app-page .module-tab,
body.qms-app-page .back-link,
body.qms-app-page a {
  color: #79adff;
}

body.qms-app-page .module-tab.active {
  border-color: #f5c400;
  background: #173866;
  color: #ffe47b;
}

body.qms-app-page .actions-cell a,
body.qms-app-page .link-button {
  border-color: #3b6397;
  background: #173866;
  color: #cfe1ff;
}

body.qms-app-page .actions-cell a:hover,
body.qms-app-page .link-button:hover {
  border-color: #65c7ff;
  background: #204574;
}

body.qms-app-page .danger-link,
body.qms-app-page .danger-link:hover {
  border-color: #a94a55;
  background: #4a1f35;
  color: #ffb8bd;
}

body.qms-app-page .record-field-panel-heading {
  border-bottom-color: #284a78;
  background: #163761;
}

body.qms-app-page .record-field-panel-heading > span {
  border-color: #3b6397;
  background: #0b2045;
  color: #ffe47b;
}

body.qms-app-page .record-field-panel-grid label {
  border-right-color: #213e68;
  border-bottom-color: #213e68;
}

/* Lighter blue-gray revision */
body.qms-app-page {
  --primary: #2563eb;
  --primary-strong: #1746b3;
  --primary-soft: #e8f1ff;
  --accent: #0ea5e9;
  --ink: #1e2d43;
  --heading: #102a62;
  --muted: #64748b;
  --subtle: #8a98ad;
  --border: #c8d8eb;
  --border-strong: #a9bfdc;
  --surface: #f7faff;
  --surface-soft: #edf4fb;
  --page: #e7eef7;
  --shadow-sm: 0 7px 18px rgba(15, 35, 70, .08);
  --shadow-md: 0 18px 44px rgba(15, 35, 70, .11);
  background: radial-gradient(circle at 88% -8%, rgba(37, 99, 235, .1), transparent 34rem), var(--page);
}

html:has(body.qms-app-page) {
  background: var(--page);
}

body.qms-app-page .topbar {
  border-bottom-color: #c8d8eb;
  background: rgba(247, 250, 255, .95);
  box-shadow: 0 8px 24px rgba(15, 35, 70, .07);
}

body.qms-app-page .brand,
body.qms-app-page .brand-name,
body.qms-app-page .main-nav > a,
body.qms-app-page .nav-dropdown > summary,
body.qms-app-page .topbar-utility-link,
body.qms-app-page .user-menu-button,
body.qms-app-page .user-menu-button strong {
  color: #20324f;
}

body.qms-app-page .page-heading,
body.qms-app-page .hero,
body.qms-app-page .panel,
body.qms-app-page .clause-card,
body.qms-app-page .module-clause-card,
body.qms-app-page .record-field-panel,
body.qms-app-page .attachment-panel,
body.qms-app-page .upload-box,
body.qms-app-page .company-brand-card,
body.qms-app-page .metric-card,
body.qms-app-page .notification-summary-card,
body.qms-app-page .quick-action-list a,
body.qms-app-page .file-list-row {
  border-color: #c8d8eb;
  background: #f7faff;
  color: #1e2d43;
  box-shadow: var(--shadow-md);
}

body.qms-app-page .page-heading h1,
body.qms-app-page .panel-heading h2,
body.qms-app-page .panel-heading h3,
body.qms-app-page .brief-card-heading h3,
body.qms-app-page .report-title-row h2,
body.qms-app-page label > span,
body.qms-app-page .record-field-panel-heading h2 {
  color: #102a62;
}

body.qms-app-page .page-heading p,
body.qms-app-page .panel-heading p,
body.qms-app-page .report-title-row p,
body.qms-app-page .muted,
body.qms-app-page label small,
body.qms-app-page footer,
body.qms-app-page .page-help-grid li,
body.qms-app-page .page-help-grid p {
  color: #64748b;
}

body.qms-app-page .tenant-pill,
body.qms-app-page .secondary,
body.qms-app-page .brief-card-heading a {
  border-color: #a9bfdc !important;
  background: #edf4fb !important;
  color: #1746b3 !important;
}

body.qms-app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.qms-app-page select,
body.qms-app-page textarea {
  border-color: #b7cae2;
  background: #fbfdff;
  color: #1e2d43;
}

body.qms-app-page input:focus,
body.qms-app-page select:focus,
body.qms-app-page textarea:focus {
  border-color: #0ea5e9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .16);
}

body.qms-app-page .data-table-wrap,
body.qms-app-page .table-wrap {
  border-color: #c8d8eb;
  background: #edf4fb;
}

body.qms-app-page table {
  background: #f7faff;
}

body.qms-app-page th,
body.qms-app-page td {
  border-bottom-color: #d8e3f0;
  color: #29364a;
}

body.qms-app-page th {
  background: #e5eef9;
  color: #35445b;
}

body.qms-app-page tbody tr:hover td {
  background: #edf5ff;
}

body.qms-app-page .empty-state,
body.qms-app-page .module-tabs,
body.qms-app-page .workflow-panel,
body.qms-app-page .toolbar,
body.qms-app-page .record-heading-state,
body.qms-app-page .module-help-bar {
  border-color: #c8d8eb;
  background: #edf4fb;
}

body.qms-app-page .module-tab,
body.qms-app-page .back-link,
body.qms-app-page a {
  color: #1746b3;
}

body.qms-app-page .module-tab.active {
  border-color: #8db2ec;
  background: #e1edff;
  color: #1746b3;
}

body.qms-app-page .record-field-panel-heading {
  border-bottom-color: #c8d8eb;
  background: #e5eef9;
}

body.qms-app-page .record-field-panel-heading > span {
  border-color: #a9bfdc;
  background: #f7faff;
  color: #1746b3;
}

body.qms-app-page .record-field-panel-grid label {
  border-right-color: #d8e3f0;
  border-bottom-color: #d8e3f0;
}

body.qms-app-page .actions-cell a,
body.qms-app-page .link-button {
  border-color: #a9bfdc;
  background: #e8f1ff;
  color: #1746b3;
}

body.qms-app-page .actions-cell a:hover,
body.qms-app-page .link-button:hover {
  border-color: #8db2ec;
  background: #dceaff;
}

body.qms-app-page .danger-link,
body.qms-app-page .danger-link:hover {
  border-color: #efb2aa;
  background: #fff1f0;
  color: #b42318;
}

/* Shared list-page summary cards and heading actions. Keep the layout
   available to legacy qms-list-page screens as well as the qt-list-page
   renderer, so dashboard summaries never collapse into plain text. */
body.qms-list-page .page-heading .asset-page-heading-row,
body.qms-list-page .page-heading .list-page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.qms-list-page .page-heading .asset-page-heading-row > :first-child,
body.qms-list-page .page-heading .list-page-heading-row > :first-child {
  min-width: min(320px, 100%);
  flex: 1 1 420px;
}

body.qms-list-page .page-heading .asset-page-heading-row > .toolbar-actions,
body.qms-list-page .page-heading .list-page-heading-row > .toolbar-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
}

body.qms-list-page .metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

body.qms-list-page .metric-card {
  display: flex;
  min-height: 86px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

body.qms-list-page .metric-card:hover,
body.qms-list-page .metric-card:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--ink);
  text-decoration: none;
}

body.qms-list-page .metric-card span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.qms-list-page .metric-card strong {
  color: var(--heading);
  font-size: 1.45rem;
  line-height: 1.05;
}

body.qms-list-page .metric-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.25;
}

body.qms-list-page .compact-metrics .metric-card {
  min-height: 70px;
  padding: 10px 12px;
}

@media (max-width: 760px) {
  body.qms-list-page .page-heading .asset-page-heading-row > .toolbar-actions,
  body.qms-list-page .page-heading .list-page-heading-row > .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.qms-list-page .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  body.qms-list-page .metric-grid {
    grid-template-columns: 1fr;
  }
}

.qt360-iq-profile-badge {
  display: block;
  margin-bottom: 5px;
  color: var(--qt-secondary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}

/* QT360 IQ uses the application navy/blue palette; yellow remains reserved
   for the primary action and status accents. */
.qt360-iq-launch{background:linear-gradient(135deg,#1d4776,#356b9e);box-shadow:0 14px 34px rgba(29,71,118,.28)}
.qt360-iq-panel-head{background:linear-gradient(135deg,#1b416d,#326493)}
.qt360-iq-context{background:#f4f7fb;border-bottom-color:#dfe7f0}
.qt360-iq-context strong,.qt360-iq-mode label,.qt360-iq-more-prompts summary{color:#1d4776}
.qt360-iq-messages{background:#f8fafc}
.qt360-iq-message.assistant{background:#eef3f8;color:#193c5d;border:1px solid #dbe6f0}
.qt360-iq-message.user{background:#2d6093;color:#fff}
.qt360-iq-report-link,.qt360-iq-form button{background:#2d6093}
.qt360-iq-report-link:hover{background:#1d4776}
.qt360-iq-form{border-top-color:#dfe7f0;background:#fff}
.qt360-iq-form textarea:focus,.qt360-iq-mode select:focus{border-color:#4c83ba;box-shadow:0 0 0 3px rgba(76,131,186,.16);outline:0}

/* Login color-flow refinement: keep the logo blue, while the surrounding UI
   uses the QT360 teal system so the page reads as one connected surface. */
.login-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(46, 104, 117, .28), transparent 30%),
    radial-gradient(circle at 92% 88%, rgba(199, 149, 45, .12), transparent 25%),
    linear-gradient(135deg, #0b2633 0%, #174a5b 52%, #102f3b 100%);
}

.login-shell {
  border-color: rgba(190, 225, 230, .2);
  box-shadow: 0 30px 90px rgba(4, 20, 28, .38), inset 0 1px rgba(255, 255, 255, .14);
}

.login-brand {
  background: linear-gradient(145deg, #174a5b 0%, #153f4e 56%, #102d3a 100%);
}

.login-card {
  background: #ffffff;
  border-left: 1px solid #d7e3e5;
}

.login-card > span,
.login-card h2 {
  color: #174a5b;
}

.login-card label {
  color: #294b56;
}

.login-card input {
  border-color: #c3d1e8;
  background: #f3f6fc;
  color: #1b3153;
  box-shadow: inset 0 1px 2px rgba(16, 43, 75, .04);
}

.login-card input:focus {
  border-color: #316fce;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(49, 111, 206, .18);
}

.login-card button {
  border-color: #174a5b;
  background: linear-gradient(135deg, #174a5b 0%, #2e6875 100%);
  box-shadow: 0 10px 20px rgba(23, 74, 91, .24);
}

.login-page .login-card button:hover,
.login-page .login-card button:focus-visible {
  border-color: #123c4a;
  background: #174a5b !important;
  box-shadow: 0 12px 24px rgba(23, 74, 91, .3) !important;
}

.login-security-note {
  border-top-color: #d7e3e5;
  color: #5b6875;
}

/* QT360 IQ shared assistant surface. */
.qt360-iq-launch{position:fixed;right:24px;bottom:24px;z-index:1200;border:0;border-radius:999px;background:linear-gradient(135deg,var(--qt-primary),var(--qt-secondary));color:#fff;box-shadow:0 14px 34px rgba(23,74,91,.28);padding:12px 18px;display:flex;align-items:center;gap:9px;font-weight:800;cursor:pointer}.qt360-iq-orbit{display:grid;place-items:center;width:22px;height:22px;border:1px solid rgba(255,255,255,.6);border-radius:50%;font-size:13px}.qt360-iq-panel{position:fixed;right:24px;bottom:78px;z-index:1199;width:min(390px,calc(100vw - 32px));max-height:min(650px,calc(100vh - 110px));display:flex;flex-direction:column;background:#fff;border:1px solid #dbe3e7;border-radius:18px;box-shadow:0 22px 55px rgba(21,42,52,.22);overflow:hidden}.qt360-iq-panel[hidden]{display:none}.qt360-iq-panel-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;background:linear-gradient(135deg,var(--qt-primary),var(--qt-secondary));color:#fff}.qt360-iq-panel-head strong,.qt360-iq-panel-head small{display:block}.qt360-iq-panel-head small{opacity:.78;margin-top:3px;font-size:11px}.qt360-iq-panel-head-actions{display:flex;align-items:center;gap:8px}.qt360-iq-connection{display:inline-flex;align-items:center;max-width:170px;padding:5px 8px;border:1px solid rgba(255,255,255,.35);border-radius:999px;color:#fff;font-size:10px;font-weight:800;line-height:1.15;text-align:center}.qt360-iq-connection[data-state="connected"]{background:#d5f5e5;color:#14532d;border-color:#a7e4be}.qt360-iq-connection[data-state="configured_local"],.qt360-iq-connection[data-state="local_only"]{background:#fff4c2;color:#694d00;border-color:#f2d36a}.qt360-iq-connection[data-state="not_configured"],.qt360-iq-connection[data-state="unavailable"],.qt360-iq-connection[data-state="blocked"]{background:#ffe0df;color:#7f1d1d;border-color:#f2aaa7}.qt360-iq-close{border:0;background:transparent;color:#fff;font-size:25px;line-height:1;cursor:pointer}.qt360-iq-context{padding:11px 18px;border-bottom:1px solid #edf1f2;background:#f7f9fa}.qt360-iq-context span,.qt360-iq-context small{display:block;color:var(--qt-neutral);font-size:11px}.qt360-iq-context strong{display:block;color:var(--qt-primary);font-size:13px;margin:3px 0}.qt360-iq-mode{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;padding:9px 14px;border-bottom:1px solid #edf1f2;background:#fff}.qt360-iq-mode label{font-size:11px;font-weight:800;color:var(--qt-primary);align-self:center}.qt360-iq-mode select{min-width:0;border:1px solid #cbd8dc;border-radius:7px;padding:7px;font:inherit;font-size:11px}.qt360-iq-mode small{grid-column:1/-1;color:var(--qt-neutral);font-size:10px}.qt360-iq-suggestions{display:flex;gap:6px;padding:10px 14px;overflow:auto}.qt360-iq-suggestions button{white-space:nowrap;border:1px solid #cddbe0;background:#fff;border-radius:999px;color:var(--qt-primary);font-size:11px;padding:7px 10px;cursor:pointer}.qt360-iq-more-prompts{border-bottom:1px solid #edf1f2;background:#fff;padding:0 14px 6px}.qt360-iq-more-prompts summary{cursor:pointer;color:var(--qt-primary);font-size:11px;font-weight:800;padding:6px 0;list-style:none}.qt360-iq-more-prompts summary::-webkit-details-marker{display:none}.qt360-iq-more-prompts summary::after{content:'＋';float:right;font-size:14px}.qt360-iq-more-prompts[open] summary::after{content:'−'}.qt360-iq-suggestions-more{padding:4px 0 2px;flex-wrap:wrap;overflow:visible}.qt360-iq-messages{padding:8px 14px;overflow:auto;min-height:160px;flex:1;background:#fbfcfc}.qt360-iq-message{max-width:90%;border-radius:12px;padding:10px 12px;margin:7px 0;font-size:13px;line-height:1.42}.qt360-iq-message.assistant{background:#eaf1f3;color:#173b47}.qt360-iq-message.user{margin-left:auto;background:var(--qt-primary);color:#fff}.qt360-iq-report-link{display:inline-block;margin-top:8px;padding:8px 11px;border-radius:9px;background:var(--qt-primary);color:#fff;text-decoration:none;font-weight:800;font-size:12px}.qt360-iq-report-link:hover{background:var(--qt-secondary)}.qt360-iq-form{display:flex;align-items:flex-end;gap:8px;padding:12px 14px;border-top:1px solid #edf1f2}.qt360-iq-form textarea{min-width:0;min-height:66px;max-height:180px;flex:1;resize:vertical;border:1px solid #cbd8dc;border-radius:10px;padding:10px 11px;font:inherit;line-height:1.35}.qt360-iq-form button{border:0;border-radius:10px;background:var(--qt-primary);color:#fff;font-weight:700;padding:12px 14px}.qt360-iq-footnote{padding:0 14px 12px;color:var(--qt-neutral);font-size:10px}

/* QT360 branded sign-in: deep navy, glass surfaces, and a subtle technical grid. */
.login-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 40px 28px;
  background: radial-gradient(circle at 10% 12%, rgba(49,111,206,.24), transparent 30%), radial-gradient(circle at 88% 86%, rgba(199,149,45,.1), transparent 25%), radial-gradient(circle at 72% 18%, rgba(108,146,222,.16), transparent 24%), linear-gradient(135deg, #091b30 0%, #102f52 52%, #162f4c 100%);
}
.login-page::before { position:absolute; inset:-20%; z-index:-1; content:""; opacity:.3; background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px); background-size:54px 54px; transform:perspective(700px) rotateX(58deg) translateY(18%); transform-origin:center bottom; }
.login-page::after { position:absolute; top:12%; right:-8%; z-index:-1; width:360px; height:360px; content:""; border:1px solid rgba(143,181,239,.2); border-radius:50%; box-shadow:0 0 0 26px rgba(143,181,239,.035),0 0 0 52px rgba(143,181,239,.025); }
.login-shell { position:relative; gap:0; width:min(1120px,calc(100vw - 56px)); min-height:650px; overflow:hidden; border:1px solid rgba(170,198,235,.22); border-radius:28px; background:rgba(9,27,48,.46); box-shadow:0 30px 90px rgba(2,13,28,.42),inset 0 1px rgba(255,255,255,.14); backdrop-filter:blur(18px); }
.login-brand,.login-card { border:0; border-radius:0; box-shadow:none; }
.login-brand { position:relative; min-height:650px; padding:52px; color:#fff; background:linear-gradient(145deg,#102b4b 0%,#174a78 56%,#122d4d 100%); }
.login-brand::before { position:absolute; top:0; left:52px; width:110px; height:3px; content:""; border-radius:0 0 4px 4px; background:linear-gradient(90deg,#6f9cff,#c8d0dc,#316fce); }
.login-brand::after { position:absolute; right:-110px; bottom:-130px; width:360px; height:360px; content:""; border:1px solid rgba(255,255,255,.12); border-radius:50%; box-shadow:0 0 0 22px rgba(255,255,255,.025),0 0 0 44px rgba(255,255,255,.02); }
.login-logo-frame { position:relative; z-index:1; min-height:310px; }
.login-logo-frame picture { display:block; }
.login-brand img { width:min(390px,78%); filter:drop-shadow(0 24px 24px rgba(0,0,0,.3)); }
.login-brand>span { position:relative; z-index:1; color:#c9d8ef; letter-spacing:.15em; }
.login-brand h1 { position:relative; z-index:1; color:#fff; font-size:clamp(2.15rem,4vw,3.35rem); letter-spacing:-.035em; }
.login-brand>p { position:relative; z-index:1; color:rgba(236,248,250,.76); }
.login-card { align-self:stretch; padding:52px 42px; background:#ffffff; border-left:1px solid #d7e3e5; }
.login-card>span { color:#244da8; letter-spacing:.13em; }
.login-card h2 { color:#173b6d; font-size:2.15rem; letter-spacing:-.03em; }
.login-page .login-card button { border-color:#244da8 !important; background:linear-gradient(135deg,#244da8 0%,#316fce 100%) !important; color:#fff !important; box-shadow:0 10px 20px rgba(36,77,168,.24) !important; }

/* Small motion moments keep the screen feeling alive without turning the
   secure sign-in surface into a distracting animated advertisement. */
.login-page {
  background-size: 135% 135%, 135% 135%, 135% 135%, 100% 100%;
  animation: qt360-login-ambient 18s ease-in-out infinite alternate;
}

.login-page::after {
  animation: qt360-login-orbit 26s linear infinite;
  transform-origin: 50% 50%;
}

.login-brand::before {
  animation: qt360-login-accent 4.5s ease-in-out infinite;
}

.login-brand::after {
  animation: qt360-login-ring 9s ease-in-out infinite;
}

.login-brand img {
  animation: qt360-login-logo 6s ease-in-out infinite;
}

.login-card {
  animation: qt360-login-card .75s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes qt360-login-ambient {
  from { background-position: 0% 0%, 100% 100%, 80% 8%, 0 0; }
  to { background-position: 7% 4%, 92% 91%, 67% 17%, 0 0; }
}

@keyframes qt360-login-orbit {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.04); }
}

@keyframes qt360-login-accent {
  0%, 100% { opacity: .82; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.2); }
}

@keyframes qt360-login-ring {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: .72; }
  50% { transform: translate3d(-12px, -8px, 0) scale(1.04); opacity: 1; }
}

@keyframes qt360-login-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes qt360-login-card {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .login-page,
  .login-page::after,
  .login-brand::before,
  .login-brand::after,
  .login-brand img,
  .login-card {
    animation: none;
  }
}
@media (max-width:720px) {
  .login-page {
    min-height: 100svh;
    align-items: start;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: linear-gradient(145deg, #0b2633 0%, #174a5b 58%, #102f3b 100%);
    animation: none;
  }

  .login-page::before,
  .login-page::after,
  .login-brand::before,
  .login-brand::after {
    display: none;
  }

  .login-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 520px;
    min-height: auto;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 18px 46px rgba(4, 20, 28, .3);
  }

  .login-card {
    order: -1;
    align-self: stretch;
    padding: 24px 20px 22px;
  }

  .login-card h2 {
    font-size: 1.8rem;
  }

  .login-intro {
    margin-bottom: 18px;
  }

  .login-card input {
    min-height: 46px;
    font-size: 16px;
  }

  .login-card button {
    min-height: 48px;
  }

  .login-brand {
    order: 1;
    min-height: auto;
    padding: 20px 18px 22px;
  }

  .login-logo-frame {
    display: grid;
    min-height: 150px;
    place-items: center;
  }

  .login-brand img {
    width: min(190px, 65%);
    animation: none;
  }

  .login-brand h1 {
    margin-top: 10px;
    font-size: clamp(1.75rem, 8vw, 2rem);
  }

  .login-brand > p {
    margin-top: 11px;
    font-size: .9rem;
    line-height: 1.45;
  }
}

/* Page company context remains a neutral selector even when it is placed
   inside an action group whose ordinary links use the green action color. */
body.qms-app-page a.company-switch-chip.page-company-context {
  flex: 0 1 220px;
  width: min(220px, 100%);
  max-width: 220px;
  border-color: #b7c3d1 !important;
  background: #ffffff !important;
  color: #2457a7 !important;
  box-shadow: none !important;
}

body.qms-app-page a.company-switch-chip.page-company-context span {
  color: #687587 !important;
}

body.qms-app-page a.company-switch-chip.page-company-context strong {
  color: #2457a7 !important;
}

body.qms-app-page a.company-switch-chip.page-company-context:hover,
body.qms-app-page a.company-switch-chip.page-company-context:focus-visible {
  border-color: #9fb9dc !important;
  background: #e9f0fb !important;
  color: #2457a7 !important;
  transform: none;
}

@media (min-width: 1101px) {
  .page-heading.has-inline-company-context .form-actions,
  .page-heading.has-inline-company-context .page-heading-actions,
  .page-heading.has-inline-company-context .heading-actions,
  .page-heading.has-inline-company-context .page-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }
}

@media (max-width: 900px) {
  body.qms-app-page a.company-switch-chip.page-company-context {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
  }
}

@media print {
  .page-company-context,
  .page-company-context-row {
    display: none !important;
  }
}

/* Controlled annual audit output: fit the complete 12-month matrix on landscape paper. */
@media print {
  @page {
    size: landscape;
    margin: .32in;
  }

  body.internal-audit-plan-page {
    min-width: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.internal-audit-plan-page .skip-link,
  body.internal-audit-plan-page .audit-print-hide,
  body.internal-audit-plan-page .topbar,
  body.internal-audit-plan-page footer {
    display: none !important;
  }

  body.internal-audit-plan-page main.container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.internal-audit-plan-page .audit-plan-preview {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.internal-audit-plan-page .audit-preview-header,
  body.internal-audit-plan-page .audit-preview-meta {
    break-inside: avoid;
  }

  body.internal-audit-plan-page .audit-plan-preview > h3 {
    margin: 7pt 0 3pt;
    break-after: avoid;
    color: #111827 !important;
    font-size: 9pt;
  }

  body.internal-audit-plan-page .audit-plan-preview > h3:nth-of-type(4) {
    break-before: page;
    margin-top: 0;
  }

  body.internal-audit-plan-page .audit-plan-preview > p {
    margin: 0 0 5pt;
    color: #253247 !important;
    font-size: 7.5pt;
    line-height: 1.3;
  }

  body.internal-audit-plan-page .audit-plan-preview .data-table-wrap {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
    border: .6pt solid #9ca8b8 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }

  body.internal-audit-plan-page .audit-matrix-table,
  body.internal-audit-plan-page .audit-matrix-table.compact {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    background: #ffffff !important;
  }

  body.internal-audit-plan-page .audit-matrix-table thead {
    display: table-header-group;
  }

  body.internal-audit-plan-page .audit-matrix-table tr {
    break-inside: avoid;
  }

  body.internal-audit-plan-page .audit-matrix-table th,
  body.internal-audit-plan-page .audit-matrix-table td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    padding: 2.4pt 1.5pt !important;
    overflow: visible !important;
    border: .45pt solid #c7d0dc !important;
    background: #ffffff !important;
    color: #172033 !important;
    font-size: 6.2pt !important;
    line-height: 1.15 !important;
    text-align: center;
    white-space: nowrap !important;
  }

  body.internal-audit-plan-page .audit-matrix-table th {
    background: #e5eaf1 !important;
    font-size: 6.5pt !important;
    font-weight: 800;
  }

  body.internal-audit-plan-page .audit-matrix-table th:first-child,
  body.internal-audit-plan-page .audit-matrix-table td:first-child {
    width: 21% !important;
    padding-left: 3pt !important;
    text-align: left;
    white-space: normal !important;
  }

  body.internal-audit-plan-page .audit-matrix-table th:nth-child(2),
  body.internal-audit-plan-page .audit-matrix-table td:nth-child(2) {
    width: 7% !important;
  }

  body.internal-audit-plan-page .audit-matrix-table th:nth-child(n+3),
  body.internal-audit-plan-page .audit-matrix-table td:nth-child(n+3) {
    width: 6% !important;
  }

  body.internal-audit-plan-page .audit-summary-process strong {
    color: #172033 !important;
    font-size: 6.5pt !important;
    line-height: 1.15;
  }

  body.internal-audit-plan-page .audit-summary-process small {
    margin-top: 1pt;
    color: #58677d !important;
    font-size: 5.4pt !important;
    line-height: 1.1;
  }

  body.internal-audit-plan-page .audit-summary-status span {
    display: inline-flex;
    gap: 1.5pt;
    align-items: center;
    justify-content: center;
    color: #5f4100 !important;
    font-size: 5.7pt !important;
    font-weight: 800;
    white-space: nowrap;
  }

  body.internal-audit-plan-page .audit-summary-status span::before {
    width: 3.5pt;
    height: 3.5pt;
    flex: 0 0 3.5pt;
  }

  body.internal-audit-plan-page .audit-summary-status.is-completed span {
    color: #14532d !important;
  }
}

/* List command navigation: compact subheader tabs patterned after the approved QT360 reference. */
body.qms-app-page .module-tabs.list-command-tabs {
  --command-tabs-bar: #4b6f9f;
  --command-tabs-tab: #385f91;
  --command-tabs-hover: #4777ad;
  --command-tabs-active: #173e73;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 9px 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #365b8b;
  border-radius: 6px 6px 2px 2px;
  background: var(--command-tabs-bar);
  box-shadow: 0 8px 20px rgba(24, 32, 68, .16);
  scrollbar-color: #9bb8dc #365b8b;
  scrollbar-width: thin;
  white-space: nowrap;
}

body.qms-app-page .module-tabs.list-command-tabs .module-tab {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 7px 13px 8px;
  border: 1px solid rgba(213, 221, 255, .14);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: var(--command-tabs-tab);
  color: #eef2ff !important;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .005em;
  box-shadow: none;
}

body.qms-app-page .module-tabs.list-command-tabs .module-tab:hover,
body.qms-app-page .module-tabs.list-command-tabs .module-tab:focus-visible {
  border-color: rgba(229, 235, 255, .34);
  background: var(--command-tabs-hover);
  color: #ffffff !important;
}

body.qms-app-page .module-tabs.list-command-tabs .module-tab:focus-visible {
  outline: 2px solid #a8c7ff;
  outline-offset: -3px;
}

body.qms-app-page .module-tabs.list-command-tabs .module-tab.active,
body.qms-app-page .module-tabs.list-command-tabs .module-tab[aria-current="page"] {
  border-color: var(--command-tabs-active);
  background: var(--command-tabs-active);
  color: #ffffff !important;
  box-shadow: inset 0 -3px 0 #9bb8ff;
}

body.qms-app-page .module-tabs.list-command-tabs .module-tab > span {
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
}

@media (max-width: 700px) {
  body.qms-app-page .module-tabs.list-command-tabs {
    padding-inline: 8px;
  }

  body.qms-app-page .module-tabs.list-command-tabs .module-tab {
    min-height: 34px;
    padding-inline: 11px;
  }
}

.matrix-scope-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.matrix-scope-chips button { display: inline-flex; align-items: center; gap: 4px; min-height: 23px; padding: 3px 6px; border: 1px solid #cbd8ea; border-radius: 999px; background: #f4f7fc; color: #536783; cursor: pointer; font-size: 9px; line-height: 1; }
.matrix-scope-chips button:hover,
.matrix-scope-chips button:focus-visible { border-color: #7ca1e6; background: #edf3ff; color: #254ea4; outline: none; }
.matrix-scope-chips button strong { color: inherit; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.matrix-scope-chips button span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  .audit-summary-filter,
  .audit-matrix-scope-filter { width: 100%; }
  .audit-summary-filter label,
  .audit-matrix-scope-filter label { flex: 1 1 180px; }
  .audit-summary-filter select,
  .audit-matrix-scope-filter select { width: 100%; }
}

/* Tracked maintenance request intake */
.qms-list-page .qt360-request-launcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  padding: 16px 18px;
  border: 1px solid #cbd8e8;
  background: linear-gradient(135deg, #f8fbff 0%, #edf4ff 100%);
}
.qt360-request-launcher-copy { min-width: 0; }
.qt360-request-kicker { display: inline-flex; align-items: center; gap: 6px; color: #3158a8; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.qt360-request-kicker .qt360-icon { width: 15px; height: 15px; }
.qt360-request-launcher h2 { margin: 5px 0 3px; color: #1b2f58; font-size: 1.12rem; }
.qt360-request-launcher p { margin: 0; color: #667995; font-size: .78rem; line-height: 1.35; }
.qt360-request-add-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 7px; min-height: 38px; padding: 8px 14px; border: 1px solid #244da8; border-radius: 8px; background: #244da8; color: #fff; font-size: .78rem; font-weight: 850; cursor: pointer; box-shadow: 0 7px 16px rgba(36, 77, 168, .18); }
.qt360-request-add-button:hover, .qt360-request-add-button:focus-visible { background: #193b87; border-color: #193b87; }
.qt360-request-add-button .qt360-icon { width: 16px; height: 16px; }
.qt360-request-modal-backdrop { z-index: 1300; }
.qt360-request-modal { width: min(760px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border: 1px solid #cbd8e8; border-radius: 16px; background: #f8fbff; box-shadow: 0 28px 80px rgba(11, 28, 65, .32); }
.qt360-request-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 24px 17px; color: #fff; background: linear-gradient(135deg, #142653 0%, #274b9c 100%); }
.qt360-request-modal-header .qt360-request-kicker { color: #b9d0ff; }
.qt360-request-modal-header h2 { margin: 5px 0 5px; color: #fff; font-size: 1.35rem; line-height: 1.1; }
.qt360-request-modal-header p { max-width: 600px; margin: 0; color: #d6e3ff; font-size: .76rem; line-height: 1.4; }
.qt360-request-modal-header .qt360-modal-close { border-radius: 8px; }
.qt360-request-modal-header .qt360-modal-close .qt360-icon { width: 16px; height: 16px; }
.qt360-request-form { padding: 0; }
.qt360-request-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 22px 24px; }
.qt360-request-fields label { display: grid; min-width: 0; gap: 6px; }
.qt360-request-fields label > span { color: #43526d; font-size: .72rem; font-weight: 850; }
.qt360-request-fields input, .qt360-request-fields select, .qt360-request-fields textarea { width: 100%; box-sizing: border-box; border: 1px solid #cbd7e8; border-radius: 8px; background: #fff; color: #1c2d51; font-size: .82rem; }
.qt360-request-fields input, .qt360-request-fields select { min-height: 39px; padding: 0 10px; }
.qt360-request-fields textarea { min-height: 112px; padding: 10px; resize: vertical; }
.qt360-request-fields input:focus, .qt360-request-fields select:focus, .qt360-request-fields textarea:focus { border-color: #4c75e8; box-shadow: 0 0 0 3px rgba(76,117,232,.14); outline: none; }
.qt360-request-field-wide { grid-column: 1 / -1; }
.qt360-request-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 24px; border-top: 1px solid #dbe4f0; background: #fff; }
.qt360-request-trace-note { display: inline-flex; align-items: center; gap: 6px; color: #657792; font-size: .7rem; font-weight: 750; }
.qt360-request-trace-note .qt360-icon { width: 15px; height: 15px; color: #168b83; }
.qt360-request-modal-footer .form-actions { display: flex; align-items: center; gap: 7px; margin: 0; }
.qt360-request-modal-footer .form-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 12px; font-size: .76rem; }
.qt360-request-modal-footer .form-actions .qt360-icon { width: 14px; height: 14px; }

/* Keep maintenance review commands together; generic form buttons otherwise
   render with the full-page size and leave an awkward empty-looking leading
   segment in the narrow Actions column. */
.qms-list-page td.actions-cell {
  width: 150px;
  min-width: 150px;
}
.qms-list-page td.actions-cell .maintenance-review-action-form {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
  width: max-content;
}
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.primary {
  border-color: #f5c400;
  background: #f5c400;
  color: #071735;
}
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.danger {
  border-color: #efb2aa !important;
  background: #fff1f0 !important;
  color: #b42318 !important;
}
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.primary:hover,
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.primary:focus-visible {
  border-color: #ffd84a;
  background: #ffd84a;
}
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.danger:hover,
.qms-list-page td.actions-cell .maintenance-review-action-form .qt-list-action-button.danger:focus-visible {
  border-color: #d46b60;
  background: #ffe2df;
}
@media (max-width: 700px) {
  .qms-list-page .qt360-request-launcher { align-items: flex-start; flex-direction: column; }
  .qt360-request-add-button { width: 100%; }
  .qt360-request-fields { grid-template-columns: 1fr; padding: 18px; }
  .qt360-request-field-wide { grid-column: auto; }
  .qt360-request-modal-header { padding: 18px; }
  .qt360-request-modal-footer { align-items: flex-start; flex-direction: column; padding: 13px 18px; }
  .qt360-request-modal-footer .form-actions { width: 100%; justify-content: flex-end; }
}

/* Compact list filters: keep the work area visible while preserving every control. */
.qms-list-page .qt360-list-control-bar {
  display: grid;
  grid-template-columns: minmax(130px, .34fr) minmax(180px, .56fr) minmax(220px, 1fr) auto auto auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d7e0ed;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5fa 100%);
  box-shadow: 0 5px 16px rgba(31, 53, 84, .06);
}

.qms-list-page .qt360-list-control-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #344b69;
  font-size: .75rem;
  font-weight: 750;
}

.qms-list-page .qt360-list-control-bar select,
.qms-list-page .qt360-list-control-bar input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
}

.qms-list-page .qt360-list-control-bar .button-link {
  min-height: 40px;
  box-sizing: border-box;
  align-self: end;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .qms-list-page .qt360-list-control-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qms-list-page .qt360-list-control-bar .qt360-list-filter-value {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .qms-list-page .qt360-list-control-bar {
    grid-template-columns: 1fr;
  }
  .qms-list-page .qt360-list-control-bar .qt360-list-filter-value {
    grid-column: auto;
  }
  .qms-list-page .qt360-list-control-bar .button-link {
    width: 100%;
  }
}

/* Template-first work-order launch flow. */
.qt360-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 24, 54, .68);
  backdrop-filter: blur(4px);
}

.qt360-start-wo-modal {
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #cdd8e8;
  border-radius: 22px;
  background: #f8fbff;
  box-shadow: 0 28px 80px rgba(11, 28, 65, .32);
}

.qt360-start-wo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 20px;
  color: #fff;
  background: linear-gradient(135deg, #152958 0%, #243f8d 100%);
}

.qt360-start-wo-header h2 {
  margin: 5px 0 5px;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1.1;
}

.qt360-start-wo-header p {
  max-width: 610px;
  margin: 0;
  color: #d7e3ff;
  font-size: .86rem;
}

.qt360-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a9c5ff;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.qt360-modal-kicker .qt360-icon {
  width: 14px;
  height: 14px;
}

.qt360-modal-close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}

.qt360-modal-close:hover,
.qt360-modal-close:focus-visible {
  background: rgba(255,255,255,.2);
}

.qt360-modal-close .qt360-icon { width: 17px; height: 17px; }

.qt360-start-wo-form { padding: 0; }

.qt360-start-wo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr);
}

.qt360-start-wo-fields,
.qt360-start-wo-side {
  padding: 24px 28px;
}

.qt360-start-wo-side {
  border-left: 1px solid #dbe4f0;
  background: #f2f6fc;
}

.qt360-start-wo-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.qt360-start-wo-section-heading strong,
.qt360-start-wo-section-heading small {
  display: block;
}

.qt360-start-wo-section-heading strong {
  color: #1b2b52;
  font-size: .88rem;
  font-weight: 900;
}

.qt360-start-wo-section-heading small {
  margin-top: 3px;
  color: #6e7e98;
  font-size: .72rem;
  line-height: 1.35;
}

.qt360-section-icon {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e5edff;
  color: #3158e3;
}

.qt360-section-icon.accent { background: #e5f7f4; color: #168b83; }
.qt360-section-icon.purple { background: #f0eaff; color: #7546c7; }
.qt360-section-icon .qt360-icon { width: 16px; height: 16px; }

.qt360-start-wo-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 14px;
}

.qt360-start-wo-fields > .qt360-start-wo-section-heading,
.qt360-start-wo-field-wide,
.qt360-template-summary {
  grid-column: 1 / -1;
}

.qt360-start-wo-modal label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.qt360-start-wo-modal label > span {
  color: #43526d;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .02em;
}

.qt360-start-wo-modal input,
.qt360-start-wo-modal select,
.qt360-start-wo-modal textarea {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid #cbd7e8;
  border-radius: 9px;
  background: #fff;
  color: #1c2d51;
  font-size: .8rem;
}

.qt360-start-wo-modal input,
.qt360-start-wo-modal select { padding: 0 10px; }
.qt360-start-wo-modal textarea { padding: 9px 10px; resize: vertical; }
.qt360-start-wo-modal input:focus,
.qt360-start-wo-modal select:focus,
.qt360-start-wo-modal textarea:focus { border-color: #4c75e8; box-shadow: 0 0 0 3px rgba(76,117,232,.14); outline: none; }

.qt360-start-wo-help {
  color: #687a99;
  font-size: .7rem;
  line-height: 1.35;
}

.warning-text { color: #a15c00; }

.qt360-template-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px dashed #b8c9e5;
  border-radius: 9px;
  background: #f2f6ff;
  color: #5d6d88;
  font-size: .72rem;
}

.qt360-template-summary .qt360-icon { width: 15px; height: 15px; color: #3158e3; }

.qt360-qr-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 11px;
  border: 1px solid #b9cbe9;
  border-radius: 10px;
  background: #fff;
  color: #2449a8;
  font-size: .77rem;
  font-weight: 850;
  cursor: pointer;
}

.qt360-qr-button:hover,
.qt360-qr-button:focus-visible { border-color: #6f93e6; background: #f4f7ff; }
.qt360-qr-button .qt360-icon { width: 17px; height: 17px; }
.qt360-qr-button small { margin-left: auto; color: #7786a1; font-size: .64rem; font-weight: 700; }

.qt360-asset-preview {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  min-height: 94px;
  margin-top: 12px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #183367;
  border-radius: 13px;
  background: #102655;
  color: #fff;
}

.qt360-asset-preview-art {
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #d9e6ff, #a7bfe9);
  color: #1f4080;
}

.qt360-asset-preview-art .qt360-icon { width: 28px; height: 28px; }
.qt360-asset-preview-copy { min-width: 0; padding-right: 4px; }
.qt360-asset-preview-copy strong,
.qt360-asset-preview-copy small,
.qt360-asset-preview-copy span { display: block; }
.qt360-asset-preview-copy strong { overflow: hidden; color: #fff; font-size: .81rem; text-overflow: ellipsis; white-space: nowrap; }
.qt360-asset-preview-copy small { margin-top: 3px; color: #b7c9eb; font-size: .66rem; }
.qt360-asset-preview-copy span { margin-top: 7px; color: #d6e0f7; font-size: .68rem; line-height: 1.35; }
.qt360-asset-status { position: absolute; right: 10px; bottom: 9px; color: #91e0bf; font-size: .63rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.qt360-asset-preview.is-alert .qt360-asset-status { color: #ffad9f; }
.qt360-asset-preview.is-alert { border-color: #a84842; background: #3a1b30; }

.assignee-heading { margin-top: 24px; }

.qt360-start-wo-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #c8d7ee;
  border-radius: 10px;
  background: #e9f1ff;
  color: #39537d;
  font-size: .68rem;
  line-height: 1.4;
}

.qt360-start-wo-notice .qt360-icon { width: 15px; height: 15px; color: #3158e3; }

.qt360-start-wo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 28px;
  border-top: 1px solid #dbe4f0;
  background: #fff;
}

.qt360-start-wo-footer > div { display: flex; align-items: center; gap: 8px; }
.qt360-start-wo-safe-note { display: inline-flex; align-items: center; gap: 6px; color: #63728c; font-size: .68rem; font-weight: 800; }
.qt360-start-wo-safe-note .qt360-icon { width: 14px; height: 14px; color: #168b83; }
.qt360-start-wo-submit { display: inline-flex; align-items: center; gap: 7px; }
.qt360-start-wo-submit .qt360-icon { width: 15px; height: 15px; }
.qt360-start-wo-submit:disabled { cursor: not-allowed; opacity: .5; }
body.qt360-modal-open { overflow: hidden; }
.qt360-start-wo-notice.is-alert { border-color: #e4b3ad; background: #fff0ed; color: #8f3026; }
.qt360-start-wo-notice.is-alert .qt360-icon { color: #b42318; }

.qt360-qr-scanner {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #b9cbe9;
  border-radius: 11px;
  background: #fff;
}

.qt360-qr-scanner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #213762;
  font-size: .74rem;
}

.qt360-qr-scanner-head button {
  border: 0;
  background: transparent;
  color: #63728c;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.qt360-qr-scanner video {
  display: block;
  width: 100%;
  max-height: 180px;
  border-radius: 8px;
  background: #081633;
  object-fit: cover;
}

.qt360-qr-scanner small {
  display: block;
  margin-top: 7px;
  color: #6e7e98;
  font-size: .66rem;
}

@media (max-width: 720px) {
  .qt360-modal-backdrop { padding: 10px; }
  .qt360-start-wo-modal { max-height: calc(100vh - 20px); border-radius: 16px; }
  .qt360-start-wo-header,
  .qt360-start-wo-fields,
  .qt360-start-wo-side,
  .qt360-start-wo-footer { padding-left: 17px; padding-right: 17px; }
  .qt360-start-wo-grid { grid-template-columns: 1fr; }
  .qt360-start-wo-side { border-top: 1px solid #dbe4f0; border-left: 0; }
}

@media (max-width: 480px) {
  .qt360-start-wo-fields { grid-template-columns: 1fr; }
  .qt360-start-wo-fields > .qt360-start-wo-section-heading,
  .qt360-start-wo-field-wide,
  .qt360-template-summary { grid-column: auto; }
  .qt360-start-wo-footer { align-items: flex-start; flex-direction: column; }
  .qt360-start-wo-footer > div { width: 100%; justify-content: flex-end; }
}

/* QT360 functional icon language — shared by navigation, lists, statuses, and actions. */
.qt360-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  vertical-align: -0.14em;
  line-height: 1;
}

.qt360-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-label,
.qms-dropdown-menu a,
.topbar-utility-link,
.user-dropdown-menu a,
.qt360-icon-button-label,
.qt360-page-title,
.status-badge {
  display: inline-flex;
  align-items: center;
}

.nav-label,
.qms-dropdown-menu a,
.user-dropdown-menu a,
.topbar-utility-link {
  gap: 7px;
}

.nav-label > .qt360-icon,
.qms-dropdown-menu a > .qt360-icon,
.user-dropdown-menu a > .qt360-icon {
  width: 15px;
  height: 15px;
  opacity: .82;
}

.main-nav > a > .qt360-icon,
.topbar-utility-link > .qt360-icon {
  width: 16px;
  height: 16px;
}

.qt360-icon-button-label { gap: 6px; }
.qt360-icon-button-label > .qt360-icon { width: 14px; height: 14px; }
.qt360-page-title { gap: 9px; }

.qt360-title-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd8ec;
  border-radius: 8px;
  background: #eef4ff;
  color: #3158e3;
}

.qt360-title-icon .qt360-icon { width: 15px; height: 15px; }
.status-badge { gap: 5px; }
.status-badge > .qt360-icon { width: 13px; height: 13px; stroke-width: 2; }
.qt360-color-flag { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px rgba(255, 255, 255, .52); }
.qt360-flag-badge { gap: 5px; }
.status-danger > .qt360-icon { color: #b42318; }
.status-warning > .qt360-icon { color: #a15c00; }
.status-closed > .qt360-icon { color: #18794e; }
.status-open > .qt360-icon { color: #3158e3; }
.status-danger > .qt360-color-flag { background: #d04444; }.status-warning > .qt360-color-flag { background: #d99820; }.status-closed > .qt360-color-flag { background: #2ea45d; }.status-open > .qt360-color-flag { background: #416fd7; }
.qt360-action-view > .qt360-icon,
.qt360-action-edit > .qt360-icon { width: 13px; height: 13px; }

@media (max-width: 640px) {
  .qt360-icon-button-label > span:not(.qt360-icon) { display: none; }
  .qt360-icon-button-label { min-width: 34px; justify-content: center; }
}

/* Sharper controls and content blocks */
body.qms-app-page .page-heading,
body.qms-app-page .hero,
body.qms-app-page .panel,
body.qms-app-page .clause-card,
body.qms-app-page .module-clause-card,
body.qms-app-page .record-field-panel,
body.qms-app-page .attachment-panel,
body.qms-app-page .upload-box,
body.qms-app-page .company-brand-card,
body.qms-app-page .metric-card,
body.qms-app-page .notification-summary-card,
body.qms-app-page .quick-action-list a,
body.qms-app-page .file-list-row {
  border-radius: 10px;
}

body.qms-app-page .button-link,
body.qms-app-page .form-actions a,
body.qms-app-page .toolbar-actions a,
body.qms-app-page button:not(.mobile-nav-toggle),
body.qms-app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.qms-app-page select,
body.qms-app-page textarea,
body.qms-app-page .brief-card-heading a,
body.qms-app-page .actions-cell a,
body.qms-app-page .link-button {
  border-radius: 5px;
}

body.qms-app-page .data-table-wrap,
body.qms-app-page .table-wrap,
body.qms-app-page .record-field-panel-heading {
  border-radius: 6px;
}

body.qms-app-page .page-heading,
body.qms-app-page .hero,
body.qms-app-page .panel,
body.qms-app-page .clause-card,
body.qms-app-page .module-clause-card,
body.qms-app-page .record-field-panel,
body.qms-app-page .attachment-panel,
body.qms-app-page .upload-box,
body.qms-app-page .company-brand-card,
body.qms-app-page .metric-card,
body.qms-app-page .notification-summary-card,
body.qms-app-page .quick-action-list a,
body.qms-app-page .file-list-row {
  border-radius: 6px;
}

body.qms-app-page .button-link,
body.qms-app-page .form-actions a,
body.qms-app-page .toolbar-actions a,
body.qms-app-page button:not(.mobile-nav-toggle),
body.qms-app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.qms-app-page select,
body.qms-app-page textarea,
body.qms-app-page .brief-card-heading a,
body.qms-app-page .actions-cell a,
body.qms-app-page .link-button {
  border-radius: 3px;
}

body.qms-app-page .record-field-panel-grid input[type="date"],
body.qms-app-page .record-edit-form input[type="date"] {
  width: 150px;
  max-width: 100%;
  min-height: 36px;
  padding: 7px 9px;
}

body.qms-app-page .form-actions button:not(.secondary),
body.qms-app-page .form-actions button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card):not(.secondary) {
  border-color: #198754 !important;
  background: #198754 !important;
  color: #ffffff !important;
  box-shadow: 0 9px 20px rgba(25, 135, 84, .18) !important;
}

body.qms-app-page .form-actions button:not(.secondary):hover,
body.qms-app-page .form-actions button:not(.mobile-nav-toggle):not(.link-button):not(.company-switch-card):not(.secondary):hover {
  border-color: #146c43 !important;
  background: #146c43 !important;
  color: #ffffff !important;
}

/* Neutral slate revision with green add/save actions */
body.qms-app-page {
  --primary: #316fce;
  --primary-strong: #2457a7;
  --primary-soft: #e9f0fb;
  --accent: #4d9bd6;
  --ink: #273548;
  --heading: #172b4d;
  --muted: #687587;
  --subtle: #8b97a6;
  --border: #d1d9e3;
  --border-strong: #b7c3d1;
  --surface: #f4f6f8;
  --surface-soft: #eceff3;
  --page: #e9edf1;
  --shadow-sm: 0 7px 18px rgba(29, 43, 62, .08);
  --shadow-md: 0 18px 44px rgba(29, 43, 62, .1);
  background: radial-gradient(circle at 88% -8%, rgba(89, 113, 145, .1), transparent 34rem), var(--page);
}

html:has(body.qms-app-page) {
  background: var(--page);
}

body.qms-app-page .topbar {
  border-bottom-color: #d1d9e3;
  background: rgba(244, 246, 248, .96);
  box-shadow: 0 8px 24px rgba(29, 43, 62, .07);
}

body.qms-app-page .brand,
body.qms-app-page .brand-name,
body.qms-app-page .main-nav > a,
body.qms-app-page .nav-dropdown > summary,
body.qms-app-page .topbar-utility-link,
body.qms-app-page .user-menu-button,
body.qms-app-page .user-menu-button strong {
  color: #273548;
}

body.qms-app-page .page-heading,
body.qms-app-page .hero,
body.qms-app-page .panel,
body.qms-app-page .clause-card,
body.qms-app-page .module-clause-card,
body.qms-app-page .record-field-panel,
body.qms-app-page .attachment-panel,
body.qms-app-page .upload-box,
body.qms-app-page .company-brand-card,
body.qms-app-page .metric-card,
body.qms-app-page .notification-summary-card,
body.qms-app-page .quick-action-list a,
body.qms-app-page .file-list-row {
  border-color: #d1d9e3;
  background: #f4f6f8;
  color: #273548;
  box-shadow: var(--shadow-md);
}

body.qms-app-page .page-heading h1,
body.qms-app-page .panel-heading h2,
body.qms-app-page .panel-heading h3,
body.qms-app-page .brief-card-heading h3,
body.qms-app-page .report-title-row h2,
body.qms-app-page label > span,
body.qms-app-page .record-field-panel-heading h2 {
  color: #172b4d;
}

body.qms-app-page .page-heading p,
body.qms-app-page .panel-heading p,
body.qms-app-page .report-title-row p,
body.qms-app-page .muted,
body.qms-app-page label small,
body.qms-app-page footer,
body.qms-app-page .page-help-grid li,
body.qms-app-page .page-help-grid p {
  color: #687587;
}

body.qms-app-page .tenant-pill,
body.qms-app-page .secondary,
body.qms-app-page .brief-card-heading a {
  border-color: #b7c3d1 !important;
  background: #eceff3 !important;
  color: #2457a7 !important;
}

body.qms-app-page .button-link:not(.secondary),
body.qms-app-page .form-actions a:not(.secondary),
body.qms-app-page .form-actions button:not(.secondary),
body.qms-app-page .toolbar-actions a:not(.secondary) {
  border-color: #198754;
  background: #198754;
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(25, 135, 84, .18);
}

body.qms-app-page .button-link:not(.secondary):hover,
body.qms-app-page .form-actions a:not(.secondary):hover,
body.qms-app-page .form-actions button:not(.secondary):hover,
body.qms-app-page .toolbar-actions a:not(.secondary):hover {
  border-color: #146c43;
  background: #146c43;
  color: #ffffff;
}

body.qms-app-page .search-form button,
body.qms-app-page .toolbar .search-form button {
  border-color: #316fce !important;
  background: #316fce !important;
  color: #ffffff !important;
  box-shadow: 0 9px 20px rgba(49, 111, 206, .16) !important;
}

body.qms-app-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
body.qms-app-page select,
body.qms-app-page textarea {
  border-color: #b7c3d1;
  background: #fbfcfd;
  color: #273548;
}

body.qms-app-page input:focus,
body.qms-app-page select:focus,
body.qms-app-page textarea:focus {
  border-color: #4d9bd6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(77, 155, 214, .17);
}

body.qms-app-page .data-table-wrap,
body.qms-app-page .table-wrap {
  border-color: #d1d9e3;
  background: #eceff3;
}

body.qms-app-page table {
  background: #f4f6f8;
}

body.qms-app-page th,
body.qms-app-page td {
  border-bottom-color: #dbe1e8;
  color: #334155;
}

body.qms-app-page th {
  background: #e3e8ee;
  color: #475569;
}

body.qms-app-page tbody tr:hover td {
  background: #eef3f8;
}

body.qms-app-page .empty-state,
body.qms-app-page .module-tabs,
body.qms-app-page .workflow-panel,
body.qms-app-page .toolbar,
body.qms-app-page .record-heading-state,
body.qms-app-page .module-help-bar {
  border-color: #d1d9e3;
  background: #eceff3;
}

body.qms-app-page .module-tab,
body.qms-app-page .back-link,
body.qms-app-page a {
  color: #2457a7;
}

body.qms-app-page .module-tab.active {
  border-color: #9fb9dc;
  background: #e4ecf8;
  color: #2457a7;
}

body.qms-app-page .record-field-panel-heading {
  border-bottom-color: #d1d9e3;
  background: #e3e8ee;
}

body.qms-app-page .record-field-panel-heading > span {
  border-color: #b7c3d1;
  background: #f4f6f8;
  color: #2457a7;
}

body.qms-app-page .record-field-panel-grid label {
  border-right-color: #dbe1e8;
  border-bottom-color: #dbe1e8;
}

/* Dashboard command-center alignment */
body.qms-app-page .qt360-role-title,
body.qms-app-page .qt360-role-status,
body.qms-app-page .qt360-side,
body.qms-app-page .qt360-kpi,
body.qms-app-page .qt360-panel,
body.qms-app-page .qt360-control-card {
  border-color: #d1d9e3 !important;
  border-radius: 6px !important;
  background: #f4f6f8 !important;
  color: #273548 !important;
  box-shadow: var(--shadow-sm) !important;
}

body.qms-app-page .qt360-role-title h1,
body.qms-app-page .qt360-role-status strong,
body.qms-app-page .qt360-side h2,
body.qms-app-page .qt360-panel h3,
body.qms-app-page .qt360-kpi strong {
  color: #172b4d !important;
}

body.qms-app-page .qt360-role-title p,
body.qms-app-page .qt360-role-status span,
body.qms-app-page .qt360-side p,
body.qms-app-page .qt360-kpi span,
body.qms-app-page .qt360-kpi small,
body.qms-app-page .qt360-control-card small,
body.qms-app-page .qt360-note-row small,
body.qms-app-page .qt360-metric-row span,
body.qms-app-page .qt360-alert small {
  color: #687587 !important;
}

body.qms-app-page .qt360-kpi:nth-child(1) { border-top: 3px solid #316fce !important; }
body.qms-app-page .qt360-kpi:nth-child(2) { border-top: 3px solid #198754 !important; }
body.qms-app-page .qt360-kpi:nth-child(3) { border-top: 3px solid #d39e00 !important; }
body.qms-app-page .qt360-kpi:nth-child(4) { border-top: 3px solid #7b8798 !important; }

body.qms-app-page .qt360-kpi strong,
body.qms-app-page .qt360-control-card b,
body.qms-app-page .qt360-metric-row strong,
body.qms-app-page .qt360-alert .count {
  color: #2457a7 !important;
}

body.qms-app-page .qt360-side-nav a {
  border-color: #d1d9e3 !important;
  border-radius: 3px !important;
  background: #fbfcfd !important;
  color: #273548 !important;
}

body.qms-app-page .qt360-side-nav a:hover {
  border-color: #9fb9dc !important;
  background: #e9f0fb !important;
}

body.qms-app-page .qt360-panel-head a,
body.qms-app-page .qt360-panel a,
body.qms-app-page .qt360-alert,
body.qms-app-page .qt360-metric-row a {
  color: #2457a7 !important;
}

body.qms-app-page .qt360-alert,
body.qms-app-page .qt360-note-row,
body.qms-app-page .qt360-metric-row,
body.qms-app-page .qt360-control-card {
  border-bottom-color: #dbe1e8 !important;
}

body.qms-app-page .qt360-control-card.high,
body.qms-app-page .qt360-control-card.critical {
  background: #f8f5ed !important;
}

body.qms-app-page .actions-cell a,
body.qms-app-page .link-button {
  border-color: #b7c3d1;
  background: #e9f0fb;
  color: #2457a7;
}

body.qms-app-page .actions-cell a:hover,
body.qms-app-page .link-button:hover {
  border-color: #9fb9dc;
  background: #dce8f7;
}

body.qms-app-page .danger-link,
body.qms-app-page .danger-link:hover {
  border-color: #efb2aa;
  background: #fff1f0;
  color: #b42318;
}
