﻿.goal1-backdrop { position: fixed; inset: 0; z-index: 99990; background: rgba(15,23,42,.44); display: grid; place-items: start center; overflow: auto; padding: 34px 18px; }
.goal1-dialog { width: min(1080px, 100%); background: #fff; border: 1px solid #dbe4ee; border-radius: 18px; box-shadow: 0 28px 90px rgba(15,23,42,.22); padding: 18px; color: #0f172a; }
.goal1-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.goal1-head h2 { margin: 2px 0 4px; font-size: 24px; }
.goal1-head p { margin: 0; color: #64748b; }
.goal1-kicker { display: inline-flex; border-radius: 999px; background: #ccfbf1; color: #115e59; padding: 4px 9px; font-weight: 800; font-size: 12px; }
.goal1-grid { display: grid; gap: 10px; margin-bottom: 12px; }
.goal1-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.goal1-card { border: 1px solid #dbe4ee; border-radius: 14px; padding: 12px; background: #fff; }
.goal1-card.danger { border-color: #fecaca; background: #fff7f7; }
.goal1-card b { display: block; margin-bottom: 5px; }
.goal1-card span, .goal1-card p { color: #475569; }
.goal1-section-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.goal1-history { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 8px; padding: 7px 0; border-top: 1px solid #eef2f7; }
.goal1-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.goal1-form .wide { grid-column: 1 / -1; }
.goal1-form button.primary { background: #0f766e; color: #fff; border-color: #0f766e; font-weight: 800; }
.goal1-status { grid-column: 1 / -1; min-height: 22px; color: #64748b; }
.goal1-status.ok { color: #166534; font-weight: 800; }
.goal1-status.error { color: #b91c1c; font-weight: 800; }
.goal1-toast { position: fixed; right: 18px; bottom: 18px; z-index: 100000; background: #0f766e; color: #fff; border-radius: 999px; padding: 11px 16px; font-weight: 800; box-shadow: 0 18px 50px rgba(15,23,42,.22); }
.goal1-mojibake-warning { outline: 2px dashed #dc2626; outline-offset: 2px; }
@media (max-width: 820px) { .goal1-grid-3, .goal1-form { grid-template-columns: 1fr; } .goal1-history { grid-template-columns: 1fr; } }
.goal1-flow-panel { border-color: #99f6e4 !important; background: linear-gradient(180deg, #ffffff, #f0fdfa) !important; }
.goal1-flow-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.goal1-flow-columns h3 { font-size: 16px; margin: 0 0 8px; }
.goal1-mini-row { display: grid; grid-template-columns: minmax(0,1.4fr) 140px auto; gap: 10px; align-items: center; border: 1px solid #dbe4ee; border-radius: 12px; padding: 10px; background: #fff; margin-bottom: 8px; }
.goal1-mini-row b { display: block; }
.goal1-mini-row span { color: #64748b; font-size: 13px; }
.goal1-mini-actions { display: flex; justify-content: flex-end; }
.goal1-badge, .goal1-row-status { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; margin-top: 4px; }
.goal1-badge.paid, .goal1-row-status.paid { background: #dcfce7; color: #166534; }
.goal1-row-status.pending { background: #fef3c7; color: #92400e; }
@media (max-width: 900px) { .goal1-flow-columns, .goal1-mini-row { grid-template-columns: 1fr; } .goal1-mini-actions { justify-content: stretch; } }
.goal1-attendance-status { display: inline-flex; width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; margin-top: 4px; }
.goal1-attendance-status.present { background: #dcfce7; color: #166534; }
.goal1-attendance-status.absent { background: #fee2e2; color: #991b1b; }
.goal1-language-panel { border-color: #bfdbfe !important; background: #eff6ff !important; }
.goal1-language-list { display: grid; gap: 6px; color: #991b1b; font-size: 13px; }
.goal1-language-list div { padding: 8px 10px; border: 1px solid #fecaca; background: #fff7f7; border-radius: 10px; }
.goal1-control-strip { border-color: #a7f3d0 !important; background: linear-gradient(180deg, #ffffff, #f0fdf4) !important; }
.goal1-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.goal1-step { border: 1px solid #dbe4ee; border-radius: 12px; padding: 9px 10px; background: #fff; }
.goal1-step b { display: block; font-size: 13px; }
.goal1-step span { color: #64748b; font-size: 12px; }
.goal1-step.ok { border-color: #86efac; background: #f0fdf4; }
.goal1-step.hold { border-color: #fde68a; background: #fffbeb; }
.goal1-control-list { margin-top: 12px; }
.goal1-control-list h3 { font-size: 16px; margin: 0 0 8px; }
.goal1-control-row { display: grid; grid-template-columns: minmax(0,1.4fr) 130px auto; gap: 10px; align-items: center; border: 1px solid #dbe4ee; border-radius: 12px; padding: 9px 10px; background: #fff; margin-bottom: 7px; }
.goal1-control-row b { display: block; }
.goal1-control-row span { color: #64748b; font-size: 12px; }
.goal1-badge.pending { background: #fef3c7; color: #92400e; }
.goal1-control-note { margin: 10px 0 0; color: #64748b; }
@media (max-width: 1100px) { .goal1-steps { grid-template-columns: repeat(2, minmax(0,1fr)); } .goal1-control-row { grid-template-columns: 1fr; } }

/* Goal 1 clinical chart recovery */
.goal1-clinical-panel {
  border: 1px solid #cfe3df;
  background: #f8fdfb;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}
.goal1-clinical-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.goal1-clinical-head strong {
  display: block;
  font-size: 18px;
  color: #102030;
}
.goal1-clinical-head small,
.goal1-photo-field small {
  display: block;
  color: #5b6f86;
  margin-top: 4px;
}
.goal1-clinical-badge {
  background: #d8f5e5;
  color: #09623d;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  white-space: nowrap;
}
.goal1-clinical-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 12px;
}
.goal1-clinical-field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #142235;
}
.goal1-clinical-field.is-wide {
  grid-column: 1 / -1;
}
.goal1-clinical-field input[type="text"],
.goal1-clinical-field input:not([type]),
.goal1-clinical-field input[list] {
  width: 100%;
  border: 1px solid #d6e0eb;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  background: #fff;
}
.goal1-surface-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.goal1-surface-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.goal1-surface-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d6e0eb;
  border-radius: 999px;
  background: #fff;
  color: #26384d;
  font-weight: 700;
  cursor: pointer;
}
.goal1-surface-pill input:checked + span {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.goal1-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #5b6f86;
  font-weight: 600;
}
.goal1-photo-row input {
  max-width: 280px;
}
.goal1-photo-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 72px;
  border: 1px dashed #bfd4df;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  color: #6b7d90;
  align-items: center;
}
.goal1-photo-item {
  width: 118px;
  margin: 0;
}
.goal1-photo-thumb {
  width: 118px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: #ecf4f3;
  color: #60758a;
  font-size: 12px;
  text-align: center;
}
.goal1-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.goal1-photo-item figcaption {
  margin-top: 5px;
  font-size: 12px;
  color: #50677f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal1-clinical-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 16px 38px rgba(15, 35, 55, 0.22);
  font-weight: 800;
}
.goal1-clinical-toast.is-bad {
  background: #b42318;
}
@media (max-width: 760px) {
  .goal1-clinical-grid {
    grid-template-columns: 1fr;
  }
  .goal1-clinical-head {
    display: block;
  }
  .goal1-clinical-badge {
    display: inline-flex;
    margin-top: 8px;
  }
}
.goal1-clinical-payment-card {
  border: 1px solid #cfe3df;
  background: #f8fdfb;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}
.goal1-payment-clinical-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.goal1-payment-clinical-grid div {
  border: 1px solid #dbe4ee;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
}
.goal1-payment-clinical-grid b,
.goal1-payment-clinical-grid span {
  display: block;
}
.goal1-payment-clinical-grid span {
  color: #475569;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .goal1-payment-clinical-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .goal1-payment-clinical-grid {
    grid-template-columns: 1fr;
  }
}

.goal1-payment-clinical-inline {
  border-color: #99f6e4 !important;
  background: #f8fdfb !important;
}

.goal1-calendar-guide { border-color: #99f6e4 !important; background: linear-gradient(180deg, #ffffff, #f0fdfa) !important; }
.goal1-guide-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.goal1-guide-step { border: 1px solid #dbe4ee; border-radius: 12px; padding: 10px; background: #fff; }
.goal1-guide-step b, .goal1-guide-step span { display: block; }
.goal1-guide-step span { color: #64748b; margin-top: 4px; font-size: 13px; }
.goal1-guide-step.ok { border-color: #86efac; background: #f0fdf4; }
.goal1-guide-step.hold { border-color: #fde68a; background: #fffbeb; }
.goal1-guide-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; color: #64748b; }
.goal1-guide-highlight { outline: 3px solid #14b8a6 !important; outline-offset: 3px; transition: outline .2s ease; }
@media (max-width: 1100px) { .goal1-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .goal1-guide-grid { grid-template-columns: 1fr; } }
