:root {
  --logo-blue: #89b6d6;
  --logo-yellow: #4a6b97;
  --logo-dark: #4a6b97;
  --logo-main: #89b6d6;
  --logo-dark-hover: #3f5c83;
  --ink: #1f2a44;
  --header-main: #edf3ff;
  --header-parent: #f4f7fd;
  --header-risk: #ffe9d8;
  --header-clinical: #f8e7f5;
  --header-text: #1f2a44;
}

@font-face {
  font-family: "Calibri";
  src: url("/fonts/calibri.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Calibri";
  src: url("/fonts/calibri.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  font-family: "Calibri", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  font-family: "Calibri", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #fffeff;
  color: var(--ink);
  font-size: 14px;
}

.app-header-double {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f8ff;
  padding: 8px 14px 6px 84px;
  box-shadow: 0 12px 30px -20px rgba(31, 42, 68, 0.35);
}

.app-header-double::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 0;
  background: transparent;
}

.app-header-double::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: transparent;
}

.header-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-left {
  font-weight: 800;
  text-align: left;
  letter-spacing: 0.2px;
  max-width: 60%;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-primary {
  color: #0b5ea8;
}

.brand-secondary {
  color: #0b5ea8;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.1;
}

.brand-text .brand-primary,
.brand-text .brand-secondary {
  line-height: 1.1;
  display: inline-block;
}

.header-logo {
  height: 34px;
  width: auto;
  display: block;
  position: relative;
  top: -2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: #fff;
}

.user-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--ink);
  min-width: 0;
  font-size: 12px;
  text-align: right;
}

.layout {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 12px 12px 48px 84px;
}

.hero-slogan {
  text-align: center;
  padding: 4px 12px 0;
  font-weight: 700;
  color: #1f2a44;
  font-size: 15px;
}

.hero-hashtag {
  margin-top: 4px;
  color: #1fa4e8;
  font-weight: 800;
}

