* { box-sizing: border-box; margin: 0; padding: 0; font-family: sans-serif; }
body, html { width: 100%; height: 100%; overflow: hidden; background: #f4f4f9; }

#desktop-block { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background:#111; color:white; z-index: 99999; text-align: center; padding-top: 40vh; font-size: 20px; }
@media (min-width: 768px) { #desktop-block { display: block; } }

.screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; background: #fff; transition: opacity 0.3s ease; }
.hidden { display: none !important; }
#splash-screen { background: #007bff; color: white; justify-content: center; align-items: center; z-index: 9999; }

.login-card { width: 85%; max-width: 320px; padding: 25px; text-align: center; margin: auto; }
.btn-google { width: 100%; padding: 14px; background: #4285F4; color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; }

header { width: 100%; height: 56px; background: #007bff; color: white; display: flex; align-items: center; padding: 0 16px; justify-content: space-between; z-index: 1000; flex-shrink: 0; }

.content-screen { padding: 15px; background: #f4f4f9; flex: 1; overflow-y: auto; }
.search-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; margin-bottom: 15px; background: white; }

.card-item { background: white; padding: 15px; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #e1e1e1; display: flex; align-items: center; gap: 15px; cursor: pointer; }
.card-item:hover { border-color: #007bff; background: #f8fbff; }
.avatar-img { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; background: #ddd; flex-shrink: 0; cursor: zoom-in; }

.info-container { flex: 1; }
.info-container h4 { font-size: 16px; color: #333; margin-bottom: 3px; }
.info-container p { font-size: 13px; color: #666; margin-bottom: 2px; }

#map-screen { display: flex; flex-direction: column; height: 100vh; width: 100vw; }
#map { flex: 1; width: 100%; z-index: 1; }

#drawer { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: white; z-index: 5000; transition: left 0.3s ease; box-shadow: 4px 0 15px rgba(0,0,0,0.2); }
#drawer.open { left: 0; }
.drawer-header { background: #007bff; color: white; padding: 40px 20px 20px 20px; font-weight: bold; font-size: 18px; }
.drawer-item { padding: 16px 20px; color: #333; cursor: pointer; border-bottom: 1px solid #eee; font-size: 15px; }
.drawer-item:hover { background: #f1f1f1; }
#drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 4500; display: none; }
#drawer-overlay.active { display: block; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 6000; display: flex; justify-content: center; align-items: center; }
.modal-content { background: white; width: 90%; max-width: 350px; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto; }
.modal-content input, .modal-content select { width: 100%; padding: 12px; margin: 6px 0; border: 1px solid #ddd; border-radius: 6px; }
.modal-content button { width: 100%; padding: 12px; background: #007bff; color: white; border: none; border-radius: 6px; margin-top: 8px; font-weight: bold; cursor: pointer; }

#photoModal { background: rgba(0,0,0,0.85); z-index: 7000; cursor: zoom-out; }
#expandedPhoto { width: 90%; max-width: 400px; height: auto; border-radius: 12px; object-fit: contain; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

.child-card { padding: 15px; border: 1px solid #ddd; margin-bottom: 12px; background: #fff; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.child-info h4 { font-size: 16px; color: #333; margin-bottom: 3px; }
.child-info p { font-size: 13px; color: #666; margin-bottom: 2px; }

.child-actions-group { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.btn-edit-del { display: flex; gap: 6px; }
.btn-edit-small { background: #ffc107; border: none; border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: bold; cursor: pointer; }
.btn-del-small { background: #dc3545; color: white; border: none; border-radius: 4px; padding: 6px 10px; font-size: 12px; font-weight: bold; cursor: pointer; }

.btn-close { background: #6c757d !important; }

.leaflet-popup-content img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px auto; }
.leaflet-popup-content p { font-size: 14px; line-height: 1.4; color: #333; text-align: center; }