* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  font-size: 13px;
  background: #f0f0f0;
  color: #333;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 8px 16px;
  border-bottom: 1px solid #ccc;
  gap: 16px;
}
.header-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #006400;
  padding: 4px 8px;
  min-width: 60px;
}
.logo-box {
  font-weight: bold;
  font-size: 18px;
  color: #006400;
}
.logo-subtitle {
  font-size: 9px;
  color: #555;
  text-align: center;
}
.header-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}
.header-bar {
  height: 4px;
  background: linear-gradient(to right, #006400, #ffd700, #cc0000);
}

/* Page */
.page {
  flex: 1;
  min-width: 0;
  padding: 16px;
}
.page-title {
  font-size: 18px;
  color: #003366;
  margin-bottom: 4px;
}
.module-editing {
  font-size: 14px;
  font-weight: normal;
  color: #333;
  margin-bottom: 12px;
}
.module-code {
  font-weight: bold;
  color: #003399;
}

/* Instructions bar */
.instructions {
  background: #f0f7f0;
  border: 1px solid #a5d6a7;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #1b5e20;
  line-height: 1.5;
}
.instructions-list {
  margin: 6px 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.marker-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  vertical-align: middle;
}

/* Load toolbar */
.load-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0f4ff;
  border: 1px solid #c5d5f0;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.btn-load {
  background: #2e7d32;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.btn-load:hover { background: #1b5e20; }
.load-status {
  font-size: 12px;
  color: #2e7d32;
}

/* Form sections */
.form-section {
  background: #fff;
  border: 1px solid #ccc;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.assessment-section {
  background: #f5f8ff;
}
.assessment-title {
  font-size: 15px;
  color: #003366;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #003366;
}

/* Form rows */
.form-row {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  gap: 8px;
}
.form-row:last-child { border-bottom: none; }
.form-row-top { align-items: flex-start; }
.form-row > label {
  min-width: 220px;
  max-width: 220px;
  font-weight: bold;
  font-size: 12px;
  color: #444;
  padding-right: 8px;
}
.field-wrap {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}
.field-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Inputs */
input[type="text"], select {
  border: 1px solid #aaa;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 2px;
  background: #fff;
}
input[type="text"]:focus, select:focus {
  outline: 1px solid #006699;
}
.input-full  { width: 100%; }
.input-medium { width: 200px; }
.input-short  { width: 120px; }
.input-tiny   { width: 60px; }

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  font-weight: normal;
  cursor: pointer;
}
.checkbox-label { width: 100%; font-weight: normal; }

.inline-label {
  font-size: 12px;
  font-weight: bold;
  color: #444;
}
.char-note {
  font-size: 11px;
  color: #777;
  width: 100%;
}

/* Info icon */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #006699;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
  cursor: default;
  vertical-align: middle;
}

/* Rich text */
.rich-text-toolbar {
  display: flex;
  gap: 6px;
  background: #e8e8e8;
  border: 1px solid #aaa;
  border-bottom: none;
  padding: 4px 6px;
  flex-wrap: wrap;
  width: 100%;
  font-size: 12px;
}
.tb-btn {
  cursor: pointer;
  padding: 1px 5px;
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 2px;
}
.rich-text-area {
  border: 1px solid #aaa;
  padding: 8px;
  min-height: 120px;
  background: #fff;
  width: 100%;
  font-size: 12px;
  line-height: 1.5;
}
.rich-text-area p { margin-bottom: 8px; }
.rich-text-area.short { min-height: 40px; }

/* Section headers */
.section-header {
  background: #dde5f0;
  padding: 5px 8px;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.section-header.sub {
  background: #eef2f8;
  margin-bottom: 4px;
}
.header-sub {
  font-weight: normal;
  font-size: 11px;
  flex: 1;
}

/* Tables */
.methods-table, .req-table, .outcomes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.methods-table th, .req-table th {
  background: #dde5f0;
  padding: 4px 8px;
  text-align: left;
  border: 1px solid #ccc;
  font-weight: bold;
}
.methods-table td, .req-table td, .outcomes-table td {
  padding: 4px 6px;
  border: 1px solid #ddd;
  vertical-align: middle;
}
.outcome-num {
  width: 30px;
  text-align: center;
  font-weight: bold;
  background: #f5f5f5;
}

/* Buttons */
.btn-add {
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.btn-remove {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 0;
}
.btn-attach {
  background: #4caf50;
  color: #fff;
  border: none;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 12px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 0;
}
.btn-cancel   { background: #e53935; color: #fff; border: none; padding: 7px 18px; border-radius: 3px; cursor: pointer; font-size: 13px; }
.btn-save     { background: #1565c0; color: #fff; border: none; padding: 7px 18px; border-radius: 3px; cursor: pointer; font-size: 13px; }
.btn-workflow { background: #2e7d32; color: #fff; border: none; padding: 7px 18px; border-radius: 3px; cursor: pointer; font-size: 13px; }

/* Numbered markers */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(46, 125, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.marker-sm {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
  position: relative;
  z-index: 10;
  animation: pulse-ring 2s ease-out infinite;
}
.marker:hover {
  background: #1b5e20;
  transform: scale(1.25);
  animation: none;
  box-shadow: 0 2px 10px rgba(27, 94, 32, 0.5);
}
.marker-active {
  background: #1b5e20;
  animation: none;
  box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.35);
  transform: scale(1.15);
}

/* Side panel */
.side-panel {
  position: sticky;
  top: 0;
  width: 320px;
  flex-shrink: 0;
  height: 100vh;
  background: #fff;
  border-left: 3px solid #2e7d32;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.side-panel-top {
  padding: 14px 16px;
  background: #2e7d32;
  flex-shrink: 0;
}
.side-panel-heading {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}
.side-panel-subheading {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}
.side-panel-header {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f0f7f0;
  border-bottom: 1px solid #a5d6a7;
  flex-shrink: 0;
}
.side-panel-header.visible {
  display: flex;
}
.side-panel-num {
  width: 26px;
  height: 26px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  flex-shrink: 0;
}
.side-panel-title {
  font-size: 13px;
  font-weight: bold;
  color: #2e7d32;
  flex: 1;
}
.side-panel-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #333;
  overflow-y: auto;
  flex: 1;
}

/* Centred layout wrapper */
.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
}