.emoji-white {
  filter: brightness(0) saturate(100%) invert(55%) sepia(4%) saturate(320%) hue-rotate(180deg)
    brightness(96%) contrast(92%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.main-shell {
  display: block;
}

.app-footer {
  text-align: center;
  padding: 6px 12px 8px;
  font-size: 13px;
  color: #4a5368;
}

.dashboard-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 64px;
  background: var(--logo-dark);
  border: none;
  border-radius: 0;
  padding: 14px 8px 16px;
  box-shadow: 6px 0 18px -12px rgba(0, 0, 0, 0.4);
  align-self: stretch;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 3;
}

.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.sidebar-item {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.dashboard-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-actions button[type="button"],
.dashboard-actions button[type="submit"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.btn-icon-only {
  padding: 2px 4px;
  width: 20px !important;
  max-width: 20px !important;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-image {
  width: 19px;
  height: 19px;
  object-fit: contain;
  display: block;
}

.dashboard-actions .btn-icon-only {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.1s ease;
  color: #fff;
}

.dashboard-actions .btn-icon-only .btn-icon-image {
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

.icon-hover-label {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(31, 42, 68, 0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.7);
}

.has-hover-label:hover .icon-hover-label {
  opacity: 1;
  transform: translate(2px, -50%);
}

.dashboard-actions .btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.dashboard-actions .btn-icon-only:active {
  transform: translateY(0);
}

.sidebar-logo {
  margin-top: -8px;
}

.sidebar-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.btn-icon-edit {
  width: 23px;
  height: 23px;
}

.dashboard-actions .btn-icon-only .btn-icon-image.btn-icon-edit {
  width: 23px;
  height: 23px;
}

.btn-icon-location {
  width: 26px;
  height: 26px;
}

.dashboard-actions .btn-icon-only .btn-icon-image.btn-icon-location {
  width: 26px;
  height: 26px;
}

.btn-icon-small {
  width: 21px;
  height: 21px;
}

.dashboard-actions .btn-icon-only .btn-icon-image.btn-icon-small {
  width: 21px;
  height: 21px;
}

.btn-logout {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  min-width: auto;
}

.btn-icon-logout {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) saturate(100%) invert(34%) sepia(22%) saturate(960%) hue-rotate(173deg)
    brightness(92%) contrast(90%);
}

.page-stack {
  width: 100%;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.2px;
}

.nav {
  display: flex;
  gap: 10px;
}

.nav button {
  border: 1px solid var(--logo-dark);
  background: var(--logo-dark);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav button:hover {
  border-color: var(--logo-dark-hover);
  background: var(--logo-dark-hover);
}

.nav button.active {
  background: var(--logo-dark);
  color: #fff;
  border-color: var(--logo-dark);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.user-name {
  font-weight: 700;
  color: #1f2a44;
  font-size: 14px;
  line-height: 1.2;
}

.user-username {
  font-weight: 600;
  color: #5f6b85;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.btn-ghost {
  background: var(--logo-dark);
  color: #fff;
  border: 1px solid var(--logo-dark);
  padding: 9px 12px;
}

.btn-ghost:hover {
  background: #e9f5f8;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.card {
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin-top: 16px;
  box-shadow: 0 12px 26px -18px rgba(31, 42, 68, 0.18);
}

.card h2,
.card h3 {
  margin: -14px -16px 12px -16px;
  padding: 9px 14px;
  background: var(--header-main);
  color: var(--header-text);
  border-radius: 14px 14px 0 0;
  font-size: 15px;
  font-weight: 800;
}

#riwayat h3 {
  margin: 8px 0 8px 0;
  padding: 0;
  background: none;
  color: #1f2a44;
  border-radius: 0;
}

.card p {
  margin-top: 0;
  margin-bottom: 10px;
  color: #48526a;
}

.login-page {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.login-page.active {
  display: flex;
}

.login-card {
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 16px;
  padding: 14px 16px 16px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px -24px rgba(31, 42, 68, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card h1 {
  margin: 10px 0 4px;
  font-size: 18px;
}

.login-title-sub {
  margin: 4px 0 12px;
  color: #48526a;
  font-weight: 600;
}

.login-card p {
  margin: 0 0 16px;
  color: #48526a;
}

.login-error {
  color: #d32f2f;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.login-card form button {
  margin: 4px auto 0;
}

.login-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.login-actions button {
  flex: 1 1 0;
  min-width: 120px;
}

.logo-blue {
  color: #1fa4e8;
}

.logo-yellow {
  color: #f7c515;
}

.login-logo {
  width: 130px;
  max-height: 110px;
  height: auto;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
}


.login-card .logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.login-note {
  margin-top: 10px;
  color: #6b7285;
  font-size: 13px;
}

.meeting-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0;
}

.meeting-sticky {
  position: relative;
  top: auto;
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 10px 12px;
  background: #f5f7fb;
  border: 1px solid #d3dceb;
  border-radius: 14px;
}

.meeting-tab {
  background: #e7edff;
  border: 1px solid #d5dbf3;
  color: #24335f;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.meeting-tab:hover {
  background: #e1e6fb;
  border-color: #c7cfee;
  transform: translateY(-1px);
}

.meeting-tab.active {
  background: #4d5fae;
  border-color: #43549f;
  color: #fff;
  box-shadow: 0 6px 16px -12px rgba(31, 42, 68, 0.35);
}

.followup-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 320px;
  gap: 14px;
  align-items: start;
}

.followup-summary-card {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  position: static;
}

.visit-card {
  background: #fff;
}

.visit-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e5f0ff;
  padding: 8px 12px;
  border-radius: 18px 18px 0 0;
  border-bottom: 1px solid #dce6f5;
}

.visit-card__icon {
  font-size: 16px;
}

.visit-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.visit-card__title--dark {
  color: #000;
}

.visit-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 0 0 18px 18px;
}

.visit-patient {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visit-patient__name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.visit-patient__id {
  font-size: 12px;
  color: #6b7280;
}

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

.visit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.visit-field--full {
  grid-column: 1 / -1;
}

.visit-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.visit-label--bold {
  color: #4b5563;
}

.visit-value {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.visit-zscores {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.visit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.pill-yellow,
.followup-chip.zscore-stunted,
.zscore-stunted {
  background: #fff3d6;
  border-color: #f59e0b;
  color: #f59e0b;
}

.pill-blue,
.followup-chip.zscore-normal,
.zscore-normal {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.pill-purple,
.followup-chip.zscore-high,
.zscore-high {
  background: #ede9fe;
  border-color: #a855f7;
  color: #5b21b6;
}

.followup-chip.zscore-very-stunted,
.zscore-very-stunted {
  background: #ffe5e5;
  border-color: #ff0000;
  color: #ff0000;
}

.followup-text,
.visit-note-text {
  font-size: 12px;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
}

.followup-text strong {
  color: #1f2937;
}

.followup-placeholder {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
}

/* Modal biodata */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bio-modal.hidden {
  display: none;
}

.bio-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.bio-modal__content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  width: min(640px, 90%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  z-index: 1;
}

.bio-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bio-modal__title {
  font-weight: 800;
  font-size: 16px;
  color: #111827;
}

.bio-modal__close {
  background: #eef2ff;
  border: 1px solid #d5dbf3;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.bio-modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bio-modal__top {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.bio-modal-photo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.bio-modal__name {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.bio-modal__id {
  font-size: 12px;
  color: #6b7280;
}

.bio-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
}

@media (max-width: 900px) {
  .followup-columns {
    grid-template-columns: 1fr;
  }

  .followup-summary-card {
    position: relative;
    top: auto;
  }

  .bio-compact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bio-compact__meta {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .bio-compact__item {
    min-width: 120px;
  }

  .bio-compact__item:not(:last-child)::after {
    display: none;
  }
}

.form-section form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-block {
  border: 1px solid #e4e8f1;
  border-radius: 14px;
  padding: 14px;
  margin-top: 16px;
  background: #fff;
  box-shadow: 0 10px 24px -20px rgba(31, 42, 68, 0.22);
}

.section-block h4 {
  margin: -14px -14px 12px -14px;
  padding: 9px 12px;
  background: var(--header-main);
  color: var(--header-text);
  border-radius: 14px 14px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.block-parent {
  background: #fff;
  border-left: 1px solid #e3e7ee;
  border-top: none;
}

.block-risk {
  background: #fff;
  border-left: 1px solid #e3e7ee;
  border-top: none;
}

.block-clinical {
  background: #fff;
  border-left: 1px solid #e3e7ee;
  border-top: none;
}

.block-parent h4 {
  background: var(--header-parent);
}

.block-risk h4 {
  background: var(--header-risk);
}

.block-clinical h4 {
  background: var(--header-clinical);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 20px;
}

.form-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.form-grid textarea,
.form-grid.wide textarea {
  grid-column: 1 / -1;
}

.section-block .form-grid,
.section-block .form-grid.wide {
  row-gap: 22px;
}

.section-block .form-grid + .form-grid,
.section-block .form-grid + .form-grid.wide,
.section-block .form-grid.wide + .form-grid,
.section-block .form-grid.wide + .form-grid.wide {
  margin-top: 8px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: #1f2a44;
  font-size: 14px;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd6e3;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1f2a44;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #7fa7d8;
  border-color: #7fa7d8;
}

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

.text-small {
  font-size: 13px;
}

.text-small::placeholder {
  font-size: 12px;
}

.small-placeholder::placeholder {
  font-size: 12px;
}

.input-error {
  border-color: #d9534f !important;
  outline-color: #d9534f !important;
}

.upload-label {
  position: relative;
  gap: 8px;
  cursor: default;
}

.upload-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfd6e3;
  background: #fff;
  color: #1f2a44;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  width: 100%;
  min-height: 42px;
  transition: border-color 0.2s ease;
  line-height: 1.2;
}

.upload-field:hover {
  border-color: #7fa7d8;
}

.upload-field .upload-input {
  display: none;
}

.file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd6e3;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  background: #fff;
  color: #1f2a44;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  height: 42px;
  box-sizing: border-box;
}

.file-input:hover,
.file-input:focus {
  border-color: #7fa7d8;
  box-shadow: 0 0 0 2px rgba(127, 167, 216, 0.15);
  outline: none;
}

.upload-icon {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: auto;
  cursor: pointer;
}

.upload-filename {
  flex: 1;
  color: #4b5563;
  font-weight: 600;
  font-size: 13px;
  cursor: default;
  pointer-events: none;
  position: relative;
  top: 2px;
}

button[type="submit"],
button[type="button"] {
  width: fit-content;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid #7a8697;
  background: #7a8697;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button[type="submit"]:hover,
button[type="button"]:hover {
  background: #6b7687;
  border-color: #6b7687;
}

.filter-row {
  display: block;
  font-weight: 700;
}

.filter-title {
  margin-bottom: 6px;
  color: #1f2a44;
  font-size: 15px;
  line-height: 1.3;
}

.filter-input {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.filter-input input {
  flex: 1;
}

.search-icon-btn {
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  margin-left: 4px;
}

.search-icon-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.user-searchbar {
  min-width: 280px;
  box-shadow: 0 4px 12px -10px rgba(0, 0, 0, 0.15);
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
}

.riwayat-table th:nth-child(3),
.riwayat-table td:nth-child(3) {
  width: 120px;
  max-width: 140px;
}

.riwayat-table th:nth-child(1),
.riwayat-table td:nth-child(1) {
  width: 110px;
  max-width: 120px;
}

.riwayat-table th:nth-child(5),
.riwayat-table th:nth-child(6),
.riwayat-table th:nth-child(7),
.riwayat-table th:nth-child(8),
.riwayat-table th:nth-child(9),
.riwayat-table th:nth-child(10),
.riwayat-table th:nth-child(11),
.riwayat-table th:nth-child(12),
.riwayat-table td:nth-child(5),
.riwayat-table td:nth-child(6),
.riwayat-table td:nth-child(7),
.riwayat-table td:nth-child(8),
.riwayat-table td:nth-child(9),
.riwayat-table td:nth-child(10),
.riwayat-table td:nth-child(11),
.riwayat-table td:nth-child(12) {
  width: 100px;
  max-width: 110px;
  text-align: center;
}

.date-with-user {
  line-height: 1.2;
}

.date-with-user .by-user {
  font-size: 10px;
  color: #4b5563;
  font-weight: 500;
  margin-top: 2px;
}

.riwayat-table td.gizi-buruk {
  color: #ff0000;
  font-weight: 700;
}

.riwayat-table td.gizi-kurang {
  color: #f59e0b;
  font-weight: 700;
}

.riwayat-table th:nth-child(13),
.riwayat-table td:nth-child(13) {
  min-width: 220px;
}

.riwayat-table td.status-very-stunted {
  color: #ff0000;
  font-weight: 700;
}

.riwayat-table td.status-stunted {
  color: #f59e0b;
  font-weight: 700;
}

.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 0;
  font-size: 13px;
  color: #1f2a44;
}

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

.table-pagination button {
  min-width: 32px;
  height: 32px;
  width: 32px;
  border-radius: 50%;
  padding: 0;
  font-weight: 800;
  font-size: 14px;
  background: #6f8fc5;
  border: 1px solid #6f8fc5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.biodata-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f5f7ff 0%, #f1f4ff 100%);
  box-shadow: 0 10px 20px -18px rgba(31, 42, 68, 0.18);
  overflow: visible;
}

.biodata-card .placeholder {
  margin: 0;
  color: #6b7285;
  font-size: 12px;
}

.biodata-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 10px;
}

.biodata-header .value-main,
.biodata-header .value-sub,
.biodata-item .label,
.biodata-item .value {
  font-size: 13px;
}

.biodata-header .value-main {
  font-weight: 800;
  color: #1f2a44;
}

.biodata-header .value-sub {
  font-weight: 600;
  color: #48526a;
}

.biodata-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
}

.biodata-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.biodata-top .value-main {
  font-weight: 800;
  color: #1f2a44;
  font-size: 17px;
}

.biodata-top .value-sub {
  font-weight: 700;
  color: #48526a;
  font-size: 13px;
}

.biodata-photo {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #e3e7ee;
  background: #fff;
}

.biodata-photo.placeholder {
  display: grid;
  place-items: center;
  color: #6b7285;
  font-size: 11px;
}

.biodata-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bio-compact {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 0;
  overflow: visible;
  flex-wrap: wrap;
}

.bio-compact__left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bio-compact__identitas {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bio-compact__name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bio-compact__name {
  font-weight: 700;
  color: #111827;
  font-size: 15px;
}

.bio-compact__age-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bio-compact__age {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.bio-compact__id {
  font-size: 12px;
  color: #6b7280;
}

.bio-compact__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  width: auto;
  flex: 1;
  margin-left: auto;
  min-width: 320px;
}

.bio-compact__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px;
  position: relative;
  min-width: 140px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.bio-compact__item--lokasi {
  margin-left: auto;
  align-items: flex-end;
  text-align: right;
}

.bio-compact__item + .bio-compact__item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #e5e7eb;
}

.bio-compact__label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.bio-compact__value {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.bio-compact__actions {
  display: flex;
  justify-content: flex-end;
}

.bio-wrapper {
  overflow: visible;
}

.bio-mini-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.avatar-initial {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f5f7ff 0%, #e9efff 100%);
  color: #1f2a44;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}

.avatar-initial--modal {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  font-size: 20px;
}

.bio-risk .bio-compact__label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.risk-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.risk-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.risk-count {
  font-weight: 700;
  color: #1f2937;
  font-size: 13px;
}

.risk-eye {
  background: #eef2ff;
  border: 1px solid #d5dbf3;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.risk-eye:hover {
  background: #e1e6fb;
}

.risk-tooltip {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(8px, -50%);
  background: #111827;
  color: #f9fafb;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  min-width: 220px;
  max-width: 420px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: normal;
}

.risk-tooltip ul {
  margin: 0;
  padding-left: 16px;
  text-align: left;
  overflow-x: auto;
}

.risk-tooltip li {
  white-space: nowrap;
  margin-bottom: 4px;
}

.risk-inline.show-tooltip .risk-tooltip {
  opacity: 1;
  visibility: visible;
}

.photo-caption {
  font-weight: 700;
  color: #1f2a44;
  font-size: 13px;
}

.biodata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 18px;
}

.biodata-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.biodata-item .label {
  color: #6b7285;
  font-weight: 700;
}

.biodata-item .value {
  font-weight: 600;
  color: #1f2a44;
}

.suggestions {
  position: relative;
  z-index: 2;
}

.suggestions .suggestion-item {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13px;
}

.suggestions .suggestion-item strong {
  color: #1f2a44;
}

.suggestions .suggestion-item span {
  color: #6b7285;
  margin-left: 6px;
}

.suggestions .suggestion-item:hover {
  background: #f1f6ff;
}

.redflag-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #1f2a44;
}

.redflag-list li {
  margin-bottom: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#riwayat table {
  font-size: 12px;
}

#riwayat th {
  font-size: 12px;
}

#riwayat td:nth-child(3),
#riwayat td:nth-child(4),
#riwayat td:nth-child(12) {
  font-size: 12px;
}

#riwayat td:nth-child(13) {
  font-size: 12px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e3e7ee;
  text-align: center;
}

th {
  background: #f5f7fa;
  color: #1f2a44;
  font-size: 12px;
}

/* Sorot kolom BB dan TB dengan warna logo transparan */
table th:nth-child(5),
table td:nth-child(5) {
  background: rgba(31, 164, 232, 0.12);
}

table th:nth-child(6),
table td:nth-child(6) {
  background: rgba(247, 197, 21, 0.16);
}

/* Lebar kolom riwayat follow-up */
table th:nth-child(1),
table td:nth-child(1) {
  width: 120px;
}

table th:nth-child(2),
table td:nth-child(2) {
  width: 80px;
}

table th:nth-child(3),
table td:nth-child(3) {
  min-width: 240px;
}

tr:nth-child(even) td {
  background: #fbfcfe;
}

/* Pastikan warna sorot BB/TB tidak tertimpa striping */
tr:nth-child(even) td:nth-child(5) {
  background: rgba(31, 164, 232, 0.12);
}

tr:nth-child(even) td:nth-child(6) {
  background: rgba(247, 197, 21, 0.16);
}

.z-low {
  color: #c62828;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.info-hitung {
  margin-top: 8px;
}

.actions-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 14px;
  font-weight: 600;
}

.actions-bar button {
  padding: 9px 12px;
}

.perokok-detail.hidden {
  display: none;
}

textarea[readonly] {
  background: #f4f6fb;
}

.growth-result {
  margin-top: 14px;
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.growth-chart {
  margin-top: 14px;
  background: #f8fbff;
  border: 1px solid #dce3ee;
  border-radius: 12px;
  padding: 12px;
}

.growth-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.growth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.growth-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.growth-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 10px;
  font-size: 13px;
}

.growth-placeholder {
  color: #6b7285;
  font-size: 13px;
}

.superadmin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.superadmin-form button {
  align-self: end;
  height: auto;
  padding: 9px 14px;
}

.user-table-actions button {
  padding: 0;
  font-size: 12px;
}

.user-table-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent !important;
}

#page-superadmin table td.user-table-actions {
  background: transparent !important;
}

