:root {
  --pmj: #8f1d23;
  --pmj-dark: #64151a;
  --pmj-pressed: #4f1014;
  --pmj-soft: #fff1f2;
  --ink: #17202a;
  --muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e5e7eb;
  --sidebar: #15171c;
  --neutral: #475467;
  --neutral-dark: #344054;
  --success: #157347;
  --success-dark: #0f5132;
  --warning: #b7791f;
  --warning-dark: #8a5a13;
  --danger: #b42318;
  --danger-dark: #7a271a;
  --focus-ring: rgba(143, 29, 35, 0.18);
}

html,
body {
  min-height: 100%;
}

body {
  background: #f6f7fb;
  color: var(--ink);
  font-size: 14px;
}

a,
a:hover,
.btn-link,
.auth-link,
.product-title {
  color: var(--pmj);
}

a:hover,
.btn-link:hover,
.auth-link:hover,
.product-title:hover {
  color: var(--pmj-dark);
}

a:focus,
button:focus,
.btn:focus,
.page-link:focus,
.form-control:focus,
.custom-select:focus {
  box-shadow: 0 0 0 0.2rem var(--focus-ring) !important;
  outline: 0;
}

.wrapper {
  background: #f6f7fb;
}

.main-header {
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.main-header .nav-link {
  color: var(--neutral);
}

.main-header .nav-link:hover,
.main-header .nav-link:focus,
.main-header .nav-link.show {
  color: var(--pmj);
}

.brand-link {
  background: var(--sidebar) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.brand-link .brand-image {
  background: #fff !important;
  color: var(--pmj) !important;
}

.brand-link .brand-text {
  color: #f8fafc;
  white-space: normal;
}

.main-sidebar {
  background: var(--sidebar) !important;
}

.sidebar .user-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .user-panel .info a {
  color: #f8fafc;
}

.sidebar .user-panel .text-muted {
  color: #9aa4b2 !important;
}

.nav-sidebar .nav-link {
  border-radius: 8px;
}

.nav-sidebar .nav-link p,
.nav-sidebar .nav-link i {
  color: #d6dae3;
}

.nav-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-sidebar > .nav-item > .nav-link.active,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: var(--pmj) !important;
  box-shadow: 0 10px 24px rgba(143, 29, 35, 0.28);
}

.nav-sidebar > .nav-item > .nav-link.active p,
.nav-sidebar > .nav-item > .nav-link.active i,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #fff !important;
}

.nav-header {
  color: #8e96a8 !important;
  font-size: 11px;
  letter-spacing: 0;
  padding: 16px 16px 6px;
}

.content-wrapper {
  background:
    linear-gradient(
      180deg,
      rgba(143, 29, 35, 0.05),
      rgba(246, 247, 251, 0) 240px
    ),
    #f6f7fb !important;
}

.content-header {
  padding: 18px 0.5rem 12px;
}

.content-header .row {
  align-items: center;
}

.content-header h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.card {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.card-primary.card-outline {
  border-top: 3px solid var(--pmj);
}

.card-primary:not(.card-outline) > .card-header {
  background: var(--pmj);
  color: #fff;
}

.card-primary:not(.card-outline) > .card-header .card-title {
  color: #fff;
}

.card-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 16px 18px;
}

.card-header::after,
.card-header::before {
  content: none;
  display: none;
}

.card-title {
  color: var(--ink);
  flex: 1 1 auto;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
}

