:root {
  --btn-font-size: 14px;
  --btn-line-height: 1.2;
  --btn-radius: 6px;
  --btn-border: #ddd;
  --btn-primary: #1f7a3f;
  --btn-danger: #b00020;
  --btn-secondary: #f6f6f6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 20px;
}

label {
  display: block;
  margin-top: 12px;
}

input,
select,
textarea {
  width: 320px;
  max-width: 100%;
  padding: 8px;
  margin-top: 4px;
  font-size: 14px;
}

.radio,
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.radio input,
.checkbox input {
  width: auto;
  margin: 0;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.form-check-input {
  width: auto;
  max-width: none;
  margin-top: 0;
  flex: 0 0 auto;
}

.form-check-label {
  margin-top: 0;
  display: inline;
}

.choice-box {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: #fafafa;
  margin-top: 12px;
}

.choice-box legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0 6px;
}

.choice-box .help {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
}

button {
  padding: 10px 16px;
}

.std-table,
table {
  border-collapse: collapse;
  margin-top: 16px;
  width: 100%;
}

.compact-table th,
.compact-table td {
  padding: 4px 6px;
  font-size: 12px;
}

.std-table th,
.std-table td,
th,
td {
  border-bottom: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.activity-row {
  border-top: 2px solid #f0f0f0;
}

.activity-row td:first-child {
  padding-left: 12px;
}

.activity-root {
  border-left: 6px solid #b5b5b5;
}

.activity-child {
  border-left: 2px solid #b5b5b5;
}

.col-description {
  max-width: 360px;
  width: 360px;
}

.truncate {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fafafa;
}

.comment-meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
}

.comment-text {
  font-size: 14px;
  color: #111;
}

.comment-flag {
  color: #b00020;
  font-weight: 700;
  margin-left: 6px;
}

.comment-actions {
  margin-top: 6px;
}

.comment-actions form {
  display: inline-block;
  margin-left: 6px;
}

.optional-panel {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafafa;
}

.optional-panel h2 {
  margin-top: 0;
}

.optional-list {
  margin-top: 10px;
}

.optional-list table {
  margin-top: 8px;
}

.field-group {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.field-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.field-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.field-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.comment-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #0b5bd3;
}

.comment-icon svg {
  width: 16px;
  height: 16px;
  stroke: #0b5bd3;
}

.comment-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

.comment-form {
  max-width: 400px;
}

.comment-form label {
  display: block;
  margin-top: 12px;
}

.comment-form .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment-form .checkbox-label input[type="checkbox"] {
  margin: 0;
  width: auto;
  max-width: none;
  padding: 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: auto;
  max-width: none;
  padding: 0;
}

@media (max-width: 900px) {
  .comment-layout {
    grid-template-columns: 1fr;
  }
  .comment-form {
    max-width: none;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
}

.form-grid-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  max-width: 1500px;
}

.form-grid-documents {
  grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 6fr);
  max-width: 1600px;
}

.form-col {
  min-width: 0;
}

.split-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 1200px;
}

.split-panel {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafafa;
}

.split-panel .btn {
  padding: 6px 10px;
  font-size: 12px;
}

.info-panel {
  font-size: 13px;
}

.info-panel h2 {
  font-size: 16px;
  margin-top: 0;
}

.info-panel table,
.info-panel th,
.info-panel td {
  font-size: 12px;
}

.info-panel table {
  table-layout: fixed;
}

.info-panel th,


@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .split-top {
    grid-template-columns: 1fr;
  }
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.toolbar form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar select {
  padding: 6px 8px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--btn-border);
  border-radius: var(--btn-radius);
  text-decoration: none;
  color: #222;
  background: #fff;
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  font-weight: 600;
}

button.btn {
  font: inherit;
}

.btn-primary {
  background: var(--btn-primary);
  color: #fff;
  border-color: var(--btn-primary);
}

.btn-secondary {
  background: var(--btn-secondary);
}

.btn-danger {
  background: var(--btn-danger);
  color: #fff;
  border-color: var(--btn-danger);
}

.success {
  color: #0a7a0a;
}

.error {
  color: #b00020;
}

.help {
  color: #555;
  font-size: 14px;
  margin-top: 6px;
}

.help-toggle {
  margin: 4px 0 6px;
}

.help-toggle summary {
  cursor: pointer;
  color: #0b5bd3;
  font-size: 12px;
  list-style: none;
}

.help-toggle summary::-webkit-details-marker {
  display: none;
}

.icon-link,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
}

.icon-link svg,
.icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: #333;
}



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

.tree ul {
  list-style: none;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px dashed #ccc;
}

.tree li {
  margin: 6px 0;
}