.user-table-name {
  min-width: 180px;
}

.user-filter {
  margin: 10px 0 16px;
  gap: 8px;
}

.user-filter input {
  max-width: 220px;
}

.user-filter button {
  padding: 10px 16px;
  min-width: 90px;
}

#page-superadmin table th,
#page-superadmin table td {
  height: 44px;
  vertical-align: middle;
}

.edit-history-card .table {
  width: 100%;
  border-collapse: collapse;
}

.edit-history-card th,
.edit-history-card td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #e3e7ee;
  font-size: 13px;
}

.edit-history-card th {
  background: #f4f6fb;
}

.edit-history-card tbody tr:hover {
  background: #f7faff;
}

.btn-delete-user {
  width: 34px;
  height: 26px;
  border-radius: 0;
  background: #f36c6c !important;
  border: 1px solid #e75b5b !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
  vertical-align: middle;
  line-height: 0;
}

.btn-delete-user:hover {
  background: #c62828;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.65);
  transform: translateY(-1px);
}

.btn-delete-user:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -10px rgba(0, 0, 0, 0.6);
}

.btn-delete-user img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.btn-edit-user {
  width: 44px;
  height: 26px;
  border-radius: 0;
  background: #2f4f7f !important;
  border: 1px solid #2a466f !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
  vertical-align: middle;
  line-height: 0;
}