.card-header .card-tools {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  float: none !important;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.card-header > form {
  align-items: center;
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.card-header > form.form-inline.float-left {
  float: none !important;
}

.card-header > form:not(.float-left) {
  flex: 1 1 100%;
}

.card-header > form .input-group {
  min-width: 240px;
}

.card-header > form .ml-auto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-body {
  padding: 18px;
}

.card-body.p-0 {
  padding: 0 !important;
}

.card-footer {
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px !important;
  padding: 14px 18px;
}

.small-box {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
  overflow: hidden;
}

.small-box .inner h3 {
  font-size: 30px;
  font-weight: 800;
}

.small-box.bg-info,
.bg-info {
  background-color: var(--neutral) !important;
}

.small-box.bg-success,
.bg-success {
  background-color: var(--success) !important;
}

.small-box.bg-warning,
.bg-warning {
  background-color: var(--warning) !important;
  color: #fff !important;
}

.small-box.bg-warning .icon,
.small-box.bg-warning a,
.small-box.bg-warning p {
  color: #fff !important;
}

.small-box-footer:hover {
  background: rgba(0, 0, 0, 0.18) !important;
  color: #fff !important;
}

.btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 600;
  gap: 0.35rem;
  justify-content: center;
  line-height: 1.35;
  white-space: nowrap;
}

.btn-block {
  display: flex;
}

.btn-sm {
  border-radius: 8px;
}

.btn-primary,
.bg-primary {
  background-color: var(--pmj) !important;
  border-color: var(--pmj) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--pmj-dark) !important;
  border-color: var(--pmj-dark) !important;
  color: #fff !important;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem var(--focus-ring) !important;
}

.btn-outline-primary {
  border-color: var(--pmj);
  color: var(--pmj);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active {
  background: var(--pmj);
  border-color: var(--pmj);
  color: #fff;
}

.btn-info,
.btn-default {
  background-color: var(--neutral) !important;
  border-color: var(--neutral) !important;
  color: #fff !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:not(:disabled):not(.disabled):active,
.btn-default:hover,
.btn-default:focus,
.btn-default:not(:disabled):not(.disabled):active {
  background-color: var(--neutral-dark) !important;
  border-color: var(--neutral-dark) !important;
  color: #fff !important;
}

.btn-outline-info {
  border-color: var(--neutral);
  color: var(--neutral);
}

.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:not(:disabled):not(.disabled):active {
  background: var(--neutral);
  border-color: var(--neutral);
  color: #fff;
}

.btn-success {
  background-color: var(--success) !important;
  border-color: var(--success) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active {
  background-color: var(--success-dark) !important;
  border-color: var(--success-dark) !important;
}

.btn-warning {
  background-color: var(--warning) !important;
  border-color: var(--warning) !important;
  color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled):active {
  background-color: var(--warning-dark) !important;
  border-color: var(--warning-dark) !important;
  color: #fff !important;
}

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

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active {
  background-color: var(--danger-dark) !important;
  border-color: var(--danger-dark) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:not(:disabled):not(.disabled):active {
  background-color: #4b5563 !important;
  border-color: #4b5563 !important;
}

.form-group label {
  color: #344054;
  font-weight: 700;
}

.form-control,
.custom-select {
  border-color: #d0d5dd;
  border-radius: 8px;
  min-height: 40px;
}

.form-control:focus,
.custom-select:focus {
  border-color: var(--pmj);
}

.input-group-text {
  background: var(--surface-soft);
  border-color: #d0d5dd;
  border-radius: 8px;
}
.login-card-body
  .input-group
  .form-control:focus
  ~ .input-group-append
  .input-group-text,
.login-card-body
  .input-group
  .form-control:focus
  ~ .input-group-prepend
  .input-group-text,
.register-card-body
  .input-group
  .form-control:focus
  ~ .input-group-append
  .input-group-text,
.register-card-body
  .input-group
  .form-control:focus
  ~ .input-group-prepend
  .input-group-text {
  border-color: var(--pmj);
}
.password-field:focus-within .password-toggle {
  border-color: var(--pmj);
}
.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
  border-bottom-left-radius: 8px;
  border-top-left-radius: 8px;
}

.input-group > .input-group-append > .btn,
.input-group > .input-group-append > .input-group-text {
  border-bottom-right-radius: 8px;
  border-top-right-radius: 8px;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--pmj);
  border-color: var(--pmj);
}

.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
  background-color: #f8d7da;
  border-color: #f1aeb5;
}

.custom-checkbox
  .custom-control-input:indeterminate
  ~ .custom-control-label::before {
  background-color: var(--pmj);
  border-color: var(--pmj);
}

.custom-file-input:focus ~ .custom-file-label {
  border-color: var(--pmj);
  box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.password-toggle {
  border-color: #d0d5dd;
  color: var(--muted);
  min-width: 44px;
}

.password-field > .form-control {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.password-field > .input-group-append:not(:last-child) > .btn,
.password-field > .input-group-append:not(:last-child) > .input-group-text {
  border-radius: 0;
}

.password-toggle:hover,
.password-toggle:focus,
.password-toggle:not(:disabled):not(.disabled):active {
  background: var(--pmj-soft) !important;
  border-color: var(--pmj) !important;
  color: var(--pmj) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--pmj-soft);
  color: var(--pmj);
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--pmj);
  color: #fff;
}

.text-info {
  color: var(--neutral) !important;
}

.text-primary {
  color: var(--pmj) !important;
}

.alert-info {
  background: #f8fafc;
  border-color: #d0d5dd;
  color: var(--neutral-dark);
}

.alert-success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #05603a;
}

