html {
  font-size: 14px;
  min-height: 100%;
  position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(83, 97, 70, 0.28), transparent 30rem),
    linear-gradient(135deg, #080a08 0%, #11150f 45%, #050605 100%);
  color: #f1f3ed;
  font-family: "Segoe UI", Aptos, system-ui, sans-serif;
  margin-bottom: 60px;
  min-height: 100vh;
}

h1,
.mpl-brand-number {
  font-family: "Gunplay 3D", "Segoe UI", Aptos, system-ui, sans-serif;
}

h1 {
  font-weight: 400;
}

a {
  color: #c9d6a7;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #11150f, 0 0 0 0.25rem #a6ba62;
}

.mpl-navbar {
  background: rgba(8, 10, 8, 0.94);
  border-bottom: 1px solid rgba(201, 214, 167, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.navbar .nav-link,
.navbar .btn-link {
  color: #d8ddcf;
}

.navbar .nav-link:hover,
.navbar .btn-link:hover {
  color: #ffffff;
}

.navbar-toggler {
  border-color: rgba(216, 221, 207, 0.35);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.mpl-brand {
  align-items: center;
  color: #f4f6ef;
  display: inline-flex;
  gap: 0.55rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mpl-brand:hover {
  color: #ffffff;
}

.mpl-brand-mark {
  height: 2.45rem;
  object-fit: contain;
  width: 2.1rem;
}

.mpl-brand-copy {
  display: grid;
  line-height: 1;
}

.mpl-brand-number {
  color: #d7e4a6;
  font-size: 1.2rem;
  font-weight: 800;
}

.mpl-brand-text {
  color: #aeb79b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-shell {
  padding-top: 2rem;
}

.overview-hero,
.internal-hero {
  align-items: stretch;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  margin: 2rem 0;
}

.public-entry {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 12rem);
}

.public-entry-panel {
  max-width: 38rem;
}

.public-entry-mark {
  display: block;
  height: 8rem;
  margin: 0 0 1rem;
  object-fit: contain;
  width: 7rem;
}

.public-entry-panel h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 1rem;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 12rem);
}

.auth-panel {
  background: rgba(20, 24, 18, 0.9);
  border: 1px solid rgba(201, 214, 167, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  max-width: 30rem;
  padding: 1.5rem;
  width: 100%;
}

.auth-panel h1 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

.overview-hero h1,
.internal-hero h1 {
  color: #ffffff;
  font-size: clamp(2.3rem, 4vw, 4.8rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 1rem;
}

.eyebrow {
  color: #aeb79b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.lead {
  color: #d8ddcf;
  max-width: 46rem;
}

.status-panel,
.dashboard-grid article {
  background: rgba(20, 24, 18, 0.86);
  border: 1px solid rgba(201, 214, 167, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: center;
  padding: 1.25rem;
}

.status-label,
.dashboard-grid span {
  color: #aeb79b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-panel strong {
  color: #ffffff;
  font-size: 1.4rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem 0;
}

.admin-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 0;
}

.admin-section {
  margin: 2rem 0;
}

.admin-section .section-title-row {
  margin-bottom: 0.4rem;
}

.admin-section h2 {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}

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

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

.admin-tile {
  background: rgba(20, 24, 18, 0.74);
  border: 1px solid rgba(201, 214, 167, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  color: #d8ddcf;
  display: flex;
  flex-direction: column;
  min-height: 9.5rem;
  padding: 1.1rem;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.admin-tile:hover {
  background: rgba(24, 30, 21, 0.86);
  border-color: rgba(201, 214, 167, 0.36);
  color: #ffffff;
  transform: translateY(-1px);
}

.admin-tile-primary {
  background: rgba(23, 28, 20, 0.9);
  min-height: 11rem;
}

.admin-tile span {
  color: #aeb79b;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-tile strong {
  color: #ffffff;
  display: block;
  font-size: 2.1rem;
  margin: 0.55rem 0;
}

.admin-grid-secondary .admin-tile strong {
  font-size: 1.7rem;
}

.admin-tile p {
  color: #c5cbbb;
  margin: 0;
}

.page-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 2rem 0;
}

.page-heading h1 {
  color: #ffffff;
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0;
}

.data-section,
.form-section {
  background: rgba(20, 24, 18, 0.72);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  margin: 2rem 0;
  padding: 1.25rem;
}

.data-section h2,
.form-section h2 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.compact-form {
  border-bottom: 1px solid rgba(201, 214, 167, 0.12);
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(201, 214, 167, 0.12);
  --bs-table-hover-bg: rgba(201, 214, 167, 0.08);
}

.table-section-row th {
  background: rgba(166, 186, 98, 0.18);
  color: #ffffff;
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.person-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-summary .data-section {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 0.45rem 1rem;
  grid-template-columns: 9rem minmax(0, 1fr);
  margin: 0;
}

.detail-list dt {
  color: #aeb79b;
  font-weight: 700;
}

.detail-list dd {
  color: #f1f3ed;
  margin: 0;
}

.change-timeline {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.change-timeline li {
  background: rgba(8, 10, 8, 0.32);
  border: 1px solid rgba(201, 214, 167, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
}

.change-timeline strong {
  color: #ffffff;
  font-weight: 700;
}

.change-timeline small,
.change-timeline-meta {
  color: #aeb79b;
}

.change-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.45rem;
  text-transform: uppercase;
}

.change-timeline-meta span::before {
  color: rgba(201, 214, 167, 0.45);
  content: "/";
  margin-right: 0.45rem;
}

.dashboard-grid article {
  min-height: 11rem;
  padding: 1.1rem;
}

.dashboard-grid strong {
  color: #ffffff;
  display: block;
  font-size: 2.1rem;
  margin: 0.55rem 0;
}

.dashboard-grid p,
.status-panel span {
  color: #c5cbbb;
  margin: 0;
}

.action-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.work-list {
  background: rgba(20, 24, 18, 0.72);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  margin: 2rem 0;
  padding: 1.25rem;
}

.work-list h2 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.85rem;
}

.work-list li {
  color: #d8ddcf;
  margin-bottom: 0.35rem;
}

.muted-text {
  color: #c5cbbb;
}

.status-message {
  background: rgba(125, 143, 69, 0.18);
  border: 1px solid rgba(166, 186, 98, 0.32);
  border-radius: 8px;
  color: #eef5d6;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}

.mail-template-preview {
  background: rgba(8, 10, 8, 0.34);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  color: #eef2e7;
  margin: 0.75rem 0 0;
  padding: 1rem;
  white-space: pre-wrap;
}

.feedback-message {
  min-height: 12rem;
}

.feedback-table-message {
  max-width: 28rem;
  white-space: pre-wrap;
}

.feedback-status-form {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-width: 12rem;
}

.security-setup {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(11rem, 0.35fr) minmax(0, 1fr) minmax(18rem, 0.7fr);
}

.security-qr-panel {
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  padding: 0.85rem;
}

.security-qr-panel img {
  aspect-ratio: 1;
  display: block;
  max-width: 11rem;
  width: 100%;
}

.security-uri {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.recovery-code-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}

.recovery-code-grid code {
  background: rgba(8, 10, 8, 0.36);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  color: #ffffff;
  display: block;
  padding: 0.65rem 0.8rem;
}

.page-heading-actions {
  margin-bottom: 0;
}

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

.manual-grid .data-section {
  margin: 0;
}

.manual-steps {
  color: #d8ddcf;
  display: grid;
  gap: 0.5rem;
  line-height: 1.5;
  margin: 0;
  padding-left: 1.25rem;
}

.guide-callout {
  align-items: center;
  background: rgba(8, 10, 8, 0.32);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
}

.guide-callout strong {
  color: #ffffff;
}

.guide-callout p {
  color: #c5cbbb;
  margin: 0.15rem 0 0;
}

.toolbar-section {
  background: rgba(20, 24, 18, 0.56);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
}

.catalog-filter {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(14rem, 1.2fr) minmax(12rem, 0.9fr) auto auto auto;
}

.system-log-filter {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(16rem, 1.4fr) repeat(4, minmax(10rem, 1fr));
}

.catalog-filter-check {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  white-space: nowrap;
}

.creation-panels .form-section {
  margin-top: 0;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.section-title-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.result-count {
  color: #aeb79b;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-actions {
  margin-bottom: 0;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.report-tab {
  background: rgba(20, 24, 18, 0.72);
  border: 1px solid rgba(201, 214, 167, 0.16);
  border-radius: 999px;
  color: #d8ddcf;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
}

.report-tab:hover,
.report-tab.active {
  background: rgba(166, 186, 98, 0.2);
  border-color: rgba(166, 186, 98, 0.45);
  color: #ffffff;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}

.status-ok {
  background: rgba(110, 143, 92, 0.22);
  color: #dceccf;
}

.status-warning {
  background: rgba(189, 154, 68, 0.22);
  color: #ffe8aa;
}

.status-bad {
  background: rgba(175, 75, 75, 0.24);
  color: #ffd4d4;
}

.status-neutral {
  background: rgba(201, 214, 167, 0.14);
  color: #eef2e7;
}

.org-tree {
  display: grid;
  gap: 0.8rem;
}

.tree-node {
  position: relative;
}

.tree-children {
  border-left: 1px solid rgba(201, 214, 167, 0.22);
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 0 1rem;
  padding-left: 1rem;
}

.tree-card {
  background: rgba(8, 10, 8, 0.45);
  border: 1px solid rgba(201, 214, 167, 0.16);
  border-radius: 8px;
  color: #d8ddcf;
  max-width: 34rem;
  padding: 0.8rem 1rem;
}

.tree-summary {
  cursor: pointer;
  list-style: none;
}

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

.tree-summary::before {
  color: #d7e4a6;
  content: "▾";
  display: inline-block;
  font-size: 0.85rem;
  margin-right: 0.55rem;
  transform: translateY(-0.05rem);
}

.tree-details:not([open]) > .tree-summary::before {
  content: "▸";
}

.tree-details:not([open]) > .tree-children {
  display: none;
}

.tree-card span {
  color: #aeb79b;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tree-card strong {
  color: #ffffff;
  display: block;
  font-size: 1rem;
  margin-top: 0.15rem;
}

.tree-filter-link {
  color: #ffffff;
  display: block;
  font-size: 1rem;
  font-weight: 800;
  margin-top: 0.15rem;
  text-decoration: none;
}

.tree-filter-link:hover {
  color: #d7e4a6;
  text-decoration: underline;
}

.competency-catalog {
  display: grid;
  gap: 0.85rem;
}

.catalog-group {
  background: rgba(8, 10, 8, 0.35);
  border: 1px solid rgba(201, 214, 167, 0.14);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.catalog-group summary {
  align-items: center;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  list-style: none;
}

.catalog-group summary::-webkit-details-marker {
  display: none;
}

.catalog-group summary small {
  color: #aeb79b;
  font-weight: 700;
}

.catalog-group .table-responsive,
.catalog-group .muted-text {
  margin-top: 0.9rem;
}

.catalog-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.catalog-edit-form,
.catalog-row-form {
  align-items: center;
  display: grid;
  gap: 0.55rem;
}

.catalog-edit-form {
  grid-template-columns: minmax(12rem, 1fr) 6rem auto;
  margin-top: 0.9rem;
}

.catalog-toggle-form {
  margin-top: 0.55rem;
}

.catalog-row-form {
  grid-template-columns: minmax(10rem, 1.1fr) minmax(9rem, 0.8fr) minmax(10rem, 1fr) auto auto auto;
}

.catalog-row-action {
  margin-top: 0.45rem;
}

.catalog-check {
  align-items: center;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  white-space: nowrap;
}

.catalog-sort-input {
  max-width: 6rem;
}

.catalog-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.catalog-list-item {
  align-items: center;
  background: rgba(20, 24, 18, 0.58);
  border: 1px solid rgba(201, 214, 167, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(12rem, 1fr) auto auto auto;
  padding: 0.7rem;
}

.catalog-list-item strong {
  color: #ffffff;
  display: block;
}

.catalog-list-item span:not(.status-pill) {
  color: #aeb79b;
  font-size: 0.82rem;
  font-weight: 700;
}

.catalog-detail-form {
  background: rgba(8, 10, 8, 0.32);
  border: 1px solid rgba(201, 214, 167, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  margin: 0.55rem 0 1rem;
  padding: 1rem;
}

.btn-primary {
  background: #7d8f45;
  border-color: #7d8f45;
  color: #10130d;
  font-weight: 700;
}

.btn-primary:hover {
  background: #a6ba62;
  border-color: #a6ba62;
  color: #10130d;
}

.btn-outline-light {
  border-color: rgba(216, 221, 207, 0.45);
  color: #d8ddcf;
}

.btn-outline-light:hover {
  background: #d8ddcf;
  border-color: #d8ddcf;
  color: #10130d;
}

.btn-outline-danger {
  border-color: rgba(218, 112, 112, 0.65);
  color: #ffd4d4;
}

.btn-outline-danger:hover {
  background: #b84c4c;
  border-color: #b84c4c;
  color: #ffffff;
}

.footer {
  border-top: 1px solid rgba(201, 214, 167, 0.14);
  bottom: 0;
  color: #aeb79b;
  line-height: 60px;
  position: absolute;
  width: 100%;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 768px) {
  .overview-hero,
  .internal-hero,
  .dashboard-grid,
  .admin-grid,
  .person-summary,
  .person-card-grid,
  .manual-grid,
  .security-setup,
  .form-row {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .catalog-edit-form,
  .catalog-row-form,
  .catalog-filter,
  .system-log-filter,
  .catalog-list-item {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding-top: 1rem;
  }

  .public-entry,
  .auth-shell {
    align-items: flex-start;
    min-height: calc(100vh - 8rem);
  }

  .public-entry-mark {
    height: 6rem;
    width: 5.2rem;
  }

  .public-entry-panel h1,
  .overview-hero h1,
  .internal-hero h1 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .auth-panel,
  .data-section,
  .form-section {
    padding: 1rem;
  }

  .data-section,
  .form-section {
    margin: 1rem 0;
  }

  .detail-list {
    gap: 0.15rem;
    grid-template-columns: 1fr;
  }

  .detail-list dd {
    margin-bottom: 0.55rem;
  }

  .guide-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading > .btn,
  .page-heading > form,
  .page-heading > form .btn,
  .person-actions .btn,
  .catalog-category-actions .btn,
  .toolbar-section .btn {
    width: 100%;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-inline: -0.25rem;
    padding-bottom: 0.35rem;
  }
}
