/* family.css — extracted from HomeDashboard.css */

.hdb-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.hdb-member-card {
  background: var(--glass-panel-bg);
  backdrop-filter: var(--glass-panel-blur);
  -webkit-backdrop-filter: var(--glass-panel-blur);
  border: 1px solid var(--glass-panel-border);
  border-radius: 24px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-panel-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

.hdb-member-card:hover {
  background: var(--glass-panel-bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.hdb-member-msg-btn {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(var(--primary-rgb),0.25);
  background: rgba(var(--primary-rgb),0.12);
  color: rgba(var(--primary-rgb),1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0;
}

.hdb-member-msg-btn:hover {
  background: rgba(var(--primary-rgb),0.28);
  border-color: rgba(var(--primary-rgb),0.5);
  transform: scale(1.1);
}

.hdb-member-msg-btn .material-symbols-outlined { font-size: 16px; }
/* ── Location Map ── */

.hdb-family-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}

.hdb-loc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: none;
  color: rgba(var(--primary-rgb),1);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.hdb-loc-btn:hover {
  background: rgba(var(--primary-rgb),0.22);
  border-color: rgba(var(--primary-rgb),0.45);
}

.hdb-loc-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

.hdb-loc-btn .material-symbols-outlined { font-size: 16px; }
/* Location Map Card style handled via hdb-loc-map-wrap */

.hdb-loc-map-wrap {
  display: none;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.hdb-loc-map-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border-color: rgba(var(--primary-rgb),0.3);
}

.hdb-loc-map-wrap.visible { display: flex; }

.hdb-loc-map-wrap .leaflet-container {
  height: 100%; width: 100%;
  background: #1a1a2e;
  pointer-events: none;
}

.hdb-loc-status {
  font-size: 11px; color: #64748b;
  text-align: center;
}
/* Location modal */

.hdb-loc-modal {
  display: none; position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  align-items: center; justify-content: center;
}

.hdb-loc-modal.open { display: flex; }

.hdb-loc-modal-inner {
  position: relative;
  width: 85vw; height: 80vh;
  border-radius: 36px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(30,30,50,0.45);
  backdrop-filter: blur(50px) saturate(200%);
  box-shadow: 0 40px 120px rgba(0,0,0,0.8);
}

.hdb-loc-modal-inner .leaflet-container { pointer-events: auto; }

.hdb-loc-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 1000;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(20,20,35,0.6); color: #fff;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.hdb-loc-modal-close:hover { background: rgba(20,20,35,0.8); transform: scale(1.1); }
/* Modal Overlay */

.hdb-member-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.hdb-member-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
}

.hdb-member-avatar-placeholder {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(59,130,246,0.4));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #fff;
}

.hdb-member-title { flex: 1; min-width: 0; }

.hdb-member-name-row { font-size: 16px; display: block; }

.hdb-member-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.hdb-member-badge.home   { background: rgba(16,185,129,0.1);  color: #34d399; border: 1px solid rgba(16,185,129,0.2); }

.hdb-member-badge.away   { background: rgba(245,158,11,0.1);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }

.hdb-member-badge.school { background: rgba(var(--primary-rgb),0.1);  color: var(--primary-color); border: 1px solid rgba(var(--primary-rgb),0.2); }

.hdb-member-badge.work   { background: rgba(245,158,11,0.1);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }

.hdb-member-badge.other  { background: rgba(255,255,255,0.06); color: #94a3b8; border: 1px solid rgba(255,255,255,0.1); }

.hdb-member-activity { font-size: 13px; font-weight: 600; color: #fff; }

.hdb-member-return   { font-size: 12px; color: #64748b; margin-top: 4px; }
/* ── Suggestions Grid & Scroll ── */

.family-task-counts {
  display: none !important;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: none;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}

.family-task-stat {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  width: 100%;
  text-align: left;
}

.family-task-stat span {
  flex-shrink: 0;
  color: #60a5fa;
}

.family-task-stat strong {
  color: #f1f5f9;
}

.family-card-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  align-items: flex-start;
  width: 100%;
}

.family-action-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.family-assign-task-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none !important;
  border: none !important;
  color: #60a5fa !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 0 !important;
  transition: all 0.2s ease;
  text-decoration: none;
}

.family-assign-task-btn:hover {
  color: #93c5fd !important;
  text-decoration: none;
}

.hdb-member-msg-btn-inline {
  margin-left: auto;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  box-sizing: border-box;
}

.hdb-member-msg-btn-inline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hdb-member-msg-btn-inline .material-symbols-outlined {
  font-size: 18px;
}
/* ═══════════════════════════════════════════════════════════════════

[data-mode="light"] .hdb-member-card {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

[data-mode="light"] .hdb-member-card:hover {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}
/* Location */

[data-mode="light"] .hdb-loc-modal {
  background: rgba(0, 0, 0, 0.25) !important;
}

[data-mode="light"] .hdb-loc-modal-inner {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.15) !important;
}

[data-mode="light"] .hdb-loc-modal-close {
  background: rgba(255, 255, 255, 0.80) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  color: #0f172a !important;
}

[data-mode="light"] .hdb-loc-status {
  color: #475569 !important;
}
/* Modals */

[data-mode="light"] .family-task-stat {
  color: #475569 !important;
}

[data-mode="light"] .family-task-stat strong {
  color: #0f172a !important;
}
/* Inline msg button */

[data-mode="light"] .hdb-member-msg-btn-inline {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}

[data-mode="light"] .hdb-member-msg-btn-inline:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}
/* Buttons secondary light */

[data-mode="light"] .hdb-member-name { color: #0f172a !important; }

[data-mode="light"] .hdb-member-role { color: #475569 !important; }

[data-mode="light"] .hdb-member-status { color: #334155 !important; }

[data-mode="light"] .hdb-member-last-seen { color: #475569 !important; }

[data-mode="light"] .hdb-member-info { color: #334155 !important; }

/* ── Пустые состояния ── */