.alert-warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: #93370d;
}

.badge {
  border-radius: 999px;
  font-weight: 700;
  padding: 0.42em 0.68em;
}

.badge-info,
.badge-light {
  background: #eef2f6;
  color: var(--neutral-dark);
}

.badge-success {
  background: #dcfae6;
  color: #067647;
}

.badge-warning {
  background: #fef0c7;
  color: #93370d;
}

.badge-danger {
  background: #fee4e2;
  color: #b42318;
}

.user-avatar {
  border-radius: 50%;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.avatar-lg {
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.16);
  height: 120px;
  object-fit: cover;
  width: 120px;
}

.box-profile img,
#photoPreview {
  max-width: 100%;
}

.rounded {
  border-radius: 8px !important;
}

.table {
  color: var(--ink);
  margin-bottom: 0;
  width: 100%;
}

.table thead th {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: #475467;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.table td,
.table th {
  border-color: var(--line);
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background: #fff8f8;
}

.datatable-card-body {
  overflow: hidden;
  padding: 0 !important;
}

.datatable-card-body .dataTables_wrapper {
  padding: 16px 18px 18px;
}

.dataTables_wrapper .row {
  margin-left: 0;
  margin-right: 0;
}

.dataTables_wrapper .row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

.dataTables_wrapper .row:first-child {
  align-items: center;
  gap: 10px 0;
  margin-bottom: 12px;
}

.dataTables_wrapper label {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0;
}

.dataTables_filter {
  text-align: right;
}

.dataTables_filter input,
.dataTables_length select {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  min-height: 38px;
}

.dataTables_filter input:focus,
.dataTables_length select:focus {
  border-color: var(--pmj);
  box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.dataTables_info {
  color: var(--muted);
  padding-top: 14px !important;
}

.dataTables_scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.dataTables_scrollHead table.dataTable,
.dataTables_scrollBody table.dataTable {
  margin-bottom: 0 !important;
}

table.dataTable {
  width: 100% !important;
}

table.dataTable thead .sorting::before,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
  color: var(--pmj);
}

.page-item.active .page-link {
  background: var(--pmj);
  border-color: var(--pmj);
}

.page-link {
  border-radius: 8px;
  color: var(--pmj);
  margin: 0 2px;
}

.page-link:hover,
.page-link:focus {
  background: var(--pmj-soft);
  border-color: #f1aeb5;
  color: var(--pmj-dark);
}

.pagination {
  flex-wrap: wrap;
  gap: 4px;
}

.login-page {
  background:
    radial-gradient(
      circle at top right,
      rgba(212, 167, 44, 0.2),
      transparent 28%
    ),
    linear-gradient(145deg, #64151a, #111827 68%) !important;
  min-height: 100vh;
}

.login-box,
.register-box {
  max-width: 94vw;
  width: 460px;
}

.login-logo {
  color: #fff;
  font-weight: 800;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.login-logo img {
  max-width: 120px;
}

.login-page .card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.login-page .card-header {
  background: #17191d !important;
  border-bottom: 0;
  border-radius: 8px 8px 0 0 !important;
  justify-content: center;
}

.login-card-body {
  border-radius: 0 0 8px 8px;
}

.member-summary {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 991.98px) {
  .content-header h1 {
    font-size: 22px;
  }

  .small-box .icon {
    opacity: 0.2;
  }
}

@media (max-width: 767.98px) {
  .content-header {
    padding-top: 14px;
  }

  .content-header .row > [class*="col-"] {
    text-align: left !important;
  }

  .content-header h1 {
    font-size: 20px;
  }

  .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .card-title,
  .card-header .card-tools,
  .card-header > form {
    flex: 1 1 100%;
    margin-left: 0;
    width: 100%;
  }

  .card-header .card-tools {
    justify-content: flex-start;
  }

  .card-header > form .input-group,
  .card-header > form .custom-select,
  .card-header > form .form-control {
    min-width: 0;
    width: 100%;
  }

  .card-header > form .ml-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  .card-header > form .ml-auto .btn,
  .card-header .card-tools .btn {
    flex: 1 1 auto;
  }

  .card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-footer .btn {
    flex: 1 1 auto;
  }

  .datatable-card-body .dataTables_wrapper {
    padding: 12px;
  }

  .dataTables_wrapper .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .dataTables_filter {
    text-align: left;
  }

  .dataTables_filter label,
  .dataTables_length label {
    width: 100%;
  }

  .dataTables_filter input {
    margin-left: 0 !important;
    margin-top: 6px;
    width: 100% !important;
  }

  .dataTables_length select {
    margin-left: 0;
    margin-right: 6px;
  }

  .dataTables_paginate .pagination {
    justify-content: flex-start !important;
  }

  .list-group-item .float-right {
    display: block;
    float: none !important;
    margin-top: 6px;
    max-width: 100%;
    text-align: left;
  }

  .member-summary {
    align-items: flex-start !important;
  }

  .d-md-flex > .mt-3.mt-md-0 {
    width: 100%;
  }

  .d-md-flex > .mt-3.mt-md-0 .btn,
  .d-md-flex > .mt-3.mt-md-0 .badge {
    margin-top: 8px;
  }
}

@media (max-width: 575.98px) {
  body {
    font-size: 13px;
  }

  .card-body {
    padding: 14px;
  }

  .small-box .inner h3 {
    font-size: 26px;
  }

  .small-box .icon {
    display: none;
  }

  .btn {
    min-height: 38px;
  }

  .table thead th {
    font-size: 11px;
  }
}

/* Form observasi v1.4 */
.observation-wizard .card-header {
  display: block;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
}

.wizard-progress::before {
  background: var(--line);
  content: "";
  height: 3px;
  left: 8%;
  position: absolute;
  right: 8%;
  top: 18px;
}

.wizard-progress-item {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.wizard-progress-item span {
  align-items: center;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 50%;
  display: flex;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  transition: 0.2s ease;
  width: 38px;
}

.wizard-progress-item.active span {
  background: var(--pmj);
  border-color: var(--pmj);
  color: #fff;
}

.wizard-progress-item.current small {
  color: var(--pmj);
  font-weight: 700;
}

.section-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
}

.section-heading h4 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

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

.section-icon {
  align-items: center;
  background: var(--pmj-soft);
  border-radius: 12px;
  color: var(--pmj);
  display: flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.classification-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.classification-title {
  align-items: flex-start;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 15px 16px;
}

.classification-title h5 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 3px;
}

.classification-title small {
  color: var(--muted);
}

.classification-code {
  align-items: center;
  background: var(--pmj);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  text-transform: uppercase;
}

.classification-options {
  padding: 16px 18px;
}

.other-answer {
  background: #fff;
  border-left: 3px solid var(--pmj);
  border-radius: 6px;
  padding: 12px;
}

@media (max-width: 767.98px) {
  .wizard-progress-item small {
    display: none;
  }

  .wizard-progress::before {
    left: 10%;
    right: 10%;
  }

  .observation-wizard .card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .observation-wizard .card-footer > div {
    display: flex;
    gap: 8px;
    justify-content: space-between;
  }

  .observation-wizard .card-footer .btn {
    flex: 1 1 auto;
  }
}
