/* Custom styling for PATHWAY-PPA */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cinzel:wght@600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

.implementation-recap-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:5px; border:1px solid #dbe4ef; border-radius:16px; background:#edf2fa; width:fit-content; }
.implementation-recap-tabs button { padding:10px 18px; border-radius:12px; font-weight:700; font-size:13px; color:#475569; }
.implementation-recap-tabs button[aria-pressed="true"] { background:#213d83; color:white; box-shadow:0 2px 5px #1e3a8a22; }
#implementation-meetings-pane[hidden], #implementation-recap-pane[hidden], .health-recap-panel [hidden] { display:none !important; }
.health-recap-panel { padding:24px; border:1px solid #dbe4ef; border-radius:24px; background:white; box-shadow:0 4px 18px #0f172a05; }
.health-recap-panel h3 { font-size:20px; font-weight:800; color:#133c3a; margin:5px 0; }
.health-recap-panel header p, #health-recap-message, .health-recap-footnote { font-size:12px; line-height:1.7; color:#64748b; }
.health-recap-filters { display:grid; grid-template-columns:1fr 1fr 1.3fr 1.8fr auto; align-items:end; gap:12px; padding:20px 0; }
.health-recap-filters label { display:grid; gap:6px; min-width:0; font-size:12px; font-weight:700; color:#334155; }
.health-recap-filters input,.health-recap-filters select { width:100%; min-width:0; padding:10px; border:1px solid #cbd5e1; border-radius:10px; background:white; font-size:12px; font-weight:500; }
.health-recap-filters button { padding:11px 18px; border-radius:10px; background:#047857; color:white; font-size:12px; font-weight:700; }
.health-recap-filters button:disabled { opacity:.5; cursor:wait; }
.health-recap-summary { margin:16px 0; padding:12px 14px; border-radius:12px; background:#ecfdf5; color:#065f46; font-size:12px; font-weight:600; line-height:1.7; }
.health-recap-scroll { overflow-x:auto; border:1px solid #e2e8f0; border-radius:12px; }
.health-recap-table { width:100%; min-width:850px; font-size:12px; border-collapse:collapse; text-align:left; }
.health-recap-table caption { text-align:left; padding:10px 12px; color:#64748b; font-size:11px; }
.health-recap-table th { padding:12px; color:#334155; background:#f1f5f9; font-weight:700; white-space:nowrap; }
.health-recap-table td { padding:12px; border-top:1px solid #e2e8f0; vertical-align:top; color:#334155; line-height:1.6; }
.health-recap-table tbody tr:hover { background:#f8fafc; }
.health-recap-table td small { display:block; font-size:10px; color:#64748b; font-weight:400; margin-top:4px; }
.health-recap-table td button { color:#1d4ed8; font-weight:700; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.health-recap-table td p { white-space:pre-wrap; overflow-wrap:anywhere; margin-top:6px; min-width:180px; max-width:420px; }
.health-recap-footnote { margin-top:12px; }
#health-recap-detail { padding-top:24px; margin-top:24px; border-top:1px solid #e2e8f0; scroll-margin-top:24px; }
#health-recap-detail h4 { font-size:16px; font-weight:800; color:#0f172a; }
#health-recap-detail-period { margin:5px 0 14px; color:#64748b; font-size:12px; }
@media(max-width:1000px) { .health-recap-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .health-recap-panel { padding:16px; } .health-recap-filters { grid-template-columns:minmax(0,1fr); } .implementation-recap-tabs { width:100%; } .implementation-recap-tabs button { flex:1; padding:10px; } }

/* Base Page Scrolling: Ensure entire screen always scrolls vertically with a clean track */
html {
  overflow-y: scroll !important;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto !important;
}

/* Only lock background scrolling if a modal dialog is actively visible */
body.modal-open {
  overflow: hidden !important;
}

/* Custom Global Desktop Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.font-serif-title {
  font-family: 'Playfair Display', serif;
}

.font-cert-title {
  font-family: 'Cinzel', serif;
}

/* Print specific styles for Rapor & Certificates */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  .print-sheet {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    page-break-after: always;
  }
}

@media screen {
  .print-only {
    display: none;
  }
}

/* Certificate Borders */
.cert-border-outer {
  border: 12px double #1e3a8a;
  position: relative;
  background-color: #fffdf7;
}

.cert-border-inner {
  border: 2px solid #b45309;
  margin: 6px;
  padding: 32px;
}

/* Watermark */
.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  font-size: 8rem;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
  text-align: center;
  color: #1e3a8a;
}

/* Hide scrollbars everywhere on nav elements & clean overflow */
.no-scrollbar::-webkit-scrollbar,
nav::-webkit-scrollbar,
header::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.no-scrollbar,
nav,
header {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Perfect Responsive Modal Positioning & Behavior (Adapts to Height & Width) */
.modal-overlay {
  display: none !important;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.flex:not(.hidden) {
  display: flex !important;
}

@media (min-height: 850px) {
  .modal-overlay.flex:not(.hidden) {
    align-items: center;
  }
}

.modal-dialog {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  max-height: calc(100vh - 2rem) !important;
}

@media (min-height: 850px) {
  .modal-dialog {
    margin-top: auto !important;
    margin-bottom: auto !important;
  }
}

/* Sleek Thin Scrollbar for Modal Dialogs & Login */
[id^="modal-"] form::-webkit-scrollbar,
[id^="modal-"] .overflow-y-auto::-webkit-scrollbar,
#modal-preview-body::-webkit-scrollbar,
#login-overlay .overflow-y-auto::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

[id^="modal-"] form::-webkit-scrollbar-track,
[id^="modal-"] .overflow-y-auto::-webkit-scrollbar-track,
#modal-preview-body::-webkit-scrollbar-track,
#login-overlay .overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}

[id^="modal-"] form::-webkit-scrollbar-thumb,
[id^="modal-"] .overflow-y-auto::-webkit-scrollbar-thumb,
#modal-preview-body::-webkit-scrollbar-thumb,
#login-overlay .overflow-y-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

[id^="modal-"] form::-webkit-scrollbar-thumb:hover,
[id^="modal-"] .overflow-y-auto::-webkit-scrollbar-thumb:hover,
#modal-preview-body::-webkit-scrollbar-thumb:hover,
#login-overlay .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================
   CLEAN UI TRANSITIONS
========================================== */
.nav-tab {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tab:hover {
  transform: translateY(-1px);
}

/* Keep long filters and form actions reachable on small screens. */
@media (max-width: 640px) {
  #view-reports select,
  #view-reports input[type="text"] {
    max-width: 100%;
  }
  #view-reports .overflow-x-auto,
  #view-staff .overflow-x-auto,
  #view-attendance .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}
.pathway-theme {
  background: #f8f6ef;
}

.pathway-header {
  background: linear-gradient(110deg, #183f38, #24564b 58%, #254845);
  border-color: #366558;
}

.pathway-header .nav-tab[aria-selected="true"],
.pathway-header .nav-tab.bg-blue-700,
.pathway-header .nav-tab.bg-blue-800 {
  background: #f3ce84;
  color: #203e35;
}

.pathway-workspace {
  max-width: 100rem;
  margin-inline: auto;
}

.pathway-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 15rem);
  align-items: center;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  color: #203f36;
  background: linear-gradient(115deg, #fff7e4, #edf4e9);
  border: 1px solid #dfdfc9;
  border-radius: 1.75rem;
}

.pathway-eyebrow {
  color: #496552;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pathway-hero h1 {
  margin: .25rem 0 .5rem;
  font-size: clamp(1.85rem, 5vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
}

.pathway-journey {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-top: 1.15rem;
  font-size: .82rem;
  font-weight: 700;
}

.pathway-journey span {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: .25rem;
  border-radius: 50%;
  background: #dcebdc;
}

.pathway-hero-art {
  width: 100%;
  max-height: 10rem;
}

.pathway-pillars [data-dashboard-pillar] {
  border-top: .25rem solid var(--pillar-color, #c58b53);
}

.pathway-pillars [data-dashboard-pillar="Kognitif"] { --pillar-color: #4c839e; }
.pathway-pillars [data-dashboard-pillar="Sosio-Emosional"] { --pillar-color: #a56278; }
.pathway-pillars [data-dashboard-pillar="Fisik"] { --pillar-color: #528466; }

@media (max-width: 540px) {
  .pathway-hero {
    grid-template-columns: 1fr;
  }

  .pathway-hero-art {
    width: 8rem;
    justify-self: end;
  }
}
/* Implementation: a visible agenda grouped by program. */
.implementation-planner { background: #fff; border: 1px solid #dce7e2; border-radius: 24px; overflow: hidden; box-shadow: 0 8px 28px #174a3510; }
.implementation-planner-heading { display: flex; justify-content: space-between; gap: 20px; padding: 26px; background: linear-gradient(120deg,#eaf7f0,#fff8e7); }
.implementation-eyebrow { color: #39725d; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.implementation-planner-heading h3 { font-size: 21px; font-weight: 800; color: #194733; margin: 6px 0; }
.implementation-planner-heading p { font-size: 13px; color: #52675d; }
.implementation-planner-icon { align-self: center; background: #fff; border-radius: 18px; padding: 12px 20px; font-size: 28px; color: #357d5b; }
.implementation-counts { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 16px 26px; border-bottom: 1px solid #e5ece7; font-size: 12px; color: #52675d; }
.implementation-counts strong { color: #194733; font-size: 18px; margin-right: 4px; }
.implementation-program { padding: 22px 26px; border-bottom: 1px solid #edf1ee; }
.implementation-program h4 { font-size: 14px; font-weight: 800; color: #244f3d; margin-bottom: 14px; }
.implementation-session-grid { display: flex; flex-direction: column; gap: 0; border-top: 1px solid #e3eae5; }
.implementation-session { display: flex; flex-direction: column; gap: 7px; text-align: left; padding: 17px; border: 1px solid #dce5df; border-radius: 15px; background: #fff; color: #5c6c63; font-size: 12px; transition: border-color .15s,box-shadow .15s; }
.implementation-session:hover { border-color: #5b9676; box-shadow: 0 4px 14px #174a3512; }
.implementation-session[aria-pressed=true] { outline: 2px solid #317650; outline-offset: 2px; background: #f4fbf6; }
.implementation-session:focus-visible { outline: 3px solid #317650; outline-offset: 3px; }
.implementation-session strong { color: #233c30; font-size: 14px; }
.implementation-session-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; font-size: 11px; font-weight: 700; }
.implementation-state { padding: 3px 8px; border-radius: 20px; background: #fff3d6; color: #85590d; }
.implementation-recorded .implementation-state { background: #dcf5e7; color: #216744; }
.implementation-cancelled .implementation-state { background: #f9e5e5; color: #944242; }
.implementation-postponed .implementation-state { background: #eef0fa; color: #565b91; }
.implementation-actual { color: #246b47; font-weight: 600; }
.implementation-open { color: #286b47; font-weight: 800; margin-top: auto; padding-top: 8px; }
.implementation-empty { color: #697a70; font-size: 12px; padding: 10px 0; }
.implementation-session-grid .implementation-session { display: grid; grid-template-columns: 1.1fr 1.5fr 1.2fr 1fr; align-items: center; gap: 10px 18px; border: 0; border-bottom: 1px solid #e3eae5; border-radius: 0; padding: 16px 12px; box-shadow: none; }
.implementation-session-grid .implementation-session:hover { background: #f5faf6; }
.implementation-session-grid .implementation-session[aria-pressed=true] { outline: 0; border-left: 4px solid #317650; background: #edf7ef; }
.implementation-session-grid .implementation-session-top { flex-direction: column; align-items: flex-start; }
.implementation-session-grid .implementation-open { margin: 0; padding: 0; }
.implementation-photos { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 14px; margin-top: 14px; }
.implementation-photos figure { border: 1px solid #dce5df; border-radius: 12px; overflow: hidden; background: #fafcfb; }
.implementation-photos img { width: 100%; height: 150px; object-fit: cover; }
.implementation-photos figcaption { padding: 10px; font-size: 12px; overflow-wrap: anywhere; }
.implementation-photos button { margin: 0 10px 10px; color: #a33333; font-size: 12px; font-weight: 700; }
@media(max-width:800px) { .implementation-session-grid .implementation-session { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px) { .implementation-session-grid .implementation-session { grid-template-columns: 1fr; } }
#attendance-session-panel { scroll-margin-top: 24px; }
@media(max-width:600px) { .implementation-planner-heading,.implementation-program { padding: 18px; } .implementation-counts { padding: 14px 18px; } .implementation-session-grid { grid-template-columns: 1fr; } .implementation-planner-icon { display: none; } }
.attendance-compact-table { border-collapse: collapse; min-width: 500px; }
.attendance-compact-table th,.attendance-compact-table td { padding: 5px 8px; border-bottom: 1px solid #e6ebe8; vertical-align: middle; }
.attendance-compact-table tbody tr:hover { background: #f6faf7; }
.attendance-compact-table .attendance-number { text-align: center; color: #64756a; width: 36px; }
.attendance-child-code { display: inline; margin-left: 7px; color: #78847d; font-size: 10px; }
.attendance-compact-table select,.attendance-compact-table input { width: 100%; border: 1px solid #dce3de; border-radius: 5px; padding: 4px 6px; font-size: 12px; background: #fff; min-height: 28px; }
.attendance-compact-table select { min-width: 90px; }
.attendance-compact-table input { min-width: 140px; }
.attendance-compact-table input[type=number] { min-width: 65px; width: 80px; }
.attendance-compact-table .implementation-child-service { min-width: 65px; }

.attendance-compact-table textarea { min-width: 210px; width: 100%; padding: 6px 8px; border: 1px solid #dce3de; border-radius: 5px; font-size: 12px; resize: vertical; }
#implementation-menu-label { flex-basis: 100%; width: 100%; }
#implementation-menu { display: block; box-sizing: border-box; width: 100%; min-height: 80px; overflow: hidden; resize: vertical; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.learning-box { background: #fff; border: 1px solid #dce7df; border-radius: 16px; padding: 20px; margin: 14px 0; font-size: 13px; }
.learning-box h3,.learning-box h4 { font-size: 17px; font-weight: 800; color: #24553b; margin: 8px 0; }
.learning-box p { margin: 9px 0; line-height: 1.65; }
.learning-box details { margin: 14px 0; }
.learning-box summary { cursor: pointer; font-weight: 700; }
.learning-box label { display: block; margin: 10px 0; font-weight: 600; }
.learning-box textarea,.learning-box select,.learning-box input:not([type=checkbox]) { display: block; width: 100%; padding: 8px; border: 1px solid #cddbd2; border-radius: 7px; margin-top: 5px; font-size: 13px; }
.learning-box input[type=checkbox] { margin-right: 7px; }
.learning-box button,.learning-action { border-radius: 8px; background: #245e40; color: white; padding: 8px 13px; margin: 6px 8px 6px 0; font-size: 12px; }
.learning-box button:disabled { opacity: .45; cursor: not-allowed; }
.learning-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; }
.learning-indicator { padding: 14px; border: 1px solid #dce7df; border-radius: 10px; margin: 12px 0; }
.learning-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.learning-table th,.learning-table td { padding: 10px; border: 1px solid #dce7df; text-align: left; white-space: pre-wrap; }
.learning-table th { background: #eef6f0; }
.learning-summary { background: #eef6f0; padding: 12px; border-radius: 9px; }
.learning-document { padding: 30px; background: white; color: #182c22; border: 1px solid #dce7df; line-height: 1.7; font-size: 13px; }
.learning-document header { text-align: center; border-bottom: 3px double #24553b; padding-bottom: 18px; margin-bottom: 20px; }
.learning-document h1 { font-size: 22px; font-weight: 800; }
.learning-document h2 { font-size: 18px; font-weight: 700; }
.learning-document h3 { font-size: 15px; font-weight: 800; margin: 16px 0 6px; }
.learning-document small { display: block; font-weight: 500; font-size: 11px; }
.learning-document section { break-inside: avoid; margin: 18px 0; }
.learning-narrative { white-space: pre-wrap; overflow-wrap: anywhere; }
.learning-document footer { border-top: 1px solid #cddbd2; margin-top: 22px; padding-top: 14px; font-size: 11px; }
.learning-certificate-document { border: 6px double #a98434; padding: 40px; }
@media print { .learning-document { border: 0; padding: 0; } .learning-certificate-document { border: 5px double #a98434; padding: 25px; } }