.btn-edit-user img.user-action-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.user-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-modal.hidden {
  display: none;
}

.user-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.user-modal__content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  width: min(420px, 90%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.35);
  z-index: 1;
  border: 1px solid #e5e7eb;
}

.user-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.user-modal__title {
  font-weight: 800;
  font-size: 16px;
  color: #111827;
}

.user-modal__close {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.user-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-modal__body label {
  font-weight: 700;
  color: #1f2a44;
  font-size: 13px;
}

.user-modal__body input {
  width: 100%;
}

.user-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.notify-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-modal.hidden {
  display: none;
}

.notify-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.notify-modal__content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  width: min(320px, 90%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.35);
  z-index: 1;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.notify-modal__body {
  font-weight: 800;
  color: #1f2a44;
  margin-bottom: 12px;
}

.notify-modal__close {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #7a8697;
  background: #7a8697;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.form-section label {
  gap: 10px;
  margin-bottom: 6px;
}

#form-edit-followup {
  gap: 18px;
}

#form-edit-followup button[type="submit"] {
  margin-top: 8px;
}

#page-superadmin .card h2,
#page-superadmin .card h3 {
  background: none;
  color: var(--ink);
  padding: 0;
  margin: 0 0 10px 0;
  border-radius: 0;
}

.text-muted {
  color: #5f6782;
  font-size: 13px;
  margin: 4px 0 0;
}

