/* Mobile first: tombol simpan di luar leluhur yang memakai transform/scroll. */
#attendance-save-dock {
    position: fixed; z-index: 40; padding: 8px;
    border: 1px solid #cbd5e1; border-radius: 14px;
    background: #ffffff; box-shadow: 0 -4px 20px #0f172a18;
}
.dark #attendance-save-dock { background: #111c2e; border-color: #334155; }
#attendance-save-dock button { width: 100%; min-height: 48px; padding: 12px 8px; white-space: normal; line-height: 1.35; }
#attendance-save-dock button:disabled { opacity: .7; cursor: wait; }
#attendance-save-dock[hidden], .child-gallery [hidden] { display: none !important; }
#modal-container { position: relative; z-index: 1000; }
#content-area .tabs-rail { flex-wrap: wrap; overflow: visible; }
.v12k-nav .v12k-nav-utama { grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr)); min-width: 0; }
.v12k-nav .v12k-nav-utama button { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.gk-nav .gk-nav-bagian { flex-wrap: wrap; overflow: visible; }
.gk-nav .gk-nav-bagian button { flex: 1 1 90px; min-width: 0; min-height: 44px; height: auto; white-space: normal; justify-content: center; }
body.ada-bilah-simpan #content-area { padding-bottom: var(--attendance-reserve, 170px) !important; scroll-padding-bottom: var(--attendance-reserve, 170px); }
.absen-wadah > .absen-simpan-ruang { height: 0 !important; }
#form-filter { display: flex; flex-wrap: wrap; max-width: 100%; }
#form-filter button { flex: 1 1 auto; min-height: 44px; white-space: normal; }
#app-shell, #content-area, #content-area > *, #app-shell > main { min-width: 0; }
.child-gallery { border: 1px solid #cbd5e1; border-radius: 16px; padding: 16px; margin-bottom: 20px; background: #fff; overflow-wrap: anywhere; }
.dark .child-gallery { background: #111c2e; border-color: #334155; }
.child-gallery h2 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.child-gallery p { margin: 8px 0; font-size: 13px; line-height: 1.6; }
.child-gallery label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.child-gallery input, .child-gallery select, .child-gallery textarea { width: 100%; min-width: 0; max-width: 100%; padding: 10px; border: 1px solid #94a3b8; border-radius: 9px; color: inherit; background: transparent; font-size: 16px; }
.child-gallery button, .child-gallery .cg-pick { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border-radius: 9px; border: 1px solid #94a3b8; gap: 6px; font-size: 13px; cursor: pointer; }
.child-gallery button:disabled { opacity: .55; cursor: wait; }
.child-gallery .cg-primary { background: #0f6b55; color: white; border-color: #0f6b55; }
.cg-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.cg-card { min-width: 0; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px; }
.cg-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.cg-card .cg-image { display: block; width: 100%; padding: 0; border: 0; }
.cg-card small { display: block; font-size: 11px; margin: 6px 0; }
.cg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cg-upload { border-top: 1px solid #cbd5e1; padding-top: 8px; }
.cg-status { white-space: pre-line; }
.cg-error { color: #be123c; }
.dark .cg-error { color: #fda4af; }
@media(min-width:640px) { .cg-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(min-width:1200px) { .cg-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:479px) { .absen-wadah #student-list-container .flex { flex-wrap: wrap; } }
@media print { #attendance-save-dock, .cg-upload, .cg-actions { display: none !important; } }
