:root {
  --olive: #5f6f3e;
  --olive-dark: #3f4a2a;
  --sage: #9aaa7a;
  --sage-light: #dbe4c6;
  --beige: #d9c7a3;
  --cream: #f8f3e8;
  --warm-brown: #8a633f;
  --brown-dark: #5b3f2c;
  --charcoal: #2f332d;
  --muted: #737568;
  --line: #e5dccb;
  --white: #fffdf8;
  --danger: #a44734;
  --success: #537b49;
  --shadow: 0 20px 45px rgba(63, 74, 42, 0.14);
  --soft-shadow: 0 10px 24px rgba(47, 51, 45, 0.09);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.rating-method-field[hidden] {
  display: none !important;
}

.rating-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid rgba(95, 111, 62, 0.24);
  border-radius: 999px;
  background: rgba(248, 253, 246, 0.95);
  color: var(--olive-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.rating-chip.stars,
.rating-chip.warning {
  color: #8a5a00;
  background: #fff8e6;
  border-color: rgba(138, 90, 0, 0.24);
}

.rating-chip.danger {
  color: #9f1d1d;
  background: #fff0f0;
  border-color: rgba(159, 29, 29, 0.25);
}

.star-rating-label {
  display: grid;
  gap: 8px;
}

.star-rating-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 42px;
}

.star-rating-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(47, 51, 45, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #c9c2ad;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.star-rating-button:hover,
.star-rating-button:focus-visible {
  color: #e3a300;
  background: rgba(255, 246, 209, 0.55);
  border-color: rgba(227, 163, 0, 0.45);
  transform: translateY(-1px);
}

.star-rating-button.is-preview {
  color: #e3a300;
  background: rgba(255, 246, 209, 0.7);
  border-color: rgba(227, 163, 0, 0.55);
}

.star-rating-button.is-selected {
  color: #ffffff;
  background: #ffc400;
  border-color: #e39d00;
  box-shadow: 0 6px 14px rgba(255, 196, 0, 0.34);
}

.star-rating-clear {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.star-rating-clear:hover,
.star-rating-clear:focus-visible {
  color: var(--danger);
  border-color: rgba(164, 71, 52, 0.32);
  background: #fff0ec;
}

.assessment-injected-rating-fields {
  display: contents;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.assessment-csa-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--olive-dark);
}

.assessment-csa-header h1 {
  margin: 2px 0 4px;
}

.assessment-csa-header p {
  margin: 2px 0;
}

.assessment-evaluator-logo {
  width: 96px;
  max-height: 80px;
  object-fit: contain;
}

.assessment-signature {
  display: block;
  width: 150px;
  max-height: 64px;
  object-fit: contain;
  margin: 10px auto 0;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(219, 228, 198, 0.72), rgba(248, 243, 232, 0.92)),
    var(--cream);
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.app-shell,
.main-column,
.view,
.panel,
.summary-card,
.module-template-card,
.stage-card,
.table-wrap {
  min-width: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(63, 74, 42, 0.9), rgba(95, 111, 62, 0.76)),
    var(--beige);
}

.auth-panel {
  width: min(430px, 100%);
  padding: 30px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--olive-dark);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark span {
  font-size: 0.9rem;
}

.brand-mark small {
  display: none;
}

.brand-mark.small {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warm-brown);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 1.62rem;
  line-height: 1.16;
  text-align: center;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h4 {
  margin-bottom: 0;
  font-size: 1rem;
}

.auth-copy {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.auth-form,
.modal-form,
.form-grid {
  display: grid;
  gap: 14px;
}

.auth-location {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-switch {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.auth-switch button {
  padding: 4px 2px;
  color: var(--warm-brown);
  background: transparent;
  border: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--brown-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.password-field input {
  border-radius: 12px 0 0 12px;
}

.password-toggle {
  position: relative;
  width: 46px;
  min-width: 46px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #fbf7ef;
  color: var(--olive-dark);
}

.password-toggle::before,
.password-toggle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.password-toggle::before {
  width: 20px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.password-toggle::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.password-toggle.hidden-password::after {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--danger);
  transform: translate(-50%, -50%) rotate(-38deg);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 4px rgba(95, 111, 62, 0.16);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
}

.primary-btn {
  color: var(--cream);
  background: var(--olive-dark);
  box-shadow: 0 8px 18px rgba(63, 74, 42, 0.22);
}

.secondary-btn {
  color: var(--olive-dark);
  background: var(--sage-light);
}

.ghost-btn {
  color: var(--olive-dark);
  background: transparent;
  border: 1px solid var(--line);
}

.danger-btn {
  color: var(--cream);
  background: var(--danger);
}

.full-width {
  width: 100%;
}

.app-shell {
  --sidebar-width: 280px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns 0.22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  color: var(--cream);
  background: linear-gradient(180deg, var(--olive-dark), #59673a);
  overflow: hidden;
  transition: padding 0.22s ease, opacity 0.18s ease;
}

.sidebar-resize-handle {
  position: absolute;
  inset: 0 -5px 0 auto;
  z-index: 2;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}

.sidebar-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 3px;
  height: 56px;
  background: rgba(248, 243, 232, 0.38);
  border-radius: 999px;
  transform: translateY(-50%);
  transition: background 0.18s ease, width 0.18s ease;
}

.sidebar-resize-handle:hover::before,
.sidebar-resize-handle:focus-visible::before,
.is-resizing-sidebar .sidebar-resize-handle::before {
  width: 4px;
  background: var(--cream);
}

.is-resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(248, 243, 232, 0.08);
}

.sidebar-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(248, 243, 232, 0.72);
  font-size: 0.82rem;
}

.nav-list,
.mobile-nav {
  display: grid;
  gap: 8px;
}

.sidebar .nav-list {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  padding-bottom: 18px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(248, 243, 232, 0.36) transparent;
}

.sidebar .nav-list::-webkit-scrollbar {
  width: 8px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
  background: rgba(248, 243, 232, 0.34);
  border-radius: 999px;
}

.nav-section-label {
  margin: 12px 10px 2px;
  color: rgba(248, 243, 232, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: inherit;
  text-align: left;
  background: rgba(248, 243, 232, 0.04);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--olive-dark);
  background: var(--cream);
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--olive-dark);
  background: var(--sage-light);
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 900;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-link.is-active .nav-icon,
.nav-link:hover .nav-icon {
  color: var(--cream);
  background: var(--olive-dark);
}

.nav-link-admin {
  color: var(--olive-dark);
  background: var(--cream);
  border: 1px solid rgba(248, 243, 232, 0.3);
}

.nav-link-admin .nav-icon {
  color: var(--cream);
  background: var(--warm-brown);
}

.main-column {
  position: relative;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.topbar > div:not(.topbar-actions) {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.role-badge {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--olive-dark);
  background: var(--sage-light);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.role-badge[data-role="administrator"] {
  color: var(--cream);
  background: var(--olive-dark);
}

.mobile-nav {
  display: none;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  gap: 4px;
  background: var(--sage-light);
  border: 0;
  border-radius: 12px;
}

.icon-btn span {
  width: 18px;
  height: 2px;
  background: var(--olive-dark);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-heading,
.panel-heading,
.detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.compact-filter {
  min-width: min(100%, 240px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.compact-filter select {
  margin-top: 5px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--charcoal);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.section-subtitle,
.detail-helper {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.plan-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.plan-guide article {
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(237, 226, 204, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--soft-shadow);
}

.plan-guide strong,
.item-card-label {
  display: block;
  color: var(--olive-dark);
  font-weight: 900;
}

.plan-guide span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.item-card-label {
  margin-bottom: 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.permission-panel {
  margin: 0;
  padding: 16px 18px;
  color: var(--charcoal);
  background: var(--sage-light);
  border-bottom: 1px solid var(--line);
}

.permission-panel strong {
  display: block;
  margin-bottom: 5px;
  color: var(--olive-dark);
}

.permission-panel p {
  margin: 0;
  color: var(--muted);
}

.permission-matrix {
  border-bottom: 1px solid var(--line);
}

.permission-matrix input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--olive);
}

.admin-panel-stack {
  margin-top: 18px;
}

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

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.notification-item.is-unread {
  border-color: rgba(95, 111, 62, 0.36);
  box-shadow: inset 4px 0 0 var(--olive);
}

.notification-item p {
  margin: 4px 0;
  color: var(--charcoal);
}

.notification-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-role-select {
  width: min(100%, 190px);
  min-height: 38px;
  padding: 8px 10px;
  color: var(--charcoal);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
}

.admin-role-select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.admin-create-form {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
}

.admin-create-form strong {
  display: block;
  color: var(--olive-dark);
}

.admin-create-form p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-create-form input,
.admin-create-form select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.muted-action {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.profile-field {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.profile-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-field strong {
  color: var(--charcoal);
  overflow-wrap: anywhere;
}

.hr-workspace-panel {
  display: grid;
  gap: 16px;
}

.dashboard-split,
.attendance-panel {
  margin-top: 18px;
}

.workspace-task-dashboard {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.task-metric-grid {
  margin-bottom: 4px;
}

.workspace-task-dashboard .summary-grid.mini,
#sopDashboardCards.summary-grid.mini {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 10px;
}

.workspace-task-dashboard .summary-card,
#sopDashboardCards .summary-card {
  min-height: 96px;
  padding: 12px;
}

.workspace-task-dashboard .summary-card strong,
#sopDashboardCards .summary-card strong {
  font-size: clamp(1.28rem, 3vw, 1.85rem);
}

.attendance-toolbar {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  margin-bottom: 14px;
}

.inline-actions {
  align-self: end;
  margin: 0;
}

.hr-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.hr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 16px;
  align-items: start;
}

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

.employee-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.employee-card.is-selected {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(95, 111, 62, 0.12);
}

.employee-card strong,
.employee-card span,
.employee-card small {
  display: block;
}

.employee-card span,
.employee-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.employee-card-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.employee-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--olive-dark);
  border-radius: 50%;
  font-weight: 900;
}

.employee-avatar.large {
  width: 58px;
  height: 58px;
}

.employee-profile-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.employee-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.employee-profile-head h4,
.employee-profile-head p {
  margin: 0;
}

.employee-profile-head p {
  color: var(--muted);
  font-size: 0.86rem;
}

.employee-tabs {
  display: grid;
  gap: 12px;
}

.employee-tabs section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.employee-tabs h5 {
  margin: 0;
  color: var(--olive-dark);
  font-size: 0.86rem;
}

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

.timeline-list article {
  padding: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.timeline-list strong,
.timeline-list span,
.timeline-list small {
  display: block;
}

.timeline-list span,
.timeline-list small {
  color: var(--muted);
  font-size: 0.78rem;
}

.setup-list {
  display: grid;
  gap: 18px;
}

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

.setup-group h4 {
  margin: 0;
  color: var(--olive-dark);
}

.setup-group button {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--charcoal);
  text-align: left;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
}

.industry-setup p {
  margin: 0;
  color: var(--muted);
}

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

.suggested-module {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.suggested-module.is-active {
  border-color: rgba(83, 123, 73, 0.35);
  box-shadow: inset 4px 0 0 var(--success);
}

.suggested-module strong {
  color: var(--olive-dark);
}

.suggested-module span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.suggested-module .table-actions button {
  width: auto;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.summary-grid.mini {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

.summary-card,
.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.sop-library-section,
.sop-summary-section {
  border-left: 4px solid rgba(95, 111, 62, 0.44);
}

.sop-summary-section {
  border-left-color: rgba(164, 92, 64, 0.56);
  background: linear-gradient(180deg, rgba(244, 235, 216, 0.78), rgba(255, 255, 255, 0.96));
}

.summary-card {
  padding: 18px;
  border-radius: 12px;
  overflow: hidden;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  color: var(--olive-dark);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

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

.modules-panel {
  margin-bottom: 18px;
}

.dashboard-charts-panel {
  margin-bottom: 18px;
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.chart-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.chart-card header {
  min-width: 0;
}

.chart-card header strong {
  display: block;
  color: var(--olive-dark);
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bar-chart {
  min-height: 190px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  align-items: end;
  gap: 10px;
}

.bar-chart-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.bar-chart-track {
  width: min(100%, 46px);
  height: 120px;
  display: flex;
  align-items: end;
  overflow: hidden;
  background: rgba(219, 228, 198, 0.58);
  border: 1px solid rgba(95, 111, 62, 0.14);
  border-radius: 999px 999px 10px 10px;
}

.bar-chart-track span {
  width: 100%;
  background: linear-gradient(180deg, var(--olive-dark), var(--sage));
  border-radius: inherit;
}

.bar-chart-item strong {
  color: var(--olive-dark);
  font-size: 0.9rem;
}

.bar-chart-item small {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.donut-chart-wrap {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 14px;
}

.donut-chart {
  width: min(180px, 100%);
  justify-self: center;
}

.donut-bg,
.donut-segment {
  fill: none;
  stroke-width: 14;
}

.donut-bg {
  stroke: rgba(219, 228, 198, 0.72);
}

.donut-segment {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.donut-chart text:first-of-type {
  fill: var(--olive-dark);
  font-size: 1rem;
  font-weight: 900;
}

.donut-chart text:last-of-type {
  fill: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.line-chart-wrap {
  display: grid;
  gap: 8px;
}

.line-chart {
  width: 100%;
  min-height: 150px;
  padding: 8px;
  background:
    linear-gradient(rgba(95, 111, 62, 0.08) 1px, transparent 1px),
    var(--white);
  background-size: 100% 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.line-chart polyline {
  fill: none;
  stroke: var(--olive-dark);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart circle {
  fill: var(--warm-brown);
  stroke: var(--white);
  stroke-width: 2;
}

.line-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  justify-content: center;
  width: 100%;
}

.chart-legend span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.chart-legend strong {
  color: var(--olive-dark);
}

.chart-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
}

.chart-error {
  color: var(--danger);
  border-color: rgba(164, 71, 52, 0.32);
}

.chart-color-0 {
  stroke: var(--olive-dark);
  background: var(--olive-dark);
}

.chart-color-1 {
  stroke: var(--sage);
  background: var(--sage);
}

.chart-color-2 {
  stroke: var(--warm-brown);
  background: var(--warm-brown);
}

.chart-color-3 {
  stroke: var(--danger);
  background: var(--danger);
}

.chart-color-4 {
  stroke: #557f9f;
  background: #557f9f;
}

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

.stage-card {
  overflow: hidden;
  background: #eef3e4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.stage-card header {
  position: relative;
  z-index: 1;
  padding: 11px 12px;
  color: var(--cream);
  background: var(--olive-dark);
  font-weight: 800;
  text-align: center;
}

.stage-card header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.stage-body {
  margin-top: -1px;
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 26px 18px 18px;
  background: #eef3e4;
  text-align: center;
}

.stage-body strong {
  color: var(--charcoal);
  font-size: 1.05rem;
}

.stage-body span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.stage-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  color: var(--olive-dark);
}

.check-icon {
  border-radius: 50%;
  background: var(--olive-dark);
}

.check-icon::before {
  content: "";
  width: 30px;
  height: 16px;
  border-left: 8px solid var(--cream);
  border-bottom: 8px solid var(--cream);
  transform: rotate(-45deg) translate(3px, -2px);
}

.clock-icon {
  border: 6px solid var(--olive-dark);
  border-radius: 50%;
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  background: var(--olive-dark);
  border-radius: 999px;
}

.clock-icon {
  position: relative;
}

.clock-icon::before {
  width: 5px;
  height: 20px;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
}

.clock-icon::after {
  width: 18px;
  height: 5px;
  left: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.flag-icon {
  position: relative;
}

.flag-icon::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 7px;
  width: 5px;
  height: 54px;
  background: var(--olive-dark);
}

.flag-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 9px;
  width: 34px;
  height: 24px;
  background:
    linear-gradient(45deg, var(--cream) 25%, transparent 25%),
    linear-gradient(-45deg, var(--cream) 25%, transparent 25%),
    var(--olive-dark);
  background-size: 12px 12px;
  border: 2px solid var(--olive-dark);
}

.ring {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--olive-dark) var(--progress), var(--sage-light) 0);
}

.ring span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--charcoal);
  background: var(--cream);
  border-radius: 50%;
  font-weight: 800;
}

.content-grid,
.plans-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-split {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  align-items: start;
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.compact-table table {
  min-width: 560px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--brown-dark);
  background: #f0e6d5;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.45;
}

td strong {
  overflow-wrap: anywhere;
}

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

.selected-row td {
  background: rgba(219, 228, 198, 0.36);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--olive-dark);
  background: var(--sage-light);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.status-pill.warning {
  color: var(--brown-dark);
  background: #f3d58f;
}

.progress-list {
  display: grid;
  gap: 15px;
}

.progress-item {
  display: grid;
  gap: 8px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.progress-head span {
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  background: var(--sage-light);
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  width: var(--width);
  background: linear-gradient(90deg, var(--olive-dark), var(--sage));
  border-radius: inherit;
}

.progress-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.module-template-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.operational-card {
  position: relative;
  overflow: hidden;
}

.operational-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sage);
}

.operational-card.success::before {
  background: var(--success);
}

.operational-card.warning::before {
  background: #d8a53b;
}

.operational-card.danger::before {
  background: var(--danger);
}

.operational-card.info::before {
  background: #557f9f;
}

.module-template-card strong {
  color: var(--olive-dark);
}

.module-template-card span,
.module-template-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.module-template-card span {
  font-weight: 800;
}

.module-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.module-card-header strong {
  display: block;
}

.module-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: var(--olive-dark);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.module-metrics {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.module-metrics b {
  display: block;
  color: var(--charcoal);
  font-size: 1.2rem;
}

.module-kpi-ring {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--cream) 0 56%, transparent 57%),
    conic-gradient(var(--olive-dark) var(--progress), var(--sage-light) 0);
}

.module-kpi-ring span {
  color: var(--olive-dark);
  font-size: 0.92rem;
}

.mini-progress {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--sage-light);
  border-radius: 999px;
}

.mini-progress i {
  display: block;
  width: var(--width);
  height: 100%;
  background: linear-gradient(90deg, var(--olive-dark), var(--sage));
  border-radius: inherit;
}

.module-info-grid,
.module-specific,
.module-monthly {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

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

.module-info-grid div,
.module-specific div,
.module-monthly div,
.module-schedule,
.module-people {
  padding: 10px;
  background: rgba(219, 228, 198, 0.28);
  border: 1px solid rgba(95, 111, 62, 0.12);
  border-radius: 12px;
}

.module-info-grid span,
.module-specific span,
.module-monthly span,
.module-schedule span,
.module-people span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.module-info-grid strong,
.module-specific strong,
.module-monthly strong,
.module-schedule strong,
.module-people strong {
  display: block;
  margin-top: 4px;
  color: var(--charcoal);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

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

.module-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.module-activity {
  margin: 0;
  padding: 10px 12px;
  color: var(--charcoal);
  background: var(--cream);
  border: 1px dashed var(--beige);
  border-radius: 12px;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-actions button {
  flex: 1 1 120px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--white);
  background: var(--olive-dark);
  border: 1px solid var(--olive-dark);
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.module-actions button:hover {
  color: var(--white);
  background: var(--olive);
}

.module-actions .delete-action {
  color: var(--danger);
  background: var(--white);
  border-color: rgba(164, 71, 52, 0.28);
}

.module-actions .delete-action:hover {
  color: var(--cream);
  background: var(--danger);
}

.workspace-card-body {
  display: grid;
  gap: 10px;
}

.workspace-kpi,
.workspace-meta {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.workspace-kpi span,
.workspace-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-kpi strong,
.workspace-meta strong {
  display: block;
  margin-top: 5px;
  color: var(--charcoal);
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.actions-cell {
  width: 180px;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--olive-dark);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.table-actions .delete-action {
  color: var(--danger);
}

.details-panel {
  align-self: start;
}

.empty-state {
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list span {
  color: var(--muted);
  font-weight: 700;
}

.item-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  background: #fbf7ef;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.item-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(47, 51, 45, 0.55);
}

.modal {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--cream);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.modal-form {
  padding: 22px;
}

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

.form-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--olive-dark);
  background: var(--sage-light);
  border: 1px solid rgba(95, 111, 62, 0.2);
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.form-note.warning {
  color: var(--brown-dark);
  background: #f3e4c6;
  border-color: rgba(138, 99, 63, 0.24);
}

.form-note .ghost-btn {
  flex: 0 0 auto;
  background: var(--white);
}

.checkbox-field {
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(219, 228, 198, 0.24);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.checkbox-field input[type="hidden"] {
  display: none;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--olive);
}

.checkbox-field span {
  line-height: 1.25;
}

.page-notice {
  margin-bottom: 16px;
}

.page-notice:empty {
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.icon-close {
  width: 40px;
  height: 40px;
  color: var(--charcoal);
  background: var(--sage-light);
  border: 0;
  border-radius: 50%;
  font-size: 1.4rem;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 40px));
  padding: 14px 16px;
  color: var(--cream);
  background: var(--charcoal);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.print-area {
  display: none;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--olive-dark);
  background: rgba(248, 243, 232, 0.62);
  backdrop-filter: blur(2px);
  font-weight: 800;
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid var(--sage-light);
  border-top-color: var(--olive-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modern earthy default design system */
:root {
  --forest: #24392d;
  --forest-2: #31523d;
  --olive: #64723b;
  --olive-dark: #354326;
  --sage: #9baa7c;
  --sage-light: #e4ead8;
  --sage-soft: #f0f4e8;
  --beige: #d9c8aa;
  --sand: #eadcc4;
  --stone: #b9b2a5;
  --stone-soft: #ebe6dc;
  --cream: #f7f1e6;
  --off-white: #fffaf1;
  --warm-brown: #8b6041;
  --brown-dark: #4f3728;
  --terracotta: #a9583d;
  --clay: #ba7654;
  --copper: #a67645;
  --charcoal: #252a24;
  --muted: #6f7167;
  --line: #ded4c1;
  --white: #fffdf8;
  --danger: #a44734;
  --success: #4f7a45;
  --warning: #c59139;
  --info: #557f88;
  --shadow: 0 24px 70px rgba(37, 42, 36, 0.15);
  --soft-shadow: 0 14px 34px rgba(37, 42, 36, 0.08);
  --card-shadow: 0 10px 26px rgba(37, 42, 36, 0.065);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  --radius: 18px;
}

body {
  color: var(--charcoal);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.94), rgba(244, 237, 223, 0.96)),
    var(--cream);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(36, 57, 45, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 57, 45, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
}

::selection {
  color: var(--off-white);
  background: var(--terracotta);
}

.auth-shell {
  background:
    linear-gradient(135deg, rgba(36, 57, 45, 0.96), rgba(53, 67, 38, 0.9)),
    var(--sand);
}

.auth-panel,
.topbar,
.summary-card,
.panel,
.module-template-card,
.stage-card,
.modal {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(222, 212, 193, 0.88);
  box-shadow: var(--card-shadow), var(--inner-glow);
}

.auth-panel {
  border-radius: 28px;
}

.brand-mark {
  background: linear-gradient(145deg, var(--forest), var(--olive-dark));
  box-shadow: 0 12px 24px rgba(36, 57, 45, 0.22);
}

.brand-mark.small {
  color: var(--forest);
  background: var(--off-white);
}

.eyebrow {
  color: var(--copper);
}

h1,
h2,
h3,
h4 {
  color: var(--forest);
  letter-spacing: 0;
}

input,
select,
textarea {
  color: var(--charcoal);
  background: rgba(255, 250, 241, 0.96);
  border-color: rgba(185, 178, 165, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(100, 114, 59, 0.5);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(100, 114, 59, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.table-actions button,
.module-actions button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.primary-btn {
  color: var(--off-white);
  background: linear-gradient(135deg, var(--forest), var(--olive-dark));
  box-shadow: 0 12px 26px rgba(36, 57, 45, 0.22);
}

.secondary-btn {
  color: var(--forest);
  background: linear-gradient(135deg, var(--sage-light), var(--sand));
  border: 1px solid rgba(100, 114, 59, 0.2);
}

.ghost-btn {
  color: var(--forest);
  background: rgba(255, 250, 241, 0.72);
  border-color: rgba(185, 178, 165, 0.7);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.table-actions button:hover,
.module-actions button:hover {
  transform: translateY(-1px);
}

.primary-btn:hover {
  box-shadow: 0 16px 30px rgba(36, 57, 45, 0.25);
}

.sidebar {
  background: linear-gradient(180deg, var(--forest), #2d4635 46%, var(--olive-dark));
  border-right: 1px solid rgba(255, 250, 241, 0.12);
  box-shadow: 18px 0 50px rgba(36, 57, 45, 0.12);
}

.sidebar-brand {
  background: rgba(255, 250, 241, 0.1);
  border: 1px solid rgba(255, 250, 241, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-section-label {
  color: rgba(255, 250, 241, 0.62);
}

.nav-link {
  background: rgba(255, 250, 241, 0.055);
  border: 1px solid transparent;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--forest);
  background: linear-gradient(135deg, var(--off-white), var(--sand));
  border-color: rgba(255, 250, 241, 0.24);
  box-shadow: 0 12px 24px rgba(20, 30, 24, 0.18);
}

.nav-icon {
  color: var(--forest);
  background: var(--sand);
}

.nav-link.is-active .nav-icon,
.nav-link:hover .nav-icon {
  color: var(--off-white);
  background: var(--terracotta);
}

.sidebar .nav-link-admin,
.mobile-nav .nav-link-admin {
  color: var(--forest);
  background: linear-gradient(135deg, var(--off-white), var(--sand));
  border-color: rgba(255, 250, 241, 0.36);
  box-shadow: 0 10px 22px rgba(20, 30, 24, 0.16);
}

.sidebar .nav-link-admin span:not(.nav-icon),
.mobile-nav .nav-link-admin span:not(.nav-icon) {
  color: var(--forest);
}

.sidebar .nav-link-admin .nav-icon,
.mobile-nav .nav-link-admin .nav-icon {
  color: var(--off-white);
  background: var(--terracotta);
}

.sidebar .nav-link-admin:hover,
.sidebar .nav-link-admin.is-active,
.mobile-nav .nav-link-admin:hover,
.mobile-nav .nav-link-admin.is-active {
  color: var(--off-white);
  background: linear-gradient(135deg, var(--terracotta), var(--copper));
}

.sidebar .nav-link-admin:hover span:not(.nav-icon),
.sidebar .nav-link-admin.is-active span:not(.nav-icon),
.mobile-nav .nav-link-admin:hover span:not(.nav-icon),
.mobile-nav .nav-link-admin.is-active span:not(.nav-icon) {
  color: var(--off-white);
}

.sidebar .nav-link-admin:hover .nav-icon,
.sidebar .nav-link-admin.is-active .nav-icon,
.mobile-nav .nav-link-admin:hover .nav-icon,
.mobile-nav .nav-link-admin.is-active .nav-icon {
  color: var(--forest);
  background: var(--off-white);
}

.main-column {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.24), rgba(235, 230, 220, 0.22));
}

.topbar {
  backdrop-filter: blur(14px);
}

.role-badge,
.status-pill {
  color: var(--forest);
  background: var(--sage-light);
  border: 1px solid rgba(100, 114, 59, 0.16);
}

.summary-card {
  position: relative;
  padding: 20px;
  border-radius: 18px;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--sage), var(--olive));
}

.summary-card.alert::before {
  background: linear-gradient(180deg, var(--terracotta), var(--danger));
}

.summary-card span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.summary-card strong {
  color: var(--forest);
  font-weight: 900;
}

.summary-card.alert strong {
  color: var(--terracotta);
}

.panel {
  border-radius: 22px;
}

.panel-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(222, 212, 193, 0.68);
}

.chart-card,
.workspace-kpi,
.workspace-meta,
.module-info-grid div,
.module-specific div,
.module-monthly div,
.module-schedule,
.module-people,
.item-card,
.profile-field,
.notification-item,
.suggested-module,
.employee-card,
.employee-profile-panel {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.96), rgba(247, 241, 230, 0.92));
  border-color: rgba(222, 212, 193, 0.82);
  box-shadow: var(--inner-glow);
}

.chart-card {
  border-radius: 16px;
}

.chart-color-0 {
  stroke: var(--forest);
  background: var(--forest);
}

.chart-color-1 {
  stroke: var(--olive);
  background: var(--olive);
}

.chart-color-2 {
  stroke: var(--terracotta);
  background: var(--terracotta);
}

.chart-color-3 {
  stroke: var(--copper);
  background: var(--copper);
}

.chart-color-4 {
  stroke: var(--info);
  background: var(--info);
}

.stage-card {
  background: var(--off-white);
  border-radius: 20px;
}

.stage-card header {
  background: linear-gradient(135deg, var(--forest), var(--olive-dark));
}

.stage-body {
  background: linear-gradient(180deg, var(--sage-soft), var(--off-white));
}

.check-icon {
  background: var(--forest);
}

.clock-icon {
  border-color: var(--forest);
}

.clock-icon::before,
.clock-icon::after,
.flag-icon::before {
  background: var(--forest);
}

.flag-icon::after {
  border-color: var(--forest);
  background:
    linear-gradient(45deg, var(--off-white) 25%, transparent 25%),
    linear-gradient(-45deg, var(--off-white) 25%, transparent 25%),
    var(--forest);
  background-size: 12px 12px;
}

.ring,
.module-kpi-ring {
  background:
    radial-gradient(circle at center, var(--off-white) 0 56%, transparent 57%),
    conic-gradient(var(--forest) var(--progress), var(--sage-light) 0);
}

.ring span {
  background: var(--off-white);
}

.module-template-card {
  border-radius: 18px;
}

.operational-card::before {
  width: 6px;
  background: var(--olive);
}

.operational-card.warning::before {
  background: var(--warning);
}

.operational-card.info::before {
  background: var(--info);
}

.module-icon {
  background: linear-gradient(145deg, var(--forest), var(--terracotta));
  box-shadow: 0 10px 20px rgba(36, 57, 45, 0.18);
}

.mini-progress,
.progress-track,
.bar-chart-track {
  background: var(--sage-light);
}

.mini-progress i,
.progress-fill,
.bar-chart-track span {
  background: linear-gradient(90deg, var(--forest), var(--olive), var(--clay));
}

.donut-bg {
  stroke: var(--sage-light);
}

.line-chart {
  background:
    linear-gradient(rgba(100, 114, 59, 0.08) 1px, transparent 1px),
    var(--off-white);
  background-size: 100% 38px;
}

.line-chart polyline {
  stroke: var(--forest);
}

.line-chart circle {
  fill: var(--terracotta);
}

.table-wrap {
  border: 1px solid rgba(222, 212, 193, 0.84);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--forest);
  background: linear-gradient(180deg, var(--sand), #e5d5bb);
  border-bottom: 1px solid rgba(100, 114, 59, 0.22);
}

td {
  background: rgba(255, 253, 248, 0.62);
}

tbody tr:nth-child(even) td {
  background: rgba(247, 241, 230, 0.72);
}

tbody tr:hover td {
  background: rgba(228, 234, 216, 0.72);
}

.table-actions button {
  color: var(--forest);
  background: var(--off-white);
  border-color: rgba(185, 178, 165, 0.78);
}

.table-actions button:hover {
  color: var(--off-white);
  background: var(--forest);
  border-color: var(--forest);
}

.table-actions .delete-action,
.module-actions .delete-action {
  color: var(--terracotta);
  background: #fff7ef;
  border-color: rgba(169, 88, 61, 0.28);
}

.table-actions .delete-action:hover,
.module-actions .delete-action:hover {
  color: var(--off-white);
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.modal-backdrop {
  background: rgba(27, 32, 27, 0.62);
  backdrop-filter: blur(8px);
}

.modal {
  background: var(--off-white);
  border: 1px solid rgba(255, 250, 241, 0.72);
}

.modal-header {
  background: rgba(255, 250, 241, 0.96);
  backdrop-filter: blur(10px);
}

.form-note,
.checkbox-field {
  background: var(--sage-soft);
}

.toast {
  background: var(--forest);
  border: 1px solid rgba(255, 250, 241, 0.18);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--terracotta);
}

/* Keep the modern earthy palette without forcing the app back into an older layout shape. */
.summary-card {
  padding: 18px;
}

.summary-card,
.module-template-card {
  border-radius: var(--radius);
}

.panel-heading {
  padding-bottom: 0;
  border-bottom: 0;
}

.table-wrap {
  border: 0;
  background: transparent;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

th {
  position: static;
  z-index: auto;
}

td {
  background: transparent;
}

tbody tr:nth-child(even) td {
  background: rgba(247, 241, 230, 0.46);
}

tbody tr:hover td {
  background: rgba(228, 234, 216, 0.54);
}

.stage-card {
  border-radius: var(--radius);
}

.module-template-card,
.chart-card,
.workspace-kpi,
.workspace-meta,
.profile-field,
.employee-card,
.suggested-module,
.notification-item {
  box-shadow: none;
}

@media (max-width: 1120px) {
  .summary-grid,
  .stage-grid,
  .dashboard-charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .admin-create-form > div,
  .admin-create-form button {
    grid-column: 1 / -1;
  }

  .content-grid,
  .plans-layout,
  .hr-layout {
    grid-template-columns: 1fr;
  }

  .plan-guide {
    grid-template-columns: 1fr;
  }

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

@media (min-width: 1121px) {
  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid > .summary-card:nth-child(n + 5) {
    grid-column: span 2;
  }

  .dashboard-charts-grid .chart-card:nth-child(3) {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    --sidebar-width: 0px;
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .sidebar-resize-handle {
    display: none;
  }

  .main-column {
    padding: 14px;
  }

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: -10px 0 18px;
    padding: 12px;
    color: var(--olive-dark);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
  }

  .mobile-nav .nav-link.is-active,
  .mobile-nav .nav-link:hover {
    background: var(--sage-light);
  }

  .hr-toolbar,
  .employee-card {
    grid-template-columns: 1fr;
  }

  .employee-card-meta {
    justify-items: start;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar > div:not(.topbar-actions) {
    flex-basis: calc(100% - 130px);
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-heading,
  .detail-title {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading .primary-btn,
  .section-heading .secondary-btn,
  .panel-heading .primary-btn,
  .panel-heading .secondary-btn {
    width: 100%;
  }

  .heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-create-form {
    grid-template-columns: 1fr;
  }

  .compact-filter {
    min-width: 0;
    width: 100%;
  }

  .table-actions,
  .form-actions {
    justify-content: stretch;
  }

  .table-actions button,
  .form-actions button {
    flex: 1 1 140px;
  }
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 24px;
    border-radius: var(--radius);
  }

  .auth-panel h1 {
    font-size: 1.48rem;
    line-height: 1.18;
  }

  .auth-copy {
    margin-bottom: 18px;
    font-size: 0.94rem;
  }

  .summary-grid,
  .stage-grid,
  .module-template-grid,
  .dashboard-charts-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .module-card-header,
  .module-metrics,
  .module-people {
    grid-template-columns: 1fr;
  }

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

  .topbar {
    padding: 14px;
    gap: 10px;
  }

  .topbar .secondary-btn {
    padding-inline: 12px;
  }

  .topbar > div:not(.topbar-actions) {
    flex-basis: 100%;
    order: 3;
  }

  .menu-toggle {
    order: 1;
  }

  .topbar-actions {
    width: 100%;
    order: 2;
    margin-left: 0;
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 auto;
  }

  .panel {
    padding: 12px;
  }

  .summary-card {
    padding: 14px;
  }

  .summary-card strong {
    font-size: 1.55rem;
  }

  .mobile-nav.is-open,
  .donut-chart-wrap,
  .module-info-grid,
  .module-specific,
  .module-monthly {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 620px;
  }

  .compact-table table {
    min-width: 520px;
  }

  .form-note {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px;
  }

  .modal-form,
  .modal-header {
    padding: 16px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  @page sop-summary {
    size: A4 landscape;
    margin: 8mm;
  }

  body {
    background: #fffdf8;
  }

  body > :not(.print-area) {
    display: none !important;
  }

  .print-area {
    display: block !important;
    color: #252a24;
    font-family: Arial, sans-serif;
  }

  .print-area h1 {
    margin: 0 0 8px;
    color: #24392d;
    font-size: 18px;
    text-align: left;
  }

  .print-area p {
    margin: 0 0 8px;
    color: #6f7167;
  }

  .print-area h2 {
    margin: 0 0 8px;
    color: #24392d;
    font-size: 16px;
  }

  .print-area h3 {
    margin: 10px 0 6px;
    color: #4f3728;
    font-size: 13px;
  }

  .print-area table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    background: #fffdf8;
    border: 1px solid #8f826f;
    font-size: 11px;
    table-layout: fixed;
  }

  .print-area th,
  .print-area td {
    padding: 8px;
    border: 1px solid #8f826f !important;
    background: #fffdf8 !important;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
  }

  .print-area th {
    position: static;
    color: #24392d;
    background: #e4ead8 !important;
  }

  .print-area tr:last-child td {
    border-bottom: 1px solid #8f826f !important;
  }

  .print-area thead {
    display: table-header-group;
  }

  .print-plan-group {
    break-inside: auto;
    page-break-inside: auto;
    margin-bottom: 8px;
  }

  .print-plan-group.page-break-after {
    break-after: auto;
    page-break-after: auto;
  }

  .plan-print h1 {
    font-size: 16px;
  }

  .plan-print p {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .plan-print table {
    font-size: 8px;
    line-height: 1.15;
  }

  .plan-print th,
  .plan-print td {
    padding: 3px 4px;
  }

  .print-meta-table {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 6px;
  }

  .print-meta-table th {
    width: 10%;
  }

  .sop-summary-print h1 {
    margin: 8px 0 8px;
    color: #111;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
  }

  .sop-summary-print .sop-summary-document {
    page: sop-summary;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 0;
    overflow: visible;
    break-after: auto;
    page-break-after: auto;
  }

  .sop-summary-print,
  .sop-summary-print * {
    box-sizing: border-box;
  }

  .sop-summary-print h2 {
    margin: 5px 0 2px;
    color: #111;
    font-size: 9px;
    break-after: avoid;
    page-break-after: avoid;
  }

  .sop-summary-print p {
    margin: 1px 0 2px;
    color: #111;
    font-size: 8px;
  }

  .sop-summary-print .document-control-table {
    margin-bottom: 3px;
    font-size: 8px;
    line-height: 1.12;
    table-layout: fixed;
  }

  .sop-summary-print .document-control-table th,
  .sop-summary-print .document-control-table td {
    padding: 2px 3px;
  }

  .sop-summary-print .document-logo-cell {
    width: 13%;
    text-align: center;
    vertical-align: middle;
  }

  .sop-summary-print .document-logo-cell img {
    max-width: 48px;
    max-height: 48px;
  }

  .sop-summary-print .document-logo-text {
    display: block;
    font-size: 8px;
    line-height: 1.08;
    text-transform: uppercase;
    overflow-wrap: normal;
    word-break: normal;
  }

  .sop-summary-print .document-company-cell {
    width: 38%;
    text-align: center;
    vertical-align: middle;
  }

  .sop-summary-print .document-company-cell strong,
  .sop-summary-print .document-company-cell span,
  .sop-summary-print .document-company-cell b {
    display: block;
  }

  .sop-summary-print .document-company-cell strong {
    font-size: 9px;
    text-transform: uppercase;
  }

  .sop-summary-print .document-company-cell b {
    margin-top: 2px;
    font-size: 9px;
    text-transform: uppercase;
  }

  .sop-summary-print .review-signature-table {
    margin-bottom: 3px;
    font-size: 8px;
  }

  .sop-summary-print .review-signature-table td {
    height: 36px;
    text-align: center;
    vertical-align: middle;
  }

  .sop-summary-print .review-signature-table strong,
  .sop-summary-print .review-signature-table span,
  .sop-summary-print .review-signature-table em {
    display: block;
  }

  .sop-summary-print .report-period-block {
    margin: 3px 0 4px;
  }

  .sop-summary-print .monitoring-report-section {
    margin-top: 4px;
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto;
    page-break-after: auto;
  }

  .sop-summary-print .sop-record-list {
    display: block;
  }

  .sop-summary-print .sop-record-card {
    margin: 5px 0 7px;
    padding: 0;
    border: 1px solid #555;
    background: #fffdf8;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print .sop-record-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px;
    color: #111;
    background: #e4ead8;
    border-bottom: 1px solid #555;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .sop-summary-print .sop-record-meta {
    margin: 0;
    border-width: 0 0 1px !important;
  }

  .sop-summary-print .sop-record-meta th {
    width: 13%;
  }

  .sop-summary-print .sop-record-meta td {
    width: 37%;
  }

  .sop-summary-print .sop-pdca-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sop-summary-print .sop-pdca-grid section {
    min-width: 0;
    padding: 5px 6px;
    border-right: 1px solid #555;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print .sop-pdca-grid section:nth-child(3n) {
    border-right: 0;
  }

  .sop-summary-print .sop-pdca-grid section:nth-child(n + 4) {
    border-top: 1px solid #555;
  }

  .sop-summary-print .sop-pdca-grid h3 {
    margin: 0 0 4px;
    color: #111;
    font-size: 8px;
    text-transform: uppercase;
  }

  .sop-summary-print .print-detail-list {
    margin: 0;
    padding-left: 12px;
    color: #111;
    font-size: 7.8px;
    line-height: 1.25;
  }

  .sop-summary-print .print-detail-list li + li {
    margin-top: 2px;
  }

  .sop-summary-print .print-empty-line,
  .sop-summary-print .sop-empty-record {
    margin: 0;
    padding: 5px 6px;
    color: #111;
    border: 1px solid #555;
    font-size: 8px;
  }

  .sop-summary-print table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 3px;
    border-collapse: collapse;
    border: 1px solid #555 !important;
    font-size: 7.8px;
    line-height: 1.2;
    table-layout: fixed;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print thead {
    display: table-header-group;
  }

  .sop-summary-print tr {
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto;
    page-break-after: auto;
  }

  .sop-summary-print .summary-col-activity { width: 12%; }
  .sop-summary-print .summary-col-done { width: 18%; }
  .sop-summary-print .summary-col-result { width: 8%; }
  .sop-summary-print .summary-col-findings { width: 16%; }
  .sop-summary-print .summary-col-manager { width: 15%; }
  .sop-summary-print .summary-col-corrective { width: 13%; }
  .sop-summary-print .summary-col-preventive { width: 13%; }
  .sop-summary-print .summary-col-verified { width: 5%; }

  .sop-summary-print th,
  .sop-summary-print td {
    padding: 3px 4px;
    color: #111;
    border: 1px solid #555 !important;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  .sop-summary-print th {
    font-weight: 700;
    text-transform: uppercase;
    background: #e4ead8 !important;
  }

  .sop-summary-print .monitoring-report-section td strong,
  .sop-summary-print .monitoring-report-section td span {
    display: block;
  }

  .sop-summary-print .print-detail-line + .print-detail-line {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid #c8c0b3;
  }

  .sop-summary-print .traceability-print-table {
    font-size: 7.5px;
  }

  .sop-summary-print .approval-print-section,
  .sop-summary-print .traceability-print-section,
  .sop-summary-print .monitoring-record,
  .sop-summary-print .findings-section,
  .sop-summary-print .corrective-action-section,
  .sop-summary-print .preventive-action-section,
  .sop-summary-print .compliance-summary,
  .sop-summary-print .sop-conclusion {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print .sop-executive-summary {
    margin-top: 5px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print .sop-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid #555;
    background: #fffdf8;
  }

  .sop-summary-print .sop-summary-cards article {
    min-width: 0;
    padding: 5px 6px;
    border-right: 1px solid #555;
    border-bottom: 1px solid #555;
  }

  .sop-summary-print .sop-summary-cards article:nth-child(4n) {
    border-right: 0;
  }

  .sop-summary-print .sop-summary-cards article:nth-child(n + 5) {
    border-bottom: 0;
  }

  .sop-summary-print .sop-summary-cards span,
  .sop-summary-print .sop-summary-cards strong,
  .sop-summary-print .sop-summary-cards em {
    display: block;
    color: #111;
  }

  .sop-summary-print .sop-summary-cards span {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .sop-summary-print .sop-summary-cards strong {
    margin: 2px 0;
    font-size: 10px;
  }

  .sop-summary-print .sop-summary-cards em {
    font-size: 7px;
    font-style: normal;
  }

  .sop-summary-print .sop-summary-cards .is-alert {
    background: #f5ddd5 !important;
  }

  .sop-summary-print .sop-summary-cards .is-good {
    background: #e4ead8 !important;
  }

  .sop-summary-print .sop-summary-cards .is-pending {
    background: #f2ead6 !important;
  }

  .sop-summary-print th:last-child,
  .sop-summary-print td:last-child {
    border-right: 1px solid #555 !important;
  }

  .sop-summary-print .signature-table {
    margin-top: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sop-summary-print .document-control-table,
  .sop-summary-print .review-signature-table,
  .sop-summary-print .report-period-block,
  .sop-summary-print .compliance-summary-table,
  .sop-summary-print .sop-executive-summary,
  .sop-summary-print .sop-conclusion {
    break-inside: avoid;
    page-break-inside: avoid;
    break-after: auto;
    page-break-after: auto;
  }

  .sop-summary-print .signature-table td {
    height: 48px;
  }

  .print-pdf-hint {
    display: none !important;
  }

  .print-items-table th:nth-child(1) { width: 12%; }
  .print-items-table th:nth-child(2) { width: 18%; }
  .print-items-table th:nth-child(3) { width: 22%; }
  .print-items-table th:nth-child(4) { width: 12%; }
  .print-items-table th:nth-child(5) { width: 10%; }
  .print-items-table th:nth-child(6) { width: 7%; }
  .print-items-table th:nth-child(7) { width: 7%; }
  .print-items-table th:nth-child(8) { width: 12%; }
}

.assessment-dashboard-section,
.assessment-records-section {
  border-left: 4px solid rgba(85, 127, 159, 0.5);
}

.assessment-workflow-grid {
  margin-top: 18px;
  align-items: stretch;
}

#assessmentsView {
  container-type: inline-size;
}

#assessmentsView .panel {
  min-width: 0;
}

#assessmentsView .section-heading {
  align-items: start;
}

#assessmentsView .section-subtitle {
  max-width: 760px;
}

#assessmentsView .heading-actions {
  align-items: stretch;
}

#assessmentsView .heading-actions button {
  min-height: 38px;
  white-space: normal;
  line-height: 1.2;
}

#assessmentsView .panel-heading {
  gap: 10px;
}

#assessmentsView .table-wrap {
  border-radius: 12px;
  background: var(--white);
}

#assessmentsView table,
.assessment-dashboard-section table {
  min-width: 760px;
  table-layout: fixed;
}

#assessmentsView th,
#assessmentsView td,
.assessment-dashboard-section th,
.assessment-dashboard-section td {
  padding: 11px 10px;
  vertical-align: middle;
}

#assessmentsView td strong,
.assessment-dashboard-section td strong {
  display: block;
  margin-bottom: 3px;
  line-height: 1.28;
}

#assessmentsView .muted-action,
.assessment-dashboard-section .muted-action {
  display: block;
  line-height: 1.35;
}

#assessmentsView .actions-cell {
  width: 150px;
}

#assessmentsView .table-actions {
  gap: 6px;
  align-items: stretch;
  justify-content: flex-start;
}

#assessmentsView .table-actions button {
  min-height: 32px;
  padding-inline: 9px;
  font-size: 0.78rem;
  white-space: normal;
  line-height: 1.15;
}

#assessmentsView .table-actions .pdf-action {
  border-color: rgba(95, 111, 62, 0.34);
  background: rgba(219, 228, 198, 0.5);
  color: var(--olive-dark);
  font-weight: 900;
}

#assessmentsView .table-actions .pdf-action:hover {
  background: var(--olive-dark);
  color: var(--cream);
}

.print-pdf-hint {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(219, 228, 198, 0.38);
  color: var(--olive-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

#assessmentsView .assessment-records-section table th:nth-child(1),
#assessmentsView .assessment-records-section table td:nth-child(1) {
  width: 22%;
}

#assessmentsView .assessment-records-section table th:nth-child(2),
#assessmentsView .assessment-records-section table td:nth-child(2) {
  width: 13%;
}

#assessmentsView .assessment-records-section table th:nth-child(3),
#assessmentsView .assessment-records-section table td:nth-child(3) {
  width: 17%;
}

#assessmentsView .assessment-records-section table th:nth-child(4),
#assessmentsView .assessment-records-section table td:nth-child(4),
#assessmentsView .assessment-records-section table th:nth-child(6),
#assessmentsView .assessment-records-section table td:nth-child(6) {
  width: 9%;
}

#assessmentsView .assessment-records-section table th:nth-child(5),
#assessmentsView .assessment-records-section table td:nth-child(5) {
  width: 11%;
}