.tree .toggle {
  border: 0;
  background: #eee;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

.tree .collapsed > ul {
  display: none;
}

.tree .collapsed > .toggle {
  transform: rotate(-90deg);
}

.tree label {
  margin: 0;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.tree input[type="checkbox"] {
  margin: 0;
  width: auto;
  max-width: none;
  padding: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  margin: 0;
  background: #0d6efd;
  color: #fff;
  border-bottom: 1px solid #0b5ed7;
  box-shadow: 0 2px 10px rgba(13, 110, 253, 0.25);
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 48px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 16px;
  font-style: normal;
  color: #fff;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
}

.nav a {
  text-decoration: none;
  color: #eaf2ff;
  font-weight: 600;
  font-size: 13px;
  line-height: 48px;
  padding: 0 8px;
  border-radius: 6px;
}

.nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.topbar .nav a,
.topbar .nav a:visited,
.topbar .nav a:hover,
.topbar .nav a:active,
.topbar-logout a,
.topbar-logout a:visited,
.topbar-logout a:hover,
.topbar-logout a:active {
  color: #fff !important;
}



.topbar .dropdown-menu a,
.topbar .dropdown-menu a:visited,
.topbar .dropdown-menu a:hover,
.topbar .dropdown-menu a:active {
  color: #222 !important;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  height: 48px;
  border: 0;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  color: #eaf2ff;
  font-size: 13px;
  line-height: 48px;
  padding: 0 8px;
  border-radius: 6px;
}

.dropdown-toggle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 0;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 10;
}

.dropdown-menu a {
  display: block;
  padding: 6px 12px;
  color: #222;
  text-decoration: none;
  font-weight: 500;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
}

.topbar-user {
  color: #eaf2ff;
  font-size: 12px;
  margin-right: 12px;
  white-space: nowrap;
}

.topbar-right label {
  color: #eaf2ff;
  font-size: 12px;
  margin: 0;
  line-height: 48px;
}

.topbar-right form {
  display: flex;
  align-items: center;
  height: 48px;
  margin: 0;
}

.topbar-right select {
  font-size: 12px;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  padding: 4px 6px;
  height: 28px;
  line-height: normal;
  margin: 0;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.topbar-logout {
  margin-left: 15px;
}

.topbar-logout a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 32px;
}

.topbar-logout a:visited,
.topbar-logout a:hover,
.topbar-logout a:active {
  color: #fff !important;
}

body {
  padding-top: 60px;
}


.tutorial-view {
  max-width: 1100px;
  margin: 0 auto;
}

.tutorial-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  align-items: start;
}

.tutorial-header h1 {
  margin-top: 0;
}

.tutorial-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.tutorial-actions .btn {
  text-align: center;
}


.tutorial-image img {
  width: auto !important;
  height: auto !important;
  max-width: 75% !important;
  max-height: 70vh !important;
  object-fit: contain;
  display: block;
  margin: 0;
}

.tutorial-fallback {
  font-size: 30px;
  font-weight: 600;
  color: #0b1e3c;
  padding: 24px;
  text-align: center;
}

.tutorial-slide-body {
  max-width: 900px;
}

.tutorial-nav {
  position: absolute;
  left: -20px;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0;
}

.tutorial-nav a {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f7a3f;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.tutorial-caption {
  text-align: center;
  margin-top: 12px;
  color: #555;
  font-size: 13px;
}

@media (max-width: 900px) {
  .tutorial-header {
    grid-template-columns: 1fr;
  }
  .tutorial-actions {
    flex-direction: row;
  }
  .tutorial-nav a {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}

.tutorial-nav-disabled {
  pointer-events: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d5d5d5;
  color: #7a7a7a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}













/* ========== Tutorial Views ========== */
/* tutorial-view overrides */
.tutorial-view .tutorial-slide-wrapper {
  display: block;
}

.tutorial-view .tutorial-slide-grid {
  display: inline-grid;
  grid-template-columns: 90px max-content 90px;
  row-gap: 12px;
  align-items: center;
}

.tutorial-view .tutorial-header-row {
  grid-column: 2 / 4;
}

.tutorial-view .tutorial-image {
  width: max-content;
  padding: 10px 0;
  min-height: auto;
}

.tutorial-view .tutorial-image img {
  display: block;
  max-width: 70vw !important;
  max-height: 70vh !important;
  width: auto !important;
  height: auto !important;
}

.tutorial-view .tutorial-nav-right {
  width: 90px;
  justify-content: flex-start;
  padding-left: 16px;
}

.tutorial-view .tutorial-gutter {
  width: 90px;
}

.tutorial-view .tutorial-nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1f7a3f;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.tutorial-view .tutorial-nav-disabled {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #d5d5d5;
  color: #7a7a7a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.form-label { font-weight: 600; }

.form-control, .form-select, textarea { font-size: 14px; }

.activity-parent-row td:first-child {
  border-left: 4px solid #cbd5e1;
  padding-left: 10px;
}
.activity-child-row td:first-child {
  border-left: 2px solid #cbd5e1;
  padding-left: 24px;
}


.form-switch-label-fix { position: relative; top: -4px; }

.beta-badge { margin-left:8px; padding:2px 6px; background:#ffd54f; color:#222; border-radius:4px; font-size:11px; font-weight:700; display:inline-flex; align-items:center; }