.lokasi-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}

.lokasi-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.lokasi-filter-card {
  padding: 16px;
  height: 100%;
}

.lokasi-summary-cardwrap {
  min-height: 100%;
}

.lokasi-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.section-title-sm {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.section-subtitle {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.lokasi-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lokasi-filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  color: #1f2a44;
  font-size: 14px;
}

.lokasi-filter select {
  min-width: 220px;
}

.lokasi-summary-cardwrap {
  min-height: 100%;
  height: 100%;
}

.lokasi-header > div:first-child {
  width: 100%;
}

.lokasi-header h2 {
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-right: -16px;
  display: block;
}

.lokasi-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lokasi-filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  color: #1f2a44;
}

.lokasi-filter select {
  min-width: 200px;
}

.lokasi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 4px 0 0;
}

.lokasi-summary-card {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.lokasi-name {
  font-weight: 800;
  color: var(--ink);
  font-size: 16px;
}

.lokasi-total {
  color: #667085;
  font-size: 13px;
  margin: 2px 0 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.lokasi-chart-wrap {
  margin-top: 6px;
}

.lokasi-chart {
  width: 100%;
  max-width: 100%;
  min-height: 100px;
  height: 100px;
}

.location-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin-top: 8px;
}

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

.legend-title {
  font-weight: 700;
  color: #111827;
  font-size: 13px;
  font-family: "Calibri", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
  font-family: "Calibri", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.legend-dot {
  width: 14px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.legend-very-stunted {
  background: #f9a8a8;
}

.legend-stunted {
  background: #fbbf77;
}

.legend-tinggi-normal {
  background: #93c5fd;
}

.legend-gizi-buruk {
  background: #f97373;
}

.legend-gizi-kurang {
  background: #fdba74;
}

.legend-gizi-normal {
  background: #60a5fa;
}

.chip-legend {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1.2;
}

.status-badge.badge-buruk {
  background: #ffe5e5;
  border-color: #ff0000;
  color: #ff0000;
}

.status-badge.badge-rendah {
  background: #fff3d6;
  border-color: #f59e0b;
  color: #f59e0b;
}

.status-badge.badge-normal {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.timeline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.timeline-filter label {
  font-weight: 700;
  color: #374151;
}

.timeline-filter select {
  min-width: 140px;
}

.timeline-card {
  margin-top: 16px;
}

.timeline-table-wrapper {
  margin-top: 8px;
  overflow-x: auto;
  padding: 6px;
  background: #f6f7fb;
  border-radius: 12px;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border-radius: 10px;
  overflow: visible;
}

.timeline-table thead th {
  background: #eef0fb;
  color: #3b4256;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #e1e4f0;
  padding: 12px 10px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.timeline-head-row th:first-child {
  min-width: 220px;
  text-align: center;
  padding-left: 0;
}

.timeline-subhead th.metric-label {
  text-align: center;
}

.timeline-head-row th.date-group {
  background: #eef0fb;
  border-color: #e1e4f0;
  min-width: 110px;
  max-width: 110px;
  white-space: nowrap;
  text-align: center;
}


.timeline-table tbody tr:nth-child(even) {
  background: #fff;
}

.timeline-table tbody tr:nth-child(odd) {
  background: #fff;
}

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

.timeline-table tbody td {
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #eef0f5;
  font-size: 12px;
  border-right: 1px solid #f1f3f7;
}

.timeline-subhead th {
  width: 80px;
}

.child-cell .name-block .value-main {
  font-size: 16px;
  font-weight: 800;
}

.child-cell .value-sub {
  color: #4b5563;
}

.timeline-cell {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cell-rm {
  font-weight: 700;
  color: #111827;
  text-align: center;
}

.cell-name {
  text-align: left;
}

.col-name-span {
  width: 240px;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 6px 0 12px -10px rgba(0, 0, 0, 0.25);
}

.timeline-table thead th.sticky-col {
  z-index: 3;
}

.timeline-table tbody tr:hover .sticky-col {
  background: #eef2ff;
}

.child-name {
  font-weight: 700;
  color: #1f2937;
}

.child-id {
  font-size: 11px;
  color: #4b5563;
}

.timeline-table tbody td.zcell {
  font-weight: 700;
  text-align: center;
  border-radius: 0;
  padding: 10px 8px;
  background: #fff;
  color: #111827;
  border: none;
}

.timeline-table tbody td.zcell.zscore-very-stunted {
  color: #ff0000;
}

.timeline-table tbody td.zcell.zscore-stunted {
  color: #f59e0b;
}

.timeline-table tbody td.zcell.zscore-normal {
  color: #1d4ed8;
}

.timeline-table tbody td.zcell.zscore-high {
  color: #5b21b6;
}

.timeline-table tbody td.zcell.zscore-empty {
  background: #f8fafc;
  color: #6b7280;
  font-size: 12px;
}

.timeline-table tbody td.zcell {
  min-width: 110px;
  max-width: 110px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid transparent;
}

.timeline-date {
  font-size: 12px;
  color: #4b5563;
  font-weight: 600;
}

.timeline-zscore {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.timeline-dot.badge-buruk {
  background: #fecaca;
  border-color: #f87171;
}

.timeline-dot.badge-rendah {
  background: #fef3c7;
  border-color: #fbbf24;
}

.timeline-dot.badge-normal {
  background: #dbeafe;
  border-color: #60a5fa;
}

.timeline-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-headline h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}

.timeline-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timeline-searchbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  padding: 7px 12px;
  background: #fff;
  min-width: 260px;
  box-shadow: 0 4px 12px -10px rgba(0, 0, 0, 0.2);
  height: 40px;
}

.timeline-search-icon {
  width: 16px;
  height: 16px;
  display: block;
  filter: invert(32%) sepia(8%) saturate(553%) hue-rotate(186deg) brightness(92%) contrast(86%);
}

.timeline-searchbar input {
  border: none;
  outline: none;
  font-size: 13px;
  background: transparent;
  flex: 1;
}

.timeline-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-wrap: wrap;
}

.timeline-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dfe3ec !important;
  border-radius: 12px;
  background: #fff !important;
  cursor: pointer;
  box-shadow: 0 4px 12px -14px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: 700;
  color: #3b4256 !important;
  line-height: 1;
}

.timeline-filter-pill:hover {
  background: #fff !important;
  border-color: #cfd6e3;
  box-shadow: 0 6px 14px -14px rgba(0, 0, 0, 0.35);
}

.timeline-filter-pill img {
  width: 16px;
  height: 16px;
  display: block;
  filter: invert(32%) sepia(8%) saturate(553%) hue-rotate(186deg) brightness(92%) contrast(86%);
}

.timeline-filter-pill span {
  color: #3b4256;
}

.timeline-filter-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.timeline-filter-modal.hidden {
  display: none;
}

.timeline-filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.timeline-filter-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  width: min(320px, 90%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.35);
  z-index: 1;
  border: 1px solid #e4e8f1;
}

.timeline-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.timeline-filter-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.timeline-filter-close {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  gap: 6px;
}

.filter-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.filter-status-options {
  display: grid;
  gap: 10px;
}

.filter-status-options label {
  font-weight: 600;
  color: #4b5563;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
}

.filter-status-options input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  display: inline-block;
  padding: 0;
  box-sizing: border-box;
  background: #fff;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}

.filter-status-options input[type="checkbox"]:checked {
  border-color: #9ca3af;
  background: #fff;
}

.filter-status-options input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b5563;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
}

.filter-actions button {
  padding: 8px 12px;
  font-size: 12px;
}

.timeline-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.timeline-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1f2a44;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d6dbf5;
}