#assessmentsView .assessment-records-section table th:nth-child(7),
#assessmentsView .assessment-records-section table td:nth-child(7) {
  width: 19%;
}

.assessment-dashboard-section table {
  min-width: 620px;
}

.assessment-dashboard-section #assessmentDashboardCards.summary-grid.mini {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 108px), 1fr));
  gap: 10px;
}

#assessmentDashboardCards .summary-card,
#assessmentsView .summary-card {
  min-width: 0;
}

#assessmentDashboardCards .summary-card strong {
  overflow-wrap: anywhere;
}

.assessment-print .document-control-table th {
  width: 16%;
}

.assessment-print .monitoring-report-section h2 {
  margin-bottom: 8px;
}

@media (min-width: 1121px) {
  .dashboard-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  }

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

@media (max-width: 1120px) {
  #assessmentsView .assessment-workflow-grid {
    grid-template-columns: 1fr;
  }

  #assessmentsView .assessment-workflow-grid .panel {
    width: 100%;
  }
}

@media (max-width: 820px) {
  #assessmentsView .section-heading {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  #assessmentsView .heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #assessmentsView .heading-actions button {
    min-width: 0;
    padding-inline: 10px;
  }

  #assessmentsView .table-wrap,
  .assessment-dashboard-section .table-wrap {
    overflow: visible;
  }

  #assessmentsView table,
  #assessmentsView thead,
  #assessmentsView tbody,
  #assessmentsView tr,
  #assessmentsView th,
  #assessmentsView td,
  .assessment-dashboard-section table,
  .assessment-dashboard-section thead,
  .assessment-dashboard-section tbody,
  .assessment-dashboard-section tr,
  .assessment-dashboard-section th,
  .assessment-dashboard-section td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  #assessmentsView table,
  .assessment-dashboard-section table {
    min-width: 0;
  }

  #assessmentsView thead,
  .assessment-dashboard-section thead {
    display: none;
  }

  #assessmentsView tr,
  .assessment-dashboard-section tr {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  #assessmentsView tr:has(.empty-table),
  .assessment-dashboard-section tr:has(.empty-table) {
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
  }

  #assessmentsView tr:last-child,
  .assessment-dashboard-section tr:last-child {
    margin-bottom: 0;
  }

  #assessmentsView td,
  .assessment-dashboard-section td {
    display: grid;
    grid-template-columns: minmax(96px, 0.36fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
  }

  #assessmentsView td.empty-table,
  .assessment-dashboard-section td.empty-table {
    display: block;
    padding: 12px;
  }

  #assessmentsView td.empty-table::before,
  .assessment-dashboard-section td.empty-table::before {
    content: none;
  }

  #assessmentsView td::before,
  .assessment-dashboard-section td::before {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #assessmentTable td:nth-child(1)::before { content: "Assessment"; }
  #assessmentTable td:nth-child(2)::before { content: "Type"; }
  #assessmentTable td:nth-child(3)::before { content: "Scope"; }
  #assessmentTable td:nth-child(4)::before { content: "Date"; }
  #assessmentTable td:nth-child(5)::before { content: "Status"; }
  #assessmentTable td:nth-child(6)::before { content: "Rating"; }
  #assessmentTable td:nth-child(7)::before { content: "Actions"; }

  #assessmentTemplatesTable td:nth-child(1)::before { content: "Template"; }
  #assessmentTemplatesTable td:nth-child(2)::before { content: "Type"; }
  #assessmentTemplatesTable td:nth-child(3)::before { content: "Scoring"; }
  #assessmentTemplatesTable td:nth-child(4)::before { content: "Sections"; }
  #assessmentTemplatesTable td:nth-child(5)::before { content: "Ratings"; }
  #assessmentTemplatesTable td:nth-child(6)::before { content: "Status"; }
  #assessmentTemplatesTable td:nth-child(7)::before { content: "Actions"; }

  #assessmentFindingsTable td:nth-child(1)::before { content: "Assessment"; }
  #assessmentFindingsTable td:nth-child(2)::before { content: "Observation"; }
  #assessmentFindingsTable td:nth-child(3)::before { content: "Severity"; }
  #assessmentFindingsTable td:nth-child(4)::before { content: "Result"; }
  #assessmentFindingsTable td:nth-child(5)::before { content: "Responsible"; }
  #assessmentFindingsTable td:nth-child(6)::before { content: "Target"; }
  #assessmentFindingsTable td:nth-child(7)::before { content: "Actions"; }

  #assessmentActionsTable td:nth-child(1)::before { content: "Action"; }
  #assessmentActionsTable td:nth-child(2)::before { content: "Detail"; }
  #assessmentActionsTable td:nth-child(3)::before { content: "Assigned"; }
  #assessmentActionsTable td:nth-child(4)::before { content: "Due"; }
  #assessmentActionsTable td:nth-child(5)::before { content: "Status"; }
  #assessmentActionsTable td:nth-child(6)::before { content: "Actions"; }

  #assessmentReportsTable td:nth-child(1)::before { content: "Report"; }
  #assessmentReportsTable td:nth-child(2)::before { content: "Assessment"; }
  #assessmentReportsTable td:nth-child(3)::before { content: "Status"; }
  #assessmentReportsTable td:nth-child(4)::before { content: "Generated"; }
  #assessmentReportsTable td:nth-child(5)::before { content: "Actions"; }

  #recentAssessmentsDashboardTable td:nth-child(1)::before { content: "Assessment"; }
  #recentAssessmentsDashboardTable td:nth-child(2)::before { content: "Area"; }
  #recentAssessmentsDashboardTable td:nth-child(3)::before { content: "Status"; }
  #recentAssessmentsDashboardTable td:nth-child(4)::before { content: "Rating"; }
  #recentAssessmentsDashboardTable td:nth-child(5)::before { content: "Date"; }

  #assessmentsView .actions-cell,
  #assessmentsView .table-actions {
    width: 100%;
  }

  #assessmentsView .table-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }

  #assessmentsView .table-actions button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  #assessmentsView .heading-actions {
    grid-template-columns: 1fr;
  }

  #assessmentsView .section-heading h3 {
    font-size: clamp(1.15rem, 7vw, 1.55rem);
  }

  #assessmentsView .section-subtitle {
    font-size: 0.88rem;
  }

  #assessmentsView td,
  .assessment-dashboard-section td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .star-rating-control {
    gap: 5px;
  }

  .star-rating-button {
    width: 36px;
    height: 36px;
    font-size: 1.16rem;
  }

  #assessmentsView .table-actions button {
    flex-basis: 100%;
  }
}