.zscore-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.zscore-table thead th {
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.zscore-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.ztable-date {
  font-size: 12px;
  color: #4b5563;
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.ztable-score {
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.zscore {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 600;
  text-align: center;
}

.zscore-very-stunted {
  background: #ffe5e5;
  color: #ff0000;
}

.zscore-stunted {
  background: #fff3d6;
  color: #f59e0b;
}

.zscore-normal {
  background: #dbeafe;
  color: #1d4ed8;
}

.zscore-high {
  background: #ede9fe;
  color: #5b21b6;
}

.chip-buruk {
  background: #fecaca;
  border-color: #f87171;
  color: #b91c1c;
}

.chip-rendah {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}

.chip-normal {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.dot.chip-buruk {
  background: #f87171;
  border: none;
}

.dot.chip-rendah {
  background: #fbbf24;
  border: none;
}

.dot.chip-normal {
  background: #60a5fa;
  border: none;
}

.table-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

#page-lokasi .table-headline h3 {
  margin: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  border-radius: 0;
}

.progress-table th,
.progress-table td {
  text-align: left;
  vertical-align: middle;
  padding: 8px 10px;
  border-bottom: 0;
}

#page-lokasi .progress-table td:first-child {
  vertical-align: top;
}

.progress-table {
  width: 100%;
  border-collapse: collapse;
}

#page-lokasi .progress-table tbody tr {
  border-bottom: 1px solid #dfe3eb;
}

#page-lokasi .progress-table tbody tr:nth-child(even) {
  background: #f4f6fa;
}

#page-lokasi .progress-table tbody td {
  background: transparent;
}

.progress-table td:nth-child(4),
.progress-table td:nth-child(5),
.progress-table th:nth-child(4),
.progress-table th:nth-child(5) {
  background: #fff;
}

.progress-table tr:nth-child(even) td:nth-child(4),
.progress-table tr:nth-child(even) td:nth-child(5) {
  background: #fbfcfe;
}

.progress-wrap {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.progress-chip {
  border: 1px solid #dfe6f3;
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 110px;
  background: #fff;
  box-shadow: 0 6px 20px -14px rgba(31, 42, 68, 0.4);
}

.progress-chip .chip-date {
  font-size: 11px;
  color: #6b7285;
}

.progress-chip .chip-main {
  font-weight: 800;
  font-size: 15px;
  color: #1f2a44;
}

.progress-chip .chip-sub {
  font-size: 12px;
  color: #2f3448;
}

.progress-chip.chip-buruk {
  background: #fff1ed;
  border-color: #e9b9ad;
}

.progress-chip.chip-rendah {
  background: #fff6e7;
  border-color: #f2d08b;
}

.progress-chip.chip-normal {
  background: #f1f9ff;
  border-color: #c2e5fb;
}

.timeline-cell {
  display: grid;
  gap: 2px;
  padding-left: 0;
}

.timeline-title {
  font-weight: 700;
  color: #1f2a44;
  margin-bottom: 6px;
}

.timeline-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-block + .timeline-block {
  margin-top: 8px;
}

.inline-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.inline-scroll .progress-chip {
  min-width: 110px;
}

.placeholder-cell {
  text-align: center !important;
  color: #5f6782;
  font-style: italic;
}

.name-block .value-main {
  font-weight: 800;
  color: #1f2a44;
}

.name-block .value-sub {
  color: #5f6782;
  font-size: 12px;
}

.lokasi-tag {
  color: #7a839c;
  font-size: 11px;
}

.progress-table td:first-child {
  width: 1%;
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 4px;
}

.progress-table th:first-child {
  padding-left: 6px;
  padding-right: 4px;
}

@media (max-width: 640px) {
  .main-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nav {
    width: 100%;
  }

  .nav button {
    flex: 1;
  }

  .filter-input {
    flex-direction: column;
    align-items: stretch;
  }

  .lokasi-header {
    flex-direction: column;
  }

  .lokasi-filter {
    align-items: stretch;
  }

  .progress-wrap {
    flex-direction: column;
  }

  .progress-chip {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .lokasi-top-grid {
    grid-template-columns: 1fr;
  }

}
